@innosolutions/inno-calendar 1.0.54 → 1.0.55

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