react-luminus-components 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/.vite/manifest.json +133 -0
- package/dist/Modal-JLnYbEat.js +1 -0
- package/dist/Modal-_FnSEPRk.mjs +623 -0
- package/dist/SimpleTooltip-BjlbHsKC.mjs +1767 -0
- package/dist/SimpleTooltip-D9shMl1R.js +1 -0
- package/dist/components/EmployeePicker/EmployeeSearch/EmployeeSearch.d.ts +7 -0
- package/dist/components/EmployeePicker/EmployeeSearchModal/EmployeeSearchModal.d.ts +9 -0
- package/dist/components/EmployeePicker/comps/EmployeeSearchItem/EmployeeSearchItem.d.ts +7 -0
- package/dist/components/EmployeePicker/comps/index.d.ts +1 -0
- package/dist/components/EmployeePicker/index.d.ts +2 -0
- package/dist/components/Form/CheckInput/CheckInput.d.ts +11 -0
- package/dist/components/Form/Container/InputContainer.d.ts +8 -0
- package/dist/components/Form/EmployeePicker/EmployeePicker.d.ts +12 -0
- package/dist/components/Form/SelectInput/SelectInput.d.ts +17 -0
- package/dist/components/Form/TextInput/TextInput.d.ts +16 -0
- package/dist/components/Form/index.d.ts +4 -0
- package/dist/components/HookForm/CheckInput/HookFormCheckInput.d.ts +9 -0
- package/dist/components/HookForm/EmployeePicker/HookFormEmployeePicker.d.ts +9 -0
- package/dist/components/HookForm/FloatingSubmit/FloatingFormSubmit.d.ts +6 -0
- package/dist/components/HookForm/RadioInput/HookFormRadioInput.d.ts +9 -0
- package/dist/components/HookForm/SelectInput/HookFormSelectInput.d.ts +9 -0
- package/dist/components/HookForm/TextAreaInput/HookFormTextAreaInput.d.ts +9 -0
- package/dist/components/HookForm/TextInput/HookFormTextInput.d.ts +9 -0
- package/dist/components/HookForm/index.d.ts +7 -0
- package/dist/components/Tooltip/HtmlTooltip/HtmlTooltip.d.ts +10 -0
- package/dist/components/Tooltip/SimpleTooltip/SimpleTooltip.d.ts +8 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/UserAvatar/AvatarIcon/AvatarIcon.d.ts +8 -0
- package/dist/components/UserAvatar/UserAvatarDropdown/UserAvatarDropdown.d.ts +7 -0
- package/dist/components/UserAvatar/UserAvatarToggle/UserAvatarToggle.d.ts +8 -0
- package/dist/components/UserAvatar/index.d.ts +2 -0
- package/dist/components/common/ApiFileDownloadButton/ApiFileDownloadButton.d.ts +9 -0
- package/dist/components/common/ConfirmDialog/ConfirmDialog.d.ts +3 -0
- package/dist/components/common/HomeDashboard/HomeDashboard.d.ts +9 -0
- package/dist/components/common/HomeDashboard/comps/FreeSpaceWidget/FreeSpaceWidget.d.ts +6 -0
- package/dist/components/common/HomeDashboard/comps/index.d.ts +1 -0
- package/dist/components/common/HomeDashboard/hooks/useUserDashboard.d.ts +6 -0
- package/dist/components/common/Loading/Loading.d.ts +3 -0
- package/dist/components/common/MonthPicker/MonthPicker.d.ts +9 -0
- package/dist/components/common/Typography/Typography.d.ts +9 -0
- package/dist/components/common/index.d.ts +6 -0
- package/dist/constants-CT2hnPeO.js +1 -0
- package/dist/constants-CzNy5yO3.mjs +7 -0
- package/dist/contexts/confirm/ConfirmContext.d.ts +9 -0
- package/dist/contexts/confirm/ConfirmProvider.d.ts +6 -0
- package/dist/contexts/index.d.ts +6 -0
- package/dist/contexts/loading/LoadingContext.d.ts +8 -0
- package/dist/contexts/loading/LoadingProvider.d.ts +6 -0
- package/dist/contexts/luminus-components/LuminusComponentsContext.d.ts +15 -0
- package/dist/contexts/luminus-components/LuminusComponentsProvider.d.ts +16 -0
- package/dist/contexts/user/UserContext.d.ts +9 -0
- package/dist/contexts/user/UserProvider.d.ts +6 -0
- package/dist/contexts.cjs.js +1 -0
- package/dist/contexts.d.ts +1 -0
- package/dist/contexts.es.js +86 -0
- package/dist/hasClass-3JW9Qluf.mjs +1482 -0
- package/dist/hasClass-6m1Qq_DA.js +20 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/useAuth/useAuth.d.ts +7 -0
- package/dist/hooks/useAxios/useAxios.d.ts +3 -0
- package/dist/hooks/useConfirm/useConfirm.d.ts +8 -0
- package/dist/hooks/useNotifications/useNotifications.d.ts +4 -0
- package/dist/hooks/useZodSchemaTypes/useZodSchemaTypes.d.ts +44 -0
- package/dist/hooks.cjs.js +1 -0
- package/dist/hooks.d.ts +1 -0
- package/dist/hooks.es.js +2781 -0
- package/dist/layout/FullScreenContainer/FullScreenContainer.d.ts +4 -0
- package/dist/layout/MainContainer/MainContainer.d.ts +4 -0
- package/dist/layout/SideContentBar/SideContentBar.d.ts +7 -0
- package/dist/layout/SideMenu/MenuItem/MenuItem.d.ts +10 -0
- package/dist/layout/SideMenu/SideMenu.d.ts +10 -0
- package/dist/layout/TopBar/TopBar.d.ts +7 -0
- package/dist/layout/index.d.ts +5 -0
- package/dist/layout.cjs.js +1 -0
- package/dist/layout.d.ts +1 -0
- package/dist/layout.es.js +164 -0
- package/dist/main.cjs.js +1 -0
- package/dist/main.d.ts +11 -0
- package/dist/main.es.js +2788 -0
- package/dist/models/index.d.ts +23 -0
- package/dist/models/prop-types/ContainerProps.d.ts +6 -0
- package/dist/models/prop-types/HookFormCheckInputProps.d.ts +7 -0
- package/dist/models/prop-types/HookFormEmployeePickerProps.d.ts +9 -0
- package/dist/models/prop-types/HookFormInputProps.d.ts +9 -0
- package/dist/models/prop-types/HookFormRadioInputProps.d.ts +7 -0
- package/dist/models/prop-types/HookFormSelectInputProps.d.ts +12 -0
- package/dist/models/prop-types/HookFormTextAreaInputProps.d.ts +9 -0
- package/dist/models/prop-types/HookFormTextInputProps.d.ts +11 -0
- package/dist/models/texts/AxiosTexts.d.ts +6 -0
- package/dist/models/texts/ConfirmTexts.d.ts +5 -0
- package/dist/models/texts/EmployeeSearchModalTexts.d.ts +6 -0
- package/dist/models/texts/FormValidationTexts.d.ts +5 -0
- package/dist/models/texts/HomeDashboardTexts.d.ts +5 -0
- package/dist/models/types/ApiErrorResult.d.ts +7 -0
- package/dist/models/types/DashboardConfig.d.ts +5 -0
- package/dist/models/types/DashboardWidget.d.ts +7 -0
- package/dist/models/types/DashboardWidgetConfig.d.ts +5 -0
- package/dist/models/types/EmployeeIndexModel.d.ts +14 -0
- package/dist/models/types/ErrorField.d.ts +5 -0
- package/dist/models/types/FormSelectOption.d.ts +5 -0
- package/dist/models/types/HookFormInputProps.d.ts +9 -0
- package/dist/models/types/MenuItemType.d.ts +9 -0
- package/dist/models/types/NameIdIntModel.d.ts +5 -0
- package/dist/models/types/NameIdStringModel.d.ts +5 -0
- package/dist/models/types/UserModel.d.ts +13 -0
- package/dist/style.css +1 -0
- package/dist/textUtils-9KFqOvA8.mjs +27 -0
- package/dist/textUtils-C0nqWp3S.js +1 -0
- package/dist/useAxios-BU-BqYrK.mjs +2663 -0
- package/dist/useAxios-ZEhq7C_H.js +212 -0
- package/dist/useConfirm-BazFQNRI.js +1 -0
- package/dist/useConfirm-DH9Pmz_w.mjs +18 -0
- package/dist/utils/apiErrorFields/apiErrorFieldsUtils.d.ts +4 -0
- package/dist/utils/date/dateUtils.d.ts +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/object/objectUtils.d.ts +2 -0
- package/dist/utils/text/textUtils.d.ts +1 -0
- package/dist/utils.cjs.js +1 -0
- package/dist/utils.d.ts +1 -0
- package/dist/utils.es.js +137 -0
- package/package.json +94 -0
package/dist/main.es.js
ADDED
|
@@ -0,0 +1,2788 @@
|
|
|
1
|
+
import { j as s, e as N, i as Yt, k as V, h as Lt, L as He } from "./useAxios-BU-BqYrK.mjs";
|
|
2
|
+
import * as x from "react";
|
|
3
|
+
import X, { useCallback as $, useState as I, useEffect as P, useRef as R, useReducer as qe, useContext as S, useMemo as ae } from "react";
|
|
4
|
+
import { d as Be, u as At, q as Me, L as Ht, M as ie } from "./Modal-_FnSEPRk.mjs";
|
|
5
|
+
import { T as ea } from "./Modal-_FnSEPRk.mjs";
|
|
6
|
+
import { c as qt, d as Bt, e as Vt, f as _t, g as Gt, u as Qt, m as Xt, h as Kt, w as ve, i as Ut, O as Ve, P as he, T as Jt, j as z } from "./SimpleTooltip-BjlbHsKC.mjs";
|
|
7
|
+
import { S as na } from "./SimpleTooltip-BjlbHsKC.mjs";
|
|
8
|
+
import { m as zt, a as _e } from "./constants-CzNy5yO3.mjs";
|
|
9
|
+
import { h as J, n as E, B as Zt, C as en, p as tn, u as nn, x as rn, q as xe, z as on, v as an, P as ee } from "./hasClass-3JW9Qluf.mjs";
|
|
10
|
+
const Ro = ({ fileLoader: e, fileName: t, children: n, className: r }) => {
|
|
11
|
+
const o = $(async () => {
|
|
12
|
+
var d;
|
|
13
|
+
const a = await e();
|
|
14
|
+
if (!a)
|
|
15
|
+
return;
|
|
16
|
+
const i = window.URL.createObjectURL(new Blob([a])), c = document.createElement("a");
|
|
17
|
+
c.href = i, c.setAttribute("download", t), document.body.appendChild(c), c.click(), (d = c.parentNode) == null || d.removeChild(c);
|
|
18
|
+
}, [e, t]);
|
|
19
|
+
return /* @__PURE__ */ s.jsx("button", { type: "button", className: `btn btn-outline-primary ${r ?? ""}`, onClick: o, children: n });
|
|
20
|
+
};
|
|
21
|
+
function A(e) {
|
|
22
|
+
const t = Object.prototype.toString.call(e);
|
|
23
|
+
return e instanceof Date || typeof e == "object" && t === "[object Date]" ? new e.constructor(+e) : typeof e == "number" || t === "[object Number]" || typeof e == "string" || t === "[object String]" ? new Date(e) : /* @__PURE__ */ new Date(NaN);
|
|
24
|
+
}
|
|
25
|
+
function _(e, t) {
|
|
26
|
+
return e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
27
|
+
}
|
|
28
|
+
function sn(e, t) {
|
|
29
|
+
const n = A(e);
|
|
30
|
+
if (isNaN(t))
|
|
31
|
+
return _(e, NaN);
|
|
32
|
+
if (!t)
|
|
33
|
+
return n;
|
|
34
|
+
const r = n.getDate(), o = _(e, n.getTime());
|
|
35
|
+
o.setMonth(n.getMonth() + t + 1, 0);
|
|
36
|
+
const a = o.getDate();
|
|
37
|
+
return r >= a ? o : (n.setFullYear(
|
|
38
|
+
o.getFullYear(),
|
|
39
|
+
o.getMonth(),
|
|
40
|
+
r
|
|
41
|
+
), n);
|
|
42
|
+
}
|
|
43
|
+
let cn = {};
|
|
44
|
+
function de() {
|
|
45
|
+
return cn;
|
|
46
|
+
}
|
|
47
|
+
function oe(e, t) {
|
|
48
|
+
var c, d, u, h;
|
|
49
|
+
const n = de(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((d = (c = t == null ? void 0 : t.locale) == null ? void 0 : c.options) == null ? void 0 : d.weekStartsOn) ?? n.weekStartsOn ?? ((h = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : h.weekStartsOn) ?? 0, o = A(e), a = o.getDay(), i = (a < r ? 7 : 0) + a - r;
|
|
50
|
+
return o.setDate(o.getDate() - i), o.setHours(0, 0, 0, 0), o;
|
|
51
|
+
}
|
|
52
|
+
function ce(e) {
|
|
53
|
+
return oe(e, { weekStartsOn: 1 });
|
|
54
|
+
}
|
|
55
|
+
function Ge(e) {
|
|
56
|
+
const t = A(e), n = t.getFullYear(), r = _(e, 0);
|
|
57
|
+
r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
|
|
58
|
+
const o = ce(r), a = _(e, 0);
|
|
59
|
+
a.setFullYear(n, 0, 4), a.setHours(0, 0, 0, 0);
|
|
60
|
+
const i = ce(a);
|
|
61
|
+
return t.getTime() >= o.getTime() ? n + 1 : t.getTime() >= i.getTime() ? n : n - 1;
|
|
62
|
+
}
|
|
63
|
+
function Se(e) {
|
|
64
|
+
const t = A(e);
|
|
65
|
+
return t.setHours(0, 0, 0, 0), t;
|
|
66
|
+
}
|
|
67
|
+
function Oe(e) {
|
|
68
|
+
const t = A(e), n = new Date(
|
|
69
|
+
Date.UTC(
|
|
70
|
+
t.getFullYear(),
|
|
71
|
+
t.getMonth(),
|
|
72
|
+
t.getDate(),
|
|
73
|
+
t.getHours(),
|
|
74
|
+
t.getMinutes(),
|
|
75
|
+
t.getSeconds(),
|
|
76
|
+
t.getMilliseconds()
|
|
77
|
+
)
|
|
78
|
+
);
|
|
79
|
+
return n.setUTCFullYear(t.getFullYear()), +e - +n;
|
|
80
|
+
}
|
|
81
|
+
function ln(e, t) {
|
|
82
|
+
const n = Se(e), r = Se(t), o = +n - Oe(n), a = +r - Oe(r);
|
|
83
|
+
return Math.round((o - a) / zt);
|
|
84
|
+
}
|
|
85
|
+
function un(e) {
|
|
86
|
+
const t = Ge(e), n = _(e, 0);
|
|
87
|
+
return n.setFullYear(t, 0, 4), n.setHours(0, 0, 0, 0), ce(n);
|
|
88
|
+
}
|
|
89
|
+
function dn(e) {
|
|
90
|
+
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
91
|
+
}
|
|
92
|
+
function fn(e) {
|
|
93
|
+
if (!dn(e) && typeof e != "number")
|
|
94
|
+
return !1;
|
|
95
|
+
const t = A(e);
|
|
96
|
+
return !isNaN(Number(t));
|
|
97
|
+
}
|
|
98
|
+
function mn(e) {
|
|
99
|
+
const t = A(e), n = _(e, 0);
|
|
100
|
+
return n.setFullYear(t.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
101
|
+
}
|
|
102
|
+
const hn = {
|
|
103
|
+
lessThanXSeconds: {
|
|
104
|
+
one: "less than a second",
|
|
105
|
+
other: "less than {{count}} seconds"
|
|
106
|
+
},
|
|
107
|
+
xSeconds: {
|
|
108
|
+
one: "1 second",
|
|
109
|
+
other: "{{count}} seconds"
|
|
110
|
+
},
|
|
111
|
+
halfAMinute: "half a minute",
|
|
112
|
+
lessThanXMinutes: {
|
|
113
|
+
one: "less than a minute",
|
|
114
|
+
other: "less than {{count}} minutes"
|
|
115
|
+
},
|
|
116
|
+
xMinutes: {
|
|
117
|
+
one: "1 minute",
|
|
118
|
+
other: "{{count}} minutes"
|
|
119
|
+
},
|
|
120
|
+
aboutXHours: {
|
|
121
|
+
one: "about 1 hour",
|
|
122
|
+
other: "about {{count}} hours"
|
|
123
|
+
},
|
|
124
|
+
xHours: {
|
|
125
|
+
one: "1 hour",
|
|
126
|
+
other: "{{count}} hours"
|
|
127
|
+
},
|
|
128
|
+
xDays: {
|
|
129
|
+
one: "1 day",
|
|
130
|
+
other: "{{count}} days"
|
|
131
|
+
},
|
|
132
|
+
aboutXWeeks: {
|
|
133
|
+
one: "about 1 week",
|
|
134
|
+
other: "about {{count}} weeks"
|
|
135
|
+
},
|
|
136
|
+
xWeeks: {
|
|
137
|
+
one: "1 week",
|
|
138
|
+
other: "{{count}} weeks"
|
|
139
|
+
},
|
|
140
|
+
aboutXMonths: {
|
|
141
|
+
one: "about 1 month",
|
|
142
|
+
other: "about {{count}} months"
|
|
143
|
+
},
|
|
144
|
+
xMonths: {
|
|
145
|
+
one: "1 month",
|
|
146
|
+
other: "{{count}} months"
|
|
147
|
+
},
|
|
148
|
+
aboutXYears: {
|
|
149
|
+
one: "about 1 year",
|
|
150
|
+
other: "about {{count}} years"
|
|
151
|
+
},
|
|
152
|
+
xYears: {
|
|
153
|
+
one: "1 year",
|
|
154
|
+
other: "{{count}} years"
|
|
155
|
+
},
|
|
156
|
+
overXYears: {
|
|
157
|
+
one: "over 1 year",
|
|
158
|
+
other: "over {{count}} years"
|
|
159
|
+
},
|
|
160
|
+
almostXYears: {
|
|
161
|
+
one: "almost 1 year",
|
|
162
|
+
other: "almost {{count}} years"
|
|
163
|
+
}
|
|
164
|
+
}, gn = (e, t, n) => {
|
|
165
|
+
let r;
|
|
166
|
+
const o = hn[e];
|
|
167
|
+
return typeof o == "string" ? r = o : t === 1 ? r = o.one : r = o.other.replace("{{count}}", t.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
168
|
+
};
|
|
169
|
+
function ge(e) {
|
|
170
|
+
return (t = {}) => {
|
|
171
|
+
const n = t.width ? String(t.width) : e.defaultWidth;
|
|
172
|
+
return e.formats[n] || e.formats[e.defaultWidth];
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
const pn = {
|
|
176
|
+
full: "EEEE, MMMM do, y",
|
|
177
|
+
long: "MMMM do, y",
|
|
178
|
+
medium: "MMM d, y",
|
|
179
|
+
short: "MM/dd/yyyy"
|
|
180
|
+
}, wn = {
|
|
181
|
+
full: "h:mm:ss a zzzz",
|
|
182
|
+
long: "h:mm:ss a z",
|
|
183
|
+
medium: "h:mm:ss a",
|
|
184
|
+
short: "h:mm a"
|
|
185
|
+
}, bn = {
|
|
186
|
+
full: "{{date}} 'at' {{time}}",
|
|
187
|
+
long: "{{date}} 'at' {{time}}",
|
|
188
|
+
medium: "{{date}}, {{time}}",
|
|
189
|
+
short: "{{date}}, {{time}}"
|
|
190
|
+
}, yn = {
|
|
191
|
+
date: ge({
|
|
192
|
+
formats: pn,
|
|
193
|
+
defaultWidth: "full"
|
|
194
|
+
}),
|
|
195
|
+
time: ge({
|
|
196
|
+
formats: wn,
|
|
197
|
+
defaultWidth: "full"
|
|
198
|
+
}),
|
|
199
|
+
dateTime: ge({
|
|
200
|
+
formats: bn,
|
|
201
|
+
defaultWidth: "full"
|
|
202
|
+
})
|
|
203
|
+
}, vn = {
|
|
204
|
+
lastWeek: "'last' eeee 'at' p",
|
|
205
|
+
yesterday: "'yesterday at' p",
|
|
206
|
+
today: "'today at' p",
|
|
207
|
+
tomorrow: "'tomorrow at' p",
|
|
208
|
+
nextWeek: "eeee 'at' p",
|
|
209
|
+
other: "P"
|
|
210
|
+
}, xn = (e, t, n, r) => vn[e];
|
|
211
|
+
function ne(e) {
|
|
212
|
+
return (t, n) => {
|
|
213
|
+
const r = n != null && n.context ? String(n.context) : "standalone";
|
|
214
|
+
let o;
|
|
215
|
+
if (r === "formatting" && e.formattingValues) {
|
|
216
|
+
const i = e.defaultFormattingWidth || e.defaultWidth, c = n != null && n.width ? String(n.width) : i;
|
|
217
|
+
o = e.formattingValues[c] || e.formattingValues[i];
|
|
218
|
+
} else {
|
|
219
|
+
const i = e.defaultWidth, c = n != null && n.width ? String(n.width) : e.defaultWidth;
|
|
220
|
+
o = e.values[c] || e.values[i];
|
|
221
|
+
}
|
|
222
|
+
const a = e.argumentCallback ? e.argumentCallback(t) : t;
|
|
223
|
+
return o[a];
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
const jn = {
|
|
227
|
+
narrow: ["B", "A"],
|
|
228
|
+
abbreviated: ["BC", "AD"],
|
|
229
|
+
wide: ["Before Christ", "Anno Domini"]
|
|
230
|
+
}, kn = {
|
|
231
|
+
narrow: ["1", "2", "3", "4"],
|
|
232
|
+
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
233
|
+
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
234
|
+
}, Cn = {
|
|
235
|
+
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
236
|
+
abbreviated: [
|
|
237
|
+
"Jan",
|
|
238
|
+
"Feb",
|
|
239
|
+
"Mar",
|
|
240
|
+
"Apr",
|
|
241
|
+
"May",
|
|
242
|
+
"Jun",
|
|
243
|
+
"Jul",
|
|
244
|
+
"Aug",
|
|
245
|
+
"Sep",
|
|
246
|
+
"Oct",
|
|
247
|
+
"Nov",
|
|
248
|
+
"Dec"
|
|
249
|
+
],
|
|
250
|
+
wide: [
|
|
251
|
+
"January",
|
|
252
|
+
"February",
|
|
253
|
+
"March",
|
|
254
|
+
"April",
|
|
255
|
+
"May",
|
|
256
|
+
"June",
|
|
257
|
+
"July",
|
|
258
|
+
"August",
|
|
259
|
+
"September",
|
|
260
|
+
"October",
|
|
261
|
+
"November",
|
|
262
|
+
"December"
|
|
263
|
+
]
|
|
264
|
+
}, Nn = {
|
|
265
|
+
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
266
|
+
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
267
|
+
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
268
|
+
wide: [
|
|
269
|
+
"Sunday",
|
|
270
|
+
"Monday",
|
|
271
|
+
"Tuesday",
|
|
272
|
+
"Wednesday",
|
|
273
|
+
"Thursday",
|
|
274
|
+
"Friday",
|
|
275
|
+
"Saturday"
|
|
276
|
+
]
|
|
277
|
+
}, Dn = {
|
|
278
|
+
narrow: {
|
|
279
|
+
am: "a",
|
|
280
|
+
pm: "p",
|
|
281
|
+
midnight: "mi",
|
|
282
|
+
noon: "n",
|
|
283
|
+
morning: "morning",
|
|
284
|
+
afternoon: "afternoon",
|
|
285
|
+
evening: "evening",
|
|
286
|
+
night: "night"
|
|
287
|
+
},
|
|
288
|
+
abbreviated: {
|
|
289
|
+
am: "AM",
|
|
290
|
+
pm: "PM",
|
|
291
|
+
midnight: "midnight",
|
|
292
|
+
noon: "noon",
|
|
293
|
+
morning: "morning",
|
|
294
|
+
afternoon: "afternoon",
|
|
295
|
+
evening: "evening",
|
|
296
|
+
night: "night"
|
|
297
|
+
},
|
|
298
|
+
wide: {
|
|
299
|
+
am: "a.m.",
|
|
300
|
+
pm: "p.m.",
|
|
301
|
+
midnight: "midnight",
|
|
302
|
+
noon: "noon",
|
|
303
|
+
morning: "morning",
|
|
304
|
+
afternoon: "afternoon",
|
|
305
|
+
evening: "evening",
|
|
306
|
+
night: "night"
|
|
307
|
+
}
|
|
308
|
+
}, $n = {
|
|
309
|
+
narrow: {
|
|
310
|
+
am: "a",
|
|
311
|
+
pm: "p",
|
|
312
|
+
midnight: "mi",
|
|
313
|
+
noon: "n",
|
|
314
|
+
morning: "in the morning",
|
|
315
|
+
afternoon: "in the afternoon",
|
|
316
|
+
evening: "in the evening",
|
|
317
|
+
night: "at night"
|
|
318
|
+
},
|
|
319
|
+
abbreviated: {
|
|
320
|
+
am: "AM",
|
|
321
|
+
pm: "PM",
|
|
322
|
+
midnight: "midnight",
|
|
323
|
+
noon: "noon",
|
|
324
|
+
morning: "in the morning",
|
|
325
|
+
afternoon: "in the afternoon",
|
|
326
|
+
evening: "in the evening",
|
|
327
|
+
night: "at night"
|
|
328
|
+
},
|
|
329
|
+
wide: {
|
|
330
|
+
am: "a.m.",
|
|
331
|
+
pm: "p.m.",
|
|
332
|
+
midnight: "midnight",
|
|
333
|
+
noon: "noon",
|
|
334
|
+
morning: "in the morning",
|
|
335
|
+
afternoon: "in the afternoon",
|
|
336
|
+
evening: "in the evening",
|
|
337
|
+
night: "at night"
|
|
338
|
+
}
|
|
339
|
+
}, Fn = (e, t) => {
|
|
340
|
+
const n = Number(e), r = n % 100;
|
|
341
|
+
if (r > 20 || r < 10)
|
|
342
|
+
switch (r % 10) {
|
|
343
|
+
case 1:
|
|
344
|
+
return n + "st";
|
|
345
|
+
case 2:
|
|
346
|
+
return n + "nd";
|
|
347
|
+
case 3:
|
|
348
|
+
return n + "rd";
|
|
349
|
+
}
|
|
350
|
+
return n + "th";
|
|
351
|
+
}, Mn = {
|
|
352
|
+
ordinalNumber: Fn,
|
|
353
|
+
era: ne({
|
|
354
|
+
values: jn,
|
|
355
|
+
defaultWidth: "wide"
|
|
356
|
+
}),
|
|
357
|
+
quarter: ne({
|
|
358
|
+
values: kn,
|
|
359
|
+
defaultWidth: "wide",
|
|
360
|
+
argumentCallback: (e) => e - 1
|
|
361
|
+
}),
|
|
362
|
+
month: ne({
|
|
363
|
+
values: Cn,
|
|
364
|
+
defaultWidth: "wide"
|
|
365
|
+
}),
|
|
366
|
+
day: ne({
|
|
367
|
+
values: Nn,
|
|
368
|
+
defaultWidth: "wide"
|
|
369
|
+
}),
|
|
370
|
+
dayPeriod: ne({
|
|
371
|
+
values: Dn,
|
|
372
|
+
defaultWidth: "wide",
|
|
373
|
+
formattingValues: $n,
|
|
374
|
+
defaultFormattingWidth: "wide"
|
|
375
|
+
})
|
|
376
|
+
};
|
|
377
|
+
function re(e) {
|
|
378
|
+
return (t, n = {}) => {
|
|
379
|
+
const r = n.width, o = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], a = t.match(o);
|
|
380
|
+
if (!a)
|
|
381
|
+
return null;
|
|
382
|
+
const i = a[0], c = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], d = Array.isArray(c) ? On(c, (l) => l.test(i)) : (
|
|
383
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
384
|
+
Sn(c, (l) => l.test(i))
|
|
385
|
+
);
|
|
386
|
+
let u;
|
|
387
|
+
u = e.valueCallback ? e.valueCallback(d) : d, u = n.valueCallback ? (
|
|
388
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
389
|
+
n.valueCallback(u)
|
|
390
|
+
) : u;
|
|
391
|
+
const h = t.slice(i.length);
|
|
392
|
+
return { value: u, rest: h };
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
function Sn(e, t) {
|
|
396
|
+
for (const n in e)
|
|
397
|
+
if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
|
|
398
|
+
return n;
|
|
399
|
+
}
|
|
400
|
+
function On(e, t) {
|
|
401
|
+
for (let n = 0; n < e.length; n++)
|
|
402
|
+
if (t(e[n]))
|
|
403
|
+
return n;
|
|
404
|
+
}
|
|
405
|
+
function En(e) {
|
|
406
|
+
return (t, n = {}) => {
|
|
407
|
+
const r = t.match(e.matchPattern);
|
|
408
|
+
if (!r)
|
|
409
|
+
return null;
|
|
410
|
+
const o = r[0], a = t.match(e.parsePattern);
|
|
411
|
+
if (!a)
|
|
412
|
+
return null;
|
|
413
|
+
let i = e.valueCallback ? e.valueCallback(a[0]) : a[0];
|
|
414
|
+
i = n.valueCallback ? n.valueCallback(i) : i;
|
|
415
|
+
const c = t.slice(o.length);
|
|
416
|
+
return { value: i, rest: c };
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
const Tn = /^(\d+)(th|st|nd|rd)?/i, Pn = /\d+/i, Wn = {
|
|
420
|
+
narrow: /^(b|a)/i,
|
|
421
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
422
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
423
|
+
}, In = {
|
|
424
|
+
any: [/^b/i, /^(a|c)/i]
|
|
425
|
+
}, Rn = {
|
|
426
|
+
narrow: /^[1234]/i,
|
|
427
|
+
abbreviated: /^q[1234]/i,
|
|
428
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
429
|
+
}, Yn = {
|
|
430
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
431
|
+
}, Ln = {
|
|
432
|
+
narrow: /^[jfmasond]/i,
|
|
433
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
434
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
435
|
+
}, An = {
|
|
436
|
+
narrow: [
|
|
437
|
+
/^j/i,
|
|
438
|
+
/^f/i,
|
|
439
|
+
/^m/i,
|
|
440
|
+
/^a/i,
|
|
441
|
+
/^m/i,
|
|
442
|
+
/^j/i,
|
|
443
|
+
/^j/i,
|
|
444
|
+
/^a/i,
|
|
445
|
+
/^s/i,
|
|
446
|
+
/^o/i,
|
|
447
|
+
/^n/i,
|
|
448
|
+
/^d/i
|
|
449
|
+
],
|
|
450
|
+
any: [
|
|
451
|
+
/^ja/i,
|
|
452
|
+
/^f/i,
|
|
453
|
+
/^mar/i,
|
|
454
|
+
/^ap/i,
|
|
455
|
+
/^may/i,
|
|
456
|
+
/^jun/i,
|
|
457
|
+
/^jul/i,
|
|
458
|
+
/^au/i,
|
|
459
|
+
/^s/i,
|
|
460
|
+
/^o/i,
|
|
461
|
+
/^n/i,
|
|
462
|
+
/^d/i
|
|
463
|
+
]
|
|
464
|
+
}, Hn = {
|
|
465
|
+
narrow: /^[smtwf]/i,
|
|
466
|
+
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
467
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
468
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
469
|
+
}, qn = {
|
|
470
|
+
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
471
|
+
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
472
|
+
}, Bn = {
|
|
473
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
474
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
475
|
+
}, Vn = {
|
|
476
|
+
any: {
|
|
477
|
+
am: /^a/i,
|
|
478
|
+
pm: /^p/i,
|
|
479
|
+
midnight: /^mi/i,
|
|
480
|
+
noon: /^no/i,
|
|
481
|
+
morning: /morning/i,
|
|
482
|
+
afternoon: /afternoon/i,
|
|
483
|
+
evening: /evening/i,
|
|
484
|
+
night: /night/i
|
|
485
|
+
}
|
|
486
|
+
}, _n = {
|
|
487
|
+
ordinalNumber: En({
|
|
488
|
+
matchPattern: Tn,
|
|
489
|
+
parsePattern: Pn,
|
|
490
|
+
valueCallback: (e) => parseInt(e, 10)
|
|
491
|
+
}),
|
|
492
|
+
era: re({
|
|
493
|
+
matchPatterns: Wn,
|
|
494
|
+
defaultMatchWidth: "wide",
|
|
495
|
+
parsePatterns: In,
|
|
496
|
+
defaultParseWidth: "any"
|
|
497
|
+
}),
|
|
498
|
+
quarter: re({
|
|
499
|
+
matchPatterns: Rn,
|
|
500
|
+
defaultMatchWidth: "wide",
|
|
501
|
+
parsePatterns: Yn,
|
|
502
|
+
defaultParseWidth: "any",
|
|
503
|
+
valueCallback: (e) => e + 1
|
|
504
|
+
}),
|
|
505
|
+
month: re({
|
|
506
|
+
matchPatterns: Ln,
|
|
507
|
+
defaultMatchWidth: "wide",
|
|
508
|
+
parsePatterns: An,
|
|
509
|
+
defaultParseWidth: "any"
|
|
510
|
+
}),
|
|
511
|
+
day: re({
|
|
512
|
+
matchPatterns: Hn,
|
|
513
|
+
defaultMatchWidth: "wide",
|
|
514
|
+
parsePatterns: qn,
|
|
515
|
+
defaultParseWidth: "any"
|
|
516
|
+
}),
|
|
517
|
+
dayPeriod: re({
|
|
518
|
+
matchPatterns: Bn,
|
|
519
|
+
defaultMatchWidth: "any",
|
|
520
|
+
parsePatterns: Vn,
|
|
521
|
+
defaultParseWidth: "any"
|
|
522
|
+
})
|
|
523
|
+
}, Gn = {
|
|
524
|
+
code: "en-US",
|
|
525
|
+
formatDistance: gn,
|
|
526
|
+
formatLong: yn,
|
|
527
|
+
formatRelative: xn,
|
|
528
|
+
localize: Mn,
|
|
529
|
+
match: _n,
|
|
530
|
+
options: {
|
|
531
|
+
weekStartsOn: 0,
|
|
532
|
+
firstWeekContainsDate: 1
|
|
533
|
+
}
|
|
534
|
+
};
|
|
535
|
+
function Qn(e) {
|
|
536
|
+
const t = A(e);
|
|
537
|
+
return ln(t, mn(t)) + 1;
|
|
538
|
+
}
|
|
539
|
+
function Xn(e) {
|
|
540
|
+
const t = A(e), n = +ce(t) - +un(t);
|
|
541
|
+
return Math.round(n / _e) + 1;
|
|
542
|
+
}
|
|
543
|
+
function Qe(e, t) {
|
|
544
|
+
var h, l, f, m;
|
|
545
|
+
const n = A(e), r = n.getFullYear(), o = de(), a = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((l = (h = t == null ? void 0 : t.locale) == null ? void 0 : h.options) == null ? void 0 : l.firstWeekContainsDate) ?? o.firstWeekContainsDate ?? ((m = (f = o.locale) == null ? void 0 : f.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, i = _(e, 0);
|
|
546
|
+
i.setFullYear(r + 1, 0, a), i.setHours(0, 0, 0, 0);
|
|
547
|
+
const c = oe(i, t), d = _(e, 0);
|
|
548
|
+
d.setFullYear(r, 0, a), d.setHours(0, 0, 0, 0);
|
|
549
|
+
const u = oe(d, t);
|
|
550
|
+
return n.getTime() >= c.getTime() ? r + 1 : n.getTime() >= u.getTime() ? r : r - 1;
|
|
551
|
+
}
|
|
552
|
+
function Kn(e, t) {
|
|
553
|
+
var c, d, u, h;
|
|
554
|
+
const n = de(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((d = (c = t == null ? void 0 : t.locale) == null ? void 0 : c.options) == null ? void 0 : d.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((h = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, o = Qe(e, t), a = _(e, 0);
|
|
555
|
+
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0), oe(a, t);
|
|
556
|
+
}
|
|
557
|
+
function Un(e, t) {
|
|
558
|
+
const n = A(e), r = +oe(n, t) - +Kn(n, t);
|
|
559
|
+
return Math.round(r / _e) + 1;
|
|
560
|
+
}
|
|
561
|
+
function k(e, t) {
|
|
562
|
+
const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
|
|
563
|
+
return n + r;
|
|
564
|
+
}
|
|
565
|
+
const Q = {
|
|
566
|
+
// Year
|
|
567
|
+
y(e, t) {
|
|
568
|
+
const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
569
|
+
return k(t === "yy" ? r % 100 : r, t.length);
|
|
570
|
+
},
|
|
571
|
+
// Month
|
|
572
|
+
M(e, t) {
|
|
573
|
+
const n = e.getMonth();
|
|
574
|
+
return t === "M" ? String(n + 1) : k(n + 1, 2);
|
|
575
|
+
},
|
|
576
|
+
// Day of the month
|
|
577
|
+
d(e, t) {
|
|
578
|
+
return k(e.getDate(), t.length);
|
|
579
|
+
},
|
|
580
|
+
// AM or PM
|
|
581
|
+
a(e, t) {
|
|
582
|
+
const n = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
583
|
+
switch (t) {
|
|
584
|
+
case "a":
|
|
585
|
+
case "aa":
|
|
586
|
+
return n.toUpperCase();
|
|
587
|
+
case "aaa":
|
|
588
|
+
return n;
|
|
589
|
+
case "aaaaa":
|
|
590
|
+
return n[0];
|
|
591
|
+
case "aaaa":
|
|
592
|
+
default:
|
|
593
|
+
return n === "am" ? "a.m." : "p.m.";
|
|
594
|
+
}
|
|
595
|
+
},
|
|
596
|
+
// Hour [1-12]
|
|
597
|
+
h(e, t) {
|
|
598
|
+
return k(e.getHours() % 12 || 12, t.length);
|
|
599
|
+
},
|
|
600
|
+
// Hour [0-23]
|
|
601
|
+
H(e, t) {
|
|
602
|
+
return k(e.getHours(), t.length);
|
|
603
|
+
},
|
|
604
|
+
// Minute
|
|
605
|
+
m(e, t) {
|
|
606
|
+
return k(e.getMinutes(), t.length);
|
|
607
|
+
},
|
|
608
|
+
// Second
|
|
609
|
+
s(e, t) {
|
|
610
|
+
return k(e.getSeconds(), t.length);
|
|
611
|
+
},
|
|
612
|
+
// Fraction of second
|
|
613
|
+
S(e, t) {
|
|
614
|
+
const n = t.length, r = e.getMilliseconds(), o = Math.trunc(
|
|
615
|
+
r * Math.pow(10, n - 3)
|
|
616
|
+
);
|
|
617
|
+
return k(o, t.length);
|
|
618
|
+
}
|
|
619
|
+
}, Z = {
|
|
620
|
+
am: "am",
|
|
621
|
+
pm: "pm",
|
|
622
|
+
midnight: "midnight",
|
|
623
|
+
noon: "noon",
|
|
624
|
+
morning: "morning",
|
|
625
|
+
afternoon: "afternoon",
|
|
626
|
+
evening: "evening",
|
|
627
|
+
night: "night"
|
|
628
|
+
}, Ee = {
|
|
629
|
+
// Era
|
|
630
|
+
G: function(e, t, n) {
|
|
631
|
+
const r = e.getFullYear() > 0 ? 1 : 0;
|
|
632
|
+
switch (t) {
|
|
633
|
+
case "G":
|
|
634
|
+
case "GG":
|
|
635
|
+
case "GGG":
|
|
636
|
+
return n.era(r, { width: "abbreviated" });
|
|
637
|
+
case "GGGGG":
|
|
638
|
+
return n.era(r, { width: "narrow" });
|
|
639
|
+
case "GGGG":
|
|
640
|
+
default:
|
|
641
|
+
return n.era(r, { width: "wide" });
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
// Year
|
|
645
|
+
y: function(e, t, n) {
|
|
646
|
+
if (t === "yo") {
|
|
647
|
+
const r = e.getFullYear(), o = r > 0 ? r : 1 - r;
|
|
648
|
+
return n.ordinalNumber(o, { unit: "year" });
|
|
649
|
+
}
|
|
650
|
+
return Q.y(e, t);
|
|
651
|
+
},
|
|
652
|
+
// Local week-numbering year
|
|
653
|
+
Y: function(e, t, n, r) {
|
|
654
|
+
const o = Qe(e, r), a = o > 0 ? o : 1 - o;
|
|
655
|
+
if (t === "YY") {
|
|
656
|
+
const i = a % 100;
|
|
657
|
+
return k(i, 2);
|
|
658
|
+
}
|
|
659
|
+
return t === "Yo" ? n.ordinalNumber(a, { unit: "year" }) : k(a, t.length);
|
|
660
|
+
},
|
|
661
|
+
// ISO week-numbering year
|
|
662
|
+
R: function(e, t) {
|
|
663
|
+
const n = Ge(e);
|
|
664
|
+
return k(n, t.length);
|
|
665
|
+
},
|
|
666
|
+
// Extended year. This is a single number designating the year of this calendar system.
|
|
667
|
+
// The main difference between `y` and `u` localizers are B.C. years:
|
|
668
|
+
// | Year | `y` | `u` |
|
|
669
|
+
// |------|-----|-----|
|
|
670
|
+
// | AC 1 | 1 | 1 |
|
|
671
|
+
// | BC 1 | 1 | 0 |
|
|
672
|
+
// | BC 2 | 2 | -1 |
|
|
673
|
+
// Also `yy` always returns the last two digits of a year,
|
|
674
|
+
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
675
|
+
u: function(e, t) {
|
|
676
|
+
const n = e.getFullYear();
|
|
677
|
+
return k(n, t.length);
|
|
678
|
+
},
|
|
679
|
+
// Quarter
|
|
680
|
+
Q: function(e, t, n) {
|
|
681
|
+
const r = Math.ceil((e.getMonth() + 1) / 3);
|
|
682
|
+
switch (t) {
|
|
683
|
+
case "Q":
|
|
684
|
+
return String(r);
|
|
685
|
+
case "QQ":
|
|
686
|
+
return k(r, 2);
|
|
687
|
+
case "Qo":
|
|
688
|
+
return n.ordinalNumber(r, { unit: "quarter" });
|
|
689
|
+
case "QQQ":
|
|
690
|
+
return n.quarter(r, {
|
|
691
|
+
width: "abbreviated",
|
|
692
|
+
context: "formatting"
|
|
693
|
+
});
|
|
694
|
+
case "QQQQQ":
|
|
695
|
+
return n.quarter(r, {
|
|
696
|
+
width: "narrow",
|
|
697
|
+
context: "formatting"
|
|
698
|
+
});
|
|
699
|
+
case "QQQQ":
|
|
700
|
+
default:
|
|
701
|
+
return n.quarter(r, {
|
|
702
|
+
width: "wide",
|
|
703
|
+
context: "formatting"
|
|
704
|
+
});
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
// Stand-alone quarter
|
|
708
|
+
q: function(e, t, n) {
|
|
709
|
+
const r = Math.ceil((e.getMonth() + 1) / 3);
|
|
710
|
+
switch (t) {
|
|
711
|
+
case "q":
|
|
712
|
+
return String(r);
|
|
713
|
+
case "qq":
|
|
714
|
+
return k(r, 2);
|
|
715
|
+
case "qo":
|
|
716
|
+
return n.ordinalNumber(r, { unit: "quarter" });
|
|
717
|
+
case "qqq":
|
|
718
|
+
return n.quarter(r, {
|
|
719
|
+
width: "abbreviated",
|
|
720
|
+
context: "standalone"
|
|
721
|
+
});
|
|
722
|
+
case "qqqqq":
|
|
723
|
+
return n.quarter(r, {
|
|
724
|
+
width: "narrow",
|
|
725
|
+
context: "standalone"
|
|
726
|
+
});
|
|
727
|
+
case "qqqq":
|
|
728
|
+
default:
|
|
729
|
+
return n.quarter(r, {
|
|
730
|
+
width: "wide",
|
|
731
|
+
context: "standalone"
|
|
732
|
+
});
|
|
733
|
+
}
|
|
734
|
+
},
|
|
735
|
+
// Month
|
|
736
|
+
M: function(e, t, n) {
|
|
737
|
+
const r = e.getMonth();
|
|
738
|
+
switch (t) {
|
|
739
|
+
case "M":
|
|
740
|
+
case "MM":
|
|
741
|
+
return Q.M(e, t);
|
|
742
|
+
case "Mo":
|
|
743
|
+
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
744
|
+
case "MMM":
|
|
745
|
+
return n.month(r, {
|
|
746
|
+
width: "abbreviated",
|
|
747
|
+
context: "formatting"
|
|
748
|
+
});
|
|
749
|
+
case "MMMMM":
|
|
750
|
+
return n.month(r, {
|
|
751
|
+
width: "narrow",
|
|
752
|
+
context: "formatting"
|
|
753
|
+
});
|
|
754
|
+
case "MMMM":
|
|
755
|
+
default:
|
|
756
|
+
return n.month(r, { width: "wide", context: "formatting" });
|
|
757
|
+
}
|
|
758
|
+
},
|
|
759
|
+
// Stand-alone month
|
|
760
|
+
L: function(e, t, n) {
|
|
761
|
+
const r = e.getMonth();
|
|
762
|
+
switch (t) {
|
|
763
|
+
case "L":
|
|
764
|
+
return String(r + 1);
|
|
765
|
+
case "LL":
|
|
766
|
+
return k(r + 1, 2);
|
|
767
|
+
case "Lo":
|
|
768
|
+
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
769
|
+
case "LLL":
|
|
770
|
+
return n.month(r, {
|
|
771
|
+
width: "abbreviated",
|
|
772
|
+
context: "standalone"
|
|
773
|
+
});
|
|
774
|
+
case "LLLLL":
|
|
775
|
+
return n.month(r, {
|
|
776
|
+
width: "narrow",
|
|
777
|
+
context: "standalone"
|
|
778
|
+
});
|
|
779
|
+
case "LLLL":
|
|
780
|
+
default:
|
|
781
|
+
return n.month(r, { width: "wide", context: "standalone" });
|
|
782
|
+
}
|
|
783
|
+
},
|
|
784
|
+
// Local week of year
|
|
785
|
+
w: function(e, t, n, r) {
|
|
786
|
+
const o = Un(e, r);
|
|
787
|
+
return t === "wo" ? n.ordinalNumber(o, { unit: "week" }) : k(o, t.length);
|
|
788
|
+
},
|
|
789
|
+
// ISO week of year
|
|
790
|
+
I: function(e, t, n) {
|
|
791
|
+
const r = Xn(e);
|
|
792
|
+
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : k(r, t.length);
|
|
793
|
+
},
|
|
794
|
+
// Day of the month
|
|
795
|
+
d: function(e, t, n) {
|
|
796
|
+
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : Q.d(e, t);
|
|
797
|
+
},
|
|
798
|
+
// Day of year
|
|
799
|
+
D: function(e, t, n) {
|
|
800
|
+
const r = Qn(e);
|
|
801
|
+
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : k(r, t.length);
|
|
802
|
+
},
|
|
803
|
+
// Day of week
|
|
804
|
+
E: function(e, t, n) {
|
|
805
|
+
const r = e.getDay();
|
|
806
|
+
switch (t) {
|
|
807
|
+
case "E":
|
|
808
|
+
case "EE":
|
|
809
|
+
case "EEE":
|
|
810
|
+
return n.day(r, {
|
|
811
|
+
width: "abbreviated",
|
|
812
|
+
context: "formatting"
|
|
813
|
+
});
|
|
814
|
+
case "EEEEE":
|
|
815
|
+
return n.day(r, {
|
|
816
|
+
width: "narrow",
|
|
817
|
+
context: "formatting"
|
|
818
|
+
});
|
|
819
|
+
case "EEEEEE":
|
|
820
|
+
return n.day(r, {
|
|
821
|
+
width: "short",
|
|
822
|
+
context: "formatting"
|
|
823
|
+
});
|
|
824
|
+
case "EEEE":
|
|
825
|
+
default:
|
|
826
|
+
return n.day(r, {
|
|
827
|
+
width: "wide",
|
|
828
|
+
context: "formatting"
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
},
|
|
832
|
+
// Local day of week
|
|
833
|
+
e: function(e, t, n, r) {
|
|
834
|
+
const o = e.getDay(), a = (o - r.weekStartsOn + 8) % 7 || 7;
|
|
835
|
+
switch (t) {
|
|
836
|
+
case "e":
|
|
837
|
+
return String(a);
|
|
838
|
+
case "ee":
|
|
839
|
+
return k(a, 2);
|
|
840
|
+
case "eo":
|
|
841
|
+
return n.ordinalNumber(a, { unit: "day" });
|
|
842
|
+
case "eee":
|
|
843
|
+
return n.day(o, {
|
|
844
|
+
width: "abbreviated",
|
|
845
|
+
context: "formatting"
|
|
846
|
+
});
|
|
847
|
+
case "eeeee":
|
|
848
|
+
return n.day(o, {
|
|
849
|
+
width: "narrow",
|
|
850
|
+
context: "formatting"
|
|
851
|
+
});
|
|
852
|
+
case "eeeeee":
|
|
853
|
+
return n.day(o, {
|
|
854
|
+
width: "short",
|
|
855
|
+
context: "formatting"
|
|
856
|
+
});
|
|
857
|
+
case "eeee":
|
|
858
|
+
default:
|
|
859
|
+
return n.day(o, {
|
|
860
|
+
width: "wide",
|
|
861
|
+
context: "formatting"
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
},
|
|
865
|
+
// Stand-alone local day of week
|
|
866
|
+
c: function(e, t, n, r) {
|
|
867
|
+
const o = e.getDay(), a = (o - r.weekStartsOn + 8) % 7 || 7;
|
|
868
|
+
switch (t) {
|
|
869
|
+
case "c":
|
|
870
|
+
return String(a);
|
|
871
|
+
case "cc":
|
|
872
|
+
return k(a, t.length);
|
|
873
|
+
case "co":
|
|
874
|
+
return n.ordinalNumber(a, { unit: "day" });
|
|
875
|
+
case "ccc":
|
|
876
|
+
return n.day(o, {
|
|
877
|
+
width: "abbreviated",
|
|
878
|
+
context: "standalone"
|
|
879
|
+
});
|
|
880
|
+
case "ccccc":
|
|
881
|
+
return n.day(o, {
|
|
882
|
+
width: "narrow",
|
|
883
|
+
context: "standalone"
|
|
884
|
+
});
|
|
885
|
+
case "cccccc":
|
|
886
|
+
return n.day(o, {
|
|
887
|
+
width: "short",
|
|
888
|
+
context: "standalone"
|
|
889
|
+
});
|
|
890
|
+
case "cccc":
|
|
891
|
+
default:
|
|
892
|
+
return n.day(o, {
|
|
893
|
+
width: "wide",
|
|
894
|
+
context: "standalone"
|
|
895
|
+
});
|
|
896
|
+
}
|
|
897
|
+
},
|
|
898
|
+
// ISO day of week
|
|
899
|
+
i: function(e, t, n) {
|
|
900
|
+
const r = e.getDay(), o = r === 0 ? 7 : r;
|
|
901
|
+
switch (t) {
|
|
902
|
+
case "i":
|
|
903
|
+
return String(o);
|
|
904
|
+
case "ii":
|
|
905
|
+
return k(o, t.length);
|
|
906
|
+
case "io":
|
|
907
|
+
return n.ordinalNumber(o, { unit: "day" });
|
|
908
|
+
case "iii":
|
|
909
|
+
return n.day(r, {
|
|
910
|
+
width: "abbreviated",
|
|
911
|
+
context: "formatting"
|
|
912
|
+
});
|
|
913
|
+
case "iiiii":
|
|
914
|
+
return n.day(r, {
|
|
915
|
+
width: "narrow",
|
|
916
|
+
context: "formatting"
|
|
917
|
+
});
|
|
918
|
+
case "iiiiii":
|
|
919
|
+
return n.day(r, {
|
|
920
|
+
width: "short",
|
|
921
|
+
context: "formatting"
|
|
922
|
+
});
|
|
923
|
+
case "iiii":
|
|
924
|
+
default:
|
|
925
|
+
return n.day(r, {
|
|
926
|
+
width: "wide",
|
|
927
|
+
context: "formatting"
|
|
928
|
+
});
|
|
929
|
+
}
|
|
930
|
+
},
|
|
931
|
+
// AM or PM
|
|
932
|
+
a: function(e, t, n) {
|
|
933
|
+
const o = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
934
|
+
switch (t) {
|
|
935
|
+
case "a":
|
|
936
|
+
case "aa":
|
|
937
|
+
return n.dayPeriod(o, {
|
|
938
|
+
width: "abbreviated",
|
|
939
|
+
context: "formatting"
|
|
940
|
+
});
|
|
941
|
+
case "aaa":
|
|
942
|
+
return n.dayPeriod(o, {
|
|
943
|
+
width: "abbreviated",
|
|
944
|
+
context: "formatting"
|
|
945
|
+
}).toLowerCase();
|
|
946
|
+
case "aaaaa":
|
|
947
|
+
return n.dayPeriod(o, {
|
|
948
|
+
width: "narrow",
|
|
949
|
+
context: "formatting"
|
|
950
|
+
});
|
|
951
|
+
case "aaaa":
|
|
952
|
+
default:
|
|
953
|
+
return n.dayPeriod(o, {
|
|
954
|
+
width: "wide",
|
|
955
|
+
context: "formatting"
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
},
|
|
959
|
+
// AM, PM, midnight, noon
|
|
960
|
+
b: function(e, t, n) {
|
|
961
|
+
const r = e.getHours();
|
|
962
|
+
let o;
|
|
963
|
+
switch (r === 12 ? o = Z.noon : r === 0 ? o = Z.midnight : o = r / 12 >= 1 ? "pm" : "am", t) {
|
|
964
|
+
case "b":
|
|
965
|
+
case "bb":
|
|
966
|
+
return n.dayPeriod(o, {
|
|
967
|
+
width: "abbreviated",
|
|
968
|
+
context: "formatting"
|
|
969
|
+
});
|
|
970
|
+
case "bbb":
|
|
971
|
+
return n.dayPeriod(o, {
|
|
972
|
+
width: "abbreviated",
|
|
973
|
+
context: "formatting"
|
|
974
|
+
}).toLowerCase();
|
|
975
|
+
case "bbbbb":
|
|
976
|
+
return n.dayPeriod(o, {
|
|
977
|
+
width: "narrow",
|
|
978
|
+
context: "formatting"
|
|
979
|
+
});
|
|
980
|
+
case "bbbb":
|
|
981
|
+
default:
|
|
982
|
+
return n.dayPeriod(o, {
|
|
983
|
+
width: "wide",
|
|
984
|
+
context: "formatting"
|
|
985
|
+
});
|
|
986
|
+
}
|
|
987
|
+
},
|
|
988
|
+
// in the morning, in the afternoon, in the evening, at night
|
|
989
|
+
B: function(e, t, n) {
|
|
990
|
+
const r = e.getHours();
|
|
991
|
+
let o;
|
|
992
|
+
switch (r >= 17 ? o = Z.evening : r >= 12 ? o = Z.afternoon : r >= 4 ? o = Z.morning : o = Z.night, t) {
|
|
993
|
+
case "B":
|
|
994
|
+
case "BB":
|
|
995
|
+
case "BBB":
|
|
996
|
+
return n.dayPeriod(o, {
|
|
997
|
+
width: "abbreviated",
|
|
998
|
+
context: "formatting"
|
|
999
|
+
});
|
|
1000
|
+
case "BBBBB":
|
|
1001
|
+
return n.dayPeriod(o, {
|
|
1002
|
+
width: "narrow",
|
|
1003
|
+
context: "formatting"
|
|
1004
|
+
});
|
|
1005
|
+
case "BBBB":
|
|
1006
|
+
default:
|
|
1007
|
+
return n.dayPeriod(o, {
|
|
1008
|
+
width: "wide",
|
|
1009
|
+
context: "formatting"
|
|
1010
|
+
});
|
|
1011
|
+
}
|
|
1012
|
+
},
|
|
1013
|
+
// Hour [1-12]
|
|
1014
|
+
h: function(e, t, n) {
|
|
1015
|
+
if (t === "ho") {
|
|
1016
|
+
let r = e.getHours() % 12;
|
|
1017
|
+
return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
|
|
1018
|
+
}
|
|
1019
|
+
return Q.h(e, t);
|
|
1020
|
+
},
|
|
1021
|
+
// Hour [0-23]
|
|
1022
|
+
H: function(e, t, n) {
|
|
1023
|
+
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : Q.H(e, t);
|
|
1024
|
+
},
|
|
1025
|
+
// Hour [0-11]
|
|
1026
|
+
K: function(e, t, n) {
|
|
1027
|
+
const r = e.getHours() % 12;
|
|
1028
|
+
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : k(r, t.length);
|
|
1029
|
+
},
|
|
1030
|
+
// Hour [1-24]
|
|
1031
|
+
k: function(e, t, n) {
|
|
1032
|
+
let r = e.getHours();
|
|
1033
|
+
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : k(r, t.length);
|
|
1034
|
+
},
|
|
1035
|
+
// Minute
|
|
1036
|
+
m: function(e, t, n) {
|
|
1037
|
+
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : Q.m(e, t);
|
|
1038
|
+
},
|
|
1039
|
+
// Second
|
|
1040
|
+
s: function(e, t, n) {
|
|
1041
|
+
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : Q.s(e, t);
|
|
1042
|
+
},
|
|
1043
|
+
// Fraction of second
|
|
1044
|
+
S: function(e, t) {
|
|
1045
|
+
return Q.S(e, t);
|
|
1046
|
+
},
|
|
1047
|
+
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1048
|
+
X: function(e, t, n) {
|
|
1049
|
+
const r = e.getTimezoneOffset();
|
|
1050
|
+
if (r === 0)
|
|
1051
|
+
return "Z";
|
|
1052
|
+
switch (t) {
|
|
1053
|
+
case "X":
|
|
1054
|
+
return Pe(r);
|
|
1055
|
+
case "XXXX":
|
|
1056
|
+
case "XX":
|
|
1057
|
+
return U(r);
|
|
1058
|
+
case "XXXXX":
|
|
1059
|
+
case "XXX":
|
|
1060
|
+
default:
|
|
1061
|
+
return U(r, ":");
|
|
1062
|
+
}
|
|
1063
|
+
},
|
|
1064
|
+
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
1065
|
+
x: function(e, t, n) {
|
|
1066
|
+
const r = e.getTimezoneOffset();
|
|
1067
|
+
switch (t) {
|
|
1068
|
+
case "x":
|
|
1069
|
+
return Pe(r);
|
|
1070
|
+
case "xxxx":
|
|
1071
|
+
case "xx":
|
|
1072
|
+
return U(r);
|
|
1073
|
+
case "xxxxx":
|
|
1074
|
+
case "xxx":
|
|
1075
|
+
default:
|
|
1076
|
+
return U(r, ":");
|
|
1077
|
+
}
|
|
1078
|
+
},
|
|
1079
|
+
// Timezone (GMT)
|
|
1080
|
+
O: function(e, t, n) {
|
|
1081
|
+
const r = e.getTimezoneOffset();
|
|
1082
|
+
switch (t) {
|
|
1083
|
+
case "O":
|
|
1084
|
+
case "OO":
|
|
1085
|
+
case "OOO":
|
|
1086
|
+
return "GMT" + Te(r, ":");
|
|
1087
|
+
case "OOOO":
|
|
1088
|
+
default:
|
|
1089
|
+
return "GMT" + U(r, ":");
|
|
1090
|
+
}
|
|
1091
|
+
},
|
|
1092
|
+
// Timezone (specific non-location)
|
|
1093
|
+
z: function(e, t, n) {
|
|
1094
|
+
const r = e.getTimezoneOffset();
|
|
1095
|
+
switch (t) {
|
|
1096
|
+
case "z":
|
|
1097
|
+
case "zz":
|
|
1098
|
+
case "zzz":
|
|
1099
|
+
return "GMT" + Te(r, ":");
|
|
1100
|
+
case "zzzz":
|
|
1101
|
+
default:
|
|
1102
|
+
return "GMT" + U(r, ":");
|
|
1103
|
+
}
|
|
1104
|
+
},
|
|
1105
|
+
// Seconds timestamp
|
|
1106
|
+
t: function(e, t, n) {
|
|
1107
|
+
const r = Math.trunc(e.getTime() / 1e3);
|
|
1108
|
+
return k(r, t.length);
|
|
1109
|
+
},
|
|
1110
|
+
// Milliseconds timestamp
|
|
1111
|
+
T: function(e, t, n) {
|
|
1112
|
+
const r = e.getTime();
|
|
1113
|
+
return k(r, t.length);
|
|
1114
|
+
}
|
|
1115
|
+
};
|
|
1116
|
+
function Te(e, t = "") {
|
|
1117
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = Math.trunc(r / 60), a = r % 60;
|
|
1118
|
+
return a === 0 ? n + String(o) : n + String(o) + t + k(a, 2);
|
|
1119
|
+
}
|
|
1120
|
+
function Pe(e, t) {
|
|
1121
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + k(Math.abs(e) / 60, 2) : U(e, t);
|
|
1122
|
+
}
|
|
1123
|
+
function U(e, t = "") {
|
|
1124
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = k(Math.trunc(r / 60), 2), a = k(r % 60, 2);
|
|
1125
|
+
return n + o + t + a;
|
|
1126
|
+
}
|
|
1127
|
+
const We = (e, t) => {
|
|
1128
|
+
switch (e) {
|
|
1129
|
+
case "P":
|
|
1130
|
+
return t.date({ width: "short" });
|
|
1131
|
+
case "PP":
|
|
1132
|
+
return t.date({ width: "medium" });
|
|
1133
|
+
case "PPP":
|
|
1134
|
+
return t.date({ width: "long" });
|
|
1135
|
+
case "PPPP":
|
|
1136
|
+
default:
|
|
1137
|
+
return t.date({ width: "full" });
|
|
1138
|
+
}
|
|
1139
|
+
}, Xe = (e, t) => {
|
|
1140
|
+
switch (e) {
|
|
1141
|
+
case "p":
|
|
1142
|
+
return t.time({ width: "short" });
|
|
1143
|
+
case "pp":
|
|
1144
|
+
return t.time({ width: "medium" });
|
|
1145
|
+
case "ppp":
|
|
1146
|
+
return t.time({ width: "long" });
|
|
1147
|
+
case "pppp":
|
|
1148
|
+
default:
|
|
1149
|
+
return t.time({ width: "full" });
|
|
1150
|
+
}
|
|
1151
|
+
}, Jn = (e, t) => {
|
|
1152
|
+
const n = e.match(/(P+)(p+)?/) || [], r = n[1], o = n[2];
|
|
1153
|
+
if (!o)
|
|
1154
|
+
return We(e, t);
|
|
1155
|
+
let a;
|
|
1156
|
+
switch (r) {
|
|
1157
|
+
case "P":
|
|
1158
|
+
a = t.dateTime({ width: "short" });
|
|
1159
|
+
break;
|
|
1160
|
+
case "PP":
|
|
1161
|
+
a = t.dateTime({ width: "medium" });
|
|
1162
|
+
break;
|
|
1163
|
+
case "PPP":
|
|
1164
|
+
a = t.dateTime({ width: "long" });
|
|
1165
|
+
break;
|
|
1166
|
+
case "PPPP":
|
|
1167
|
+
default:
|
|
1168
|
+
a = t.dateTime({ width: "full" });
|
|
1169
|
+
break;
|
|
1170
|
+
}
|
|
1171
|
+
return a.replace("{{date}}", We(r, t)).replace("{{time}}", Xe(o, t));
|
|
1172
|
+
}, zn = {
|
|
1173
|
+
p: Xe,
|
|
1174
|
+
P: Jn
|
|
1175
|
+
}, Zn = /^D+$/, er = /^Y+$/, tr = ["D", "DD", "YY", "YYYY"];
|
|
1176
|
+
function nr(e) {
|
|
1177
|
+
return Zn.test(e);
|
|
1178
|
+
}
|
|
1179
|
+
function rr(e) {
|
|
1180
|
+
return er.test(e);
|
|
1181
|
+
}
|
|
1182
|
+
function or(e, t, n) {
|
|
1183
|
+
const r = ar(e, t, n);
|
|
1184
|
+
if (console.warn(r), tr.includes(e))
|
|
1185
|
+
throw new RangeError(r);
|
|
1186
|
+
}
|
|
1187
|
+
function ar(e, t, n) {
|
|
1188
|
+
const r = e[0] === "Y" ? "years" : "days of the month";
|
|
1189
|
+
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`;
|
|
1190
|
+
}
|
|
1191
|
+
const sr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ir = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, cr = /^'([^]*?)'?$/, lr = /''/g, ur = /[a-zA-Z]/;
|
|
1192
|
+
function dr(e, t, n) {
|
|
1193
|
+
var h, l, f, m, w, y, b, j;
|
|
1194
|
+
const r = de(), o = (n == null ? void 0 : n.locale) ?? r.locale ?? Gn, a = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((l = (h = n == null ? void 0 : n.locale) == null ? void 0 : h.options) == null ? void 0 : l.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((m = (f = r.locale) == null ? void 0 : f.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, i = (n == null ? void 0 : n.weekStartsOn) ?? ((y = (w = n == null ? void 0 : n.locale) == null ? void 0 : w.options) == null ? void 0 : y.weekStartsOn) ?? r.weekStartsOn ?? ((j = (b = r.locale) == null ? void 0 : b.options) == null ? void 0 : j.weekStartsOn) ?? 0, c = A(e);
|
|
1195
|
+
if (!fn(c))
|
|
1196
|
+
throw new RangeError("Invalid time value");
|
|
1197
|
+
let d = t.match(ir).map((g) => {
|
|
1198
|
+
const p = g[0];
|
|
1199
|
+
if (p === "p" || p === "P") {
|
|
1200
|
+
const C = zn[p];
|
|
1201
|
+
return C(g, o.formatLong);
|
|
1202
|
+
}
|
|
1203
|
+
return g;
|
|
1204
|
+
}).join("").match(sr).map((g) => {
|
|
1205
|
+
if (g === "''")
|
|
1206
|
+
return { isToken: !1, value: "'" };
|
|
1207
|
+
const p = g[0];
|
|
1208
|
+
if (p === "'")
|
|
1209
|
+
return { isToken: !1, value: fr(g) };
|
|
1210
|
+
if (Ee[p])
|
|
1211
|
+
return { isToken: !0, value: g };
|
|
1212
|
+
if (p.match(ur))
|
|
1213
|
+
throw new RangeError(
|
|
1214
|
+
"Format string contains an unescaped latin alphabet character `" + p + "`"
|
|
1215
|
+
);
|
|
1216
|
+
return { isToken: !1, value: g };
|
|
1217
|
+
});
|
|
1218
|
+
o.localize.preprocessor && (d = o.localize.preprocessor(c, d));
|
|
1219
|
+
const u = {
|
|
1220
|
+
firstWeekContainsDate: a,
|
|
1221
|
+
weekStartsOn: i,
|
|
1222
|
+
locale: o
|
|
1223
|
+
};
|
|
1224
|
+
return d.map((g) => {
|
|
1225
|
+
if (!g.isToken)
|
|
1226
|
+
return g.value;
|
|
1227
|
+
const p = g.value;
|
|
1228
|
+
(!(n != null && n.useAdditionalWeekYearTokens) && rr(p) || !(n != null && n.useAdditionalDayOfYearTokens) && nr(p)) && or(p, t, String(e));
|
|
1229
|
+
const C = Ee[p[0]];
|
|
1230
|
+
return C(c, p, o.localize, u);
|
|
1231
|
+
}).join("");
|
|
1232
|
+
}
|
|
1233
|
+
function fr(e) {
|
|
1234
|
+
const t = e.match(cr);
|
|
1235
|
+
return t ? t[1].replace(lr, "'") : e;
|
|
1236
|
+
}
|
|
1237
|
+
const Yo = ({ month: e, onChangeMonth: t, locale: n }) => {
|
|
1238
|
+
const r = $((o) => {
|
|
1239
|
+
t(sn(e, o));
|
|
1240
|
+
}, [e, t]);
|
|
1241
|
+
return /* @__PURE__ */ s.jsxs("div", { className: "card d-flex flex-row align-items-center m-0 p-1 gap-2", children: [
|
|
1242
|
+
/* @__PURE__ */ s.jsx("button", { type: "button", className: "icon-button", onClick: () => r(-1), children: /* @__PURE__ */ s.jsx(qt, {}) }),
|
|
1243
|
+
/* @__PURE__ */ s.jsx("div", { children: dr(e, "LLLL yyyy", { locale: n }) }),
|
|
1244
|
+
/* @__PURE__ */ s.jsx("button", { type: "button", className: "icon-button", onClick: () => r(1), children: /* @__PURE__ */ s.jsx(Bt, {}) })
|
|
1245
|
+
] });
|
|
1246
|
+
}, Ie = ({ onAdd: e }) => /* @__PURE__ */ s.jsx("div", { className: N("luminus-empty-widget", Yt.widget), children: /* @__PURE__ */ s.jsx("button", { type: "button", className: "icon-button", onClick: () => e(0), children: /* @__PURE__ */ s.jsx(Vt, {}) }) }), mr = () => {
|
|
1247
|
+
const [e, t] = I({
|
|
1248
|
+
widgets: []
|
|
1249
|
+
});
|
|
1250
|
+
P(() => {
|
|
1251
|
+
const r = localStorage.getItem("dashboardConfig");
|
|
1252
|
+
r && t(JSON.parse(r));
|
|
1253
|
+
}, []);
|
|
1254
|
+
const n = $((r) => {
|
|
1255
|
+
t(r), localStorage.setItem("dashboardConfig", JSON.stringify(r));
|
|
1256
|
+
}, []);
|
|
1257
|
+
return { dashboardConfig: e, onChangeDashboardConfig: n };
|
|
1258
|
+
}, Lo = ({ availableWidgets: e, texts: t }) => {
|
|
1259
|
+
var h;
|
|
1260
|
+
const { dashboardConfig: n, onChangeDashboardConfig: r } = mr(), [o, a] = I(!1), i = $((l, f) => {
|
|
1261
|
+
var m, w;
|
|
1262
|
+
l === ((m = n.widgets) == null ? void 0 : m.length) ? r({
|
|
1263
|
+
...n,
|
|
1264
|
+
widgets: [...n.widgets, { widgetId: f, fullWidth: !1 }]
|
|
1265
|
+
}) : r({
|
|
1266
|
+
...n,
|
|
1267
|
+
widgets: ((w = n.widgets) == null ? void 0 : w.map((y, b) => b === l ? { widgetId: f, fullWidth: !1 } : y)) ?? []
|
|
1268
|
+
});
|
|
1269
|
+
}, [n, r]), c = $((l) => {
|
|
1270
|
+
var f, m;
|
|
1271
|
+
((f = n.widgets[l]) == null ? void 0 : f.widgetId) === -1 ? r({
|
|
1272
|
+
...n,
|
|
1273
|
+
widgets: ((m = n.widgets) == null ? void 0 : m.filter((w, y) => y !== l)) ?? []
|
|
1274
|
+
}) : i(l, -1);
|
|
1275
|
+
}, [n, r, i]), d = $((l) => {
|
|
1276
|
+
var f;
|
|
1277
|
+
r({
|
|
1278
|
+
...n,
|
|
1279
|
+
widgets: ((f = n.widgets) == null ? void 0 : f.map((m, w) => w === l ? { ...m, fullWidth: !m.fullWidth } : m)) ?? []
|
|
1280
|
+
});
|
|
1281
|
+
}, [n, r]), u = $((l, f, m) => l ? /* @__PURE__ */ s.jsxs("div", { className: N(V.widgetWrapper, {
|
|
1282
|
+
[V.widgetEdit]: o && l.id !== -1
|
|
1283
|
+
}, { [V.fullWidth]: m }), children: [
|
|
1284
|
+
o && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1285
|
+
/* @__PURE__ */ s.jsx("button", { type: "button", onClick: () => c(f), className: N("icon-button", "color-danger", V.removeIcon), children: /* @__PURE__ */ s.jsx(_t, {}) }),
|
|
1286
|
+
/* @__PURE__ */ s.jsx("button", { type: "button", onClick: () => d(f), className: N("icon-button", { "color-danger": m }, { "color-info": !m }, V.fullWidthIcon), children: /* @__PURE__ */ s.jsx(Gt, {}) })
|
|
1287
|
+
] }),
|
|
1288
|
+
l.id === -1 ? o && /* @__PURE__ */ s.jsx("div", { className: V.widgetWrapper, children: /* @__PURE__ */ s.jsx(Ie, { onAdd: (w) => i(f, w) }) }) : l.render,
|
|
1289
|
+
l.id > -1 && o && /* @__PURE__ */ s.jsx("div", { className: V.widgetEditOverlay })
|
|
1290
|
+
] }, f) : /* @__PURE__ */ s.jsx(s.Fragment, {}), [o, i, c, d]);
|
|
1291
|
+
return /* @__PURE__ */ s.jsxs("div", { className: V.dashboard, children: [
|
|
1292
|
+
/* @__PURE__ */ s.jsx("div", { className: "mb-3 d-flex align-items-center justify-content-end", children: o ? /* @__PURE__ */ s.jsx("button", { type: "button", onClick: () => a(!1), className: "btn btn-outline-danger", children: t.dashboardEditDone }) : /* @__PURE__ */ s.jsx("button", { type: "button", onClick: () => a(!0), className: "btn btn-outline-primary", children: t.dashboardEdit }) }),
|
|
1293
|
+
/* @__PURE__ */ s.jsxs("div", { className: V.widgetsGrid, children: [
|
|
1294
|
+
(h = n.widgets) == null ? void 0 : h.map((l, f) => u(e.find((m) => m.id === l.widgetId), f, l.fullWidth)),
|
|
1295
|
+
o && /* @__PURE__ */ s.jsx(Ie, { onAdd: (l) => {
|
|
1296
|
+
var f;
|
|
1297
|
+
return i((f = n.widgets) == null ? void 0 : f.length, l);
|
|
1298
|
+
} })
|
|
1299
|
+
] })
|
|
1300
|
+
] });
|
|
1301
|
+
};
|
|
1302
|
+
var hr = function(e, t, n, r, o, a, i, c) {
|
|
1303
|
+
if (process.env.NODE_ENV !== "production" && t === void 0)
|
|
1304
|
+
throw new Error("invariant requires an error message argument");
|
|
1305
|
+
if (!e) {
|
|
1306
|
+
var d;
|
|
1307
|
+
if (t === void 0)
|
|
1308
|
+
d = new Error(
|
|
1309
|
+
"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
|
|
1310
|
+
);
|
|
1311
|
+
else {
|
|
1312
|
+
var u = [n, r, o, a, i, c], h = 0;
|
|
1313
|
+
d = new Error(
|
|
1314
|
+
t.replace(/%s/g, function() {
|
|
1315
|
+
return u[h++];
|
|
1316
|
+
})
|
|
1317
|
+
), d.name = "Invariant Violation";
|
|
1318
|
+
}
|
|
1319
|
+
throw d.framesToPop = 1, d;
|
|
1320
|
+
}
|
|
1321
|
+
}, gr = hr;
|
|
1322
|
+
const Re = /* @__PURE__ */ Lt(gr);
|
|
1323
|
+
function pr(e, t, n, r = !1) {
|
|
1324
|
+
const o = J(n);
|
|
1325
|
+
P(() => {
|
|
1326
|
+
const a = typeof e == "function" ? e() : e;
|
|
1327
|
+
return a.addEventListener(t, o, r), () => a.removeEventListener(t, o, r);
|
|
1328
|
+
}, [e]);
|
|
1329
|
+
}
|
|
1330
|
+
const wr = ["as", "disabled"];
|
|
1331
|
+
function br(e, t) {
|
|
1332
|
+
if (e == null)
|
|
1333
|
+
return {};
|
|
1334
|
+
var n = {}, r = Object.keys(e), o, a;
|
|
1335
|
+
for (a = 0; a < r.length; a++)
|
|
1336
|
+
o = r[a], !(t.indexOf(o) >= 0) && (n[o] = e[o]);
|
|
1337
|
+
return n;
|
|
1338
|
+
}
|
|
1339
|
+
function yr(e) {
|
|
1340
|
+
return !e || e.trim() === "#";
|
|
1341
|
+
}
|
|
1342
|
+
function je({
|
|
1343
|
+
tagName: e,
|
|
1344
|
+
disabled: t,
|
|
1345
|
+
href: n,
|
|
1346
|
+
target: r,
|
|
1347
|
+
rel: o,
|
|
1348
|
+
role: a,
|
|
1349
|
+
onClick: i,
|
|
1350
|
+
tabIndex: c = 0,
|
|
1351
|
+
type: d
|
|
1352
|
+
}) {
|
|
1353
|
+
e || (n != null || r != null || o != null ? e = "a" : e = "button");
|
|
1354
|
+
const u = {
|
|
1355
|
+
tagName: e
|
|
1356
|
+
};
|
|
1357
|
+
if (e === "button")
|
|
1358
|
+
return [{
|
|
1359
|
+
type: d || "button",
|
|
1360
|
+
disabled: t
|
|
1361
|
+
}, u];
|
|
1362
|
+
const h = (f) => {
|
|
1363
|
+
if ((t || e === "a" && yr(n)) && f.preventDefault(), t) {
|
|
1364
|
+
f.stopPropagation();
|
|
1365
|
+
return;
|
|
1366
|
+
}
|
|
1367
|
+
i == null || i(f);
|
|
1368
|
+
}, l = (f) => {
|
|
1369
|
+
f.key === " " && (f.preventDefault(), h(f));
|
|
1370
|
+
};
|
|
1371
|
+
return e === "a" && (n || (n = "#"), t && (n = void 0)), [{
|
|
1372
|
+
role: a ?? "button",
|
|
1373
|
+
// explicitly undefined so that it overrides the props disabled in a spread
|
|
1374
|
+
// e.g. <Tag {...props} {...hookProps} />
|
|
1375
|
+
disabled: void 0,
|
|
1376
|
+
tabIndex: t ? void 0 : c,
|
|
1377
|
+
href: n,
|
|
1378
|
+
target: e === "a" ? r : void 0,
|
|
1379
|
+
"aria-disabled": t || void 0,
|
|
1380
|
+
rel: e === "a" ? o : void 0,
|
|
1381
|
+
onClick: h,
|
|
1382
|
+
onKeyDown: l
|
|
1383
|
+
}, u];
|
|
1384
|
+
}
|
|
1385
|
+
const Ke = /* @__PURE__ */ x.forwardRef((e, t) => {
|
|
1386
|
+
let {
|
|
1387
|
+
as: n,
|
|
1388
|
+
disabled: r
|
|
1389
|
+
} = e, o = br(e, wr);
|
|
1390
|
+
const [a, {
|
|
1391
|
+
tagName: i
|
|
1392
|
+
}] = je(Object.assign({
|
|
1393
|
+
tagName: n,
|
|
1394
|
+
disabled: r
|
|
1395
|
+
}, o));
|
|
1396
|
+
return /* @__PURE__ */ s.jsx(i, Object.assign({}, o, a, {
|
|
1397
|
+
ref: t
|
|
1398
|
+
}));
|
|
1399
|
+
});
|
|
1400
|
+
Ke.displayName = "Button";
|
|
1401
|
+
const vr = ["onKeyDown"];
|
|
1402
|
+
function xr(e, t) {
|
|
1403
|
+
if (e == null)
|
|
1404
|
+
return {};
|
|
1405
|
+
var n = {}, r = Object.keys(e), o, a;
|
|
1406
|
+
for (a = 0; a < r.length; a++)
|
|
1407
|
+
o = r[a], !(t.indexOf(o) >= 0) && (n[o] = e[o]);
|
|
1408
|
+
return n;
|
|
1409
|
+
}
|
|
1410
|
+
function jr(e) {
|
|
1411
|
+
return !e || e.trim() === "#";
|
|
1412
|
+
}
|
|
1413
|
+
const Ue = /* @__PURE__ */ x.forwardRef((e, t) => {
|
|
1414
|
+
let {
|
|
1415
|
+
onKeyDown: n
|
|
1416
|
+
} = e, r = xr(e, vr);
|
|
1417
|
+
const [o] = je(Object.assign({
|
|
1418
|
+
tagName: "a"
|
|
1419
|
+
}, r)), a = J((i) => {
|
|
1420
|
+
o.onKeyDown(i), n == null || n(i);
|
|
1421
|
+
});
|
|
1422
|
+
return jr(r.href) || r.role === "button" ? /* @__PURE__ */ s.jsx("a", Object.assign({
|
|
1423
|
+
ref: t
|
|
1424
|
+
}, r, o, {
|
|
1425
|
+
onKeyDown: a
|
|
1426
|
+
})) : /* @__PURE__ */ s.jsx("a", Object.assign({
|
|
1427
|
+
ref: t
|
|
1428
|
+
}, r, {
|
|
1429
|
+
onKeyDown: n
|
|
1430
|
+
}));
|
|
1431
|
+
});
|
|
1432
|
+
Ue.displayName = "Anchor";
|
|
1433
|
+
const kr = Ue, Je = /* @__PURE__ */ x.forwardRef(({
|
|
1434
|
+
as: e,
|
|
1435
|
+
bsPrefix: t,
|
|
1436
|
+
variant: n = "primary",
|
|
1437
|
+
size: r,
|
|
1438
|
+
active: o = !1,
|
|
1439
|
+
disabled: a = !1,
|
|
1440
|
+
className: i,
|
|
1441
|
+
...c
|
|
1442
|
+
}, d) => {
|
|
1443
|
+
const u = E(t, "btn"), [h, {
|
|
1444
|
+
tagName: l
|
|
1445
|
+
}] = je({
|
|
1446
|
+
tagName: e,
|
|
1447
|
+
disabled: a,
|
|
1448
|
+
...c
|
|
1449
|
+
}), f = l;
|
|
1450
|
+
return /* @__PURE__ */ s.jsx(f, {
|
|
1451
|
+
...h,
|
|
1452
|
+
...c,
|
|
1453
|
+
ref: d,
|
|
1454
|
+
disabled: a,
|
|
1455
|
+
className: N(i, u, o && "active", n && `${u}-${n}`, r && `${u}-${r}`, c.href && a && "disabled")
|
|
1456
|
+
});
|
|
1457
|
+
});
|
|
1458
|
+
Je.displayName = "Button";
|
|
1459
|
+
const Cr = Je;
|
|
1460
|
+
function Nr(e, t) {
|
|
1461
|
+
return x.Children.toArray(e).some((n) => /* @__PURE__ */ x.isValidElement(n) && n.type === t);
|
|
1462
|
+
}
|
|
1463
|
+
function Dr({
|
|
1464
|
+
as: e,
|
|
1465
|
+
bsPrefix: t,
|
|
1466
|
+
className: n,
|
|
1467
|
+
...r
|
|
1468
|
+
}) {
|
|
1469
|
+
t = E(t, "col");
|
|
1470
|
+
const o = Zt(), a = en(), i = [], c = [];
|
|
1471
|
+
return o.forEach((d) => {
|
|
1472
|
+
const u = r[d];
|
|
1473
|
+
delete r[d];
|
|
1474
|
+
let h, l, f;
|
|
1475
|
+
typeof u == "object" && u != null ? {
|
|
1476
|
+
span: h,
|
|
1477
|
+
offset: l,
|
|
1478
|
+
order: f
|
|
1479
|
+
} = u : h = u;
|
|
1480
|
+
const m = d !== a ? `-${d}` : "";
|
|
1481
|
+
h && i.push(h === !0 ? `${t}${m}` : `${t}${m}-${h}`), f != null && c.push(`order${m}-${f}`), l != null && c.push(`offset${m}-${l}`);
|
|
1482
|
+
}), [{
|
|
1483
|
+
...r,
|
|
1484
|
+
className: N(n, ...i, ...c)
|
|
1485
|
+
}, {
|
|
1486
|
+
as: e,
|
|
1487
|
+
bsPrefix: t,
|
|
1488
|
+
spans: i
|
|
1489
|
+
}];
|
|
1490
|
+
}
|
|
1491
|
+
const ze = /* @__PURE__ */ x.forwardRef(
|
|
1492
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
1493
|
+
(e, t) => {
|
|
1494
|
+
const [{
|
|
1495
|
+
className: n,
|
|
1496
|
+
...r
|
|
1497
|
+
}, {
|
|
1498
|
+
as: o = "div",
|
|
1499
|
+
bsPrefix: a,
|
|
1500
|
+
spans: i
|
|
1501
|
+
}] = Dr(e);
|
|
1502
|
+
return /* @__PURE__ */ s.jsx(o, {
|
|
1503
|
+
...r,
|
|
1504
|
+
ref: t,
|
|
1505
|
+
className: N(n, !i.length && a)
|
|
1506
|
+
});
|
|
1507
|
+
}
|
|
1508
|
+
);
|
|
1509
|
+
ze.displayName = "Col";
|
|
1510
|
+
const $r = ze;
|
|
1511
|
+
function Fr(e, t, n) {
|
|
1512
|
+
const r = R(e !== void 0), [o, a] = I(t), i = e !== void 0, c = r.current;
|
|
1513
|
+
return r.current = i, !i && c && o !== t && a(t), [i ? e : o, $((...d) => {
|
|
1514
|
+
const [u, ...h] = d;
|
|
1515
|
+
let l = n == null ? void 0 : n(u, ...h);
|
|
1516
|
+
return a(u), l;
|
|
1517
|
+
}, [n])];
|
|
1518
|
+
}
|
|
1519
|
+
function Mr() {
|
|
1520
|
+
const [, e] = qe((t) => !t, !1);
|
|
1521
|
+
return e;
|
|
1522
|
+
}
|
|
1523
|
+
const Sr = /* @__PURE__ */ x.createContext(null), fe = Sr, Or = ["children"];
|
|
1524
|
+
function Er(e, t) {
|
|
1525
|
+
if (e == null)
|
|
1526
|
+
return {};
|
|
1527
|
+
var n = {}, r = Object.keys(e), o, a;
|
|
1528
|
+
for (a = 0; a < r.length; a++)
|
|
1529
|
+
o = r[a], !(t.indexOf(o) >= 0) && (n[o] = e[o]);
|
|
1530
|
+
return n;
|
|
1531
|
+
}
|
|
1532
|
+
const Tr = () => {
|
|
1533
|
+
};
|
|
1534
|
+
function Ze(e = {}) {
|
|
1535
|
+
const t = S(fe), [n, r] = tn(), o = R(!1), {
|
|
1536
|
+
flip: a,
|
|
1537
|
+
offset: i,
|
|
1538
|
+
rootCloseEvent: c,
|
|
1539
|
+
fixed: d = !1,
|
|
1540
|
+
placement: u,
|
|
1541
|
+
popperConfig: h = {},
|
|
1542
|
+
enableEventListeners: l = !0,
|
|
1543
|
+
usePopper: f = !!t
|
|
1544
|
+
} = e, m = (t == null ? void 0 : t.show) == null ? !!e.show : t.show;
|
|
1545
|
+
m && !o.current && (o.current = !0);
|
|
1546
|
+
const w = (Y) => {
|
|
1547
|
+
t == null || t.toggle(!1, Y);
|
|
1548
|
+
}, {
|
|
1549
|
+
placement: y,
|
|
1550
|
+
setMenu: b,
|
|
1551
|
+
menuElement: j,
|
|
1552
|
+
toggleElement: g
|
|
1553
|
+
} = t || {}, p = Qt(g, j, Xt({
|
|
1554
|
+
placement: u || y || "bottom-start",
|
|
1555
|
+
enabled: f,
|
|
1556
|
+
enableEvents: l ?? m,
|
|
1557
|
+
offset: i,
|
|
1558
|
+
flip: a,
|
|
1559
|
+
fixed: d,
|
|
1560
|
+
arrowElement: n,
|
|
1561
|
+
popperConfig: h
|
|
1562
|
+
})), C = Object.assign({
|
|
1563
|
+
ref: b || Tr,
|
|
1564
|
+
"aria-labelledby": g == null ? void 0 : g.id
|
|
1565
|
+
}, p.attributes.popper, {
|
|
1566
|
+
style: p.styles.popper
|
|
1567
|
+
}), F = {
|
|
1568
|
+
show: m,
|
|
1569
|
+
placement: y,
|
|
1570
|
+
hasShown: o.current,
|
|
1571
|
+
toggle: t == null ? void 0 : t.toggle,
|
|
1572
|
+
popper: f ? p : null,
|
|
1573
|
+
arrowProps: f ? Object.assign({
|
|
1574
|
+
ref: r
|
|
1575
|
+
}, p.attributes.arrow, {
|
|
1576
|
+
style: p.styles.arrow
|
|
1577
|
+
}) : {}
|
|
1578
|
+
};
|
|
1579
|
+
return Kt(j, w, {
|
|
1580
|
+
clickTrigger: c,
|
|
1581
|
+
disabled: !m
|
|
1582
|
+
}), [C, F];
|
|
1583
|
+
}
|
|
1584
|
+
const Pr = {
|
|
1585
|
+
usePopper: !0
|
|
1586
|
+
};
|
|
1587
|
+
function ke(e) {
|
|
1588
|
+
let {
|
|
1589
|
+
children: t
|
|
1590
|
+
} = e, n = Er(e, Or);
|
|
1591
|
+
const [r, o] = Ze(n);
|
|
1592
|
+
return /* @__PURE__ */ s.jsx(s.Fragment, {
|
|
1593
|
+
children: t(r, o)
|
|
1594
|
+
});
|
|
1595
|
+
}
|
|
1596
|
+
ke.displayName = "DropdownMenu";
|
|
1597
|
+
ke.defaultProps = Pr;
|
|
1598
|
+
const le = {
|
|
1599
|
+
prefix: String(Math.round(Math.random() * 1e10)),
|
|
1600
|
+
current: 0
|
|
1601
|
+
}, et = /* @__PURE__ */ X.createContext(le), Wr = /* @__PURE__ */ X.createContext(!1);
|
|
1602
|
+
let Ir = !!(typeof window < "u" && window.document && window.document.createElement), pe = /* @__PURE__ */ new WeakMap();
|
|
1603
|
+
function Rr(e = !1) {
|
|
1604
|
+
let t = S(et), n = R(null);
|
|
1605
|
+
if (n.current === null && !e) {
|
|
1606
|
+
var r, o;
|
|
1607
|
+
let a = (o = X.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || o === void 0 || (r = o.ReactCurrentOwner) === null || r === void 0 ? void 0 : r.current;
|
|
1608
|
+
if (a) {
|
|
1609
|
+
let i = pe.get(a);
|
|
1610
|
+
i == null ? pe.set(a, {
|
|
1611
|
+
id: t.current,
|
|
1612
|
+
state: a.memoizedState
|
|
1613
|
+
}) : a.memoizedState !== i.state && (t.current = i.id, pe.delete(a));
|
|
1614
|
+
}
|
|
1615
|
+
n.current = ++t.current;
|
|
1616
|
+
}
|
|
1617
|
+
return n.current;
|
|
1618
|
+
}
|
|
1619
|
+
function Yr(e) {
|
|
1620
|
+
let t = S(et);
|
|
1621
|
+
t === le && !Ir && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
1622
|
+
let n = Rr(!!e), r = t === le && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${t.prefix}`;
|
|
1623
|
+
return e || `${r}-${n}`;
|
|
1624
|
+
}
|
|
1625
|
+
function Lr(e) {
|
|
1626
|
+
let t = X.useId(), [n] = I(Vr()), r = n || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${le.prefix}`;
|
|
1627
|
+
return e || `${r}-${t}`;
|
|
1628
|
+
}
|
|
1629
|
+
const Ar = typeof X.useId == "function" ? Lr : Yr;
|
|
1630
|
+
function Hr() {
|
|
1631
|
+
return !1;
|
|
1632
|
+
}
|
|
1633
|
+
function qr() {
|
|
1634
|
+
return !0;
|
|
1635
|
+
}
|
|
1636
|
+
function Br(e) {
|
|
1637
|
+
return () => {
|
|
1638
|
+
};
|
|
1639
|
+
}
|
|
1640
|
+
function Vr() {
|
|
1641
|
+
return typeof X.useSyncExternalStore == "function" ? X.useSyncExternalStore(Br, Hr, qr) : S(Wr);
|
|
1642
|
+
}
|
|
1643
|
+
const tt = (e) => {
|
|
1644
|
+
var t;
|
|
1645
|
+
return ((t = e.getAttribute("role")) == null ? void 0 : t.toLowerCase()) === "menu";
|
|
1646
|
+
}, Ye = () => {
|
|
1647
|
+
};
|
|
1648
|
+
function nt() {
|
|
1649
|
+
const e = Ar(), {
|
|
1650
|
+
show: t = !1,
|
|
1651
|
+
toggle: n = Ye,
|
|
1652
|
+
setToggle: r,
|
|
1653
|
+
menuElement: o
|
|
1654
|
+
} = S(fe) || {}, a = $((c) => {
|
|
1655
|
+
n(!t, c);
|
|
1656
|
+
}, [t, n]), i = {
|
|
1657
|
+
id: e,
|
|
1658
|
+
ref: r || Ye,
|
|
1659
|
+
onClick: a,
|
|
1660
|
+
"aria-expanded": !!t
|
|
1661
|
+
};
|
|
1662
|
+
return o && tt(o) && (i["aria-haspopup"] = !0), [i, {
|
|
1663
|
+
show: t,
|
|
1664
|
+
toggle: n
|
|
1665
|
+
}];
|
|
1666
|
+
}
|
|
1667
|
+
function rt({
|
|
1668
|
+
children: e
|
|
1669
|
+
}) {
|
|
1670
|
+
const [t, n] = nt();
|
|
1671
|
+
return /* @__PURE__ */ s.jsx(s.Fragment, {
|
|
1672
|
+
children: e(t, n)
|
|
1673
|
+
});
|
|
1674
|
+
}
|
|
1675
|
+
rt.displayName = "DropdownToggle";
|
|
1676
|
+
const _r = /* @__PURE__ */ x.createContext(null), Le = (e, t = null) => e != null ? String(e) : t || null, be = _r, ot = /* @__PURE__ */ x.createContext(null);
|
|
1677
|
+
ot.displayName = "NavContext";
|
|
1678
|
+
const Gr = ot, Qr = ["eventKey", "disabled", "onClick", "active", "as"];
|
|
1679
|
+
function Xr(e, t) {
|
|
1680
|
+
if (e == null)
|
|
1681
|
+
return {};
|
|
1682
|
+
var n = {}, r = Object.keys(e), o, a;
|
|
1683
|
+
for (a = 0; a < r.length; a++)
|
|
1684
|
+
o = r[a], !(t.indexOf(o) >= 0) && (n[o] = e[o]);
|
|
1685
|
+
return n;
|
|
1686
|
+
}
|
|
1687
|
+
function at({
|
|
1688
|
+
key: e,
|
|
1689
|
+
href: t,
|
|
1690
|
+
active: n,
|
|
1691
|
+
disabled: r,
|
|
1692
|
+
onClick: o
|
|
1693
|
+
}) {
|
|
1694
|
+
const a = S(be), i = S(Gr), {
|
|
1695
|
+
activeKey: c
|
|
1696
|
+
} = i || {}, d = Le(e, t), u = n == null && e != null ? Le(c) === d : n;
|
|
1697
|
+
return [{
|
|
1698
|
+
onClick: J((l) => {
|
|
1699
|
+
r || (o == null || o(l), a && !l.isPropagationStopped() && a(d, l));
|
|
1700
|
+
}),
|
|
1701
|
+
"aria-disabled": r || void 0,
|
|
1702
|
+
"aria-selected": u,
|
|
1703
|
+
[Be("dropdown-item")]: ""
|
|
1704
|
+
}, {
|
|
1705
|
+
isActive: u
|
|
1706
|
+
}];
|
|
1707
|
+
}
|
|
1708
|
+
const st = /* @__PURE__ */ x.forwardRef((e, t) => {
|
|
1709
|
+
let {
|
|
1710
|
+
eventKey: n,
|
|
1711
|
+
disabled: r,
|
|
1712
|
+
onClick: o,
|
|
1713
|
+
active: a,
|
|
1714
|
+
as: i = Ke
|
|
1715
|
+
} = e, c = Xr(e, Qr);
|
|
1716
|
+
const [d] = at({
|
|
1717
|
+
key: n,
|
|
1718
|
+
href: c.href,
|
|
1719
|
+
disabled: r,
|
|
1720
|
+
onClick: o,
|
|
1721
|
+
active: a
|
|
1722
|
+
});
|
|
1723
|
+
return /* @__PURE__ */ s.jsx(i, Object.assign({}, c, {
|
|
1724
|
+
ref: t
|
|
1725
|
+
}, d));
|
|
1726
|
+
});
|
|
1727
|
+
st.displayName = "DropdownItem";
|
|
1728
|
+
function Ae() {
|
|
1729
|
+
const e = Mr(), t = R(null), n = $((r) => {
|
|
1730
|
+
t.current = r, e();
|
|
1731
|
+
}, [e]);
|
|
1732
|
+
return [t, n];
|
|
1733
|
+
}
|
|
1734
|
+
function se({
|
|
1735
|
+
defaultShow: e,
|
|
1736
|
+
show: t,
|
|
1737
|
+
onSelect: n,
|
|
1738
|
+
onToggle: r,
|
|
1739
|
+
itemSelector: o = `* [${Be("dropdown-item")}]`,
|
|
1740
|
+
focusFirstItemOnShow: a,
|
|
1741
|
+
placement: i = "bottom-start",
|
|
1742
|
+
children: c
|
|
1743
|
+
}) {
|
|
1744
|
+
const d = nn(), [u, h] = Fr(t, e, r), [l, f] = Ae(), m = l.current, [w, y] = Ae(), b = w.current, j = At(u), g = R(null), p = R(!1), C = S(be), F = $((v, D, W = D == null ? void 0 : D.type) => {
|
|
1745
|
+
h(v, {
|
|
1746
|
+
originalEvent: D,
|
|
1747
|
+
source: W
|
|
1748
|
+
});
|
|
1749
|
+
}, [h]), Y = J((v, D) => {
|
|
1750
|
+
n == null || n(v, D), F(!1, D, "select"), D.isPropagationStopped() || C == null || C(v, D);
|
|
1751
|
+
}), T = ae(() => ({
|
|
1752
|
+
toggle: F,
|
|
1753
|
+
placement: i,
|
|
1754
|
+
show: u,
|
|
1755
|
+
menuElement: m,
|
|
1756
|
+
toggleElement: b,
|
|
1757
|
+
setMenu: f,
|
|
1758
|
+
setToggle: y
|
|
1759
|
+
}), [F, i, u, m, b, f, y]);
|
|
1760
|
+
m && j && !u && (p.current = m.contains(m.ownerDocument.activeElement));
|
|
1761
|
+
const O = J(() => {
|
|
1762
|
+
b && b.focus && b.focus();
|
|
1763
|
+
}), L = J(() => {
|
|
1764
|
+
const v = g.current;
|
|
1765
|
+
let D = a;
|
|
1766
|
+
if (D == null && (D = l.current && tt(l.current) ? "keyboard" : !1), D === !1 || D === "keyboard" && !/^key.+$/.test(v))
|
|
1767
|
+
return;
|
|
1768
|
+
const W = Me(l.current, o)[0];
|
|
1769
|
+
W && W.focus && W.focus();
|
|
1770
|
+
});
|
|
1771
|
+
P(() => {
|
|
1772
|
+
u ? L() : p.current && (p.current = !1, O());
|
|
1773
|
+
}, [u, p, O, L]), P(() => {
|
|
1774
|
+
g.current = null;
|
|
1775
|
+
});
|
|
1776
|
+
const M = (v, D) => {
|
|
1777
|
+
if (!l.current)
|
|
1778
|
+
return null;
|
|
1779
|
+
const W = Me(l.current, o);
|
|
1780
|
+
let B = W.indexOf(v) + D;
|
|
1781
|
+
return B = Math.max(0, Math.min(B, W.length)), W[B];
|
|
1782
|
+
};
|
|
1783
|
+
return pr($(() => d.document, [d]), "keydown", (v) => {
|
|
1784
|
+
var D, W;
|
|
1785
|
+
const {
|
|
1786
|
+
key: B
|
|
1787
|
+
} = v, K = v.target, $e = (D = l.current) == null ? void 0 : D.contains(K), Rt = (W = w.current) == null ? void 0 : W.contains(K);
|
|
1788
|
+
if (/input|textarea/i.test(K.tagName) && (B === " " || B !== "Escape" && $e || B === "Escape" && K.type === "search") || !$e && !Rt || B === "Tab" && (!l.current || !u))
|
|
1789
|
+
return;
|
|
1790
|
+
g.current = v.type;
|
|
1791
|
+
const me = {
|
|
1792
|
+
originalEvent: v,
|
|
1793
|
+
source: v.type
|
|
1794
|
+
};
|
|
1795
|
+
switch (B) {
|
|
1796
|
+
case "ArrowUp": {
|
|
1797
|
+
const H = M(K, -1);
|
|
1798
|
+
H && H.focus && H.focus(), v.preventDefault();
|
|
1799
|
+
return;
|
|
1800
|
+
}
|
|
1801
|
+
case "ArrowDown":
|
|
1802
|
+
if (v.preventDefault(), !u)
|
|
1803
|
+
h(!0, me);
|
|
1804
|
+
else {
|
|
1805
|
+
const H = M(K, 1);
|
|
1806
|
+
H && H.focus && H.focus();
|
|
1807
|
+
}
|
|
1808
|
+
return;
|
|
1809
|
+
case "Tab":
|
|
1810
|
+
rn(K.ownerDocument, "keyup", (H) => {
|
|
1811
|
+
var Fe;
|
|
1812
|
+
(H.key === "Tab" && !H.target || !((Fe = l.current) != null && Fe.contains(H.target))) && h(!1, me);
|
|
1813
|
+
}, {
|
|
1814
|
+
once: !0
|
|
1815
|
+
});
|
|
1816
|
+
break;
|
|
1817
|
+
case "Escape":
|
|
1818
|
+
B === "Escape" && (v.preventDefault(), v.stopPropagation()), h(!1, me);
|
|
1819
|
+
break;
|
|
1820
|
+
}
|
|
1821
|
+
}), /* @__PURE__ */ s.jsx(be.Provider, {
|
|
1822
|
+
value: Y,
|
|
1823
|
+
children: /* @__PURE__ */ s.jsx(fe.Provider, {
|
|
1824
|
+
value: T,
|
|
1825
|
+
children: c
|
|
1826
|
+
})
|
|
1827
|
+
});
|
|
1828
|
+
}
|
|
1829
|
+
se.displayName = "Dropdown";
|
|
1830
|
+
se.Menu = ke;
|
|
1831
|
+
se.Toggle = rt;
|
|
1832
|
+
se.Item = st;
|
|
1833
|
+
const it = /* @__PURE__ */ x.createContext({});
|
|
1834
|
+
it.displayName = "DropdownContext";
|
|
1835
|
+
const ct = it, lt = /* @__PURE__ */ x.forwardRef(({
|
|
1836
|
+
className: e,
|
|
1837
|
+
bsPrefix: t,
|
|
1838
|
+
as: n = "hr",
|
|
1839
|
+
role: r = "separator",
|
|
1840
|
+
...o
|
|
1841
|
+
}, a) => (t = E(t, "dropdown-divider"), /* @__PURE__ */ s.jsx(n, {
|
|
1842
|
+
ref: a,
|
|
1843
|
+
className: N(e, t),
|
|
1844
|
+
role: r,
|
|
1845
|
+
...o
|
|
1846
|
+
})));
|
|
1847
|
+
lt.displayName = "DropdownDivider";
|
|
1848
|
+
const Kr = lt, ut = /* @__PURE__ */ x.forwardRef(({
|
|
1849
|
+
className: e,
|
|
1850
|
+
bsPrefix: t,
|
|
1851
|
+
as: n = "div",
|
|
1852
|
+
role: r = "heading",
|
|
1853
|
+
...o
|
|
1854
|
+
}, a) => (t = E(t, "dropdown-header"), /* @__PURE__ */ s.jsx(n, {
|
|
1855
|
+
ref: a,
|
|
1856
|
+
className: N(e, t),
|
|
1857
|
+
role: r,
|
|
1858
|
+
...o
|
|
1859
|
+
})));
|
|
1860
|
+
ut.displayName = "DropdownHeader";
|
|
1861
|
+
const Ur = ut, dt = /* @__PURE__ */ x.forwardRef(({
|
|
1862
|
+
bsPrefix: e,
|
|
1863
|
+
className: t,
|
|
1864
|
+
eventKey: n,
|
|
1865
|
+
disabled: r = !1,
|
|
1866
|
+
onClick: o,
|
|
1867
|
+
active: a,
|
|
1868
|
+
as: i = kr,
|
|
1869
|
+
...c
|
|
1870
|
+
}, d) => {
|
|
1871
|
+
const u = E(e, "dropdown-item"), [h, l] = at({
|
|
1872
|
+
key: n,
|
|
1873
|
+
href: c.href,
|
|
1874
|
+
disabled: r,
|
|
1875
|
+
onClick: o,
|
|
1876
|
+
active: a
|
|
1877
|
+
});
|
|
1878
|
+
return /* @__PURE__ */ s.jsx(i, {
|
|
1879
|
+
...c,
|
|
1880
|
+
...h,
|
|
1881
|
+
ref: d,
|
|
1882
|
+
className: N(t, u, l.isActive && "active", r && "disabled")
|
|
1883
|
+
});
|
|
1884
|
+
});
|
|
1885
|
+
dt.displayName = "DropdownItem";
|
|
1886
|
+
const Jr = dt, ft = /* @__PURE__ */ x.forwardRef(({
|
|
1887
|
+
className: e,
|
|
1888
|
+
bsPrefix: t,
|
|
1889
|
+
as: n = "span",
|
|
1890
|
+
...r
|
|
1891
|
+
}, o) => (t = E(t, "dropdown-item-text"), /* @__PURE__ */ s.jsx(n, {
|
|
1892
|
+
ref: o,
|
|
1893
|
+
className: N(e, t),
|
|
1894
|
+
...r
|
|
1895
|
+
})));
|
|
1896
|
+
ft.displayName = "DropdownItemText";
|
|
1897
|
+
const zr = ft, mt = /* @__PURE__ */ x.createContext(null);
|
|
1898
|
+
mt.displayName = "InputGroupContext";
|
|
1899
|
+
const ht = mt, gt = /* @__PURE__ */ x.createContext(null);
|
|
1900
|
+
gt.displayName = "NavbarContext";
|
|
1901
|
+
const Zr = gt;
|
|
1902
|
+
function pt(e, t) {
|
|
1903
|
+
if (process.env.NODE_ENV === "production")
|
|
1904
|
+
return e;
|
|
1905
|
+
const n = $((r) => {
|
|
1906
|
+
r == null || !r.isReactComponent || (process.env.NODE_ENV !== "production" ? Re(!1, `${t} injected a ref to a provided \`as\` component that resolved to a component instance instead of a DOM element. Use \`React.forwardRef\` to provide the injected ref to the class component as a prop in order to pass it directly to a DOM element`) : Re(!1));
|
|
1907
|
+
}, [t]);
|
|
1908
|
+
return xe(n, e);
|
|
1909
|
+
}
|
|
1910
|
+
function wt(e, t, n) {
|
|
1911
|
+
const r = n ? "top-end" : "top-start", o = n ? "top-start" : "top-end", a = n ? "bottom-end" : "bottom-start", i = n ? "bottom-start" : "bottom-end", c = n ? "right-start" : "left-start", d = n ? "right-end" : "left-end", u = n ? "left-start" : "right-start", h = n ? "left-end" : "right-end";
|
|
1912
|
+
let l = e ? i : a;
|
|
1913
|
+
return t === "up" ? l = e ? o : r : t === "end" ? l = e ? h : u : t === "start" ? l = e ? d : c : t === "down-centered" ? l = "bottom" : t === "up-centered" && (l = "top"), l;
|
|
1914
|
+
}
|
|
1915
|
+
const bt = /* @__PURE__ */ x.forwardRef(({
|
|
1916
|
+
bsPrefix: e,
|
|
1917
|
+
className: t,
|
|
1918
|
+
align: n,
|
|
1919
|
+
rootCloseEvent: r,
|
|
1920
|
+
flip: o = !0,
|
|
1921
|
+
show: a,
|
|
1922
|
+
renderOnMount: i,
|
|
1923
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
1924
|
+
as: c = "div",
|
|
1925
|
+
popperConfig: d,
|
|
1926
|
+
variant: u,
|
|
1927
|
+
...h
|
|
1928
|
+
}, l) => {
|
|
1929
|
+
let f = !1;
|
|
1930
|
+
const m = S(Zr), w = E(e, "dropdown-menu"), {
|
|
1931
|
+
align: y,
|
|
1932
|
+
drop: b,
|
|
1933
|
+
isRTL: j
|
|
1934
|
+
} = S(ct);
|
|
1935
|
+
n = n || y;
|
|
1936
|
+
const g = S(ht), p = [];
|
|
1937
|
+
if (n)
|
|
1938
|
+
if (typeof n == "object") {
|
|
1939
|
+
const v = Object.keys(n);
|
|
1940
|
+
if (process.env.NODE_ENV !== "production" && ve(v.length === 1, "There should only be 1 breakpoint when passing an object to `align`"), v.length) {
|
|
1941
|
+
const D = v[0], W = n[D];
|
|
1942
|
+
f = W === "start", p.push(`${w}-${D}-${W}`);
|
|
1943
|
+
}
|
|
1944
|
+
} else
|
|
1945
|
+
n === "end" && (f = !0);
|
|
1946
|
+
const C = wt(f, b, j), [F, {
|
|
1947
|
+
hasShown: Y,
|
|
1948
|
+
popper: T,
|
|
1949
|
+
show: O,
|
|
1950
|
+
toggle: L
|
|
1951
|
+
}] = Ze({
|
|
1952
|
+
flip: o,
|
|
1953
|
+
rootCloseEvent: r,
|
|
1954
|
+
show: a,
|
|
1955
|
+
usePopper: !m && p.length === 0,
|
|
1956
|
+
offset: [0, 2],
|
|
1957
|
+
popperConfig: d,
|
|
1958
|
+
placement: C
|
|
1959
|
+
});
|
|
1960
|
+
if (F.ref = xe(pt(l, "DropdownMenu"), F.ref), on(() => {
|
|
1961
|
+
O && (T == null || T.update());
|
|
1962
|
+
}, [O]), !Y && !i && !g)
|
|
1963
|
+
return null;
|
|
1964
|
+
typeof c != "string" && (F.show = O, F.close = () => L == null ? void 0 : L(!1), F.align = n);
|
|
1965
|
+
let M = h.style;
|
|
1966
|
+
return T != null && T.placement && (M = {
|
|
1967
|
+
...h.style,
|
|
1968
|
+
...F.style
|
|
1969
|
+
}, h["x-placement"] = T.placement), /* @__PURE__ */ s.jsx(c, {
|
|
1970
|
+
...h,
|
|
1971
|
+
...F,
|
|
1972
|
+
style: M,
|
|
1973
|
+
...(p.length || m) && {
|
|
1974
|
+
"data-bs-popper": "static"
|
|
1975
|
+
},
|
|
1976
|
+
className: N(t, w, O && "show", f && `${w}-end`, u && `${w}-${u}`, ...p)
|
|
1977
|
+
});
|
|
1978
|
+
});
|
|
1979
|
+
bt.displayName = "DropdownMenu";
|
|
1980
|
+
const eo = bt, yt = /* @__PURE__ */ x.forwardRef(({
|
|
1981
|
+
bsPrefix: e,
|
|
1982
|
+
split: t,
|
|
1983
|
+
className: n,
|
|
1984
|
+
childBsPrefix: r,
|
|
1985
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
1986
|
+
as: o = Cr,
|
|
1987
|
+
...a
|
|
1988
|
+
}, i) => {
|
|
1989
|
+
const c = E(e, "dropdown-toggle"), d = S(fe);
|
|
1990
|
+
r !== void 0 && (a.bsPrefix = r);
|
|
1991
|
+
const [u] = nt();
|
|
1992
|
+
return u.ref = xe(u.ref, pt(i, "DropdownToggle")), /* @__PURE__ */ s.jsx(o, {
|
|
1993
|
+
className: N(n, c, t && `${c}-split`, (d == null ? void 0 : d.show) && "show"),
|
|
1994
|
+
...u,
|
|
1995
|
+
...a
|
|
1996
|
+
});
|
|
1997
|
+
});
|
|
1998
|
+
yt.displayName = "DropdownToggle";
|
|
1999
|
+
const to = yt, vt = /* @__PURE__ */ x.forwardRef((e, t) => {
|
|
2000
|
+
const {
|
|
2001
|
+
bsPrefix: n,
|
|
2002
|
+
drop: r = "down",
|
|
2003
|
+
show: o,
|
|
2004
|
+
className: a,
|
|
2005
|
+
align: i = "start",
|
|
2006
|
+
onSelect: c,
|
|
2007
|
+
onToggle: d,
|
|
2008
|
+
focusFirstItemOnShow: u,
|
|
2009
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
2010
|
+
as: h = "div",
|
|
2011
|
+
navbar: l,
|
|
2012
|
+
autoClose: f = !0,
|
|
2013
|
+
...m
|
|
2014
|
+
} = Ut(e, {
|
|
2015
|
+
show: "onToggle"
|
|
2016
|
+
}), w = S(ht), y = E(n, "dropdown"), b = an(), j = (T) => f === !1 ? T === "click" : f === "inside" ? T !== "rootClose" : f === "outside" ? T !== "select" : !0, g = J((T, O) => {
|
|
2017
|
+
var L, M;
|
|
2018
|
+
!((L = O.originalEvent) == null || (M = L.target) == null) && M.classList.contains("dropdown-toggle") && O.source === "mousedown" || (O.originalEvent.currentTarget === document && (O.source !== "keydown" || O.originalEvent.key === "Escape") && (O.source = "rootClose"), j(O.source) && (d == null || d(T, O)));
|
|
2019
|
+
}), C = wt(i === "end", r, b), F = ae(() => ({
|
|
2020
|
+
align: i,
|
|
2021
|
+
drop: r,
|
|
2022
|
+
isRTL: b
|
|
2023
|
+
}), [i, r, b]), Y = {
|
|
2024
|
+
down: y,
|
|
2025
|
+
"down-centered": `${y}-center`,
|
|
2026
|
+
up: "dropup",
|
|
2027
|
+
"up-centered": "dropup-center dropup",
|
|
2028
|
+
end: "dropend",
|
|
2029
|
+
start: "dropstart"
|
|
2030
|
+
};
|
|
2031
|
+
return /* @__PURE__ */ s.jsx(ct.Provider, {
|
|
2032
|
+
value: F,
|
|
2033
|
+
children: /* @__PURE__ */ s.jsx(se, {
|
|
2034
|
+
placement: C,
|
|
2035
|
+
show: o,
|
|
2036
|
+
onSelect: c,
|
|
2037
|
+
onToggle: g,
|
|
2038
|
+
focusFirstItemOnShow: u,
|
|
2039
|
+
itemSelector: `.${y}-item:not(.disabled):not(:disabled)`,
|
|
2040
|
+
children: w ? m.children : /* @__PURE__ */ s.jsx(h, {
|
|
2041
|
+
...m,
|
|
2042
|
+
ref: t,
|
|
2043
|
+
className: N(a, o && "show", Y[r])
|
|
2044
|
+
})
|
|
2045
|
+
})
|
|
2046
|
+
});
|
|
2047
|
+
});
|
|
2048
|
+
vt.displayName = "Dropdown";
|
|
2049
|
+
const we = Object.assign(vt, {
|
|
2050
|
+
Toggle: to,
|
|
2051
|
+
Menu: eo,
|
|
2052
|
+
Item: Jr,
|
|
2053
|
+
ItemText: zr,
|
|
2054
|
+
Divider: Kr,
|
|
2055
|
+
Header: Ur
|
|
2056
|
+
}), no = {
|
|
2057
|
+
/**
|
|
2058
|
+
* Specify whether the feedback is for valid or invalid fields
|
|
2059
|
+
*
|
|
2060
|
+
* @type {('valid'|'invalid')}
|
|
2061
|
+
*/
|
|
2062
|
+
type: ee.string,
|
|
2063
|
+
/** Display feedback as a tooltip. */
|
|
2064
|
+
tooltip: ee.bool,
|
|
2065
|
+
as: ee.elementType
|
|
2066
|
+
}, Ce = /* @__PURE__ */ x.forwardRef(
|
|
2067
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
2068
|
+
({
|
|
2069
|
+
as: e = "div",
|
|
2070
|
+
className: t,
|
|
2071
|
+
type: n = "valid",
|
|
2072
|
+
tooltip: r = !1,
|
|
2073
|
+
...o
|
|
2074
|
+
}, a) => /* @__PURE__ */ s.jsx(e, {
|
|
2075
|
+
...o,
|
|
2076
|
+
ref: a,
|
|
2077
|
+
className: N(t, `${n}-${r ? "tooltip" : "feedback"}`)
|
|
2078
|
+
})
|
|
2079
|
+
);
|
|
2080
|
+
Ce.displayName = "Feedback";
|
|
2081
|
+
Ce.propTypes = no;
|
|
2082
|
+
const xt = Ce, ro = /* @__PURE__ */ x.createContext({}), G = ro, jt = /* @__PURE__ */ x.forwardRef(({
|
|
2083
|
+
id: e,
|
|
2084
|
+
bsPrefix: t,
|
|
2085
|
+
className: n,
|
|
2086
|
+
type: r = "checkbox",
|
|
2087
|
+
isValid: o = !1,
|
|
2088
|
+
isInvalid: a = !1,
|
|
2089
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
2090
|
+
as: i = "input",
|
|
2091
|
+
...c
|
|
2092
|
+
}, d) => {
|
|
2093
|
+
const {
|
|
2094
|
+
controlId: u
|
|
2095
|
+
} = S(G);
|
|
2096
|
+
return t = E(t, "form-check-input"), /* @__PURE__ */ s.jsx(i, {
|
|
2097
|
+
...c,
|
|
2098
|
+
ref: d,
|
|
2099
|
+
type: r,
|
|
2100
|
+
id: e || u,
|
|
2101
|
+
className: N(n, t, o && "is-valid", a && "is-invalid")
|
|
2102
|
+
});
|
|
2103
|
+
});
|
|
2104
|
+
jt.displayName = "FormCheckInput";
|
|
2105
|
+
const kt = jt, Ct = /* @__PURE__ */ x.forwardRef(({
|
|
2106
|
+
bsPrefix: e,
|
|
2107
|
+
className: t,
|
|
2108
|
+
htmlFor: n,
|
|
2109
|
+
...r
|
|
2110
|
+
}, o) => {
|
|
2111
|
+
const {
|
|
2112
|
+
controlId: a
|
|
2113
|
+
} = S(G);
|
|
2114
|
+
return e = E(e, "form-check-label"), /* @__PURE__ */ s.jsx("label", {
|
|
2115
|
+
...r,
|
|
2116
|
+
ref: o,
|
|
2117
|
+
htmlFor: n || a,
|
|
2118
|
+
className: N(t, e)
|
|
2119
|
+
});
|
|
2120
|
+
});
|
|
2121
|
+
Ct.displayName = "FormCheckLabel";
|
|
2122
|
+
const ye = Ct, Nt = /* @__PURE__ */ x.forwardRef(({
|
|
2123
|
+
id: e,
|
|
2124
|
+
bsPrefix: t,
|
|
2125
|
+
bsSwitchPrefix: n,
|
|
2126
|
+
inline: r = !1,
|
|
2127
|
+
reverse: o = !1,
|
|
2128
|
+
disabled: a = !1,
|
|
2129
|
+
isValid: i = !1,
|
|
2130
|
+
isInvalid: c = !1,
|
|
2131
|
+
feedbackTooltip: d = !1,
|
|
2132
|
+
feedback: u,
|
|
2133
|
+
feedbackType: h,
|
|
2134
|
+
className: l,
|
|
2135
|
+
style: f,
|
|
2136
|
+
title: m = "",
|
|
2137
|
+
type: w = "checkbox",
|
|
2138
|
+
label: y,
|
|
2139
|
+
children: b,
|
|
2140
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
2141
|
+
as: j = "input",
|
|
2142
|
+
...g
|
|
2143
|
+
}, p) => {
|
|
2144
|
+
t = E(t, "form-check"), n = E(n, "form-switch");
|
|
2145
|
+
const {
|
|
2146
|
+
controlId: C
|
|
2147
|
+
} = S(G), F = ae(() => ({
|
|
2148
|
+
controlId: e || C
|
|
2149
|
+
}), [C, e]), Y = !b && y != null && y !== !1 || Nr(b, ye), T = /* @__PURE__ */ s.jsx(kt, {
|
|
2150
|
+
...g,
|
|
2151
|
+
type: w === "switch" ? "checkbox" : w,
|
|
2152
|
+
ref: p,
|
|
2153
|
+
isValid: i,
|
|
2154
|
+
isInvalid: c,
|
|
2155
|
+
disabled: a,
|
|
2156
|
+
as: j
|
|
2157
|
+
});
|
|
2158
|
+
return /* @__PURE__ */ s.jsx(G.Provider, {
|
|
2159
|
+
value: F,
|
|
2160
|
+
children: /* @__PURE__ */ s.jsx("div", {
|
|
2161
|
+
style: f,
|
|
2162
|
+
className: N(l, Y && t, r && `${t}-inline`, o && `${t}-reverse`, w === "switch" && n),
|
|
2163
|
+
children: b || /* @__PURE__ */ s.jsxs(s.Fragment, {
|
|
2164
|
+
children: [T, Y && /* @__PURE__ */ s.jsx(ye, {
|
|
2165
|
+
title: m,
|
|
2166
|
+
children: y
|
|
2167
|
+
}), u && /* @__PURE__ */ s.jsx(xt, {
|
|
2168
|
+
type: h,
|
|
2169
|
+
tooltip: d,
|
|
2170
|
+
children: u
|
|
2171
|
+
})]
|
|
2172
|
+
})
|
|
2173
|
+
})
|
|
2174
|
+
});
|
|
2175
|
+
});
|
|
2176
|
+
Nt.displayName = "FormCheck";
|
|
2177
|
+
const ue = Object.assign(Nt, {
|
|
2178
|
+
Input: kt,
|
|
2179
|
+
Label: ye
|
|
2180
|
+
}), Dt = /* @__PURE__ */ x.forwardRef(({
|
|
2181
|
+
bsPrefix: e,
|
|
2182
|
+
type: t,
|
|
2183
|
+
size: n,
|
|
2184
|
+
htmlSize: r,
|
|
2185
|
+
id: o,
|
|
2186
|
+
className: a,
|
|
2187
|
+
isValid: i = !1,
|
|
2188
|
+
isInvalid: c = !1,
|
|
2189
|
+
plaintext: d,
|
|
2190
|
+
readOnly: u,
|
|
2191
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
2192
|
+
as: h = "input",
|
|
2193
|
+
...l
|
|
2194
|
+
}, f) => {
|
|
2195
|
+
const {
|
|
2196
|
+
controlId: m
|
|
2197
|
+
} = S(G);
|
|
2198
|
+
return e = E(e, "form-control"), process.env.NODE_ENV !== "production" && ve(m == null || !o, "`controlId` is ignored on `<FormControl>` when `id` is specified."), /* @__PURE__ */ s.jsx(h, {
|
|
2199
|
+
...l,
|
|
2200
|
+
type: t,
|
|
2201
|
+
size: r,
|
|
2202
|
+
ref: f,
|
|
2203
|
+
readOnly: u,
|
|
2204
|
+
id: o || m,
|
|
2205
|
+
className: N(a, d ? `${e}-plaintext` : e, n && `${e}-${n}`, t === "color" && `${e}-color`, i && "is-valid", c && "is-invalid")
|
|
2206
|
+
});
|
|
2207
|
+
});
|
|
2208
|
+
Dt.displayName = "FormControl";
|
|
2209
|
+
const oo = Object.assign(Dt, {
|
|
2210
|
+
Feedback: xt
|
|
2211
|
+
}), $t = /* @__PURE__ */ x.forwardRef(({
|
|
2212
|
+
className: e,
|
|
2213
|
+
bsPrefix: t,
|
|
2214
|
+
as: n = "div",
|
|
2215
|
+
...r
|
|
2216
|
+
}, o) => (t = E(t, "form-floating"), /* @__PURE__ */ s.jsx(n, {
|
|
2217
|
+
ref: o,
|
|
2218
|
+
className: N(e, t),
|
|
2219
|
+
...r
|
|
2220
|
+
})));
|
|
2221
|
+
$t.displayName = "FormFloating";
|
|
2222
|
+
const ao = $t, Ft = /* @__PURE__ */ x.forwardRef(({
|
|
2223
|
+
controlId: e,
|
|
2224
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
2225
|
+
as: t = "div",
|
|
2226
|
+
...n
|
|
2227
|
+
}, r) => {
|
|
2228
|
+
const o = ae(() => ({
|
|
2229
|
+
controlId: e
|
|
2230
|
+
}), [e]);
|
|
2231
|
+
return /* @__PURE__ */ s.jsx(G.Provider, {
|
|
2232
|
+
value: o,
|
|
2233
|
+
children: /* @__PURE__ */ s.jsx(t, {
|
|
2234
|
+
...n,
|
|
2235
|
+
ref: r
|
|
2236
|
+
})
|
|
2237
|
+
});
|
|
2238
|
+
});
|
|
2239
|
+
Ft.displayName = "FormGroup";
|
|
2240
|
+
const Mt = Ft, St = /* @__PURE__ */ x.forwardRef(({
|
|
2241
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
2242
|
+
as: e = "label",
|
|
2243
|
+
bsPrefix: t,
|
|
2244
|
+
column: n = !1,
|
|
2245
|
+
visuallyHidden: r = !1,
|
|
2246
|
+
className: o,
|
|
2247
|
+
htmlFor: a,
|
|
2248
|
+
...i
|
|
2249
|
+
}, c) => {
|
|
2250
|
+
const {
|
|
2251
|
+
controlId: d
|
|
2252
|
+
} = S(G);
|
|
2253
|
+
t = E(t, "form-label");
|
|
2254
|
+
let u = "col-form-label";
|
|
2255
|
+
typeof n == "string" && (u = `${u} ${u}-${n}`);
|
|
2256
|
+
const h = N(o, t, r && "visually-hidden", n && u);
|
|
2257
|
+
return process.env.NODE_ENV !== "production" && ve(d == null || !a, "`controlId` is ignored on `<FormLabel>` when `htmlFor` is specified."), a = a || d, n ? /* @__PURE__ */ s.jsx($r, {
|
|
2258
|
+
ref: c,
|
|
2259
|
+
as: "label",
|
|
2260
|
+
className: h,
|
|
2261
|
+
htmlFor: a,
|
|
2262
|
+
...i
|
|
2263
|
+
}) : (
|
|
2264
|
+
// eslint-disable-next-line jsx-a11y/label-has-for, jsx-a11y/label-has-associated-control
|
|
2265
|
+
/* @__PURE__ */ s.jsx(e, {
|
|
2266
|
+
ref: c,
|
|
2267
|
+
className: h,
|
|
2268
|
+
htmlFor: a,
|
|
2269
|
+
...i
|
|
2270
|
+
})
|
|
2271
|
+
);
|
|
2272
|
+
});
|
|
2273
|
+
St.displayName = "FormLabel";
|
|
2274
|
+
const so = St, Ot = /* @__PURE__ */ x.forwardRef(({
|
|
2275
|
+
bsPrefix: e,
|
|
2276
|
+
className: t,
|
|
2277
|
+
id: n,
|
|
2278
|
+
...r
|
|
2279
|
+
}, o) => {
|
|
2280
|
+
const {
|
|
2281
|
+
controlId: a
|
|
2282
|
+
} = S(G);
|
|
2283
|
+
return e = E(e, "form-range"), /* @__PURE__ */ s.jsx("input", {
|
|
2284
|
+
...r,
|
|
2285
|
+
type: "range",
|
|
2286
|
+
ref: o,
|
|
2287
|
+
className: N(t, e),
|
|
2288
|
+
id: n || a
|
|
2289
|
+
});
|
|
2290
|
+
});
|
|
2291
|
+
Ot.displayName = "FormRange";
|
|
2292
|
+
const io = Ot, Et = /* @__PURE__ */ x.forwardRef(({
|
|
2293
|
+
bsPrefix: e,
|
|
2294
|
+
size: t,
|
|
2295
|
+
htmlSize: n,
|
|
2296
|
+
className: r,
|
|
2297
|
+
isValid: o = !1,
|
|
2298
|
+
isInvalid: a = !1,
|
|
2299
|
+
id: i,
|
|
2300
|
+
...c
|
|
2301
|
+
}, d) => {
|
|
2302
|
+
const {
|
|
2303
|
+
controlId: u
|
|
2304
|
+
} = S(G);
|
|
2305
|
+
return e = E(e, "form-select"), /* @__PURE__ */ s.jsx("select", {
|
|
2306
|
+
...c,
|
|
2307
|
+
size: n,
|
|
2308
|
+
ref: d,
|
|
2309
|
+
className: N(r, e, t && `${e}-${t}`, o && "is-valid", a && "is-invalid"),
|
|
2310
|
+
id: i || u
|
|
2311
|
+
});
|
|
2312
|
+
});
|
|
2313
|
+
Et.displayName = "FormSelect";
|
|
2314
|
+
const co = Et, Tt = /* @__PURE__ */ x.forwardRef(
|
|
2315
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
2316
|
+
({
|
|
2317
|
+
bsPrefix: e,
|
|
2318
|
+
className: t,
|
|
2319
|
+
as: n = "small",
|
|
2320
|
+
muted: r,
|
|
2321
|
+
...o
|
|
2322
|
+
}, a) => (e = E(e, "form-text"), /* @__PURE__ */ s.jsx(n, {
|
|
2323
|
+
...o,
|
|
2324
|
+
ref: a,
|
|
2325
|
+
className: N(t, e, r && "text-muted")
|
|
2326
|
+
}))
|
|
2327
|
+
);
|
|
2328
|
+
Tt.displayName = "FormText";
|
|
2329
|
+
const lo = Tt, Pt = /* @__PURE__ */ x.forwardRef((e, t) => /* @__PURE__ */ s.jsx(ue, {
|
|
2330
|
+
...e,
|
|
2331
|
+
ref: t,
|
|
2332
|
+
type: "switch"
|
|
2333
|
+
}));
|
|
2334
|
+
Pt.displayName = "Switch";
|
|
2335
|
+
const uo = Object.assign(Pt, {
|
|
2336
|
+
Input: ue.Input,
|
|
2337
|
+
Label: ue.Label
|
|
2338
|
+
}), Wt = /* @__PURE__ */ x.forwardRef(({
|
|
2339
|
+
bsPrefix: e,
|
|
2340
|
+
className: t,
|
|
2341
|
+
children: n,
|
|
2342
|
+
controlId: r,
|
|
2343
|
+
label: o,
|
|
2344
|
+
...a
|
|
2345
|
+
}, i) => (e = E(e, "form-floating"), /* @__PURE__ */ s.jsxs(Mt, {
|
|
2346
|
+
ref: i,
|
|
2347
|
+
className: N(t, e),
|
|
2348
|
+
controlId: r,
|
|
2349
|
+
...a,
|
|
2350
|
+
children: [n, /* @__PURE__ */ s.jsx("label", {
|
|
2351
|
+
htmlFor: r,
|
|
2352
|
+
children: o
|
|
2353
|
+
})]
|
|
2354
|
+
})));
|
|
2355
|
+
Wt.displayName = "FloatingLabel";
|
|
2356
|
+
const te = Wt, fo = {
|
|
2357
|
+
/**
|
|
2358
|
+
* The Form `ref` will be forwarded to the underlying element,
|
|
2359
|
+
* which means, unless it's rendered `as` a composite component,
|
|
2360
|
+
* it will be a DOM node, when resolved.
|
|
2361
|
+
*
|
|
2362
|
+
* @type {ReactRef}
|
|
2363
|
+
* @alias ref
|
|
2364
|
+
*/
|
|
2365
|
+
_ref: ee.any,
|
|
2366
|
+
/**
|
|
2367
|
+
* Mark a form as having been validated. Setting it to `true` will
|
|
2368
|
+
* toggle any validation styles on the forms elements.
|
|
2369
|
+
*/
|
|
2370
|
+
validated: ee.bool,
|
|
2371
|
+
as: ee.elementType
|
|
2372
|
+
}, Ne = /* @__PURE__ */ x.forwardRef(({
|
|
2373
|
+
className: e,
|
|
2374
|
+
validated: t,
|
|
2375
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
2376
|
+
as: n = "form",
|
|
2377
|
+
...r
|
|
2378
|
+
}, o) => /* @__PURE__ */ s.jsx(n, {
|
|
2379
|
+
...r,
|
|
2380
|
+
ref: o,
|
|
2381
|
+
className: N(e, t && "was-validated")
|
|
2382
|
+
}));
|
|
2383
|
+
Ne.displayName = "Form";
|
|
2384
|
+
Ne.propTypes = fo;
|
|
2385
|
+
const q = Object.assign(Ne, {
|
|
2386
|
+
Group: Mt,
|
|
2387
|
+
Control: oo,
|
|
2388
|
+
Floating: ao,
|
|
2389
|
+
Check: ue,
|
|
2390
|
+
Switch: uo,
|
|
2391
|
+
Label: so,
|
|
2392
|
+
Text: lo,
|
|
2393
|
+
Range: io,
|
|
2394
|
+
Select: co,
|
|
2395
|
+
FloatingLabel: te
|
|
2396
|
+
}), Ao = ({ heading: e, content: t, placement: n, children: r, trigger: o }) => /* @__PURE__ */ s.jsx(Ve, { placement: n, overlay: /* @__PURE__ */ s.jsxs(he, { className: "luminus-tooltip", children: [
|
|
2397
|
+
/* @__PURE__ */ s.jsx(he.Header, { as: "h3", children: e }),
|
|
2398
|
+
/* @__PURE__ */ s.jsx(he.Body, { children: t })
|
|
2399
|
+
] }), trigger: o ?? "hover", rootClose: !0, children: r }), mo = "_avatar-icon_1axl6_1", ho = {
|
|
2400
|
+
"avatar-icon": "_avatar-icon_1axl6_1",
|
|
2401
|
+
avatarIcon: mo
|
|
2402
|
+
}, go = ({ name: e, fontSize: t, size: n }) => {
|
|
2403
|
+
const r = (o) => {
|
|
2404
|
+
let a = 0, i;
|
|
2405
|
+
for (i = 0; i < o.length; i += 1)
|
|
2406
|
+
a = o.charCodeAt(i) + ((a << 5) - a);
|
|
2407
|
+
let c = "#";
|
|
2408
|
+
for (i = 0; i < 3; i += 1) {
|
|
2409
|
+
const d = a >> i * 8 & 255;
|
|
2410
|
+
c += `00${d.toString(16)}`.slice(-2);
|
|
2411
|
+
}
|
|
2412
|
+
return c;
|
|
2413
|
+
};
|
|
2414
|
+
return /* @__PURE__ */ s.jsx(Ve, { placement: "bottom", overlay: /* @__PURE__ */ s.jsx(Jt, { children: e }), children: /* @__PURE__ */ s.jsx("div", { className: ho.avatarIcon, style: {
|
|
2415
|
+
backgroundColor: r(e),
|
|
2416
|
+
fontSize: t ?? void 0,
|
|
2417
|
+
height: n ?? void 0,
|
|
2418
|
+
width: n ?? void 0
|
|
2419
|
+
}, children: /* @__PURE__ */ s.jsx("div", { children: `${e.split(" ")[0][0]}${e.split(" ")[1][0]}` }) }) });
|
|
2420
|
+
}, po = X.forwardRef(({ userName: e, onClick: t, children: n }, r) => /* @__PURE__ */ s.jsxs("button", { type: "button", ref: r, onClick: (o) => {
|
|
2421
|
+
o.preventDefault(), t(o);
|
|
2422
|
+
}, "aria-label": "User avatar toggle", className: "m-0 p-0", style: {
|
|
2423
|
+
backgroundColor: "transparent",
|
|
2424
|
+
border: "none",
|
|
2425
|
+
cursor: "pointer"
|
|
2426
|
+
}, children: [
|
|
2427
|
+
/* @__PURE__ */ s.jsx(go, { name: e }),
|
|
2428
|
+
n
|
|
2429
|
+
] })), Ho = ({ userName: e, children: t }) => /* @__PURE__ */ s.jsxs(we, { children: [
|
|
2430
|
+
/* @__PURE__ */ s.jsx(we.Toggle, { as: po, userName: e }),
|
|
2431
|
+
/* @__PURE__ */ s.jsx(we.Menu, { children: t })
|
|
2432
|
+
] });
|
|
2433
|
+
function wo(e, t, n) {
|
|
2434
|
+
var r = this, o = R(null), a = R(0), i = R(null), c = R([]), d = R(), u = R(), h = R(e), l = R(!0);
|
|
2435
|
+
h.current = e;
|
|
2436
|
+
var f = typeof window < "u", m = !t && t !== 0 && f;
|
|
2437
|
+
if (typeof e != "function")
|
|
2438
|
+
throw new TypeError("Expected a function");
|
|
2439
|
+
t = +t || 0;
|
|
2440
|
+
var w = !!(n = n || {}).leading, y = !("trailing" in n) || !!n.trailing, b = "maxWait" in n, j = "debounceOnServer" in n && !!n.debounceOnServer, g = b ? Math.max(+n.maxWait || 0, t) : null;
|
|
2441
|
+
P(function() {
|
|
2442
|
+
return l.current = !0, function() {
|
|
2443
|
+
l.current = !1;
|
|
2444
|
+
};
|
|
2445
|
+
}, []);
|
|
2446
|
+
var p = ae(function() {
|
|
2447
|
+
var C = function(M) {
|
|
2448
|
+
var v = c.current, D = d.current;
|
|
2449
|
+
return c.current = d.current = null, a.current = M, u.current = h.current.apply(D, v);
|
|
2450
|
+
}, F = function(M, v) {
|
|
2451
|
+
m && cancelAnimationFrame(i.current), i.current = m ? requestAnimationFrame(M) : setTimeout(M, v);
|
|
2452
|
+
}, Y = function(M) {
|
|
2453
|
+
if (!l.current)
|
|
2454
|
+
return !1;
|
|
2455
|
+
var v = M - o.current;
|
|
2456
|
+
return !o.current || v >= t || v < 0 || b && M - a.current >= g;
|
|
2457
|
+
}, T = function(M) {
|
|
2458
|
+
return i.current = null, y && c.current ? C(M) : (c.current = d.current = null, u.current);
|
|
2459
|
+
}, O = function M() {
|
|
2460
|
+
var v = Date.now();
|
|
2461
|
+
if (Y(v))
|
|
2462
|
+
return T(v);
|
|
2463
|
+
if (l.current) {
|
|
2464
|
+
var D = t - (v - o.current), W = b ? Math.min(D, g - (v - a.current)) : D;
|
|
2465
|
+
F(M, W);
|
|
2466
|
+
}
|
|
2467
|
+
}, L = function() {
|
|
2468
|
+
if (f || j) {
|
|
2469
|
+
var M = Date.now(), v = Y(M);
|
|
2470
|
+
if (c.current = [].slice.call(arguments), d.current = r, o.current = M, v) {
|
|
2471
|
+
if (!i.current && l.current)
|
|
2472
|
+
return a.current = o.current, F(O, t), w ? C(o.current) : u.current;
|
|
2473
|
+
if (b)
|
|
2474
|
+
return F(O, t), C(o.current);
|
|
2475
|
+
}
|
|
2476
|
+
return i.current || F(O, t), u.current;
|
|
2477
|
+
}
|
|
2478
|
+
};
|
|
2479
|
+
return L.cancel = function() {
|
|
2480
|
+
i.current && (m ? cancelAnimationFrame(i.current) : clearTimeout(i.current)), a.current = 0, c.current = o.current = d.current = i.current = null;
|
|
2481
|
+
}, L.isPending = function() {
|
|
2482
|
+
return !!i.current;
|
|
2483
|
+
}, L.flush = function() {
|
|
2484
|
+
return i.current ? T(Date.now()) : u.current;
|
|
2485
|
+
}, L;
|
|
2486
|
+
}, [w, b, t, g, y, m, f, j]);
|
|
2487
|
+
return p;
|
|
2488
|
+
}
|
|
2489
|
+
function bo(e, t) {
|
|
2490
|
+
return e === t;
|
|
2491
|
+
}
|
|
2492
|
+
function yo(e, t) {
|
|
2493
|
+
return t;
|
|
2494
|
+
}
|
|
2495
|
+
function vo(e, t, n) {
|
|
2496
|
+
var r = n && n.equalityFn || bo, o = qe(yo, e), a = o[0], i = o[1], c = wo($(function(u) {
|
|
2497
|
+
return i(u);
|
|
2498
|
+
}, [i]), t, n), d = R(e);
|
|
2499
|
+
return r(d.current, e) || (c(e), d.current = e), [a, c];
|
|
2500
|
+
}
|
|
2501
|
+
const qo = ({ label: e, value: t, onChange: n, disabled: r, className: o, type: a }) => /* @__PURE__ */ s.jsx(q.Check, { id: `check-${e}`, type: a ?? "checkbox", label: e ?? "", checked: t, onChange: (i) => {
|
|
2502
|
+
var c;
|
|
2503
|
+
n && n(((c = i.target) == null ? void 0 : c.checked) ?? !1);
|
|
2504
|
+
}, className: o ?? "", disabled: r ?? !1 }), De = ({ withoutLabel: e, label: t, children: n }) => e ? /* @__PURE__ */ s.jsx(s.Fragment, { children: n }) : /* @__PURE__ */ s.jsx(te, { label: t, children: n }), xo = ({ type: e, value: t, onChange: n, label: r, withoutLabel: o, placeholder: a, size: i, disabled: c, showClearIcon: d, clearValue: u, className: h }) => {
|
|
2505
|
+
const l = e === "number", f = $(() => {
|
|
2506
|
+
if (!n)
|
|
2507
|
+
return;
|
|
2508
|
+
const m = u ?? null;
|
|
2509
|
+
n(l ? m ? Number(m) : null : (m == null ? void 0 : m.toString()) ?? "");
|
|
2510
|
+
}, [u, l, n]);
|
|
2511
|
+
return /* @__PURE__ */ s.jsxs(De, { withoutLabel: o ?? !1, label: r ?? "", children: [
|
|
2512
|
+
/* @__PURE__ */ s.jsx(q.Control, { type: e, placeholder: a ?? r, size: i, value: t ?? "", onChange: (m) => {
|
|
2513
|
+
var y;
|
|
2514
|
+
if (!n)
|
|
2515
|
+
return;
|
|
2516
|
+
const w = (y = m.target) == null ? void 0 : y.value;
|
|
2517
|
+
l && n(w ? parseInt(w, 10) : null), n(w || null);
|
|
2518
|
+
}, className: h ?? "", disabled: c ?? !1 }),
|
|
2519
|
+
d && t && n && !c && /* @__PURE__ */ s.jsx("div", { className: `luminus-input-remove-icon ${e !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ s.jsx("button", { type: "button", className: "icon-button", onClick: f, children: /* @__PURE__ */ s.jsx(z, {}) }) })
|
|
2520
|
+
] });
|
|
2521
|
+
}, Bo = ({ value: e, options: t, onChange: n, label: r, withoutLabel: o, isNumber: a, size: i, disabled: c, showClearIcon: d, clearValue: u, className: h }) => {
|
|
2522
|
+
const l = $(() => {
|
|
2523
|
+
if (!n)
|
|
2524
|
+
return;
|
|
2525
|
+
const f = u ?? null;
|
|
2526
|
+
n(a ? f ? Number(f) : null : (f == null ? void 0 : f.toString()) ?? "");
|
|
2527
|
+
}, [u, a, n]);
|
|
2528
|
+
return /* @__PURE__ */ s.jsxs(De, { withoutLabel: o ?? !1, label: r ?? "", children: [
|
|
2529
|
+
/* @__PURE__ */ s.jsxs(q.Select, { size: i, value: e ?? "", onChange: (f) => {
|
|
2530
|
+
var w;
|
|
2531
|
+
if (!n)
|
|
2532
|
+
return;
|
|
2533
|
+
const m = (w = f.target) == null ? void 0 : w.value;
|
|
2534
|
+
a && n(m ? parseInt(m, 10) : null), n(m || null);
|
|
2535
|
+
}, className: h ?? "", disabled: c ?? !1, children: [
|
|
2536
|
+
/* @__PURE__ */ s.jsx("option", { value: "" }),
|
|
2537
|
+
t == null ? void 0 : t.sort((f, m) => (f.name ?? "").localeCompare(m.name ?? "")).map((f) => /* @__PURE__ */ s.jsx("option", { value: f.id ?? "", children: f.name }, f.id))
|
|
2538
|
+
] }),
|
|
2539
|
+
d && e && n && !c && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ s.jsx("button", { type: "button", className: "icon-button", onClick: l, children: /* @__PURE__ */ s.jsx(z, {}) }) })
|
|
2540
|
+
] });
|
|
2541
|
+
}, Vo = ({ defaultSelection: e, onSelect: t, label: n, withoutLabel: r, size: o, disabled: a }) => {
|
|
2542
|
+
const [i, c] = I(e), [d, u] = I(!1), h = $((l) => {
|
|
2543
|
+
c(l ? { id: l.id, name: l.fullName } : null);
|
|
2544
|
+
}, []);
|
|
2545
|
+
return P(() => {
|
|
2546
|
+
c(e);
|
|
2547
|
+
}, [e]), P(() => {
|
|
2548
|
+
t && t(i);
|
|
2549
|
+
}, [i, t]), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2550
|
+
/* @__PURE__ */ s.jsxs(De, { withoutLabel: r ?? !1, label: n ?? "", children: [
|
|
2551
|
+
/* @__PURE__ */ s.jsxs(q.Select, { size: o, value: (i == null ? void 0 : i.id) ?? "", onChange: (l) => c({ id: Number(l.target.value), name: "" }), onMouseDown: (l) => {
|
|
2552
|
+
l.currentTarget.focus(), l.preventDefault();
|
|
2553
|
+
}, onClick: () => {
|
|
2554
|
+
a || u(!0);
|
|
2555
|
+
}, disabled: a, style: { minWidth: "200px" }, children: [
|
|
2556
|
+
/* @__PURE__ */ s.jsx("option", { value: "" }),
|
|
2557
|
+
e && /* @__PURE__ */ s.jsx("option", { value: e.id, children: e.name }),
|
|
2558
|
+
i && /* @__PURE__ */ s.jsx("option", { value: i.id, children: i.name })
|
|
2559
|
+
] }),
|
|
2560
|
+
i && !a && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ s.jsx("button", { type: "button", className: "icon-button", onClick: () => h(null), children: /* @__PURE__ */ s.jsx(z, {}) }) })
|
|
2561
|
+
] }),
|
|
2562
|
+
d && /* @__PURE__ */ s.jsx(It, { show: d, onCancel: () => u(!1), onEmployeeSelected: (l) => {
|
|
2563
|
+
u(!1), h(l);
|
|
2564
|
+
} })
|
|
2565
|
+
] });
|
|
2566
|
+
}, jo = ({ employee: e }) => /* @__PURE__ */ s.jsxs("div", { className: "card p-3 shadow-sm", children: [
|
|
2567
|
+
/* @__PURE__ */ s.jsxs("div", { className: "d-flex justify-content-between align-items-center gap-3 text-truncate", children: [
|
|
2568
|
+
/* @__PURE__ */ s.jsx("div", { children: e.fullName }),
|
|
2569
|
+
/* @__PURE__ */ s.jsx("div", { children: e.department })
|
|
2570
|
+
] }),
|
|
2571
|
+
(e.orgUnitName || e.profession) && /* @__PURE__ */ s.jsxs("div", { className: "d-flex justify-content-between align-items-center gap-3 text-truncate mt-1", children: [
|
|
2572
|
+
/* @__PURE__ */ s.jsx("div", { children: e.orgUnitName }),
|
|
2573
|
+
/* @__PURE__ */ s.jsx("div", { children: e.profession })
|
|
2574
|
+
] })
|
|
2575
|
+
] }), ko = ({ onEmployeeSelected: e }) => {
|
|
2576
|
+
const { axiosInstance: t, employeePickerModalTexts: n } = S(He), [r, o] = I(!1), [a, i] = I(""), [c, d] = vo(a, 500), [u, h] = I(null), l = !c, f = $(() => {
|
|
2577
|
+
if (l) {
|
|
2578
|
+
h(null);
|
|
2579
|
+
return;
|
|
2580
|
+
}
|
|
2581
|
+
o(!0), t.get(`/employees/lookup?q=${c}`).then(({ data: m }) => {
|
|
2582
|
+
h(m), o(!1);
|
|
2583
|
+
}).catch(() => {
|
|
2584
|
+
h(null), o(!1);
|
|
2585
|
+
});
|
|
2586
|
+
}, [t, c, l]);
|
|
2587
|
+
return P(() => {
|
|
2588
|
+
f();
|
|
2589
|
+
}, [f]), /* @__PURE__ */ s.jsxs("div", { className: "d-flex flex-column h-100 w-100 overflow-hidden", children: [
|
|
2590
|
+
r && /* @__PURE__ */ s.jsx(Ht, {}),
|
|
2591
|
+
/* @__PURE__ */ s.jsx("div", { className: "p-3", children: /* @__PURE__ */ s.jsx(q, { onSubmit: (m) => {
|
|
2592
|
+
m.preventDefault(), m.stopPropagation(), d.flush();
|
|
2593
|
+
}, children: /* @__PURE__ */ s.jsx(xo, { withoutLabel: !0, type: "text", placeholder: n.searchPlaceholder, size: "sm", value: a, onChange: (m) => i((m == null ? void 0 : m.toString()) ?? ""), className: "w-100" }) }) }),
|
|
2594
|
+
/* @__PURE__ */ s.jsxs("div", { className: "h-100 overflow-auto d-flex flex-column gap-2 p-3", children: [
|
|
2595
|
+
u !== null && u.length === 0 && /* @__PURE__ */ s.jsx("div", { className: "alert alert-warning m-0", children: n.noResultsMessage }),
|
|
2596
|
+
u == null ? void 0 : u.map((m) => /* @__PURE__ */ s.jsx("div", { role: "button", onClick: () => e(m), children: /* @__PURE__ */ s.jsx(jo, { employee: m }) }, m.id))
|
|
2597
|
+
] })
|
|
2598
|
+
] });
|
|
2599
|
+
}, Co = "_modal_18hh3_1", No = "_modal-content_18hh3_1", Do = "_modal-body_18hh3_5", $o = {
|
|
2600
|
+
modal: Co,
|
|
2601
|
+
"modal-content": "_modal-content_18hh3_1",
|
|
2602
|
+
modalContent: No,
|
|
2603
|
+
"modal-body": "_modal-body_18hh3_5",
|
|
2604
|
+
modalBody: Do
|
|
2605
|
+
}, It = ({ show: e, onCancel: t, onEmployeeSelected: n }) => {
|
|
2606
|
+
const { employeePickerModalTexts: r } = S(He);
|
|
2607
|
+
return /* @__PURE__ */ s.jsxs(ie, { show: e, onHide: () => t(), className: $o.modal, children: [
|
|
2608
|
+
/* @__PURE__ */ s.jsx(ie.Header, { closeButton: !0, children: /* @__PURE__ */ s.jsx(ie.Title, { children: r.modalHeader }) }),
|
|
2609
|
+
/* @__PURE__ */ s.jsx(ie.Body, { className: "p-0", children: /* @__PURE__ */ s.jsx(ko, { onEmployeeSelected: n }) })
|
|
2610
|
+
] });
|
|
2611
|
+
}, _o = ({ hookFormProps: e, inputProps: t }) => {
|
|
2612
|
+
const { register: n, formState: r, setValue: o } = e, { formField: a, label: i, resetsFields: c, type: d } = t, [u, h] = I(void 0);
|
|
2613
|
+
return P(() => {
|
|
2614
|
+
const l = a.split(".");
|
|
2615
|
+
let f = r.errors;
|
|
2616
|
+
l.forEach((m) => {
|
|
2617
|
+
f !== void 0 && (f = f[m]);
|
|
2618
|
+
}), h(f);
|
|
2619
|
+
}, [r, a]), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2620
|
+
/* @__PURE__ */ s.jsx(q.Check, { id: `check-${a}`, type: d ?? "checkbox", label: i, ...n(a, {
|
|
2621
|
+
onChange: () => {
|
|
2622
|
+
c && c.forEach((l) => o(l, null));
|
|
2623
|
+
}
|
|
2624
|
+
}), isInvalid: u !== void 0 }),
|
|
2625
|
+
u && /* @__PURE__ */ s.jsx("div", { className: "invalid-feedback d-block", children: u.message })
|
|
2626
|
+
] });
|
|
2627
|
+
}, Go = ({ hookFormProps: e, inputProps: t }) => {
|
|
2628
|
+
const { register: n, formState: r, getValues: o, setValue: a, watch: i } = e, { formField: c, options: d, resetsFields: u } = t, [h, l] = I(void 0);
|
|
2629
|
+
return P(() => {
|
|
2630
|
+
const f = c.split(".");
|
|
2631
|
+
let m = r.errors;
|
|
2632
|
+
f.forEach((w) => {
|
|
2633
|
+
m !== void 0 && (m = m[w]);
|
|
2634
|
+
}), l(m);
|
|
2635
|
+
}, [r, c]), P(() => {
|
|
2636
|
+
a(c, o(c));
|
|
2637
|
+
}, [d, c, o, a]), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2638
|
+
d.map((f) => /* @__PURE__ */ s.jsx(q.Check, { id: `radio-${f.id}`, label: f.name, type: "radio", value: f.id ?? "", checked: i(c) === f.id, ...n(c, {
|
|
2639
|
+
onChange: () => {
|
|
2640
|
+
u && u.forEach((m) => a(m, null));
|
|
2641
|
+
}
|
|
2642
|
+
}), isInvalid: h !== void 0 }, f.id)),
|
|
2643
|
+
h && /* @__PURE__ */ s.jsx("div", { className: "invalid-feedback d-block", children: h.message })
|
|
2644
|
+
] });
|
|
2645
|
+
}, Qo = ({ hookFormProps: e, inputProps: t }) => {
|
|
2646
|
+
const { register: n, formState: r, getValues: o, setValue: a, watch: i } = e, { formField: c, label: d, resetsFields: u, options: h, isNumber: l, size: f, showClearIcon: m, clearValue: w } = t, [y, b] = I(void 0), j = $(() => {
|
|
2647
|
+
const g = w ?? null;
|
|
2648
|
+
l ? a(c, g ? Number(g) : null) : a(c, (g == null ? void 0 : g.toString()) ?? "");
|
|
2649
|
+
}, [w, l, a, c]);
|
|
2650
|
+
return P(() => {
|
|
2651
|
+
const g = c.split(".");
|
|
2652
|
+
let p = r.errors;
|
|
2653
|
+
g.forEach((C) => {
|
|
2654
|
+
p !== void 0 && (p = p[C]);
|
|
2655
|
+
}), b(p);
|
|
2656
|
+
}, [r, c]), P(() => {
|
|
2657
|
+
a(c, o(c));
|
|
2658
|
+
}, [h, c, o, a]), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2659
|
+
/* @__PURE__ */ s.jsxs(te, { label: d, children: [
|
|
2660
|
+
/* @__PURE__ */ s.jsxs(q.Select, { size: f, ...n(c, {
|
|
2661
|
+
setValueAs: (g) => l ? g ? parseInt(g, 10) : null : g == null || g === "" ? null : g,
|
|
2662
|
+
onChange: () => {
|
|
2663
|
+
u && u.forEach((g) => a(g, null));
|
|
2664
|
+
}
|
|
2665
|
+
}), isInvalid: y !== void 0, children: [
|
|
2666
|
+
/* @__PURE__ */ s.jsx("option", { value: "" }),
|
|
2667
|
+
h.sort((g, p) => (g.name ?? "").localeCompare(p.name ?? "")).map((g) => /* @__PURE__ */ s.jsx("option", { value: g.id ?? "", children: g.name }, g.id))
|
|
2668
|
+
] }),
|
|
2669
|
+
m && i(c) && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ s.jsx("button", { type: "button", className: "icon-button", onClick: j, children: /* @__PURE__ */ s.jsx(z, {}) }) })
|
|
2670
|
+
] }),
|
|
2671
|
+
y && /* @__PURE__ */ s.jsx("div", { className: "invalid-feedback d-block", children: y.message })
|
|
2672
|
+
] });
|
|
2673
|
+
}, Xo = ({ hookFormProps: e, inputProps: t }) => {
|
|
2674
|
+
const { register: n, formState: r, setValue: o, watch: a } = e, { formField: i, label: c, resetsFields: d, size: u, showClearIcon: h, clearValue: l } = t, [f, m] = I(void 0), w = $(() => {
|
|
2675
|
+
const b = l ?? null;
|
|
2676
|
+
o(i, (b == null ? void 0 : b.toString()) ?? "");
|
|
2677
|
+
}, [l, o, i]), y = $(() => {
|
|
2678
|
+
const b = i.split(".");
|
|
2679
|
+
let j = r.errors;
|
|
2680
|
+
b.forEach((g) => {
|
|
2681
|
+
j !== void 0 && (j = j[g]);
|
|
2682
|
+
}), m(j);
|
|
2683
|
+
}, [r, i]);
|
|
2684
|
+
return P(() => {
|
|
2685
|
+
y();
|
|
2686
|
+
}, [y]), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2687
|
+
/* @__PURE__ */ s.jsxs(te, { label: c, children: [
|
|
2688
|
+
/* @__PURE__ */ s.jsx(q.Control, { as: "textarea", size: u, ...n(i, {
|
|
2689
|
+
onChange: () => {
|
|
2690
|
+
d && d.forEach((b) => o(b, null));
|
|
2691
|
+
}
|
|
2692
|
+
}), isInvalid: f !== void 0 }),
|
|
2693
|
+
h && a(i) && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon", children: /* @__PURE__ */ s.jsx("button", { type: "button", className: "icon-button", onClick: w, children: /* @__PURE__ */ s.jsx(z, {}) }) })
|
|
2694
|
+
] }),
|
|
2695
|
+
f && /* @__PURE__ */ s.jsx("div", { className: "invalid-feedback d-block", children: f.message })
|
|
2696
|
+
] });
|
|
2697
|
+
}, Ko = ({ hookFormProps: e, inputProps: t }) => {
|
|
2698
|
+
const { register: n, formState: r, setValue: o, watch: a } = e, { type: i, formField: c, label: d, placeholder: u, size: h, resetsFields: l, showClearIcon: f, clearValue: m } = t, [w, y] = I(void 0), b = $(() => {
|
|
2699
|
+
const g = m ?? null;
|
|
2700
|
+
i === "number" ? o(c, g ? Number(g) : null) : o(c, (g == null ? void 0 : g.toString()) ?? "");
|
|
2701
|
+
}, [m, i, o, c]), j = $(() => {
|
|
2702
|
+
const g = c.split(".");
|
|
2703
|
+
let p = r.errors;
|
|
2704
|
+
g.forEach((C) => {
|
|
2705
|
+
p !== void 0 && (p = p[C]);
|
|
2706
|
+
}), y(p);
|
|
2707
|
+
}, [r, c]);
|
|
2708
|
+
return P(() => {
|
|
2709
|
+
j();
|
|
2710
|
+
}, [j]), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2711
|
+
/* @__PURE__ */ s.jsxs(te, { label: d, children: [
|
|
2712
|
+
/* @__PURE__ */ s.jsx(q.Control, { type: i, placeholder: u ?? d, size: h, ...n(c, {
|
|
2713
|
+
setValueAs: (g) => i === "number" ? g ? parseInt(g, 10) : null : g == null || g === "" ? null : g,
|
|
2714
|
+
onChange: () => {
|
|
2715
|
+
l && l.forEach((g) => o(g, null));
|
|
2716
|
+
}
|
|
2717
|
+
}), isInvalid: w !== void 0 }),
|
|
2718
|
+
f && a(c) && /* @__PURE__ */ s.jsx("div", { className: `luminus-input-remove-icon ${i !== "text" ? "inset" : ""}`, children: /* @__PURE__ */ s.jsx("button", { type: "button", className: "icon-button", onClick: b, children: /* @__PURE__ */ s.jsx(z, {}) }) })
|
|
2719
|
+
] }),
|
|
2720
|
+
w && /* @__PURE__ */ s.jsx("div", { className: "invalid-feedback d-block", children: w.message })
|
|
2721
|
+
] });
|
|
2722
|
+
}, Uo = ({ hookFormProps: e, inputProps: t }) => {
|
|
2723
|
+
const { register: n, formState: r, setValue: o, watch: a } = e, { formField: i, label: c, size: d, defaultSelection: u, resetsFields: h } = t, [l, f] = I(u), [m, w] = I(void 0), [y, b] = I(!1), j = $(() => {
|
|
2724
|
+
const p = i.split(".");
|
|
2725
|
+
let C = r.errors;
|
|
2726
|
+
p.forEach((F) => {
|
|
2727
|
+
C !== void 0 && (C = C[F]);
|
|
2728
|
+
}), w(C);
|
|
2729
|
+
}, [r, i]), g = $((p) => {
|
|
2730
|
+
f(p ? { id: p.id, name: p.fullName } : null);
|
|
2731
|
+
}, []);
|
|
2732
|
+
return P(() => {
|
|
2733
|
+
f(u);
|
|
2734
|
+
}, [u]), P(() => {
|
|
2735
|
+
o(i, (l == null ? void 0 : l.id) ?? null, { shouldDirty: !0, shouldValidate: !0 });
|
|
2736
|
+
}, [l, i, o]), P(() => {
|
|
2737
|
+
j();
|
|
2738
|
+
}, [j]), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2739
|
+
/* @__PURE__ */ s.jsxs(te, { label: c, children: [
|
|
2740
|
+
/* @__PURE__ */ s.jsxs(q.Select, { size: d, style: { minWidth: "200px" }, onMouseDown: (p) => {
|
|
2741
|
+
p.currentTarget.focus(), p.preventDefault();
|
|
2742
|
+
}, onClick: () => {
|
|
2743
|
+
b(!0);
|
|
2744
|
+
}, ...n(i, {
|
|
2745
|
+
setValueAs: (p) => p ? parseInt(p, 10) : null,
|
|
2746
|
+
onChange: () => {
|
|
2747
|
+
h && h.forEach((p) => o(p, null));
|
|
2748
|
+
}
|
|
2749
|
+
}), isInvalid: m !== void 0, children: [
|
|
2750
|
+
/* @__PURE__ */ s.jsx("option", { value: "" }),
|
|
2751
|
+
u && /* @__PURE__ */ s.jsx("option", { value: u.id, children: u.name }),
|
|
2752
|
+
l && /* @__PURE__ */ s.jsx("option", { value: l.id, children: l.name })
|
|
2753
|
+
] }),
|
|
2754
|
+
a(i) && /* @__PURE__ */ s.jsx("div", { className: "luminus-input-remove-icon inset", children: /* @__PURE__ */ s.jsx("button", { type: "button", className: "icon-button", onClick: () => g(null), children: /* @__PURE__ */ s.jsx(z, {}) }) })
|
|
2755
|
+
] }),
|
|
2756
|
+
m && /* @__PURE__ */ s.jsx("div", { className: "invalid-feedback d-block", children: m.message }),
|
|
2757
|
+
y && /* @__PURE__ */ s.jsx(It, { show: y, onCancel: () => b(!1), onEmployeeSelected: (p) => {
|
|
2758
|
+
b(!1), g(p);
|
|
2759
|
+
} })
|
|
2760
|
+
] });
|
|
2761
|
+
}, Fo = "_form-submit_1wjhr_1", Mo = {
|
|
2762
|
+
"form-submit": "_form-submit_1wjhr_1",
|
|
2763
|
+
formSubmit: Fo
|
|
2764
|
+
}, Jo = ({ children: e }) => /* @__PURE__ */ s.jsx("button", { type: "submit", className: N("btn btn-primary luminus-floating-form-submit", Mo.formSubmit), children: e });
|
|
2765
|
+
export {
|
|
2766
|
+
Ro as ApiFileDownloadButton,
|
|
2767
|
+
go as AvatarIcon,
|
|
2768
|
+
qo as CheckInput,
|
|
2769
|
+
Vo as EmployeePicker,
|
|
2770
|
+
ko as EmployeeSearch,
|
|
2771
|
+
It as EmployeeSearchModal,
|
|
2772
|
+
Lo as HomeDashboard,
|
|
2773
|
+
_o as HookFormCheckInput,
|
|
2774
|
+
Uo as HookFormEmployeePicker,
|
|
2775
|
+
Jo as HookFormFloatingSubmit,
|
|
2776
|
+
Go as HookFormRadioInput,
|
|
2777
|
+
Qo as HookFormSelectInput,
|
|
2778
|
+
Xo as HookFormTextAreaInput,
|
|
2779
|
+
Ko as HookFormTextInput,
|
|
2780
|
+
Ao as HtmlTooltip,
|
|
2781
|
+
Ht as Loading,
|
|
2782
|
+
Yo as MonthPicker,
|
|
2783
|
+
Bo as SelectInput,
|
|
2784
|
+
na as SimpleTooltip,
|
|
2785
|
+
xo as TextInput,
|
|
2786
|
+
ea as Typography,
|
|
2787
|
+
Ho as UserAvatarDropdown
|
|
2788
|
+
};
|