@innosolutions/inno-calendar 1.0.65 → 1.0.68

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.
Files changed (56) hide show
  1. package/AGENT.md +1783 -1783
  2. package/README.md +305 -305
  3. package/dist/agenda-widget-DyPlCQHM.cjs +2 -0
  4. package/dist/agenda-widget-DyPlCQHM.cjs.map +1 -0
  5. package/dist/{agenda-widget-CD_UoYWC.js → agenda-widget-nh_h1yy6.js} +970 -961
  6. package/dist/agenda-widget-nh_h1yy6.js.map +1 -0
  7. package/dist/components/index.cjs +1 -1
  8. package/dist/components/index.mjs +2 -2
  9. package/dist/components/views/timeline-view.d.ts.map +1 -1
  10. package/dist/core/context/inno-calendar-provider.d.ts.map +1 -1
  11. package/dist/core/index.cjs +1 -1
  12. package/dist/core/index.mjs +147 -145
  13. package/dist/core/utils/view-storage.d.ts +21 -0
  14. package/dist/core/utils/view-storage.d.ts.map +1 -1
  15. package/dist/index.cjs +1 -1
  16. package/dist/index.mjs +196 -194
  17. package/dist/{position-utils-DpaKqYhO.js → position-utils-BzmOPdvQ.js} +294 -276
  18. package/dist/position-utils-BzmOPdvQ.js.map +1 -0
  19. package/dist/position-utils-EQTCC4tZ.cjs +2 -0
  20. package/dist/position-utils-EQTCC4tZ.cjs.map +1 -0
  21. package/dist/presets/index.cjs +1 -1
  22. package/dist/presets/index.mjs +1 -1
  23. package/dist/{slot-selection-context-D3MW4WJ7.js → slot-selection-context-CjS_VIPj.js} +72 -73
  24. package/dist/slot-selection-context-CjS_VIPj.js.map +1 -0
  25. package/dist/slot-selection-context-CmE-aWgt.cjs +2 -0
  26. package/dist/slot-selection-context-CmE-aWgt.cjs.map +1 -0
  27. package/dist/{tailwind-calendar-CzbuXRmn.js → tailwind-calendar-B6qsueM3.js} +15 -15
  28. package/dist/{tailwind-calendar-CzbuXRmn.js.map → tailwind-calendar-B6qsueM3.js.map} +1 -1
  29. package/dist/{tailwind-calendar-smlkVdSq.cjs → tailwind-calendar-KJ1XJ4gr.cjs} +2 -2
  30. package/dist/{tailwind-calendar-smlkVdSq.cjs.map → tailwind-calendar-KJ1XJ4gr.cjs.map} +1 -1
  31. package/dist/{use-calendar-mU1joTwp.js → use-calendar--JnbGA3L.js} +23 -23
  32. package/dist/{use-calendar-mU1joTwp.js.map → use-calendar--JnbGA3L.js.map} +1 -1
  33. package/dist/{use-calendar-Bd-d8oGj.cjs → use-calendar-BwqE_WNA.cjs} +2 -2
  34. package/dist/{use-calendar-Bd-d8oGj.cjs.map → use-calendar-BwqE_WNA.cjs.map} +1 -1
  35. package/dist/{use-slot-selection-CauKdLYv.js → use-slot-selection-BLCDzQzo.js} +8 -8
  36. package/dist/{use-slot-selection-CauKdLYv.js.map → use-slot-selection-BLCDzQzo.js.map} +1 -1
  37. package/dist/{use-slot-selection-CCOSsRSh.cjs → use-slot-selection-C1tk-o0j.cjs} +2 -2
  38. package/dist/{use-slot-selection-CCOSsRSh.cjs.map → use-slot-selection-C1tk-o0j.cjs.map} +1 -1
  39. package/dist/utils.cjs +1 -1
  40. package/dist/utils.mjs +52 -50
  41. package/dist/{week-view-BQXIaSUZ.js → week-view-B1KsZsC3.js} +3 -3
  42. package/dist/week-view-B1KsZsC3.js.map +1 -0
  43. package/dist/{week-view-xrKlAJos.cjs → week-view-Dv-Uz0eT.cjs} +2 -2
  44. package/dist/week-view-Dv-Uz0eT.cjs.map +1 -0
  45. package/package.json +138 -138
  46. package/dist/agenda-widget-CD_UoYWC.js.map +0 -1
  47. package/dist/agenda-widget-COxgmpv4.cjs +0 -2
  48. package/dist/agenda-widget-COxgmpv4.cjs.map +0 -1
  49. package/dist/position-utils-Do2ciBXl.cjs +0 -2
  50. package/dist/position-utils-Do2ciBXl.cjs.map +0 -1
  51. package/dist/position-utils-DpaKqYhO.js.map +0 -1
  52. package/dist/slot-selection-context-BlrL9b5P.cjs +0 -2
  53. package/dist/slot-selection-context-BlrL9b5P.cjs.map +0 -1
  54. package/dist/slot-selection-context-D3MW4WJ7.js.map +0 -1
  55. package/dist/week-view-BQXIaSUZ.js.map +0 -1
  56. package/dist/week-view-xrKlAJos.cjs.map +0 -1
@@ -1,4 +1,5 @@
1
1
  import { isValidElement as q } from "react";
2
+ const Q = "inno-calendar-preferences";
2
3
  function I(t) {
3
4
  if (t == null || typeof t == "boolean") return "";
4
5
  if (typeof t == "string") return t;
@@ -10,80 +11,94 @@ function I(t) {
10
11
  }
11
12
  return "";
12
13
  }
13
- const $ = "inno-calendar-view", _ = "inno-calendar-resource-view", Q = [
14
+ const A = "inno-calendar-view", O = "inno-calendar-resource-view", Z = [
14
15
  "day",
15
16
  "week",
16
17
  "month",
17
18
  "year",
18
19
  "agenda"
19
- ], Z = [
20
+ ], tt = [
20
21
  "timeline-day",
21
22
  "timeline-3day",
22
23
  "timeline-week",
23
24
  "resource-day",
24
25
  "resource-week"
25
26
  ];
26
- function R(t) {
27
- return typeof t == "string" && Q.includes(t);
28
- }
29
- function A(t) {
27
+ function F(t) {
30
28
  return typeof t == "string" && Z.includes(t);
31
29
  }
32
- function O() {
30
+ function x(t) {
31
+ return typeof t == "string" && tt.includes(t);
32
+ }
33
+ function C() {
33
34
  return typeof window < "u" && typeof window.localStorage < "u";
34
35
  }
35
- function B(t) {
36
- if (!O()) return null;
36
+ function N(t) {
37
+ if (!C()) return null;
37
38
  try {
38
39
  return window.localStorage.getItem(t);
39
40
  } catch {
40
41
  return console.warn(`[InnoCalendar] Failed to read "${t}" from localStorage`), null;
41
42
  }
42
43
  }
43
- function N(t, e) {
44
- if (O())
44
+ function B(t, e) {
45
+ if (C())
45
46
  try {
46
47
  window.localStorage.setItem(t, e);
47
48
  } catch {
48
49
  console.warn(`[InnoCalendar] Failed to write "${t}" to localStorage`);
49
50
  }
50
51
  }
51
- function G(t) {
52
- if (O())
52
+ function P(t) {
53
+ if (C())
53
54
  try {
54
55
  window.localStorage.removeItem(t);
55
56
  } catch {
56
57
  console.warn(`[InnoCalendar] Failed to remove "${t}" from localStorage`);
57
58
  }
58
59
  }
59
- function tt(t, e = $) {
60
- R(t) && N(e, t);
60
+ function et(t, e = A) {
61
+ F(t) && B(e, t);
61
62
  }
62
- function ht(t = $) {
63
- const e = B(t);
64
- return R(e) ? e : null;
63
+ function nt(t = A) {
64
+ const e = N(t);
65
+ return F(e) ? e : null;
65
66
  }
66
- function yt(t = $) {
67
- G(t);
67
+ function Tt(t = A) {
68
+ P(t);
68
69
  }
69
- function et(t, e = _) {
70
- A(t) && N(e, t);
70
+ function rt(t, e = O) {
71
+ x(t) && B(e, t);
71
72
  }
72
- function pt(t = _) {
73
- const e = B(t);
74
- return A(e) ? e : null;
73
+ function at(t = O) {
74
+ const e = N(t);
75
+ return x(e) ? e : null;
75
76
  }
76
- function wt(t = _) {
77
- G(t);
77
+ function Et(t = O) {
78
+ P(t);
78
79
  }
79
- function Tt(t) {
80
- if (R(t)) {
81
- tt(t);
80
+ function St(t) {
81
+ if (F(t)) {
82
+ et(t);
82
83
  return;
83
84
  }
84
- A(t) && et(t);
85
+ x(t) && rt(t);
86
+ }
87
+ function ot() {
88
+ if (!C()) return null;
89
+ try {
90
+ const t = window.localStorage.getItem(Q);
91
+ if (!t) return null;
92
+ const n = JSON.parse(t)?.view;
93
+ return F(n) || x(n) ? n : null;
94
+ } catch {
95
+ return null;
96
+ }
85
97
  }
86
- const Et = [
98
+ function Mt() {
99
+ return nt() ?? at() ?? ot();
100
+ }
101
+ const bt = [
87
102
  "day",
88
103
  "week",
89
104
  "month",
@@ -93,7 +108,7 @@ const Et = [
93
108
  "resource-week",
94
109
  "timeline-day",
95
110
  "timeline-week"
96
- ], St = {
111
+ ], Ht = {
97
112
  startHour: 8,
98
113
  endHour: 18,
99
114
  firstDayOfWeek: 1,
@@ -103,13 +118,13 @@ const Et = [
103
118
  timeFormat: "24h",
104
119
  badgeVariant: "colored",
105
120
  showCanceledEvents: !1
106
- }, Mt = {
121
+ }, It = {
107
122
  startHour: 0,
108
123
  endHour: 24
109
- }, bt = {
124
+ }, kt = {
110
125
  startHour: 8,
111
126
  endHour: 18
112
- }, Ht = {
127
+ }, Ft = {
113
128
  day: {
114
129
  type: "day",
115
130
  slotMinTime: "00:00",
@@ -170,7 +185,7 @@ const Et = [
170
185
  type: "timeline-week",
171
186
  slotDuration: "01:00:00"
172
187
  }
173
- }, It = {
188
+ }, xt = {
174
189
  blue: "#3b82f6",
175
190
  green: "#22c55e",
176
191
  red: "#ef4444",
@@ -181,7 +196,7 @@ const Et = [
181
196
  teal: "#14b8a6",
182
197
  gray: "#6b7280",
183
198
  indigo: "#6366f1"
184
- }, kt = {
199
+ }, Ct = {
185
200
  blue: { bg: "bg-blue-100", text: "text-blue-800", border: "border-blue-300" },
186
201
  green: { bg: "bg-green-100", text: "text-green-800", border: "border-green-300" },
187
202
  red: { bg: "bg-red-100", text: "text-red-800", border: "border-red-300" },
@@ -192,7 +207,7 @@ const Et = [
192
207
  teal: { bg: "bg-teal-100", text: "text-teal-800", border: "border-teal-300" },
193
208
  gray: { bg: "bg-gray-100", text: "text-gray-800", border: "border-gray-300" },
194
209
  indigo: { bg: "bg-indigo-100", text: "text-indigo-800", border: "border-indigo-300" }
195
- }, Ft = {
210
+ }, Rt = {
196
211
  "#3b82f6": "blue",
197
212
  "#22c55e": "green",
198
213
  "#ef4444": "red",
@@ -203,7 +218,7 @@ const Et = [
203
218
  "#14b8a6": "teal",
204
219
  "#6b7280": "gray",
205
220
  "#6366f1": "indigo"
206
- }, xt = 24, Ct = 60, nt = 60 * 1e3, rt = 60 * nt, $t = 24 * rt, F = 64, _t = 32, Rt = 56, At = 200, at = 20;
221
+ }, _t = 24, $t = 60, st = 60 * 1e3, ut = 60 * st, At = 24 * ut, R = 64, Ot = 32, Wt = 56, vt = 200, it = 20;
207
222
  function g(t) {
208
223
  const e = new Date(t);
209
224
  return e.setHours(0, 0, 0, 0), e;
@@ -216,16 +231,16 @@ function l(t, e) {
216
231
  const n = new Date(t);
217
232
  return n.setDate(n.getDate() + e), n;
218
233
  }
219
- function Ot(t, e) {
234
+ function Ut(t, e) {
220
235
  return l(t, -e);
221
236
  }
222
237
  function p(t, e) {
223
238
  return t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth() && t.getDate() === e.getDate();
224
239
  }
225
- function P(t) {
240
+ function G(t) {
226
241
  return p(t, /* @__PURE__ */ new Date());
227
242
  }
228
- function Wt(t) {
243
+ function Vt(t) {
229
244
  return t.getDay();
230
245
  }
231
246
  function K(t) {
@@ -243,16 +258,16 @@ function T(t, e = 1) {
243
258
  function k(t, e) {
244
259
  return l(t, e * 7);
245
260
  }
246
- function Ut(t, e) {
261
+ function Yt(t, e) {
247
262
  return l(t, -e * 7);
248
263
  }
249
- function vt(t) {
264
+ function Lt(t) {
250
265
  const e = new Date(Date.UTC(t.getFullYear(), t.getMonth(), t.getDate())), n = e.getUTCDay() || 7;
251
266
  e.setUTCDate(e.getUTCDate() + 4 - n);
252
267
  const r = new Date(Date.UTC(e.getUTCFullYear(), 0, 1));
253
268
  return Math.ceil(((e.getTime() - r.getTime()) / 864e5 + 1) / 7);
254
269
  }
255
- function Yt(t, e, n = 1) {
270
+ function Nt(t, e, n = 1) {
256
271
  const r = m(t, n), a = m(e, n);
257
272
  return p(r, a);
258
273
  }
@@ -264,14 +279,14 @@ function M(t) {
264
279
  const e = new Date(t.getFullYear(), t.getMonth() + 1, 0);
265
280
  return e.setHours(23, 59, 59, 999), e;
266
281
  }
267
- function x(t, e) {
282
+ function _(t, e) {
268
283
  const n = new Date(t);
269
284
  return n.setMonth(n.getMonth() + e), n;
270
285
  }
271
- function Vt(t, e) {
272
- return x(t, -e);
286
+ function Bt(t, e) {
287
+ return _(t, -e);
273
288
  }
274
- function Lt(t) {
289
+ function Pt(t) {
275
290
  return new Date(t.getFullYear(), t.getMonth() + 1, 0).getDate();
276
291
  }
277
292
  function W(t, e) {
@@ -280,64 +295,64 @@ function W(t, e) {
280
295
  function z(t) {
281
296
  return new Date(t.getFullYear(), 0, 1, 0, 0, 0, 0);
282
297
  }
283
- function ot(t) {
298
+ function ct(t) {
284
299
  return new Date(t.getFullYear(), 11, 31, 23, 59, 59, 999);
285
300
  }
286
- function U(t, e) {
301
+ function v(t, e) {
287
302
  const n = new Date(t);
288
303
  return n.setFullYear(n.getFullYear() + e), n;
289
304
  }
290
- function Bt(t, e) {
291
- return U(t, -e);
305
+ function Gt(t, e) {
306
+ return v(t, -e);
292
307
  }
293
- function Nt(t, e) {
308
+ function Kt(t, e) {
294
309
  return t.getFullYear() === e.getFullYear();
295
310
  }
296
- function st(t, e) {
311
+ function lt(t, e) {
297
312
  const n = new Date(t);
298
313
  return n.setHours(n.getHours() + e), n;
299
314
  }
300
- function Gt(t, e) {
315
+ function zt(t, e) {
301
316
  const n = new Date(t);
302
317
  return n.setMinutes(n.getMinutes() + e), n;
303
318
  }
304
- function Pt(t, e, n = 0, r = 0) {
319
+ function Jt(t, e, n = 0, r = 0) {
305
320
  const a = new Date(t);
306
321
  return a.setHours(e, n, r, 0), a;
307
322
  }
308
- function Kt(t) {
323
+ function jt(t) {
309
324
  return t.getHours() + t.getMinutes() / 60;
310
325
  }
311
- function zt(t, e) {
326
+ function Xt(t, e) {
312
327
  return t.getTime() < e.getTime();
313
328
  }
314
- function jt(t, e) {
329
+ function qt(t, e) {
315
330
  return t.getTime() > e.getTime();
316
331
  }
317
- function Jt(t, e, n) {
332
+ function Qt(t, e, n) {
318
333
  const r = t.getTime();
319
334
  return r >= e.getTime() && r <= n.getTime();
320
335
  }
321
- function Xt(t) {
336
+ function Zt(t) {
322
337
  if (t.length !== 0)
323
338
  return t.reduce((e, n) => n < e ? n : e);
324
339
  }
325
- function qt(t) {
340
+ function te(t) {
326
341
  if (t.length !== 0)
327
342
  return t.reduce((e, n) => n > e ? n : e);
328
343
  }
329
- function v(t, e) {
344
+ function U(t, e) {
330
345
  return t.getTime() - e.getTime();
331
346
  }
332
- function Qt(t, e) {
333
- return Math.floor(v(t, e) / 6e4);
347
+ function ee(t, e) {
348
+ return Math.floor(U(t, e) / 6e4);
334
349
  }
335
- function Zt(t, e) {
336
- return Math.floor(v(t, e) / 36e5);
350
+ function ne(t, e) {
351
+ return Math.floor(U(t, e) / 36e5);
337
352
  }
338
- function te(t, e) {
353
+ function re(t, e) {
339
354
  const n = g(t), r = g(e);
340
- return Math.floor(v(n, r) / 864e5);
355
+ return Math.floor(U(n, r) / 864e5);
341
356
  }
342
357
  function H(t, e = "24h") {
343
358
  const n = t.getHours(), r = t.getMinutes();
@@ -347,14 +362,14 @@ function H(t, e = "24h") {
347
362
  }
348
363
  return `${n.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}`;
349
364
  }
350
- function ee(t) {
365
+ function ae(t) {
351
366
  const e = t.getFullYear(), n = (t.getMonth() + 1).toString().padStart(2, "0"), r = t.getDate().toString().padStart(2, "0");
352
367
  return `${e}-${n}-${r}`;
353
368
  }
354
- function ne(t) {
369
+ function oe(t) {
355
370
  return new Date(t);
356
371
  }
357
- function ut(t, e) {
372
+ function ft(t, e) {
358
373
  const n = [];
359
374
  let r = g(t);
360
375
  const a = g(e);
@@ -362,101 +377,101 @@ function ut(t, e) {
362
377
  n.push(new Date(r)), r = l(r, 1);
363
378
  return n;
364
379
  }
365
- function re(t, e) {
380
+ function se(t, e) {
366
381
  const n = [];
367
382
  let r = new Date(t);
368
383
  for (; r <= e; )
369
- n.push(new Date(r)), r = st(r, 1);
384
+ n.push(new Date(r)), r = lt(r, 1);
370
385
  return n;
371
386
  }
372
- function ae(t = "en-US", e = "short") {
387
+ function ue(t = "en-US", e = "short") {
373
388
  const n = new Intl.DateTimeFormat(t, { weekday: e }), r = [], a = new Date(2024, 0, 7);
374
389
  for (let o = 0; o < 7; o++)
375
390
  r.push(n.format(l(a, o)));
376
391
  return r;
377
392
  }
378
- function oe(t = "en-US", e = "long") {
393
+ function ie(t = "en-US", e = "long") {
379
394
  const n = new Intl.DateTimeFormat(t, { month: e }), r = [];
380
395
  for (let a = 0; a < 12; a++)
381
396
  r.push(n.format(new Date(2024, a, 1)));
382
397
  return r;
383
398
  }
384
- function se(t) {
399
+ function ce(t) {
385
400
  const e = [];
386
401
  for (let n = t.startHour; n <= t.endHour; n++)
387
402
  e.push(n);
388
403
  return e;
389
404
  }
390
- function ue(t, e = "24h") {
405
+ function le(t, e = "24h") {
391
406
  if (e === "12h") {
392
407
  const n = t >= 12 ? "PM" : "AM";
393
408
  return `${t % 12 || 12} ${n}`;
394
409
  }
395
410
  return `${String(t).padStart(2, "0")}:00`;
396
411
  }
397
- function ie(t, e = 1) {
412
+ function fe(t, e = 1) {
398
413
  const n = m(t, e), r = [];
399
414
  for (let a = 0; a < 7; a++)
400
415
  r.push(l(n, a));
401
416
  return r;
402
417
  }
403
- function ce(t, e = 1) {
418
+ function de(t, e = 1) {
404
419
  const n = S(t), r = M(t), a = m(n, e), o = T(r, e), s = t.getMonth();
405
- return ut(a, o).map((c) => ({
420
+ return ft(a, o).map((c) => ({
406
421
  date: c,
407
422
  isCurrentMonth: c.getMonth() === s,
408
423
  isWeekend: c.getDay() === 0 || c.getDay() === 6
409
424
  }));
410
425
  }
411
- function Y(t) {
426
+ function V(t) {
412
427
  if (t.isAllDay === !0) return !0;
413
428
  if (t.isAllDay === !1) return !1;
414
429
  const e = t.startDate.getHours(), n = t.startDate.getMinutes(), r = t.endDate.getHours(), a = t.endDate.getMinutes(), o = e === 0 && n === 0, s = r === 0 && a === 0 || // midnight next day
415
430
  r === 23 && a >= 59;
416
431
  return !!(o && s);
417
432
  }
418
- function le(t) {
433
+ function ge(t) {
419
434
  const e = [], n = [];
420
435
  for (const r of t)
421
- Y(r) ? n.push(r) : p(r.startDate, r.endDate) ? e.push(r) : n.push(r);
436
+ V(r) ? n.push(r) : p(r.startDate, r.endDate) ? e.push(r) : n.push(r);
422
437
  return { singleDay: e, multiDay: n };
423
438
  }
424
- function fe(t, e, n) {
439
+ function me(t, e, n) {
425
440
  return t.filter((r) => r.startDate <= n && r.endDate >= e);
426
441
  }
427
- function de(t, e, n) {
442
+ function De(t, e, n) {
428
443
  if (!n) return !0;
429
444
  const r = t.getDay(), a = n[r];
430
445
  return !a || !(a.enabled !== !1) || a.from === a.to ? !1 : e >= a.from && e < a.to;
431
446
  }
432
- function ge(t, e) {
447
+ function he(t, e) {
433
448
  const n = t.getDay(), r = e[n];
434
449
  return !r || !(r.enabled !== !1) || r.from === r.to ? null : { from: r.from, to: r.to };
435
450
  }
436
- function me(t) {
451
+ function ye(t) {
437
452
  const e = [];
438
453
  for (let n = 0; n < 12; n++)
439
454
  e.push(new Date(t, n, 1));
440
455
  return e;
441
456
  }
442
- function it(t, e, n) {
457
+ function dt(t, e, n) {
443
458
  const r = g(e), a = w(n);
444
459
  return t.filter((o) => {
445
460
  const s = o.startDate, u = o.endDate;
446
461
  return s <= a && u >= r;
447
462
  });
448
463
  }
449
- function ct(t, e) {
464
+ function gt(t, e) {
450
465
  return e.length === 0 ? t : t.filter(
451
466
  (n) => n.scheduleTypeId !== void 0 && e.includes(n.scheduleTypeId)
452
467
  );
453
468
  }
454
- function lt(t, e) {
469
+ function mt(t, e) {
455
470
  return e.length === 0 ? t : t.filter(
456
471
  (n) => n.resourceId !== void 0 && e.includes(n.resourceId)
457
472
  );
458
473
  }
459
- function ft(t, e) {
474
+ function Dt(t, e) {
460
475
  if (!e.trim()) return t;
461
476
  const n = e.toLowerCase();
462
477
  return t.filter((r) => {
@@ -464,30 +479,30 @@ function ft(t, e) {
464
479
  return a || o;
465
480
  });
466
481
  }
467
- function dt(t) {
482
+ function ht(t) {
468
483
  return t.filter((e) => !e.isCanceled);
469
484
  }
470
- function De(t, e) {
485
+ function pe(t, e) {
471
486
  let n = [...t];
472
- return e.dateRange && (n = it(
487
+ return e.dateRange && (n = dt(
473
488
  n,
474
489
  e.dateRange.startDate,
475
490
  e.dateRange.endDate
476
- )), e.scheduleTypeIds && e.scheduleTypeIds.length > 0 && (n = ct(n, e.scheduleTypeIds)), e.resourceIds && e.resourceIds.length > 0 && (n = lt(n, e.resourceIds)), e.search && (n = ft(n, e.search)), e.showCanceled || (n = dt(n)), n;
491
+ )), e.scheduleTypeIds && e.scheduleTypeIds.length > 0 && (n = gt(n, e.scheduleTypeIds)), e.resourceIds && e.resourceIds.length > 0 && (n = mt(n, e.resourceIds)), e.search && (n = Dt(n, e.search)), e.showCanceled || (n = ht(n)), n;
477
492
  }
478
- function he(t) {
493
+ function we(t) {
479
494
  return [...t].sort((e, n) => e.startDate.getTime() - n.startDate.getTime());
480
495
  }
481
- function ye(t) {
496
+ function Te(t) {
482
497
  return [...t].sort((e, n) => e.endDate.getTime() - n.endDate.getTime());
483
498
  }
484
- function pe(t) {
499
+ function Ee(t) {
485
500
  return [...t].sort((e, n) => {
486
501
  const r = e.endDate.getTime() - e.startDate.getTime();
487
502
  return n.endDate.getTime() - n.startDate.getTime() - r;
488
503
  });
489
504
  }
490
- function we(t) {
505
+ function Se(t) {
491
506
  const e = /* @__PURE__ */ new Map();
492
507
  for (const n of t) {
493
508
  const r = g(n.startDate).toISOString(), a = e.get(r) ?? [];
@@ -495,7 +510,7 @@ function we(t) {
495
510
  }
496
511
  return e;
497
512
  }
498
- function Te(t) {
513
+ function Me(t) {
499
514
  const e = /* @__PURE__ */ new Map();
500
515
  for (const n of t) {
501
516
  const r = e.get(n.scheduleTypeId) ?? [];
@@ -503,7 +518,7 @@ function Te(t) {
503
518
  }
504
519
  return e;
505
520
  }
506
- function Ee(t) {
521
+ function be(t) {
507
522
  const e = /* @__PURE__ */ new Map();
508
523
  for (const n of t) {
509
524
  const r = e.get(n.resourceId) ?? [];
@@ -511,31 +526,31 @@ function Ee(t) {
511
526
  }
512
527
  return e;
513
528
  }
514
- function Se(t, e) {
529
+ function He(t, e) {
515
530
  return t.filter((n) => {
516
531
  const r = g(e), a = w(e);
517
532
  return n.startDate <= a && n.endDate >= r;
518
533
  });
519
534
  }
520
- function Me(t) {
535
+ function Ie(t) {
521
536
  return t.filter((e) => e.isAllDay);
522
537
  }
523
- function be(t) {
538
+ function ke(t) {
524
539
  return t.filter((e) => !e.isAllDay);
525
540
  }
526
- function He(t) {
541
+ function Fe(t) {
527
542
  return t.filter((e) => e.isMultiDay ? !0 : !p(e.startDate, e.endDate));
528
543
  }
529
- function Ie(t) {
544
+ function xe(t) {
530
545
  return t.isMultiDay ? !0 : !p(t.startDate, t.endDate);
531
546
  }
532
- function ke(t) {
547
+ function Ce(t) {
533
548
  return Math.floor((t.endDate.getTime() - t.startDate.getTime()) / 6e4);
534
549
  }
535
- function Fe(t, e = "blue") {
550
+ function Re(t, e = "blue") {
536
551
  return t.color ?? e;
537
552
  }
538
- function xe(t, e, n = "blue") {
553
+ function _e(t, e, n = "blue") {
539
554
  if (t.color) return t.color;
540
555
  if (t.scheduleTypeId !== void 0 && e) {
541
556
  const r = e.get(t.scheduleTypeId);
@@ -543,8 +558,8 @@ function xe(t, e, n = "blue") {
543
558
  }
544
559
  return n;
545
560
  }
546
- function Ce(t) {
547
- if (Y(t)) {
561
+ function $e(t) {
562
+ if (V(t)) {
548
563
  if (p(t.startDate, t.endDate))
549
564
  return "All day";
550
565
  const n = t.startDate.toLocaleDateString(void 0, {
@@ -568,10 +583,10 @@ function Ce(t) {
568
583
  }
569
584
  return `${H(t.startDate)} - ${H(t.endDate)}`;
570
585
  }
571
- function $e(t) {
572
- return !Y(t);
586
+ function Ae(t) {
587
+ return !V(t);
573
588
  }
574
- function gt(t, e, n = 1) {
589
+ function yt(t, e, n = 1) {
575
590
  switch (e) {
576
591
  case "day":
577
592
  case "resource-day":
@@ -602,7 +617,7 @@ function gt(t, e, n = 1) {
602
617
  case "year":
603
618
  return {
604
619
  startDate: z(t),
605
- endDate: ot(t)
620
+ endDate: ct(t)
606
621
  };
607
622
  case "agenda":
608
623
  return {
@@ -616,7 +631,7 @@ function gt(t, e, n = 1) {
616
631
  };
617
632
  }
618
633
  }
619
- function _e(t, e) {
634
+ function Oe(t, e) {
620
635
  switch (e) {
621
636
  case "day":
622
637
  case "resource-day":
@@ -629,16 +644,16 @@ function _e(t, e) {
629
644
  case "timeline-week":
630
645
  return k(t, 1);
631
646
  case "month":
632
- return x(t, 1);
647
+ return _(t, 1);
633
648
  case "year":
634
- return U(t, 1);
649
+ return v(t, 1);
635
650
  case "agenda":
636
651
  return k(t, 1);
637
652
  default:
638
653
  return l(t, 1);
639
654
  }
640
655
  }
641
- function Re(t, e) {
656
+ function We(t, e) {
642
657
  switch (e) {
643
658
  case "day":
644
659
  case "resource-day":
@@ -651,38 +666,38 @@ function Re(t, e) {
651
666
  case "timeline-week":
652
667
  return k(t, -1);
653
668
  case "month":
654
- return x(t, -1);
669
+ return _(t, -1);
655
670
  case "year":
656
- return U(t, -1);
671
+ return v(t, -1);
657
672
  case "agenda":
658
673
  return k(t, -1);
659
674
  default:
660
675
  return l(t, -1);
661
676
  }
662
677
  }
663
- function Ae() {
678
+ function ve() {
664
679
  return g(/* @__PURE__ */ new Date());
665
680
  }
666
- function Oe(t, e = 1) {
681
+ function Ue(t, e = 1) {
667
682
  const n = S(t), r = M(t), a = m(n, e), o = T(r, e), s = [];
668
683
  let u = a;
669
684
  for (; u <= o; )
670
685
  s.push({
671
686
  date: new Date(u),
672
- isToday: P(u),
687
+ isToday: G(u),
673
688
  isCurrentMonth: W(u, t),
674
689
  isWeekend: K(u),
675
690
  dayOfWeek: u.getDay()
676
691
  }), u = l(u, 1);
677
692
  return s;
678
693
  }
679
- function We(t, e = 1) {
694
+ function Ve(t, e = 1) {
680
695
  const n = m(t, e), r = [];
681
696
  for (let a = 0; a < 7; a++) {
682
697
  const o = l(n, a);
683
698
  r.push({
684
699
  date: o,
685
- isToday: P(o),
700
+ isToday: G(o),
686
701
  isCurrentMonth: W(o, t),
687
702
  isWeekend: K(o),
688
703
  dayOfWeek: o.getDay()
@@ -690,10 +705,10 @@ function We(t, e = 1) {
690
705
  }
691
706
  return r;
692
707
  }
693
- function Ue(t) {
708
+ function Ye(t) {
694
709
  const e = z(t), n = [];
695
710
  for (let r = 0; r < 12; r++) {
696
- const a = x(e, r);
711
+ const a = _(e, r);
697
712
  n.push({
698
713
  date: a,
699
714
  isToday: W(a, /* @__PURE__ */ new Date()),
@@ -704,7 +719,7 @@ function Ue(t) {
704
719
  }
705
720
  return n;
706
721
  }
707
- function ve(t, e, n = 30) {
722
+ function Le(t, e, n = 30) {
708
723
  const r = [], a = 60 / n;
709
724
  for (let o = t; o < e; o++)
710
725
  for (let s = 0; s < a; s++) {
@@ -717,7 +732,7 @@ function ve(t, e, n = 30) {
717
732
  }
718
733
  return r;
719
734
  }
720
- function Ye(t, e, n = "24h") {
735
+ function Ne(t, e, n = "24h") {
721
736
  const r = [];
722
737
  for (let a = t; a <= e; a++) {
723
738
  let o;
@@ -730,7 +745,7 @@ function Ye(t, e, n = "24h") {
730
745
  }
731
746
  return r;
732
747
  }
733
- function Ve(t, e, n = "en-US") {
748
+ function Be(t, e, n = "en-US") {
734
749
  const r = new Intl.DateTimeFormat(n, {
735
750
  weekday: "short",
736
751
  month: "short",
@@ -765,11 +780,11 @@ function Ve(t, e, n = "en-US") {
765
780
  return "";
766
781
  }
767
782
  }
768
- function Le(t, e, n, r = 1) {
769
- const a = gt(e, n, r);
783
+ function Pe(t, e, n, r = 1) {
784
+ const a = yt(e, n, r);
770
785
  return t.filter((o) => o.startDate <= a.endDate && o.endDate >= a.startDate).length;
771
786
  }
772
- function Be(t, e, n = "en-US") {
787
+ function Ge(t, e, n = "en-US") {
773
788
  const r = new Intl.DateTimeFormat(n, { month: "long", year: "numeric" }), a = new Intl.DateTimeFormat(n, {
774
789
  weekday: "long",
775
790
  month: "long",
@@ -797,7 +812,7 @@ function Be(t, e, n = "en-US") {
797
812
  return r.format(t);
798
813
  }
799
814
  }
800
- function Ne(t = 1, e = "short", n = "en-US") {
815
+ function Ke(t = 1, e = "short", n = "en-US") {
801
816
  const r = new Intl.DateTimeFormat(n, { weekday: e }), a = [], o = new Date(2024, 0, 7);
802
817
  for (let s = 0; s < 7; s++) {
803
818
  const u = (t + s) % 7, c = l(o, u);
@@ -808,8 +823,8 @@ function Ne(t = 1, e = "short", n = "en-US") {
808
823
  }
809
824
  return a;
810
825
  }
811
- function mt(t, e, n, r = F) {
812
- const { startHour: a, endHour: o } = n, s = o - a, u = s * r, c = t.startDate.getHours() + t.startDate.getMinutes() / 60, i = t.endDate.getHours() + t.endDate.getMinutes() / 60, d = Math.max(c, a), y = Math.min(i, o), D = (d - a) / s * u, h = (y - a) / s * u, f = Math.max(h - D, at);
826
+ function pt(t, e, n, r = R) {
827
+ const { startHour: a, endHour: o } = n, s = o - a, u = s * r, c = t.startDate.getHours() + t.startDate.getMinutes() / 60, i = t.endDate.getHours() + t.endDate.getMinutes() / 60, d = Math.max(c, a), y = Math.min(i, o), D = (d - a) / s * u, h = (y - a) / s * u, f = Math.max(h - D, it);
813
828
  return {
814
829
  top: D,
815
830
  height: f,
@@ -818,7 +833,7 @@ function mt(t, e, n, r = F) {
818
833
  zIndex: 1
819
834
  };
820
835
  }
821
- function Ge(t, e, n, r = F) {
836
+ function ze(t, e, n, r = R) {
822
837
  if (t.length === 0) return [];
823
838
  const a = [...t].sort((i, d) => {
824
839
  const y = i.startDate.getTime() - d.startDate.getTime();
@@ -834,21 +849,21 @@ function Ge(t, e, n, r = F) {
834
849
  for (const i of o) {
835
850
  const d = [];
836
851
  for (const f of i) {
837
- const j = f.startDate.getTime(), J = f.endDate.getTime();
852
+ const J = f.startDate.getTime(), j = f.endDate.getTime();
838
853
  let E = -1;
839
854
  for (let b = 0; b < d.length; b++) {
840
- const C = d[b];
841
- if (!C) continue;
842
- const L = C[C.length - 1];
843
- if (L && L.endTime <= j) {
855
+ const $ = d[b];
856
+ if (!$) continue;
857
+ const L = $[$.length - 1];
858
+ if (L && L.endTime <= J) {
844
859
  E = b;
845
860
  break;
846
861
  }
847
862
  }
848
863
  E === -1 && (E = d.length, d.push([]));
849
- const V = d[E];
850
- V && V.push({ event: f, endTime: J });
851
- const X = mt(f, e, n, r);
864
+ const Y = d[E];
865
+ Y && Y.push({ event: f, endTime: j });
866
+ const X = pt(f, e, n, r);
852
867
  c.push({
853
868
  event: f,
854
869
  position: X,
@@ -862,18 +877,18 @@ function Ge(t, e, n, r = F) {
862
877
  }
863
878
  return c;
864
879
  }
865
- function Pe(t, e, n, r = F, a = 30) {
880
+ function Je(t, e, n, r = R, a = 30) {
866
881
  const { startHour: o, endHour: s } = n, u = s - o, c = u * r, i = t / c * u, y = (o + i) * 60, D = Math.round(y / a) * a, h = new Date(e);
867
882
  return h.setHours(0, 0, 0, 0), h.setMinutes(D), h;
868
883
  }
869
- function Ke(t, e, n = F) {
884
+ function je(t, e, n = R) {
870
885
  const { startHour: r, endHour: a } = e, o = a - r, s = o * n, u = t.getHours() + t.getMinutes() / 60;
871
886
  return (Math.max(r, Math.min(u, a)) - r) / o * s;
872
887
  }
873
- function ze(t, e) {
888
+ function Xe(t, e) {
874
889
  return t.startDate < e.endDate && t.endDate > e.startDate;
875
890
  }
876
- function je(t) {
891
+ function qe(t) {
877
892
  if (t.length === 0) return [];
878
893
  const e = [...t].sort((o, s) => o.startDate.getTime() - s.startDate.getTime()), n = [];
879
894
  let r = [], a = 0;
@@ -881,7 +896,7 @@ function je(t) {
881
896
  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());
882
897
  return r.length > 0 && n.push(r), n;
883
898
  }
884
- function Je(t, e, n) {
899
+ function Qe(t, e, n) {
885
900
  const r = Math.max(0, Math.min(t, e)), a = Math.min(n, Math.max(t, e));
886
901
  return {
887
902
  top: r,
@@ -889,132 +904,135 @@ function Je(t, e, n) {
889
904
  };
890
905
  }
891
906
  export {
892
- Ye as $,
893
- Y as A,
894
- te as B,
895
- Et as C,
896
- bt as D,
897
- It as E,
898
- Zt as F,
899
- v as G,
900
- Ft as H,
901
- Qt as I,
902
- ut as J,
903
- re as K,
907
+ H as $,
908
+ V as A,
909
+ re as B,
910
+ bt as C,
911
+ kt as D,
912
+ xt as E,
913
+ ne as F,
914
+ U as G,
915
+ Rt as H,
916
+ ee as I,
917
+ ft as J,
918
+ se as K,
904
919
  w as L,
905
- Ct as M,
920
+ $t as M,
906
921
  M as N,
907
922
  T as O,
908
- ot as P,
909
- ze as Q,
910
- _ as R,
911
- it as S,
912
- lt as T,
913
- ct as U,
914
- ft as V,
915
- dt as W,
916
- ee as X,
917
- Ce as Y,
918
- ue as Z,
919
- H as _,
920
- $ as a,
921
- g as a$,
922
- Oe as a0,
923
- ce as a1,
924
- ve as a2,
925
- We as a3,
926
- Ue as a4,
927
- Me as a5,
928
- Wt as a6,
929
- Lt as a7,
930
- Kt as a8,
931
- Fe as a9,
932
- A as aA,
933
- p as aB,
934
- W as aC,
935
- Yt as aD,
923
+ Q as P,
924
+ ct as Q,
925
+ O as R,
926
+ Xe as S,
927
+ dt as T,
928
+ mt as U,
929
+ gt as V,
930
+ Dt as W,
931
+ ht as X,
932
+ ae as Y,
933
+ $e as Z,
934
+ le as _,
935
+ A as a,
936
+ Ee as a$,
937
+ Ne as a0,
938
+ Ue as a1,
939
+ de as a2,
940
+ Le as a3,
941
+ Ve as a4,
942
+ Ye as a5,
943
+ Ie as a6,
944
+ Vt as a7,
945
+ Pt as a8,
946
+ jt as a9,
947
+ xe as aA,
948
+ x as aB,
949
+ p as aC,
950
+ W as aD,
936
951
  Nt as aE,
937
- P as aF,
938
- K as aG,
939
- de as aH,
940
- qt as aI,
941
- Xt as aJ,
942
- _e as aK,
943
- Re as aL,
944
- Ae as aM,
945
- ne as aN,
946
- I as aO,
947
- ht as aP,
948
- pt as aQ,
949
- xe as aR,
950
- tt as aS,
951
- et as aT,
952
- Tt as aU,
953
- le as aV,
954
- Pt as aW,
955
- $e as aX,
956
- pe as aY,
957
- ye as aZ,
958
- he as a_,
959
- ke as aa,
960
- Le as ab,
961
- Se as ac,
962
- fe as ad,
963
- oe as ae,
964
- He as af,
965
- je as ag,
966
- Ve as ah,
967
- be as ai,
968
- gt as aj,
969
- Be as ak,
970
- se as al,
971
- ie as am,
972
- vt as an,
973
- Ne as ao,
974
- ae as ap,
975
- ge as aq,
976
- me as ar,
977
- we as as,
978
- Ee as at,
979
- Te as au,
980
- jt as av,
981
- zt as aw,
982
- Jt as ax,
983
- R as ay,
984
- Ie as az,
985
- Rt as b,
986
- S as b0,
987
- m as b1,
988
- z as b2,
989
- Ot as b3,
990
- Vt as b4,
991
- Ut as b5,
992
- Bt as b6,
993
- Ke as b7,
994
- Pe as b8,
995
- F as c,
996
- St as d,
997
- At as e,
998
- _t as f,
999
- Ht as g,
1000
- Mt as h,
1001
- kt as i,
1002
- xt as j,
1003
- at as k,
1004
- $t as l,
1005
- rt as m,
1006
- nt as n,
952
+ Kt as aF,
953
+ G as aG,
954
+ K as aH,
955
+ De as aI,
956
+ te as aJ,
957
+ Zt as aK,
958
+ Oe as aL,
959
+ We as aM,
960
+ ve as aN,
961
+ oe as aO,
962
+ I as aP,
963
+ nt as aQ,
964
+ Mt as aR,
965
+ ot as aS,
966
+ at as aT,
967
+ _e as aU,
968
+ et as aV,
969
+ rt as aW,
970
+ St as aX,
971
+ ge as aY,
972
+ Jt as aZ,
973
+ Ae as a_,
974
+ Re as aa,
975
+ Ce as ab,
976
+ Pe as ac,
977
+ He as ad,
978
+ me as ae,
979
+ ie as af,
980
+ Fe as ag,
981
+ qe as ah,
982
+ Be as ai,
983
+ ke as aj,
984
+ yt as ak,
985
+ Ge as al,
986
+ ce as am,
987
+ fe as an,
988
+ Lt as ao,
989
+ Ke as ap,
990
+ ue as aq,
991
+ he as ar,
992
+ ye as as,
993
+ Se as at,
994
+ be as au,
995
+ Me as av,
996
+ qt as aw,
997
+ Xt as ax,
998
+ Qt as ay,
999
+ F as az,
1000
+ Wt as b,
1001
+ Te as b0,
1002
+ we as b1,
1003
+ g as b2,
1004
+ S as b3,
1005
+ m as b4,
1006
+ z as b5,
1007
+ Ut as b6,
1008
+ Bt as b7,
1009
+ Yt as b8,
1010
+ Gt as b9,
1011
+ je as ba,
1012
+ Je as bb,
1013
+ R as c,
1014
+ Ht as d,
1015
+ vt as e,
1016
+ Ot as f,
1017
+ Ft as g,
1018
+ It as h,
1019
+ Ct as i,
1020
+ _t as j,
1021
+ it as k,
1022
+ At as l,
1023
+ ut as m,
1024
+ st as n,
1007
1025
  l as o,
1008
- st as p,
1009
- Gt as q,
1010
- x as r,
1026
+ lt as p,
1027
+ zt as q,
1028
+ _ as r,
1011
1029
  k as s,
1012
- U as t,
1013
- De as u,
1014
- mt as v,
1015
- Ge as w,
1016
- Je as x,
1017
- yt as y,
1018
- wt as z
1030
+ v as t,
1031
+ pe as u,
1032
+ pt as v,
1033
+ ze as w,
1034
+ Qe as x,
1035
+ Tt as y,
1036
+ Et as z
1019
1037
  };
1020
- //# sourceMappingURL=position-utils-DpaKqYhO.js.map
1038
+ //# sourceMappingURL=position-utils-BzmOPdvQ.js.map