@innosolutions/inno-calendar 1.0.71 → 1.0.72

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