@innosolutions/inno-calendar 1.0.43 → 1.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/agenda-widget-DDOkgI_F.cjs +2 -0
  2. package/dist/agenda-widget-DDOkgI_F.cjs.map +1 -0
  3. package/dist/{agenda-widget-berMFJOV.js → agenda-widget-DfS-16x0.js} +576 -538
  4. package/dist/agenda-widget-DfS-16x0.js.map +1 -0
  5. package/dist/components/header/calendar-header.d.ts.map +1 -1
  6. package/dist/components/index.cjs +1 -1
  7. package/dist/components/index.mjs +2 -2
  8. package/dist/components/inno-calendar.d.ts.map +1 -1
  9. package/dist/components/views/day-view.d.ts.map +1 -1
  10. package/dist/components/views/timeline-view.d.ts.map +1 -1
  11. package/dist/index.cjs +1 -1
  12. package/dist/index.mjs +3 -3
  13. package/dist/presets/index.cjs +1 -1
  14. package/dist/presets/index.mjs +1 -1
  15. package/dist/{tailwind-calendar-ayfrJLXl.js → tailwind-calendar-C3pTnlko.js} +2 -2
  16. package/dist/{tailwind-calendar-ayfrJLXl.js.map → tailwind-calendar-C3pTnlko.js.map} +1 -1
  17. package/dist/{tailwind-calendar-BvRVRpnC.cjs → tailwind-calendar-e6gekmW5.cjs} +2 -2
  18. package/dist/{tailwind-calendar-BvRVRpnC.cjs.map → tailwind-calendar-e6gekmW5.cjs.map} +1 -1
  19. package/dist/week-view-DYhRfubT.cjs +11 -0
  20. package/dist/week-view-DYhRfubT.cjs.map +1 -0
  21. package/dist/{week-view-BvwBOdd6.js → week-view-DbktCaJh.js} +659 -665
  22. package/dist/week-view-DbktCaJh.js.map +1 -0
  23. package/package.json +1 -1
  24. package/dist/agenda-widget-6s0aP1-t.cjs +0 -2
  25. package/dist/agenda-widget-6s0aP1-t.cjs.map +0 -1
  26. package/dist/agenda-widget-berMFJOV.js.map +0 -1
  27. package/dist/week-view-BvwBOdd6.js.map +0 -1
  28. package/dist/week-view-COv7gU-n.cjs +0 -11
  29. package/dist/week-view-COv7gU-n.cjs.map +0 -1
@@ -1,14 +1,14 @@
1
1
  import { jsx as e, jsxs as r, Fragment as pt } from "react/jsx-runtime";
2
2
  import * as ee from "react";
3
- import { useState as J, useCallback as L, useRef as te, forwardRef as $e, createElement as Le, useMemo as F, useLayoutEffect as Ie, useEffect as We } from "react";
3
+ import { useState as J, useCallback as W, useRef as te, forwardRef as $e, createElement as Le, useMemo as F, useLayoutEffect as Ie, useEffect as Ae } from "react";
4
4
  import { c as d, a as ft } from "./index-DtaLkIY8.js";
5
5
  import * as V from "@radix-ui/react-dropdown-menu";
6
6
  import { formatEventTimeDisplay as X, getEventsCountInView as gt, getRangeText as xt, groupEventsByDate as yt, isToday as ce, detectAllDayEvent as De, isSameDay as le, getEventsForDay as He, separateEventsByDuration as rt, calculateOverlappingPositions as ot, getVisibleHoursArray as at, isWorkingHour as it, formatHourLabel as Ce, generateMonthGrid as bt, startOfDay as Ge, getWeekDays as wt } from "./utils.mjs";
7
7
  import { a as Re, b as Oe } from "./slot-selection-context-D2eu2o-7.js";
8
- import * as he from "@radix-ui/react-popover";
9
- import * as ye from "@radix-ui/react-tooltip";
10
- const re = he.Root, oe = he.Trigger, vn = he.Anchor, Q = ee.forwardRef(({ className: t, align: n = "center", sideOffset: o = 4, ...a }, i) => /* @__PURE__ */ e(he.Portal, { children: /* @__PURE__ */ e(
11
- he.Content,
8
+ import * as pe from "@radix-ui/react-popover";
9
+ import * as be from "@radix-ui/react-tooltip";
10
+ const re = pe.Root, oe = pe.Trigger, Nn = pe.Anchor, Q = ee.forwardRef(({ className: t, align: n = "center", sideOffset: o = 4, ...a }, i) => /* @__PURE__ */ e(pe.Portal, { children: /* @__PURE__ */ e(
11
+ pe.Content,
12
12
  {
13
13
  ref: i,
14
14
  align: n,
@@ -20,9 +20,9 @@ const re = he.Root, oe = he.Trigger, vn = he.Anchor, Q = ee.forwardRef(({ classN
20
20
  ...a
21
21
  }
22
22
  ) }));
23
- Q.displayName = he.Content.displayName;
24
- const Nn = ye.Provider, ie = ye.Root, se = ye.Trigger, ne = ee.forwardRef(({ className: t, sideOffset: n = 4, ...o }, a) => /* @__PURE__ */ e(
25
- ye.Content,
23
+ Q.displayName = pe.Content.displayName;
24
+ const kn = be.Provider, ie = be.Root, se = be.Trigger, ne = ee.forwardRef(({ className: t, sideOffset: n = 4, ...o }, a) => /* @__PURE__ */ e(
25
+ be.Content,
26
26
  {
27
27
  ref: a,
28
28
  sideOffset: n,
@@ -33,7 +33,7 @@ const Nn = ye.Provider, ie = ye.Root, se = ye.Trigger, ne = ee.forwardRef(({ cla
33
33
  ...o
34
34
  }
35
35
  ));
36
- ne.displayName = ye.Content.displayName;
36
+ ne.displayName = be.Content.displayName;
37
37
  function de(t) {
38
38
  return {
39
39
  blue: {
@@ -128,40 +128,40 @@ function Se({
128
128
  badgeVariant: o = "colored",
129
129
  onClick: a,
130
130
  className: i,
131
- showTime: p = !0,
131
+ showTime: f = !0,
132
132
  showDescription: s = !1,
133
- showParticipants: y = !1,
134
- style: D,
133
+ showParticipants: x = !1,
134
+ style: N,
135
135
  disablePopover: l = !1,
136
- renderPopover: b,
137
- enableDrag: k = !1,
136
+ renderPopover: y,
137
+ enableDrag: v = !1,
138
138
  enablePageTransition: m = !1,
139
139
  pageTransitionDuration: g = 400
140
140
  }) {
141
- const u = de(t.color), [N, v] = J(!1), [z, M] = J(!1), [W, O] = J(!1), [_, E] = J(null), T = te(null), I = Re(), S = t.endDate < je(/* @__PURE__ */ new Date()), $ = t.isCanceled ?? !1, q = k && I && !$ && !S, f = t.data, x = f?.meetingTookPlace ?? t.meetingTookPlace ?? !1, B = $ ? /* @__PURE__ */ e(Nt, { className: "h-3 w-3 text-zinc-800 dark:text-zinc-200" }) : x ? /* @__PURE__ */ e(vt, { className: d("h-3 w-3", u.text) }) : null, R = t.scheduleTypeName || f?.scheduleTypeName || f?.typeName, P = f?.productName, w = f?.nrParticipant, c = f?.siteName, h = f?.siteCity, C = [c, h].filter(Boolean).join(", "), H = L(() => {
142
- if (!z) {
141
+ const u = de(t.color), [b, w] = J(!1), [L, T] = J(!1), [A, O] = J(!1), [B, E] = J(null), M = te(null), I = Re(), S = t.endDate < je(/* @__PURE__ */ new Date()), $ = t.isCanceled ?? !1, q = v && I && !$ && !S, D = t.data, h = D?.meetingTookPlace ?? t.meetingTookPlace ?? !1, _ = $ ? /* @__PURE__ */ e(Nt, { className: "h-3 w-3 text-zinc-800 dark:text-zinc-200" }) : h ? /* @__PURE__ */ e(vt, { className: d("h-3 w-3", u.text) }) : null, R = t.scheduleTypeName || D?.scheduleTypeName || D?.typeName, P = D?.productName, k = D?.nrParticipant, c = D?.siteName, p = D?.siteCity, C = [c, p].filter(Boolean).join(", "), H = W(() => {
142
+ if (!L) {
143
143
  if (l && a) {
144
144
  a(t);
145
145
  return;
146
146
  }
147
- if (m && T.current) {
148
- const U = T.current.getBoundingClientRect();
147
+ if (m && M.current) {
148
+ const U = M.current.getBoundingClientRect();
149
149
  E(U), O(!0);
150
- } else l || v(!0);
150
+ } else l || w(!0);
151
151
  }
152
- }, [z, l, a, t, m]);
153
- L(() => {
154
- O(!1), E(null), l || v(!0);
152
+ }, [L, l, a, t, m]);
153
+ W(() => {
154
+ O(!1), E(null), l || w(!0);
155
155
  }, [l]);
156
- const A = L(() => {
157
- v(!1);
158
- }, []), Y = L(
156
+ const z = W(() => {
157
+ w(!1);
158
+ }, []), Y = W(
159
159
  (U) => {
160
- q && (U.dataTransfer.effectAllowed = "move", U.dataTransfer.setData("text/plain", t.id), M(!0), I?.startDrag?.(t));
160
+ q && (U.dataTransfer.effectAllowed = "move", U.dataTransfer.setData("text/plain", t.id), T(!0), I?.startDrag?.(t));
161
161
  },
162
162
  [q, t, I]
163
- ), j = L(() => {
164
- M(!1), I?.isDragging && I.endDrag?.();
163
+ ), j = W(() => {
164
+ T(!1), I?.isDragging && I.endDrag?.();
165
165
  }, [I]);
166
166
  if (n === "dot") {
167
167
  const U = /* @__PURE__ */ e(
@@ -175,7 +175,7 @@ function Se({
175
175
  t.isCanceled && "opacity-50",
176
176
  i
177
177
  ),
178
- style: D,
178
+ style: N,
179
179
  "aria-label": t.title
180
180
  }
181
181
  );
@@ -185,12 +185,12 @@ function Se({
185
185
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
186
186
  /* @__PURE__ */ e("div", { className: "text-xs opacity-80", children: X(t) })
187
187
  ] }) })
188
- ] }) : /* @__PURE__ */ r(re, { open: N, onOpenChange: v, children: [
188
+ ] }) : /* @__PURE__ */ r(re, { open: b, onOpenChange: w, children: [
189
189
  /* @__PURE__ */ e(oe, { asChild: !0, children: /* @__PURE__ */ r(ie, { children: [
190
190
  /* @__PURE__ */ e(se, { asChild: !0, children: U }),
191
191
  /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }) })
192
192
  ] }) }),
193
- /* @__PURE__ */ e(Q, { className: "w-80", children: b ? b({ event: t, onClose: A }) : /* @__PURE__ */ e(xe, { event: t, onClose: A }) })
193
+ /* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: z }) : /* @__PURE__ */ e(ye, { event: t, onClose: z }) })
194
194
  ] });
195
195
  }
196
196
  if (n === "compact") {
@@ -209,7 +209,7 @@ function Se({
209
209
  className: d(
210
210
  "group flex w-full relative items-center shadow-[0_0_1px_rgba(0,0,0,0.3)] gap-0 rounded px-1.5 py-1 text-left text-xs transition-colors hover:opacity-80",
211
211
  q ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
212
- z && "opacity-50",
212
+ L && "opacity-50",
213
213
  // Cancelled events get gray background with strikethrough
214
214
  $ || // Past events get neutral zinc styling
215
215
  S ? "bg-zinc-100 dark:bg-zinc-800 text-zinc-500 dark:text-zinc-400 line-through" : [
@@ -219,7 +219,7 @@ function Se({
219
219
  ],
220
220
  i
221
221
  ),
222
- style: D,
222
+ style: N,
223
223
  children: [
224
224
  ["dot", "mixed"].includes(o) && !S && /* @__PURE__ */ e(
225
225
  "svg",
@@ -261,7 +261,7 @@ function Se({
261
261
  }
262
262
  )
263
263
  ] }) }),
264
- /* @__PURE__ */ e("div", { className: "flex gap-0.5", children: B })
264
+ /* @__PURE__ */ e("div", { className: "flex gap-0.5", children: _ })
265
265
  ]
266
266
  }
267
267
  );
@@ -271,9 +271,9 @@ function Se({
271
271
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
272
272
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t) })
273
273
  ] }) })
274
- ] }) : /* @__PURE__ */ r(re, { open: N, onOpenChange: v, children: [
274
+ ] }) : /* @__PURE__ */ r(re, { open: b, onOpenChange: w, children: [
275
275
  /* @__PURE__ */ e(oe, { asChild: !0, children: U }),
276
- /* @__PURE__ */ e(Q, { className: "w-80", children: b ? b({ event: t, onClose: A }) : /* @__PURE__ */ e(xe, { event: t, onClose: A }) })
276
+ /* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: z }) : /* @__PURE__ */ e(ye, { event: t, onClose: z }) })
277
277
  ] });
278
278
  }
279
279
  const G = /* @__PURE__ */ r(
@@ -302,7 +302,7 @@ function Se({
302
302
  ],
303
303
  i
304
304
  ),
305
- style: D,
305
+ style: N,
306
306
  children: [
307
307
  /* @__PURE__ */ r("div", { className: "flex items-start justify-between gap-1", children: [
308
308
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 min-w-0", children: [
@@ -337,18 +337,18 @@ function Se({
337
337
  }
338
338
  )
339
339
  ] }),
340
- B
340
+ _
341
341
  ] }),
342
342
  P && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: P }),
343
- w != null && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
343
+ k != null && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
344
344
  /* @__PURE__ */ e(Ee, { className: "h-3 w-3 shrink-0" }),
345
345
  /* @__PURE__ */ r("span", { children: [
346
- w,
346
+ k,
347
347
  " participant",
348
- w !== 1 ? "s" : ""
348
+ k !== 1 ? "s" : ""
349
349
  ] })
350
350
  ] }),
351
- p && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
351
+ f && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
352
352
  /* @__PURE__ */ e(Pe, { className: "h-3 w-3 shrink-0" }),
353
353
  /* @__PURE__ */ e("span", { children: X(t) })
354
354
  ] }),
@@ -357,7 +357,7 @@ function Se({
357
357
  /* @__PURE__ */ e("span", { className: "truncate", children: C })
358
358
  ] }),
359
359
  s && t.description && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground line-clamp-2", children: t.description }),
360
- y && t.participants && t.participants.length > 0 && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
360
+ x && t.participants && t.participants.length > 0 && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
361
361
  /* @__PURE__ */ e(Ee, { className: "h-3 w-3 shrink-0" }),
362
362
  /* @__PURE__ */ e("span", { className: "truncate", children: t.participants.map((U) => U.name).join(", ") })
363
363
  ] })
@@ -370,9 +370,9 @@ function Se({
370
370
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
371
371
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t) })
372
372
  ] }) })
373
- ] }) : /* @__PURE__ */ r(re, { open: N, onOpenChange: v, children: [
373
+ ] }) : /* @__PURE__ */ r(re, { open: b, onOpenChange: w, children: [
374
374
  /* @__PURE__ */ e(oe, { asChild: !0, children: G }),
375
- /* @__PURE__ */ e(Q, { className: "w-80", children: b ? b({ event: t, onClose: A }) : /* @__PURE__ */ e(xe, { event: t, onClose: A }) })
375
+ /* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: z }) : /* @__PURE__ */ e(ye, { event: t, onClose: z }) })
376
376
  ] });
377
377
  }
378
378
  function Pe({ className: t }) {
@@ -469,7 +469,7 @@ function st({ className: t }) {
469
469
  }
470
470
  );
471
471
  }
472
- function xe({
472
+ function ye({
473
473
  event: t,
474
474
  onClose: n
475
475
  }) {
@@ -517,32 +517,32 @@ function lt({
517
517
  hourHeight: o = 96,
518
518
  badgeVariant: a = "colored",
519
519
  onClick: i,
520
- className: p,
520
+ className: f,
521
521
  disablePopover: s = !1,
522
- renderPopover: y,
523
- enableDrag: D = !0
522
+ renderPopover: x,
523
+ enableDrag: N = !0
524
524
  }) {
525
- const l = de(t.color), [b, k] = J(!1), [m, g] = J(!1), u = Re(), N = (t.endDate.getTime() - t.startDate.getTime()) / (1e3 * 60), v = N / 60 * o - 8, z = t.endDate < je(/* @__PURE__ */ new Date()), M = t.isCanceled ?? !1, W = D && u && !M && !z, O = N < 35, _ = N > 25, E = N >= 45, T = t.data, I = t.scheduleTypeName || T?.scheduleTypeName || T?.typeName, S = T?.productName, $ = T?.nrParticipant, q = T?.siteName, f = T?.siteCity, x = [q, f].filter(Boolean).join(", "), B = a === "dot", R = L(() => {
526
- m || (s && i ? i(t) : s || k(!0));
527
- }, [m, s, i, t]), P = L(() => {
528
- k(!1);
529
- }, []), w = L(
530
- (A) => {
531
- if (!W) return;
532
- A.dataTransfer.effectAllowed = "move", A.dataTransfer.setData("text/plain", t.id);
533
- const Y = A.currentTarget, j = Y.getBoundingClientRect();
534
- A.dataTransfer.setDragImage(
525
+ const l = de(t.color), [y, v] = J(!1), [m, g] = J(!1), u = Re(), b = (t.endDate.getTime() - t.startDate.getTime()) / (1e3 * 60), w = b / 60 * o - 8, L = t.endDate < je(/* @__PURE__ */ new Date()), T = t.isCanceled ?? !1, A = N && u && !T && !L, O = b < 35, B = b > 25, E = b >= 45, M = t.data, I = t.scheduleTypeName || M?.scheduleTypeName || M?.typeName, S = M?.productName, $ = M?.nrParticipant, q = M?.siteName, D = M?.siteCity, h = [q, D].filter(Boolean).join(", "), _ = a === "dot", R = W(() => {
526
+ m || (s && i ? i(t) : s || v(!0));
527
+ }, [m, s, i, t]), P = W(() => {
528
+ v(!1);
529
+ }, []), k = W(
530
+ (z) => {
531
+ if (!A) return;
532
+ z.dataTransfer.effectAllowed = "move", z.dataTransfer.setData("text/plain", t.id);
533
+ const Y = z.currentTarget, j = Y.getBoundingClientRect();
534
+ z.dataTransfer.setDragImage(
535
535
  Y,
536
- A.clientX - j.left,
537
- A.clientY - j.top
536
+ z.clientX - j.left,
537
+ z.clientY - j.top
538
538
  ), g(!0), u?.startDrag?.(t);
539
539
  },
540
- [W, t, u]
541
- ), c = L(() => {
540
+ [A, t, u]
541
+ ), c = W(() => {
542
542
  g(!1), u?.isDragging && u.endDrag?.();
543
- }, [u]), h = L(
544
- (A) => {
545
- (A.key === "Enter" || A.key === " ") && (A.preventDefault(), R());
543
+ }, [u]), p = W(
544
+ (z) => {
545
+ (z.key === "Enter" || z.key === " ") && (z.preventDefault(), R());
546
546
  },
547
547
  [R]
548
548
  ), C = /* @__PURE__ */ r(
@@ -550,38 +550,38 @@ function lt({
550
550
  {
551
551
  role: "button",
552
552
  tabIndex: 0,
553
- draggable: !!W,
554
- onDragStart: w,
553
+ draggable: !!A,
554
+ onDragStart: k,
555
555
  onDragEnd: c,
556
- onKeyDown: h,
556
+ onKeyDown: p,
557
557
  onClick: m ? void 0 : R,
558
558
  className: d(
559
559
  "group flex w-full select-none flex-col gap-0.5 overflow-hidden rounded-md border-l-[3px] px-2 py-1.5 text-xs text-left",
560
560
  "shadow-[0_1px_3px_rgba(0,0,0,0.08)] hover:shadow-[0_2px_6px_rgba(0,0,0,0.12)]",
561
561
  "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
562
562
  "transition-all",
563
- W ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
563
+ A ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
564
564
  m && "opacity-50",
565
565
  // Cancelled events get gray background with strikethrough
566
- M || // Past events get neutral zinc styling with strikethrough
567
- z ? "bg-zinc-100 dark:bg-zinc-800 border-l-zinc-400 dark:border-l-zinc-600 text-zinc-500 dark:text-zinc-400 line-through" : [
566
+ T || // Past events get neutral zinc styling with strikethrough
567
+ L ? "bg-zinc-100 dark:bg-zinc-800 border-l-zinc-400 dark:border-l-zinc-600 text-zinc-500 dark:text-zinc-400 line-through" : [
568
568
  // Colored/mixed variants
569
- !B && [
569
+ !_ && [
570
570
  l.bg,
571
571
  l.accentBorder,
572
572
  l.text
573
573
  ],
574
574
  // Dot variant - neutral background
575
- B && "bg-neutral-50 dark:bg-neutral-900 border-l-neutral-400 dark:border-l-neutral-600"
575
+ _ && "bg-neutral-50 dark:bg-neutral-900 border-l-neutral-400 dark:border-l-neutral-600"
576
576
  ],
577
577
  // Short events center content
578
578
  O && "py-0 justify-center",
579
- p
579
+ f
580
580
  ),
581
- style: { height: `${Math.max(v, 20)}px` },
581
+ style: { height: `${Math.max(w, 20)}px` },
582
582
  children: [
583
583
  /* @__PURE__ */ r("div", { className: "flex items-start gap-1.5 min-w-0", children: [
584
- ["mixed", "dot"].includes(a) && !z && !M && /* @__PURE__ */ e(
584
+ ["mixed", "dot"].includes(a) && !L && !T && /* @__PURE__ */ e(
585
585
  "svg",
586
586
  {
587
587
  width: "8",
@@ -598,7 +598,7 @@ function lt({
598
598
  {
599
599
  className: d(
600
600
  "font-semibold truncate leading-tight",
601
- !z && !M && B && "text-foreground"
601
+ !L && !T && _ && "text-foreground"
602
602
  ),
603
603
  children: [
604
604
  t.title,
@@ -616,7 +616,7 @@ function lt({
616
616
  {
617
617
  className: d(
618
618
  "text-[11px] truncate leading-tight",
619
- B ? "text-muted-foreground" : "opacity-80"
619
+ _ ? "text-muted-foreground" : "opacity-80"
620
620
  ),
621
621
  children: S
622
622
  }
@@ -626,7 +626,7 @@ function lt({
626
626
  {
627
627
  className: d(
628
628
  "flex items-center gap-1 text-[11px] leading-tight",
629
- B ? "text-muted-foreground" : "opacity-80"
629
+ _ ? "text-muted-foreground" : "opacity-80"
630
630
  ),
631
631
  children: [
632
632
  /* @__PURE__ */ e(Ee, { className: "h-3 w-3 shrink-0" }),
@@ -638,12 +638,12 @@ function lt({
638
638
  ]
639
639
  }
640
640
  ),
641
- _ && /* @__PURE__ */ r(
641
+ B && /* @__PURE__ */ r(
642
642
  "div",
643
643
  {
644
644
  className: d(
645
645
  "flex items-center gap-1 text-[11px] tabular-nums leading-tight",
646
- B ? "text-muted-foreground" : "opacity-90"
646
+ _ ? "text-muted-foreground" : "opacity-90"
647
647
  ),
648
648
  children: [
649
649
  /* @__PURE__ */ e(Pe, { className: "h-3 w-3 shrink-0" }),
@@ -651,16 +651,16 @@ function lt({
651
651
  ]
652
652
  }
653
653
  ),
654
- E && x && /* @__PURE__ */ r(
654
+ E && h && /* @__PURE__ */ r(
655
655
  "div",
656
656
  {
657
657
  className: d(
658
658
  "flex items-center gap-1 text-[11px] truncate leading-tight",
659
- B ? "text-muted-foreground" : "opacity-80"
659
+ _ ? "text-muted-foreground" : "opacity-80"
660
660
  ),
661
661
  children: [
662
662
  /* @__PURE__ */ e(st, { className: "h-3 w-3 shrink-0" }),
663
- /* @__PURE__ */ e("span", { className: "truncate", children: x })
663
+ /* @__PURE__ */ e("span", { className: "truncate", children: h })
664
664
  ]
665
665
  }
666
666
  )
@@ -682,7 +682,7 @@ function lt({
682
682
  $ !== 1 ? "s" : ""
683
683
  ] }),
684
684
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t) }),
685
- x && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: x })
685
+ h && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: h })
686
686
  ] }) });
687
687
  return s ? /* @__PURE__ */ e(
688
688
  "div",
@@ -709,28 +709,28 @@ function lt({
709
709
  width: n.minWidth ? `max(${n.minWidth}px, ${n.width}%)` : `${n.width}%`,
710
710
  minWidth: n.minWidth ? `${n.minWidth}px` : void 0
711
711
  },
712
- children: /* @__PURE__ */ r(re, { open: b, onOpenChange: k, children: [
712
+ children: /* @__PURE__ */ r(re, { open: y, onOpenChange: v, children: [
713
713
  /* @__PURE__ */ e(oe, { asChild: !0, children: C }),
714
- /* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: P }) : /* @__PURE__ */ e(xe, { event: t, onClose: P }) })
714
+ /* @__PURE__ */ e(Q, { className: "w-80", children: x ? x({ event: t, onClose: P }) : /* @__PURE__ */ e(ye, { event: t, onClose: P }) })
715
715
  ] })
716
716
  }
717
717
  );
718
718
  }
719
- function kn({
719
+ function Dn({
720
720
  event: t,
721
721
  spanDays: n,
722
722
  isStart: o,
723
723
  isEnd: a,
724
724
  onClick: i,
725
- className: p,
725
+ className: f,
726
726
  disablePopover: s = !1,
727
- renderPopover: y
727
+ renderPopover: x
728
728
  }) {
729
- const D = de(t.color), [l, b] = J(!1), k = t.endDate < je(/* @__PURE__ */ new Date()), m = t.isCanceled ?? !1, g = L(() => {
730
- s && i ? i(t) : s || b(!0);
731
- }, [s, i, t]), u = L(() => {
732
- b(!1);
733
- }, []), N = /* @__PURE__ */ e(
729
+ const N = de(t.color), [l, y] = J(!1), v = t.endDate < je(/* @__PURE__ */ new Date()), m = t.isCanceled ?? !1, g = W(() => {
730
+ s && i ? i(t) : s || y(!0);
731
+ }, [s, i, t]), u = W(() => {
732
+ y(!1);
733
+ }, []), b = /* @__PURE__ */ e(
734
734
  "button",
735
735
  {
736
736
  type: "button",
@@ -739,26 +739,26 @@ function kn({
739
739
  "flex h-5 items-center px-1.5 text-xs font-medium transition-opacity hover:opacity-80",
740
740
  // Cancelled events get gray background with strikethrough
741
741
  m || // Past events get neutral zinc styling with strikethrough
742
- k ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [D.dot, "text-white"],
742
+ v ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [N.dot, "text-white"],
743
743
  o && "rounded-l",
744
744
  a && "rounded-r",
745
745
  !o && "border-l-0",
746
746
  !a && "border-r-0",
747
- p
747
+ f
748
748
  ),
749
749
  style: { width: `${n * 100}%` },
750
750
  children: o && /* @__PURE__ */ e("span", { className: "truncate", children: t.title })
751
751
  }
752
- ), v = /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
752
+ ), w = /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
753
753
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
754
754
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t) })
755
755
  ] }) });
756
756
  return s ? /* @__PURE__ */ r(ie, { children: [
757
- /* @__PURE__ */ e(se, { asChild: !0, children: N }),
758
- v
759
- ] }) : /* @__PURE__ */ r(re, { open: l, onOpenChange: b, children: [
760
- /* @__PURE__ */ e(oe, { asChild: !0, children: N }),
761
- /* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: u }) : /* @__PURE__ */ e(xe, { event: t, onClose: u }) })
757
+ /* @__PURE__ */ e(se, { asChild: !0, children: b }),
758
+ w
759
+ ] }) : /* @__PURE__ */ r(re, { open: l, onOpenChange: y, children: [
760
+ /* @__PURE__ */ e(oe, { asChild: !0, children: b }),
761
+ /* @__PURE__ */ e(Q, { className: "w-80", children: x ? x({ event: t, onClose: u }) : /* @__PURE__ */ e(ye, { event: t, onClose: u }) })
762
762
  ] });
763
763
  }
764
764
  if (typeof window < "u" && !document.getElementById("inno-calendar-event-marquee-style")) {
@@ -777,32 +777,32 @@ if (typeof window < "u" && !document.getElementById("inno-calendar-event-marquee
777
777
  const Ue = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, qe = ft, dt = (t, n) => (o) => {
778
778
  var a;
779
779
  if (n?.variants == null) return qe(t, o?.class, o?.className);
780
- const { variants: i, defaultVariants: p } = n, s = Object.keys(i).map((l) => {
781
- const b = o?.[l], k = p?.[l];
782
- if (b === null) return null;
783
- const m = Ue(b) || Ue(k);
780
+ const { variants: i, defaultVariants: f } = n, s = Object.keys(i).map((l) => {
781
+ const y = o?.[l], v = f?.[l];
782
+ if (y === null) return null;
783
+ const m = Ue(y) || Ue(v);
784
784
  return i[l][m];
785
- }), y = o && Object.entries(o).reduce((l, b) => {
786
- let [k, m] = b;
787
- return m === void 0 || (l[k] = m), l;
788
- }, {}), D = n == null || (a = n.compoundVariants) === null || a === void 0 ? void 0 : a.reduce((l, b) => {
789
- let { class: k, className: m, ...g } = b;
785
+ }), x = o && Object.entries(o).reduce((l, y) => {
786
+ let [v, m] = y;
787
+ return m === void 0 || (l[v] = m), l;
788
+ }, {}), N = n == null || (a = n.compoundVariants) === null || a === void 0 ? void 0 : a.reduce((l, y) => {
789
+ let { class: v, className: m, ...g } = y;
790
790
  return Object.entries(g).every((u) => {
791
- let [N, v] = u;
792
- return Array.isArray(v) ? v.includes({
793
- ...p,
794
- ...y
795
- }[N]) : {
796
- ...p,
797
- ...y
798
- }[N] === v;
791
+ let [b, w] = u;
792
+ return Array.isArray(w) ? w.includes({
793
+ ...f,
794
+ ...x
795
+ }[b]) : {
796
+ ...f,
797
+ ...x
798
+ }[b] === w;
799
799
  }) ? [
800
800
  ...l,
801
- k,
801
+ v,
802
802
  m
803
803
  ] : l;
804
804
  }, []);
805
- return qe(t, s, D, o?.class, o?.className);
805
+ return qe(t, s, N, o?.class, o?.className);
806
806
  }, kt = dt(
807
807
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
808
808
  {
@@ -828,11 +828,11 @@ const Ue = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, qe = ft, d
828
828
  }
829
829
  }
830
830
  ), me = $e(
831
- ({ className: t, variant: n, size: o, loading: a, disabled: i, children: p, ...s }, y) => /* @__PURE__ */ r(
831
+ ({ className: t, variant: n, size: o, loading: a, disabled: i, children: f, ...s }, x) => /* @__PURE__ */ r(
832
832
  "button",
833
833
  {
834
834
  className: d(kt({ variant: n, size: o, className: t })),
835
- ref: y,
835
+ ref: x,
836
836
  disabled: i || a,
837
837
  ...s,
838
838
  children: [
@@ -866,7 +866,7 @@ const Ue = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, qe = ft, d
866
866
  ]
867
867
  }
868
868
  ),
869
- p
869
+ f
870
870
  ]
871
871
  }
872
872
  )
@@ -906,32 +906,32 @@ const Tt = $e(
906
906
  strokeWidth: o = 2,
907
907
  absoluteStrokeWidth: a,
908
908
  className: i = "",
909
- children: p,
909
+ children: f,
910
910
  iconNode: s,
911
- ...y
912
- }, D) => Le(
911
+ ...x
912
+ }, N) => Le(
913
913
  "svg",
914
914
  {
915
- ref: D,
915
+ ref: N,
916
916
  ...St,
917
917
  width: n,
918
918
  height: n,
919
919
  stroke: t,
920
920
  strokeWidth: a ? Number(o) * 24 / Number(n) : o,
921
921
  className: ct("lucide", i),
922
- ...!p && !Mt(y) && { "aria-hidden": "true" },
923
- ...y
922
+ ...!f && !Mt(x) && { "aria-hidden": "true" },
923
+ ...x
924
924
  },
925
925
  [
926
- ...s.map(([l, b]) => Le(l, b)),
927
- ...Array.isArray(p) ? p : [p]
926
+ ...s.map(([l, y]) => Le(l, y)),
927
+ ...Array.isArray(f) ? f : [f]
928
928
  ]
929
929
  )
930
930
  );
931
931
  const Fe = (t, n) => {
932
932
  const o = $e(
933
- ({ className: a, ...i }, p) => Le(Tt, {
934
- ref: p,
933
+ ({ className: a, ...i }, f) => Le(Tt, {
934
+ ref: f,
935
935
  iconNode: n,
936
936
  className: ct(
937
937
  `lucide-${Dt(Ke(t))}`,
@@ -943,8 +943,8 @@ const Fe = (t, n) => {
943
943
  );
944
944
  return o.displayName = Ke(t), o;
945
945
  };
946
- const zt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], At = Fe("check", zt);
947
- const Lt = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Wt = Fe("chevron-right", Lt);
946
+ const zt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], Wt = Fe("check", zt);
947
+ const Lt = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], At = Fe("chevron-right", Lt);
948
948
  const Et = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], _t = Fe("circle", Et), Xe = V.Root, Ye = V.Trigger, Bt = ee.forwardRef(({ className: t, inset: n, children: o, ...a }, i) => /* @__PURE__ */ r(
949
949
  V.SubTrigger,
950
950
  {
@@ -957,7 +957,7 @@ const Et = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], _t = Fe
957
957
  ...a,
958
958
  children: [
959
959
  o,
960
- /* @__PURE__ */ e(Wt, { className: "ml-auto h-4 w-4" })
960
+ /* @__PURE__ */ e(At, { className: "ml-auto h-4 w-4" })
961
961
  ]
962
962
  }
963
963
  ));
@@ -1011,7 +1011,7 @@ const It = ee.forwardRef(({ className: t, children: n, checked: o = !1, ...a },
1011
1011
  checked: o,
1012
1012
  ...a,
1013
1013
  children: [
1014
- /* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(V.ItemIndicator, { children: /* @__PURE__ */ e(At, { className: "h-4 w-4" }) }) }),
1014
+ /* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(V.ItemIndicator, { children: /* @__PURE__ */ e(Wt, { className: "h-4 w-4" }) }) }),
1015
1015
  n
1016
1016
  ]
1017
1017
  }
@@ -1124,19 +1124,19 @@ function Ut({
1124
1124
  events: o = [],
1125
1125
  onNavigatePrev: a,
1126
1126
  onNavigateNext: i,
1127
- weekStartsOn: p = 1,
1127
+ weekStartsOn: f = 1,
1128
1128
  showEventCount: s = !0,
1129
- className: y
1129
+ className: x
1130
1130
  }) {
1131
- const D = Gt[t.getMonth()], l = t.getFullYear(), b = s ? gt(o, t, n, p) : 0, k = xt(t, n);
1132
- return /* @__PURE__ */ r("div", { className: d("min-w-0 flex-1", y), children: [
1131
+ const N = Gt[t.getMonth()], l = t.getFullYear(), y = s ? gt(o, t, n, f) : 0, v = xt(t, n);
1132
+ return /* @__PURE__ */ r("div", { className: d("min-w-0 flex-1", x), children: [
1133
1133
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 sm:gap-2 flex-wrap", children: [
1134
1134
  /* @__PURE__ */ r("span", { className: "text-base sm:text-lg font-semibold truncate", children: [
1135
- D,
1135
+ N,
1136
1136
  " ",
1137
1137
  l
1138
1138
  ] }),
1139
- s && /* @__PURE__ */ e(Pt, { variant: "outline", className: "px-1 sm:px-1.5 text-[10px] sm:text-xs shrink-0", children: b })
1139
+ s && /* @__PURE__ */ e(Pt, { variant: "outline", className: "px-1 sm:px-1.5 text-[10px] sm:text-xs shrink-0", children: y })
1140
1140
  ] }),
1141
1141
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 sm:gap-2", children: [
1142
1142
  /* @__PURE__ */ e(
@@ -1149,7 +1149,7 @@ function Ut({
1149
1149
  children: /* @__PURE__ */ e(Ft, {})
1150
1150
  }
1151
1151
  ),
1152
- /* @__PURE__ */ e("p", { className: "text-xs sm:text-sm text-muted-foreground truncate", children: k }),
1152
+ /* @__PURE__ */ e("p", { className: "text-xs sm:text-sm text-muted-foreground truncate", children: v }),
1153
1153
  /* @__PURE__ */ e(
1154
1154
  me,
1155
1155
  {
@@ -1226,7 +1226,7 @@ function Xt({ className: t }) {
1226
1226
  }
1227
1227
  );
1228
1228
  }
1229
- function ke({ className: t }) {
1229
+ function he({ className: t }) {
1230
1230
  return /* @__PURE__ */ r(
1231
1231
  "svg",
1232
1232
  {
@@ -1408,52 +1408,55 @@ const tn = [
1408
1408
  { value: "year", label: "Year", icon: en }
1409
1409
  // { value: 'agenda', label: 'Agenda', icon: ListIcon }, NOTE: Not needed currently
1410
1410
  ], Qe = [
1411
- { value: "timeline-day", label: "1 Day", icon: ke },
1412
- { value: "timeline-3day", label: "3 Days", icon: ke },
1413
- { value: "timeline-week", label: "7 Days", icon: ke }
1411
+ { value: "timeline-day", label: "1 Day", icon: he },
1412
+ { value: "timeline-3day", label: "3 Days", icon: he },
1413
+ { value: "timeline-week", label: "7 Days", icon: he }
1414
+ ], nn = [
1415
+ { value: "resource-day", label: "1 Day", icon: he },
1416
+ { value: "resource-week", label: "7 Days", icon: he }
1414
1417
  ];
1415
- function Dn({
1418
+ function Cn({
1416
1419
  currentDate: t,
1417
1420
  view: n,
1418
1421
  events: o = [],
1419
1422
  onNavigateToday: a,
1420
1423
  onNavigatePrev: i,
1421
- onNavigateNext: p,
1424
+ onNavigateNext: f,
1422
1425
  onNavigate: s,
1423
- onViewChange: y,
1424
- onAddEvent: D,
1426
+ onViewChange: x,
1427
+ onAddEvent: N,
1425
1428
  availableViews: l = ["day", "week", "month", "agenda"],
1426
- showTimelineViews: b = !1,
1427
- timelineViews: k,
1429
+ showTimelineViews: y = !1,
1430
+ timelineViews: v,
1428
1431
  settingsContent: m,
1429
1432
  showSettings: g = !1,
1430
1433
  filterContent: u,
1431
- actions: N,
1432
- className: v,
1433
- weekStartsOn: z = 1,
1434
- labels: M = {}
1434
+ actions: b,
1435
+ className: w,
1436
+ weekStartsOn: L = 1,
1437
+ labels: T = {}
1435
1438
  }) {
1436
- const W = F(
1439
+ const A = F(
1437
1440
  () => ({
1438
1441
  today: "Today",
1439
1442
  addEvent: "Add Event",
1440
1443
  calendarView: "Calendar View",
1441
1444
  resourceView: "Resource View",
1442
- ...M
1445
+ ...T
1443
1446
  }),
1444
- [M]
1447
+ [T]
1445
1448
  ), O = () => {
1446
1449
  a?.(), s?.("today");
1447
- }, _ = () => {
1450
+ }, B = () => {
1448
1451
  i?.(), s?.("prev");
1449
1452
  }, E = () => {
1450
- p?.(), s?.("next");
1451
- }, T = ["day", "week", "month", "year", "agenda"].includes(
1453
+ f?.(), s?.("next");
1454
+ }, M = ["day", "week", "month", "year", "agenda"].includes(
1452
1455
  n
1453
1456
  ), I = n.startsWith("timeline-") || n.startsWith("resource-"), S = tn.filter(
1454
- (f) => l.includes(f.value)
1455
- ), $ = T ? S.find((f) => f.value === n) : null, q = I ? Qe.find((f) => f.value === n) : null;
1456
- return /* @__PURE__ */ r("div", { className: d("flex flex-col w-full gap-3 mb-2", v), children: [
1457
+ (h) => l.includes(h.value)
1458
+ ), $ = M ? S.find((h) => h.value === n) : null, q = [...Qe, ...nn], D = I ? q.find((h) => h.value === n) : null;
1459
+ return /* @__PURE__ */ r("div", { className: d("flex flex-col w-full gap-3 mb-2", w), children: [
1457
1460
  /* @__PURE__ */ r("div", { className: "flex lg:flex-row flex-col w-full justify-between gap-3", children: [
1458
1461
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between gap-2", children: [
1459
1462
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2 sm:gap-3 min-w-0", children: [
@@ -1464,59 +1467,59 @@ function Dn({
1464
1467
  date: t,
1465
1468
  view: n,
1466
1469
  events: o,
1467
- onNavigatePrev: _,
1470
+ onNavigatePrev: B,
1468
1471
  onNavigateNext: E,
1469
- weekStartsOn: z
1472
+ weekStartsOn: L
1470
1473
  }
1471
1474
  )
1472
1475
  ] }),
1473
- D && /* @__PURE__ */ e(
1476
+ N && /* @__PURE__ */ e(
1474
1477
  me,
1475
1478
  {
1476
1479
  size: "icon",
1477
1480
  className: "shrink-0 lg:hidden",
1478
- onClick: D,
1481
+ onClick: N,
1479
1482
  children: /* @__PURE__ */ e(Ze, { className: "size-4" })
1480
1483
  }
1481
1484
  )
1482
1485
  ] }),
1483
1486
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 sm:gap-2 overflow-x-auto pb-1 -mb-1 scrollbar-none", children: [
1484
- y && S.length > 0 && /* @__PURE__ */ r(Xe, { children: [
1487
+ x && S.length > 0 && /* @__PURE__ */ r(Xe, { children: [
1485
1488
  /* @__PURE__ */ r(
1486
1489
  Ye,
1487
1490
  {
1488
1491
  className: d(
1489
1492
  "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors",
1490
1493
  "h-10 px-2 sm:px-3 gap-1 sm:gap-1.5 shrink-0",
1491
- T ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-background hover:bg-accent hover:text-accent-foreground"
1494
+ M ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-background hover:bg-accent hover:text-accent-foreground"
1492
1495
  ),
1493
1496
  children: [
1494
1497
  /* @__PURE__ */ e(Xt, { className: "size-4" }),
1495
- /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: $?.label ?? W.calendarView }),
1498
+ /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: $?.label ?? A.calendarView }),
1496
1499
  /* @__PURE__ */ e(Je, { className: "size-3 opacity-60" })
1497
1500
  ]
1498
1501
  }
1499
1502
  ),
1500
- /* @__PURE__ */ e(_e, { align: "start", className: "min-w-[120px]", children: S.map((f) => {
1501
- const x = f.icon;
1503
+ /* @__PURE__ */ e(_e, { align: "start", className: "min-w-[120px]", children: S.map((h) => {
1504
+ const _ = h.icon;
1502
1505
  return /* @__PURE__ */ r(
1503
1506
  Be,
1504
1507
  {
1505
- onClick: () => y(f.value),
1508
+ onClick: () => x(h.value),
1506
1509
  className: d(
1507
1510
  "gap-2",
1508
- n === f.value && "bg-accent"
1511
+ n === h.value && "bg-accent"
1509
1512
  ),
1510
1513
  children: [
1511
- /* @__PURE__ */ e(x, { className: "size-4" }),
1512
- /* @__PURE__ */ e("span", { children: f.label })
1514
+ /* @__PURE__ */ e(_, { className: "size-4" }),
1515
+ /* @__PURE__ */ e("span", { children: h.label })
1513
1516
  ]
1514
1517
  },
1515
- f.value
1518
+ h.value
1516
1519
  );
1517
1520
  }) })
1518
1521
  ] }),
1519
- b && y && /* @__PURE__ */ r(Xe, { children: [
1522
+ y && x && /* @__PURE__ */ r(Xe, { children: [
1520
1523
  /* @__PURE__ */ r(
1521
1524
  Ye,
1522
1525
  {
@@ -1526,28 +1529,28 @@ function Dn({
1526
1529
  I ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-white hover:bg-zinc-50 hover:text-accent-foreground"
1527
1530
  ),
1528
1531
  children: [
1529
- /* @__PURE__ */ e(ke, { className: "size-4" }),
1530
- /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: q?.label ?? W.resourceView }),
1532
+ /* @__PURE__ */ e(he, { className: "size-4" }),
1533
+ /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: D?.label ?? A.resourceView }),
1531
1534
  /* @__PURE__ */ e(Je, { className: "size-3 opacity-60" })
1532
1535
  ]
1533
1536
  }
1534
1537
  ),
1535
- /* @__PURE__ */ e(_e, { align: "start", className: "min-w-[120px]", children: Qe.map((f) => {
1536
- const x = f.icon;
1538
+ /* @__PURE__ */ e(_e, { align: "start", className: "min-w-[120px]", children: Qe.map((h) => {
1539
+ const _ = h.icon;
1537
1540
  return /* @__PURE__ */ r(
1538
1541
  Be,
1539
1542
  {
1540
- onClick: () => y(f.value),
1543
+ onClick: () => x(h.value),
1541
1544
  className: d(
1542
1545
  "gap-2",
1543
- n === f.value && "bg-accent"
1546
+ n === h.value && "bg-accent"
1544
1547
  ),
1545
1548
  children: [
1546
- /* @__PURE__ */ e(x, { className: "size-4" }),
1547
- /* @__PURE__ */ e("span", { children: f.label })
1549
+ /* @__PURE__ */ e(_, { className: "size-4" }),
1550
+ /* @__PURE__ */ e("span", { children: h.label })
1548
1551
  ]
1549
1552
  },
1550
- f.value
1553
+ h.value
1551
1554
  );
1552
1555
  }) })
1553
1556
  ] }),
@@ -1571,15 +1574,15 @@ function Dn({
1571
1574
  }
1572
1575
  )
1573
1576
  ] }),
1574
- N,
1575
- D && /* @__PURE__ */ r(
1577
+ b,
1578
+ N && /* @__PURE__ */ r(
1576
1579
  me,
1577
1580
  {
1578
1581
  className: "hidden lg:flex shrink-0 max-h-10",
1579
- onClick: D,
1582
+ onClick: N,
1580
1583
  children: [
1581
1584
  /* @__PURE__ */ e(Ze, { className: "size-4" }),
1582
- W.addEvent
1585
+ A.addEvent
1583
1586
  ]
1584
1587
  }
1585
1588
  )
@@ -1588,47 +1591,47 @@ function Dn({
1588
1591
  u && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 pb-1 -mb-1 scrollbar-none", children: u })
1589
1592
  ] });
1590
1593
  }
1591
- function Cn({
1594
+ function Sn({
1592
1595
  events: t,
1593
1596
  date: n,
1594
1597
  daysAhead: o = 60,
1595
1598
  badgeVariant: a = "colored",
1596
1599
  onEventClick: i,
1597
- className: p,
1600
+ className: f,
1598
1601
  renderEvent: s,
1599
- renderPopover: y,
1600
- slots: D,
1602
+ renderPopover: x,
1603
+ slots: N,
1601
1604
  classNames: l
1602
1605
  }) {
1603
- const b = F(() => {
1606
+ const y = F(() => {
1604
1607
  const m = new Date(n);
1605
1608
  m.setHours(0, 0, 0, 0);
1606
1609
  const g = new Date(m);
1607
1610
  return g.setDate(g.getDate() + o), t.filter((u) => u.endDate >= m && u.startDate <= g);
1608
- }, [t, o, n]), k = F(() => {
1609
- const m = yt(b), g = [];
1610
- for (const [u, N] of m)
1611
+ }, [t, o, n]), v = F(() => {
1612
+ const m = yt(y), g = [];
1613
+ for (const [u, b] of m)
1611
1614
  g.push({
1612
1615
  date: new Date(u),
1613
1616
  dateKey: u,
1614
- events: N
1617
+ events: b
1615
1618
  });
1616
- return g.sort((u, N) => u.date.getTime() - N.date.getTime()), g;
1617
- }, [b]);
1618
- return k.length === 0 ? /* @__PURE__ */ e("div", { className: d("flex flex-col items-center justify-center h-full py-12", p), children: /* @__PURE__ */ r("div", { className: "text-center", children: [
1619
+ return g.sort((u, b) => u.date.getTime() - b.date.getTime()), g;
1620
+ }, [y]);
1621
+ return v.length === 0 ? /* @__PURE__ */ e("div", { className: d("flex flex-col items-center justify-center h-full py-12", f), children: /* @__PURE__ */ r("div", { className: "text-center", children: [
1619
1622
  /* @__PURE__ */ e("p", { className: "text-muted-foreground", children: "No events found" }),
1620
1623
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground/70", children: "No events scheduled for this period" })
1621
- ] }) }) : /* @__PURE__ */ r("div", { className: d("flex flex-col h-full overflow-auto", l?.agendaList, p), children: [
1624
+ ] }) }) : /* @__PURE__ */ r("div", { className: d("flex flex-col h-full overflow-auto", l?.agendaList, f), children: [
1622
1625
  /* @__PURE__ */ e("div", { className: "sticky top-0 z-10 bg-background border-b px-4 py-3", children: /* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: [
1623
1626
  /* @__PURE__ */ e("h2", { className: "text-lg font-medium", children: "Schedule" }),
1624
1627
  /* @__PURE__ */ r("span", { className: "text-sm text-muted-foreground", children: [
1625
- b.length,
1628
+ y.length,
1626
1629
  " event",
1627
- b.length !== 1 ? "s" : ""
1630
+ y.length !== 1 ? "s" : ""
1628
1631
  ] })
1629
1632
  ] }) }),
1630
- /* @__PURE__ */ e("div", { className: "flex-1", children: k.map(({ date: m, dateKey: g, events: u }) => {
1631
- const N = ce(m), v = m.toLocaleDateString([], { weekday: "short" }), z = m.getDate(), M = m.toLocaleDateString([], { month: "short" });
1633
+ /* @__PURE__ */ e("div", { className: "flex-1", children: v.map(({ date: m, dateKey: g, events: u }) => {
1634
+ const b = ce(m), w = m.toLocaleDateString([], { weekday: "short" }), L = m.getDate(), T = m.toLocaleDateString([], { month: "short" });
1632
1635
  return /* @__PURE__ */ r("div", { className: d("", l?.agendaDayGroup), children: [
1633
1636
  /* @__PURE__ */ e(
1634
1637
  "div",
@@ -1644,9 +1647,9 @@ function Cn({
1644
1647
  {
1645
1648
  className: d(
1646
1649
  "text-[11px] font-medium uppercase tracking-wide",
1647
- N ? "text-primary" : "text-muted-foreground"
1650
+ b ? "text-primary" : "text-muted-foreground"
1648
1651
  ),
1649
- children: v
1652
+ children: w
1650
1653
  }
1651
1654
  ),
1652
1655
  /* @__PURE__ */ e(
@@ -1655,14 +1658,14 @@ function Cn({
1655
1658
  className: d(
1656
1659
  "flex items-center justify-center rounded-full mt-0.5",
1657
1660
  "size-10 text-xl font-normal",
1658
- N ? "bg-primary text-primary-foreground" : "text-foreground"
1661
+ b ? "bg-primary text-primary-foreground" : "text-foreground"
1659
1662
  ),
1660
- children: z
1663
+ children: L
1661
1664
  }
1662
1665
  )
1663
1666
  ] }),
1664
1667
  /* @__PURE__ */ r("span", { className: "text-sm text-muted-foreground", children: [
1665
- M,
1668
+ T,
1666
1669
  " ",
1667
1670
  m.getFullYear()
1668
1671
  ] })
@@ -1670,51 +1673,51 @@ function Cn({
1670
1673
  }
1671
1674
  ),
1672
1675
  /* @__PURE__ */ e("div", { className: "px-4 py-3 space-y-2 border-b last:border-b-0", children: u.map(
1673
- (W) => s ? /* @__PURE__ */ e("div", { children: s({ event: W, variant: "full" }) }, W.id) : /* @__PURE__ */ e(
1676
+ (A) => s ? /* @__PURE__ */ e("div", { children: s({ event: A, variant: "full" }) }, A.id) : /* @__PURE__ */ e(
1674
1677
  Se,
1675
1678
  {
1676
- event: W,
1679
+ event: A,
1677
1680
  variant: "full",
1678
1681
  badgeVariant: a,
1679
1682
  onClick: i,
1680
- disablePopover: !!i && !y,
1681
- renderPopover: y,
1683
+ disablePopover: !!i && !x,
1684
+ renderPopover: x,
1682
1685
  showTime: !0,
1683
1686
  showDescription: !0,
1684
1687
  showParticipants: !0,
1685
1688
  ...l?.eventCard && { className: l.eventCard }
1686
1689
  },
1687
- W.id
1690
+ A.id
1688
1691
  )
1689
1692
  ) })
1690
1693
  ] }, g);
1691
1694
  }) })
1692
1695
  ] });
1693
1696
  }
1694
- const be = 360, we = 480, Te = 280;
1695
- function nn({
1697
+ const we = 360, ve = 480, Te = 280;
1698
+ function rn({
1696
1699
  isOpen: t,
1697
1700
  onClose: n,
1698
1701
  date: o,
1699
1702
  events: a,
1700
1703
  anchorRect: i,
1701
- badgeVariant: p = "colored",
1704
+ badgeVariant: f = "colored",
1702
1705
  onEventClick: s,
1703
- renderEvent: y,
1704
- renderPopover: D,
1706
+ renderEvent: x,
1707
+ renderPopover: N,
1705
1708
  className: l
1706
1709
  }) {
1707
- const b = te(null), k = te(null), [m, g] = J("closed"), u = F(
1708
- () => [...a].sort((_, E) => _.startDate.getTime() - E.startDate.getTime()),
1710
+ const y = te(null), v = te(null), [m, g] = J("closed"), u = F(
1711
+ () => [...a].sort((B, E) => B.startDate.getTime() - E.startDate.getTime()),
1709
1712
  [a]
1710
- ), N = F(() => {
1711
- if (!i) return { top: 0, left: 0, width: be, maxHeight: we };
1712
- const _ = typeof window < "u" ? window.innerWidth : 1200, E = typeof window < "u" ? window.innerHeight : 800;
1713
- let T = i.left + i.width / 2 - be / 2;
1714
- T = Math.max(16, Math.min(T, _ - be - 16));
1715
- const I = Math.min(a.length * 68 + 80, we);
1713
+ ), b = F(() => {
1714
+ if (!i) return { top: 0, left: 0, width: we, maxHeight: ve };
1715
+ const B = typeof window < "u" ? window.innerWidth : 1200, E = typeof window < "u" ? window.innerHeight : 800;
1716
+ let M = i.left + i.width / 2 - we / 2;
1717
+ M = Math.max(16, Math.min(M, B - we - 16));
1718
+ const I = Math.min(a.length * 68 + 80, ve);
1716
1719
  let S = i.top + i.height / 2 - I / 2;
1717
- return S = Math.max(16, Math.min(S, E - I - 16)), { top: S, left: T, width: be, maxHeight: we };
1720
+ return S = Math.max(16, Math.min(S, E - I - 16)), { top: S, left: M, width: we, maxHeight: ve };
1718
1721
  }, [i, a.length]);
1719
1722
  Ie(() => {
1720
1723
  if (t && i)
@@ -1725,28 +1728,28 @@ function nn({
1725
1728
  });
1726
1729
  else if (!t && m === "open") {
1727
1730
  g("exiting");
1728
- const _ = setTimeout(() => {
1731
+ const B = setTimeout(() => {
1729
1732
  g("closed");
1730
1733
  }, Te);
1731
- return () => clearTimeout(_);
1734
+ return () => clearTimeout(B);
1732
1735
  }
1733
- }, [t, i]), We(() => {
1736
+ }, [t, i]), Ae(() => {
1734
1737
  if (m === "closed") return;
1735
- const _ = (E) => {
1738
+ const B = (E) => {
1736
1739
  E.key === "Escape" && (E.stopPropagation(), n());
1737
1740
  };
1738
- return document.addEventListener("keydown", _), () => document.removeEventListener("keydown", _);
1739
- }, [m, n]), We(() => {
1740
- m === "open" && k.current && k.current.focus();
1741
+ return document.addEventListener("keydown", B), () => document.removeEventListener("keydown", B);
1742
+ }, [m, n]), Ae(() => {
1743
+ m === "open" && v.current && v.current.focus();
1741
1744
  }, [m]);
1742
- const v = L(
1743
- (_) => {
1744
- _.target === b.current && n();
1745
+ const w = W(
1746
+ (B) => {
1747
+ B.target === y.current && n();
1745
1748
  },
1746
1749
  [n]
1747
1750
  );
1748
1751
  if (m === "closed") return null;
1749
- const z = m === "entering" || m === "exiting", M = z && i ? {
1752
+ const L = m === "entering" || m === "exiting", T = L && i ? {
1750
1753
  // Collapsed state: match the day cell exactly
1751
1754
  position: "fixed",
1752
1755
  top: i.top,
@@ -1760,14 +1763,14 @@ function nn({
1760
1763
  } : {
1761
1764
  // Expanded state: full panel
1762
1765
  position: "fixed",
1763
- top: N.top,
1764
- left: N.left,
1765
- width: N.width,
1766
- maxHeight: N.maxHeight,
1766
+ top: b.top,
1767
+ left: b.left,
1768
+ width: b.width,
1769
+ maxHeight: b.maxHeight,
1767
1770
  opacity: 1,
1768
1771
  transform: "scale(1)",
1769
1772
  borderRadius: "12px"
1770
- }, W = z ? 0 : 1, O = o.toLocaleDateString(void 0, {
1773
+ }, A = L ? 0 : 1, O = o.toLocaleDateString(void 0, {
1771
1774
  weekday: "long",
1772
1775
  month: "long",
1773
1776
  day: "numeric"
@@ -1776,16 +1779,16 @@ function nn({
1776
1779
  /* @__PURE__ */ e(
1777
1780
  "div",
1778
1781
  {
1779
- ref: b,
1782
+ ref: y,
1780
1783
  role: "presentation",
1781
- onClick: v,
1784
+ onClick: w,
1782
1785
  className: "ic-expansion-backdrop",
1783
1786
  style: {
1784
1787
  position: "fixed",
1785
1788
  inset: 0,
1786
1789
  zIndex: 50,
1787
1790
  backgroundColor: "rgba(0, 0, 0, 0.2)",
1788
- opacity: W,
1791
+ opacity: A,
1789
1792
  transition: `opacity ${Te}ms cubic-bezier(0.32, 0.72, 0, 1)`
1790
1793
  }
1791
1794
  }
@@ -1793,7 +1796,7 @@ function nn({
1793
1796
  /* @__PURE__ */ r(
1794
1797
  "div",
1795
1798
  {
1796
- ref: k,
1799
+ ref: v,
1797
1800
  role: "dialog",
1798
1801
  "aria-modal": "true",
1799
1802
  "aria-label": `Events for ${O}`,
@@ -1805,7 +1808,7 @@ function nn({
1805
1808
  l
1806
1809
  ),
1807
1810
  style: {
1808
- ...M,
1811
+ ...T,
1809
1812
  zIndex: 51,
1810
1813
  transition: `all ${Te}ms cubic-bezier(0.32, 0.72, 0, 1)`,
1811
1814
  willChange: "top, left, width, height, max-height, opacity, border-radius"
@@ -1851,28 +1854,28 @@ function nn({
1851
1854
  "div",
1852
1855
  {
1853
1856
  className: "overflow-y-auto px-3 py-2 space-y-1.5",
1854
- style: { maxHeight: `${we - 64}px` },
1857
+ style: { maxHeight: `${ve - 64}px` },
1855
1858
  children: [
1856
- u.map((_) => /* @__PURE__ */ e(
1859
+ u.map((B) => /* @__PURE__ */ e(
1857
1860
  "div",
1858
1861
  {
1859
1862
  onPointerDown: (E) => E.stopPropagation(),
1860
- children: y ? y({ event: _, variant: "compact" }) : /* @__PURE__ */ e(
1863
+ children: x ? x({ event: B, variant: "compact" }) : /* @__PURE__ */ e(
1861
1864
  Se,
1862
1865
  {
1863
- event: _,
1866
+ event: B,
1864
1867
  variant: "compact",
1865
- badgeVariant: p,
1868
+ badgeVariant: f,
1866
1869
  onClick: (E) => {
1867
1870
  n(), s?.(E);
1868
1871
  },
1869
- disablePopover: !!s && !D,
1870
- renderPopover: D,
1872
+ disablePopover: !!s && !N,
1873
+ renderPopover: N,
1871
1874
  showTime: !0
1872
1875
  }
1873
1876
  )
1874
1877
  },
1875
- _.id
1878
+ B.id
1876
1879
  )),
1877
1880
  a.length === 0 && /* @__PURE__ */ e("div", { className: "py-6 text-center text-sm text-muted-foreground", children: "No events" })
1878
1881
  ]
@@ -1883,16 +1886,16 @@ function nn({
1883
1886
  )
1884
1887
  ] });
1885
1888
  }
1886
- function rn({
1889
+ function on({
1887
1890
  event: t,
1888
1891
  date: n,
1889
1892
  onEventClick: o,
1890
1893
  disablePopover: a,
1891
1894
  renderPopover: i
1892
1895
  }) {
1893
- const [p, s] = J(!1), y = de(t.color), D = De(t), l = le(t.startDate, n), b = le(t.endDate, n), k = D && le(t.startDate, t.endDate), m = L(() => {
1896
+ const [f, s] = J(!1), x = de(t.color), N = De(t), l = le(t.startDate, n), y = le(t.endDate, n), v = N && le(t.startDate, t.endDate), m = W(() => {
1894
1897
  a && o ? o(t) : a || s(!0);
1895
- }, [a, o, t]), g = L(() => {
1898
+ }, [a, o, t]), g = W(() => {
1896
1899
  s(!1);
1897
1900
  }, []), u = /* @__PURE__ */ r(
1898
1901
  "button",
@@ -1903,31 +1906,31 @@ function rn({
1903
1906
  className: d(
1904
1907
  "inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium transition-opacity hover:opacity-80",
1905
1908
  "sm:px-2 sm:py-1 sm:text-xs",
1906
- y.bg,
1907
- y.text,
1909
+ x.bg,
1910
+ x.text,
1908
1911
  t.isCanceled && "opacity-60 line-through"
1909
1912
  ),
1910
1913
  children: [
1911
- !k && l && !b && "→ ",
1912
- !k && !l && b && " ←",
1913
- !k && !l && !b && "↔ ",
1914
+ !v && l && !y && "→ ",
1915
+ !v && !l && y && " ←",
1916
+ !v && !l && !y && "↔ ",
1914
1917
  /* @__PURE__ */ e("span", { className: "truncate max-w-24 sm:max-w-32", children: t.title }),
1915
- k && /* @__PURE__ */ e("span", { className: "text-[9px] opacity-70 sm:text-[10px]", children: "All day" })
1918
+ v && /* @__PURE__ */ e("span", { className: "text-[9px] opacity-70 sm:text-[10px]", children: "All day" })
1916
1919
  ]
1917
1920
  }
1918
- ), N = /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
1921
+ ), b = /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
1919
1922
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
1920
1923
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t) })
1921
1924
  ] }) });
1922
1925
  return a ? /* @__PURE__ */ r(ie, { children: [
1923
1926
  /* @__PURE__ */ e(se, { asChild: !0, children: u }),
1924
- N
1925
- ] }) : /* @__PURE__ */ r(re, { open: p, onOpenChange: s, children: [
1927
+ b
1928
+ ] }) : /* @__PURE__ */ r(re, { open: f, onOpenChange: s, children: [
1926
1929
  /* @__PURE__ */ e(oe, { asChild: !0, children: u }),
1927
- /* @__PURE__ */ e(Q, { className: "w-80", children: i ? i({ event: t, onClose: g }) : /* @__PURE__ */ e(on, { event: t, onClose: g }) })
1930
+ /* @__PURE__ */ e(Q, { className: "w-80", children: i ? i({ event: t, onClose: g }) : /* @__PURE__ */ e(an, { event: t, onClose: g }) })
1928
1931
  ] });
1929
1932
  }
1930
- function on({
1933
+ function an({
1931
1934
  event: t,
1932
1935
  onClose: n
1933
1936
  }) {
@@ -1956,22 +1959,22 @@ function on({
1956
1959
  ) })
1957
1960
  ] });
1958
1961
  }
1959
- function an({
1962
+ function sn({
1960
1963
  events: t,
1961
1964
  date: n,
1962
1965
  onEventClick: o,
1963
1966
  disablePopover: a = !1,
1964
1967
  renderPopover: i,
1965
- className: p
1968
+ className: f
1966
1969
  }) {
1967
1970
  if (t.length === 0) return null;
1968
- const s = t.some((l) => De(l) && le(l.startDate, l.endDate)), y = t.some(
1971
+ const s = t.some((l) => De(l) && le(l.startDate, l.endDate)), x = t.some(
1969
1972
  (l) => !le(l.startDate, l.endDate) || De(l) && !le(l.startDate, l.endDate)
1970
- ), D = s && y ? "All day / Multi-day" : s ? "All day" : "Multi-day";
1971
- return /* @__PURE__ */ r("div", { className: d("border-b bg-muted/20 px-2 py-1.5 space-y-1", "sm:px-4 sm:py-2", p), children: [
1972
- /* @__PURE__ */ e("span", { className: "text-[10px] font-medium text-muted-foreground sm:text-xs", children: D }),
1973
+ ), N = s && x ? "All day / Multi-day" : s ? "All day" : "Multi-day";
1974
+ return /* @__PURE__ */ r("div", { className: d("border-b bg-muted/20 px-2 py-1.5 space-y-1", "sm:px-4 sm:py-2", f), children: [
1975
+ /* @__PURE__ */ e("span", { className: "text-[10px] font-medium text-muted-foreground sm:text-xs", children: N }),
1973
1976
  /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: t.map((l) => /* @__PURE__ */ e(
1974
- rn,
1977
+ on,
1975
1978
  {
1976
1979
  event: l,
1977
1980
  date: n,
@@ -1983,83 +1986,83 @@ function an({
1983
1986
  )) })
1984
1987
  ] });
1985
1988
  }
1986
- const sn = 5;
1989
+ const ln = 5;
1987
1990
  function ut({
1988
1991
  slot: t,
1989
1992
  onSelectionStart: n,
1990
1993
  onSelectionMove: o,
1991
1994
  onSelectionEnd: a,
1992
1995
  isSelected: i = !1,
1993
- isSelecting: p = !1,
1996
+ isSelecting: f = !1,
1994
1997
  disabled: s = !1,
1995
- ariaLabel: y,
1996
- children: D,
1998
+ ariaLabel: x,
1999
+ children: N,
1997
2000
  className: l,
1998
- height: b,
1999
- style: k,
2001
+ height: y,
2002
+ style: v,
2000
2003
  dataAttributes: m
2001
2004
  }) {
2002
- const g = te(null), u = te(!1), N = te(!1), v = te(null), [z, M] = J(!1), W = Re(), O = L(
2003
- (f) => {
2004
- s || f.button !== 0 && f.pointerType === "mouse" || (f.preventDefault(), g.current = { x: f.clientX, y: f.clientY }, u.current = !1, N.current = !0, n?.(t));
2005
+ const g = te(null), u = te(!1), b = te(!1), w = te(null), [L, T] = J(!1), A = Re(), O = W(
2006
+ (D) => {
2007
+ s || D.button !== 0 && D.pointerType === "mouse" || (D.preventDefault(), g.current = { x: D.clientX, y: D.clientY }, u.current = !1, b.current = !0, n?.(t));
2005
2008
  },
2006
2009
  [s, t, n]
2007
- ), _ = L(
2008
- (f) => {
2009
- if (!(g.current && N.current && !s)) return;
2010
- const x = f.clientX - g.current.x, B = f.clientY - g.current.y;
2011
- Math.sqrt(x * x + B * B) >= sn && (u.current = !0);
2010
+ ), B = W(
2011
+ (D) => {
2012
+ if (!(g.current && b.current && !s)) return;
2013
+ const h = D.clientX - g.current.x, _ = D.clientY - g.current.y;
2014
+ Math.sqrt(h * h + _ * _) >= ln && (u.current = !0);
2012
2015
  },
2013
2016
  [s]
2014
- ), E = L(
2015
- (f) => {
2016
- s || (f.buttons > 0 || p) && o?.(t);
2017
+ ), E = W(
2018
+ (D) => {
2019
+ s || (D.buttons > 0 || f) && o?.(t);
2017
2020
  },
2018
- [s, p, t, o]
2019
- ), T = L(() => {
2020
- s || (a?.(), g.current = null, u.current = !1, N.current = !1);
2021
- }, [s, a]), I = L(
2022
- (f) => {
2023
- if (!W?.isDragging || s) return;
2024
- f.preventDefault(), f.dataTransfer.dropEffect = "move", M(!0);
2025
- const x = /* @__PURE__ */ new Date(), B = t.hour ?? x.getHours(), R = t.minute ?? (x.getMinutes() >= 30 ? 30 : 0);
2026
- W.updateDragPreview?.(t.date, B, R);
2021
+ [s, f, t, o]
2022
+ ), M = W(() => {
2023
+ s || (a?.(), g.current = null, u.current = !1, b.current = !1);
2024
+ }, [s, a]), I = W(
2025
+ (D) => {
2026
+ if (!A?.isDragging || s) return;
2027
+ D.preventDefault(), D.dataTransfer.dropEffect = "move", T(!0);
2028
+ const h = /* @__PURE__ */ new Date(), _ = t.hour ?? h.getHours(), R = t.minute ?? (h.getMinutes() >= 30 ? 30 : 0);
2029
+ A.updateDragPreview?.(t.date, _, R);
2027
2030
  },
2028
- [W, s, t]
2029
- ), S = L(() => {
2030
- M(!1);
2031
- }, []), $ = L(
2032
- (f) => {
2033
- f.preventDefault(), M(!1), !(!W?.isDragging || s) && W.endDrag?.();
2031
+ [A, s, t]
2032
+ ), S = W(() => {
2033
+ T(!1);
2034
+ }, []), $ = W(
2035
+ (D) => {
2036
+ D.preventDefault(), T(!1), !(!A?.isDragging || s) && A.endDrag?.();
2034
2037
  },
2035
- [W, s]
2038
+ [A, s]
2036
2039
  );
2037
- We(() => {
2038
- const f = () => {
2039
- N.current && (N.current = !1, g.current = null, u.current = !1);
2040
+ Ae(() => {
2041
+ const D = () => {
2042
+ b.current && (b.current = !1, g.current = null, u.current = !1);
2040
2043
  };
2041
- return window.addEventListener("pointerup", f), window.addEventListener("pointercancel", f), () => {
2042
- window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f);
2044
+ return window.addEventListener("pointerup", D), window.addEventListener("pointercancel", D), () => {
2045
+ window.removeEventListener("pointerup", D), window.removeEventListener("pointercancel", D);
2043
2046
  };
2044
2047
  }, []);
2045
- const q = L(
2046
- (f) => {
2047
- s || (f.key === "Enter" || f.key === " ") && (f.preventDefault(), n?.(t), a?.());
2048
+ const q = W(
2049
+ (D) => {
2050
+ s || (D.key === "Enter" || D.key === " ") && (D.preventDefault(), n?.(t), a?.());
2048
2051
  },
2049
2052
  [s, t, n, a]
2050
2053
  );
2051
2054
  return /* @__PURE__ */ e(
2052
2055
  "button",
2053
2056
  {
2054
- ref: v,
2057
+ ref: w,
2055
2058
  type: "button",
2056
- "aria-label": y,
2059
+ "aria-label": x,
2057
2060
  "aria-disabled": s,
2058
2061
  "aria-pressed": i,
2059
2062
  disabled: s,
2060
2063
  onPointerDown: O,
2061
- onPointerMove: _,
2062
- onPointerUp: T,
2064
+ onPointerMove: B,
2065
+ onPointerUp: M,
2063
2066
  onPointerEnter: E,
2064
2067
  onKeyDown: q,
2065
2068
  onDragOver: I,
@@ -2069,18 +2072,18 @@ function ut({
2069
2072
  "select-none touch-none cursor-pointer transition-colors",
2070
2073
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
2071
2074
  // Hover state (only when not in selection)
2072
- !(p || s) && "hover:bg-blue-50/60",
2075
+ !(f || s) && "hover:bg-blue-50/60",
2073
2076
  // Selection state — blue tint matching the primary color
2074
2077
  i && "bg-blue-100/70",
2075
2078
  // Drag over state - visual feedback when event is dragged over
2076
- z && "bg-primary/20 ring-2 ring-primary ring-inset",
2079
+ L && "bg-primary/20 ring-2 ring-primary ring-inset",
2077
2080
  // Disabled state
2078
2081
  s && "cursor-not-allowed opacity-50",
2079
2082
  l
2080
2083
  ),
2081
- style: { height: b, ...k },
2084
+ style: { height: y, ...v },
2082
2085
  ...m,
2083
- children: D
2086
+ children: N
2084
2087
  }
2085
2088
  );
2086
2089
  }
@@ -2090,69 +2093,60 @@ function mt({
2090
2093
  hour: o,
2091
2094
  minute: a,
2092
2095
  ariaLabel: i,
2093
- ...p
2096
+ ...f
2094
2097
  }) {
2095
- const s = t ?? { date: n, hour: o ?? 0, minute: a ?? 0 }, y = i ?? `Add event at ${(s.hour ?? 0).toString().padStart(2, "0")}:${(s.minute ?? 0).toString().padStart(2, "0")} on ${s.date.toLocaleDateString()}`;
2096
- return /* @__PURE__ */ e(ut, { slot: s, ariaLabel: y, ...p });
2098
+ const s = t ?? { date: n, hour: o ?? 0, minute: a ?? 0 }, x = i ?? `Add event at ${(s.hour ?? 0).toString().padStart(2, "0")}:${(s.minute ?? 0).toString().padStart(2, "0")} on ${s.date.toLocaleDateString()}`;
2099
+ return /* @__PURE__ */ e(ut, { slot: s, ariaLabel: x, ...f });
2097
2100
  }
2098
- function ln({ slot: t, date: n, ariaLabel: o, ...a }) {
2099
- const i = t ?? { date: n }, p = o ?? `Select ${i.date.toLocaleDateString()}`;
2100
- return /* @__PURE__ */ e(ut, { slot: i, ariaLabel: p, ...a });
2101
+ function dn({ slot: t, date: n, ariaLabel: o, ...a }) {
2102
+ const i = t ?? { date: n }, f = o ?? `Select ${i.date.toLocaleDateString()}`;
2103
+ return /* @__PURE__ */ e(ut, { slot: i, ariaLabel: f, ...a });
2101
2104
  }
2102
- const pe = 96, ze = 72, Ae = 80;
2103
- function Sn({
2105
+ const fe = 96, ze = 72, We = 80;
2106
+ function Mn({
2104
2107
  events: t,
2105
2108
  date: n,
2106
2109
  visibleHours: o = { startHour: 0, endHour: 24 },
2107
2110
  workingHours: a,
2108
2111
  slotDuration: i = 30,
2109
- badgeVariant: p = "colored",
2112
+ badgeVariant: f = "colored",
2110
2113
  onEventClick: s,
2111
- onSlotSelect: y,
2112
- className: D,
2114
+ onSlotSelect: x,
2115
+ className: N,
2113
2116
  renderEvent: l,
2114
- renderPopover: b,
2115
- slots: k,
2117
+ renderPopover: y,
2118
+ slots: v,
2116
2119
  classNames: m
2117
2120
  }) {
2118
- const g = 60 / i, u = 100 / g, N = F(() => {
2119
- const w = [];
2121
+ const g = 60 / i, u = 100 / g, b = F(() => {
2122
+ const k = [];
2120
2123
  for (let c = 0; c < g; c++)
2121
- w.push(c * i);
2122
- return w;
2123
- }, [g, i]), v = F(() => He(t, n), [t, n]), { singleDay: z, multiDay: M } = F(() => rt(v), [v]);
2124
- console.log("[DayView Debug]", {
2125
- totalEvents: t.length,
2126
- dayEventsCount: v.length,
2127
- multiDayCount: M.length,
2128
- singleDayCount: z.length,
2129
- date: n.toISOString(),
2130
- allDayFlags: v.map((w) => ({ id: w.id, title: w.title, isAllDay: w.isAllDay, isMultiDay: w.isMultiDay, start: w.startDate.toISOString(), end: w.endDate.toISOString() }))
2131
- });
2132
- const W = F(() => {
2133
- const w = ot(z, n, o, pe), c = /* @__PURE__ */ new Map();
2134
- for (const h of w)
2135
- c.set(h.event.id, h.position);
2124
+ k.push(c * i);
2125
+ return k;
2126
+ }, [g, i]), w = F(() => He(t, n), [t, n]), { singleDay: L, multiDay: T } = F(() => rt(w), [w]), A = F(() => {
2127
+ const k = ot(L, n, o, fe), c = /* @__PURE__ */ new Map();
2128
+ for (const p of k)
2129
+ c.set(p.event.id, p.position);
2136
2130
  return c;
2137
- }, [z, n, o]), O = F(() => at(o), [o]), _ = /* @__PURE__ */ new Date(), E = ce(n), T = F(() => {
2131
+ }, [L, n, o]), O = F(() => at(o), [o]), B = /* @__PURE__ */ new Date(), E = ce(n), M = F(() => {
2138
2132
  if (!E) return 0;
2139
- const w = _.getHours() + _.getMinutes() / 60;
2140
- return w < o.startHour || w > o.endHour ? -1 : (w - o.startHour) * pe;
2141
- }, [E, o, _]), I = te(null);
2133
+ const k = B.getHours() + B.getMinutes() / 60;
2134
+ return k < o.startHour || k > o.endHour ? -1 : (k - o.startHour) * fe;
2135
+ }, [E, o, B]), I = te(null);
2142
2136
  Ie(() => {
2143
- const w = I.current;
2144
- if (!w) return;
2137
+ const k = I.current;
2138
+ if (!k) return;
2145
2139
  const c = () => {
2146
- let h;
2140
+ let p;
2147
2141
  if (E) {
2148
2142
  const H = (/* @__PURE__ */ new Date()).getHours();
2149
- h = Math.max(H - 1, o.startHour);
2143
+ p = Math.max(H - 1, o.startHour);
2150
2144
  } else {
2151
- const H = n.getDay(), A = a?.[H];
2152
- A?.enabled && A.from > 0 ? h = Math.max(A.from - 1, o.startHour) : h = Math.max(7, o.startHour);
2145
+ const H = n.getDay(), z = a?.[H];
2146
+ z?.enabled && z.from > 0 ? p = Math.max(z.from - 1, o.startHour) : p = Math.max(7, o.startHour);
2153
2147
  }
2154
- const C = (h - o.startHour) * pe;
2155
- w.scrollTo({
2148
+ const C = (p - o.startHour) * fe;
2149
+ k.scrollTo({
2156
2150
  top: C,
2157
2151
  behavior: "instant"
2158
2152
  });
@@ -2161,25 +2155,25 @@ function Sn({
2161
2155
  requestAnimationFrame(c);
2162
2156
  });
2163
2157
  }, [n, a, o, E]);
2164
- const S = Oe(), $ = L(
2165
- (w) => {
2166
- S?.startSelection(w);
2158
+ const S = Oe(), $ = W(
2159
+ (k) => {
2160
+ S?.startSelection(k);
2167
2161
  },
2168
2162
  [S]
2169
- ), q = L(
2170
- (w) => {
2171
- S?.updateSelection(w);
2163
+ ), q = W(
2164
+ (k) => {
2165
+ S?.updateSelection(k);
2172
2166
  },
2173
2167
  [S]
2174
- ), f = L(() => {
2168
+ ), D = W(() => {
2175
2169
  S?.endSelection();
2176
- }, [S]), x = L(
2177
- (w) => {
2178
- s?.(w);
2170
+ }, [S]), h = W(
2171
+ (k) => {
2172
+ s?.(k);
2179
2173
  },
2180
2174
  [s]
2181
- ), B = n.toLocaleDateString([], { weekday: "short" }), R = n.getDate(), P = ce(n);
2182
- return /* @__PURE__ */ r("div", { className: d("flex flex-col h-full", D), children: [
2175
+ ), _ = n.toLocaleDateString([], { weekday: "short" }), R = n.getDate(), P = ce(n);
2176
+ return /* @__PURE__ */ r("div", { className: d("flex flex-col h-full", N), children: [
2183
2177
  /* @__PURE__ */ e(
2184
2178
  "div",
2185
2179
  {
@@ -2196,7 +2190,7 @@ function Sn({
2196
2190
  "text-[11px] font-medium uppercase tracking-wide",
2197
2191
  P ? "text-primary" : "text-muted-foreground"
2198
2192
  ),
2199
- children: B
2193
+ children: _
2200
2194
  }
2201
2195
  ),
2202
2196
  /* @__PURE__ */ e(
@@ -2213,14 +2207,14 @@ function Sn({
2213
2207
  ] })
2214
2208
  }
2215
2209
  ),
2216
- M.length > 0 && /* @__PURE__ */ e(
2217
- an,
2210
+ T.length > 0 && /* @__PURE__ */ e(
2211
+ sn,
2218
2212
  {
2219
- events: M,
2213
+ events: T,
2220
2214
  date: n,
2221
- onEventClick: x,
2222
- disablePopover: !!s && !b,
2223
- renderPopover: b,
2215
+ onEventClick: h,
2216
+ disablePopover: !!s && !y,
2217
+ renderPopover: y,
2224
2218
  ...m?.multiDayBanner && { className: m.multiDayBanner }
2225
2219
  }
2226
2220
  ),
@@ -2230,8 +2224,8 @@ function Sn({
2230
2224
  ref: I,
2231
2225
  className: d("flex-1", m?.scrollContainer),
2232
2226
  children: /* @__PURE__ */ r("div", { className: "relative min-h-full", children: [
2233
- O.map((w, c) => {
2234
- const C = !it(n, w, a);
2227
+ O.map((k, c) => {
2228
+ const C = !it(n, k, a);
2235
2229
  return /* @__PURE__ */ r(
2236
2230
  "div",
2237
2231
  {
@@ -2241,7 +2235,7 @@ function Sn({
2241
2235
  m?.timeSlot,
2242
2236
  C ? m?.timeSlotNonWorking : m?.timeSlotWorking
2243
2237
  ),
2244
- style: { height: pe },
2238
+ style: { height: fe },
2245
2239
  children: [
2246
2240
  /* @__PURE__ */ e(
2247
2241
  "div",
@@ -2258,7 +2252,7 @@ function Sn({
2258
2252
  "text-[10px] sm:text-xs text-muted-foreground",
2259
2253
  m?.timeGutterLabel
2260
2254
  ),
2261
- children: Ce(w)
2255
+ children: Ce(k)
2262
2256
  }
2263
2257
  ) })
2264
2258
  }
@@ -2266,7 +2260,7 @@ function Sn({
2266
2260
  /* @__PURE__ */ r("div", { className: "relative flex-1", children: [
2267
2261
  E && !C && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-primary/5" }),
2268
2262
  c !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
2269
- N.slice(1).map((H) => /* @__PURE__ */ e(
2263
+ b.slice(1).map((H) => /* @__PURE__ */ e(
2270
2264
  "div",
2271
2265
  {
2272
2266
  className: "pointer-events-none absolute inset-x-0 border-b border-dashed border-border/30",
@@ -2274,24 +2268,24 @@ function Sn({
2274
2268
  },
2275
2269
  H
2276
2270
  )),
2277
- N.map((H, A) => {
2278
- const Y = { date: n, hour: w, minute: H };
2271
+ b.map((H, z) => {
2272
+ const Y = { date: n, hour: k, minute: H };
2279
2273
  return /* @__PURE__ */ e(
2280
2274
  mt,
2281
2275
  {
2282
2276
  slot: Y,
2283
2277
  onSelectionStart: $,
2284
2278
  onSelectionMove: q,
2285
- onSelectionEnd: f,
2279
+ onSelectionEnd: D,
2286
2280
  isSelected: S?.isSlotSelected(Y) ?? !1,
2287
2281
  isSelecting: S?.isSelecting ?? !1,
2288
2282
  disabled: C,
2289
2283
  className: "absolute inset-x-0",
2290
2284
  style: {
2291
- top: `${A * u}%`,
2285
+ top: `${z * u}%`,
2292
2286
  height: `${u}%`
2293
2287
  },
2294
- ariaLabel: `Add event at ${Ce(w)}:${String(H).padStart(2, "0")}`
2288
+ ariaLabel: `Add event at ${Ce(k)}:${String(H).padStart(2, "0")}`
2295
2289
  },
2296
2290
  H
2297
2291
  );
@@ -2299,7 +2293,7 @@ function Sn({
2299
2293
  ] })
2300
2294
  ]
2301
2295
  },
2302
- w
2296
+ k
2303
2297
  );
2304
2298
  }),
2305
2299
  /* @__PURE__ */ e(
@@ -2307,10 +2301,10 @@ function Sn({
2307
2301
  {
2308
2302
  className: "absolute top-0 bottom-0 right-0 pointer-events-none",
2309
2303
  style: { left: ze },
2310
- children: z.map((w) => {
2311
- const c = W.get(w.id);
2304
+ children: L.map((k) => {
2305
+ const c = A.get(k.id);
2312
2306
  if (!c) return null;
2313
- const h = `calc(${c.width}% - 2px)`, C = `max(${Ae}px, ${h})`;
2307
+ const p = `calc(${c.width}% - 2px)`, C = `max(${We}px, ${p})`;
2314
2308
  return l ? /* @__PURE__ */ e(
2315
2309
  "div",
2316
2310
  {
@@ -2319,34 +2313,34 @@ function Sn({
2319
2313
  top: `${c.top}px`,
2320
2314
  left: `${c.left}%`,
2321
2315
  width: C,
2322
- minWidth: `${Ae}px`
2316
+ minWidth: `${We}px`
2323
2317
  },
2324
- children: l({ event: w, position: c })
2318
+ children: l({ event: k, position: c })
2325
2319
  },
2326
- w.id
2320
+ k.id
2327
2321
  ) : /* @__PURE__ */ e(
2328
2322
  lt,
2329
2323
  {
2330
- event: w,
2324
+ event: k,
2331
2325
  position: {
2332
2326
  top: c.top,
2333
2327
  left: c.left,
2334
2328
  width: c.width,
2335
- minWidth: Ae
2329
+ minWidth: We
2336
2330
  },
2337
- hourHeight: pe,
2338
- badgeVariant: p,
2331
+ hourHeight: fe,
2332
+ badgeVariant: f,
2339
2333
  onClick: s,
2340
- disablePopover: !!s && !b,
2341
- renderPopover: b,
2334
+ disablePopover: !!s && !y,
2335
+ renderPopover: y,
2342
2336
  className: d("pointer-events-auto", m?.eventCard)
2343
2337
  },
2344
- w.id
2338
+ k.id
2345
2339
  );
2346
2340
  })
2347
2341
  }
2348
2342
  ),
2349
- E && T >= 0 && /* @__PURE__ */ r(
2343
+ E && M >= 0 && /* @__PURE__ */ r(
2350
2344
  "div",
2351
2345
  {
2352
2346
  className: d(
@@ -2354,7 +2348,7 @@ function Sn({
2354
2348
  m?.currentTimeIndicator
2355
2349
  ),
2356
2350
  style: {
2357
- top: T,
2351
+ top: M,
2358
2352
  left: ze
2359
2353
  },
2360
2354
  children: [
@@ -2368,7 +2362,7 @@ function Sn({
2368
2362
  )
2369
2363
  ] });
2370
2364
  }
2371
- const dn = [
2365
+ const cn = [
2372
2366
  { full: "Monday", short: "Mon", tiny: "M" },
2373
2367
  { full: "Tuesday", short: "Tue", tiny: "T" },
2374
2368
  { full: "Wednesday", short: "Wed", tiny: "W" },
@@ -2376,7 +2370,7 @@ const dn = [
2376
2370
  { full: "Friday", short: "Fri", tiny: "F" },
2377
2371
  { full: "Saturday", short: "Sat", tiny: "S" },
2378
2372
  { full: "Sunday", short: "Sun", tiny: "S" }
2379
- ], cn = [
2373
+ ], un = [
2380
2374
  { full: "Sunday", short: "Sun", tiny: "S" },
2381
2375
  { full: "Monday", short: "Mon", tiny: "M" },
2382
2376
  { full: "Tuesday", short: "Tue", tiny: "T" },
@@ -2384,49 +2378,49 @@ const dn = [
2384
2378
  { full: "Thursday", short: "Thu", tiny: "T" },
2385
2379
  { full: "Friday", short: "Fri", tiny: "F" },
2386
2380
  { full: "Saturday", short: "Sat", tiny: "S" }
2387
- ], fe = 3;
2388
- function Mn({
2381
+ ], ge = 3;
2382
+ function Tn({
2389
2383
  events: t,
2390
2384
  date: n,
2391
2385
  weekStartsOn: o = 1,
2392
2386
  badgeVariant: a = "colored",
2393
2387
  onEventClick: i,
2394
- onSlotSelect: p,
2388
+ onSlotSelect: f,
2395
2389
  onDayClick: s,
2396
- className: y,
2397
- renderEvent: D,
2390
+ className: x,
2391
+ renderEvent: N,
2398
2392
  renderPopover: l,
2399
- showMoreMode: b,
2400
- showMoreEventsInPopover: k = !1,
2393
+ showMoreMode: y,
2394
+ showMoreEventsInPopover: v = !1,
2401
2395
  slots: m,
2402
2396
  classNames: g
2403
2397
  }) {
2404
- const u = b ?? (k ? "popover" : "expand"), N = m?.dayCellHeader, v = m?.dayCellFooter, [z, M] = J(null), [W, O] = J(null), _ = F(() => bt(n, o), [n, o]), E = F(() => {
2405
- const x = /* @__PURE__ */ new Map();
2406
- for (const B of _) {
2407
- const R = B.date.toDateString(), P = He(t, B.date);
2408
- P.sort((w, c) => w.startDate.getTime() - c.startDate.getTime()), x.set(R, P);
2398
+ const u = y ?? (v ? "popover" : "expand"), b = m?.dayCellHeader, w = m?.dayCellFooter, [L, T] = J(null), [A, O] = J(null), B = F(() => bt(n, o), [n, o]), E = F(() => {
2399
+ const h = /* @__PURE__ */ new Map();
2400
+ for (const _ of B) {
2401
+ const R = _.date.toDateString(), P = He(t, _.date);
2402
+ P.sort((k, c) => k.startDate.getTime() - c.startDate.getTime()), h.set(R, P);
2409
2403
  }
2410
- return x;
2411
- }, [_, t]), T = Oe(), I = L(
2412
- (x) => {
2413
- T?.startSelection(x);
2404
+ return h;
2405
+ }, [B, t]), M = Oe(), I = W(
2406
+ (h) => {
2407
+ M?.startSelection(h);
2414
2408
  },
2415
- [T]
2416
- ), S = L(
2417
- (x) => {
2418
- T?.updateSelection(x);
2409
+ [M]
2410
+ ), S = W(
2411
+ (h) => {
2412
+ M?.updateSelection(h);
2419
2413
  },
2420
- [T]
2421
- ), $ = L(() => {
2422
- T?.endSelection();
2423
- }, [T]), q = L(
2424
- (x) => {
2425
- s?.(x);
2414
+ [M]
2415
+ ), $ = W(() => {
2416
+ M?.endSelection();
2417
+ }, [M]), q = W(
2418
+ (h) => {
2419
+ s?.(h);
2426
2420
  },
2427
2421
  [s]
2428
- ), f = o === 0 ? cn : dn;
2429
- return /* @__PURE__ */ r("div", { className: d("flex flex-col h-full overflow-hidden", y), children: [
2422
+ ), D = o === 0 ? un : cn;
2423
+ return /* @__PURE__ */ r("div", { className: d("flex flex-col h-full overflow-hidden", x), children: [
2430
2424
  /* @__PURE__ */ e("div", { className: "flex flex-col flex-1 overflow-auto", children: /* @__PURE__ */ r("div", { className: "flex flex-col flex-1 min-w-[560px] sm:min-w-0", children: [
2431
2425
  /* @__PURE__ */ e(
2432
2426
  "div",
@@ -2435,81 +2429,81 @@ function Mn({
2435
2429
  "grid grid-cols-7 border-b !sticky !top-0 bg-background z-10",
2436
2430
  g?.weekdayHeader
2437
2431
  ),
2438
- children: f.map((x, B) => /* @__PURE__ */ r(
2432
+ children: D.map((h, _) => /* @__PURE__ */ r(
2439
2433
  "div",
2440
2434
  {
2441
2435
  className: d(
2442
2436
  "py-2 sm:py-2.5 text-center text-[11px] uppercase font-medium tracking-wide text-muted-foreground",
2443
- B >= 5 && "text-muted-foreground/70",
2437
+ _ >= 5 && "text-muted-foreground/70",
2444
2438
  // Weekend
2445
2439
  g?.weekdayLabel
2446
2440
  ),
2447
2441
  children: [
2448
- /* @__PURE__ */ e("span", { className: "sm:hidden", children: x.short }),
2449
- /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: x.short })
2442
+ /* @__PURE__ */ e("span", { className: "sm:hidden", children: h.short }),
2443
+ /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: h.short })
2450
2444
  ]
2451
2445
  },
2452
- x.full
2446
+ h.full
2453
2447
  ))
2454
2448
  }
2455
2449
  ),
2456
- /* @__PURE__ */ e("div", { className: d("grid grid-cols-7 auto-rows-min", g?.monthGrid), children: _.map((x) => {
2457
- const B = x.date.toDateString(), R = E.get(B) || [], P = ce(x.date), w = x.date.getDay() === 0 || x.date.getDay() === 6, c = R.length > fe;
2450
+ /* @__PURE__ */ e("div", { className: d("grid grid-cols-7 auto-rows-min", g?.monthGrid), children: B.map((h) => {
2451
+ const _ = h.date.toDateString(), R = E.get(_) || [], P = ce(h.date), k = h.date.getDay() === 0 || h.date.getDay() === 6, c = R.length > ge;
2458
2452
  return /* @__PURE__ */ r(
2459
- ln,
2453
+ dn,
2460
2454
  {
2461
- date: x.date,
2462
- dataAttributes: { "data-day-key": B },
2455
+ date: h.date,
2456
+ dataAttributes: { "data-day-key": _ },
2463
2457
  onSelectionStart: I,
2464
2458
  onSelectionMove: S,
2465
2459
  onSelectionEnd: $,
2466
- isSelected: T?.isSlotSelected({ date: x.date }) ?? !1,
2467
- isSelecting: T?.isSelecting ?? !1,
2460
+ isSelected: M?.isSlotSelected({ date: h.date }) ?? !1,
2461
+ isSelecting: M?.isSelecting ?? !1,
2468
2462
  className: d(
2469
2463
  "relative flex flex-col border-r border-b text-left min-h-[80px] sm:min-h-[100px] overflow-hidden",
2470
2464
  "[&:nth-child(7n)]:border-r-0",
2471
- !x.isCurrentMonth && "bg-muted/20",
2472
- w && x.isCurrentMonth && "bg-muted/10",
2465
+ !h.isCurrentMonth && "bg-muted/20",
2466
+ k && h.isCurrentMonth && "bg-muted/10",
2473
2467
  g?.dayCell,
2474
2468
  P && g?.dayCellToday,
2475
- !x.isCurrentMonth && g?.dayCellOutside,
2476
- w && g?.dayCellWeekend
2469
+ !h.isCurrentMonth && g?.dayCellOutside,
2470
+ k && g?.dayCellWeekend
2477
2471
  ),
2478
- ariaLabel: `${x.date.toLocaleDateString()} - ${R.length} events. Click to create event, double-click to view day.`,
2472
+ ariaLabel: `${h.date.toLocaleDateString()} - ${R.length} events. Click to create event, double-click to view day.`,
2479
2473
  children: [
2480
2474
  /* @__PURE__ */ e(
2481
2475
  "div",
2482
2476
  {
2483
2477
  className: d(
2484
2478
  "flex items-center justify-center p-1",
2485
- !x.isCurrentMonth && "text-muted-foreground/40",
2479
+ !h.isCurrentMonth && "text-muted-foreground/40",
2486
2480
  g?.dayCellNumber
2487
2481
  ),
2488
2482
  children: /* @__PURE__ */ e(
2489
2483
  "button",
2490
2484
  {
2491
2485
  type: "button",
2492
- onClick: (h) => {
2493
- h.stopPropagation(), q(x.date);
2486
+ onClick: (p) => {
2487
+ p.stopPropagation(), q(h.date);
2494
2488
  },
2495
2489
  className: d(
2496
2490
  "flex items-center justify-center rounded-full transition-colors",
2497
2491
  "size-7 text-sm font-normal",
2498
2492
  P ? "bg-primary text-primary-foreground" : "hover:bg-muted"
2499
2493
  ),
2500
- children: x.date.getDate()
2494
+ children: h.date.getDate()
2501
2495
  }
2502
2496
  )
2503
2497
  }
2504
2498
  ),
2505
- N && /* @__PURE__ */ e(
2506
- N,
2499
+ b && /* @__PURE__ */ e(
2500
+ b,
2507
2501
  {
2508
- date: x.date,
2502
+ date: h.date,
2509
2503
  events: R,
2510
2504
  isToday: P,
2511
- isCurrentMonth: x.isCurrentMonth,
2512
- isWeekend: w,
2505
+ isCurrentMonth: h.isCurrentMonth,
2506
+ isWeekend: k,
2513
2507
  view: "month"
2514
2508
  }
2515
2509
  ),
@@ -2521,16 +2515,16 @@ function Mn({
2521
2515
  g?.dayCellContent
2522
2516
  ),
2523
2517
  children: [
2524
- R.slice(0, fe).map((h) => /* @__PURE__ */ e(
2518
+ R.slice(0, ge).map((p) => /* @__PURE__ */ e(
2525
2519
  "div",
2526
2520
  {
2527
2521
  onPointerDown: (C) => {
2528
2522
  C.stopPropagation();
2529
2523
  },
2530
- children: D ? D({ event: h, variant: "compact" }) : /* @__PURE__ */ e(
2524
+ children: N ? N({ event: p, variant: "compact" }) : /* @__PURE__ */ e(
2531
2525
  Se,
2532
2526
  {
2533
- event: h,
2527
+ event: p,
2534
2528
  variant: "compact",
2535
2529
  badgeVariant: a,
2536
2530
  onClick: i,
@@ -2544,18 +2538,18 @@ function Mn({
2544
2538
  }
2545
2539
  )
2546
2540
  },
2547
- h.id
2541
+ p.id
2548
2542
  )),
2549
2543
  c && u === "expand" && /* @__PURE__ */ r(
2550
2544
  "button",
2551
2545
  {
2552
2546
  type: "button",
2553
- onPointerDown: (h) => h.stopPropagation(),
2554
- onClick: (h) => {
2555
- h.stopPropagation();
2556
- const C = document.querySelector(`[data-day-key="${B}"]`);
2547
+ onPointerDown: (p) => p.stopPropagation(),
2548
+ onClick: (p) => {
2549
+ p.stopPropagation();
2550
+ const C = document.querySelector(`[data-day-key="${_}"]`);
2557
2551
  O({
2558
- date: x.date,
2552
+ date: h.date,
2559
2553
  events: R,
2560
2554
  rect: C?.getBoundingClientRect() ?? new DOMRect(window.innerWidth / 2 - 180, window.innerHeight / 2 - 240, 0, 0)
2561
2555
  });
@@ -2566,7 +2560,7 @@ function Mn({
2566
2560
  ),
2567
2561
  children: [
2568
2562
  "+",
2569
- R.length - fe,
2563
+ R.length - ge,
2570
2564
  " more"
2571
2565
  ]
2572
2566
  }
@@ -2574,16 +2568,16 @@ function Mn({
2574
2568
  c && u === "popover" && /* @__PURE__ */ r(
2575
2569
  re,
2576
2570
  {
2577
- open: z === B,
2578
- onOpenChange: (h) => M(h ? B : null),
2571
+ open: L === _,
2572
+ onOpenChange: (p) => T(p ? _ : null),
2579
2573
  children: [
2580
2574
  /* @__PURE__ */ e(oe, { asChild: !0, children: /* @__PURE__ */ r(
2581
2575
  "button",
2582
2576
  {
2583
2577
  type: "button",
2584
- onPointerDown: (h) => h.stopPropagation(),
2585
- onClick: (h) => {
2586
- h.stopPropagation(), M(B);
2578
+ onPointerDown: (p) => p.stopPropagation(),
2579
+ onClick: (p) => {
2580
+ p.stopPropagation(), T(_);
2587
2581
  },
2588
2582
  className: d(
2589
2583
  "w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
@@ -2591,7 +2585,7 @@ function Mn({
2591
2585
  ),
2592
2586
  children: [
2593
2587
  "+",
2594
- R.length - fe,
2588
+ R.length - ge,
2595
2589
  " more"
2596
2590
  ]
2597
2591
  }
@@ -2603,10 +2597,10 @@ function Mn({
2603
2597
  side: "right",
2604
2598
  sideOffset: 8,
2605
2599
  className: "w-72 max-h-80 overflow-y-auto p-2",
2606
- onPointerDown: (h) => h.stopPropagation(),
2600
+ onPointerDown: (p) => p.stopPropagation(),
2607
2601
  children: [
2608
2602
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between mb-2 pb-2 border-b", children: [
2609
- /* @__PURE__ */ e("span", { className: "text-sm font-medium", children: x.date.toLocaleDateString(void 0, {
2603
+ /* @__PURE__ */ e("span", { className: "text-sm font-medium", children: h.date.toLocaleDateString(void 0, {
2610
2604
  weekday: "short",
2611
2605
  month: "short",
2612
2606
  day: "numeric"
@@ -2616,20 +2610,20 @@ function Mn({
2616
2610
  " events"
2617
2611
  ] })
2618
2612
  ] }),
2619
- /* @__PURE__ */ e("div", { className: "space-y-1.5", children: R.map((h) => /* @__PURE__ */ e("div", { children: D ? D({ event: h, variant: "compact" }) : /* @__PURE__ */ e(
2613
+ /* @__PURE__ */ e("div", { className: "space-y-1.5", children: R.map((p) => /* @__PURE__ */ e("div", { children: N ? N({ event: p, variant: "compact" }) : /* @__PURE__ */ e(
2620
2614
  Se,
2621
2615
  {
2622
- event: h,
2616
+ event: p,
2623
2617
  variant: "compact",
2624
2618
  badgeVariant: a,
2625
2619
  onClick: (C) => {
2626
- M(null), i?.(C);
2620
+ T(null), i?.(C);
2627
2621
  },
2628
2622
  disablePopover: !!i && !l,
2629
2623
  renderPopover: l,
2630
2624
  showTime: !0
2631
2625
  }
2632
- ) }, h.id)) })
2626
+ ) }, p.id)) })
2633
2627
  ]
2634
2628
  }
2635
2629
  )
@@ -2639,8 +2633,8 @@ function Mn({
2639
2633
  c && u === "dayView" && /* @__PURE__ */ r(
2640
2634
  "div",
2641
2635
  {
2642
- onPointerDown: (h) => {
2643
- h.stopPropagation(), q(x.date);
2636
+ onPointerDown: (p) => {
2637
+ p.stopPropagation(), q(h.date);
2644
2638
  },
2645
2639
  className: d(
2646
2640
  "w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
@@ -2648,7 +2642,7 @@ function Mn({
2648
2642
  ),
2649
2643
  children: [
2650
2644
  "+",
2651
- R.length - fe,
2645
+ R.length - ge,
2652
2646
  " more"
2653
2647
  ]
2654
2648
  }
@@ -2656,93 +2650,93 @@ function Mn({
2656
2650
  ]
2657
2651
  }
2658
2652
  ),
2659
- v && /* @__PURE__ */ e(
2660
- v,
2653
+ w && /* @__PURE__ */ e(
2654
+ w,
2661
2655
  {
2662
- date: x.date,
2656
+ date: h.date,
2663
2657
  events: R,
2664
2658
  isToday: P,
2665
- isCurrentMonth: x.isCurrentMonth,
2666
- isWeekend: w,
2659
+ isCurrentMonth: h.isCurrentMonth,
2660
+ isWeekend: k,
2667
2661
  view: "month"
2668
2662
  }
2669
2663
  )
2670
2664
  ]
2671
2665
  },
2672
- B
2666
+ _
2673
2667
  );
2674
2668
  }) })
2675
2669
  ] }) }),
2676
2670
  /* @__PURE__ */ e(
2677
- nn,
2671
+ rn,
2678
2672
  {
2679
- isOpen: W !== null,
2673
+ isOpen: A !== null,
2680
2674
  onClose: () => O(null),
2681
- date: W?.date ?? /* @__PURE__ */ new Date(),
2682
- events: W?.events ?? [],
2683
- anchorRect: W?.rect ?? null,
2675
+ date: A?.date ?? /* @__PURE__ */ new Date(),
2676
+ events: A?.events ?? [],
2677
+ anchorRect: A?.rect ?? null,
2684
2678
  badgeVariant: a,
2685
2679
  onEventClick: i,
2686
- renderEvent: D,
2680
+ renderEvent: N,
2687
2681
  renderPopover: l
2688
2682
  }
2689
2683
  )
2690
2684
  ] });
2691
2685
  }
2692
- const Me = 26, et = 2, ve = 4;
2686
+ const Me = 26, et = 2, Ne = 4;
2693
2687
  function tt(t, n) {
2694
2688
  const o = Ge(t);
2695
2689
  for (let i = 0; i < n.length; i++) {
2696
- const p = n[i];
2697
- if (p && le(o, p)) return i;
2690
+ const f = n[i];
2691
+ if (f && le(o, f)) return i;
2698
2692
  }
2699
2693
  const a = n[0];
2700
2694
  return a && o < Ge(a) ? -1 : 7;
2701
2695
  }
2702
- function un(t) {
2696
+ function mn(t) {
2703
2697
  const n = [...t].sort((a, i) => {
2704
- const p = a.endCol - a.startCol, s = i.endCol - i.startCol;
2705
- return s !== p ? s - p : a.startCol - i.startCol;
2698
+ const f = a.endCol - a.startCol, s = i.endCol - i.startCol;
2699
+ return s !== f ? s - f : a.startCol - i.startCol;
2706
2700
  }), o = [];
2707
2701
  return n.map((a) => {
2708
2702
  let i = -1;
2709
2703
  for (let s = 0; s < o.length; s++) {
2710
- const y = o[s];
2711
- if (!y) continue;
2712
- let D = !0;
2704
+ const x = o[s];
2705
+ if (!x) continue;
2706
+ let N = !0;
2713
2707
  for (let l = a.startCol; l <= a.endCol; l++)
2714
- if (y[l]) {
2715
- D = !1;
2708
+ if (x[l]) {
2709
+ N = !1;
2716
2710
  break;
2717
2711
  }
2718
- if (D) {
2712
+ if (N) {
2719
2713
  i = s;
2720
2714
  break;
2721
2715
  }
2722
2716
  }
2723
2717
  i === -1 && (i = o.length, o.push(new Array(7).fill(!1)));
2724
- const p = o[i];
2725
- if (p)
2718
+ const f = o[i];
2719
+ if (f)
2726
2720
  for (let s = a.startCol; s <= a.endCol; s++)
2727
- p[s] = !0;
2721
+ f[s] = !0;
2728
2722
  return { ...a, row: i };
2729
2723
  });
2730
2724
  }
2731
- function mn({
2725
+ function hn({
2732
2726
  pe: t,
2733
2727
  onEventClick: n,
2734
2728
  disablePopover: o,
2735
2729
  renderPopover: a
2736
2730
  }) {
2737
- const [i, p] = J(!1), s = de(t.event.color), y = L(() => {
2738
- o && n ? n(t.event) : o || p(!0);
2739
- }, [o, n, t.event]), D = L(() => {
2740
- p(!1);
2731
+ const [i, f] = J(!1), s = de(t.event.color), x = W(() => {
2732
+ o && n ? n(t.event) : o || f(!0);
2733
+ }, [o, n, t.event]), N = W(() => {
2734
+ f(!1);
2741
2735
  }, []), l = /* @__PURE__ */ r(
2742
2736
  "button",
2743
2737
  {
2744
2738
  type: "button",
2745
- onClick: y,
2739
+ onClick: x,
2746
2740
  className: d(
2747
2741
  "inline-flex items-center gap-1 rounded text-[10px] font-medium transition-opacity hover:opacity-80 mx-0.5 overflow-hidden w-full",
2748
2742
  "sm:text-xs",
@@ -2765,22 +2759,22 @@ function mn({
2765
2759
  t.continuesAfter && /* @__PURE__ */ e("span", { className: "text-[9px] opacity-60 flex-shrink-0", children: "▸" })
2766
2760
  ]
2767
2761
  }
2768
- ), b = /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
2762
+ ), y = /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
2769
2763
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.event.title }),
2770
2764
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t.event) })
2771
- ] }) }), k = {
2765
+ ] }) }), v = {
2772
2766
  gridColumn: `${t.startCol + 2} / ${t.endCol + 3}`,
2773
2767
  gridRow: t.row + 1
2774
2768
  };
2775
- return o ? /* @__PURE__ */ e("div", { style: k, children: /* @__PURE__ */ r(ie, { children: [
2769
+ return o ? /* @__PURE__ */ e("div", { style: v, children: /* @__PURE__ */ r(ie, { children: [
2776
2770
  /* @__PURE__ */ e(se, { asChild: !0, children: l }),
2777
- b
2778
- ] }) }) : /* @__PURE__ */ e("div", { style: k, children: /* @__PURE__ */ r(re, { open: i, onOpenChange: p, children: [
2771
+ y
2772
+ ] }) }) : /* @__PURE__ */ e("div", { style: v, children: /* @__PURE__ */ r(re, { open: i, onOpenChange: f, children: [
2779
2773
  /* @__PURE__ */ e(oe, { asChild: !0, children: l }),
2780
- /* @__PURE__ */ e(Q, { className: "w-80", children: a ? a({ event: t.event, onClose: D }) : /* @__PURE__ */ e(hn, { event: t.event, onClose: D }) })
2774
+ /* @__PURE__ */ e(Q, { className: "w-80", children: a ? a({ event: t.event, onClose: N }) : /* @__PURE__ */ e(pn, { event: t.event, onClose: N }) })
2781
2775
  ] }) });
2782
2776
  }
2783
- function hn({
2777
+ function pn({
2784
2778
  event: t,
2785
2779
  onClose: n
2786
2780
  }) {
@@ -2818,54 +2812,54 @@ function hn({
2818
2812
  ) })
2819
2813
  ] });
2820
2814
  }
2821
- function pn({
2815
+ function fn({
2822
2816
  events: t,
2823
2817
  weekDays: n,
2824
2818
  hourColumnWidth: o,
2825
2819
  minDayColumnWidth: a,
2826
2820
  dayColumnWidths: i,
2827
- onEventClick: p,
2821
+ onEventClick: f,
2828
2822
  disablePopover: s = !1,
2829
- renderPopover: y,
2830
- className: D
2823
+ renderPopover: x,
2824
+ className: N
2831
2825
  }) {
2832
2826
  const l = F(() => {
2833
2827
  if (t.length === 0) return [];
2834
- const v = t.map((z) => {
2835
- const M = tt(z.startDate, n), W = tt(z.endDate, n), O = Math.max(0, M), _ = Math.min(6, W);
2836
- if (O > 6 || _ < 0) return null;
2837
- const E = M < 0, T = W > 6, S = De(z) && le(z.startDate, z.endDate);
2828
+ const w = t.map((L) => {
2829
+ const T = tt(L.startDate, n), A = tt(L.endDate, n), O = Math.max(0, T), B = Math.min(6, A);
2830
+ if (O > 6 || B < 0) return null;
2831
+ const E = T < 0, M = A > 6, S = De(L) && le(L.startDate, L.endDate);
2838
2832
  return {
2839
- event: z,
2833
+ event: L,
2840
2834
  startCol: O,
2841
- endCol: _,
2835
+ endCol: B,
2842
2836
  continuesBefore: E,
2843
- continuesAfter: T,
2837
+ continuesAfter: M,
2844
2838
  isSingleDayAllDay: S
2845
2839
  };
2846
2840
  }).filter(Boolean);
2847
- return un(v);
2841
+ return mn(w);
2848
2842
  }, [t, n]);
2849
2843
  if (l.length === 0) return null;
2850
- const b = Math.max(...l.map((v) => v.row)) + 1, k = Math.min(b, ve), m = b > ve, g = m ? l.filter((v) => v.row >= ve).length : 0, u = [
2844
+ const y = Math.max(...l.map((w) => w.row)) + 1, v = Math.min(y, Ne), m = y > Ne, g = m ? l.filter((w) => w.row >= Ne).length : 0, u = [
2851
2845
  `${o}px`,
2852
- ...i.map((v) => v > a ? `${v}px` : `minmax(${a}px, 1fr)`)
2853
- ].join(" "), N = k * Me + (k - 1) * et + 8;
2846
+ ...i.map((w) => w > a ? `${w}px` : `minmax(${a}px, 1fr)`)
2847
+ ].join(" "), b = v * Me + (v - 1) * et + 8;
2854
2848
  return /* @__PURE__ */ r(
2855
2849
  "div",
2856
2850
  {
2857
2851
  className: d(
2858
2852
  "ic-all-day-row border-b bg-muted/20 relative",
2859
- D
2853
+ N
2860
2854
  ),
2861
2855
  style: {
2862
2856
  display: "grid",
2863
2857
  gridTemplateColumns: u,
2864
- gridTemplateRows: `repeat(${k}, ${Me}px)`,
2858
+ gridTemplateRows: `repeat(${v}, ${Me}px)`,
2865
2859
  gap: `${et}px 0`,
2866
2860
  paddingTop: 4,
2867
2861
  paddingBottom: 4,
2868
- minHeight: N
2862
+ minHeight: b
2869
2863
  },
2870
2864
  children: [
2871
2865
  /* @__PURE__ */ e(
@@ -2874,31 +2868,31 @@ function pn({
2874
2868
  className: "flex items-start justify-center pt-1 text-[10px] font-medium text-muted-foreground",
2875
2869
  style: {
2876
2870
  gridColumn: 1,
2877
- gridRow: `1 / span ${k}`
2871
+ gridRow: `1 / span ${v}`
2878
2872
  },
2879
2873
  children: /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: "All day" })
2880
2874
  }
2881
2875
  ),
2882
- n.map((v, z) => /* @__PURE__ */ e(
2876
+ n.map((w, L) => /* @__PURE__ */ e(
2883
2877
  "div",
2884
2878
  {
2885
2879
  className: "pointer-events-none border-r last:border-r-0",
2886
2880
  style: {
2887
- gridColumn: z + 2,
2888
- gridRow: `1 / span ${k}`
2881
+ gridColumn: L + 2,
2882
+ gridRow: `1 / span ${v}`
2889
2883
  }
2890
2884
  },
2891
- v.toDateString()
2885
+ w.toDateString()
2892
2886
  )),
2893
- l.filter((v) => v.row < ve).map((v) => /* @__PURE__ */ e(
2894
- mn,
2887
+ l.filter((w) => w.row < Ne).map((w) => /* @__PURE__ */ e(
2888
+ hn,
2895
2889
  {
2896
- pe: v,
2897
- onEventClick: p,
2890
+ pe: w,
2891
+ onEventClick: f,
2898
2892
  disablePopover: s,
2899
- renderPopover: y
2893
+ renderPopover: x
2900
2894
  },
2901
- v.event.id
2895
+ w.event.id
2902
2896
  )),
2903
2897
  m && /* @__PURE__ */ r(
2904
2898
  "div",
@@ -2906,7 +2900,7 @@ function pn({
2906
2900
  className: "text-[10px] text-muted-foreground font-medium px-2 flex items-center",
2907
2901
  style: {
2908
2902
  gridColumn: `2 / ${n.length + 2}`,
2909
- gridRow: k
2903
+ gridRow: v
2910
2904
  },
2911
2905
  children: [
2912
2906
  "+",
@@ -2919,41 +2913,41 @@ function pn({
2919
2913
  }
2920
2914
  );
2921
2915
  }
2922
- const ue = 96, ge = 56, nt = 72, Z = 120, Ne = 100, fn = 3;
2923
- function Tn({
2916
+ const ue = 96, xe = 56, nt = 72, Z = 120, ke = 100, gn = 3;
2917
+ function zn({
2924
2918
  events: t,
2925
2919
  date: n,
2926
2920
  weekStartsOn: o = 1,
2927
2921
  visibleHours: a = { startHour: 0, endHour: 24 },
2928
2922
  workingHours: i,
2929
- slotDuration: p = 30,
2923
+ slotDuration: f = 30,
2930
2924
  badgeVariant: s = "colored",
2931
- onEventClick: y,
2932
- onSlotSelect: D,
2925
+ onEventClick: x,
2926
+ onSlotSelect: N,
2933
2927
  onDayClick: l,
2934
- className: b,
2935
- renderEvent: k,
2928
+ className: y,
2929
+ renderEvent: v,
2936
2930
  renderPopover: m,
2937
2931
  slots: g,
2938
2932
  classNames: u
2939
2933
  }) {
2940
- const N = 60 / p, v = 100 / N, z = F(() => {
2934
+ const b = 60 / f, w = 100 / b, L = F(() => {
2941
2935
  const c = [];
2942
- for (let h = 0; h < N; h++)
2943
- c.push(h * p);
2936
+ for (let p = 0; p < b; p++)
2937
+ c.push(p * f);
2944
2938
  return c;
2945
- }, [N, p]), M = F(
2939
+ }, [b, f]), T = F(
2946
2940
  () => wt(n, o),
2947
2941
  [n, o]
2948
- ), W = F(
2942
+ ), A = F(
2949
2943
  () => at(a),
2950
2944
  [a]
2951
2945
  ), O = F(() => {
2952
2946
  const c = /* @__PURE__ */ new Map();
2953
- for (const h of M) {
2954
- const C = h.toDateString(), H = He(t, h), { singleDay: A, multiDay: Y } = rt(H), j = ot(
2955
- A,
2956
- h,
2947
+ for (const p of T) {
2948
+ const C = p.toDateString(), H = He(t, p), { singleDay: z, multiDay: Y } = rt(H), j = ot(
2949
+ z,
2950
+ p,
2957
2951
  a,
2958
2952
  ue
2959
2953
  ), G = /* @__PURE__ */ new Map();
@@ -2964,32 +2958,32 @@ function Tn({
2964
2958
  U = Math.max(U, ae);
2965
2959
  }
2966
2960
  c.set(C, {
2967
- singleDay: A,
2961
+ singleDay: z,
2968
2962
  multiDay: Y,
2969
2963
  positions: G,
2970
2964
  maxOverlapping: U
2971
2965
  });
2972
2966
  }
2973
2967
  return c;
2974
- }, [M, t, a]), _ = F(() => {
2968
+ }, [T, t, a]), B = F(() => {
2975
2969
  const c = /* @__PURE__ */ new Map();
2976
- for (const { multiDay: h } of O.values())
2977
- for (const C of h)
2970
+ for (const { multiDay: p } of O.values())
2971
+ for (const C of p)
2978
2972
  c.set(C.id, C);
2979
2973
  return Array.from(c.values());
2980
- }, [O]), E = /* @__PURE__ */ new Date(), T = M.findIndex((c) => ce(c)), I = F(() => {
2981
- if (T < 0) return -1;
2974
+ }, [O]), E = /* @__PURE__ */ new Date(), M = T.findIndex((c) => ce(c)), I = F(() => {
2975
+ if (M < 0) return -1;
2982
2976
  const c = E.getHours() + E.getMinutes() / 60;
2983
2977
  return c < a.startHour || c > a.endHour ? -1 : (c - a.startHour) * ue;
2984
- }, [T, a, E]), S = te(null);
2978
+ }, [M, a, E]), S = te(null);
2985
2979
  Ie(() => {
2986
2980
  const c = S.current;
2987
2981
  if (!c) return;
2988
- const h = () => {
2982
+ const p = () => {
2989
2983
  let C;
2990
- if (T !== -1) {
2991
- const A = (/* @__PURE__ */ new Date()).getHours();
2992
- C = Math.max(A - 1, a.startHour);
2984
+ if (M !== -1) {
2985
+ const z = (/* @__PURE__ */ new Date()).getHours();
2986
+ C = Math.max(z - 1, a.startHour);
2993
2987
  } else {
2994
2988
  const Y = (/* @__PURE__ */ new Date()).getDay();
2995
2989
  let j = i?.[Y];
@@ -3009,47 +3003,47 @@ function Tn({
3009
3003
  });
3010
3004
  };
3011
3005
  requestAnimationFrame(() => {
3012
- requestAnimationFrame(h);
3006
+ requestAnimationFrame(p);
3013
3007
  });
3014
- }, [n, i, a, T]);
3015
- const $ = Oe(), q = L(
3008
+ }, [n, i, a, M]);
3009
+ const $ = Oe(), q = W(
3016
3010
  (c) => {
3017
3011
  $?.startSelection(c);
3018
3012
  },
3019
3013
  [$]
3020
- ), f = L(
3014
+ ), D = W(
3021
3015
  (c) => {
3022
3016
  $?.updateSelection(c);
3023
3017
  },
3024
3018
  [$]
3025
- ), x = L(() => {
3019
+ ), h = W(() => {
3026
3020
  $?.endSelection();
3027
- }, [$]), B = L(
3021
+ }, [$]), _ = W(
3028
3022
  (c) => {
3029
- y?.(c);
3023
+ x?.(c);
3030
3024
  },
3031
- [y]
3032
- ), R = ge + 7 * Z, P = F(() => {
3025
+ [x]
3026
+ ), R = xe + 7 * Z, P = F(() => {
3033
3027
  const c = [];
3034
- for (const h of M) {
3035
- const C = h.toDateString(), A = O.get(C)?.maxOverlapping ?? 1;
3036
- A > fn ? c.push(
3037
- Math.max(Z, A * Ne)
3028
+ for (const p of T) {
3029
+ const C = p.toDateString(), z = O.get(C)?.maxOverlapping ?? 1;
3030
+ z > gn ? c.push(
3031
+ Math.max(Z, z * ke)
3038
3032
  ) : c.push(Z);
3039
3033
  }
3040
3034
  return c;
3041
- }, [M, O]), w = ge + P.reduce((c, h) => c + h, 0);
3042
- return /* @__PURE__ */ r("div", { className: d("ic-week-view flex flex-col h-full", b), children: [
3043
- _.length > 0 && /* @__PURE__ */ e(
3044
- pn,
3035
+ }, [T, O]), k = xe + P.reduce((c, p) => c + p, 0);
3036
+ return /* @__PURE__ */ r("div", { className: d("ic-week-view flex flex-col h-full", y), children: [
3037
+ B.length > 0 && /* @__PURE__ */ e(
3038
+ fn,
3045
3039
  {
3046
- events: _,
3047
- weekDays: M,
3048
- hourColumnWidth: ge,
3040
+ events: B,
3041
+ weekDays: T,
3042
+ hourColumnWidth: xe,
3049
3043
  minDayColumnWidth: Z,
3050
3044
  dayColumnWidths: P,
3051
- onEventClick: B,
3052
- disablePopover: !!y && !m,
3045
+ onEventClick: _,
3046
+ disablePopover: !!x && !m,
3053
3047
  renderPopover: m,
3054
3048
  ...u?.multiDayBanner && {
3055
3049
  className: u.multiDayBanner
@@ -3064,24 +3058,24 @@ function Tn({
3064
3058
  "ic-week-scroll-container flex-1",
3065
3059
  u?.scrollContainer
3066
3060
  ),
3067
- children: /* @__PURE__ */ r("div", { style: { minWidth: Math.max(R, w) }, children: [
3061
+ children: /* @__PURE__ */ r("div", { style: { minWidth: Math.max(R, k) }, children: [
3068
3062
  /* @__PURE__ */ e("div", { className: "ic-week-header sticky top-0 z-20 border-b bg-background", children: /* @__PURE__ */ r("div", { className: "flex", children: [
3069
3063
  /* @__PURE__ */ e(
3070
3064
  "div",
3071
3065
  {
3072
3066
  className: "flex-shrink-0 flex items-end justify-center pb-2 text-[10px] text-muted-foreground/70",
3073
- style: { width: ge, height: nt },
3067
+ style: { width: xe, height: nt },
3074
3068
  children: /* @__PURE__ */ r("span", { className: "hidden sm:inline", children: [
3075
3069
  "GMT",
3076
3070
  (() => {
3077
- const c = (/* @__PURE__ */ new Date()).getTimezoneOffset(), h = Math.abs(Math.floor(c / 60)), C = c <= 0 ? "+" : "-";
3078
- return h > 0 ? `${C}${String(h).padStart(2, "0")}` : "";
3071
+ const c = (/* @__PURE__ */ new Date()).getTimezoneOffset(), p = Math.abs(Math.floor(c / 60)), C = c <= 0 ? "+" : "-";
3072
+ return p > 0 ? `${C}${String(p).padStart(2, "0")}` : "";
3079
3073
  })()
3080
3074
  ] })
3081
3075
  }
3082
3076
  ),
3083
- M.map((c, h) => {
3084
- const C = ce(c), H = P[h] ?? Z, A = H > Z;
3077
+ T.map((c, p) => {
3078
+ const C = ce(c), H = P[p] ?? Z, z = H > Z;
3085
3079
  return /* @__PURE__ */ r(
3086
3080
  "div",
3087
3081
  {
@@ -3092,7 +3086,7 @@ function Tn({
3092
3086
  ),
3093
3087
  style: {
3094
3088
  height: nt,
3095
- minWidth: A ? H : Z
3089
+ minWidth: z ? H : Z
3096
3090
  },
3097
3091
  children: [
3098
3092
  /* @__PURE__ */ e(
@@ -3132,13 +3126,13 @@ function Tn({
3132
3126
  "ic-hour-column sticky left-0 z-10 bg-zinc-50 border-r",
3133
3127
  u?.timeGutter
3134
3128
  ),
3135
- style: { width: ge },
3136
- children: W.map((c, h) => /* @__PURE__ */ e(
3129
+ style: { width: xe },
3130
+ children: A.map((c, p) => /* @__PURE__ */ e(
3137
3131
  "div",
3138
3132
  {
3139
3133
  className: "relative",
3140
3134
  style: { height: ue },
3141
- children: /* @__PURE__ */ e("div", { className: "absolute -top-2.5 right-1 sm:right-2 flex h-5 items-center", children: h !== 0 && /* @__PURE__ */ e(
3135
+ children: /* @__PURE__ */ e("div", { className: "absolute -top-2.5 right-1 sm:right-2 flex h-5 items-center", children: p !== 0 && /* @__PURE__ */ e(
3142
3136
  "span",
3143
3137
  {
3144
3138
  className: d(
@@ -3153,17 +3147,17 @@ function Tn({
3153
3147
  ))
3154
3148
  }
3155
3149
  ),
3156
- /* @__PURE__ */ e("div", { className: "ic-week-grid relative flex-1", children: /* @__PURE__ */ e("div", { className: "flex divide-x", children: M.map((c, h) => {
3157
- const C = c.toDateString(), H = O.get(C), A = P[h] ?? Z, Y = A > Z;
3150
+ /* @__PURE__ */ e("div", { className: "ic-week-grid relative flex-1", children: /* @__PURE__ */ e("div", { className: "flex divide-x", children: T.map((c, p) => {
3151
+ const C = c.toDateString(), H = O.get(C), z = P[p] ?? Z, Y = z > Z;
3158
3152
  return /* @__PURE__ */ r(
3159
3153
  "div",
3160
3154
  {
3161
3155
  className: "ic-day-column relative flex-1",
3162
3156
  style: {
3163
- minWidth: Y ? A : Z
3157
+ minWidth: Y ? z : Z
3164
3158
  },
3165
3159
  children: [
3166
- W.map((j, G) => {
3160
+ A.map((j, G) => {
3167
3161
  const K = !it(
3168
3162
  c,
3169
3163
  j,
@@ -3182,7 +3176,7 @@ function Tn({
3182
3176
  style: { height: ue },
3183
3177
  children: [
3184
3178
  G !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
3185
- z.slice(1).map((ae) => /* @__PURE__ */ e(
3179
+ L.slice(1).map((ae) => /* @__PURE__ */ e(
3186
3180
  "div",
3187
3181
  {
3188
3182
  className: "pointer-events-none absolute inset-x-0 border-b border-dashed border-border/30",
@@ -3190,7 +3184,7 @@ function Tn({
3190
3184
  },
3191
3185
  ae
3192
3186
  )),
3193
- z.map((ae, ht) => {
3187
+ L.map((ae, ht) => {
3194
3188
  const Ve = {
3195
3189
  date: c,
3196
3190
  hour: j,
@@ -3201,15 +3195,15 @@ function Tn({
3201
3195
  {
3202
3196
  slot: Ve,
3203
3197
  onSelectionStart: q,
3204
- onSelectionMove: f,
3205
- onSelectionEnd: x,
3198
+ onSelectionMove: D,
3199
+ onSelectionEnd: h,
3206
3200
  isSelected: $?.isSlotSelected(Ve) ?? !1,
3207
3201
  isSelecting: $?.isSelecting ?? !1,
3208
3202
  disabled: K,
3209
3203
  className: "absolute inset-x-0",
3210
3204
  style: {
3211
- top: `${ht * v}%`,
3212
- height: `${v}%`
3205
+ top: `${ht * w}%`,
3206
+ height: `${w}%`
3213
3207
  },
3214
3208
  ariaLabel: `Add event on ${c.toLocaleDateString()} at ${Ce(j)}:${String(ae).padStart(2, "0")}`
3215
3209
  },
@@ -3224,8 +3218,8 @@ function Tn({
3224
3218
  H?.singleDay.map((j) => {
3225
3219
  const G = H.positions.get(j.id);
3226
3220
  if (!G) return null;
3227
- const U = `calc(${G.width}% - 2px)`, K = `max(${Ne}px, ${U})`;
3228
- return k ? /* @__PURE__ */ e(
3221
+ const U = `calc(${G.width}% - 2px)`, K = `max(${ke}px, ${U})`;
3222
+ return v ? /* @__PURE__ */ e(
3229
3223
  "div",
3230
3224
  {
3231
3225
  className: "absolute pointer-events-auto p-0.5",
@@ -3233,9 +3227,9 @@ function Tn({
3233
3227
  top: `${G.top}px`,
3234
3228
  left: `${G.left}%`,
3235
3229
  width: K,
3236
- minWidth: `${Ne}px`
3230
+ minWidth: `${ke}px`
3237
3231
  },
3238
- children: k({ event: j, position: G })
3232
+ children: v({ event: j, position: G })
3239
3233
  },
3240
3234
  j.id
3241
3235
  ) : /* @__PURE__ */ e(
@@ -3246,12 +3240,12 @@ function Tn({
3246
3240
  top: G.top,
3247
3241
  left: G.left,
3248
3242
  width: G.width,
3249
- minWidth: Ne
3243
+ minWidth: ke
3250
3244
  },
3251
3245
  hourHeight: ue,
3252
3246
  badgeVariant: s,
3253
- onClick: y,
3254
- disablePopover: !!y && !m,
3247
+ onClick: x,
3248
+ disablePopover: !!x && !m,
3255
3249
  renderPopover: m,
3256
3250
  className: d(
3257
3251
  "pointer-events-auto",
@@ -3261,7 +3255,7 @@ function Tn({
3261
3255
  j.id
3262
3256
  );
3263
3257
  }),
3264
- h === T && I >= 0 && /* @__PURE__ */ r(
3258
+ p === M && I >= 0 && /* @__PURE__ */ r(
3265
3259
  "div",
3266
3260
  {
3267
3261
  className: d(
@@ -3287,28 +3281,28 @@ function Tn({
3287
3281
  ] });
3288
3282
  }
3289
3283
  export {
3290
- Cn as A,
3284
+ Sn as A,
3291
3285
  me as B,
3292
- Dn as C,
3286
+ Cn as C,
3293
3287
  Ut as D,
3294
3288
  lt as E,
3295
- Mn as M,
3289
+ Tn as M,
3296
3290
  re as P,
3297
3291
  mt as T,
3298
- Tn as W,
3299
- nn as a,
3300
- ln as b,
3301
- Sn as c,
3292
+ zn as W,
3293
+ rn as a,
3294
+ dn as b,
3295
+ Mn as c,
3302
3296
  Se as d,
3303
- an as e,
3304
- kn as f,
3305
- vn as g,
3297
+ sn as e,
3298
+ Dn as f,
3299
+ Nn as g,
3306
3300
  Q as h,
3307
3301
  oe as i,
3308
3302
  Kt as j,
3309
3303
  ie as k,
3310
3304
  ne as l,
3311
- Nn as m,
3305
+ kn as m,
3312
3306
  se as n,
3313
3307
  kt as o,
3314
3308
  de as p,
@@ -3318,4 +3312,4 @@ export {
3318
3312
  Be as t,
3319
3313
  Pt as u
3320
3314
  };
3321
- //# sourceMappingURL=week-view-BvwBOdd6.js.map
3315
+ //# sourceMappingURL=week-view-DbktCaJh.js.map