@innosolutions/inno-calendar 1.0.34 → 1.0.37

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