@innosolutions/inno-calendar 2.0.0 → 2.0.2
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/CHANGELOG.md +23 -0
- package/dist/components/event/event-card.d.ts +1 -1
- package/dist/components/event/event-card.d.ts.map +1 -1
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/components/inno-calendar.d.ts.map +1 -1
- package/dist/components/primitives/field-layer.d.ts +10 -0
- package/dist/components/primitives/field-layer.d.ts.map +1 -1
- package/dist/components/primitives/multi-day-banner.d.ts.map +1 -1
- package/dist/components/primitives/recurrence-field.d.ts.map +1 -1
- package/dist/components/primitives/week-all-day-row.d.ts.map +1 -1
- package/dist/components/primitives/when-row.d.ts.map +1 -1
- package/dist/components/shell/calendar-sidebar.d.ts +4 -1
- package/dist/components/shell/calendar-sidebar.d.ts.map +1 -1
- package/dist/components/shell/mini-month.d.ts +4 -7
- package/dist/components/shell/mini-month.d.ts.map +1 -1
- package/dist/core/constants.d.ts +7 -0
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.mjs +83 -82
- package/dist/core/utils/time-format.d.ts +9 -0
- package/dist/core/utils/time-format.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +83 -82
- package/dist/inno-calendar-B3IO5ulf.cjs +11 -0
- package/dist/inno-calendar-B3IO5ulf.cjs.map +1 -0
- package/dist/{inno-calendar-B6qXIqxY.js → inno-calendar-Cw85molF.js} +2436 -2393
- package/dist/inno-calendar-Cw85molF.js.map +1 -0
- package/dist/{position-utils-CBSmf90e.js → position-utils-BH6T1FL5.js} +350 -331
- package/dist/position-utils-BH6T1FL5.js.map +1 -0
- package/dist/position-utils-BVt-Bp93.cjs +2 -0
- package/dist/position-utils-BVt-Bp93.cjs.map +1 -0
- package/dist/{use-slot-selection-CxPvMluJ.cjs → use-slot-selection-CSsSyfAi.cjs} +2 -2
- package/dist/{use-slot-selection-CxPvMluJ.cjs.map → use-slot-selection-CSsSyfAi.cjs.map} +1 -1
- package/dist/{use-slot-selection-IXHnP8C1.js → use-slot-selection-CT1z9v9X.js} +28 -28
- package/dist/{use-slot-selection-IXHnP8C1.js.map → use-slot-selection-CT1z9v9X.js.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.mjs +52 -51
- package/dist/{z-layers-r5PdtThu.js → z-layers-CpHPAMdp.js} +35 -35
- package/dist/{z-layers-r5PdtThu.js.map → z-layers-CpHPAMdp.js.map} +1 -1
- package/dist/{z-layers-Bavypndz.cjs → z-layers-D1DivrJg.cjs} +2 -2
- package/dist/{z-layers-Bavypndz.cjs.map → z-layers-D1DivrJg.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/inno-calendar-B6qXIqxY.js.map +0 -1
- package/dist/inno-calendar-BnCt65PZ.cjs +0 -11
- package/dist/inno-calendar-BnCt65PZ.cjs.map +0 -1
- package/dist/position-utils-BzSoogFQ.cjs +0 -2
- package/dist/position-utils-BzSoogFQ.cjs.map +0 -1
- package/dist/position-utils-CBSmf90e.js.map +0 -1
|
@@ -1,120 +1,5 @@
|
|
|
1
1
|
import { isValidElement as tt } from "react";
|
|
2
|
-
const
|
|
3
|
-
function H(t) {
|
|
4
|
-
if (t == null || typeof t == "boolean") return "";
|
|
5
|
-
if (typeof t == "string") return t;
|
|
6
|
-
if (typeof t == "number") return String(t);
|
|
7
|
-
if (Array.isArray(t)) return t.map(H).join("");
|
|
8
|
-
if (tt(t)) {
|
|
9
|
-
const e = t.props;
|
|
10
|
-
return H(e.children);
|
|
11
|
-
}
|
|
12
|
-
return "";
|
|
13
|
-
}
|
|
14
|
-
const B = "inno-calendar";
|
|
15
|
-
function P(t) {
|
|
16
|
-
if (t?.enabled === !1) return null;
|
|
17
|
-
const e = t?.storageKey ?? B;
|
|
18
|
-
return {
|
|
19
|
-
gridKey: `${e}-view`,
|
|
20
|
-
resourceKey: `${e}-resource-view`
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
const A = "inno-calendar-view", v = "inno-calendar-resource-view", nt = [
|
|
24
|
-
"day",
|
|
25
|
-
"week",
|
|
26
|
-
"month",
|
|
27
|
-
"year",
|
|
28
|
-
"4day",
|
|
29
|
-
"agenda"
|
|
30
|
-
], rt = [
|
|
31
|
-
"timeline-day",
|
|
32
|
-
"timeline-3day",
|
|
33
|
-
"timeline-week",
|
|
34
|
-
"resource-day",
|
|
35
|
-
"resource-week"
|
|
36
|
-
];
|
|
37
|
-
function $(t) {
|
|
38
|
-
return typeof t == "string" && nt.includes(t);
|
|
39
|
-
}
|
|
40
|
-
function x(t) {
|
|
41
|
-
return typeof t == "string" && rt.includes(t);
|
|
42
|
-
}
|
|
43
|
-
function F() {
|
|
44
|
-
return typeof window < "u" && typeof window.localStorage < "u";
|
|
45
|
-
}
|
|
46
|
-
function K(t) {
|
|
47
|
-
if (!F()) return null;
|
|
48
|
-
try {
|
|
49
|
-
return window.localStorage.getItem(t);
|
|
50
|
-
} catch {
|
|
51
|
-
return console.warn(`[InnoCalendar] Failed to read "${t}" from localStorage`), null;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
function G(t, e) {
|
|
55
|
-
if (F())
|
|
56
|
-
try {
|
|
57
|
-
window.localStorage.setItem(t, e);
|
|
58
|
-
} catch {
|
|
59
|
-
console.warn(`[InnoCalendar] Failed to write "${t}" to localStorage`);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function z(t) {
|
|
63
|
-
if (F())
|
|
64
|
-
try {
|
|
65
|
-
window.localStorage.removeItem(t);
|
|
66
|
-
} catch {
|
|
67
|
-
console.warn(`[InnoCalendar] Failed to remove "${t}" from localStorage`);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
function at(t, e = A) {
|
|
71
|
-
$(t) && G(e, t);
|
|
72
|
-
}
|
|
73
|
-
function ot(t = A) {
|
|
74
|
-
const e = K(t);
|
|
75
|
-
return $(e) ? e : null;
|
|
76
|
-
}
|
|
77
|
-
function bt(t = A) {
|
|
78
|
-
z(t);
|
|
79
|
-
}
|
|
80
|
-
function st(t, e = v) {
|
|
81
|
-
x(t) && G(e, t);
|
|
82
|
-
}
|
|
83
|
-
function ut(t = v) {
|
|
84
|
-
const e = K(t);
|
|
85
|
-
return x(e) ? e : null;
|
|
86
|
-
}
|
|
87
|
-
function Mt(t = v) {
|
|
88
|
-
z(t);
|
|
89
|
-
}
|
|
90
|
-
function It(t, e) {
|
|
91
|
-
const n = P(e);
|
|
92
|
-
if (n) {
|
|
93
|
-
if ($(t)) {
|
|
94
|
-
at(t, n.gridKey);
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
x(t) && st(t, n.resourceKey);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
function it() {
|
|
101
|
-
if (!F()) return null;
|
|
102
|
-
try {
|
|
103
|
-
const t = window.localStorage.getItem(et);
|
|
104
|
-
if (!t) return null;
|
|
105
|
-
const n = JSON.parse(t)?.view;
|
|
106
|
-
return $(n) || x(n) ? n : null;
|
|
107
|
-
} catch {
|
|
108
|
-
return null;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
function Ht(t) {
|
|
112
|
-
const e = P(t);
|
|
113
|
-
if (!e) return null;
|
|
114
|
-
const n = !t?.storageKey || t.storageKey === B ? it() : null;
|
|
115
|
-
return ot(e.gridKey) ?? ut(e.resourceKey) ?? n;
|
|
116
|
-
}
|
|
117
|
-
const kt = 640, $t = '[data-ic-layer],[data-radix-popper-content-wrapper],[data-radix-portal],[role="dialog"],[role="alertdialog"]', xt = "inline-flex h-9 shrink-0 items-center rounded-md border border-border px-4 text-sm font-medium hover:bg-accent hover:text-accent-foreground", Ft = "flex size-9 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-accent-foreground", Ct = [
|
|
2
|
+
const St = 640, Mt = '[data-ic-layer],[data-radix-popper-content-wrapper],[data-radix-portal],[role="dialog"],[role="alertdialog"]', It = "inline-flex h-9 shrink-0 items-center rounded-md border border-border px-4 text-sm font-medium hover:bg-accent hover:text-accent-foreground", Ht = "flex size-9 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-accent-foreground", kt = [
|
|
118
3
|
"day",
|
|
119
4
|
"week",
|
|
120
5
|
"month",
|
|
@@ -124,7 +9,7 @@ const kt = 640, $t = '[data-ic-layer],[data-radix-popper-content-wrapper],[data-
|
|
|
124
9
|
"resource-week",
|
|
125
10
|
"timeline-day",
|
|
126
11
|
"timeline-week"
|
|
127
|
-
],
|
|
12
|
+
], xt = {
|
|
128
13
|
startHour: 8,
|
|
129
14
|
endHour: 18,
|
|
130
15
|
firstDayOfWeek: 1,
|
|
@@ -134,13 +19,13 @@ const kt = 640, $t = '[data-ic-layer],[data-radix-popper-content-wrapper],[data-
|
|
|
134
19
|
timeFormat: "24h",
|
|
135
20
|
badgeVariant: "colored",
|
|
136
21
|
showCanceledEvents: !1
|
|
137
|
-
},
|
|
22
|
+
}, $t = {
|
|
138
23
|
startHour: 0,
|
|
139
24
|
endHour: 24
|
|
140
|
-
},
|
|
25
|
+
}, Ct = {
|
|
141
26
|
startHour: 8,
|
|
142
27
|
endHour: 18
|
|
143
|
-
},
|
|
28
|
+
}, Ft = {
|
|
144
29
|
day: {
|
|
145
30
|
type: "day",
|
|
146
31
|
slotMinTime: "00:00",
|
|
@@ -210,7 +95,7 @@ const kt = 640, $t = '[data-ic-layer],[data-radix-popper-content-wrapper],[data-
|
|
|
210
95
|
type: "timeline-week",
|
|
211
96
|
slotDuration: "01:00:00"
|
|
212
97
|
}
|
|
213
|
-
},
|
|
98
|
+
}, _t = {
|
|
214
99
|
blue: "#3b82f6",
|
|
215
100
|
green: "#22c55e",
|
|
216
101
|
red: "#ef4444",
|
|
@@ -221,7 +106,7 @@ const kt = 640, $t = '[data-ic-layer],[data-radix-popper-content-wrapper],[data-
|
|
|
221
106
|
teal: "#14b8a6",
|
|
222
107
|
gray: "#6b7280",
|
|
223
108
|
indigo: "#6366f1"
|
|
224
|
-
},
|
|
109
|
+
}, Rt = {
|
|
225
110
|
blue: { bg: "bg-blue-100", text: "text-blue-800", border: "border-blue-300" },
|
|
226
111
|
green: { bg: "bg-green-100", text: "text-green-800", border: "border-green-300" },
|
|
227
112
|
red: { bg: "bg-red-100", text: "text-red-800", border: "border-red-300" },
|
|
@@ -232,7 +117,7 @@ const kt = 640, $t = '[data-ic-layer],[data-radix-popper-content-wrapper],[data-
|
|
|
232
117
|
teal: { bg: "bg-teal-100", text: "text-teal-800", border: "border-teal-300" },
|
|
233
118
|
gray: { bg: "bg-gray-100", text: "text-gray-800", border: "border-gray-300" },
|
|
234
119
|
indigo: { bg: "bg-indigo-100", text: "text-indigo-800", border: "border-indigo-300" }
|
|
235
|
-
},
|
|
120
|
+
}, Ot = {
|
|
236
121
|
"#3b82f6": "blue",
|
|
237
122
|
"#22c55e": "green",
|
|
238
123
|
"#ef4444": "red",
|
|
@@ -243,7 +128,125 @@ const kt = 640, $t = '[data-ic-layer],[data-radix-popper-content-wrapper],[data-
|
|
|
243
128
|
"#14b8a6": "teal",
|
|
244
129
|
"#6b7280": "gray",
|
|
245
130
|
"#6366f1": "indigo"
|
|
246
|
-
},
|
|
131
|
+
}, At = [
|
|
132
|
+
"line-through opacity-50 bg-zinc-100 text-zinc-500 dark:bg-zinc-800 dark:text-zinc-400",
|
|
133
|
+
"[background-image:repeating-linear-gradient(135deg,transparent,transparent_5px,rgba(0,0,0,0.08)_5px,rgba(0,0,0,0.08)_10px)]",
|
|
134
|
+
"dark:[background-image:repeating-linear-gradient(135deg,transparent,transparent_5px,rgba(255,255,255,0.07)_5px,rgba(255,255,255,0.07)_10px)]"
|
|
135
|
+
].join(" "), vt = 24, Lt = 60, et = 60 * 1e3, nt = 60 * et, Wt = 24 * nt, x = 48, Yt = 32, Ut = 56, Nt = 200, rt = 20, at = "inno-calendar-preferences";
|
|
136
|
+
function H(t) {
|
|
137
|
+
if (t == null || typeof t == "boolean") return "";
|
|
138
|
+
if (typeof t == "string") return t;
|
|
139
|
+
if (typeof t == "number") return String(t);
|
|
140
|
+
if (Array.isArray(t)) return t.map(H).join("");
|
|
141
|
+
if (tt(t)) {
|
|
142
|
+
const e = t.props;
|
|
143
|
+
return H(e.children);
|
|
144
|
+
}
|
|
145
|
+
return "";
|
|
146
|
+
}
|
|
147
|
+
const B = "inno-calendar";
|
|
148
|
+
function P(t) {
|
|
149
|
+
if (t?.enabled === !1) return null;
|
|
150
|
+
const e = t?.storageKey ?? B;
|
|
151
|
+
return {
|
|
152
|
+
gridKey: `${e}-view`,
|
|
153
|
+
resourceKey: `${e}-resource-view`
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
const A = "inno-calendar-view", v = "inno-calendar-resource-view", ot = [
|
|
157
|
+
"day",
|
|
158
|
+
"week",
|
|
159
|
+
"month",
|
|
160
|
+
"year",
|
|
161
|
+
"4day",
|
|
162
|
+
"agenda"
|
|
163
|
+
], st = [
|
|
164
|
+
"timeline-day",
|
|
165
|
+
"timeline-3day",
|
|
166
|
+
"timeline-week",
|
|
167
|
+
"resource-day",
|
|
168
|
+
"resource-week"
|
|
169
|
+
];
|
|
170
|
+
function $(t) {
|
|
171
|
+
return typeof t == "string" && ot.includes(t);
|
|
172
|
+
}
|
|
173
|
+
function C(t) {
|
|
174
|
+
return typeof t == "string" && st.includes(t);
|
|
175
|
+
}
|
|
176
|
+
function F() {
|
|
177
|
+
return typeof window < "u" && typeof window.localStorage < "u";
|
|
178
|
+
}
|
|
179
|
+
function K(t) {
|
|
180
|
+
if (!F()) return null;
|
|
181
|
+
try {
|
|
182
|
+
return window.localStorage.getItem(t);
|
|
183
|
+
} catch {
|
|
184
|
+
return console.warn(`[InnoCalendar] Failed to read "${t}" from localStorage`), null;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
function G(t, e) {
|
|
188
|
+
if (F())
|
|
189
|
+
try {
|
|
190
|
+
window.localStorage.setItem(t, e);
|
|
191
|
+
} catch {
|
|
192
|
+
console.warn(`[InnoCalendar] Failed to write "${t}" to localStorage`);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
function z(t) {
|
|
196
|
+
if (F())
|
|
197
|
+
try {
|
|
198
|
+
window.localStorage.removeItem(t);
|
|
199
|
+
} catch {
|
|
200
|
+
console.warn(`[InnoCalendar] Failed to remove "${t}" from localStorage`);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
function ut(t, e = A) {
|
|
204
|
+
$(t) && G(e, t);
|
|
205
|
+
}
|
|
206
|
+
function it(t = A) {
|
|
207
|
+
const e = K(t);
|
|
208
|
+
return $(e) ? e : null;
|
|
209
|
+
}
|
|
210
|
+
function Vt(t = A) {
|
|
211
|
+
z(t);
|
|
212
|
+
}
|
|
213
|
+
function ct(t, e = v) {
|
|
214
|
+
C(t) && G(e, t);
|
|
215
|
+
}
|
|
216
|
+
function lt(t = v) {
|
|
217
|
+
const e = K(t);
|
|
218
|
+
return C(e) ? e : null;
|
|
219
|
+
}
|
|
220
|
+
function Bt(t = v) {
|
|
221
|
+
z(t);
|
|
222
|
+
}
|
|
223
|
+
function Pt(t, e) {
|
|
224
|
+
const n = P(e);
|
|
225
|
+
if (n) {
|
|
226
|
+
if ($(t)) {
|
|
227
|
+
ut(t, n.gridKey);
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
C(t) && ct(t, n.resourceKey);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
function ft() {
|
|
234
|
+
if (!F()) return null;
|
|
235
|
+
try {
|
|
236
|
+
const t = window.localStorage.getItem(at);
|
|
237
|
+
if (!t) return null;
|
|
238
|
+
const n = JSON.parse(t)?.view;
|
|
239
|
+
return $(n) || C(n) ? n : null;
|
|
240
|
+
} catch {
|
|
241
|
+
return null;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
function Kt(t) {
|
|
245
|
+
const e = P(t);
|
|
246
|
+
if (!e) return null;
|
|
247
|
+
const n = !t?.storageKey || t.storageKey === B ? ft() : null;
|
|
248
|
+
return it(e.gridKey) ?? lt(e.resourceKey) ?? n;
|
|
249
|
+
}
|
|
247
250
|
function d(t) {
|
|
248
251
|
const e = new Date(t);
|
|
249
252
|
return e.setHours(0, 0, 0, 0), e;
|
|
@@ -256,7 +259,7 @@ function i(t, e) {
|
|
|
256
259
|
const n = new Date(t);
|
|
257
260
|
return n.setDate(n.getDate() + e), n;
|
|
258
261
|
}
|
|
259
|
-
function
|
|
262
|
+
function Gt(t, e) {
|
|
260
263
|
return i(t, -e);
|
|
261
264
|
}
|
|
262
265
|
function w(t, e) {
|
|
@@ -265,7 +268,7 @@ function w(t, e) {
|
|
|
265
268
|
function j(t) {
|
|
266
269
|
return w(t, /* @__PURE__ */ new Date());
|
|
267
270
|
}
|
|
268
|
-
function
|
|
271
|
+
function zt(t) {
|
|
269
272
|
return t.getDay();
|
|
270
273
|
}
|
|
271
274
|
function J(t) {
|
|
@@ -283,38 +286,38 @@ function T(t, e = 1) {
|
|
|
283
286
|
function k(t, e) {
|
|
284
287
|
return i(t, e * 7);
|
|
285
288
|
}
|
|
286
|
-
function
|
|
289
|
+
function jt(t, e) {
|
|
287
290
|
return i(t, -e * 7);
|
|
288
291
|
}
|
|
289
|
-
function
|
|
292
|
+
function Jt(t) {
|
|
290
293
|
const e = new Date(Date.UTC(t.getFullYear(), t.getMonth(), t.getDate())), n = e.getUTCDay() || 7;
|
|
291
294
|
e.setUTCDate(e.getUTCDate() + 4 - n);
|
|
292
295
|
const r = new Date(Date.UTC(e.getUTCFullYear(), 0, 1));
|
|
293
296
|
return Math.ceil(((e.getTime() - r.getTime()) / 864e5 + 1) / 7);
|
|
294
297
|
}
|
|
295
|
-
function
|
|
298
|
+
function Xt(t, e, n = 1) {
|
|
296
299
|
const r = m(t, n), a = m(e, n);
|
|
297
300
|
return w(r, a);
|
|
298
301
|
}
|
|
299
|
-
function
|
|
302
|
+
function E(t) {
|
|
300
303
|
const e = new Date(t);
|
|
301
304
|
return e.setDate(1), e.setHours(0, 0, 0, 0), e;
|
|
302
305
|
}
|
|
303
|
-
function
|
|
306
|
+
function S(t) {
|
|
304
307
|
const e = new Date(t.getFullYear(), t.getMonth() + 1, 0);
|
|
305
308
|
return e.setHours(23, 59, 59, 999), e;
|
|
306
309
|
}
|
|
307
|
-
function
|
|
310
|
+
function _(t, e) {
|
|
308
311
|
const n = new Date(t);
|
|
309
312
|
return n.setMonth(n.getMonth() + e), n;
|
|
310
313
|
}
|
|
311
|
-
function
|
|
312
|
-
return
|
|
314
|
+
function qt(t, e) {
|
|
315
|
+
return _(t, -e);
|
|
313
316
|
}
|
|
314
|
-
function
|
|
317
|
+
function Qt(t) {
|
|
315
318
|
return new Date(t.getFullYear(), t.getMonth() + 1, 0).getDate();
|
|
316
319
|
}
|
|
317
|
-
function
|
|
320
|
+
function L(t, e) {
|
|
318
321
|
return t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth();
|
|
319
322
|
}
|
|
320
323
|
function X(t) {
|
|
@@ -323,59 +326,59 @@ function X(t) {
|
|
|
323
326
|
function dt(t) {
|
|
324
327
|
return new Date(t.getFullYear(), 11, 31, 23, 59, 59, 999);
|
|
325
328
|
}
|
|
326
|
-
function
|
|
329
|
+
function W(t, e) {
|
|
327
330
|
const n = new Date(t);
|
|
328
331
|
return n.setFullYear(n.getFullYear() + e), n;
|
|
329
332
|
}
|
|
330
|
-
function Qt(t, e) {
|
|
331
|
-
return L(t, -e);
|
|
332
|
-
}
|
|
333
333
|
function Zt(t, e) {
|
|
334
|
+
return W(t, -e);
|
|
335
|
+
}
|
|
336
|
+
function te(t, e) {
|
|
334
337
|
return t.getFullYear() === e.getFullYear();
|
|
335
338
|
}
|
|
336
339
|
function gt(t, e) {
|
|
337
340
|
const n = new Date(t);
|
|
338
341
|
return n.setHours(n.getHours() + e), n;
|
|
339
342
|
}
|
|
340
|
-
function
|
|
343
|
+
function ee(t, e) {
|
|
341
344
|
const n = new Date(t);
|
|
342
345
|
return n.setMinutes(n.getMinutes() + e), n;
|
|
343
346
|
}
|
|
344
|
-
function
|
|
347
|
+
function ne(t, e, n = 0, r = 0) {
|
|
345
348
|
const a = new Date(t);
|
|
346
349
|
return a.setHours(e, n, r, 0), a;
|
|
347
350
|
}
|
|
348
|
-
function
|
|
351
|
+
function re(t) {
|
|
349
352
|
return t.getHours() + t.getMinutes() / 60;
|
|
350
353
|
}
|
|
351
|
-
function
|
|
354
|
+
function ae(t, e) {
|
|
352
355
|
return t.getTime() < e.getTime();
|
|
353
356
|
}
|
|
354
|
-
function
|
|
357
|
+
function oe(t, e) {
|
|
355
358
|
return t.getTime() > e.getTime();
|
|
356
359
|
}
|
|
357
|
-
function
|
|
360
|
+
function se(t, e, n) {
|
|
358
361
|
const r = t.getTime();
|
|
359
362
|
return r >= e.getTime() && r <= n.getTime();
|
|
360
363
|
}
|
|
361
|
-
function
|
|
364
|
+
function ue(t) {
|
|
362
365
|
if (t.length !== 0)
|
|
363
366
|
return t.reduce((e, n) => n < e ? n : e);
|
|
364
367
|
}
|
|
365
|
-
function
|
|
368
|
+
function ie(t) {
|
|
366
369
|
if (t.length !== 0)
|
|
367
370
|
return t.reduce((e, n) => n > e ? n : e);
|
|
368
371
|
}
|
|
369
372
|
function Y(t, e) {
|
|
370
373
|
return t.getTime() - e.getTime();
|
|
371
374
|
}
|
|
372
|
-
function
|
|
375
|
+
function ce(t, e) {
|
|
373
376
|
return Math.floor(Y(t, e) / 6e4);
|
|
374
377
|
}
|
|
375
|
-
function
|
|
378
|
+
function le(t, e) {
|
|
376
379
|
return Math.floor(Y(t, e) / 36e5);
|
|
377
380
|
}
|
|
378
|
-
function
|
|
381
|
+
function fe(t, e) {
|
|
379
382
|
const n = d(t), r = d(e);
|
|
380
383
|
return Math.floor(Y(n, r) / 864e5);
|
|
381
384
|
}
|
|
@@ -387,11 +390,11 @@ function I(t, e = "24h") {
|
|
|
387
390
|
}
|
|
388
391
|
return `${n.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}`;
|
|
389
392
|
}
|
|
390
|
-
function
|
|
393
|
+
function de(t) {
|
|
391
394
|
const e = t.getFullYear(), n = (t.getMonth() + 1).toString().padStart(2, "0"), r = t.getDate().toString().padStart(2, "0");
|
|
392
395
|
return `${e}-${n}-${r}`;
|
|
393
396
|
}
|
|
394
|
-
function
|
|
397
|
+
function ge(t) {
|
|
395
398
|
return new Date(t);
|
|
396
399
|
}
|
|
397
400
|
function mt(t, e) {
|
|
@@ -402,46 +405,46 @@ function mt(t, e) {
|
|
|
402
405
|
n.push(new Date(r)), r = i(r, 1);
|
|
403
406
|
return n;
|
|
404
407
|
}
|
|
405
|
-
function
|
|
408
|
+
function me(t, e) {
|
|
406
409
|
const n = [];
|
|
407
410
|
let r = new Date(t);
|
|
408
411
|
for (; r <= e; )
|
|
409
412
|
n.push(new Date(r)), r = gt(r, 1);
|
|
410
413
|
return n;
|
|
411
414
|
}
|
|
412
|
-
function
|
|
415
|
+
function De(t = "en-US", e = "short") {
|
|
413
416
|
const n = new Intl.DateTimeFormat(t, { weekday: e }), r = [], a = new Date(2024, 0, 7);
|
|
414
417
|
for (let o = 0; o < 7; o++)
|
|
415
418
|
r.push(n.format(i(a, o)));
|
|
416
419
|
return r;
|
|
417
420
|
}
|
|
418
|
-
function
|
|
421
|
+
function ye(t = "en-US", e = "long") {
|
|
419
422
|
const n = new Intl.DateTimeFormat(t, { month: e }), r = [];
|
|
420
423
|
for (let a = 0; a < 12; a++)
|
|
421
424
|
r.push(n.format(new Date(2024, a, 1)));
|
|
422
425
|
return r;
|
|
423
426
|
}
|
|
424
|
-
function
|
|
427
|
+
function he(t) {
|
|
425
428
|
const e = [];
|
|
426
429
|
for (let n = t.startHour; n <= t.endHour; n++)
|
|
427
430
|
e.push(n);
|
|
428
431
|
return e;
|
|
429
432
|
}
|
|
430
|
-
function
|
|
433
|
+
function pe(t, e = "24h") {
|
|
431
434
|
if (e === "12h") {
|
|
432
435
|
const n = t >= 12 ? "PM" : "AM";
|
|
433
436
|
return `${t % 12 || 12} ${n}`;
|
|
434
437
|
}
|
|
435
438
|
return `${String(t).padStart(2, "0")}:00`;
|
|
436
439
|
}
|
|
437
|
-
function
|
|
440
|
+
function we(t, e = 1) {
|
|
438
441
|
const n = m(t, e), r = [];
|
|
439
442
|
for (let a = 0; a < 7; a++)
|
|
440
443
|
r.push(i(n, a));
|
|
441
444
|
return r;
|
|
442
445
|
}
|
|
443
|
-
function
|
|
444
|
-
const n =
|
|
446
|
+
function Te(t, e = 1) {
|
|
447
|
+
const n = E(t), r = S(t), a = m(n, e), o = T(r, e), s = t.getMonth();
|
|
445
448
|
return mt(a, o).map((c) => ({
|
|
446
449
|
date: c,
|
|
447
450
|
isCurrentMonth: c.getMonth() === s,
|
|
@@ -455,7 +458,7 @@ function U(t) {
|
|
|
455
458
|
r === 23 && a >= 59;
|
|
456
459
|
return !!(o && s);
|
|
457
460
|
}
|
|
458
|
-
function
|
|
461
|
+
function be(t) {
|
|
459
462
|
const e = [], n = [];
|
|
460
463
|
for (const r of t)
|
|
461
464
|
U(r) ? n.push(r) : w(r.startDate, r.endDate) ? e.push(r) : n.push(r);
|
|
@@ -469,11 +472,11 @@ function Se(t, e, n) {
|
|
|
469
472
|
const r = t.getDay(), a = n[r];
|
|
470
473
|
return !a || !(a.enabled !== !1) || a.from === a.to ? !1 : e >= a.from && e < a.to;
|
|
471
474
|
}
|
|
472
|
-
function
|
|
475
|
+
function Me(t, e) {
|
|
473
476
|
const n = t.getDay(), r = e[n];
|
|
474
477
|
return !r || !(r.enabled !== !1) || r.from === r.to ? null : { from: r.from, to: r.to };
|
|
475
478
|
}
|
|
476
|
-
function
|
|
479
|
+
function Ie(t) {
|
|
477
480
|
const e = [];
|
|
478
481
|
for (let n = 0; n < 12; n++)
|
|
479
482
|
e.push(new Date(t, n, 1));
|
|
@@ -507,7 +510,7 @@ function pt(t, e) {
|
|
|
507
510
|
function wt(t) {
|
|
508
511
|
return t.filter((e) => !e.isCanceled);
|
|
509
512
|
}
|
|
510
|
-
function
|
|
513
|
+
function He(t, e) {
|
|
511
514
|
let n = [...t];
|
|
512
515
|
return e.dateRange && (n = Dt(
|
|
513
516
|
n,
|
|
@@ -515,10 +518,10 @@ function Ie(t, e) {
|
|
|
515
518
|
e.dateRange.endDate
|
|
516
519
|
)), e.scheduleTypeIds && e.scheduleTypeIds.length > 0 && (n = yt(n, e.scheduleTypeIds)), e.resourceIds && e.resourceIds.length > 0 && (n = ht(n, e.resourceIds)), e.search && (n = pt(n, e.search)), e.showCanceled || (n = wt(n)), n;
|
|
517
520
|
}
|
|
518
|
-
function
|
|
521
|
+
function ke(t) {
|
|
519
522
|
return [...t].sort((e, n) => e.startDate.getTime() - n.startDate.getTime());
|
|
520
523
|
}
|
|
521
|
-
function
|
|
524
|
+
function xe(t) {
|
|
522
525
|
return [...t].sort((e, n) => e.endDate.getTime() - n.endDate.getTime());
|
|
523
526
|
}
|
|
524
527
|
function $e(t) {
|
|
@@ -527,7 +530,7 @@ function $e(t) {
|
|
|
527
530
|
return n.endDate.getTime() - n.startDate.getTime() - r;
|
|
528
531
|
});
|
|
529
532
|
}
|
|
530
|
-
function
|
|
533
|
+
function Ce(t) {
|
|
531
534
|
const e = /* @__PURE__ */ new Map();
|
|
532
535
|
for (const n of t) {
|
|
533
536
|
const r = d(n.startDate).toISOString(), a = e.get(r) ?? [];
|
|
@@ -543,7 +546,7 @@ function Fe(t) {
|
|
|
543
546
|
}
|
|
544
547
|
return e;
|
|
545
548
|
}
|
|
546
|
-
function
|
|
549
|
+
function _e(t) {
|
|
547
550
|
const e = /* @__PURE__ */ new Map();
|
|
548
551
|
for (const n of t) {
|
|
549
552
|
const r = e.get(n.resourceId) ?? [];
|
|
@@ -557,25 +560,25 @@ function Re(t, e) {
|
|
|
557
560
|
return n.startDate <= a && n.endDate >= r;
|
|
558
561
|
});
|
|
559
562
|
}
|
|
560
|
-
function
|
|
563
|
+
function Oe(t) {
|
|
561
564
|
return t.filter((e) => e.isAllDay);
|
|
562
565
|
}
|
|
563
|
-
function
|
|
566
|
+
function Ae(t) {
|
|
564
567
|
return t.filter((e) => !e.isAllDay);
|
|
565
568
|
}
|
|
566
|
-
function
|
|
569
|
+
function ve(t) {
|
|
567
570
|
return t.filter((e) => e.isMultiDay ? !0 : !w(e.startDate, e.endDate));
|
|
568
571
|
}
|
|
569
|
-
function
|
|
572
|
+
function Le(t) {
|
|
570
573
|
return t.isMultiDay ? !0 : !w(t.startDate, t.endDate);
|
|
571
574
|
}
|
|
572
575
|
function We(t) {
|
|
573
576
|
return Math.floor((t.endDate.getTime() - t.startDate.getTime()) / 6e4);
|
|
574
577
|
}
|
|
575
|
-
function
|
|
578
|
+
function Ye(t, e = "blue") {
|
|
576
579
|
return t.color ?? e;
|
|
577
580
|
}
|
|
578
|
-
function
|
|
581
|
+
function Ue(t, e, n = "blue") {
|
|
579
582
|
if (t.color) return t.color;
|
|
580
583
|
if (t.scheduleTypeId !== void 0 && e) {
|
|
581
584
|
const r = e.get(t.scheduleTypeId);
|
|
@@ -583,7 +586,7 @@ function Ye(t, e, n = "blue") {
|
|
|
583
586
|
}
|
|
584
587
|
return n;
|
|
585
588
|
}
|
|
586
|
-
function
|
|
589
|
+
function Ne(t) {
|
|
587
590
|
if (U(t)) {
|
|
588
591
|
if (w(t.startDate, t.endDate))
|
|
589
592
|
return "All day";
|
|
@@ -618,10 +621,24 @@ function O(t, { locale: e, hour12: n = !1 } = {}) {
|
|
|
618
621
|
...n ? { hour12: !0 } : { hourCycle: "h23" }
|
|
619
622
|
}).format(t);
|
|
620
623
|
}
|
|
621
|
-
function
|
|
624
|
+
function Be(t, e, n = {}) {
|
|
622
625
|
return `${O(t, n)} – ${O(e, n)}`;
|
|
623
626
|
}
|
|
624
|
-
function
|
|
627
|
+
function Pe(t) {
|
|
628
|
+
const e = t.trim().toLowerCase();
|
|
629
|
+
if (!e) return null;
|
|
630
|
+
const n = /\s*(a|p)\.?m?\.?$/.exec(e), r = n ? e.slice(0, n.index) : e;
|
|
631
|
+
let a, o;
|
|
632
|
+
if (/^\d{3,4}$/.test(r))
|
|
633
|
+
a = Number(r.slice(0, -2)), o = Number(r.slice(-2));
|
|
634
|
+
else {
|
|
635
|
+
const s = /^(\d{1,2})(?:\s*[:h.,]\s*(\d{1,2})?)?$/.exec(r);
|
|
636
|
+
if (!s) return null;
|
|
637
|
+
a = Number(s[1]), o = Number(s[2] ?? 0);
|
|
638
|
+
}
|
|
639
|
+
return n?.[1] === "p" && a < 12 && (a += 12), n?.[1] === "a" && a === 12 && (a = 0), a > 23 || o > 59 ? null : { hours: a, minutes: o };
|
|
640
|
+
}
|
|
641
|
+
function Ke(t, { locale: e, hour12: n = !1 } = {}) {
|
|
625
642
|
if (!n) return O(t, { locale: e, hour12: n });
|
|
626
643
|
const r = t.getMinutes() !== 0;
|
|
627
644
|
return new Intl.DateTimeFormat(e, {
|
|
@@ -647,7 +664,7 @@ function Tt(t, e, n = 1) {
|
|
|
647
664
|
endDate: T(t, n)
|
|
648
665
|
};
|
|
649
666
|
case "month": {
|
|
650
|
-
const r =
|
|
667
|
+
const r = E(t), a = S(t);
|
|
651
668
|
return {
|
|
652
669
|
startDate: m(r, n),
|
|
653
670
|
endDate: T(a, n)
|
|
@@ -680,7 +697,7 @@ function Tt(t, e, n = 1) {
|
|
|
680
697
|
};
|
|
681
698
|
}
|
|
682
699
|
}
|
|
683
|
-
function
|
|
700
|
+
function Ge(t, e) {
|
|
684
701
|
switch (e) {
|
|
685
702
|
case "day":
|
|
686
703
|
case "resource-day":
|
|
@@ -695,16 +712,16 @@ function Pe(t, e) {
|
|
|
695
712
|
case "timeline-week":
|
|
696
713
|
return k(t, 1);
|
|
697
714
|
case "month":
|
|
698
|
-
return
|
|
715
|
+
return _(t, 1);
|
|
699
716
|
case "year":
|
|
700
|
-
return
|
|
717
|
+
return W(t, 1);
|
|
701
718
|
case "agenda":
|
|
702
719
|
return k(t, 1);
|
|
703
720
|
default:
|
|
704
721
|
return i(t, 1);
|
|
705
722
|
}
|
|
706
723
|
}
|
|
707
|
-
function
|
|
724
|
+
function ze(t, e) {
|
|
708
725
|
switch (e) {
|
|
709
726
|
case "day":
|
|
710
727
|
case "resource-day":
|
|
@@ -719,52 +736,52 @@ function Ke(t, e) {
|
|
|
719
736
|
case "timeline-week":
|
|
720
737
|
return k(t, -1);
|
|
721
738
|
case "month":
|
|
722
|
-
return
|
|
739
|
+
return _(t, -1);
|
|
723
740
|
case "year":
|
|
724
|
-
return
|
|
741
|
+
return W(t, -1);
|
|
725
742
|
case "agenda":
|
|
726
743
|
return k(t, -1);
|
|
727
744
|
default:
|
|
728
745
|
return i(t, -1);
|
|
729
746
|
}
|
|
730
747
|
}
|
|
731
|
-
function
|
|
748
|
+
function je() {
|
|
732
749
|
return d(/* @__PURE__ */ new Date());
|
|
733
750
|
}
|
|
734
|
-
function
|
|
735
|
-
const n =
|
|
751
|
+
function Je(t, e = 1) {
|
|
752
|
+
const n = E(t), r = S(t), a = m(n, e), o = T(r, e), s = [];
|
|
736
753
|
let u = a;
|
|
737
754
|
for (; u <= o; )
|
|
738
755
|
s.push({
|
|
739
756
|
date: new Date(u),
|
|
740
757
|
isToday: j(u),
|
|
741
|
-
isCurrentMonth:
|
|
758
|
+
isCurrentMonth: L(u, t),
|
|
742
759
|
isWeekend: J(u),
|
|
743
760
|
dayOfWeek: u.getDay()
|
|
744
761
|
}), u = i(u, 1);
|
|
745
762
|
return s;
|
|
746
763
|
}
|
|
747
|
-
function
|
|
764
|
+
function Xe(t, e = 1) {
|
|
748
765
|
const n = m(t, e), r = [];
|
|
749
766
|
for (let a = 0; a < 7; a++) {
|
|
750
767
|
const o = i(n, a);
|
|
751
768
|
r.push({
|
|
752
769
|
date: o,
|
|
753
770
|
isToday: j(o),
|
|
754
|
-
isCurrentMonth:
|
|
771
|
+
isCurrentMonth: L(o, t),
|
|
755
772
|
isWeekend: J(o),
|
|
756
773
|
dayOfWeek: o.getDay()
|
|
757
774
|
});
|
|
758
775
|
}
|
|
759
776
|
return r;
|
|
760
777
|
}
|
|
761
|
-
function
|
|
778
|
+
function qe(t) {
|
|
762
779
|
const e = X(t), n = [];
|
|
763
780
|
for (let r = 0; r < 12; r++) {
|
|
764
|
-
const a =
|
|
781
|
+
const a = _(e, r);
|
|
765
782
|
n.push({
|
|
766
783
|
date: a,
|
|
767
|
-
isToday:
|
|
784
|
+
isToday: L(a, /* @__PURE__ */ new Date()),
|
|
768
785
|
isCurrentMonth: !0,
|
|
769
786
|
isWeekend: !1,
|
|
770
787
|
dayOfWeek: a.getDay()
|
|
@@ -772,7 +789,7 @@ function Je(t) {
|
|
|
772
789
|
}
|
|
773
790
|
return n;
|
|
774
791
|
}
|
|
775
|
-
function
|
|
792
|
+
function Qe(t, e, n = 30) {
|
|
776
793
|
const r = [], a = 60 / n;
|
|
777
794
|
for (let o = t; o < e; o++)
|
|
778
795
|
for (let s = 0; s < a; s++) {
|
|
@@ -785,7 +802,7 @@ function Xe(t, e, n = 30) {
|
|
|
785
802
|
}
|
|
786
803
|
return r;
|
|
787
804
|
}
|
|
788
|
-
function
|
|
805
|
+
function Ze(t, e, n = "24h") {
|
|
789
806
|
const r = [];
|
|
790
807
|
for (let a = t; a <= e; a++) {
|
|
791
808
|
let o;
|
|
@@ -798,7 +815,7 @@ function qe(t, e, n = "24h") {
|
|
|
798
815
|
}
|
|
799
816
|
return r;
|
|
800
817
|
}
|
|
801
|
-
function
|
|
818
|
+
function tn(t, e, n = "en-US") {
|
|
802
819
|
const r = new Intl.DateTimeFormat(n, {
|
|
803
820
|
weekday: "short",
|
|
804
821
|
month: "short",
|
|
@@ -824,24 +841,24 @@ function Qe(t, e, n = "en-US") {
|
|
|
824
841
|
return `${a.format(o)} - ${a.format(s)}`;
|
|
825
842
|
}
|
|
826
843
|
case "month": {
|
|
827
|
-
const o =
|
|
844
|
+
const o = E(t), s = S(t);
|
|
828
845
|
return `${a.format(o)} - ${a.format(s)}`;
|
|
829
846
|
}
|
|
830
847
|
case "year":
|
|
831
848
|
return `Jan 1 - Dec 31, ${t.getFullYear()}`;
|
|
832
849
|
case "agenda": {
|
|
833
|
-
const o =
|
|
850
|
+
const o = E(t), s = S(t);
|
|
834
851
|
return `${a.format(o)} - ${a.format(s)}`;
|
|
835
852
|
}
|
|
836
853
|
default:
|
|
837
854
|
return "";
|
|
838
855
|
}
|
|
839
856
|
}
|
|
840
|
-
function
|
|
857
|
+
function en(t, e, n, r = 1) {
|
|
841
858
|
const a = Tt(e, n, r);
|
|
842
859
|
return t.filter((o) => o.startDate <= a.endDate && o.endDate >= a.startDate).length;
|
|
843
860
|
}
|
|
844
|
-
function
|
|
861
|
+
function nn(t, e, n = "en-US") {
|
|
845
862
|
const r = new Intl.DateTimeFormat(n, { month: "long", year: "numeric" }), a = new Intl.DateTimeFormat(n, {
|
|
846
863
|
weekday: "long",
|
|
847
864
|
month: "long",
|
|
@@ -873,7 +890,7 @@ function tn(t, e, n = "en-US") {
|
|
|
873
890
|
return r.format(t);
|
|
874
891
|
}
|
|
875
892
|
}
|
|
876
|
-
function
|
|
893
|
+
function rn(t = 1, e = "short", n = "en-US") {
|
|
877
894
|
const r = new Intl.DateTimeFormat(n, { weekday: e }), a = [], o = new Date(2024, 0, 7);
|
|
878
895
|
for (let s = 0; s < 7; s++) {
|
|
879
896
|
const u = (t + s) % 7, c = i(o, u);
|
|
@@ -884,8 +901,8 @@ function en(t = 1, e = "short", n = "en-US") {
|
|
|
884
901
|
}
|
|
885
902
|
return a;
|
|
886
903
|
}
|
|
887
|
-
function
|
|
888
|
-
const { startHour: a, endHour: o } = n, s = o - a, u = s * r, c = t.startDate.getHours() + t.startDate.getMinutes() / 60, l = t.endDate.getHours() + t.endDate.getMinutes() / 60, g = Math.max(c, a), h = Math.min(l, o), D = (g - a) / s * u, y = (h - a) / s * u, f = Math.max(y - D,
|
|
904
|
+
function bt(t, e, n, r = x) {
|
|
905
|
+
const { startHour: a, endHour: o } = n, s = o - a, u = s * r, c = t.startDate.getHours() + t.startDate.getMinutes() / 60, l = t.endDate.getHours() + t.endDate.getMinutes() / 60, g = Math.max(c, a), h = Math.min(l, o), D = (g - a) / s * u, y = (h - a) / s * u, f = Math.max(y - D, rt);
|
|
889
906
|
return {
|
|
890
907
|
top: D,
|
|
891
908
|
height: f,
|
|
@@ -894,7 +911,7 @@ function Et(t, e, n, r = C) {
|
|
|
894
911
|
zIndex: 1
|
|
895
912
|
};
|
|
896
913
|
}
|
|
897
|
-
function
|
|
914
|
+
function an(t, e, n, r = x) {
|
|
898
915
|
if (t.length === 0) return [];
|
|
899
916
|
const a = [...t].sort((l, g) => {
|
|
900
917
|
const h = l.startDate.getTime() - g.startDate.getTime();
|
|
@@ -911,24 +928,24 @@ function nn(t, e, n, r = C) {
|
|
|
911
928
|
const g = [];
|
|
912
929
|
for (const f of l) {
|
|
913
930
|
const q = f.startDate.getTime(), Q = f.endDate.getTime();
|
|
914
|
-
let
|
|
931
|
+
let b = -1;
|
|
915
932
|
for (let M = 0; M < g.length; M++) {
|
|
916
|
-
const
|
|
917
|
-
if (!
|
|
918
|
-
const
|
|
919
|
-
if (
|
|
920
|
-
|
|
933
|
+
const R = g[M];
|
|
934
|
+
if (!R) continue;
|
|
935
|
+
const V = R[R.length - 1];
|
|
936
|
+
if (V && V.endTime <= q) {
|
|
937
|
+
b = M;
|
|
921
938
|
break;
|
|
922
939
|
}
|
|
923
940
|
}
|
|
924
|
-
|
|
925
|
-
const
|
|
926
|
-
|
|
927
|
-
const Z =
|
|
941
|
+
b === -1 && (b = g.length, g.push([]));
|
|
942
|
+
const N = g[b];
|
|
943
|
+
N && N.push({ event: f, endTime: Q });
|
|
944
|
+
const Z = bt(f, e, n, r);
|
|
928
945
|
c.push({
|
|
929
946
|
event: f,
|
|
930
947
|
position: Z,
|
|
931
|
-
column:
|
|
948
|
+
column: b,
|
|
932
949
|
columnSpan: 1
|
|
933
950
|
});
|
|
934
951
|
}
|
|
@@ -938,18 +955,18 @@ function nn(t, e, n, r = C) {
|
|
|
938
955
|
}
|
|
939
956
|
return c;
|
|
940
957
|
}
|
|
941
|
-
function
|
|
958
|
+
function on(t, e, n, r = x, a = 30) {
|
|
942
959
|
const { startHour: o, endHour: s } = n, u = s - o, c = u * r, l = t / c * u, h = (o + l) * 60, D = Math.round(h / a) * a, y = new Date(e);
|
|
943
960
|
return y.setHours(0, 0, 0, 0), y.setMinutes(D), y;
|
|
944
961
|
}
|
|
945
|
-
function
|
|
962
|
+
function sn(t, e, n = x) {
|
|
946
963
|
const { startHour: r, endHour: a } = e, o = a - r, s = o * n, u = t.getHours() + t.getMinutes() / 60;
|
|
947
964
|
return (Math.max(r, Math.min(u, a)) - r) / o * s;
|
|
948
965
|
}
|
|
949
|
-
function
|
|
966
|
+
function un(t, e) {
|
|
950
967
|
return t.startDate < e.endDate && t.endDate > e.startDate;
|
|
951
968
|
}
|
|
952
|
-
function
|
|
969
|
+
function cn(t) {
|
|
953
970
|
if (t.length === 0) return [];
|
|
954
971
|
const e = [...t].sort((o, s) => o.startDate.getTime() - s.startDate.getTime()), n = [];
|
|
955
972
|
let r = [], a = 0;
|
|
@@ -957,7 +974,7 @@ function sn(t) {
|
|
|
957
974
|
r.length === 0 || o.startDate.getTime() < a ? (r.push(o), a = Math.max(a, o.endDate.getTime())) : (r.length > 0 && n.push(r), r = [o], a = o.endDate.getTime());
|
|
958
975
|
return r.length > 0 && n.push(r), n;
|
|
959
976
|
}
|
|
960
|
-
function
|
|
977
|
+
function ln(t, e, n) {
|
|
961
978
|
const r = Math.max(0, Math.min(t, e)), a = Math.min(n, Math.max(t, e));
|
|
962
979
|
return {
|
|
963
980
|
top: r,
|
|
@@ -965,142 +982,144 @@ function un(t, e, n) {
|
|
|
965
982
|
};
|
|
966
983
|
}
|
|
967
984
|
export {
|
|
968
|
-
|
|
985
|
+
de as $,
|
|
969
986
|
U as A,
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
987
|
+
fe as B,
|
|
988
|
+
kt as C,
|
|
989
|
+
Ct as D,
|
|
990
|
+
_t as E,
|
|
991
|
+
le as F,
|
|
975
992
|
Y as G,
|
|
976
|
-
|
|
977
|
-
|
|
993
|
+
Ot as H,
|
|
994
|
+
ce as I,
|
|
978
995
|
mt as J,
|
|
979
|
-
|
|
996
|
+
me as K,
|
|
980
997
|
p as L,
|
|
981
|
-
|
|
982
|
-
|
|
998
|
+
Lt as M,
|
|
999
|
+
S as N,
|
|
983
1000
|
T as O,
|
|
984
|
-
|
|
1001
|
+
at as P,
|
|
985
1002
|
dt as Q,
|
|
986
1003
|
v as R,
|
|
987
|
-
|
|
1004
|
+
un as S,
|
|
988
1005
|
Dt as T,
|
|
989
1006
|
ht as U,
|
|
990
1007
|
yt as V,
|
|
991
1008
|
pt as W,
|
|
992
1009
|
wt as X,
|
|
993
1010
|
O as Y,
|
|
994
|
-
|
|
995
|
-
|
|
1011
|
+
Ke as Z,
|
|
1012
|
+
Be as _,
|
|
996
1013
|
A as a,
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1014
|
+
Pt as a$,
|
|
1015
|
+
Ne as a0,
|
|
1016
|
+
pe as a1,
|
|
1000
1017
|
I as a2,
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1018
|
+
Ze as a3,
|
|
1019
|
+
Je as a4,
|
|
1020
|
+
Te as a5,
|
|
1021
|
+
Qe as a6,
|
|
1022
|
+
Xe as a7,
|
|
1023
|
+
qe as a8,
|
|
1024
|
+
Oe as a9,
|
|
1025
|
+
ae as aA,
|
|
1026
|
+
se as aB,
|
|
1010
1027
|
$ as aC,
|
|
1011
|
-
|
|
1012
|
-
|
|
1028
|
+
Le as aD,
|
|
1029
|
+
C as aE,
|
|
1013
1030
|
w as aF,
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1031
|
+
L as aG,
|
|
1032
|
+
Xt as aH,
|
|
1033
|
+
te as aI,
|
|
1017
1034
|
j as aJ,
|
|
1018
1035
|
J as aK,
|
|
1019
1036
|
Se as aL,
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1037
|
+
ie as aM,
|
|
1038
|
+
ue as aN,
|
|
1039
|
+
Ge as aO,
|
|
1040
|
+
ze as aP,
|
|
1041
|
+
je as aQ,
|
|
1042
|
+
Pe as aR,
|
|
1043
|
+
ge as aS,
|
|
1044
|
+
H as aT,
|
|
1045
|
+
it as aU,
|
|
1046
|
+
Kt as aV,
|
|
1047
|
+
ft as aW,
|
|
1048
|
+
lt as aX,
|
|
1049
|
+
Ue as aY,
|
|
1050
|
+
ut as aZ,
|
|
1051
|
+
ct as a_,
|
|
1052
|
+
zt as aa,
|
|
1053
|
+
Qt as ab,
|
|
1054
|
+
re as ac,
|
|
1055
|
+
Ye as ad,
|
|
1039
1056
|
We as ae,
|
|
1040
|
-
|
|
1057
|
+
en as af,
|
|
1041
1058
|
Re as ag,
|
|
1042
1059
|
Ee as ah,
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1060
|
+
ye as ai,
|
|
1061
|
+
ve as aj,
|
|
1062
|
+
cn as ak,
|
|
1063
|
+
tn as al,
|
|
1064
|
+
Ae as am,
|
|
1048
1065
|
Tt as an,
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1066
|
+
nn as ao,
|
|
1067
|
+
he as ap,
|
|
1068
|
+
we as aq,
|
|
1069
|
+
Jt as ar,
|
|
1070
|
+
rn as as,
|
|
1071
|
+
De as at,
|
|
1072
|
+
Me as au,
|
|
1073
|
+
Ie as av,
|
|
1074
|
+
Ce as aw,
|
|
1075
|
+
_e as ax,
|
|
1059
1076
|
Fe as ay,
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1077
|
+
oe as az,
|
|
1078
|
+
Ut as b,
|
|
1079
|
+
be as b0,
|
|
1080
|
+
ne as b1,
|
|
1081
|
+
Ve as b2,
|
|
1082
|
+
$e as b3,
|
|
1083
|
+
xe as b4,
|
|
1084
|
+
ke as b5,
|
|
1085
|
+
d as b6,
|
|
1086
|
+
E as b7,
|
|
1087
|
+
m as b8,
|
|
1088
|
+
X as b9,
|
|
1089
|
+
Gt as ba,
|
|
1090
|
+
qt as bb,
|
|
1091
|
+
jt as bc,
|
|
1092
|
+
Zt as bd,
|
|
1093
|
+
sn as be,
|
|
1094
|
+
on as bf,
|
|
1095
|
+
At as bg,
|
|
1096
|
+
St as bh,
|
|
1097
|
+
Mt as bi,
|
|
1098
|
+
It as bj,
|
|
1099
|
+
Ht as bk,
|
|
1100
|
+
x as c,
|
|
1101
|
+
xt as d,
|
|
1102
|
+
Nt as e,
|
|
1103
|
+
Yt as f,
|
|
1104
|
+
Ft as g,
|
|
1105
|
+
$t as h,
|
|
1106
|
+
Rt as i,
|
|
1107
|
+
vt as j,
|
|
1108
|
+
rt as k,
|
|
1109
|
+
Wt as l,
|
|
1110
|
+
nt as m,
|
|
1111
|
+
et as n,
|
|
1093
1112
|
i as o,
|
|
1094
1113
|
gt as p,
|
|
1095
|
-
|
|
1096
|
-
|
|
1114
|
+
ee as q,
|
|
1115
|
+
_ as r,
|
|
1097
1116
|
k as s,
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1117
|
+
W as t,
|
|
1118
|
+
He as u,
|
|
1119
|
+
bt as v,
|
|
1120
|
+
an as w,
|
|
1121
|
+
ln as x,
|
|
1122
|
+
Vt as y,
|
|
1123
|
+
Bt as z
|
|
1105
1124
|
};
|
|
1106
|
-
//# sourceMappingURL=position-utils-
|
|
1125
|
+
//# sourceMappingURL=position-utils-BH6T1FL5.js.map
|