@innosolutions/inno-calendar 1.0.49 → 1.0.50

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 (57) hide show
  1. package/AGENT.md +1288 -359
  2. package/dist/agenda-widget-WpqvlAJP.cjs +2 -0
  3. package/dist/agenda-widget-WpqvlAJP.cjs.map +1 -0
  4. package/dist/{agenda-widget-DhCPt2vI.js → agenda-widget-ssrwyMvF.js} +1245 -1182
  5. package/dist/agenda-widget-ssrwyMvF.js.map +1 -0
  6. package/dist/components/event/event-card.d.ts +21 -2
  7. package/dist/components/event/event-card.d.ts.map +1 -1
  8. package/dist/components/header/calendar-header.d.ts +10 -2
  9. package/dist/components/header/calendar-header.d.ts.map +1 -1
  10. package/dist/components/index.cjs +1 -1
  11. package/dist/components/index.d.ts +1 -1
  12. package/dist/components/index.d.ts.map +1 -1
  13. package/dist/components/index.mjs +49 -35
  14. package/dist/components/inno-calendar.d.ts +45 -2
  15. package/dist/components/inno-calendar.d.ts.map +1 -1
  16. package/dist/components/ui/dialog.d.ts +35 -0
  17. package/dist/components/ui/dialog.d.ts.map +1 -0
  18. package/dist/components/ui/index.d.ts +2 -0
  19. package/dist/components/ui/index.d.ts.map +1 -1
  20. package/dist/components/ui/sheet.d.ts +35 -0
  21. package/dist/components/ui/sheet.d.ts.map +1 -0
  22. package/dist/components/views/timeline-view.d.ts +10 -1
  23. package/dist/components/views/timeline-view.d.ts.map +1 -1
  24. package/dist/core/context/drag-drop-context.d.ts +7 -1
  25. package/dist/core/context/drag-drop-context.d.ts.map +1 -1
  26. package/dist/core/index.cjs +1 -1
  27. package/dist/core/index.d.ts +1 -1
  28. package/dist/core/index.d.ts.map +1 -1
  29. package/dist/core/index.mjs +1 -1
  30. package/dist/core/types.d.ts +81 -0
  31. package/dist/core/types.d.ts.map +1 -1
  32. package/dist/index.cjs +1 -1
  33. package/dist/index.mjs +206 -192
  34. package/dist/presets/index.cjs +1 -1
  35. package/dist/presets/index.mjs +1 -1
  36. package/dist/{slot-selection-context-D1495hEJ.js → slot-selection-context-BwghpxKA.js} +233 -231
  37. package/dist/slot-selection-context-BwghpxKA.js.map +1 -0
  38. package/dist/slot-selection-context-CHSaOPWP.cjs +2 -0
  39. package/dist/slot-selection-context-CHSaOPWP.cjs.map +1 -0
  40. package/dist/{tailwind-calendar-BmJa4HhQ.js → tailwind-calendar-Ctfffnbn.js} +2 -2
  41. package/dist/{tailwind-calendar-BmJa4HhQ.js.map → tailwind-calendar-Ctfffnbn.js.map} +1 -1
  42. package/dist/{tailwind-calendar-CJmOutn1.cjs → tailwind-calendar-Gy1Uc9ZK.cjs} +2 -2
  43. package/dist/{tailwind-calendar-CJmOutn1.cjs.map → tailwind-calendar-Gy1Uc9ZK.cjs.map} +1 -1
  44. package/dist/week-view-ITRsM6y1.cjs +11 -0
  45. package/dist/week-view-ITRsM6y1.cjs.map +1 -0
  46. package/dist/{week-view-aRPB2cjn.js → week-view-vnIcmoVr.js} +1564 -1405
  47. package/dist/week-view-vnIcmoVr.js.map +1 -0
  48. package/package.json +2 -1
  49. package/dist/agenda-widget-B-AVTnqM.cjs +0 -2
  50. package/dist/agenda-widget-B-AVTnqM.cjs.map +0 -1
  51. package/dist/agenda-widget-DhCPt2vI.js.map +0 -1
  52. package/dist/slot-selection-context-BCsC7WT7.cjs +0 -2
  53. package/dist/slot-selection-context-BCsC7WT7.cjs.map +0 -1
  54. package/dist/slot-selection-context-D1495hEJ.js.map +0 -1
  55. package/dist/week-view-D19YRBQC.cjs +0 -11
  56. package/dist/week-view-D19YRBQC.cjs.map +0 -1
  57. package/dist/week-view-aRPB2cjn.js.map +0 -1
@@ -1,11 +1,11 @@
1
- import { jsx as e, jsxs as n, Fragment as re } from "react/jsx-runtime";
2
- import { g as Oe, u as Je, C as Xe } from "./use-calendar-Clo9DFK4.js";
3
- import { useCallback as ne, useState as oe, useEffect as fe, forwardRef as xe, useRef as Ne, useMemo as B, useLayoutEffect as Qe, useImperativeHandle as Ze } from "react";
4
- import { c as h } from "./index-DtaLkIY8.js";
5
- import { P as Pe, i as _e, h as Re, m as X, q as et, r as tt, B as ae, s as rt, t as Ce, k as Q, n as Z, l as ee, d as nt, C as ot, M as De, A as st, W as at, c as it, u as lt } from "./week-view-aRPB2cjn.js";
6
- import { D as ct, I as dt, e as ut, S as ht } from "./slot-selection-context-D1495hEJ.js";
7
- import { isToday as G, startOfDay as pe, endOfDay as Ve, getYearMonths as mt, generateMonthGrid as ft, getEventsForDay as gt, addDays as Ue, formatDateISO as xt } from "./utils.mjs";
8
- function pt({ view: t, className: r = "" }) {
1
+ import { jsx as e, jsxs as n, Fragment as ce } from "react/jsx-runtime";
2
+ import { g as Ue, u as Ze, C as et } from "./use-calendar-Clo9DFK4.js";
3
+ import { useCallback as X, useState as de, useEffect as pe, forwardRef as be, useRef as Ee, useMemo as U, useLayoutEffect as tt, useImperativeHandle as rt } from "react";
4
+ import { c as u } from "./index-DtaLkIY8.js";
5
+ import { P as Ye, p as Ge, o as Ke, z as oe, I as nt, J as ot, B as ue, K as st, L as ze, x as se, F as ae, y as ie, k as at, C as it, M as He, A as lt, W as ct, c as dt, N as ut } from "./week-view-vnIcmoVr.js";
6
+ import { j as ht, D as mt, I as ft, e as gt, S as xt } from "./slot-selection-context-BwghpxKA.js";
7
+ import { isToday as te, startOfDay as ye, endOfDay as qe, getYearMonths as pt, generateMonthGrid as vt, getEventsForDay as wt, addDays as Je, formatDateISO as bt } from "./utils.mjs";
8
+ function yt({ view: t, className: r = "" }) {
9
9
  return /* @__PURE__ */ e(
10
10
  "div",
11
11
  {
@@ -29,49 +29,49 @@ function pt({ view: t, className: r = "" }) {
29
29
  }
30
30
  );
31
31
  }
32
- function Me({ view: t, className: r }) {
33
- return /* @__PURE__ */ e(pt, { view: t, className: r });
32
+ function Le({ view: t, className: r }) {
33
+ return /* @__PURE__ */ e(yt, { view: t, className: r });
34
34
  }
35
- function Yr(t) {
35
+ function Jr(t) {
36
36
  const {
37
37
  events: r,
38
38
  resources: o,
39
39
  scheduleTypes: s,
40
- initialView: i = "week",
41
- initialDate: l,
40
+ initialView: a = "week",
41
+ initialDate: i,
42
42
  initialFilters: g,
43
43
  preferences: f,
44
- locale: c,
44
+ locale: l,
45
45
  slots: x,
46
- renderEvent: b,
46
+ renderEvent: y,
47
47
  onViewChange: p,
48
- onDateChange: S,
49
- onEventClick: W,
50
- onSlotSelect: L,
51
- onFiltersChange: D,
52
- className: z,
53
- children: T
54
- } = t, w = Oe();
55
- if (w)
56
- return /* @__PURE__ */ e("div", { className: z, style: { position: "relative" }, children: T ?? /* @__PURE__ */ e(Me, { view: w.view, className: z }) });
57
- const I = Je({
48
+ onDateChange: L,
49
+ onEventClick: A,
50
+ onSlotSelect: z,
51
+ onFiltersChange: j,
52
+ className: I,
53
+ children: C
54
+ } = t, T = Ue();
55
+ if (T)
56
+ return /* @__PURE__ */ e("div", { className: I, style: { position: "relative" }, children: C ?? /* @__PURE__ */ e(Le, { view: T.view, className: I }) });
57
+ const _ = Ze({
58
58
  events: r,
59
59
  resources: o,
60
60
  scheduleTypes: s,
61
- initialView: i,
62
- initialDate: l,
61
+ initialView: a,
62
+ initialDate: i,
63
63
  initialFilters: g,
64
64
  preferences: f,
65
- locale: c,
65
+ locale: l,
66
66
  onViewChange: p,
67
- onDateChange: S,
68
- onEventClick: W,
69
- onSlotSelect: L,
70
- onFiltersChange: D
67
+ onDateChange: L,
68
+ onEventClick: A,
69
+ onSlotSelect: z,
70
+ onFiltersChange: j
71
71
  });
72
- return /* @__PURE__ */ e(Xe, { value: I, children: /* @__PURE__ */ e("div", { className: z, style: { position: "relative" }, children: T ?? /* @__PURE__ */ e(Me, { view: I.view, className: z }) }) });
72
+ return /* @__PURE__ */ e(et, { value: _, children: /* @__PURE__ */ e("div", { className: I, style: { position: "relative" }, children: C ?? /* @__PURE__ */ e(Le, { view: _.view, className: I }) }) });
73
73
  }
74
- function vt({ className: t }) {
74
+ function kt({ className: t }) {
75
75
  return /* @__PURE__ */ n(
76
76
  "svg",
77
77
  {
@@ -90,7 +90,7 @@ function vt({ className: t }) {
90
90
  }
91
91
  );
92
92
  }
93
- function Ye({ className: t }) {
93
+ function Xe({ className: t }) {
94
94
  return /* @__PURE__ */ n(
95
95
  "svg",
96
96
  {
@@ -112,7 +112,7 @@ function Ye({ className: t }) {
112
112
  }
113
113
  );
114
114
  }
115
- function ge({ className: t }) {
115
+ function we({ className: t }) {
116
116
  return /* @__PURE__ */ n(
117
117
  "svg",
118
118
  {
@@ -131,7 +131,7 @@ function ge({ className: t }) {
131
131
  }
132
132
  );
133
133
  }
134
- function wt({ className: t }) {
134
+ function Nt({ className: t }) {
135
135
  return /* @__PURE__ */ n(
136
136
  "svg",
137
137
  {
@@ -150,7 +150,7 @@ function wt({ className: t }) {
150
150
  }
151
151
  );
152
152
  }
153
- function he({ className: t }) {
153
+ function ge({ className: t }) {
154
154
  return /* @__PURE__ */ e(
155
155
  "svg",
156
156
  {
@@ -166,7 +166,7 @@ function he({ className: t }) {
166
166
  }
167
167
  );
168
168
  }
169
- function bt({ className: t }) {
169
+ function Ct({ className: t }) {
170
170
  return /* @__PURE__ */ n(
171
171
  "svg",
172
172
  {
@@ -185,7 +185,7 @@ function bt({ className: t }) {
185
185
  }
186
186
  );
187
187
  }
188
- function yt({ className: t }) {
188
+ function Dt({ className: t }) {
189
189
  return /* @__PURE__ */ e(
190
190
  "svg",
191
191
  {
@@ -201,7 +201,7 @@ function yt({ className: t }) {
201
201
  }
202
202
  );
203
203
  }
204
- function kt({ className: t }) {
204
+ function Mt({ className: t }) {
205
205
  return /* @__PURE__ */ n(
206
206
  "svg",
207
207
  {
@@ -222,7 +222,7 @@ function kt({ className: t }) {
222
222
  }
223
223
  );
224
224
  }
225
- function Nt({ className: t }) {
225
+ function St({ className: t }) {
226
226
  return /* @__PURE__ */ n(
227
227
  "svg",
228
228
  {
@@ -241,7 +241,7 @@ function Nt({ className: t }) {
241
241
  }
242
242
  );
243
243
  }
244
- function Ct({ className: t }) {
244
+ function Et({ className: t }) {
245
245
  return /* @__PURE__ */ n(
246
246
  "svg",
247
247
  {
@@ -262,7 +262,7 @@ function Ct({ className: t }) {
262
262
  }
263
263
  );
264
264
  }
265
- function Dt({ className: t }) {
265
+ function zt({ className: t }) {
266
266
  return /* @__PURE__ */ n(
267
267
  "svg",
268
268
  {
@@ -284,7 +284,7 @@ function Dt({ className: t }) {
284
284
  }
285
285
  );
286
286
  }
287
- function ce({ className: t }) {
287
+ function he({ className: t }) {
288
288
  return /* @__PURE__ */ e(
289
289
  "svg",
290
290
  {
@@ -295,12 +295,12 @@ function ce({ className: t }) {
295
295
  strokeWidth: "2",
296
296
  strokeLinecap: "round",
297
297
  strokeLinejoin: "round",
298
- className: h("animate-spin", t),
298
+ className: u("animate-spin", t),
299
299
  children: /* @__PURE__ */ e("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
300
300
  }
301
301
  );
302
302
  }
303
- const Mt = {
303
+ const Ht = {
304
304
  edit: "Edit",
305
305
  delete: "Delete",
306
306
  cancel: "Cancel Event",
@@ -325,39 +325,39 @@ const Mt = {
325
325
  acceptAllEvents: "Accept all events",
326
326
  deleteConfirmTitle: "Delete Event",
327
327
  deleteConfirmDescription: "Are you sure you want to delete this event? This action cannot be undone."
328
- }, me = xe(
329
- ({ onClick: t, label: r, children: o, className: s, variant: i = "ghost", ...l }, g) => /* @__PURE__ */ n(Q, { children: [
330
- /* @__PURE__ */ e(Z, { asChild: !0, children: /* @__PURE__ */ e(
328
+ }, xe = be(
329
+ ({ onClick: t, label: r, children: o, className: s, variant: a = "ghost", ...i }, g) => /* @__PURE__ */ n(se, { children: [
330
+ /* @__PURE__ */ e(ae, { asChild: !0, children: /* @__PURE__ */ e(
331
331
  "button",
332
332
  {
333
333
  type: "button",
334
334
  ref: g,
335
335
  onClick: t,
336
- className: h(
336
+ className: u(
337
337
  "h-8 w-8 rounded-full flex items-center justify-center transition-colors",
338
- i === "ghost" && "hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-600 dark:text-zinc-400",
339
- i === "destructive" && "hover:bg-red-50 dark:hover:bg-red-950/30 text-zinc-600 dark:text-zinc-400 hover:text-red-600",
338
+ a === "ghost" && "hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-600 dark:text-zinc-400",
339
+ a === "destructive" && "hover:bg-red-50 dark:hover:bg-red-950/30 text-zinc-600 dark:text-zinc-400 hover:text-red-600",
340
340
  s
341
341
  ),
342
342
  "aria-label": r,
343
- ...l,
343
+ ...i,
344
344
  children: o
345
345
  }
346
346
  ) }),
347
- /* @__PURE__ */ e(ee, { side: "bottom", className: "text-xs", children: r })
347
+ /* @__PURE__ */ e(ie, { side: "bottom", className: "text-xs", children: r })
348
348
  ] })
349
349
  );
350
- me.displayName = "IconButton";
351
- function St({ src: t, alt: r, initials: o, className: s, isClient: i }) {
352
- const [l, g] = oe(!1);
350
+ xe.displayName = "IconButton";
351
+ function Lt({ src: t, alt: r, initials: o, className: s, isClient: a }) {
352
+ const [i, g] = de(!1);
353
353
  return /* @__PURE__ */ e(
354
354
  "div",
355
355
  {
356
- className: h(
356
+ className: u(
357
357
  "relative h-7 w-7 rounded-full overflow-hidden shrink-0",
358
358
  s
359
359
  ),
360
- children: t && !l ? /* @__PURE__ */ e(
360
+ children: t && !i ? /* @__PURE__ */ e(
361
361
  "img",
362
362
  {
363
363
  src: t,
@@ -368,9 +368,9 @@ function St({ src: t, alt: r, initials: o, className: s, isClient: i }) {
368
368
  ) : /* @__PURE__ */ e(
369
369
  "div",
370
370
  {
371
- className: h(
371
+ className: u(
372
372
  "h-full w-full flex items-center justify-center text-[10px] font-medium",
373
- i ? "bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300" : "bg-zinc-200 dark:bg-zinc-700 text-zinc-700 dark:text-zinc-300"
373
+ a ? "bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300" : "bg-zinc-200 dark:bg-zinc-700 text-zinc-700 dark:text-zinc-300"
374
374
  ),
375
375
  children: o
376
376
  }
@@ -378,38 +378,38 @@ function St({ src: t, alt: r, initials: o, className: s, isClient: i }) {
378
378
  }
379
379
  );
380
380
  }
381
- function Se({
381
+ function Te({
382
382
  participant: t,
383
383
  isEventCanceled: r = !1,
384
384
  labels: o
385
385
  }) {
386
- const s = t.name || "Unknown", i = s.split(" ").map((S) => S[0]).join("").toUpperCase().slice(0, 2), l = t.isOrganizer ?? !1, g = t.isConfirmed, f = g === !0, c = g === !1, x = t.isClient ?? !1, b = t.profilePicture || t.avatar, p = r;
386
+ const s = t.name || "Unknown", a = s.split(" ").map((L) => L[0]).join("").toUpperCase().slice(0, 2), i = t.isOrganizer ?? !1, g = t.isConfirmed, f = g === !0, l = g === !1, x = t.isClient ?? !1, y = t.profilePicture || t.avatar, p = r;
387
387
  return /* @__PURE__ */ n(
388
388
  "div",
389
389
  {
390
- className: h(
390
+ className: u(
391
391
  "flex items-center gap-3 py-0",
392
392
  p && "opacity-60"
393
393
  ),
394
394
  children: [
395
395
  /* @__PURE__ */ n("div", { className: "relative", children: [
396
396
  /* @__PURE__ */ e(
397
- St,
397
+ Lt,
398
398
  {
399
- src: b,
399
+ src: y,
400
400
  alt: s,
401
- initials: i,
401
+ initials: a,
402
402
  isClient: x,
403
- className: h(p && "grayscale")
403
+ className: u(p && "grayscale")
404
404
  }
405
405
  ),
406
- p || c ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-red-100 dark:bg-red-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(ge, { className: "h-2 w-2 text-red-600 dark:text-red-400 stroke-[3]" }) }) }) : f ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-green-100 dark:bg-green-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(he, { className: "h-2 w-2 text-green-600 dark:text-green-400 stroke-[3]" }) }) }) : null
406
+ p || l ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-red-100 dark:bg-red-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(we, { className: "h-2 w-2 text-red-600 dark:text-red-400 stroke-[3]" }) }) }) : f ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-green-100 dark:bg-green-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(ge, { className: "h-2 w-2 text-green-600 dark:text-green-400 stroke-[3]" }) }) }) : null
407
407
  ] }),
408
408
  /* @__PURE__ */ n("div", { className: "!h-fit min-w-0 gap-0", children: [
409
409
  /* @__PURE__ */ e("div", { className: "gap-0", children: /* @__PURE__ */ e(
410
410
  "span",
411
411
  {
412
- className: h(
412
+ className: u(
413
413
  "text-sm text-zinc-900 dark:text-zinc-100 truncate",
414
414
  p && "line-through text-zinc-500 dark:text-zinc-500"
415
415
  ),
@@ -417,25 +417,25 @@ function Se({
417
417
  }
418
418
  ) }),
419
419
  x && /* @__PURE__ */ e("div", { className: "text-[10px] px-1.5 w-fit py-0.5 rounded bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300 font-medium", children: o.client }),
420
- l && !p && /* @__PURE__ */ e("div", { className: "text-xs text-zinc-500", children: o.organizer })
420
+ i && !p && /* @__PURE__ */ e("div", { className: "text-xs text-zinc-500", children: o.organizer })
421
421
  ] })
422
422
  ]
423
423
  }
424
424
  );
425
425
  }
426
- function Et({
426
+ function Tt({
427
427
  open: t,
428
428
  onOpenChange: r,
429
429
  title: o,
430
430
  children: s
431
431
  }) {
432
- return fe(() => {
432
+ return pe(() => {
433
433
  if (!t) return;
434
- const i = (l) => {
435
- l.key === "Escape" && r(!1);
434
+ const a = (i) => {
435
+ i.key === "Escape" && r(!1);
436
436
  };
437
- return document.addEventListener("keydown", i), () => document.removeEventListener("keydown", i);
438
- }, [t, r]), fe(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
437
+ return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
438
+ }, [t, r]), pe(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
439
439
  document.body.style.overflow = "";
440
440
  }), [t]), t ? /* @__PURE__ */ n("div", { className: "fixed inset-0 z-50", children: [
441
441
  /* @__PURE__ */ e(
@@ -443,8 +443,8 @@ function Et({
443
443
  {
444
444
  className: "fixed inset-0 bg-black/50 backdrop-blur-sm",
445
445
  onClick: () => r(!1),
446
- onKeyDown: (i) => {
447
- (i.key === "Enter" || i.key === " ") && r(!1);
446
+ onKeyDown: (a) => {
447
+ (a.key === "Enter" || a.key === " ") && r(!1);
448
448
  }
449
449
  }
450
450
  ),
@@ -454,13 +454,13 @@ function Et({
454
454
  ] }) })
455
455
  ] }) : null;
456
456
  }
457
- function zt({
457
+ function It({
458
458
  open: t,
459
459
  onOpenChange: r,
460
460
  title: o,
461
461
  description: s,
462
- cancelLabel: i,
463
- confirmLabel: l,
462
+ cancelLabel: a,
463
+ confirmLabel: i,
464
464
  onConfirm: g,
465
465
  isLoading: f
466
466
  }) {
@@ -470,8 +470,8 @@ function zt({
470
470
  {
471
471
  className: "fixed inset-0 bg-black/50 backdrop-blur-sm",
472
472
  onClick: () => r(!1),
473
- onKeyDown: (c) => {
474
- (c.key === "Enter" || c.key === " ") && r(!1);
473
+ onKeyDown: (l) => {
474
+ (l.key === "Enter" || l.key === " ") && r(!1);
475
475
  }
476
476
  }
477
477
  ),
@@ -480,25 +480,25 @@ function zt({
480
480
  /* @__PURE__ */ e("p", { className: "mt-2 text-sm text-zinc-600 dark:text-zinc-400", children: s }),
481
481
  /* @__PURE__ */ n("div", { className: "mt-4 flex justify-end gap-3", children: [
482
482
  /* @__PURE__ */ e(
483
- ae,
483
+ ue,
484
484
  {
485
485
  variant: "outline",
486
486
  size: "sm",
487
487
  onClick: () => r(!1),
488
- children: i
488
+ children: a
489
489
  }
490
490
  ),
491
491
  /* @__PURE__ */ n(
492
- ae,
492
+ ue,
493
493
  {
494
494
  variant: "destructive",
495
495
  size: "sm",
496
496
  onClick: g,
497
497
  disabled: f,
498
498
  children: [
499
- f && /* @__PURE__ */ e(ce, { className: "h-4 w-4 mr-2" }),
500
- /* @__PURE__ */ e(Ye, { className: "h-4 w-4 mr-2" }),
501
- l
499
+ f && /* @__PURE__ */ e(he, { className: "h-4 w-4 mr-2" }),
500
+ /* @__PURE__ */ e(Xe, { className: "h-4 w-4 mr-2" }),
501
+ i
502
502
  ]
503
503
  }
504
504
  )
@@ -506,14 +506,14 @@ function zt({
506
506
  ] }) })
507
507
  ] }) : null;
508
508
  }
509
- function Ht(t, r) {
509
+ function jt(t, r) {
510
510
  return t.toLocaleDateString(void 0, {
511
511
  weekday: "long",
512
512
  month: "long",
513
513
  day: "numeric"
514
514
  });
515
515
  }
516
- function Lt(t, r) {
516
+ function Wt(t, r) {
517
517
  const o = {
518
518
  hour: "2-digit",
519
519
  minute: "2-digit",
@@ -521,7 +521,7 @@ function Lt(t, r) {
521
521
  };
522
522
  return `${t.toLocaleTimeString(void 0, o)} – ${r.toLocaleTimeString(void 0, o)}`;
523
523
  }
524
- function Tt(t) {
524
+ function At(t) {
525
525
  return t.toLocaleDateString(void 0, {
526
526
  day: "2-digit",
527
527
  month: "short",
@@ -530,73 +530,73 @@ function Tt(t) {
530
530
  minute: "2-digit"
531
531
  });
532
532
  }
533
- function It(t) {
534
- const [r, o] = oe(() => typeof window < "u" ? window.matchMedia(t).matches : !1);
535
- return fe(() => {
533
+ function Ft(t) {
534
+ const [r, o] = de(() => typeof window < "u" ? window.matchMedia(t).matches : !1);
535
+ return pe(() => {
536
536
  if (typeof window > "u") return;
537
- const s = window.matchMedia(t), i = (l) => o(l.matches);
538
- return s.addEventListener("change", i), () => s.removeEventListener("change", i);
537
+ const s = window.matchMedia(t), a = (i) => o(i.matches);
538
+ return s.addEventListener("change", a), () => s.removeEventListener("change", a);
539
539
  }, [t]), r;
540
540
  }
541
- function Ee({
541
+ function Ie({
542
542
  event: t,
543
543
  labels: r,
544
544
  isLoading: o,
545
545
  onClose: s,
546
- onEdit: i,
547
- onDelete: l,
546
+ onEdit: a,
547
+ onDelete: i,
548
548
  onCancel: g,
549
549
  onAccept: f,
550
- onDecline: c,
550
+ onDecline: l,
551
551
  onConfirmMeeting: x,
552
- canEdit: b = !0,
552
+ canEdit: y = !0,
553
553
  canDelete: p = !1,
554
- canCancel: S = !0,
555
- isCurrentUserParticipant: W = !1,
556
- isCurrentUserClient: L = !1,
557
- currentUserAcceptStatus: D,
558
- isAcceptLoading: z = !1,
559
- isDeclineLoading: T = !1,
560
- isConfirmLoading: w = !1,
561
- isDeleteLoading: I = !1,
562
- renderParticipant: C,
563
- renderHeaderActions: A,
564
- renderCancelReason: R,
565
- renderDeleteConfirmation: V,
566
- formatDate: F = Ht,
567
- formatTimeRange: O = Lt
554
+ canCancel: L = !0,
555
+ isCurrentUserParticipant: A = !1,
556
+ isCurrentUserClient: z = !1,
557
+ currentUserAcceptStatus: j,
558
+ isAcceptLoading: I = !1,
559
+ isDeclineLoading: C = !1,
560
+ isConfirmLoading: T = !1,
561
+ isDeleteLoading: _ = !1,
562
+ renderParticipant: Y,
563
+ renderHeaderActions: w,
564
+ renderCancelReason: W,
565
+ renderDeleteConfirmation: F,
566
+ formatDate: P = jt,
567
+ formatTimeRange: K = Wt
568
568
  }) {
569
- const [j, _] = oe(!1), U = !(t.isCanceled || t.meetingTookPlace), m = t.isRecurring ?? !1, a = t.participantDetails, u = t.participantsNames || [], v = a && a.length > 0, k = D === !0, N = D === !1, E = W && !L && U, H = v ? a.filter((M) => M.isConfirmed).length : t.isAccepted ? u.length : 0, P = v ? a.length : u.length, K = t.scheduleTypeColor || t.hexColor || "#039BE5", Y = ne(() => t.startDate ? F(t.startDate) : r.noDateProvided, [t.startDate, F, r.noDateProvided]), q = ne(() => t.startDate && t.endDate ? O(t.startDate, t.endDate) : null, [t.startDate, t.endDate, O]), ie = () => {
570
- s(), i?.(t);
571
- }, le = () => {
569
+ const [q, V] = de(!1), B = !(t.isCanceled || t.meetingTookPlace), m = t.isRecurring ?? !1, b = t.participantDetails, E = t.participantsNames || [], $ = b && b.length > 0, H = j === !0, Q = j === !1, re = A && !z && B, c = $ ? b.filter((R) => R.isConfirmed).length : t.isAccepted ? E.length : 0, h = $ ? b.length : E.length, v = t.scheduleTypeColor || t.hexColor || "#039BE5", S = X(() => t.startDate ? P(t.startDate) : r.noDateProvided, [t.startDate, P, r.noDateProvided]), k = X(() => t.startDate && t.endDate ? K(t.startDate, t.endDate) : null, [t.startDate, t.endDate, K]), D = () => {
570
+ s(), a?.(t);
571
+ }, M = () => {
572
572
  s(), g?.(t);
573
- }, d = () => {
574
- _(!0);
575
- }, y = () => {
576
- l?.(t), _(!1);
573
+ }, J = () => {
574
+ V(!0);
575
+ }, Z = () => {
576
+ i?.(t), V(!1);
577
577
  };
578
- return o ? /* @__PURE__ */ e("div", { className: "flex h-48 items-center justify-center", children: /* @__PURE__ */ e(ce, { className: "h-6 w-6 text-zinc-400" }) }) : /* @__PURE__ */ n(X, { delayDuration: 300, children: [
578
+ return o ? /* @__PURE__ */ e("div", { className: "flex h-48 items-center justify-center", children: /* @__PURE__ */ e(he, { className: "h-6 w-6 text-zinc-400" }) }) : /* @__PURE__ */ n(oe, { delayDuration: 300, children: [
579
579
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5 p-3", children: [
580
- /* @__PURE__ */ e("div", { className: "flex items-start justify-end gap-0.5", children: A ? A({ onClose: s }) : /* @__PURE__ */ n(re, { children: [
581
- U && b && i && /* @__PURE__ */ e(me, { onClick: ie, label: r.edit, children: /* @__PURE__ */ e(vt, { className: "h-[18px] w-[18px]" }) }),
582
- U && S && g && /* @__PURE__ */ e(me, { onClick: le, label: r.cancel, children: /* @__PURE__ */ e(wt, { className: "h-[18px] w-[18px]" }) }),
583
- p && l && /* @__PURE__ */ e(
584
- me,
580
+ /* @__PURE__ */ e("div", { className: "flex items-start justify-end gap-0.5", children: w ? w({ onClose: s }) : /* @__PURE__ */ n(ce, { children: [
581
+ B && y && a && /* @__PURE__ */ e(xe, { onClick: D, label: r.edit, children: /* @__PURE__ */ e(kt, { className: "h-[18px] w-[18px]" }) }),
582
+ B && L && g && /* @__PURE__ */ e(xe, { onClick: M, label: r.cancel, children: /* @__PURE__ */ e(Nt, { className: "h-[18px] w-[18px]" }) }),
583
+ p && i && /* @__PURE__ */ e(
584
+ xe,
585
585
  {
586
- onClick: d,
586
+ onClick: J,
587
587
  label: r.delete,
588
588
  variant: "destructive",
589
- children: /* @__PURE__ */ e(Ye, { className: "h-[18px] w-[18px]" })
589
+ children: /* @__PURE__ */ e(Xe, { className: "h-[18px] w-[18px]" })
590
590
  }
591
591
  ),
592
- /* @__PURE__ */ e(me, { onClick: s, label: r.close, children: /* @__PURE__ */ e(ge, { className: "h-[18px] w-[18px]" }) })
592
+ /* @__PURE__ */ e(xe, { onClick: s, label: r.close, children: /* @__PURE__ */ e(we, { className: "h-[18px] w-[18px]" }) })
593
593
  ] }) }),
594
594
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ n("div", { className: "flex items-start gap-2", children: [
595
595
  /* @__PURE__ */ e(
596
596
  "div",
597
597
  {
598
598
  className: "w-4 h-4 rounded mt-1 shrink-0",
599
- style: { backgroundColor: K }
599
+ style: { backgroundColor: v }
600
600
  }
601
601
  ),
602
602
  /* @__PURE__ */ n("div", { className: "flex-1 min-w-0", children: [
@@ -604,7 +604,7 @@ function Ee({
604
604
  /* @__PURE__ */ e(
605
605
  "h2",
606
606
  {
607
- className: h(
607
+ className: u(
608
608
  "text-[22px] font-normal text-zinc-900 dark:text-zinc-100 leading-tight",
609
609
  t.isCanceled && "line-through opacity-60"
610
610
  ),
@@ -612,25 +612,25 @@ function Ee({
612
612
  }
613
613
  ),
614
614
  t.meetingTookPlace && /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 text-xs font-medium", children: [
615
- /* @__PURE__ */ e(bt, { className: "h-3 w-3" }),
615
+ /* @__PURE__ */ e(Ct, { className: "h-3 w-3" }),
616
616
  r.completed
617
617
  ] }),
618
618
  t.isCanceled && /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-400 text-xs font-medium", children: [
619
- /* @__PURE__ */ e(ge, { className: "h-3 w-3" }),
619
+ /* @__PURE__ */ e(we, { className: "h-3 w-3" }),
620
620
  r.canceled
621
621
  ] })
622
622
  ] }),
623
623
  /* @__PURE__ */ n("div", { className: "mt-1 text-sm text-zinc-600 dark:text-zinc-400", children: [
624
- /* @__PURE__ */ e("span", { children: Y() }),
625
- q() && /* @__PURE__ */ n(re, { children: [
624
+ /* @__PURE__ */ e("span", { children: S() }),
625
+ k() && /* @__PURE__ */ n(ce, { children: [
626
626
  /* @__PURE__ */ e("span", { className: "mx-1.5", children: "·" }),
627
- /* @__PURE__ */ e("span", { children: q() })
627
+ /* @__PURE__ */ e("span", { children: k() })
628
628
  ] })
629
629
  ] }),
630
630
  m && t.recurrenceSummary && /* @__PURE__ */ e("div", { className: "text-sm text-zinc-500 dark:text-zinc-500", children: t.recurrenceSummary })
631
631
  ] })
632
632
  ] }) }),
633
- t.isCanceled && /* @__PURE__ */ e("div", { className: "mx-4 p-3 rounded-lg bg-red-50 dark:bg-red-950/30", children: R ? R(t) : /* @__PURE__ */ e("div", { className: "flex items-start gap-0", children: /* @__PURE__ */ n("div", { className: "flex-1 min-w-0", children: [
633
+ t.isCanceled && /* @__PURE__ */ e("div", { className: "mx-4 p-3 rounded-lg bg-red-50 dark:bg-red-950/30", children: W ? W(t) : /* @__PURE__ */ e("div", { className: "flex items-start gap-0", children: /* @__PURE__ */ n("div", { className: "flex-1 min-w-0", children: [
634
634
  /* @__PURE__ */ e("div", { className: "text-sm font-medium text-red-700 dark:text-red-400", children: r.cancellationNote }),
635
635
  t.cancelReason && /* @__PURE__ */ n("div", { className: "mt-1 text-sm text-red-600/80 dark:text-red-400/80 italic", children: [
636
636
  '"',
@@ -640,64 +640,64 @@ function Ee({
640
640
  t.canceledDate && /* @__PURE__ */ n("div", { className: "mt-1.5 text-xs text-red-500/70 dark:text-red-400/60", children: [
641
641
  r.canceledOn,
642
642
  " ",
643
- Tt(t.canceledDate)
643
+ At(t.canceledDate)
644
644
  ] })
645
645
  ] }) }) }),
646
646
  /* @__PURE__ */ n("div", { className: "space-y-0.5", children: [
647
647
  t.address && /* @__PURE__ */ n("div", { className: "flex items-start gap-2", children: [
648
- /* @__PURE__ */ e(Nt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
648
+ /* @__PURE__ */ e(St, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
649
649
  /* @__PURE__ */ e("span", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: t.address })
650
650
  ] }),
651
- (v || u.length > 0) && /* @__PURE__ */ n("div", { className: "flex items-start gap-2 py-0", children: [
652
- /* @__PURE__ */ e(kt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
651
+ ($ || E.length > 0) && /* @__PURE__ */ n("div", { className: "flex items-start gap-2 py-0", children: [
652
+ /* @__PURE__ */ e(Mt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
653
653
  /* @__PURE__ */ n("div", { className: "flex-1", children: [
654
654
  /* @__PURE__ */ n("div", { className: "flex items-center gap-0", children: [
655
655
  /* @__PURE__ */ n("span", { className: "text-sm text-zinc-900 dark:text-zinc-100 font-medium", children: [
656
- P,
656
+ h,
657
657
  " ",
658
- P !== 1 ? r.guests : r.guest
658
+ h !== 1 ? r.guests : r.guest
659
659
  ] }),
660
- P > 0 && /* @__PURE__ */ n("span", { className: "text-xs text-zinc-500", children: [
660
+ h > 0 && /* @__PURE__ */ n("span", { className: "text-xs text-zinc-500", children: [
661
661
  "(",
662
- H,
662
+ c,
663
663
  " ",
664
664
  r.confirmed,
665
665
  ")"
666
666
  ] })
667
667
  ] }),
668
668
  /* @__PURE__ */ n("div", { className: "mt-2 space-y-2", children: [
669
- v ? a.slice(0, 6).map(
670
- (M, $) => C ? C(M, $) : /* @__PURE__ */ e(
671
- Se,
669
+ $ ? b.slice(0, 6).map(
670
+ (R, d) => Y ? Y(R, d) : /* @__PURE__ */ e(
671
+ Te,
672
672
  {
673
- participant: M,
673
+ participant: R,
674
674
  isEventCanceled: t.isCanceled,
675
675
  labels: r
676
676
  },
677
- M.id
677
+ R.id
678
678
  )
679
- ) : u.slice(0, 6).map((M, $) => {
680
- const se = {
681
- id: String($),
682
- name: M,
679
+ ) : E.slice(0, 6).map((R, d) => {
680
+ const N = {
681
+ id: String(d),
682
+ name: R,
683
683
  email: "",
684
684
  isConfirmed: t.isAccepted,
685
- isOrganizer: $ === 0,
685
+ isOrganizer: d === 0,
686
686
  isClient: !1
687
687
  };
688
- return C ? C(se, $) : /* @__PURE__ */ e(
689
- Se,
688
+ return Y ? Y(N, d) : /* @__PURE__ */ e(
689
+ Te,
690
690
  {
691
- participant: se,
691
+ participant: N,
692
692
  isEventCanceled: t.isCanceled,
693
693
  labels: r
694
694
  },
695
- M
695
+ R
696
696
  );
697
697
  }),
698
- P > 6 && /* @__PURE__ */ n("div", { className: "text-xs text-zinc-500 py-1.5 pl-10", children: [
698
+ h > 6 && /* @__PURE__ */ n("div", { className: "text-xs text-zinc-500 py-1.5 pl-10", children: [
699
699
  "+",
700
- P - 6,
700
+ h - 6,
701
701
  " ",
702
702
  r.more
703
703
  ] })
@@ -705,282 +705,282 @@ function Ee({
705
705
  ] })
706
706
  ] }),
707
707
  t.description && /* @__PURE__ */ n("div", { className: "flex items-start gap-2", children: [
708
- /* @__PURE__ */ e(Dt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
708
+ /* @__PURE__ */ e(zt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
709
709
  /* @__PURE__ */ e("p", { className: "text-sm text-zinc-700 dark:text-zinc-300 whitespace-pre-wrap", children: t.description })
710
710
  ] }),
711
711
  /* @__PURE__ */ n("div", { className: "flex items-start gap-2", children: [
712
- /* @__PURE__ */ e(Ct, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
713
- /* @__PURE__ */ e("div", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: v && a.find((M) => M.isOrganizer)?.name || u[0] || "Calendar" })
712
+ /* @__PURE__ */ e(Et, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
713
+ /* @__PURE__ */ e("div", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: $ && b.find((R) => R.isOrganizer)?.name || E[0] || "Calendar" })
714
714
  ] })
715
715
  ] }),
716
- E && f && c && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 mt-3 py-3", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
717
- m ? /* @__PURE__ */ n(et, { children: [
718
- /* @__PURE__ */ e(tt, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex", children: [
716
+ re && f && l && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 mt-3 py-3", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
717
+ m ? /* @__PURE__ */ n(nt, { children: [
718
+ /* @__PURE__ */ e(ot, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex", children: [
719
719
  /* @__PURE__ */ e(
720
- ae,
720
+ ue,
721
721
  {
722
722
  size: "sm",
723
723
  variant: "outline",
724
- className: h(
724
+ className: u(
725
725
  "rounded-r-none gap-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
726
- k && "!bg-green-700 !text-white hover:!bg-green-700"
726
+ H && "!bg-green-700 !text-white hover:!bg-green-700"
727
727
  ),
728
- onClick: (M) => {
729
- M.stopPropagation(), k || f(t);
728
+ onClick: (R) => {
729
+ R.stopPropagation(), H || f(t);
730
730
  },
731
- disabled: z,
732
- children: z ? /* @__PURE__ */ e(ce, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(re, { children: [
733
- k && /* @__PURE__ */ e(he, { className: "h-3.5 w-3.5" }),
731
+ disabled: I,
732
+ children: I ? /* @__PURE__ */ e(he, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(ce, { children: [
733
+ H && /* @__PURE__ */ e(ge, { className: "h-3.5 w-3.5" }),
734
734
  r.going
735
735
  ] })
736
736
  }
737
737
  ),
738
738
  /* @__PURE__ */ e(
739
- ae,
739
+ ue,
740
740
  {
741
741
  size: "sm",
742
742
  variant: "outline",
743
- className: h(
743
+ className: u(
744
744
  "rounded-l-none px-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
745
- k && "!bg-green-700 !text-white hover:!bg-green-700"
745
+ H && "!bg-green-700 !text-white hover:!bg-green-700"
746
746
  ),
747
- children: /* @__PURE__ */ e(yt, { className: "h-3.5 w-3.5" })
747
+ children: /* @__PURE__ */ e(Dt, { className: "h-3.5 w-3.5" })
748
748
  }
749
749
  )
750
750
  ] }) }),
751
- /* @__PURE__ */ n(rt, { align: "start", children: [
751
+ /* @__PURE__ */ n(st, { align: "start", children: [
752
752
  /* @__PURE__ */ n(
753
- Ce,
753
+ ze,
754
754
  {
755
- className: h(
755
+ className: u(
756
756
  "gap-1.5 h-8 !border-none !bg-green-50 text-green-800 hover:!bg-green-100",
757
- k && "!bg-green-700 !text-white hover:!bg-green-700"
757
+ H && "!bg-green-700 !text-white hover:!bg-green-700"
758
758
  ),
759
759
  onClick: () => f(t),
760
760
  children: [
761
- /* @__PURE__ */ e(he, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
761
+ /* @__PURE__ */ e(ge, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
762
762
  r.acceptThisEvent
763
763
  ]
764
764
  }
765
765
  ),
766
- /* @__PURE__ */ n(Ce, { onClick: () => f(t), children: [
767
- /* @__PURE__ */ e(he, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
766
+ /* @__PURE__ */ n(ze, { onClick: () => f(t), children: [
767
+ /* @__PURE__ */ e(ge, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
768
768
  r.acceptAllEvents
769
769
  ] })
770
770
  ] })
771
771
  ] }) : /* @__PURE__ */ e(
772
- ae,
772
+ ue,
773
773
  {
774
774
  size: "sm",
775
775
  variant: "outline",
776
- className: h(
776
+ className: u(
777
777
  "gap-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
778
- k && "!bg-green-700 !text-white hover:!bg-green-700"
778
+ H && "!bg-green-700 !text-white hover:!bg-green-700"
779
779
  ),
780
780
  onClick: () => {
781
- k || f(t);
781
+ H || f(t);
782
782
  },
783
- disabled: z,
784
- children: z ? /* @__PURE__ */ e(ce, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(re, { children: [
785
- k && /* @__PURE__ */ e(he, { className: "h-3.5 w-3.5" }),
783
+ disabled: I,
784
+ children: I ? /* @__PURE__ */ e(he, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(ce, { children: [
785
+ H && /* @__PURE__ */ e(ge, { className: "h-3.5 w-3.5" }),
786
786
  r.going
787
787
  ] })
788
788
  }
789
789
  ),
790
790
  /* @__PURE__ */ e(
791
- ae,
791
+ ue,
792
792
  {
793
793
  size: "sm",
794
794
  variant: "outline",
795
- className: h(
795
+ className: u(
796
796
  "gap-1.5 h-8 !border-none !bg-rose-100 text-rose-800 hover:!bg-rose-200",
797
- N && "!bg-rose-700 !text-white hover:!bg-rose-700"
797
+ Q && "!bg-rose-700 !text-white hover:!bg-rose-700"
798
798
  ),
799
799
  onClick: () => {
800
- N || c(t);
800
+ Q || l(t);
801
801
  },
802
- disabled: T,
803
- children: T ? /* @__PURE__ */ e(ce, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(re, { children: [
804
- N && /* @__PURE__ */ e(ge, { className: "h-3.5 w-3.5" }),
802
+ disabled: C,
803
+ children: C ? /* @__PURE__ */ e(he, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(ce, { children: [
804
+ Q && /* @__PURE__ */ e(we, { className: "h-3.5 w-3.5" }),
805
805
  r.notGoing
806
806
  ] })
807
807
  }
808
808
  )
809
809
  ] }) }),
810
- W && k && !t.meetingTookPlace && !t.isCanceled && x && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 py-3", children: /* @__PURE__ */ n(
811
- ae,
810
+ A && H && !t.meetingTookPlace && !t.isCanceled && x && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 py-3", children: /* @__PURE__ */ n(
811
+ ue,
812
812
  {
813
813
  size: "sm",
814
814
  variant: "outline",
815
815
  className: "w-full h-9 hover:!bg-green-100 hover:text-green-700 text-green-700 !bg-green-100 !border-none dark:text-green-400 dark:hover:bg-green-950/30",
816
816
  onClick: () => x(t),
817
- disabled: w,
817
+ disabled: T,
818
818
  children: [
819
- w && /* @__PURE__ */ e(ce, { className: "h-4 w-4 mr-2" }),
819
+ T && /* @__PURE__ */ e(he, { className: "h-4 w-4 mr-2" }),
820
820
  r.confirmMeeting
821
821
  ]
822
822
  }
823
823
  ) })
824
824
  ] }),
825
- V ? j && V({
826
- onConfirm: y,
827
- onCancel: () => _(!1),
828
- isLoading: I
825
+ F ? q && F({
826
+ onConfirm: Z,
827
+ onCancel: () => V(!1),
828
+ isLoading: _
829
829
  }) : /* @__PURE__ */ e(
830
- zt,
830
+ It,
831
831
  {
832
- open: j,
833
- onOpenChange: _,
832
+ open: q,
833
+ onOpenChange: V,
834
834
  title: r.deleteConfirmTitle,
835
835
  description: r.deleteConfirmDescription,
836
836
  cancelLabel: r.cancel,
837
837
  confirmLabel: r.delete,
838
- onConfirm: y,
839
- isLoading: I
838
+ onConfirm: Z,
839
+ isLoading: _
840
840
  }
841
841
  )
842
842
  ] });
843
843
  }
844
- function Gr({
844
+ function Xr({
845
845
  event: t,
846
846
  children: r,
847
847
  open: o,
848
848
  onOpenChange: s,
849
- isLoading: i,
850
- labels: l,
849
+ isLoading: a,
850
+ labels: i,
851
851
  onEdit: g,
852
852
  onDelete: f,
853
- onCancel: c,
853
+ onCancel: l,
854
854
  onAccept: x,
855
- onDecline: b,
855
+ onDecline: y,
856
856
  onConfirmMeeting: p,
857
- canEdit: S = !0,
858
- canDelete: W = !1,
859
- canCancel: L = !0,
860
- isCurrentUserParticipant: D,
861
- isCurrentUserClient: z,
862
- currentUserAcceptStatus: T,
863
- isAcceptLoading: w,
864
- isDeclineLoading: I,
865
- isConfirmLoading: C,
866
- isDeleteLoading: A,
867
- renderParticipant: R,
868
- renderHeaderActions: V,
869
- renderCancelReason: F,
870
- renderDeleteConfirmation: O,
871
- formatDate: j,
872
- formatTimeRange: _,
873
- className: U,
857
+ canEdit: L = !0,
858
+ canDelete: A = !1,
859
+ canCancel: z = !0,
860
+ isCurrentUserParticipant: j,
861
+ isCurrentUserClient: I,
862
+ currentUserAcceptStatus: C,
863
+ isAcceptLoading: T,
864
+ isDeclineLoading: _,
865
+ isConfirmLoading: Y,
866
+ isDeleteLoading: w,
867
+ renderParticipant: W,
868
+ renderHeaderActions: F,
869
+ renderCancelReason: P,
870
+ renderDeleteConfirmation: K,
871
+ formatDate: q,
872
+ formatTimeRange: V,
873
+ className: B,
874
874
  width: m = 360
875
875
  }) {
876
- const a = It("(min-width: 768px)"), u = { ...Mt, ...l }, v = ne(() => {
876
+ const b = Ft("(min-width: 768px)"), E = { ...Ht, ...i }, $ = X(() => {
877
877
  s?.(!1);
878
- }, [s]), k = {
878
+ }, [s]), H = {
879
879
  event: t,
880
- labels: u,
881
- isLoading: i,
882
- onClose: v,
880
+ labels: E,
881
+ isLoading: a,
882
+ onClose: $,
883
883
  onEdit: g,
884
884
  onDelete: f,
885
- onCancel: c,
885
+ onCancel: l,
886
886
  onAccept: x,
887
- onDecline: b,
887
+ onDecline: y,
888
888
  onConfirmMeeting: p,
889
- canEdit: S,
890
- canDelete: W,
891
- canCancel: L,
892
- isCurrentUserParticipant: D,
893
- isCurrentUserClient: z,
894
- currentUserAcceptStatus: T,
895
- isAcceptLoading: w,
896
- isDeclineLoading: I,
897
- isConfirmLoading: C,
898
- isDeleteLoading: A,
899
- renderParticipant: R,
900
- renderHeaderActions: V,
901
- renderCancelReason: F,
902
- renderDeleteConfirmation: O,
903
- formatDate: j,
904
- formatTimeRange: _
889
+ canEdit: L,
890
+ canDelete: A,
891
+ canCancel: z,
892
+ isCurrentUserParticipant: j,
893
+ isCurrentUserClient: I,
894
+ currentUserAcceptStatus: C,
895
+ isAcceptLoading: T,
896
+ isDeclineLoading: _,
897
+ isConfirmLoading: Y,
898
+ isDeleteLoading: w,
899
+ renderParticipant: W,
900
+ renderHeaderActions: F,
901
+ renderCancelReason: P,
902
+ renderDeleteConfirmation: K,
903
+ formatDate: q,
904
+ formatTimeRange: V
905
905
  };
906
- return a ? /* @__PURE__ */ n(Pe, { open: o ?? !1, onOpenChange: s ?? (() => {
906
+ return b ? /* @__PURE__ */ n(Ye, { open: o ?? !1, onOpenChange: s ?? (() => {
907
907
  }), children: [
908
- /* @__PURE__ */ e(_e, { asChild: !0, children: r }),
908
+ /* @__PURE__ */ e(Ge, { asChild: !0, children: r }),
909
909
  /* @__PURE__ */ e(
910
- Re,
910
+ Ke,
911
911
  {
912
- className: h(
912
+ className: u(
913
913
  "p-0 shadow-lg !rounded-2xl bg-white dark:bg-zinc-900 overflow-hidden border z-50",
914
- U
914
+ B
915
915
  ),
916
916
  style: { width: m },
917
917
  align: "center",
918
918
  side: "bottom",
919
919
  sideOffset: 4,
920
- children: /* @__PURE__ */ e(Ee, { ...k })
920
+ children: /* @__PURE__ */ e(Ie, { ...H })
921
921
  }
922
922
  )
923
- ] }) : /* @__PURE__ */ n(re, { children: [
923
+ ] }) : /* @__PURE__ */ n(ce, { children: [
924
924
  r,
925
925
  /* @__PURE__ */ e(
926
- Et,
926
+ Tt,
927
927
  {
928
928
  open: o ?? !1,
929
929
  onOpenChange: s ?? (() => {
930
930
  }),
931
931
  title: t.title,
932
- children: /* @__PURE__ */ e(Ee, { ...k })
932
+ children: /* @__PURE__ */ e(Ie, { ...H })
933
933
  }
934
934
  )
935
935
  ] });
936
936
  }
937
- const ve = 44, ze = 4, jt = 56, He = 8, we = 80, de = 140, Le = 100, Te = 2, Wt = 8, At = 18;
938
- function Ft(t) {
937
+ const Ne = 44, je = 4, Bt = 56, We = 8, Ce = 80, me = 140, Ae = 100, Fe = 2, $t = 8, Ot = 18;
938
+ function _t(t) {
939
939
  return t.split(" ").map((r) => r[0]).join("").toUpperCase().slice(0, 2);
940
940
  }
941
- function $t(t, r) {
941
+ function Pt(t, r) {
942
942
  const o = [];
943
943
  for (let s = 0; s < r; s++) {
944
- const i = new Date(t);
945
- i.setDate(i.getDate() + s), o.push(i);
944
+ const a = new Date(t);
945
+ a.setDate(a.getDate() + s), o.push(a);
946
946
  }
947
947
  return o;
948
948
  }
949
- function Bt(t, r, o) {
949
+ function Rt(t, r, o) {
950
950
  const s = [];
951
- return t.forEach((i, l) => {
951
+ return t.forEach((a, i) => {
952
952
  for (let g = r; g < o; g++)
953
- s.push({ hour: g, dayIndex: l, date: i });
953
+ s.push({ hour: g, dayIndex: i, date: a });
954
954
  }), s;
955
955
  }
956
- function Ot(t) {
956
+ function Vt(t) {
957
957
  return `${t.toString().padStart(2, "0")}:00`;
958
958
  }
959
- function Pt(t) {
959
+ function Ut(t) {
960
960
  return t.toLocaleDateString("en-US", {
961
961
  weekday: "short",
962
962
  month: "short",
963
963
  day: "numeric"
964
964
  });
965
965
  }
966
- function Ie(t) {
967
- const r = [...t].sort((i, l) => i.startCol !== l.startCol ? i.startCol - l.startCol : l.spanCols - i.spanCols), o = [], s = [];
968
- for (const i of r) {
969
- let l = 0;
970
- for (; s[l] !== void 0 && s[l] > i.startCol; )
971
- l++;
972
- s[l] = i.startCol + i.spanCols, o.push({
973
- ...i,
974
- stackIndex: l
966
+ function Be(t) {
967
+ const r = [...t].sort((a, i) => a.startCol !== i.startCol ? a.startCol - i.startCol : i.spanCols - a.spanCols), o = [], s = [];
968
+ for (const a of r) {
969
+ let i = 0;
970
+ for (; s[i] !== void 0 && s[i] > a.startCol; )
971
+ i++;
972
+ s[i] = a.startCol + a.spanCols, o.push({
973
+ ...a,
974
+ stackIndex: i
975
975
  });
976
976
  }
977
977
  return o;
978
978
  }
979
- function _t({ src: t, alt: r, fallback: o, className: s }) {
979
+ function Yt({ src: t, alt: r, fallback: o, className: s }) {
980
980
  return /* @__PURE__ */ e(
981
981
  "div",
982
982
  {
983
- className: h(
983
+ className: u(
984
984
  "relative flex shrink-0 overflow-hidden rounded-sm border bg-muted",
985
985
  s
986
986
  ),
@@ -995,213 +995,251 @@ function _t({ src: t, alt: r, fallback: o, className: s }) {
995
995
  }
996
996
  );
997
997
  }
998
- const Rt = 7;
999
- function ue({
1000
- daysToShow: t = Rt,
998
+ const Gt = 7;
999
+ function fe({
1000
+ daysToShow: t = Gt,
1001
1001
  events: r,
1002
1002
  users: o = [],
1003
1003
  selectedDate: s,
1004
- onDateChange: i,
1005
- onEventClick: l,
1004
+ onDateChange: a,
1005
+ onEventClick: i,
1006
1006
  visibleHours: g,
1007
1007
  className: f,
1008
- getEventUserId: c,
1008
+ getEventUserId: l,
1009
1009
  renderPopover: x,
1010
- slots: b,
1011
- classNames: p
1010
+ slots: y,
1011
+ classNames: p,
1012
+ enableDrag: L = !0
1012
1013
  }) {
1013
- const S = Ne(null), W = s ?? /* @__PURE__ */ new Date(), L = !0, D = g?.from ?? Wt, z = g?.to ?? At, T = z - D, w = B(() => {
1014
- const a = new Date(W);
1014
+ const A = Ee(null), z = ht(), j = s ?? /* @__PURE__ */ new Date(), I = !0, C = g?.from ?? $t, T = g?.to ?? Ot, _ = T - C, Y = U(() => {
1015
+ const c = new Date(j);
1015
1016
  if (t === 1 || t === 3)
1016
- return a.setHours(0, 0, 0, 0), a;
1017
- const u = a.getDay(), v = u === 0 ? -6 : 1 - u;
1018
- return a.setDate(a.getDate() + v), a.setHours(0, 0, 0, 0), a;
1019
- }, [W, t]), I = B(
1020
- () => $t(w, t),
1021
- [w, t]
1022
- ), C = B(
1023
- () => Bt(I, D, z),
1024
- [L, I, D, z]
1025
- ), R = c ?? ((a) => {
1026
- if (a.resourceId) return a.resourceId;
1027
- const u = a.data;
1028
- if (u?.userId) return String(u.userId);
1029
- if (u?.user && typeof u.user == "object" && u.user.id)
1030
- return String(u.user.id);
1031
- if (a.user?.id) return a.user.id;
1032
- if (a.participants?.[0]?.id) return a.participants[0].id;
1033
- }), V = B(() => {
1034
- const a = /* @__PURE__ */ new Map();
1035
- for (const u of o)
1036
- a.set(u.id, {
1037
- id: u.id,
1038
- name: u.name,
1039
- avatar: u.avatar ?? void 0,
1040
- email: u.email
1017
+ return c.setHours(0, 0, 0, 0), c;
1018
+ const h = c.getDay(), v = h === 0 ? -6 : 1 - h;
1019
+ return c.setDate(c.getDate() + v), c.setHours(0, 0, 0, 0), c;
1020
+ }, [j, t]), w = U(
1021
+ () => Pt(Y, t),
1022
+ [Y, t]
1023
+ ), W = U(
1024
+ () => Rt(w, C, T),
1025
+ [I, w, C, T]
1026
+ ), P = l ?? ((c) => {
1027
+ if (c.resourceId) return c.resourceId;
1028
+ const h = c.data;
1029
+ if (h?.userId) return String(h.userId);
1030
+ if (h?.user && typeof h.user == "object" && h.user.id)
1031
+ return String(h.user.id);
1032
+ if (c.user?.id) return c.user.id;
1033
+ if (c.participants?.[0]?.id) return c.participants[0].id;
1034
+ }), K = U(() => {
1035
+ const c = /* @__PURE__ */ new Map();
1036
+ for (const h of o)
1037
+ c.set(h.id, {
1038
+ id: h.id,
1039
+ name: h.name,
1040
+ avatar: h.avatar ?? void 0,
1041
+ email: h.email
1041
1042
  });
1042
- for (const u of r) {
1043
- const k = u.data?.user;
1044
- k?.id && !a.has(k.id) && a.set(k.id, {
1045
- id: k.id,
1046
- name: k.name ?? "",
1047
- avatar: k.avatar ?? void 0,
1048
- email: k.email
1049
- }), u.user?.id && !a.has(u.user.id) && a.set(u.user.id, {
1050
- id: u.user.id,
1051
- name: u.user.name,
1052
- avatar: u.user.avatar ?? void 0,
1053
- email: u.user.email
1043
+ for (const h of r) {
1044
+ const S = h.data?.user;
1045
+ S?.id && !c.has(S.id) && c.set(S.id, {
1046
+ id: S.id,
1047
+ name: S.name ?? "",
1048
+ avatar: S.avatar ?? void 0,
1049
+ email: S.email
1050
+ }), h.user?.id && !c.has(h.user.id) && c.set(h.user.id, {
1051
+ id: h.user.id,
1052
+ name: h.user.name,
1053
+ avatar: h.user.avatar ?? void 0,
1054
+ email: h.user.email
1054
1055
  });
1055
- for (const N of u.participants || [])
1056
- N.id && !a.has(N.id) && a.set(N.id, {
1057
- id: N.id,
1058
- name: N.name,
1059
- avatar: N.avatar ?? void 0,
1060
- email: N.email
1056
+ for (const k of h.participants || [])
1057
+ k.id && !c.has(k.id) && c.set(k.id, {
1058
+ id: k.id,
1059
+ name: k.name,
1060
+ avatar: k.avatar ?? void 0,
1061
+ email: k.email
1061
1062
  });
1062
1063
  }
1063
- return Array.from(a.values());
1064
- }, [o, r]), F = B(() => {
1065
- const a = [], u = /* @__PURE__ */ new Map();
1066
- for (const N of V)
1067
- u.set(N.id, []);
1068
- u.set("unassigned", []);
1069
- for (const N of r) {
1070
- const E = R(N) ?? "unassigned";
1071
- (u.get(E) ?? u.get("unassigned")).push(N);
1064
+ return Array.from(c.values());
1065
+ }, [o, r]), q = U(() => {
1066
+ const c = [], h = /* @__PURE__ */ new Map();
1067
+ for (const k of K)
1068
+ h.set(k.id, []);
1069
+ h.set("unassigned", []);
1070
+ for (const k of r) {
1071
+ const D = P(k) ?? "unassigned";
1072
+ (h.get(D) ?? h.get("unassigned")).push(k);
1072
1073
  }
1073
- const v = (N) => {
1074
- const E = [];
1075
- for (const H of N) {
1076
- const P = H.startDate.getHours() + H.startDate.getMinutes() / 60, K = H.endDate.getHours() + H.endDate.getMinutes() / 60;
1077
- for (let Y = 0; Y < I.length; Y++) {
1078
- const q = I[Y], ie = pe(q), le = Ve(q);
1079
- if (H.startDate <= le && H.endDate >= ie) {
1080
- let d = D, y = z;
1081
- if (H.startDate >= ie && (d = Math.max(D, P)), H.endDate <= le && (y = Math.min(z, K)), d = Math.max(
1082
- D,
1083
- Math.min(z, d)
1084
- ), y = Math.max(
1085
- D,
1086
- Math.min(z, y)
1087
- ), y > d) {
1088
- const M = Y * T + Math.floor(d - D), $ = Y * T + Math.ceil(y - D);
1089
- E.push({
1090
- event: H,
1091
- startCol: M,
1092
- spanCols: Math.max(1, $ - M)
1074
+ const v = (k) => {
1075
+ const D = [];
1076
+ for (const M of k) {
1077
+ const J = M.startDate.getHours() + M.startDate.getMinutes() / 60, Z = M.endDate.getHours() + M.endDate.getMinutes() / 60;
1078
+ for (let R = 0; R < w.length; R++) {
1079
+ const d = w[R], N = ye(d), O = qe(d);
1080
+ if (M.startDate <= O && M.endDate >= N) {
1081
+ let G = C, ee = T;
1082
+ if (M.startDate >= N && (G = Math.max(C, J)), M.endDate <= O && (ee = Math.min(T, Z)), G = Math.max(
1083
+ C,
1084
+ Math.min(T, G)
1085
+ ), ee = Math.max(
1086
+ C,
1087
+ Math.min(T, ee)
1088
+ ), ee > G) {
1089
+ const ve = R * _ + Math.floor(G - C), ke = R * _ + Math.ceil(ee - C);
1090
+ D.push({
1091
+ event: M,
1092
+ startCol: ve,
1093
+ spanCols: Math.max(1, ke - ve)
1093
1094
  });
1094
1095
  }
1095
1096
  }
1096
1097
  }
1097
1098
  }
1098
- return E;
1099
+ return D;
1099
1100
  };
1100
- for (const N of V) {
1101
- const E = u.get(N.id) ?? [], H = v(E), P = Ie(H), K = P.reduce(
1102
- (Y, q) => Math.max(Y, q.stackIndex + 1),
1101
+ for (const k of K) {
1102
+ const D = h.get(k.id) ?? [], M = v(D), J = Be(M), Z = J.reduce(
1103
+ (R, d) => Math.max(R, d.stackIndex + 1),
1103
1104
  0
1104
1105
  );
1105
- a.push({
1106
- user: N,
1107
- events: P,
1108
- maxStack: Math.max(K, 1)
1106
+ c.push({
1107
+ user: k,
1108
+ events: J,
1109
+ maxStack: Math.max(Z, 1)
1109
1110
  });
1110
1111
  }
1111
- const k = u.get("unassigned") ?? [];
1112
- if (k.length > 0) {
1113
- const N = v(k), E = Ie(N), H = E.reduce(
1114
- (P, K) => Math.max(P, K.stackIndex + 1),
1112
+ const S = h.get("unassigned") ?? [];
1113
+ if (S.length > 0) {
1114
+ const k = v(S), D = Be(k), M = D.reduce(
1115
+ (J, Z) => Math.max(J, Z.stackIndex + 1),
1115
1116
  0
1116
1117
  );
1117
- a.push({
1118
+ c.push({
1118
1119
  user: {
1119
1120
  id: "unassigned",
1120
1121
  name: "Unassigned",
1121
1122
  avatar: void 0,
1122
1123
  email: void 0
1123
1124
  },
1124
- events: E,
1125
- maxStack: Math.max(H, 1)
1125
+ events: D,
1126
+ maxStack: Math.max(M, 1)
1126
1127
  });
1127
1128
  }
1128
- return a.filter((N) => N.events.length > 0);
1129
+ return c.filter((k) => k.events.length > 0);
1129
1130
  }, [
1130
- V,
1131
+ K,
1131
1132
  r,
1133
+ w,
1132
1134
  I,
1133
- L,
1135
+ _,
1136
+ C,
1134
1137
  T,
1135
- D,
1136
- z,
1137
- R
1138
- ]), O = B(() => {
1139
- const a = /* @__PURE__ */ new Map();
1140
- for (const u of F)
1141
- for (const v of u.events)
1138
+ P
1139
+ ]), V = U(() => {
1140
+ const c = /* @__PURE__ */ new Map();
1141
+ for (const h of q)
1142
+ for (const v of h.events)
1142
1143
  if (v.spanCols === 1) {
1143
- const k = a.get(v.startCol) ?? 0;
1144
- a.set(v.startCol, k + 1);
1144
+ const S = c.get(v.startCol) ?? 0;
1145
+ c.set(v.startCol, S + 1);
1145
1146
  }
1146
- return a;
1147
- }, [F]), j = B(() => {
1148
- const a = C.length, u = we, v = [];
1149
- for (let k = 0; k < a; k++) {
1150
- const N = O.get(k) ?? 0;
1151
- N > Te ? v.push(
1152
- Le + (N - Te) * 20
1153
- ) : N > 0 ? v.push(Math.max(u, Le)) : v.push(u);
1147
+ return c;
1148
+ }, [q]), B = U(() => {
1149
+ const c = W.length, h = Ce, v = [];
1150
+ for (let S = 0; S < c; S++) {
1151
+ const k = V.get(S) ?? 0;
1152
+ k > Fe ? v.push(
1153
+ Ae + (k - Fe) * 20
1154
+ ) : k > 0 ? v.push(Math.max(h, Ae)) : v.push(h);
1154
1155
  }
1155
1156
  return v;
1156
1157
  }, [
1157
- L,
1158
- C.length,
1159
- I.length,
1160
- O
1161
- ]), _ = (a) => Math.max(
1162
- jt,
1163
- a * (ve + ze) + He * 2
1164
- ), U = de + j.reduce((a, u) => a + u, 0), m = B(() => {
1165
- const a = [0];
1166
- for (let u = 0; u < j.length; u++)
1167
- a.push(a[u] + j[u]);
1168
- return a;
1169
- }, [j]);
1170
- return Qe(() => {
1171
- const a = S.current;
1172
- if (!a) return;
1173
- const u = () => {
1158
+ I,
1159
+ W.length,
1160
+ w.length,
1161
+ V
1162
+ ]), m = (c) => Math.max(
1163
+ Bt,
1164
+ c * (Ne + je) + We * 2
1165
+ ), b = me + B.reduce((c, h) => c + h, 0), E = U(() => {
1166
+ const c = [0];
1167
+ for (let h = 0; h < B.length; h++)
1168
+ c.push(c[h] + B[h]);
1169
+ return c;
1170
+ }, [B]);
1171
+ tt(() => {
1172
+ const c = A.current;
1173
+ if (!c) return;
1174
+ const h = () => {
1174
1175
  let v = -1;
1175
- const N = (/* @__PURE__ */ new Date()).getHours();
1176
+ const k = (/* @__PURE__ */ new Date()).getHours();
1176
1177
  {
1177
- for (let E = 0; E < C.length; E++) {
1178
- const H = C[E];
1179
- if (H && G(H.date) && H.hour <= N && H.hour + 1 > N) {
1180
- v = E;
1178
+ for (let D = 0; D < W.length; D++) {
1179
+ const M = W[D];
1180
+ if (M && te(M.date) && M.hour <= k && M.hour + 1 > k) {
1181
+ v = D;
1181
1182
  break;
1182
1183
  }
1183
1184
  }
1184
1185
  if (v === -1)
1185
- for (let E = 0; E < C.length; E++) {
1186
- const H = C[E];
1187
- if (H && G(H.date)) {
1188
- v = E;
1186
+ for (let D = 0; D < W.length; D++) {
1187
+ const M = W[D];
1188
+ if (M && te(M.date)) {
1189
+ v = D;
1189
1190
  break;
1190
1191
  }
1191
1192
  }
1192
1193
  }
1193
1194
  if (v !== -1) {
1194
- const E = (m[v] ?? 0) + de, H = a.clientWidth, P = Math.max(0, E - H / 3);
1195
- a.scrollTo({
1196
- left: P,
1195
+ const D = (E[v] ?? 0) + me, M = c.clientWidth, J = Math.max(0, D - M / 3);
1196
+ c.scrollTo({
1197
+ left: J,
1197
1198
  behavior: "instant"
1198
1199
  });
1199
1200
  }
1200
1201
  };
1201
1202
  requestAnimationFrame(() => {
1202
- requestAnimationFrame(u);
1203
+ requestAnimationFrame(h);
1203
1204
  });
1204
- }, [W, C, I, m, L]), /* @__PURE__ */ e("div", { className: h("flex h-full flex-col", f), children: /* @__PURE__ */ e("div", { className: "ic-timeline-scroll-container flex-1", ref: S, children: /* @__PURE__ */ n("div", { className: "relative", style: { minWidth: U }, children: [
1205
+ }, [j, W, w, E, I]);
1206
+ const $ = X(
1207
+ (c, h) => {
1208
+ const v = h.querySelector(".ic-timeline-grid");
1209
+ if (!v) return -1;
1210
+ const S = v.getBoundingClientRect(), k = c - S.left + v.scrollLeft;
1211
+ for (let D = 0; D < E.length - 1; D++) {
1212
+ const M = E[D], J = E[D + 1];
1213
+ if (k >= M && k < J) return D;
1214
+ }
1215
+ return -1;
1216
+ },
1217
+ [E]
1218
+ ), H = X(
1219
+ (c) => {
1220
+ if (W[c]) {
1221
+ const h = W[c], v = new Date(h.date);
1222
+ return v.setHours(h.hour, 0, 0, 0), { date: v, hour: h.hour };
1223
+ }
1224
+ return { date: /* @__PURE__ */ new Date() };
1225
+ },
1226
+ [I, W, w]
1227
+ ), Q = X(
1228
+ (c, h) => {
1229
+ if (c.preventDefault(), c.dataTransfer.dropEffect = "move", !z?.isDragging) return;
1230
+ const v = $(c.clientX, c.currentTarget);
1231
+ if (v < 0) return;
1232
+ const { date: S, hour: k } = H(v);
1233
+ z.updateDragPreview(S, k, void 0, h);
1234
+ },
1235
+ [z, $, H]
1236
+ ), re = X(
1237
+ (c, h) => {
1238
+ c.preventDefault(), z?.isDragging && z.endDrag();
1239
+ },
1240
+ [z]
1241
+ );
1242
+ return /* @__PURE__ */ e("div", { className: u("flex h-full flex-col", f), children: /* @__PURE__ */ e("div", { className: "ic-timeline-scroll-container flex-1", ref: A, children: /* @__PURE__ */ n("div", { className: "relative", style: { minWidth: b }, children: [
1205
1243
  // Hour mode: Day headers + Hour sub-headers - sticky wrapper with flex child (sticky + flex breaks sticky)
1206
1244
  /* @__PURE__ */ e("div", { className: "ic-timeline-header sticky top-0 z-20 border-b bg-background", children: /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
1207
1245
  t > 1 && /* @__PURE__ */ n("div", { className: "flex border-b", children: [
@@ -1209,23 +1247,23 @@ function ue({
1209
1247
  "div",
1210
1248
  {
1211
1249
  className: "flex shrink-0 items-center border-r bg-background px-2 py-1",
1212
- style: { width: de },
1250
+ style: { width: me },
1213
1251
  children: /* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase text-muted-foreground", children: "Resources" })
1214
1252
  }
1215
1253
  ),
1216
- I.map((a, u) => {
1217
- const v = G(a), k = u * T, N = j.slice(k, k + T).reduce((E, H) => E + H, 0);
1254
+ w.map((c, h) => {
1255
+ const v = te(c), S = h * _, k = B.slice(S, S + _).reduce((D, M) => D + M, 0);
1218
1256
  return /* @__PURE__ */ e(
1219
1257
  "div",
1220
1258
  {
1221
- className: h(
1259
+ className: u(
1222
1260
  "flex shrink-0 items-center justify-center border-r py-1.5 font-medium",
1223
1261
  v ? "bg-primary/10 text-primary" : "bg-muted/30"
1224
1262
  ),
1225
- style: { width: N },
1226
- children: /* @__PURE__ */ e("span", { className: "text-xs", children: Pt(a) })
1263
+ style: { width: k },
1264
+ children: /* @__PURE__ */ e("span", { className: "text-xs", children: Ut(c) })
1227
1265
  },
1228
- `day-${a.toISOString()}`
1266
+ `day-${c.toISOString()}`
1229
1267
  );
1230
1268
  })
1231
1269
  ] }),
@@ -1233,128 +1271,137 @@ function ue({
1233
1271
  /* @__PURE__ */ e(
1234
1272
  "div",
1235
1273
  {
1236
- className: h(
1274
+ className: u(
1237
1275
  "flex shrink-0 items-center border-r bg-background px-2 py-2",
1238
1276
  t > 1 && "sticky left-0 z-10"
1239
1277
  ),
1240
- style: { width: de },
1278
+ style: { width: me },
1241
1279
  children: t === 1 && /* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase text-muted-foreground", children: "Resources" })
1242
1280
  }
1243
1281
  ),
1244
- C.map((a, u) => {
1245
- const v = a.hour === D, k = G(a.date), N = j[u] ?? we;
1282
+ W.map((c, h) => {
1283
+ const v = c.hour === C, S = te(c.date), k = B[h] ?? Ce;
1246
1284
  return /* @__PURE__ */ e(
1247
1285
  "div",
1248
1286
  {
1249
- className: h(
1287
+ className: u(
1250
1288
  "flex shrink-0 items-center justify-center py-1.5 text-[10px] text-muted-foreground",
1251
- v && u > 0 ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1252
- k && "bg-primary/5"
1289
+ v && h > 0 ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1290
+ S && "bg-primary/5"
1253
1291
  ),
1254
- style: { width: N },
1255
- children: Ot(a.hour)
1292
+ style: { width: k },
1293
+ children: Vt(c.hour)
1256
1294
  },
1257
- `hour-${a.dayIndex}-${a.hour}`
1295
+ `hour-${c.dayIndex}-${c.hour}`
1258
1296
  );
1259
1297
  })
1260
1298
  ] })
1261
1299
  ] }) }),
1262
- F.map((a) => {
1263
- const u = _(a.maxStack);
1300
+ q.map((c) => {
1301
+ const h = m(c.maxStack);
1264
1302
  return /* @__PURE__ */ n(
1265
1303
  "div",
1266
1304
  {
1267
- className: h(
1305
+ className: u(
1268
1306
  "relative flex border-b",
1269
1307
  p?.resourceRow
1270
1308
  ),
1271
- style: { height: u },
1309
+ style: { height: h },
1272
1310
  children: [
1273
1311
  /* @__PURE__ */ e(
1274
1312
  "div",
1275
1313
  {
1276
1314
  className: "sticky left-0 z-10",
1277
- style: { width: de },
1315
+ style: { width: me },
1278
1316
  children: /* @__PURE__ */ n(
1279
1317
  "div",
1280
1318
  {
1281
- className: h(
1319
+ className: u(
1282
1320
  "flex h-full items-center gap-2 sm:gap-3 border-r bg-background px-2 sm:px-4",
1283
1321
  p?.resourceHeader
1284
1322
  ),
1285
1323
  children: [
1286
1324
  /* @__PURE__ */ e(
1287
- _t,
1325
+ Yt,
1288
1326
  {
1289
1327
  className: "size-7",
1290
- src: a.user.avatar,
1291
- alt: a.user.name,
1292
- fallback: Ft(a.user.name)
1328
+ src: c.user.avatar,
1329
+ alt: c.user.name,
1330
+ fallback: _t(c.user.name)
1293
1331
  }
1294
1332
  ),
1295
- /* @__PURE__ */ e("span", { className: "truncate text-xs sm:text-sm font-medium", children: a.user.name })
1333
+ /* @__PURE__ */ e("span", { className: "truncate text-xs sm:text-sm font-medium", children: c.user.name })
1296
1334
  ]
1297
1335
  }
1298
1336
  )
1299
1337
  }
1300
1338
  ),
1301
- /* @__PURE__ */ n("div", { className: "relative flex", children: [
1302
- // Hour mode cells
1303
- C.map((v, k) => {
1304
- const N = v.hour === D && k > 0, E = j[k] ?? we;
1305
- return /* @__PURE__ */ e(
1306
- "div",
1307
- {
1308
- className: h(
1309
- "shrink-0",
1310
- N ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1311
- G(v.date) && "bg-primary/5"
1312
- ),
1313
- style: { width: E }
1314
- },
1315
- `cell-${v.dayIndex}-${v.hour}`
1316
- );
1317
- }),
1318
- a.events.map((v) => {
1319
- const k = (m[v.startCol] ?? 0) + 2, N = m[v.startCol + v.spanCols] ?? m[m.length - 1] ?? 0, E = m[v.startCol] ?? 0, H = N - E - 4, P = He + v.stackIndex * (ve + ze);
1320
- return /* @__PURE__ */ e(
1321
- "div",
1322
- {
1323
- className: "absolute",
1324
- style: {
1325
- left: k,
1326
- width: Math.max(H, 0),
1327
- // No forced minimum - columns are guaranteed wide enough
1328
- top: P,
1329
- height: ve
1330
- },
1331
- children: /* @__PURE__ */ e(
1332
- nt,
1339
+ /* @__PURE__ */ n(
1340
+ "div",
1341
+ {
1342
+ className: "ic-timeline-grid relative flex",
1343
+ onDragOver: (v) => Q(v, c.user.id),
1344
+ onDrop: (v) => re(v, c.user.id),
1345
+ children: [
1346
+ // Hour mode cells
1347
+ W.map((v, S) => {
1348
+ const k = v.hour === C && S > 0, D = B[S] ?? Ce;
1349
+ return /* @__PURE__ */ e(
1350
+ "div",
1333
1351
  {
1334
- event: v.event,
1335
- variant: "compact",
1336
- onClick: l,
1337
- renderPopover: x,
1338
- className: h(
1339
- "h-full w-full",
1340
- p?.eventCardCompact
1352
+ className: u(
1353
+ "shrink-0",
1354
+ k ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1355
+ te(v.date) && "bg-primary/5"
1356
+ ),
1357
+ style: { width: D }
1358
+ },
1359
+ `cell-${v.dayIndex}-${v.hour}`
1360
+ );
1361
+ }),
1362
+ c.events.map((v) => {
1363
+ const S = (E[v.startCol] ?? 0) + 2, k = E[v.startCol + v.spanCols] ?? E[E.length - 1] ?? 0, D = E[v.startCol] ?? 0, M = k - D - 4, J = We + v.stackIndex * (Ne + je);
1364
+ return /* @__PURE__ */ e(
1365
+ "div",
1366
+ {
1367
+ className: "absolute",
1368
+ style: {
1369
+ left: S,
1370
+ width: Math.max(M, 0),
1371
+ // No forced minimum - columns are guaranteed wide enough
1372
+ top: J,
1373
+ height: Ne
1374
+ },
1375
+ children: /* @__PURE__ */ e(
1376
+ at,
1377
+ {
1378
+ event: v.event,
1379
+ variant: "compact",
1380
+ enableDrag: L,
1381
+ onClick: i,
1382
+ renderPopover: x,
1383
+ className: u(
1384
+ "h-full w-full",
1385
+ p?.eventCardCompact
1386
+ )
1387
+ }
1341
1388
  )
1342
- }
1343
- )
1344
- },
1345
- v.event.id
1346
- );
1347
- })
1348
- ] })
1389
+ },
1390
+ v.event.id
1391
+ );
1392
+ })
1393
+ ]
1394
+ }
1395
+ )
1349
1396
  ]
1350
1397
  },
1351
- a.user.id
1398
+ c.user.id
1352
1399
  );
1353
1400
  }),
1354
- F.length === 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-20 text-muted-foreground", children: "No users or events to display" })
1401
+ q.length === 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-20 text-muted-foreground", children: "No users or events to display" })
1355
1402
  ] }) }) });
1356
1403
  }
1357
- const Vt = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], Ut = [
1404
+ const Kt = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], qt = [
1358
1405
  "January",
1359
1406
  "February",
1360
1407
  "March",
@@ -1368,18 +1415,18 @@ const Vt = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], Ut = [
1368
1415
  "November",
1369
1416
  "December"
1370
1417
  ];
1371
- function je(t) {
1418
+ function $e(t) {
1372
1419
  const r = t.hexColor;
1373
1420
  return r ? { backgroundColor: r } : {};
1374
1421
  }
1375
- function Yt({ day: t, date: r, events: o, isCurrentMonth: s, onDayClick: i }) {
1376
- const l = G(r), g = 3, f = o.length;
1422
+ function Jt({ day: t, date: r, events: o, isCurrentMonth: s, onDayClick: a }) {
1423
+ const i = te(r), g = 3, f = o.length;
1377
1424
  return /* @__PURE__ */ n(
1378
1425
  "button",
1379
1426
  {
1380
1427
  type: "button",
1381
- onClick: () => i?.(r),
1382
- className: h(
1428
+ onClick: () => a?.(r),
1429
+ className: u(
1383
1430
  "flex h-9 sm:h-11 flex-1 flex-col items-center justify-start gap-0.5 rounded-md pt-0.5 sm:pt-1",
1384
1431
  "hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
1385
1432
  "transition-colors",
@@ -1389,28 +1436,28 @@ function Yt({ day: t, date: r, events: o, isCurrentMonth: s, onDayClick: i }) {
1389
1436
  /* @__PURE__ */ e(
1390
1437
  "div",
1391
1438
  {
1392
- className: h(
1439
+ className: u(
1393
1440
  "flex size-5 sm:size-6 items-center justify-center rounded-full text-[10px] sm:text-xs font-medium",
1394
- l && "bg-primary font-semibold text-primary-foreground"
1441
+ i && "bg-primary font-semibold text-primary-foreground"
1395
1442
  ),
1396
1443
  children: t
1397
1444
  }
1398
1445
  ),
1399
- f > 0 && /* @__PURE__ */ e("div", { className: "mt-0.5 flex items-center gap-0.5", children: f <= g ? o.map((c) => /* @__PURE__ */ e(
1446
+ f > 0 && /* @__PURE__ */ e("div", { className: "mt-0.5 flex items-center gap-0.5", children: f <= g ? o.map((l) => /* @__PURE__ */ e(
1400
1447
  "div",
1401
1448
  {
1402
1449
  className: "size-1 sm:size-1.5 rounded-full bg-primary",
1403
- style: je(c)
1450
+ style: $e(l)
1404
1451
  },
1405
- c.id
1406
- )) : /* @__PURE__ */ n(re, { children: [
1407
- o.slice(0, g).map((c) => /* @__PURE__ */ e(
1452
+ l.id
1453
+ )) : /* @__PURE__ */ n(ce, { children: [
1454
+ o.slice(0, g).map((l) => /* @__PURE__ */ e(
1408
1455
  "div",
1409
1456
  {
1410
1457
  className: "size-1 sm:size-1.5 rounded-full bg-primary",
1411
- style: je(c)
1458
+ style: $e(l)
1412
1459
  },
1413
- c.id
1460
+ l.id
1414
1461
  )),
1415
1462
  /* @__PURE__ */ n("span", { className: "text-[6px] sm:text-[7px] font-medium text-muted-foreground", children: [
1416
1463
  "+",
@@ -1421,74 +1468,74 @@ function Yt({ day: t, date: r, events: o, isCurrentMonth: s, onDayClick: i }) {
1421
1468
  }
1422
1469
  );
1423
1470
  }
1424
- function Gt({
1471
+ function Xt({
1425
1472
  date: t,
1426
1473
  events: r,
1427
1474
  onMonthClick: o,
1428
1475
  onDayClick: s
1429
1476
  }) {
1430
- const i = B(() => ft(t, 0), [t]);
1477
+ const a = U(() => vt(t, 0), [t]);
1431
1478
  return /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
1432
1479
  /* @__PURE__ */ e(
1433
1480
  "button",
1434
1481
  {
1435
1482
  type: "button",
1436
1483
  onClick: () => o?.(t),
1437
- className: h(
1484
+ className: u(
1438
1485
  "w-full rounded-t-lg border px-2 sm:px-3 py-1.5 sm:py-2 text-xs sm:text-sm font-semibold",
1439
1486
  "hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
1440
1487
  "transition-colors"
1441
1488
  ),
1442
- children: Ut[t.getMonth()]
1489
+ children: qt[t.getMonth()]
1443
1490
  }
1444
1491
  ),
1445
1492
  /* @__PURE__ */ n("div", { className: "flex-1 space-y-1.5 sm:space-y-2 rounded-b-lg border border-t-0 p-2 sm:p-3", children: [
1446
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 text-center", children: Vt.map((l, g) => /* @__PURE__ */ n("div", { className: "text-[9px] sm:text-xs font-medium text-muted-foreground", children: [
1447
- /* @__PURE__ */ e("span", { className: "sm:hidden", children: l[0] }),
1448
- /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: l })
1493
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 text-center", children: Kt.map((i, g) => /* @__PURE__ */ n("div", { className: "text-[9px] sm:text-xs font-medium text-muted-foreground", children: [
1494
+ /* @__PURE__ */ e("span", { className: "sm:hidden", children: i[0] }),
1495
+ /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: i })
1449
1496
  ] }, g)) }),
1450
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 gap-y-1", children: i.map((l, g) => {
1451
- const f = gt(r, l.date);
1497
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 gap-y-1", children: a.map((i, g) => {
1498
+ const f = wt(r, i.date);
1452
1499
  return /* @__PURE__ */ e(
1453
- Yt,
1500
+ Jt,
1454
1501
  {
1455
- day: l.date.getDate(),
1456
- date: l.date,
1502
+ day: i.date.getDate(),
1503
+ date: i.date,
1457
1504
  events: f,
1458
- isCurrentMonth: l.isCurrentMonth,
1505
+ isCurrentMonth: i.isCurrentMonth,
1459
1506
  onDayClick: s
1460
1507
  },
1461
- `${g + 1}-${l.date.toISOString()}`
1508
+ `${g + 1}-${i.date.toISOString()}`
1462
1509
  );
1463
1510
  }) })
1464
1511
  ] })
1465
1512
  ] });
1466
1513
  }
1467
- function Kt({
1514
+ function Qt({
1468
1515
  events: t,
1469
1516
  year: r,
1470
1517
  onMonthClick: o,
1471
1518
  onDayClick: s,
1472
- className: i,
1473
- slots: l,
1519
+ className: a,
1520
+ slots: i,
1474
1521
  classNames: g
1475
1522
  }) {
1476
- const f = B(() => mt(r), [r]);
1477
- return /* @__PURE__ */ n("div", { className: h("flex flex-col h-full", i), children: [
1523
+ const f = U(() => pt(r), [r]);
1524
+ return /* @__PURE__ */ n("div", { className: u("flex flex-col h-full", a), children: [
1478
1525
  /* @__PURE__ */ e("div", { className: "flex items-center justify-center border-b px-4 py-3", children: /* @__PURE__ */ e("h2", { className: "text-lg font-semibold", children: r }) }),
1479
- /* @__PURE__ */ e("div", { className: "flex-1 overflow-auto p-4", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4", children: f.map((c) => /* @__PURE__ */ e(
1480
- Gt,
1526
+ /* @__PURE__ */ e("div", { className: "flex-1 overflow-auto p-4", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4", children: f.map((l) => /* @__PURE__ */ e(
1527
+ Xt,
1481
1528
  {
1482
- date: c,
1529
+ date: l,
1483
1530
  events: t,
1484
1531
  onMonthClick: o,
1485
1532
  onDayClick: s
1486
1533
  },
1487
- c.getMonth()
1534
+ l.getMonth()
1488
1535
  )) }) })
1489
1536
  ] });
1490
1537
  }
1491
- function qt(t) {
1538
+ function Zt(t) {
1492
1539
  switch (t) {
1493
1540
  case "day":
1494
1541
  case "week":
@@ -1497,68 +1544,71 @@ function qt(t) {
1497
1544
  return "day";
1498
1545
  }
1499
1546
  }
1500
- function Jt({
1547
+ function er({
1501
1548
  onEventClick: t,
1502
1549
  onSlotClick: r,
1503
1550
  onSlotSelect: o,
1504
1551
  onAddEvent: s,
1505
- className: i,
1506
- showHeader: l = !0,
1552
+ className: a,
1553
+ showHeader: i = !0,
1507
1554
  minSelectionMinutes: g = 30,
1508
1555
  showMoreMode: f,
1509
- showMoreEventsInPopover: c = !1,
1556
+ showMoreEventsInPopover: l = !1,
1510
1557
  isLoading: x = !1,
1511
- slots: b,
1558
+ slots: y,
1512
1559
  classNames: p,
1513
- settingsContent: S,
1514
- filterContent: W,
1515
- headerActions: L,
1516
- renderPopover: D,
1517
- calendarRef: z
1560
+ settingsContent: L,
1561
+ filterContent: A,
1562
+ headerActions: z,
1563
+ renderPopover: j,
1564
+ calendarRef: I,
1565
+ headerConfig: C,
1566
+ eventDetailMode: T,
1567
+ renderEventDetail: _
1518
1568
  }) {
1519
- const T = f ?? (c ? "popover" : "expand"), {
1569
+ const Y = f ?? (l ? "popover" : "expand"), {
1520
1570
  view: w,
1521
- setView: I,
1522
- selectedDate: C,
1523
- setSelectedDate: A,
1524
- slotDuration: R,
1525
- filteredEvents: V,
1526
- users: F,
1527
- visibleHours: O,
1528
- workingHours: j,
1529
- badgeVariant: _,
1530
- showWorkingHoursOnly: U,
1531
- clearFocusEventId: m
1532
- } = ut(), a = B(() => {
1533
- if (!U || !j)
1571
+ setView: W,
1572
+ selectedDate: F,
1573
+ setSelectedDate: P,
1574
+ slotDuration: K,
1575
+ filteredEvents: q,
1576
+ users: V,
1577
+ visibleHours: B,
1578
+ workingHours: m,
1579
+ badgeVariant: b,
1580
+ showWorkingHoursOnly: E,
1581
+ clearFocusEventId: $
1582
+ } = gt(), H = U(() => {
1583
+ if (!E || !m)
1534
1584
  return {
1535
- startHour: O.start,
1536
- endHour: O.end
1585
+ startHour: B.start,
1586
+ endHour: B.end
1537
1587
  };
1538
- let d = 24, y = 0;
1539
- for (const M of Object.keys(j)) {
1540
- const $ = j[Number(M)];
1541
- !$ || $.enabled === !1 || ($.from < d && (d = $.from), $.to > y && (y = $.to));
1588
+ let d = 24, N = 0;
1589
+ for (const O of Object.keys(m)) {
1590
+ const G = m[Number(O)];
1591
+ !G || G.enabled === !1 || (G.from < d && (d = G.from), G.to > N && (N = G.to));
1542
1592
  }
1543
- return d >= y ? {
1544
- startHour: O.start,
1545
- endHour: O.end
1546
- } : { startHour: d, endHour: y };
1547
- }, [U, j, O]), u = a, v = Ne(null);
1548
- Ze(
1549
- z,
1593
+ return d >= N ? {
1594
+ startHour: B.start,
1595
+ endHour: B.end
1596
+ } : { startHour: d, endHour: N };
1597
+ }, [E, m, B]), Q = H, re = Ee(null);
1598
+ rt(
1599
+ I,
1550
1600
  () => ({
1551
1601
  scrollToToday: () => {
1552
1602
  const d = /* @__PURE__ */ new Date();
1553
- A(d, w), requestAnimationFrame(() => {
1603
+ P(d, w), requestAnimationFrame(() => {
1554
1604
  requestAnimationFrame(() => {
1555
- const y = v.current?.querySelector(
1605
+ const N = re.current?.querySelector(
1556
1606
  ".ic-timeline-scroll-container, [class*='overflow-auto']"
1557
1607
  );
1558
- if (!y) return;
1559
- const se = (d.getHours() - a.startHour) * 96;
1560
- se > 0 && y.scrollTo({
1561
- top: Math.max(0, se - 100),
1608
+ if (!N) return;
1609
+ const ee = (d.getHours() - H.startHour) * 96;
1610
+ ee > 0 && N.scrollTo({
1611
+ top: Math.max(0, ee - 100),
1562
1612
  // Offset to show some context
1563
1613
  behavior: "smooth"
1564
1614
  });
@@ -1567,298 +1617,304 @@ function Jt({
1567
1617
  },
1568
1618
  scrollToWorkingHours: () => {
1569
1619
  let d = 8;
1570
- if (j)
1571
- for (const y of Object.keys(j)) {
1572
- const M = j[Number(y)];
1573
- M?.enabled && M.from < d && (d = Math.max(M.from - 1, 0));
1620
+ if (m)
1621
+ for (const N of Object.keys(m)) {
1622
+ const O = m[Number(N)];
1623
+ O?.enabled && O.from < d && (d = Math.max(O.from - 1, 0));
1574
1624
  }
1575
1625
  requestAnimationFrame(() => {
1576
1626
  requestAnimationFrame(() => {
1577
- const y = v.current?.querySelector(
1627
+ const N = re.current?.querySelector(
1578
1628
  ".ic-timeline-scroll-container, [class*='overflow-auto']"
1579
1629
  );
1580
- if (!y) return;
1581
- const $ = (d - a.startHour) * 96;
1582
- y.scrollTo({
1583
- top: Math.max(0, $),
1630
+ if (!N) return;
1631
+ const G = (d - H.startHour) * 96;
1632
+ N.scrollTo({
1633
+ top: Math.max(0, G),
1584
1634
  behavior: "smooth"
1585
1635
  });
1586
1636
  });
1587
1637
  });
1588
1638
  },
1589
- getViewRect: () => v.current?.getBoundingClientRect() ?? null,
1639
+ getViewRect: () => re.current?.getBoundingClientRect() ?? null,
1590
1640
  focusEvent: (d) => {
1591
- m(), requestAnimationFrame(() => {
1592
- m();
1641
+ $(), requestAnimationFrame(() => {
1642
+ $();
1593
1643
  });
1594
- const y = v.current?.querySelector(
1644
+ const N = re.current?.querySelector(
1595
1645
  `[data-event-id="${d}"]`
1596
1646
  );
1597
- y && setTimeout(() => y.click(), 150);
1647
+ N && setTimeout(() => N.click(), 150);
1598
1648
  }
1599
1649
  }),
1600
- [A, w, a, j, m]
1650
+ [
1651
+ P,
1652
+ w,
1653
+ H,
1654
+ m,
1655
+ $
1656
+ ]
1601
1657
  );
1602
- const k = B(() => qt(w), [w]), N = ne(
1658
+ const c = U(() => Zt(w), [w]), h = X(
1603
1659
  (d) => {
1604
1660
  if (o) {
1605
1661
  o(d);
1606
1662
  return;
1607
1663
  }
1608
1664
  if (r) {
1609
- const y = d.startDate.getHours();
1610
- r(d.startDate, y);
1665
+ const N = d.startDate.getHours();
1666
+ r(d.startDate, N);
1611
1667
  }
1612
1668
  },
1613
1669
  [o, r]
1614
- ), E = ne(
1670
+ ), v = X(
1615
1671
  (d) => {
1616
- I("day"), A(d, "day");
1672
+ W("day"), P(d, "day");
1617
1673
  },
1618
- [A, I]
1619
- ), H = ne(
1674
+ [P, W]
1675
+ ), S = X(
1620
1676
  (d) => {
1621
- I("month"), A(d, "month");
1677
+ W("month"), P(d, "month");
1622
1678
  },
1623
- [A, I]
1624
- ), P = ne(
1679
+ [P, W]
1680
+ ), k = X(
1625
1681
  (d) => {
1626
1682
  t?.(d);
1627
1683
  },
1628
1684
  [t]
1629
- ), K = () => {
1630
- const d = V, y = P, M = D;
1685
+ ), D = () => {
1686
+ const d = q, N = k, O = j;
1631
1687
  switch (w) {
1632
1688
  case "day":
1633
1689
  return /* @__PURE__ */ e(
1634
- it,
1690
+ dt,
1635
1691
  {
1636
1692
  events: d,
1637
- date: C,
1638
- visibleHours: u,
1639
- workingHours: j,
1640
- slotDuration: R,
1641
- badgeVariant: _,
1642
- onEventClick: y,
1643
- renderPopover: M,
1644
- ...b && { slots: b },
1693
+ date: F,
1694
+ visibleHours: Q,
1695
+ workingHours: m,
1696
+ slotDuration: K,
1697
+ badgeVariant: b,
1698
+ onEventClick: N,
1699
+ renderPopover: O,
1700
+ ...y && { slots: y },
1645
1701
  ...p && { classNames: p }
1646
1702
  }
1647
1703
  );
1648
1704
  case "week":
1649
1705
  return /* @__PURE__ */ e(
1650
- at,
1706
+ ct,
1651
1707
  {
1652
1708
  events: d,
1653
- date: C,
1654
- visibleHours: u,
1655
- workingHours: j,
1656
- slotDuration: R,
1657
- badgeVariant: _,
1658
- onEventClick: y,
1659
- renderPopover: M,
1660
- ...b && { slots: b },
1709
+ date: F,
1710
+ visibleHours: Q,
1711
+ workingHours: m,
1712
+ slotDuration: K,
1713
+ badgeVariant: b,
1714
+ onEventClick: N,
1715
+ renderPopover: O,
1716
+ ...y && { slots: y },
1661
1717
  ...p && { classNames: p }
1662
1718
  }
1663
1719
  );
1664
1720
  case "month":
1665
1721
  return /* @__PURE__ */ e(
1666
- De,
1722
+ He,
1667
1723
  {
1668
1724
  events: d,
1669
- date: C,
1670
- badgeVariant: _,
1671
- onEventClick: y,
1672
- onDayClick: E,
1673
- renderPopover: M,
1674
- showMoreMode: T,
1675
- ...b && { slots: b },
1725
+ date: F,
1726
+ badgeVariant: b,
1727
+ onEventClick: N,
1728
+ onDayClick: v,
1729
+ renderPopover: O,
1730
+ showMoreMode: Y,
1731
+ ...y && { slots: y },
1676
1732
  ...p && { classNames: p }
1677
1733
  }
1678
1734
  );
1679
1735
  case "year":
1680
1736
  return /* @__PURE__ */ e(
1681
- Kt,
1737
+ Qt,
1682
1738
  {
1683
1739
  events: d,
1684
- year: C.getFullYear(),
1685
- onMonthClick: H,
1686
- onDayClick: E,
1687
- ...b && { slots: b },
1740
+ year: F.getFullYear(),
1741
+ onMonthClick: S,
1742
+ onDayClick: v,
1743
+ ...y && { slots: y },
1688
1744
  ...p && { classNames: p }
1689
1745
  }
1690
1746
  );
1691
1747
  case "agenda":
1692
1748
  return /* @__PURE__ */ e(
1693
- st,
1749
+ lt,
1694
1750
  {
1695
1751
  events: d,
1696
- date: C,
1697
- onEventClick: y,
1698
- renderPopover: M,
1699
- ...b && { slots: b },
1752
+ date: F,
1753
+ onEventClick: N,
1754
+ renderPopover: O,
1755
+ ...y && { slots: y },
1700
1756
  ...p && { classNames: p }
1701
1757
  }
1702
1758
  );
1703
1759
  // Resource views — delegate to TimelineView with matching day count
1704
1760
  case "resource-day":
1705
1761
  return /* @__PURE__ */ e(
1706
- ue,
1762
+ fe,
1707
1763
  {
1708
1764
  daysToShow: 1,
1709
1765
  events: d,
1710
- users: F,
1711
- selectedDate: C,
1766
+ users: V,
1767
+ selectedDate: F,
1712
1768
  visibleHours: {
1713
- from: a.startHour,
1714
- to: a.endHour
1769
+ from: H.startHour,
1770
+ to: H.endHour
1715
1771
  },
1716
- onEventClick: y,
1717
- renderPopover: M,
1718
- ...b && { slots: b },
1772
+ onEventClick: N,
1773
+ renderPopover: O,
1774
+ ...y && { slots: y },
1719
1775
  ...p && { classNames: p }
1720
1776
  }
1721
1777
  );
1722
1778
  case "resource-week":
1723
1779
  return /* @__PURE__ */ e(
1724
- ue,
1780
+ fe,
1725
1781
  {
1726
1782
  daysToShow: 7,
1727
1783
  events: d,
1728
- users: F,
1729
- selectedDate: C,
1784
+ users: V,
1785
+ selectedDate: F,
1730
1786
  visibleHours: {
1731
- from: a.startHour,
1732
- to: a.endHour
1787
+ from: H.startHour,
1788
+ to: H.endHour
1733
1789
  },
1734
- onEventClick: y,
1735
- renderPopover: M,
1736
- ...b && { slots: b },
1790
+ onEventClick: N,
1791
+ renderPopover: O,
1792
+ ...y && { slots: y },
1737
1793
  ...p && { classNames: p }
1738
1794
  }
1739
1795
  );
1740
1796
  // Timeline views
1741
1797
  case "timeline-day":
1742
1798
  return /* @__PURE__ */ e(
1743
- ue,
1799
+ fe,
1744
1800
  {
1745
1801
  daysToShow: 1,
1746
1802
  events: d,
1747
- users: F,
1748
- selectedDate: C,
1803
+ users: V,
1804
+ selectedDate: F,
1749
1805
  visibleHours: {
1750
- from: a.startHour,
1751
- to: a.endHour
1806
+ from: H.startHour,
1807
+ to: H.endHour
1752
1808
  },
1753
- onEventClick: y,
1754
- renderPopover: M,
1755
- ...b && { slots: b },
1809
+ onEventClick: N,
1810
+ renderPopover: O,
1811
+ ...y && { slots: y },
1756
1812
  ...p && { classNames: p }
1757
1813
  }
1758
1814
  );
1759
1815
  case "timeline-3day":
1760
1816
  return /* @__PURE__ */ e(
1761
- ue,
1817
+ fe,
1762
1818
  {
1763
1819
  daysToShow: 3,
1764
1820
  events: d,
1765
- users: F,
1766
- selectedDate: C,
1821
+ users: V,
1822
+ selectedDate: F,
1767
1823
  visibleHours: {
1768
- from: a.startHour,
1769
- to: a.endHour
1824
+ from: H.startHour,
1825
+ to: H.endHour
1770
1826
  },
1771
- onEventClick: y,
1772
- renderPopover: M,
1773
- ...b && { slots: b },
1827
+ onEventClick: N,
1828
+ renderPopover: O,
1829
+ ...y && { slots: y },
1774
1830
  ...p && { classNames: p }
1775
1831
  }
1776
1832
  );
1777
1833
  case "timeline-week":
1778
1834
  return /* @__PURE__ */ e(
1779
- ue,
1835
+ fe,
1780
1836
  {
1781
1837
  daysToShow: 7,
1782
1838
  events: d,
1783
- users: F,
1784
- selectedDate: C,
1839
+ users: V,
1840
+ selectedDate: F,
1785
1841
  visibleHours: {
1786
- from: a.startHour,
1787
- to: a.endHour
1842
+ from: H.startHour,
1843
+ to: H.endHour
1788
1844
  },
1789
- onEventClick: y,
1790
- renderPopover: M,
1791
- ...b && { slots: b },
1845
+ onEventClick: N,
1846
+ renderPopover: O,
1847
+ ...y && { slots: y },
1792
1848
  ...p && { classNames: p }
1793
1849
  }
1794
1850
  );
1795
1851
  default:
1796
1852
  return /* @__PURE__ */ e(
1797
- De,
1853
+ He,
1798
1854
  {
1799
1855
  events: d,
1800
- date: C,
1801
- badgeVariant: _,
1802
- onEventClick: y,
1803
- onDayClick: E,
1804
- ...b && { slots: b },
1856
+ date: F,
1857
+ badgeVariant: b,
1858
+ onEventClick: N,
1859
+ onDayClick: v,
1860
+ ...y && { slots: y },
1805
1861
  ...p && { classNames: p }
1806
1862
  }
1807
1863
  );
1808
1864
  }
1809
- }, Y = Ne(null), [q, ie] = oe(!1);
1810
- fe(() => {
1811
- v.current = Y.current;
1812
- }), fe(() => {
1813
- const d = Y.current;
1865
+ }, M = Ee(null), [J, Z] = de(!1);
1866
+ pe(() => {
1867
+ re.current = M.current;
1868
+ }), pe(() => {
1869
+ const d = M.current;
1814
1870
  if (!d) return;
1815
- const y = () => {
1816
- const { scrollLeft: se, scrollWidth: Ke, clientWidth: qe } = d;
1817
- ie(se + qe < Ke - 4);
1871
+ const N = () => {
1872
+ const { scrollLeft: ee, scrollWidth: ve, clientWidth: ke } = d;
1873
+ Z(ee + ke < ve - 4);
1818
1874
  };
1819
- y(), d.addEventListener("scroll", y, { passive: !0 });
1820
- const M = new ResizeObserver(y);
1821
- M.observe(d);
1822
- const $ = new MutationObserver(y);
1823
- return $.observe(d, { childList: !0, subtree: !0 }), () => {
1824
- d.removeEventListener("scroll", y), M.disconnect(), $.disconnect();
1875
+ N(), d.addEventListener("scroll", N, { passive: !0 });
1876
+ const O = new ResizeObserver(N);
1877
+ O.observe(d);
1878
+ const G = new MutationObserver(N);
1879
+ return G.observe(d, { childList: !0, subtree: !0 }), () => {
1880
+ d.removeEventListener("scroll", N), O.disconnect(), G.disconnect();
1825
1881
  };
1826
1882
  }, [w]);
1827
- const le = ne(() => {
1828
- Y.current?.scrollBy({ left: 300, behavior: "smooth" });
1883
+ const R = X(() => {
1884
+ M.current?.scrollBy({ left: 300, behavior: "smooth" });
1829
1885
  }, []);
1830
1886
  return /* @__PURE__ */ e(
1831
- ht,
1887
+ xt,
1832
1888
  {
1833
- mode: k,
1834
- onSelect: N,
1889
+ mode: c,
1890
+ onSelect: h,
1835
1891
  minDurationMinutes: g,
1836
- slotDurationMinutes: R,
1892
+ slotDurationMinutes: K,
1837
1893
  enabled: !!(o || r),
1838
1894
  children: /* @__PURE__ */ n(
1839
1895
  "div",
1840
1896
  {
1841
- className: h(
1897
+ className: u(
1842
1898
  "inno-calendar-root flex flex-col h-full p-4",
1843
1899
  p?.root,
1844
- i
1900
+ a
1845
1901
  ),
1846
1902
  children: [
1847
- l && /* @__PURE__ */ e(
1848
- ot,
1903
+ i && /* @__PURE__ */ e(
1904
+ it,
1849
1905
  {
1850
- currentDate: C,
1906
+ currentDate: F,
1851
1907
  view: w,
1852
- events: V,
1853
- onViewChange: I,
1854
- onNavigateToday: () => A(/* @__PURE__ */ new Date(), w),
1908
+ events: q,
1909
+ onViewChange: W,
1910
+ onNavigateToday: () => P(/* @__PURE__ */ new Date(), w),
1855
1911
  onNavigatePrev: () => {
1856
- const d = new Date(C);
1857
- w === "day" || w === "timeline-day" || w === "resource-day" ? d.setDate(d.getDate() - 1) : w === "timeline-3day" ? d.setDate(d.getDate() - 3) : w === "week" || w === "timeline-week" || w === "resource-week" ? d.setDate(d.getDate() - 7) : w === "month" ? d.setMonth(d.getMonth() - 1) : w === "year" ? d.setFullYear(d.getFullYear() - 1) : d.setDate(d.getDate() - 7), A(d, w);
1912
+ const d = new Date(F);
1913
+ w === "day" || w === "timeline-day" || w === "resource-day" ? d.setDate(d.getDate() - 1) : w === "timeline-3day" ? d.setDate(d.getDate() - 3) : w === "week" || w === "timeline-week" || w === "resource-week" ? d.setDate(d.getDate() - 7) : w === "month" ? d.setMonth(d.getMonth() - 1) : w === "year" ? d.setFullYear(d.getFullYear() - 1) : d.setDate(d.getDate() - 7), P(d, w);
1858
1914
  },
1859
1915
  onNavigateNext: () => {
1860
- const d = new Date(C);
1861
- w === "day" || w === "timeline-day" || w === "resource-day" ? d.setDate(d.getDate() + 1) : w === "timeline-3day" ? d.setDate(d.getDate() + 3) : w === "week" || w === "timeline-week" || w === "resource-week" ? d.setDate(d.getDate() + 7) : w === "month" ? d.setMonth(d.getMonth() + 1) : w === "year" ? d.setFullYear(d.getFullYear() + 1) : d.setDate(d.getDate() + 7), A(d, w);
1916
+ const d = new Date(F);
1917
+ w === "day" || w === "timeline-day" || w === "resource-day" ? d.setDate(d.getDate() + 1) : w === "timeline-3day" ? d.setDate(d.getDate() + 3) : w === "week" || w === "timeline-week" || w === "resource-week" ? d.setDate(d.getDate() + 7) : w === "month" ? d.setMonth(d.getMonth() + 1) : w === "year" ? d.setFullYear(d.getFullYear() + 1) : d.setDate(d.getDate() + 7), P(d, w);
1862
1918
  },
1863
1919
  availableViews: [
1864
1920
  "day",
@@ -1868,31 +1924,32 @@ function Jt({
1868
1924
  "agenda"
1869
1925
  ],
1870
1926
  showTimelineViews: !0,
1871
- showSettings: !!S,
1872
- ...!L && s && { onAddEvent: s },
1873
- actions: L,
1874
- settingsContent: S,
1875
- filterContent: W
1927
+ showSettings: !!L,
1928
+ ...!z && s && { onAddEvent: s },
1929
+ actions: z,
1930
+ settingsContent: L,
1931
+ filterContent: A,
1932
+ ...C && { headerConfig: C }
1876
1933
  }
1877
1934
  ),
1878
1935
  /* @__PURE__ */ n("div", { className: "relative flex-1 min-h-0", children: [
1879
1936
  /* @__PURE__ */ e(
1880
1937
  "div",
1881
1938
  {
1882
- ref: Y,
1883
- className: h(
1939
+ ref: M,
1940
+ className: u(
1884
1941
  "h-full border rounded-lg bg-white overflow-x-auto",
1885
1942
  p?.viewContainer
1886
1943
  ),
1887
- children: K()
1944
+ children: D()
1888
1945
  }
1889
1946
  ),
1890
1947
  x && /* @__PURE__ */ e("div", { className: "inno-calendar-loading-overlay", children: /* @__PURE__ */ e("div", { className: "inno-calendar-spinner" }) }),
1891
- q && /* @__PURE__ */ e(
1948
+ J && /* @__PURE__ */ e(
1892
1949
  "button",
1893
1950
  {
1894
1951
  type: "button",
1895
- onClick: le,
1952
+ onClick: R,
1896
1953
  className: "inno-scroll-right-btn",
1897
1954
  "aria-label": "Scroll right",
1898
1955
  children: /* @__PURE__ */ n(
@@ -1923,87 +1980,93 @@ function Jt({
1923
1980
  }
1924
1981
  );
1925
1982
  }
1926
- function Xt({
1983
+ function tr({
1927
1984
  events: t,
1928
1985
  users: r = [],
1929
1986
  scheduleTypes: o = [],
1930
1987
  initialView: s = "week",
1931
- initialDate: i,
1932
- initialSelectedUserId: l,
1988
+ initialDate: a,
1989
+ initialSelectedUserId: i,
1933
1990
  initialScheduleTypeIds: g,
1934
1991
  initialParticipantIds: f,
1935
- initialWorkingHoursView: c,
1992
+ initialWorkingHoursView: l,
1936
1993
  initialSearchQuery: x,
1937
- preferencesConfig: b,
1994
+ preferencesConfig: y,
1938
1995
  onEventClick: p,
1939
- onSlotClick: S,
1940
- onSlotSelect: W,
1941
- onAddEvent: L,
1942
- onEventDrop: D,
1943
- onDateChange: z,
1944
- onViewChange: T,
1945
- className: w,
1946
- showHeader: I = !0,
1947
- minSelectionMinutes: C = 30,
1948
- showMoreMode: A,
1949
- showMoreEventsInPopover: R = !1,
1950
- isLoading: V = !1,
1951
- renderPopover: F,
1952
- slots: O,
1953
- classNames: j,
1954
- settingsContent: _,
1955
- filterContent: U,
1996
+ onSlotClick: L,
1997
+ onSlotSelect: A,
1998
+ onAddEvent: z,
1999
+ onEventDrop: j,
2000
+ onDateChange: I,
2001
+ onViewChange: C,
2002
+ className: T,
2003
+ showHeader: _ = !0,
2004
+ minSelectionMinutes: Y = 30,
2005
+ showMoreMode: w,
2006
+ showMoreEventsInPopover: W = !1,
2007
+ isLoading: F = !1,
2008
+ renderPopover: P,
2009
+ slots: K,
2010
+ classNames: q,
2011
+ settingsContent: V,
2012
+ filterContent: B,
1956
2013
  headerActions: m,
1957
- focusEventId: a
1958
- }, u) {
1959
- return /* @__PURE__ */ e(ct, { ...D && { onEventDrop: D }, children: /* @__PURE__ */ e(
1960
- dt,
2014
+ focusEventId: b,
2015
+ headerConfig: E,
2016
+ eventDetailMode: $,
2017
+ renderEventDetail: H
2018
+ }, Q) {
2019
+ return /* @__PURE__ */ e(mt, { ...j && { onEventDrop: j }, children: /* @__PURE__ */ e(
2020
+ ft,
1961
2021
  {
1962
2022
  initialEvents: t,
1963
2023
  initialUsers: r,
1964
2024
  initialScheduleTypes: o,
1965
2025
  initialView: s,
1966
- ...i && { initialDate: i },
1967
- ...l && { initialSelectedUserId: l },
2026
+ ...a && { initialDate: a },
2027
+ ...i && { initialSelectedUserId: i },
1968
2028
  ...g && { initialScheduleTypeIds: g },
1969
2029
  ...f && { initialParticipantIds: f },
1970
- ...c && { initialWorkingHoursView: c },
2030
+ ...l && { initialWorkingHoursView: l },
1971
2031
  ...x && { initialSearchQuery: x },
1972
- ...b && { preferencesConfig: b },
1973
- ...z && { onDateChange: z },
1974
- ...T && { onViewChange: T },
1975
- ...a && { initialFocusEventId: a },
2032
+ ...y && { preferencesConfig: y },
2033
+ ...I && { onDateChange: I },
2034
+ ...C && { onViewChange: C },
2035
+ ...b && { initialFocusEventId: b },
1976
2036
  children: /* @__PURE__ */ e(
1977
- Jt,
2037
+ er,
1978
2038
  {
1979
2039
  ...p && { onEventClick: p },
1980
- ...S && { onSlotClick: S },
1981
- ...W && { onSlotSelect: W },
1982
- ...L && { onAddEvent: L },
1983
- ...F && { renderPopover: F },
1984
- className: w,
1985
- showHeader: I,
1986
- minSelectionMinutes: C,
1987
- ...A && { showMoreMode: A },
1988
- showMoreEventsInPopover: R,
1989
- isLoading: V,
1990
- ...O && { slots: O },
1991
- ...j && { classNames: j },
1992
- settingsContent: _,
1993
- filterContent: U,
2040
+ ...L && { onSlotClick: L },
2041
+ ...A && { onSlotSelect: A },
2042
+ ...z && { onAddEvent: z },
2043
+ ...P && { renderPopover: P },
2044
+ className: T,
2045
+ showHeader: _,
2046
+ minSelectionMinutes: Y,
2047
+ ...w && { showMoreMode: w },
2048
+ showMoreEventsInPopover: W,
2049
+ isLoading: F,
2050
+ ...K && { slots: K },
2051
+ ...q && { classNames: q },
2052
+ settingsContent: V,
2053
+ filterContent: B,
1994
2054
  headerActions: m,
1995
- calendarRef: u
2055
+ calendarRef: Q,
2056
+ ...E && { headerConfig: E },
2057
+ ...$ && { eventDetailMode: $ },
2058
+ ...H && { renderEventDetail: H }
1996
2059
  }
1997
2060
  )
1998
2061
  }
1999
2062
  ) });
2000
2063
  }
2001
- const Kr = xe(Xt), te = xe(
2064
+ const Qr = be(tr), le = be(
2002
2065
  ({ className: t, children: r, ...o }, s) => /* @__PURE__ */ e(
2003
2066
  "select",
2004
2067
  {
2005
2068
  ref: s,
2006
- className: h(
2069
+ className: u(
2007
2070
  "flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm",
2008
2071
  "ring-offset-background",
2009
2072
  "focus:outline-none focus:ring-1 focus:ring-ring",
@@ -2016,20 +2079,20 @@ const Kr = xe(Xt), te = xe(
2016
2079
  }
2017
2080
  )
2018
2081
  );
2019
- te.displayName = "Select";
2020
- const J = xe(({ className: t, ...r }, o) => /* @__PURE__ */ e(
2082
+ le.displayName = "Select";
2083
+ const ne = be(({ className: t, ...r }, o) => /* @__PURE__ */ e(
2021
2084
  "label",
2022
2085
  {
2023
2086
  ref: o,
2024
- className: h(
2087
+ className: u(
2025
2088
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
2026
2089
  t
2027
2090
  ),
2028
2091
  ...r
2029
2092
  }
2030
2093
  ));
2031
- J.displayName = "Label";
2032
- function Qt({ className: t }) {
2094
+ ne.displayName = "Label";
2095
+ function rr({ className: t }) {
2033
2096
  return /* @__PURE__ */ n(
2034
2097
  "svg",
2035
2098
  {
@@ -2051,7 +2114,7 @@ function Qt({ className: t }) {
2051
2114
  }
2052
2115
  );
2053
2116
  }
2054
- function Zt({ className: t }) {
2117
+ function nr({ className: t }) {
2055
2118
  return /* @__PURE__ */ n(
2056
2119
  "svg",
2057
2120
  {
@@ -2072,50 +2135,50 @@ function Zt({ className: t }) {
2072
2135
  }
2073
2136
  );
2074
2137
  }
2075
- const er = [
2138
+ const or = [
2076
2139
  { value: 15, label: "15 minutes" },
2077
2140
  { value: 30, label: "30 minutes" },
2078
2141
  { value: 60, label: "1 hour" }
2079
2142
  ];
2080
- function qr({
2143
+ function Zr({
2081
2144
  value: t,
2082
2145
  onChange: r,
2083
2146
  isLocked: o = !1,
2084
2147
  className: s,
2085
- labels: i = {}
2148
+ labels: a = {}
2086
2149
  }) {
2087
- const l = {
2150
+ const i = {
2088
2151
  title: "Slot duration",
2089
2152
  lockedMessage: "This setting is locked by the administrator",
2090
2153
  infoMessage: "Set the time slot duration for day and week calendar views.",
2091
- ...i
2154
+ ...a
2092
2155
  }, g = (f) => {
2093
2156
  o || r(Number(f.target.value));
2094
2157
  };
2095
- return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-3", s), children: [
2158
+ return /* @__PURE__ */ n("div", { className: u("flex flex-col gap-3", s), children: [
2096
2159
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
2097
- /* @__PURE__ */ e(J, { className: "text-sm font-semibold", children: l.title }),
2098
- o ? /* @__PURE__ */ e(X, { delayDuration: 100, children: /* @__PURE__ */ n(Q, { children: [
2099
- /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(Zt, { className: "size-3 text-muted-foreground" }) }),
2100
- /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2101
- ] }) }) : /* @__PURE__ */ e(X, { delayDuration: 100, children: /* @__PURE__ */ n(Q, { children: [
2102
- /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(Qt, { className: "size-3 text-muted-foreground" }) }),
2103
- /* @__PURE__ */ e(ee, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2160
+ /* @__PURE__ */ e(ne, { className: "text-sm font-semibold", children: i.title }),
2161
+ o ? /* @__PURE__ */ e(oe, { delayDuration: 100, children: /* @__PURE__ */ n(se, { children: [
2162
+ /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(nr, { className: "size-3 text-muted-foreground" }) }),
2163
+ /* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
2164
+ ] }) }) : /* @__PURE__ */ e(oe, { delayDuration: 100, children: /* @__PURE__ */ n(se, { children: [
2165
+ /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(rr, { className: "size-3 text-muted-foreground" }) }),
2166
+ /* @__PURE__ */ e(ie, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
2104
2167
  ] }) })
2105
2168
  ] }),
2106
2169
  /* @__PURE__ */ e(
2107
- te,
2170
+ le,
2108
2171
  {
2109
2172
  value: t.toString(),
2110
2173
  onChange: g,
2111
2174
  disabled: o,
2112
2175
  className: "h-9 w-[128px] text-sm",
2113
- children: er.map((f) => /* @__PURE__ */ e("option", { value: f.value.toString(), children: f.label }, f.value))
2176
+ children: or.map((f) => /* @__PURE__ */ e("option", { value: f.value.toString(), children: f.label }, f.value))
2114
2177
  }
2115
2178
  )
2116
2179
  ] });
2117
2180
  }
2118
- function tr({ className: t }) {
2181
+ function sr({ className: t }) {
2119
2182
  return /* @__PURE__ */ n(
2120
2183
  "svg",
2121
2184
  {
@@ -2137,7 +2200,7 @@ function tr({ className: t }) {
2137
2200
  }
2138
2201
  );
2139
2202
  }
2140
- function rr({ className: t }) {
2203
+ function ar({ className: t }) {
2141
2204
  return /* @__PURE__ */ n(
2142
2205
  "svg",
2143
2206
  {
@@ -2158,19 +2221,19 @@ function rr({ className: t }) {
2158
2221
  }
2159
2222
  );
2160
2223
  }
2161
- const nr = [
2224
+ const ir = [
2162
2225
  { value: "dot", label: "Dot indicator" },
2163
2226
  { value: "colored", label: "Full color" },
2164
2227
  { value: "mixed", label: "Mixed" }
2165
2228
  ];
2166
- function Jr({
2229
+ function en({
2167
2230
  value: t,
2168
2231
  onChange: r,
2169
2232
  isLocked: o = !1,
2170
2233
  className: s,
2171
- labels: i = {}
2234
+ labels: a = {}
2172
2235
  }) {
2173
- const l = {
2236
+ const i = {
2174
2237
  title: "Event display",
2175
2238
  lockedMessage: "This setting is locked by the administrator",
2176
2239
  infoMessage: "Choose how events are displayed. Dot shows a small indicator, colored fills the entire event, mixed uses both.",
@@ -2179,34 +2242,34 @@ function Jr({
2179
2242
  colored: "Full color",
2180
2243
  mixed: "Mixed"
2181
2244
  },
2182
- ...i
2183
- }, g = (c) => l.options?.[c] ?? c, f = (c) => {
2184
- o || r(c.target.value);
2245
+ ...a
2246
+ }, g = (l) => i.options?.[l] ?? l, f = (l) => {
2247
+ o || r(l.target.value);
2185
2248
  };
2186
- return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-3", s), children: [
2249
+ return /* @__PURE__ */ n("div", { className: u("flex flex-col gap-3", s), children: [
2187
2250
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
2188
- /* @__PURE__ */ e(J, { className: "text-sm font-semibold", children: l.title }),
2189
- o ? /* @__PURE__ */ e(X, { delayDuration: 100, children: /* @__PURE__ */ n(Q, { children: [
2190
- /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(rr, { className: "size-3 text-muted-foreground" }) }),
2191
- /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2192
- ] }) }) : /* @__PURE__ */ e(X, { delayDuration: 100, children: /* @__PURE__ */ n(Q, { children: [
2193
- /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(tr, { className: "size-3 text-muted-foreground" }) }),
2194
- /* @__PURE__ */ e(ee, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2251
+ /* @__PURE__ */ e(ne, { className: "text-sm font-semibold", children: i.title }),
2252
+ o ? /* @__PURE__ */ e(oe, { delayDuration: 100, children: /* @__PURE__ */ n(se, { children: [
2253
+ /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(ar, { className: "size-3 text-muted-foreground" }) }),
2254
+ /* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
2255
+ ] }) }) : /* @__PURE__ */ e(oe, { delayDuration: 100, children: /* @__PURE__ */ n(se, { children: [
2256
+ /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(sr, { className: "size-3 text-muted-foreground" }) }),
2257
+ /* @__PURE__ */ e(ie, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
2195
2258
  ] }) })
2196
2259
  ] }),
2197
2260
  /* @__PURE__ */ e(
2198
- te,
2261
+ le,
2199
2262
  {
2200
2263
  value: t,
2201
2264
  onChange: f,
2202
2265
  disabled: o,
2203
2266
  className: "h-9 w-[128px] text-sm",
2204
- children: nr.map((c) => /* @__PURE__ */ e("option", { value: c.value, children: g(c.value) }, c.value))
2267
+ children: ir.map((l) => /* @__PURE__ */ e("option", { value: l.value, children: g(l.value) }, l.value))
2205
2268
  }
2206
2269
  )
2207
2270
  ] });
2208
2271
  }
2209
- function or({ className: t }) {
2272
+ function lr({ className: t }) {
2210
2273
  return /* @__PURE__ */ n(
2211
2274
  "svg",
2212
2275
  {
@@ -2228,7 +2291,7 @@ function or({ className: t }) {
2228
2291
  }
2229
2292
  );
2230
2293
  }
2231
- function sr({ className: t }) {
2294
+ function cr({ className: t }) {
2232
2295
  return /* @__PURE__ */ n(
2233
2296
  "svg",
2234
2297
  {
@@ -2249,51 +2312,51 @@ function sr({ className: t }) {
2249
2312
  }
2250
2313
  );
2251
2314
  }
2252
- function ar() {
2315
+ function dr() {
2253
2316
  return Array.from({ length: 25 }, (t, r) => ({
2254
2317
  value: r,
2255
2318
  label: `${String(r).padStart(2, "0")}:00`
2256
2319
  }));
2257
2320
  }
2258
- function Xr({
2321
+ function tn({
2259
2322
  value: t,
2260
2323
  onChange: r,
2261
2324
  isLocked: o = !1,
2262
2325
  className: s,
2263
- labels: i = {}
2326
+ labels: a = {}
2264
2327
  }) {
2265
- const l = {
2328
+ const i = {
2266
2329
  title: "Visible hours",
2267
2330
  from: "From",
2268
2331
  to: "To",
2269
2332
  lockedMessage: "This setting is locked by the administrator",
2270
2333
  infoMessage: "Set the visible hour range for day and week views. Hours outside this range will be hidden.",
2271
- ...i
2272
- }, g = ar(), f = (x) => {
2334
+ ...a
2335
+ }, g = dr(), f = (x) => {
2273
2336
  if (o) return;
2274
- const b = Number(x.target.value);
2275
- b < t.endHour && r({ ...t, startHour: b });
2276
- }, c = (x) => {
2337
+ const y = Number(x.target.value);
2338
+ y < t.endHour && r({ ...t, startHour: y });
2339
+ }, l = (x) => {
2277
2340
  if (o) return;
2278
- const b = Number(x.target.value);
2279
- b > t.startHour && r({ ...t, endHour: b });
2341
+ const y = Number(x.target.value);
2342
+ y > t.startHour && r({ ...t, endHour: y });
2280
2343
  };
2281
- return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-3", s), children: [
2344
+ return /* @__PURE__ */ n("div", { className: u("flex flex-col gap-3", s), children: [
2282
2345
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
2283
- /* @__PURE__ */ e(J, { className: "text-sm font-semibold", children: l.title }),
2284
- o ? /* @__PURE__ */ e(X, { delayDuration: 100, children: /* @__PURE__ */ n(Q, { children: [
2285
- /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(sr, { className: "size-3 text-muted-foreground" }) }),
2286
- /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2287
- ] }) }) : /* @__PURE__ */ e(X, { delayDuration: 100, children: /* @__PURE__ */ n(Q, { children: [
2288
- /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(or, { className: "size-3 text-muted-foreground" }) }),
2289
- /* @__PURE__ */ e(ee, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2346
+ /* @__PURE__ */ e(ne, { className: "text-sm font-semibold", children: i.title }),
2347
+ o ? /* @__PURE__ */ e(oe, { delayDuration: 100, children: /* @__PURE__ */ n(se, { children: [
2348
+ /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(cr, { className: "size-3 text-muted-foreground" }) }),
2349
+ /* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
2350
+ ] }) }) : /* @__PURE__ */ e(oe, { delayDuration: 100, children: /* @__PURE__ */ n(se, { children: [
2351
+ /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(lr, { className: "size-3 text-muted-foreground" }) }),
2352
+ /* @__PURE__ */ e(ie, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
2290
2353
  ] }) })
2291
2354
  ] }),
2292
2355
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
2293
2356
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
2294
- /* @__PURE__ */ e(J, { className: "text-xs text-muted-foreground", children: l.from }),
2357
+ /* @__PURE__ */ e(ne, { className: "text-xs text-muted-foreground", children: i.from }),
2295
2358
  /* @__PURE__ */ e(
2296
- te,
2359
+ le,
2297
2360
  {
2298
2361
  value: t.startHour.toString(),
2299
2362
  onChange: f,
@@ -2313,12 +2376,12 @@ function Xr({
2313
2376
  ] }),
2314
2377
  /* @__PURE__ */ e("span", { className: "mt-5 text-muted-foreground", children: "—" }),
2315
2378
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
2316
- /* @__PURE__ */ e(J, { className: "text-xs text-muted-foreground", children: l.to }),
2379
+ /* @__PURE__ */ e(ne, { className: "text-xs text-muted-foreground", children: i.to }),
2317
2380
  /* @__PURE__ */ e(
2318
- te,
2381
+ le,
2319
2382
  {
2320
2383
  value: t.endHour.toString(),
2321
- onChange: c,
2384
+ onChange: l,
2322
2385
  disabled: o,
2323
2386
  className: "h-9 w-[88px] text-sm",
2324
2387
  children: g.map((x) => /* @__PURE__ */ e(
@@ -2336,7 +2399,7 @@ function Xr({
2336
2399
  ] })
2337
2400
  ] });
2338
2401
  }
2339
- function ir({ className: t }) {
2402
+ function ur({ className: t }) {
2340
2403
  return /* @__PURE__ */ n(
2341
2404
  "svg",
2342
2405
  {
@@ -2358,7 +2421,7 @@ function ir({ className: t }) {
2358
2421
  }
2359
2422
  );
2360
2423
  }
2361
- function lr({ className: t }) {
2424
+ function hr({ className: t }) {
2362
2425
  return /* @__PURE__ */ n(
2363
2426
  "svg",
2364
2427
  {
@@ -2379,7 +2442,7 @@ function lr({ className: t }) {
2379
2442
  }
2380
2443
  );
2381
2444
  }
2382
- function cr({ className: t }) {
2445
+ function mr({ className: t }) {
2383
2446
  return /* @__PURE__ */ e(
2384
2447
  "svg",
2385
2448
  {
@@ -2397,7 +2460,7 @@ function cr({ className: t }) {
2397
2460
  }
2398
2461
  );
2399
2462
  }
2400
- const dr = [
2463
+ const fr = [
2401
2464
  "monday",
2402
2465
  "tuesday",
2403
2466
  "wednesday",
@@ -2406,13 +2469,13 @@ const dr = [
2406
2469
  "saturday",
2407
2470
  "sunday"
2408
2471
  ];
2409
- function ur() {
2472
+ function gr() {
2410
2473
  return Array.from({ length: 25 }, (t, r) => ({
2411
2474
  value: r,
2412
2475
  label: `${String(r).padStart(2, "0")}:00`
2413
2476
  }));
2414
2477
  }
2415
- const We = {
2478
+ const Oe = {
2416
2479
  sunday: "Sun",
2417
2480
  monday: "Mon",
2418
2481
  tuesday: "Tue",
@@ -2421,16 +2484,16 @@ const We = {
2421
2484
  friday: "Fri",
2422
2485
  saturday: "Sat"
2423
2486
  };
2424
- function hr({ dayLabel: t, config: r, onChange: o, disabled: s, hourOptions: i }) {
2425
- const l = () => {
2487
+ function xr({ dayLabel: t, config: r, onChange: o, disabled: s, hourOptions: a }) {
2488
+ const i = () => {
2426
2489
  s || o({ ...r, enabled: !r.enabled });
2427
- }, g = (c) => {
2490
+ }, g = (l) => {
2428
2491
  if (s) return;
2429
- const x = Number(c.target.value);
2492
+ const x = Number(l.target.value);
2430
2493
  x < r.to && o({ ...r, from: x });
2431
- }, f = (c) => {
2494
+ }, f = (l) => {
2432
2495
  if (s) return;
2433
- const x = Number(c.target.value);
2496
+ const x = Number(l.target.value);
2434
2497
  x > r.from && o({ ...r, to: x });
2435
2498
  };
2436
2499
  return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
@@ -2441,81 +2504,81 @@ function hr({ dayLabel: t, config: r, onChange: o, disabled: s, hourOptions: i }
2441
2504
  role: "checkbox",
2442
2505
  "aria-checked": r.enabled,
2443
2506
  "aria-label": `Enable ${t}`,
2444
- onClick: l,
2507
+ onClick: i,
2445
2508
  disabled: s,
2446
- className: h(
2509
+ className: u(
2447
2510
  "flex size-5 shrink-0 items-center justify-center rounded border transition-colors",
2448
2511
  r.enabled ? "border-primary bg-primary text-primary-foreground" : "border-input bg-background",
2449
2512
  s && "cursor-not-allowed opacity-50"
2450
2513
  ),
2451
- children: r.enabled && /* @__PURE__ */ e(cr, { className: "size-3" })
2514
+ children: r.enabled && /* @__PURE__ */ e(mr, { className: "size-3" })
2452
2515
  }
2453
2516
  ),
2454
- /* @__PURE__ */ e("span", { className: h("w-10 text-sm", !r.enabled && "text-muted-foreground"), children: t }),
2517
+ /* @__PURE__ */ e("span", { className: u("w-10 text-sm", !r.enabled && "text-muted-foreground"), children: t }),
2455
2518
  /* @__PURE__ */ e(
2456
- te,
2519
+ le,
2457
2520
  {
2458
2521
  value: r.from.toString(),
2459
2522
  onChange: g,
2460
2523
  disabled: s || !r.enabled,
2461
2524
  className: "h-8 w-[76px] text-xs",
2462
- children: i.map((c) => /* @__PURE__ */ e("option", { value: c.value.toString(), disabled: c.value >= r.to, children: c.label }, c.value))
2525
+ children: a.map((l) => /* @__PURE__ */ e("option", { value: l.value.toString(), disabled: l.value >= r.to, children: l.label }, l.value))
2463
2526
  }
2464
2527
  ),
2465
2528
  /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: "—" }),
2466
2529
  /* @__PURE__ */ e(
2467
- te,
2530
+ le,
2468
2531
  {
2469
2532
  value: r.to.toString(),
2470
2533
  onChange: f,
2471
2534
  disabled: s || !r.enabled,
2472
2535
  className: "h-8 w-[76px] text-xs",
2473
- children: i.map((c) => /* @__PURE__ */ e("option", { value: c.value.toString(), disabled: c.value <= r.from, children: c.label }, c.value))
2536
+ children: a.map((l) => /* @__PURE__ */ e("option", { value: l.value.toString(), disabled: l.value <= r.from, children: l.label }, l.value))
2474
2537
  }
2475
2538
  )
2476
2539
  ] });
2477
2540
  }
2478
- function Qr({
2541
+ function rn({
2479
2542
  value: t,
2480
2543
  onChange: r,
2481
2544
  isLocked: o = !1,
2482
2545
  className: s,
2483
- labels: i = {}
2546
+ labels: a = {}
2484
2547
  }) {
2485
- const l = {
2548
+ const i = {
2486
2549
  title: "Working hours",
2487
2550
  lockedMessage: "This setting is locked by the administrator",
2488
2551
  infoMessage: "Configure working hours for each day of the week. Non-working hours will be grayed out in day and week views.",
2489
- days: We,
2490
- ...i
2491
- }, g = ur(), f = (c, x) => {
2492
- o || r({ ...t, [c]: x });
2552
+ days: Oe,
2553
+ ...a
2554
+ }, g = gr(), f = (l, x) => {
2555
+ o || r({ ...t, [l]: x });
2493
2556
  };
2494
- return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-3", s), children: [
2557
+ return /* @__PURE__ */ n("div", { className: u("flex flex-col gap-3", s), children: [
2495
2558
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
2496
- /* @__PURE__ */ e(J, { className: "text-sm font-semibold", children: l.title }),
2497
- o ? /* @__PURE__ */ e(X, { delayDuration: 100, children: /* @__PURE__ */ n(Q, { children: [
2498
- /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(lr, { className: "size-3 text-muted-foreground" }) }),
2499
- /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2500
- ] }) }) : /* @__PURE__ */ e(X, { delayDuration: 100, children: /* @__PURE__ */ n(Q, { children: [
2501
- /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(ir, { className: "size-3 text-muted-foreground" }) }),
2502
- /* @__PURE__ */ e(ee, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2559
+ /* @__PURE__ */ e(ne, { className: "text-sm font-semibold", children: i.title }),
2560
+ o ? /* @__PURE__ */ e(oe, { delayDuration: 100, children: /* @__PURE__ */ n(se, { children: [
2561
+ /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(hr, { className: "size-3 text-muted-foreground" }) }),
2562
+ /* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
2563
+ ] }) }) : /* @__PURE__ */ e(oe, { delayDuration: 100, children: /* @__PURE__ */ n(se, { children: [
2564
+ /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(ur, { className: "size-3 text-muted-foreground" }) }),
2565
+ /* @__PURE__ */ e(ie, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
2503
2566
  ] }) })
2504
2567
  ] }),
2505
- /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: dr.map((c) => /* @__PURE__ */ e(
2506
- hr,
2568
+ /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: fr.map((l) => /* @__PURE__ */ e(
2569
+ xr,
2507
2570
  {
2508
- dayLabel: l.days?.[c] ?? We[c],
2509
- config: t[c],
2510
- onChange: (x) => f(c, x),
2571
+ dayLabel: i.days?.[l] ?? Oe[l],
2572
+ config: t[l],
2573
+ onChange: (x) => f(l, x),
2511
2574
  disabled: o,
2512
2575
  hourOptions: g
2513
2576
  },
2514
- c
2577
+ l
2515
2578
  )) })
2516
2579
  ] });
2517
2580
  }
2518
- const Zr = {
2581
+ const nn = {
2519
2582
  sunday: { enabled: !1, from: 8, to: 18 },
2520
2583
  monday: { enabled: !0, from: 8, to: 18 },
2521
2584
  tuesday: { enabled: !0, from: 8, to: 18 },
@@ -2524,7 +2587,7 @@ const Zr = {
2524
2587
  friday: { enabled: !0, from: 8, to: 18 },
2525
2588
  saturday: { enabled: !1, from: 8, to: 18 }
2526
2589
  };
2527
- function be({ className: t }) {
2590
+ function De({ className: t }) {
2528
2591
  return /* @__PURE__ */ e(
2529
2592
  "svg",
2530
2593
  {
@@ -2540,7 +2603,7 @@ function be({ className: t }) {
2540
2603
  }
2541
2604
  );
2542
2605
  }
2543
- function mr({ className: t }) {
2606
+ function pr({ className: t }) {
2544
2607
  return /* @__PURE__ */ n(
2545
2608
  "svg",
2546
2609
  {
@@ -2559,7 +2622,7 @@ function mr({ className: t }) {
2559
2622
  }
2560
2623
  );
2561
2624
  }
2562
- function fr({ className: t }) {
2625
+ function vr({ className: t }) {
2563
2626
  return /* @__PURE__ */ n(
2564
2627
  "svg",
2565
2628
  {
@@ -2578,7 +2641,7 @@ function fr({ className: t }) {
2578
2641
  }
2579
2642
  );
2580
2643
  }
2581
- function ye({ checked: t, onCheckedChange: r, className: o, children: s }) {
2644
+ function Me({ checked: t, onCheckedChange: r, className: o, children: s }) {
2582
2645
  return /* @__PURE__ */ e(
2583
2646
  "button",
2584
2647
  {
@@ -2591,12 +2654,12 @@ function ye({ checked: t, onCheckedChange: r, className: o, children: s }) {
2591
2654
  }
2592
2655
  );
2593
2656
  }
2594
- function gr({ src: t, alt: r, fallback: o, className: s }) {
2595
- const [i, l] = oe(!1);
2596
- return !t || i ? /* @__PURE__ */ e(
2657
+ function wr({ src: t, alt: r, fallback: o, className: s }) {
2658
+ const [a, i] = de(!1);
2659
+ return !t || a ? /* @__PURE__ */ e(
2597
2660
  "div",
2598
2661
  {
2599
- className: h(
2662
+ className: u(
2600
2663
  "flex items-center justify-center bg-zinc-200 text-zinc-600 font-medium text-sm",
2601
2664
  s
2602
2665
  ),
@@ -2607,32 +2670,32 @@ function gr({ src: t, alt: r, fallback: o, className: s }) {
2607
2670
  {
2608
2671
  src: t,
2609
2672
  alt: r || "",
2610
- className: h("object-cover", s),
2611
- onError: () => l(!0)
2673
+ className: u("object-cover", s),
2674
+ onError: () => i(!0)
2612
2675
  }
2613
2676
  );
2614
2677
  }
2615
- function Ae({ value: t, onChange: r, placeholder: o, className: s }) {
2616
- return /* @__PURE__ */ n("div", { className: h("relative", s), children: [
2617
- /* @__PURE__ */ e(mr, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
2678
+ function _e({ value: t, onChange: r, placeholder: o, className: s }) {
2679
+ return /* @__PURE__ */ n("div", { className: u("relative", s), children: [
2680
+ /* @__PURE__ */ e(pr, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
2618
2681
  /* @__PURE__ */ e(
2619
2682
  "input",
2620
2683
  {
2621
2684
  type: "text",
2622
2685
  value: t,
2623
- onChange: (i) => r(i.target.value),
2686
+ onChange: (a) => r(a.target.value),
2624
2687
  placeholder: o,
2625
2688
  className: "h-9 w-full rounded-lg border border-border bg-white pl-9 pr-3 text-sm placeholder:text-muted-foreground focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary"
2626
2689
  }
2627
2690
  )
2628
2691
  ] });
2629
2692
  }
2630
- function Fe(t, r, o, s = 0.3) {
2693
+ function Pe(t, r, o, s = 0.3) {
2631
2694
  if (!r.trim()) return t;
2632
- const i = r.toLowerCase();
2633
- return t.filter((l) => o(l).some((f) => f ? f.toLowerCase().includes(i) : !1));
2695
+ const a = r.toLowerCase();
2696
+ return t.filter((i) => o(i).some((f) => f ? f.toLowerCase().includes(a) : !1));
2634
2697
  }
2635
- const xr = {
2698
+ const br = {
2636
2699
  title: "Filters",
2637
2700
  subtitle: "Filter calendar events",
2638
2701
  scheduleTypes: "Event Types",
@@ -2645,73 +2708,73 @@ const xr = {
2645
2708
  noScheduleTypes: "No event types found",
2646
2709
  noParticipants: "No participants found"
2647
2710
  };
2648
- function en({
2711
+ function on({
2649
2712
  scheduleTypes: t,
2650
2713
  users: r,
2651
2714
  selectedScheduleTypeIds: o,
2652
2715
  onScheduleTypeChange: s,
2653
- selectedUserIds: i,
2654
- onUserChange: l,
2716
+ selectedUserIds: a,
2717
+ onUserChange: i,
2655
2718
  onClearAll: g,
2656
2719
  className: f,
2657
- scheduleTypesLoading: c = !1,
2720
+ scheduleTypesLoading: l = !1,
2658
2721
  usersLoading: x = !1,
2659
- labels: b,
2722
+ labels: y,
2660
2723
  getScheduleTypeName: p
2661
2724
  }) {
2662
- const S = { ...xr, ...b }, [W, L] = oe(""), [D, z] = oe(""), T = B(() => W.trim() ? Fe(t, W, (m) => [
2725
+ const L = { ...br, ...y }, [A, z] = de(""), [j, I] = de(""), C = U(() => A.trim() ? Pe(t, A, (m) => [
2663
2726
  m.name,
2664
2727
  p?.(m) || m.name
2665
- ]) : t, [t, W, p]), w = B(() => D.trim() ? Fe(r, D, (m) => [m.name, m.email || ""]) : r, [r, D]), I = T.length > 0 && T.every((m) => o.includes(m.id)), C = w.length > 0 && w.every((m) => i.includes(m.id)), A = o.length + i.length, R = (m, a) => {
2666
- const u = a ? [...o, m] : o.filter((v) => v !== m);
2667
- s(u);
2668
- }, V = () => {
2669
- if (I) {
2670
- const m = new Set(T.map((a) => a.id));
2671
- s(o.filter((a) => !m.has(a)));
2728
+ ]) : t, [t, A, p]), T = U(() => j.trim() ? Pe(r, j, (m) => [m.name, m.email || ""]) : r, [r, j]), _ = C.length > 0 && C.every((m) => o.includes(m.id)), Y = T.length > 0 && T.every((m) => a.includes(m.id)), w = o.length + a.length, W = (m, b) => {
2729
+ const E = b ? [...o, m] : o.filter(($) => $ !== m);
2730
+ s(E);
2731
+ }, F = () => {
2732
+ if (_) {
2733
+ const m = new Set(C.map((b) => b.id));
2734
+ s(o.filter((b) => !m.has(b)));
2672
2735
  } else {
2673
2736
  const m = /* @__PURE__ */ new Set([
2674
2737
  ...o,
2675
- ...T.map((a) => a.id)
2738
+ ...C.map((b) => b.id)
2676
2739
  ]);
2677
2740
  s(Array.from(m));
2678
2741
  }
2679
- }, F = (m, a) => {
2680
- const u = a ? [...i, m] : i.filter((v) => v !== m);
2681
- l(u);
2682
- }, O = () => {
2683
- if (C) {
2684
- const m = new Set(w.map((a) => a.id));
2685
- l(i.filter((a) => !m.has(a)));
2742
+ }, P = (m, b) => {
2743
+ const E = b ? [...a, m] : a.filter(($) => $ !== m);
2744
+ i(E);
2745
+ }, K = () => {
2746
+ if (Y) {
2747
+ const m = new Set(T.map((b) => b.id));
2748
+ i(a.filter((b) => !m.has(b)));
2686
2749
  } else {
2687
- const m = /* @__PURE__ */ new Set([...i, ...w.map((a) => a.id)]);
2688
- l(Array.from(m));
2750
+ const m = /* @__PURE__ */ new Set([...a, ...T.map((b) => b.id)]);
2751
+ i(Array.from(m));
2689
2752
  }
2690
- }, j = () => {
2691
- s([]), l([]), g?.();
2692
- }, _ = (m) => p ? p(m) : m.name, U = (m) => m.colorHex || m.color || "#069AD7";
2753
+ }, q = () => {
2754
+ s([]), i([]), g?.();
2755
+ }, V = (m) => p ? p(m) : m.name, B = (m) => m.colorHex || m.color || "#069AD7";
2693
2756
  return /* @__PURE__ */ n(
2694
2757
  "div",
2695
2758
  {
2696
- className: h(
2759
+ className: u(
2697
2760
  "flex min-w-72 max-w-72 flex-col rounded-lg border bg-white shadow-sm",
2698
2761
  f
2699
2762
  ),
2700
2763
  children: [
2701
2764
  /* @__PURE__ */ n("header", { className: "flex items-start justify-between gap-2 px-4 pb-2 pt-4", children: [
2702
2765
  /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
2703
- /* @__PURE__ */ e("h3", { className: "text-base font-semibold text-foreground", children: S.title }),
2704
- /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: S.subtitle })
2766
+ /* @__PURE__ */ e("h3", { className: "text-base font-semibold text-foreground", children: L.title }),
2767
+ /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: L.subtitle })
2705
2768
  ] }),
2706
- A > 0 && /* @__PURE__ */ n(
2769
+ w > 0 && /* @__PURE__ */ n(
2707
2770
  "button",
2708
2771
  {
2709
2772
  type: "button",
2710
- onClick: j,
2773
+ onClick: q,
2711
2774
  className: "flex h-auto items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-destructive transition-colors hover:bg-destructive/10",
2712
2775
  children: [
2713
- /* @__PURE__ */ e(fr, { className: "h-3.5 w-3.5" }),
2714
- S.clearAll
2776
+ /* @__PURE__ */ e(vr, { className: "h-3.5 w-3.5" }),
2777
+ L.clearAll
2715
2778
  ]
2716
2779
  }
2717
2780
  )
@@ -2719,29 +2782,29 @@ function en({
2719
2782
  /* @__PURE__ */ e("div", { className: "h-px w-full bg-border/60" }),
2720
2783
  /* @__PURE__ */ n("section", { className: "flex flex-col", children: [
2721
2784
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between px-4 py-3", children: [
2722
- /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: S.scheduleTypes }),
2785
+ /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: L.scheduleTypes }),
2723
2786
  /* @__PURE__ */ e(
2724
2787
  "button",
2725
2788
  {
2726
2789
  type: "button",
2727
- onClick: V,
2790
+ onClick: F,
2728
2791
  className: "text-xs font-medium text-primary transition-colors hover:text-primary/80",
2729
- children: I ? S.unselectAll : S.selectAll
2792
+ children: _ ? L.unselectAll : L.selectAll
2730
2793
  }
2731
2794
  )
2732
2795
  ] }),
2733
2796
  t.length > 6 && /* @__PURE__ */ e("div", { className: "px-4 pb-3", children: /* @__PURE__ */ e(
2734
- Ae,
2797
+ _e,
2735
2798
  {
2736
- value: W,
2737
- onChange: L,
2738
- placeholder: S.searchScheduleTypes
2799
+ value: A,
2800
+ onChange: z,
2801
+ placeholder: L.searchScheduleTypes
2739
2802
  }
2740
2803
  ) }),
2741
2804
  /* @__PURE__ */ n("div", { className: "flex max-h-[220px] flex-col gap-2 overflow-y-auto px-4 pb-2 scrollbar-thin", children: [
2742
- c ? (
2805
+ l ? (
2743
2806
  // Loading skeletons
2744
- Array.from({ length: 4 }).map((m, a) => /* @__PURE__ */ n(
2807
+ Array.from({ length: 4 }).map((m, b) => /* @__PURE__ */ n(
2745
2808
  "div",
2746
2809
  {
2747
2810
  className: "flex animate-pulse items-center gap-2 rounded-md border border-border/60 bg-muted/40 p-2",
@@ -2750,40 +2813,40 @@ function en({
2750
2813
  /* @__PURE__ */ e("div", { className: "h-3 w-24 rounded bg-muted-foreground/20" })
2751
2814
  ]
2752
2815
  },
2753
- `skeleton-${a}`
2816
+ `skeleton-${b}`
2754
2817
  ))
2755
- ) : T.map((m) => {
2756
- const a = o.includes(m.id), u = U(m);
2818
+ ) : C.map((m) => {
2819
+ const b = o.includes(m.id), E = B(m);
2757
2820
  return /* @__PURE__ */ n(
2758
- ye,
2821
+ Me,
2759
2822
  {
2760
- checked: a,
2761
- onCheckedChange: (v) => R(m.id, v),
2762
- className: h(
2823
+ checked: b,
2824
+ onCheckedChange: ($) => W(m.id, $),
2825
+ className: u(
2763
2826
  "relative flex w-full cursor-pointer items-center justify-between gap-3 rounded-md border border-border bg-white px-3 py-2 transition-colors hover:border-primary/50",
2764
- a && "border-primary bg-primary/5"
2827
+ b && "border-primary bg-primary/5"
2765
2828
  ),
2766
2829
  children: [
2767
2830
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
2768
2831
  /* @__PURE__ */ e(
2769
2832
  "span",
2770
2833
  {
2771
- className: h(
2834
+ className: u(
2772
2835
  "flex h-4 w-4 items-center justify-center rounded border border-border text-xs transition-colors",
2773
- a && "border-primary bg-primary text-primary-foreground"
2836
+ b && "border-primary bg-primary text-primary-foreground"
2774
2837
  ),
2775
- children: a && /* @__PURE__ */ e(be, { className: "h-3 w-3" })
2838
+ children: b && /* @__PURE__ */ e(De, { className: "h-3 w-3" })
2776
2839
  }
2777
2840
  ),
2778
- /* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: _(m) })
2841
+ /* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: V(m) })
2779
2842
  ] }),
2780
2843
  /* @__PURE__ */ e(
2781
2844
  "div",
2782
2845
  {
2783
2846
  className: "h-4 w-4 rounded-full border",
2784
2847
  style: {
2785
- backgroundColor: u,
2786
- borderColor: u
2848
+ backgroundColor: E,
2849
+ borderColor: E
2787
2850
  }
2788
2851
  }
2789
2852
  )
@@ -2792,38 +2855,38 @@ function en({
2792
2855
  m.id
2793
2856
  );
2794
2857
  }),
2795
- !c && T.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1 text-xs text-muted-foreground", children: S.noScheduleTypes })
2858
+ !l && C.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1 text-xs text-muted-foreground", children: L.noScheduleTypes })
2796
2859
  ] })
2797
2860
  ] }),
2798
2861
  /* @__PURE__ */ e("div", { className: "h-px w-full bg-border/60" }),
2799
2862
  /* @__PURE__ */ n("section", { className: "flex flex-col", children: [
2800
2863
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between px-4 py-3", children: [
2801
- /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: S.participants }),
2864
+ /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: L.participants }),
2802
2865
  /* @__PURE__ */ e(
2803
- ye,
2866
+ Me,
2804
2867
  {
2805
- checked: C,
2806
- onCheckedChange: () => O(),
2807
- className: h(
2868
+ checked: Y,
2869
+ onCheckedChange: () => K(),
2870
+ className: u(
2808
2871
  "flex h-5 w-5 items-center justify-center rounded border border-border bg-white transition-colors hover:border-primary/50",
2809
- C && "border-primary bg-primary text-primary-foreground"
2872
+ Y && "border-primary bg-primary text-primary-foreground"
2810
2873
  ),
2811
- children: C && /* @__PURE__ */ e(be, { className: "h-3.5 w-3.5" })
2874
+ children: Y && /* @__PURE__ */ e(De, { className: "h-3.5 w-3.5" })
2812
2875
  }
2813
2876
  )
2814
2877
  ] }),
2815
2878
  /* @__PURE__ */ e("div", { className: "px-4 pb-3", children: /* @__PURE__ */ e(
2816
- Ae,
2879
+ _e,
2817
2880
  {
2818
- value: D,
2819
- onChange: z,
2820
- placeholder: S.searchParticipants
2881
+ value: j,
2882
+ onChange: I,
2883
+ placeholder: L.searchParticipants
2821
2884
  }
2822
2885
  ) }),
2823
2886
  /* @__PURE__ */ n("div", { className: "flex max-h-[400px] flex-col gap-2 overflow-y-auto px-4 pb-4 scrollbar-thin", children: [
2824
2887
  x ? (
2825
2888
  // Loading skeletons
2826
- Array.from({ length: 4 }).map((m, a) => /* @__PURE__ */ n(
2889
+ Array.from({ length: 4 }).map((m, b) => /* @__PURE__ */ n(
2827
2890
  "div",
2828
2891
  {
2829
2892
  className: "flex animate-pulse items-center gap-3 rounded-md border border-border/60 bg-muted/40 p-3",
@@ -2836,33 +2899,33 @@ function en({
2836
2899
  ] })
2837
2900
  ]
2838
2901
  },
2839
- `p-skeleton-${a}`
2902
+ `p-skeleton-${b}`
2840
2903
  ))
2841
- ) : w.map((m) => {
2842
- const a = i.includes(m.id);
2904
+ ) : T.map((m) => {
2905
+ const b = a.includes(m.id);
2843
2906
  return /* @__PURE__ */ n(
2844
- ye,
2907
+ Me,
2845
2908
  {
2846
- checked: a,
2847
- onCheckedChange: (u) => F(m.id, u),
2848
- className: h(
2909
+ checked: b,
2910
+ onCheckedChange: (E) => P(m.id, E),
2911
+ className: u(
2849
2912
  "relative flex w-full cursor-pointer items-start gap-2 rounded-lg border border-border bg-white p-2 transition-colors hover:border-primary/50",
2850
- a && "border-primary bg-zinc-50"
2913
+ b && "border-primary bg-zinc-50"
2851
2914
  ),
2852
2915
  children: [
2853
2916
  /* @__PURE__ */ e(
2854
2917
  "span",
2855
2918
  {
2856
- className: h(
2919
+ className: u(
2857
2920
  "flex h-4 w-4 flex-shrink-0 items-center justify-center rounded border border-border transition-colors",
2858
- a && "border-primary bg-primary text-primary-foreground"
2921
+ b && "border-primary bg-primary text-primary-foreground"
2859
2922
  ),
2860
- children: a && /* @__PURE__ */ e(be, { className: "h-2.5 w-2.5" })
2923
+ children: b && /* @__PURE__ */ e(De, { className: "h-2.5 w-2.5" })
2861
2924
  }
2862
2925
  ),
2863
2926
  /* @__PURE__ */ n("div", { className: "flex flex-1 items-start gap-2", children: [
2864
2927
  /* @__PURE__ */ e(
2865
- gr,
2928
+ wr,
2866
2929
  {
2867
2930
  src: m.avatar ?? null,
2868
2931
  alt: m.name,
@@ -2887,14 +2950,14 @@ function en({
2887
2950
  m.id
2888
2951
  );
2889
2952
  }),
2890
- !x && w.length === 0 && /* @__PURE__ */ e("p", { className: "px-4 text-xs text-muted-foreground", children: S.noParticipants })
2953
+ !x && T.length === 0 && /* @__PURE__ */ e("p", { className: "px-4 text-xs text-muted-foreground", children: L.noParticipants })
2891
2954
  ] })
2892
2955
  ] })
2893
2956
  ]
2894
2957
  }
2895
2958
  );
2896
2959
  }
2897
- function pr({ className: t }) {
2960
+ function yr({ className: t }) {
2898
2961
  return /* @__PURE__ */ n(
2899
2962
  "svg",
2900
2963
  {
@@ -2915,19 +2978,19 @@ function pr({ className: t }) {
2915
2978
  }
2916
2979
  );
2917
2980
  }
2918
- function tn({
2981
+ function sn({
2919
2982
  scheduleTypes: t,
2920
2983
  value: r,
2921
2984
  onChange: o,
2922
2985
  allLabel: s = "All types",
2923
- className: i,
2924
- label: l
2986
+ className: a,
2987
+ label: i
2925
2988
  }) {
2926
- const g = (c) => {
2927
- o(c.target.value);
2928
- }, f = t.find((c) => String(c.id) === r);
2929
- return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-1", i), children: [
2930
- l && /* @__PURE__ */ e(J, { className: "text-xs text-muted-foreground", children: l }),
2989
+ const g = (l) => {
2990
+ o(l.target.value);
2991
+ }, f = t.find((l) => String(l.id) === r);
2992
+ return /* @__PURE__ */ n("div", { className: u("flex flex-col gap-1", a), children: [
2993
+ i && /* @__PURE__ */ e(ne, { className: "text-xs text-muted-foreground", children: i }),
2931
2994
  /* @__PURE__ */ n("div", { className: "relative", children: [
2932
2995
  f ? /* @__PURE__ */ e(
2933
2996
  "span",
@@ -2935,23 +2998,23 @@ function tn({
2935
2998
  className: "pointer-events-none absolute left-2.5 top-1/2 size-3 -translate-y-1/2 rounded-full",
2936
2999
  style: { backgroundColor: f.color }
2937
3000
  }
2938
- ) : /* @__PURE__ */ e(pr, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
3001
+ ) : /* @__PURE__ */ e(yr, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
2939
3002
  /* @__PURE__ */ n(
2940
- te,
3003
+ le,
2941
3004
  {
2942
3005
  value: r,
2943
3006
  onChange: g,
2944
3007
  className: "h-9 w-full min-w-[140px] pl-8 pr-8 text-sm",
2945
3008
  children: [
2946
3009
  /* @__PURE__ */ e("option", { value: "all", children: s }),
2947
- t.map((c) => /* @__PURE__ */ e("option", { value: String(c.id), children: c.label }, c.id))
3010
+ t.map((l) => /* @__PURE__ */ e("option", { value: String(l.id), children: l.label }, l.id))
2948
3011
  ]
2949
3012
  }
2950
3013
  )
2951
3014
  ] })
2952
3015
  ] });
2953
3016
  }
2954
- function vr({ className: t }) {
3017
+ function kr({ className: t }) {
2955
3018
  return /* @__PURE__ */ n(
2956
3019
  "svg",
2957
3020
  {
@@ -2974,23 +3037,23 @@ function vr({ className: t }) {
2974
3037
  }
2975
3038
  );
2976
3039
  }
2977
- function rn({
3040
+ function an({
2978
3041
  users: t,
2979
3042
  value: r,
2980
3043
  onChange: o,
2981
3044
  allLabel: s = "All users",
2982
- className: i,
2983
- label: l
3045
+ className: a,
3046
+ label: i
2984
3047
  }) {
2985
3048
  const g = (f) => {
2986
3049
  o(f.target.value);
2987
3050
  };
2988
- return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-1", i), children: [
2989
- l && /* @__PURE__ */ e(J, { className: "text-xs text-muted-foreground", children: l }),
3051
+ return /* @__PURE__ */ n("div", { className: u("flex flex-col gap-1", a), children: [
3052
+ i && /* @__PURE__ */ e(ne, { className: "text-xs text-muted-foreground", children: i }),
2990
3053
  /* @__PURE__ */ n("div", { className: "relative", children: [
2991
- /* @__PURE__ */ e(vr, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
3054
+ /* @__PURE__ */ e(kr, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
2992
3055
  /* @__PURE__ */ n(
2993
- te,
3056
+ le,
2994
3057
  {
2995
3058
  value: r,
2996
3059
  onChange: g,
@@ -3004,7 +3067,7 @@ function rn({
3004
3067
  ] })
3005
3068
  ] });
3006
3069
  }
3007
- function wr({ className: t }) {
3070
+ function Nr({ className: t }) {
3008
3071
  return /* @__PURE__ */ n(
3009
3072
  "svg",
3010
3073
  {
@@ -3031,7 +3094,7 @@ function wr({ className: t }) {
3031
3094
  }
3032
3095
  );
3033
3096
  }
3034
- function br({ className: t }) {
3097
+ function Cr({ className: t }) {
3035
3098
  return /* @__PURE__ */ n(
3036
3099
  "svg",
3037
3100
  {
@@ -3054,7 +3117,7 @@ function br({ className: t }) {
3054
3117
  }
3055
3118
  );
3056
3119
  }
3057
- function yr({ className: t }) {
3120
+ function Dr({ className: t }) {
3058
3121
  return /* @__PURE__ */ e(
3059
3122
  "svg",
3060
3123
  {
@@ -3070,7 +3133,7 @@ function yr({ className: t }) {
3070
3133
  }
3071
3134
  );
3072
3135
  }
3073
- function kr({ className: t }) {
3136
+ function Mr({ className: t }) {
3074
3137
  return /* @__PURE__ */ n(
3075
3138
  "svg",
3076
3139
  {
@@ -3090,25 +3153,25 @@ function kr({ className: t }) {
3090
3153
  }
3091
3154
  );
3092
3155
  }
3093
- function Nr(t) {
3156
+ function Sr(t) {
3094
3157
  const r = t.getFullYear(), o = String(t.getMonth() + 1).padStart(2, "0"), s = String(t.getDate()).padStart(2, "0");
3095
3158
  return `${r}-${o}-${s}`;
3096
3159
  }
3097
- function $e(t) {
3098
- const r = t.getHours(), o = t.getMinutes(), s = r >= 12 ? "PM" : "AM", i = r % 12 || 12, l = String(o).padStart(2, "0");
3099
- return `${i}:${l} ${s}`;
3160
+ function Re(t) {
3161
+ const r = t.getHours(), o = t.getMinutes(), s = r >= 12 ? "PM" : "AM", a = r % 12 || 12, i = String(o).padStart(2, "0");
3162
+ return `${a}:${i} ${s}`;
3100
3163
  }
3101
- function Cr(t) {
3102
- const r = $e(t.startDate), o = $e(t.endDate);
3164
+ function Er(t) {
3165
+ const r = Re(t.startDate), o = Re(t.endDate);
3103
3166
  return `${r} - ${o}`;
3104
3167
  }
3105
- function Dr(t) {
3106
- const r = Ue(/* @__PURE__ */ new Date(), 1);
3168
+ function zr(t) {
3169
+ const r = Je(/* @__PURE__ */ new Date(), 1);
3107
3170
  return t.getFullYear() === r.getFullYear() && t.getMonth() === r.getMonth() && t.getDate() === r.getDate();
3108
3171
  }
3109
- function Mr(t) {
3110
- if (G(t)) return "Today";
3111
- if (Dr(t)) return "Tomorrow";
3172
+ function Hr(t) {
3173
+ if (te(t)) return "Today";
3174
+ if (zr(t)) return "Tomorrow";
3112
3175
  const r = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], o = [
3113
3176
  "Jan",
3114
3177
  "Feb",
@@ -3122,41 +3185,41 @@ function Mr(t) {
3122
3185
  "Oct",
3123
3186
  "Nov",
3124
3187
  "Dec"
3125
- ], s = r[t.getDay()], i = o[t.getMonth()], l = t.getDate();
3126
- return `${s}, ${i} ${l}`;
3188
+ ], s = r[t.getDay()], a = o[t.getMonth()], i = t.getDate();
3189
+ return `${s}, ${a} ${i}`;
3127
3190
  }
3128
- function Sr(t, r) {
3191
+ function Lr(t, r) {
3129
3192
  const o = /* @__PURE__ */ new Map();
3130
3193
  for (const s of t) {
3131
- const i = Nr(s.startDate), l = o.get(i) ?? [];
3132
- l.push(s), o.set(i, l);
3194
+ const a = Sr(s.startDate), i = o.get(a) ?? [];
3195
+ i.push(s), o.set(a, i);
3133
3196
  }
3134
- return Array.from(o.entries()).map(([s, i]) => {
3135
- const l = [...i].sort(
3136
- (f, c) => f.startDate.getTime() - c.startDate.getTime()
3137
- ), g = r > 0 ? l.slice(0, r) : l;
3197
+ return Array.from(o.entries()).map(([s, a]) => {
3198
+ const i = [...a].sort(
3199
+ (f, l) => f.startDate.getTime() - l.startDate.getTime()
3200
+ ), g = r > 0 ? i.slice(0, r) : i;
3138
3201
  return {
3139
3202
  date: new Date(s),
3140
3203
  dateKey: s,
3141
3204
  events: g,
3142
- hasMore: r > 0 && l.length > r
3205
+ hasMore: r > 0 && i.length > r
3143
3206
  };
3144
- }).sort((s, i) => s.date.getTime() - i.date.getTime());
3207
+ }).sort((s, a) => s.date.getTime() - a.date.getTime());
3145
3208
  }
3146
- function Er(t) {
3147
- const r = pe(/* @__PURE__ */ new Date()), o = Ve(/* @__PURE__ */ new Date());
3209
+ function Tr(t) {
3210
+ const r = ye(/* @__PURE__ */ new Date()), o = qe(/* @__PURE__ */ new Date());
3148
3211
  return t.filter((s) => s.startDate >= r && s.startDate <= o).length;
3149
3212
  }
3150
- function ke({ className: t }) {
3151
- return /* @__PURE__ */ e("div", { className: h("animate-pulse rounded-md bg-muted", t) });
3213
+ function Se({ className: t }) {
3214
+ return /* @__PURE__ */ e("div", { className: u("animate-pulse rounded-md bg-muted", t) });
3152
3215
  }
3153
- function zr({ event: t, onClick: r }) {
3216
+ function Ir({ event: t, onClick: r }) {
3154
3217
  return /* @__PURE__ */ n(
3155
3218
  "button",
3156
3219
  {
3157
3220
  type: "button",
3158
3221
  onClick: () => r?.(t),
3159
- className: h(
3222
+ className: u(
3160
3223
  "w-full text-left rounded-lg transition-colors",
3161
3224
  "hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3162
3225
  "flex items-start gap-3 p-2"
@@ -3171,58 +3234,58 @@ function zr({ event: t, onClick: r }) {
3171
3234
  ),
3172
3235
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
3173
3236
  /* @__PURE__ */ e("p", { className: "text-sm font-medium truncate", children: t.title }),
3174
- /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: Cr(t) })
3237
+ /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: Er(t) })
3175
3238
  ] }),
3176
- r && /* @__PURE__ */ e(yr, { className: "shrink-0 size-4 text-muted-foreground/50 mt-1" })
3239
+ r && /* @__PURE__ */ e(Dr, { className: "shrink-0 size-4 text-muted-foreground/50 mt-1" })
3177
3240
  ]
3178
3241
  }
3179
3242
  );
3180
3243
  }
3181
- function Hr({ group: t, onEventClick: r }) {
3244
+ function jr({ group: t, onEventClick: r }) {
3182
3245
  return /* @__PURE__ */ n("div", { className: "space-y-1", children: [
3183
3246
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between px-2 py-1.5", children: [
3184
- /* @__PURE__ */ e("h3", { className: h("text-xs font-semibold", G(t.date) && "text-primary"), children: Mr(t.date) }),
3247
+ /* @__PURE__ */ e("h3", { className: u("text-xs font-semibold", te(t.date) && "text-primary"), children: Hr(t.date) }),
3185
3248
  t.hasMore && /* @__PURE__ */ n("span", { className: "text-[10px] text-muted-foreground", children: [
3186
3249
  "+",
3187
3250
  t.events.length,
3188
3251
  " more"
3189
3252
  ] })
3190
3253
  ] }),
3191
- /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((o) => /* @__PURE__ */ e(zr, { event: o, onClick: r }, o.id)) })
3254
+ /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((o) => /* @__PURE__ */ e(Ir, { event: o, onClick: r }, o.id)) })
3192
3255
  ] });
3193
3256
  }
3194
- function nn({
3257
+ function ln({
3195
3258
  events: t,
3196
3259
  isLoading: r = !1,
3197
3260
  className: o,
3198
3261
  daysAhead: s = 7,
3199
- maxEventsPerDay: i = 3,
3200
- onEventClick: l,
3262
+ maxEventsPerDay: a = 3,
3263
+ onEventClick: i,
3201
3264
  onNavigateToAgenda: g
3202
3265
  }) {
3203
- const [f, c] = oe(!1), x = B(() => {
3204
- const L = pe(/* @__PURE__ */ new Date()), D = Ue(L, s);
3205
- return t.filter((z) => z.endDate >= L && z.startDate < D);
3206
- }, [t, s]), b = B(
3207
- () => Sr(x, i),
3208
- [x, i]
3209
- ), p = B(() => Er(t), [t]), S = (L) => {
3210
- c(!1), l?.(L);
3211
- }, W = () => {
3212
- c(!1), g?.();
3266
+ const [f, l] = de(!1), x = U(() => {
3267
+ const z = ye(/* @__PURE__ */ new Date()), j = Je(z, s);
3268
+ return t.filter((I) => I.endDate >= z && I.startDate < j);
3269
+ }, [t, s]), y = U(
3270
+ () => Lr(x, a),
3271
+ [x, a]
3272
+ ), p = U(() => Tr(t), [t]), L = (z) => {
3273
+ l(!1), i?.(z);
3274
+ }, A = () => {
3275
+ l(!1), g?.();
3213
3276
  };
3214
- return /* @__PURE__ */ n(Pe, { open: f, onOpenChange: c, children: [
3277
+ return /* @__PURE__ */ n(Ye, { open: f, onOpenChange: l, children: [
3215
3278
  /* @__PURE__ */ n(
3216
- _e,
3279
+ Ge,
3217
3280
  {
3218
- className: h(
3281
+ className: u(
3219
3282
  "relative rounded-xl hover:text-zinc-700 hover:!bg-zinc-300 !bg-zinc-200 text-zinc-600 shadow-none !px-2.5 p-2 max-h-10",
3220
3283
  o
3221
3284
  ),
3222
3285
  children: [
3223
- /* @__PURE__ */ e(wr, { className: "h-4 w-4" }),
3286
+ /* @__PURE__ */ e(Nr, { className: "h-4 w-4" }),
3224
3287
  p > 0 && /* @__PURE__ */ e(
3225
- lt,
3288
+ ut,
3226
3289
  {
3227
3290
  variant: "destructive",
3228
3291
  className: "absolute -right-4 -top-4 m-3 flex h-5 w-5 items-center justify-center rounded-full bg-primary p-0 text-[10px] font-medium hover:bg-primary",
@@ -3232,7 +3295,7 @@ function nn({
3232
3295
  ]
3233
3296
  }
3234
3297
  ),
3235
- /* @__PURE__ */ n(Re, { className: "w-80 rounded-xl p-0", align: "end", side: "bottom", sideOffset: 8, children: [
3298
+ /* @__PURE__ */ n(Ke, { className: "w-80 rounded-xl p-0", align: "end", side: "bottom", sideOffset: 8, children: [
3236
3299
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between border-b p-4", children: [
3237
3300
  /* @__PURE__ */ n("div", { children: [
3238
3301
  /* @__PURE__ */ e("h3", { className: "text-sm font-semibold", children: "Upcoming" }),
@@ -3242,41 +3305,41 @@ function nn({
3242
3305
  "button",
3243
3306
  {
3244
3307
  type: "button",
3245
- onClick: W,
3308
+ onClick: A,
3246
3309
  className: "text-xs text-primary hover:underline flex items-center gap-1",
3247
3310
  children: [
3248
3311
  "View all",
3249
- /* @__PURE__ */ e(kr, { className: "size-3" })
3312
+ /* @__PURE__ */ e(Mr, { className: "size-3" })
3250
3313
  ]
3251
3314
  }
3252
3315
  )
3253
3316
  ] }),
3254
- /* @__PURE__ */ e("div", { className: "max-h-80 overflow-y-auto p-2", children: r ? /* @__PURE__ */ e("div", { className: "space-y-2 p-2", children: Array.from({ length: 3 }).map((L, D) => /* @__PURE__ */ n("div", { className: "flex space-x-3", children: [
3255
- /* @__PURE__ */ e(ke, { className: "h-2 w-2 rounded-full mt-2" }),
3317
+ /* @__PURE__ */ e("div", { className: "max-h-80 overflow-y-auto p-2", children: r ? /* @__PURE__ */ e("div", { className: "space-y-2 p-2", children: Array.from({ length: 3 }).map((z, j) => /* @__PURE__ */ n("div", { className: "flex space-x-3", children: [
3318
+ /* @__PURE__ */ e(Se, { className: "h-2 w-2 rounded-full mt-2" }),
3256
3319
  /* @__PURE__ */ n("div", { className: "flex-1 space-y-2", children: [
3257
- /* @__PURE__ */ e(ke, { className: "h-4 w-full" }),
3258
- /* @__PURE__ */ e(ke, { className: "h-3 w-3/4" })
3320
+ /* @__PURE__ */ e(Se, { className: "h-4 w-full" }),
3321
+ /* @__PURE__ */ e(Se, { className: "h-3 w-3/4" })
3259
3322
  ] })
3260
- ] }, D)) }) : b.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-8 text-center", children: [
3261
- /* @__PURE__ */ e(br, { className: "mb-2 h-8 w-8 text-muted-foreground/50" }),
3323
+ ] }, j)) }) : y.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-8 text-center", children: [
3324
+ /* @__PURE__ */ e(Cr, { className: "mb-2 h-8 w-8 text-muted-foreground/50" }),
3262
3325
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "No upcoming events" }),
3263
3326
  /* @__PURE__ */ n("p", { className: "text-xs text-muted-foreground/70", children: [
3264
3327
  "Your schedule is clear for the next ",
3265
3328
  s,
3266
3329
  " days"
3267
3330
  ] })
3268
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-3 divide-y", children: b.map((L) => /* @__PURE__ */ e(
3269
- Hr,
3331
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-3 divide-y", children: y.map((z) => /* @__PURE__ */ e(
3332
+ jr,
3270
3333
  {
3271
- group: L,
3272
- onEventClick: S
3334
+ group: z,
3335
+ onEventClick: L
3273
3336
  },
3274
- L.dateKey
3337
+ z.dateKey
3275
3338
  )) }) })
3276
3339
  ] })
3277
3340
  ] });
3278
3341
  }
3279
- function Lr({ className: t }) {
3342
+ function Wr({ className: t }) {
3280
3343
  return /* @__PURE__ */ n(
3281
3344
  "svg",
3282
3345
  {
@@ -3301,7 +3364,7 @@ function Lr({ className: t }) {
3301
3364
  }
3302
3365
  );
3303
3366
  }
3304
- function Ge({ className: t }) {
3367
+ function Qe({ className: t }) {
3305
3368
  return /* @__PURE__ */ e(
3306
3369
  "svg",
3307
3370
  {
@@ -3319,53 +3382,53 @@ function Ge({ className: t }) {
3319
3382
  }
3320
3383
  );
3321
3384
  }
3322
- function Tr(t) {
3385
+ function Ar(t) {
3323
3386
  const r = /* @__PURE__ */ new Date();
3324
3387
  return r.setDate(r.getDate() + 1), t.getFullYear() === r.getFullYear() && t.getMonth() === r.getMonth() && t.getDate() === r.getDate();
3325
3388
  }
3326
- function Be(t) {
3389
+ function Ve(t) {
3327
3390
  const r = t.getHours(), o = t.getMinutes(), s = r >= 12 ? "PM" : "AM";
3328
3391
  return `${r % 12 || 12}:${o.toString().padStart(2, "0")} ${s}`;
3329
3392
  }
3330
- function Ir(t) {
3393
+ function Fr(t) {
3331
3394
  return new Intl.DateTimeFormat("en-US", {
3332
3395
  weekday: "long",
3333
3396
  month: "short",
3334
3397
  day: "numeric"
3335
3398
  }).format(t);
3336
3399
  }
3337
- function jr(t) {
3338
- const r = Be(t.startDate), o = Be(t.endDate);
3400
+ function Br(t) {
3401
+ const r = Ve(t.startDate), o = Ve(t.endDate);
3339
3402
  return `${r} - ${o}`;
3340
3403
  }
3341
- function Wr(t) {
3342
- return G(t) ? "Today" : Tr(t) ? "Tomorrow" : Ir(t);
3404
+ function $r(t) {
3405
+ return te(t) ? "Today" : Ar(t) ? "Tomorrow" : Fr(t);
3343
3406
  }
3344
- function Ar(t, r) {
3407
+ function Or(t, r) {
3345
3408
  const o = /* @__PURE__ */ new Map();
3346
3409
  for (const s of t) {
3347
- const i = xt(s.startDate), l = o.get(i) ?? [];
3348
- l.push(s), o.set(i, l);
3410
+ const a = bt(s.startDate), i = o.get(a) ?? [];
3411
+ i.push(s), o.set(a, i);
3349
3412
  }
3350
- return Array.from(o.entries()).map(([s, i]) => {
3351
- const l = [...i].sort(
3352
- (f, c) => f.startDate.getTime() - c.startDate.getTime()
3353
- ), g = r > 0 ? l.slice(0, r) : l;
3413
+ return Array.from(o.entries()).map(([s, a]) => {
3414
+ const i = [...a].sort(
3415
+ (f, l) => f.startDate.getTime() - l.startDate.getTime()
3416
+ ), g = r > 0 ? i.slice(0, r) : i;
3354
3417
  return {
3355
3418
  date: new Date(s),
3356
3419
  dateKey: s,
3357
3420
  events: g,
3358
- hasMore: r > 0 && l.length > r
3421
+ hasMore: r > 0 && i.length > r
3359
3422
  };
3360
- }).sort((s, i) => s.date.getTime() - i.date.getTime());
3423
+ }).sort((s, a) => s.date.getTime() - a.date.getTime());
3361
3424
  }
3362
- function Fr({ event: t, onClick: r, compact: o }) {
3425
+ function _r({ event: t, onClick: r, compact: o }) {
3363
3426
  return /* @__PURE__ */ n(
3364
3427
  "button",
3365
3428
  {
3366
3429
  type: "button",
3367
3430
  onClick: () => r?.(t),
3368
- className: h(
3431
+ className: u(
3369
3432
  "w-full text-left rounded-lg transition-colors",
3370
3433
  "hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3371
3434
  "flex items-start gap-3",
@@ -3375,41 +3438,41 @@ function Fr({ event: t, onClick: r, compact: o }) {
3375
3438
  /* @__PURE__ */ e(
3376
3439
  "div",
3377
3440
  {
3378
- className: h("shrink-0 rounded-full mt-1", o ? "size-2" : "size-2.5"),
3441
+ className: u("shrink-0 rounded-full mt-1", o ? "size-2" : "size-2.5"),
3379
3442
  style: { backgroundColor: t.color ?? "#3b82f6" }
3380
3443
  }
3381
3444
  ),
3382
3445
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
3383
- /* @__PURE__ */ e("p", { className: h("font-medium truncate", o ? "text-xs" : "text-sm"), children: t.title }),
3384
- /* @__PURE__ */ e("p", { className: h("text-muted-foreground truncate", o ? "text-[10px]" : "text-xs"), children: jr(t) })
3446
+ /* @__PURE__ */ e("p", { className: u("font-medium truncate", o ? "text-xs" : "text-sm"), children: t.title }),
3447
+ /* @__PURE__ */ e("p", { className: u("text-muted-foreground truncate", o ? "text-[10px]" : "text-xs"), children: Br(t) })
3385
3448
  ] }),
3386
3449
  r && /* @__PURE__ */ e(
3387
- Ge,
3450
+ Qe,
3388
3451
  {
3389
- className: h("shrink-0 text-muted-foreground/50", o ? "size-3" : "size-4")
3452
+ className: u("shrink-0 text-muted-foreground/50", o ? "size-3" : "size-4")
3390
3453
  }
3391
3454
  )
3392
3455
  ]
3393
3456
  }
3394
3457
  );
3395
3458
  }
3396
- function $r({
3459
+ function Pr({
3397
3460
  group: t,
3398
3461
  onEventClick: r,
3399
3462
  onViewMore: o,
3400
3463
  compact: s
3401
3464
  }) {
3402
3465
  return /* @__PURE__ */ n("div", { className: "space-y-1", children: [
3403
- /* @__PURE__ */ n("div", { className: h("flex items-center justify-between px-2", s ? "py-1" : "py-1.5"), children: [
3466
+ /* @__PURE__ */ n("div", { className: u("flex items-center justify-between px-2", s ? "py-1" : "py-1.5"), children: [
3404
3467
  /* @__PURE__ */ e(
3405
3468
  "h3",
3406
3469
  {
3407
- className: h(
3470
+ className: u(
3408
3471
  "font-semibold",
3409
3472
  s ? "text-xs" : "text-sm",
3410
- G(t.date) && "text-primary"
3473
+ te(t.date) && "text-primary"
3411
3474
  ),
3412
- children: Wr(t.date)
3475
+ children: $r(t.date)
3413
3476
  }
3414
3477
  ),
3415
3478
  t.hasMore && o && /* @__PURE__ */ e(
@@ -3417,96 +3480,96 @@ function $r({
3417
3480
  {
3418
3481
  type: "button",
3419
3482
  onClick: () => o(t.date),
3420
- className: h("text-primary hover:underline", s ? "text-[10px]" : "text-xs"),
3483
+ className: u("text-primary hover:underline", s ? "text-[10px]" : "text-xs"),
3421
3484
  children: "+more"
3422
3485
  }
3423
3486
  )
3424
3487
  ] }),
3425
- /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((i) => /* @__PURE__ */ e(Fr, { event: i, onClick: r, compact: s }, i.id)) })
3488
+ /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((a) => /* @__PURE__ */ e(_r, { event: a, onClick: r, compact: s }, a.id)) })
3426
3489
  ] });
3427
3490
  }
3428
- function on({
3491
+ function cn({
3429
3492
  events: t,
3430
3493
  daysAhead: r = 7,
3431
3494
  maxEventsPerDay: o = 3,
3432
3495
  onEventClick: s,
3433
- onViewAll: i,
3434
- className: l,
3496
+ onViewAll: a,
3497
+ className: i,
3435
3498
  emptyState: g,
3436
3499
  title: f = "Upcoming",
3437
- showHeader: c = !0,
3500
+ showHeader: l = !0,
3438
3501
  compact: x = !1
3439
3502
  }) {
3440
- const b = Oe(), p = b?.filteredEvents, S = b?.currentDate ?? /* @__PURE__ */ new Date(), W = t ?? p ?? [], L = B(() => {
3441
- const T = pe(S), w = new Date(T);
3442
- return w.setDate(w.getDate() + r), W.filter((I) => I.endDate >= T && I.startDate < w);
3443
- }, [W, r, S]), D = B(
3444
- () => Ar(L, o),
3445
- [L, o]
3446
- ), z = L.length;
3447
- return D.length === 0 ? /* @__PURE__ */ n("div", { className: h("rounded-lg border bg-card", l), children: [
3448
- c && /* @__PURE__ */ e(
3503
+ const y = Ue(), p = y?.filteredEvents, L = y?.currentDate ?? /* @__PURE__ */ new Date(), A = t ?? p ?? [], z = U(() => {
3504
+ const C = ye(L), T = new Date(C);
3505
+ return T.setDate(T.getDate() + r), A.filter((_) => _.endDate >= C && _.startDate < T);
3506
+ }, [A, r, L]), j = U(
3507
+ () => Or(z, o),
3508
+ [z, o]
3509
+ ), I = z.length;
3510
+ return j.length === 0 ? /* @__PURE__ */ n("div", { className: u("rounded-lg border bg-card", i), children: [
3511
+ l && /* @__PURE__ */ e(
3449
3512
  "div",
3450
3513
  {
3451
- className: h(
3514
+ className: u(
3452
3515
  "border-b px-4 flex items-center justify-between",
3453
3516
  x ? "py-2" : "py-3"
3454
3517
  ),
3455
- children: /* @__PURE__ */ e("h2", { className: h("font-semibold", x ? "text-sm" : "text-base"), children: f })
3518
+ children: /* @__PURE__ */ e("h2", { className: u("font-semibold", x ? "text-sm" : "text-base"), children: f })
3456
3519
  }
3457
3520
  ),
3458
3521
  /* @__PURE__ */ e(
3459
3522
  "div",
3460
3523
  {
3461
- className: h(
3524
+ className: u(
3462
3525
  "flex flex-col items-center justify-center text-center",
3463
3526
  x ? "py-6 px-4" : "py-10 px-6"
3464
3527
  ),
3465
- children: g ?? /* @__PURE__ */ n(re, { children: [
3528
+ children: g ?? /* @__PURE__ */ n(ce, { children: [
3466
3529
  /* @__PURE__ */ e(
3467
- Lr,
3530
+ Wr,
3468
3531
  {
3469
- className: h("text-muted-foreground/50 mb-2", x ? "size-8" : "size-10")
3532
+ className: u("text-muted-foreground/50 mb-2", x ? "size-8" : "size-10")
3470
3533
  }
3471
3534
  ),
3472
- /* @__PURE__ */ e("p", { className: h("text-muted-foreground", x ? "text-xs" : "text-sm"), children: "No upcoming events" })
3535
+ /* @__PURE__ */ e("p", { className: u("text-muted-foreground", x ? "text-xs" : "text-sm"), children: "No upcoming events" })
3473
3536
  ] })
3474
3537
  }
3475
3538
  )
3476
- ] }) : /* @__PURE__ */ n("div", { className: h("rounded-lg border bg-card overflow-hidden", l), children: [
3477
- c && /* @__PURE__ */ n(
3539
+ ] }) : /* @__PURE__ */ n("div", { className: u("rounded-lg border bg-card overflow-hidden", i), children: [
3540
+ l && /* @__PURE__ */ n(
3478
3541
  "div",
3479
3542
  {
3480
- className: h(
3543
+ className: u(
3481
3544
  "border-b px-4 flex items-center justify-between",
3482
3545
  x ? "py-2" : "py-3"
3483
3546
  ),
3484
3547
  children: [
3485
3548
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
3486
- /* @__PURE__ */ e("h2", { className: h("font-semibold", x ? "text-sm" : "text-base"), children: f }),
3549
+ /* @__PURE__ */ e("h2", { className: u("font-semibold", x ? "text-sm" : "text-base"), children: f }),
3487
3550
  /* @__PURE__ */ e(
3488
3551
  "span",
3489
3552
  {
3490
- className: h(
3553
+ className: u(
3491
3554
  "text-muted-foreground bg-muted rounded-full px-2",
3492
3555
  x ? "text-[10px] py-0" : "text-xs py-0.5"
3493
3556
  ),
3494
- children: z
3557
+ children: I
3495
3558
  }
3496
3559
  )
3497
3560
  ] }),
3498
- i && /* @__PURE__ */ n(
3561
+ a && /* @__PURE__ */ n(
3499
3562
  "button",
3500
3563
  {
3501
3564
  type: "button",
3502
- onClick: () => i(),
3503
- className: h(
3565
+ onClick: () => a(),
3566
+ className: u(
3504
3567
  "text-primary hover:underline flex items-center gap-0.5",
3505
3568
  x ? "text-xs" : "text-sm"
3506
3569
  ),
3507
3570
  children: [
3508
3571
  "View all",
3509
- /* @__PURE__ */ e(Ge, { className: "size-3" })
3572
+ /* @__PURE__ */ e(Qe, { className: "size-3" })
3510
3573
  ]
3511
3574
  }
3512
3575
  )
@@ -3516,39 +3579,39 @@ function on({
3516
3579
  /* @__PURE__ */ e(
3517
3580
  "div",
3518
3581
  {
3519
- className: h(
3582
+ className: u(
3520
3583
  "divide-y overflow-auto",
3521
3584
  x ? "p-2 max-h-[280px]" : "p-3 max-h-[400px]"
3522
3585
  ),
3523
- children: D.map((T) => /* @__PURE__ */ e(
3524
- $r,
3586
+ children: j.map((C) => /* @__PURE__ */ e(
3587
+ Pr,
3525
3588
  {
3526
- group: T,
3589
+ group: C,
3527
3590
  onEventClick: s,
3528
- onViewMore: i ? (w) => i(w) : void 0,
3591
+ onViewMore: a ? (T) => a(T) : void 0,
3529
3592
  compact: x
3530
3593
  },
3531
- T.dateKey
3594
+ C.dateKey
3532
3595
  ))
3533
3596
  }
3534
3597
  )
3535
3598
  ] });
3536
3599
  }
3537
3600
  export {
3538
- nn as A,
3539
- Jr as B,
3540
- Yr as C,
3541
- Zr as D,
3542
- Gr as E,
3543
- Kr as I,
3544
- tn as S,
3545
- ue as T,
3546
- rn as U,
3547
- Xr as V,
3548
- Qr as W,
3549
- Kt as Y,
3550
- on as a,
3551
- en as b,
3552
- qr as c
3601
+ ln as A,
3602
+ en as B,
3603
+ Jr as C,
3604
+ nn as D,
3605
+ Xr as E,
3606
+ Qr as I,
3607
+ sn as S,
3608
+ fe as T,
3609
+ an as U,
3610
+ tn as V,
3611
+ rn as W,
3612
+ Qt as Y,
3613
+ cn as a,
3614
+ on as b,
3615
+ Zr as c
3553
3616
  };
3554
- //# sourceMappingURL=agenda-widget-DhCPt2vI.js.map
3617
+ //# sourceMappingURL=agenda-widget-ssrwyMvF.js.map