@innosolutions/inno-calendar 1.0.47 → 1.0.49

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 (54) hide show
  1. package/dist/agenda-widget-B-AVTnqM.cjs +2 -0
  2. package/dist/agenda-widget-B-AVTnqM.cjs.map +1 -0
  3. package/dist/{agenda-widget-BiuoHkpP.js → agenda-widget-DhCPt2vI.js} +941 -929
  4. package/dist/agenda-widget-DhCPt2vI.js.map +1 -0
  5. package/dist/components/event/event-card.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 +11 -0
  9. package/dist/components/inno-calendar.d.ts.map +1 -1
  10. package/dist/core/context/inno-calendar-provider.d.ts +15 -1
  11. package/dist/core/context/inno-calendar-provider.d.ts.map +1 -1
  12. package/dist/core/index.cjs +1 -1
  13. package/dist/core/index.mjs +43 -43
  14. package/dist/core/types.d.ts +12 -0
  15. package/dist/core/types.d.ts.map +1 -1
  16. package/dist/index.cjs +1 -1
  17. package/dist/index.mjs +62 -62
  18. package/dist/presets/index.cjs +1 -1
  19. package/dist/presets/index.mjs +1 -1
  20. package/dist/slot-selection-context-BCsC7WT7.cjs +2 -0
  21. package/dist/slot-selection-context-BCsC7WT7.cjs.map +1 -0
  22. package/dist/slot-selection-context-D1495hEJ.js +595 -0
  23. package/dist/slot-selection-context-D1495hEJ.js.map +1 -0
  24. package/dist/{tailwind-calendar-7wDEMPEi.js → tailwind-calendar-BmJa4HhQ.js} +2 -2
  25. package/dist/{tailwind-calendar-7wDEMPEi.js.map → tailwind-calendar-BmJa4HhQ.js.map} +1 -1
  26. package/dist/{tailwind-calendar-QMXCp1an.cjs → tailwind-calendar-CJmOutn1.cjs} +2 -2
  27. package/dist/{tailwind-calendar-QMXCp1an.cjs.map → tailwind-calendar-CJmOutn1.cjs.map} +1 -1
  28. package/dist/use-calendar-BEuelmSu.cjs +2 -0
  29. package/dist/use-calendar-BEuelmSu.cjs.map +1 -0
  30. package/dist/use-calendar-Clo9DFK4.js +175 -0
  31. package/dist/use-calendar-Clo9DFK4.js.map +1 -0
  32. package/dist/{use-slot-selection-BJHlyfxL.js → use-slot-selection-BCZKnZSM.js} +2 -2
  33. package/dist/{use-slot-selection-BJHlyfxL.js.map → use-slot-selection-BCZKnZSM.js.map} +1 -1
  34. package/dist/{use-slot-selection-CTFC2-xS.cjs → use-slot-selection-Bwqwjiaq.cjs} +2 -2
  35. package/dist/{use-slot-selection-CTFC2-xS.cjs.map → use-slot-selection-Bwqwjiaq.cjs.map} +1 -1
  36. package/dist/week-view-D19YRBQC.cjs +11 -0
  37. package/dist/week-view-D19YRBQC.cjs.map +1 -0
  38. package/dist/{week-view-C4YFlrPS.js → week-view-aRPB2cjn.js} +922 -904
  39. package/dist/week-view-aRPB2cjn.js.map +1 -0
  40. package/package.json +1 -1
  41. package/dist/agenda-widget-BREvI5ia.cjs +0 -2
  42. package/dist/agenda-widget-BREvI5ia.cjs.map +0 -1
  43. package/dist/agenda-widget-BiuoHkpP.js.map +0 -1
  44. package/dist/slot-selection-context-Bx3FKJfR.cjs +0 -2
  45. package/dist/slot-selection-context-Bx3FKJfR.cjs.map +0 -1
  46. package/dist/slot-selection-context-D2eu2o-7.js +0 -203
  47. package/dist/slot-selection-context-D2eu2o-7.js.map +0 -1
  48. package/dist/use-calendar-DR2emWYC.js +0 -555
  49. package/dist/use-calendar-DR2emWYC.js.map +0 -1
  50. package/dist/use-calendar-DR89bZu5.cjs +0 -2
  51. package/dist/use-calendar-DR89bZu5.cjs.map +0 -1
  52. package/dist/week-view-C4YFlrPS.js.map +0 -1
  53. package/dist/week-view-DWLMtGVt.cjs +0 -11
  54. package/dist/week-view-DWLMtGVt.cjs.map +0 -1
@@ -1,19 +1,19 @@
1
- import { jsx as e, jsxs as r, Fragment as pt } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as r, Fragment as ft } from "react/jsx-runtime";
2
2
  import * as ee from "react";
3
- import { useState as J, useCallback as W, useRef as te, forwardRef as $e, createElement as Ae, useMemo as F, useLayoutEffect as Ie, useEffect as ze } from "react";
4
- import { c as d, a as ft } from "./index-DtaLkIY8.js";
5
- import * as V from "@radix-ui/react-dropdown-menu";
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 nt, calculateOverlappingPositions as rt, getVisibleHoursArray as ot, isWorkingHour as at, formatHourLabel as Ce, generateMonthGrid as bt, startOfDay as Ve, getWeekDays as wt } from "./utils.mjs";
7
- import { a as Re, b as Oe } from "./slot-selection-context-D2eu2o-7.js";
3
+ import { useState as Y, useEffect as be, useCallback as S, useRef as ne, forwardRef as Be, createElement as Ee, useMemo as q, useLayoutEffect as $e } from "react";
4
+ import { c, a as gt } from "./index-DtaLkIY8.js";
5
+ import * as K from "@radix-ui/react-dropdown-menu";
6
+ import { formatEventTimeDisplay as X, getEventsCountInView as xt, getRangeText as yt, groupEventsByDate as bt, isToday as ce, detectAllDayEvent as Ce, isSameDay as le, getEventsForDay as He, separateEventsByDuration as nt, calculateOverlappingPositions as rt, getVisibleHoursArray as ot, isWorkingHour as at, formatHourLabel as Se, generateMonthGrid as wt, startOfDay as Ve, getWeekDays as vt } from "./utils.mjs";
7
+ import { j as Re, k as it, l as Oe } from "./slot-selection-context-D1495hEJ.js";
8
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(
9
+ import * as we from "@radix-ui/react-tooltip";
10
+ const oe = pe.Root, ae = pe.Trigger, kn = pe.Anchor, Q = ee.forwardRef(({ className: t, align: n = "center", sideOffset: o = 4, ...a }, i) => /* @__PURE__ */ e(pe.Portal, { children: /* @__PURE__ */ e(
11
11
  pe.Content,
12
12
  {
13
13
  ref: i,
14
14
  align: n,
15
15
  sideOffset: o,
16
- className: d(
16
+ className: c(
17
17
  "z-50 w-72 rounded-xl border bg-white text-popover-foreground outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
18
18
  t
19
19
  ),
@@ -21,19 +21,19 @@ const re = pe.Root, oe = pe.Trigger, Nn = pe.Anchor, Q = ee.forwardRef(({ classN
21
21
  }
22
22
  ) }));
23
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,
24
+ const Dn = we.Provider, ie = we.Root, se = we.Trigger, re = ee.forwardRef(({ className: t, sideOffset: n = 4, ...o }, a) => /* @__PURE__ */ e(
25
+ we.Content,
26
26
  {
27
27
  ref: a,
28
28
  sideOffset: n,
29
- className: d(
29
+ className: c(
30
30
  "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
31
31
  t
32
32
  ),
33
33
  ...o
34
34
  }
35
35
  ));
36
- ne.displayName = be.Content.displayName;
36
+ re.displayName = we.Content.displayName;
37
37
  function de(t) {
38
38
  return {
39
39
  blue: {
@@ -118,11 +118,11 @@ function de(t) {
118
118
  }
119
119
  }[t ?? "blue"];
120
120
  }
121
- function it(t) {
121
+ function st(t) {
122
122
  const n = new Date(t);
123
123
  return n.setHours(0, 0, 0, 0), n;
124
124
  }
125
- function Se({
125
+ function Me({
126
126
  event: t,
127
127
  variant: n = "full",
128
128
  badgeVariant: o = "colored",
@@ -131,96 +131,105 @@ function Se({
131
131
  showTime: f = !0,
132
132
  showDescription: s = !1,
133
133
  showParticipants: x = !1,
134
- style: v,
134
+ style: N,
135
135
  disablePopover: l = !1,
136
136
  renderPopover: y,
137
137
  enableDrag: w = !1,
138
- enablePageTransition: m = !1,
138
+ enablePageTransition: h = !1,
139
139
  pageTransitionDuration: g = 400
140
140
  }) {
141
- const u = de(t.color), [b, N] = J(!1), [_, M] = J(!1), [L, O] = J(!1), [E, A] = J(null), S = te(null), I = Re(), B = t.endDate < it(/* @__PURE__ */ new Date()), $ = t.isCanceled ?? !1, q = w && I && !$ && !B, D = t.data, h = D?.meetingTookPlace ?? t.meetingTookPlace ?? !1, z = $ ? /* @__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 (!_) {
141
+ const u = de(t.color), [v, b] = Y(!1), [z, L] = Y(!1), [M, $] = Y(!1), [T, A] = Y(null), E = ne(null), B = Re(), W = it();
142
+ be(() => {
143
+ if (!l && W?.focusEventId && W.focusEventId === t.id) {
144
+ const P = setTimeout(() => {
145
+ b(!0), W.clearFocusEventId();
146
+ }, 300);
147
+ return () => clearTimeout(P);
148
+ }
149
+ }, [W?.focusEventId, t.id, l]);
150
+ const V = t.endDate < st(/* @__PURE__ */ new Date()), R = t.isCanceled ?? !1, D = w && B && !R && !V, m = t.data, _ = m?.meetingTookPlace ?? t.meetingTookPlace ?? !1, I = R ? /* @__PURE__ */ e(kt, { className: "h-3 w-3 text-zinc-800 dark:text-zinc-200" }) : _ ? /* @__PURE__ */ e(Nt, { className: c("h-3 w-3", u.text) }) : null, G = t.scheduleTypeName || m?.scheduleTypeName || m?.typeName, k = m?.productName, d = m?.nrParticipant, p = m?.siteName, C = m?.siteCity, O = [p, C].filter(Boolean).join(", "), j = S(() => {
151
+ if (!z) {
143
152
  if (l && a) {
144
153
  a(t);
145
154
  return;
146
155
  }
147
- if (m && S.current) {
148
- const U = S.current.getBoundingClientRect();
149
- A(U), O(!0);
150
- } else l || N(!0);
156
+ if (h && E.current) {
157
+ const P = E.current.getBoundingClientRect();
158
+ A(P), $(!0);
159
+ } else l || b(!0);
151
160
  }
152
- }, [_, l, a, t, m]);
153
- W(() => {
154
- O(!1), A(null), l || N(!0);
161
+ }, [z, l, a, t, h]);
162
+ S(() => {
163
+ $(!1), A(null), l || b(!0);
155
164
  }, [l]);
156
- const T = W(() => {
157
- N(!1);
158
- }, []), Y = W(
159
- (U) => {
160
- q && (U.dataTransfer.effectAllowed = "move", U.dataTransfer.setData("text/plain", t.id), M(!0), I?.startDrag?.(t));
165
+ const H = S(() => {
166
+ b(!1);
167
+ }, []), F = S(
168
+ (P) => {
169
+ D && (P.dataTransfer.effectAllowed = "move", P.dataTransfer.setData("text/plain", t.id), L(!0), B?.startDrag?.(t));
161
170
  },
162
- [q, t, I]
163
- ), j = W(() => {
164
- M(!1), I?.isDragging && I.endDrag?.();
165
- }, [I]);
171
+ [D, t, B]
172
+ ), U = S(() => {
173
+ L(!1), B?.isDragging && B.endDrag?.();
174
+ }, [B]);
166
175
  if (n === "dot") {
167
- const U = /* @__PURE__ */ e(
176
+ const P = /* @__PURE__ */ e(
168
177
  "button",
169
178
  {
170
179
  type: "button",
171
- onClick: H,
172
- className: d(
180
+ onClick: j,
181
+ className: c(
173
182
  "size-2 rounded-full cursor-pointer transition-opacity",
174
183
  u.dot,
175
184
  t.isCanceled && "opacity-50",
176
185
  i
177
186
  ),
178
- style: v,
187
+ style: N,
179
188
  "aria-label": t.title
180
189
  }
181
190
  );
182
191
  return l ? /* @__PURE__ */ r(ie, { children: [
183
- /* @__PURE__ */ e(se, { asChild: !0, children: U }),
184
- /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
192
+ /* @__PURE__ */ e(se, { asChild: !0, children: P }),
193
+ /* @__PURE__ */ e(re, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
185
194
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
186
195
  /* @__PURE__ */ e("div", { className: "text-xs opacity-80", children: X(t) })
187
196
  ] }) })
188
- ] }) : /* @__PURE__ */ r(re, { open: b, onOpenChange: N, children: [
189
- /* @__PURE__ */ e(oe, { asChild: !0, children: /* @__PURE__ */ r(ie, { children: [
190
- /* @__PURE__ */ e(se, { asChild: !0, children: U }),
191
- /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }) })
197
+ ] }) : /* @__PURE__ */ r(oe, { open: v, onOpenChange: b, children: [
198
+ /* @__PURE__ */ e(ae, { asChild: !0, children: /* @__PURE__ */ r(ie, { children: [
199
+ /* @__PURE__ */ e(se, { asChild: !0, children: P }),
200
+ /* @__PURE__ */ e(re, { children: /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }) })
192
201
  ] }) }),
193
- /* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: T }) : /* @__PURE__ */ e(ye, { event: t, onClose: T }) })
202
+ /* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: H }) : /* @__PURE__ */ e(ye, { event: t, onClose: H }) })
194
203
  ] });
195
204
  }
196
205
  if (n === "compact") {
197
- const U = /* @__PURE__ */ r(
206
+ const P = /* @__PURE__ */ r(
198
207
  "div",
199
208
  {
200
209
  role: "button",
201
210
  tabIndex: 0,
202
- draggable: !!q,
203
- onDragStart: Y,
204
- onDragEnd: j,
205
- onClick: l ? H : void 0,
206
- onKeyDown: (K) => {
207
- (K.key === "Enter" || K.key === " ") && (K.preventDefault(), H());
211
+ draggable: !!D,
212
+ onDragStart: F,
213
+ onDragEnd: U,
214
+ onClick: l ? j : void 0,
215
+ onKeyDown: (J) => {
216
+ (J.key === "Enter" || J.key === " ") && (J.preventDefault(), j());
208
217
  },
209
- className: d(
218
+ className: c(
210
219
  "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
- q ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
212
- _ && "opacity-50",
220
+ D ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
221
+ z && "opacity-50",
213
222
  // Cancelled events get gray background with strikethrough
214
- $ ? "bg-zinc-100 dark:bg-zinc-800 text-zinc-500 dark:text-zinc-400 line-through" : [
223
+ R ? "bg-zinc-100 dark:bg-zinc-800 text-zinc-500 dark:text-zinc-400 line-through" : [
215
224
  o === "colored" && [u.bg, u.text],
216
225
  o === "mixed" && [u.bg, u.text],
217
226
  o === "dot" && "bg-muted/50"
218
227
  ],
219
228
  i
220
229
  ),
221
- style: v,
230
+ style: N,
222
231
  children: [
223
- ["dot", "mixed"].includes(o) && !$ && /* @__PURE__ */ e(
232
+ ["dot", "mixed"].includes(o) && !R && /* @__PURE__ */ e(
224
233
  "svg",
225
234
  {
226
235
  width: "8",
@@ -252,7 +261,7 @@ function Se({
252
261
  /* @__PURE__ */ e(
253
262
  "div",
254
263
  {
255
- className: d(
264
+ className: c(
256
265
  "w-fit mt-0.5 text-[10px] px-1 py-0.5 border border-dashed rounded-full font-medium",
257
266
  u.border
258
267
  ),
@@ -260,32 +269,32 @@ function Se({
260
269
  }
261
270
  )
262
271
  ] }) }),
263
- /* @__PURE__ */ e("div", { className: "flex gap-0.5", children: z })
272
+ /* @__PURE__ */ e("div", { className: "flex gap-0.5", children: I })
264
273
  ]
265
274
  }
266
275
  );
267
276
  return l ? /* @__PURE__ */ r(ie, { children: [
268
- /* @__PURE__ */ e(se, { asChild: !0, children: U }),
269
- /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
277
+ /* @__PURE__ */ e(se, { asChild: !0, children: P }),
278
+ /* @__PURE__ */ e(re, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
270
279
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
271
280
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t) })
272
281
  ] }) })
273
- ] }) : /* @__PURE__ */ r(re, { open: b, onOpenChange: N, children: [
274
- /* @__PURE__ */ e(oe, { asChild: !0, children: U }),
275
- /* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: T }) : /* @__PURE__ */ e(ye, { event: t, onClose: T }) })
282
+ ] }) : /* @__PURE__ */ r(oe, { open: v, onOpenChange: b, children: [
283
+ /* @__PURE__ */ e(ae, { asChild: !0, children: P }),
284
+ /* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: H }) : /* @__PURE__ */ e(ye, { event: t, onClose: H }) })
276
285
  ] });
277
286
  }
278
- const G = /* @__PURE__ */ r(
287
+ const te = /* @__PURE__ */ r(
279
288
  "button",
280
289
  {
281
290
  type: "button",
282
- onClick: H,
283
- className: d(
291
+ onClick: j,
292
+ className: c(
284
293
  "group relative flex w-full flex-col gap-1 rounded-md border-l-[3px] px-2 py-1.5 text-left transition-all",
285
294
  "shadow-[0_1px_3px_rgba(0,0,0,0.08)] hover:shadow-[0_2px_6px_rgba(0,0,0,0.12)]",
286
295
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
287
296
  // Cancelled events get gray background with strikethrough
288
- $ ? "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" : [
297
+ R ? "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" : [
289
298
  o === "colored" && [
290
299
  u.bg,
291
300
  u.accentBorder,
@@ -300,11 +309,11 @@ function Se({
300
309
  ],
301
310
  i
302
311
  ),
303
- style: v,
312
+ style: N,
304
313
  children: [
305
314
  /* @__PURE__ */ r("div", { className: "flex items-start justify-between gap-1", children: [
306
315
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 min-w-0", children: [
307
- ["dot", "mixed"].includes(o) && !$ && /* @__PURE__ */ e(
316
+ ["dot", "mixed"].includes(o) && !R && /* @__PURE__ */ e(
308
317
  "svg",
309
318
  {
310
319
  width: "8",
@@ -319,58 +328,58 @@ function Se({
319
328
  /* @__PURE__ */ r(
320
329
  "span",
321
330
  {
322
- className: d(
331
+ className: c(
323
332
  "text-sm font-medium truncate",
324
- !$ && o !== "dot" && u.text,
325
- $ && "line-through"
333
+ !R && o !== "dot" && u.text,
334
+ R && "line-through"
326
335
  ),
327
336
  children: [
328
337
  t.title,
329
- R && /* @__PURE__ */ r("span", { className: "font-normal opacity-75", children: [
338
+ G && /* @__PURE__ */ r("span", { className: "font-normal opacity-75", children: [
330
339
  " ",
331
340
  "- ",
332
- R
341
+ G
333
342
  ] })
334
343
  ]
335
344
  }
336
345
  )
337
346
  ] }),
338
- z
347
+ I
339
348
  ] }),
340
- P && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: P }),
341
- k != null && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
342
- /* @__PURE__ */ e(Ee, { className: "h-3 w-3 shrink-0" }),
349
+ k && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: k }),
350
+ d != null && d > 0 && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
351
+ /* @__PURE__ */ e(ze, { className: "h-3 w-3 shrink-0" }),
343
352
  /* @__PURE__ */ r("span", { children: [
344
- k,
353
+ d,
345
354
  " participant",
346
- k !== 1 ? "s" : ""
355
+ d !== 1 ? "s" : ""
347
356
  ] })
348
357
  ] }),
349
358
  f && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
350
359
  /* @__PURE__ */ e(je, { className: "h-3 w-3 shrink-0" }),
351
360
  /* @__PURE__ */ e("span", { children: X(t) })
352
361
  ] }),
353
- C && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
354
- /* @__PURE__ */ e(st, { className: "h-3 w-3 shrink-0" }),
355
- /* @__PURE__ */ e("span", { className: "truncate", children: C })
362
+ O && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
363
+ /* @__PURE__ */ e(lt, { className: "h-3 w-3 shrink-0" }),
364
+ /* @__PURE__ */ e("span", { className: "truncate", children: O })
356
365
  ] }),
357
366
  s && t.description && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground line-clamp-2", children: t.description }),
358
367
  x && t.participants && t.participants.length > 0 && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
359
- /* @__PURE__ */ e(Ee, { className: "h-3 w-3 shrink-0" }),
360
- /* @__PURE__ */ e("span", { className: "truncate", children: t.participants.map((U) => U.name).join(", ") })
368
+ /* @__PURE__ */ e(ze, { className: "h-3 w-3 shrink-0" }),
369
+ /* @__PURE__ */ e("span", { className: "truncate", children: t.participants.map((P) => P.name).join(", ") })
361
370
  ] })
362
371
  ]
363
372
  }
364
373
  );
365
374
  return l ? /* @__PURE__ */ r(ie, { children: [
366
- /* @__PURE__ */ e(se, { asChild: !0, children: G }),
367
- /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
375
+ /* @__PURE__ */ e(se, { asChild: !0, children: te }),
376
+ /* @__PURE__ */ e(re, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
368
377
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
369
378
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t) })
370
379
  ] }) })
371
- ] }) : /* @__PURE__ */ r(re, { open: b, onOpenChange: N, children: [
372
- /* @__PURE__ */ e(oe, { asChild: !0, children: G }),
373
- /* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: T }) : /* @__PURE__ */ e(ye, { event: t, onClose: T }) })
380
+ ] }) : /* @__PURE__ */ r(oe, { open: v, onOpenChange: b, children: [
381
+ /* @__PURE__ */ e(ae, { asChild: !0, children: te }),
382
+ /* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: H }) : /* @__PURE__ */ e(ye, { event: t, onClose: H }) })
374
383
  ] });
375
384
  }
376
385
  function je({ className: t }) {
@@ -392,7 +401,7 @@ function je({ className: t }) {
392
401
  }
393
402
  );
394
403
  }
395
- function vt({ className: t }) {
404
+ function Nt({ className: t }) {
396
405
  return /* @__PURE__ */ e(
397
406
  "svg",
398
407
  {
@@ -408,7 +417,7 @@ function vt({ className: t }) {
408
417
  }
409
418
  );
410
419
  }
411
- function Nt({ className: t }) {
420
+ function kt({ className: t }) {
412
421
  return /* @__PURE__ */ r(
413
422
  "svg",
414
423
  {
@@ -427,7 +436,7 @@ function Nt({ className: t }) {
427
436
  }
428
437
  );
429
438
  }
430
- function Ee({ className: t }) {
439
+ function ze({ className: t }) {
431
440
  return /* @__PURE__ */ r(
432
441
  "svg",
433
442
  {
@@ -448,7 +457,7 @@ function Ee({ className: t }) {
448
457
  }
449
458
  );
450
459
  }
451
- function st({ className: t }) {
460
+ function lt({ className: t }) {
452
461
  return /* @__PURE__ */ r(
453
462
  "svg",
454
463
  {
@@ -474,12 +483,12 @@ function ye({
474
483
  const o = de(t.color), a = t.isCanceled ?? !1;
475
484
  return /* @__PURE__ */ r("div", { className: "space-y-3", children: [
476
485
  /* @__PURE__ */ r("div", { className: "flex items-start gap-3", children: [
477
- /* @__PURE__ */ e("div", { className: d("size-4 rounded shrink-0 mt-0.5", o.dot) }),
486
+ /* @__PURE__ */ e("div", { className: c("size-4 rounded shrink-0 mt-0.5", o.dot) }),
478
487
  /* @__PURE__ */ r("div", { className: "flex-1 min-w-0", children: [
479
488
  /* @__PURE__ */ e(
480
489
  "h3",
481
490
  {
482
- className: d(
491
+ className: c(
483
492
  "font-semibold text-lg",
484
493
  a && "line-through opacity-50"
485
494
  ),
@@ -509,7 +518,7 @@ function ye({
509
518
  ) })
510
519
  ] });
511
520
  }
512
- function lt({
521
+ function dt({
513
522
  event: t,
514
523
  position: n,
515
524
  hourHeight: o = 96,
@@ -518,64 +527,73 @@ function lt({
518
527
  className: f,
519
528
  disablePopover: s = !1,
520
529
  renderPopover: x,
521
- enableDrag: v = !0
530
+ enableDrag: N = !0
522
531
  }) {
523
- const l = de(t.color), [y, w] = J(!1), [m, g] = J(!1), u = Re(), b = (t.endDate.getTime() - t.startDate.getTime()) / (1e3 * 60), N = b / 60 * o - 8, _ = t.endDate < it(/* @__PURE__ */ new Date()), M = t.isCanceled ?? !1, L = v && u && !M && !_, O = b < 35, E = b > 25, A = b >= 45, S = t.data, I = t.scheduleTypeName || S?.scheduleTypeName || S?.typeName, B = S?.productName, $ = S?.nrParticipant, q = S?.siteName, D = S?.siteCity, h = [q, D].filter(Boolean).join(", "), z = a === "dot", R = W(() => {
524
- m || (s && i ? i(t) : s || w(!0));
525
- }, [m, s, i, t]), P = W(() => {
532
+ const l = de(t.color), [y, w] = Y(!1), [h, g] = Y(!1), u = Re(), v = it();
533
+ be(() => {
534
+ if (!s && v?.focusEventId && v.focusEventId === t.id) {
535
+ const H = setTimeout(() => {
536
+ w(!0), v.clearFocusEventId();
537
+ }, 300);
538
+ return () => clearTimeout(H);
539
+ }
540
+ }, [v?.focusEventId, t.id, s]);
541
+ const b = (t.endDate.getTime() - t.startDate.getTime()) / (1e3 * 60), z = b / 60 * o - 8, L = t.endDate < st(/* @__PURE__ */ new Date()), M = t.isCanceled ?? !1, $ = N && u && !M && !L, T = b < 35, A = b > 25, E = b >= 45, B = t.data, W = t.scheduleTypeName || B?.scheduleTypeName || B?.typeName, V = B?.productName, R = B?.nrParticipant, D = B?.siteName, m = B?.siteCity, _ = [D, m].filter(Boolean).join(", "), I = a === "dot", G = S(() => {
542
+ h || (s && i ? i(t) : s || w(!0));
543
+ }, [h, s, i, t]), k = S(() => {
526
544
  w(!1);
527
- }, []), k = W(
528
- (T) => {
529
- if (!L) return;
530
- T.dataTransfer.effectAllowed = "move", T.dataTransfer.setData("text/plain", t.id);
531
- const Y = T.currentTarget, j = Y.getBoundingClientRect();
532
- T.dataTransfer.setDragImage(
533
- Y,
534
- T.clientX - j.left,
535
- T.clientY - j.top
545
+ }, []), d = S(
546
+ (H) => {
547
+ if (!$) return;
548
+ H.dataTransfer.effectAllowed = "move", H.dataTransfer.setData("text/plain", t.id);
549
+ const F = H.currentTarget, U = F.getBoundingClientRect();
550
+ H.dataTransfer.setDragImage(
551
+ F,
552
+ H.clientX - U.left,
553
+ H.clientY - U.top
536
554
  ), g(!0), u?.startDrag?.(t);
537
555
  },
538
- [L, t, u]
539
- ), c = W(() => {
556
+ [$, t, u]
557
+ ), p = S(() => {
540
558
  g(!1), u?.isDragging && u.endDrag?.();
541
- }, [u]), p = W(
542
- (T) => {
543
- (T.key === "Enter" || T.key === " ") && (T.preventDefault(), R());
559
+ }, [u]), C = S(
560
+ (H) => {
561
+ (H.key === "Enter" || H.key === " ") && (H.preventDefault(), G());
544
562
  },
545
- [R]
546
- ), C = /* @__PURE__ */ r(
563
+ [G]
564
+ ), O = /* @__PURE__ */ r(
547
565
  "div",
548
566
  {
549
567
  role: "button",
550
568
  tabIndex: 0,
551
- draggable: !!L,
552
- onDragStart: k,
553
- onDragEnd: c,
554
- onKeyDown: p,
555
- onClick: m ? void 0 : R,
556
- className: d(
569
+ draggable: !!$,
570
+ onDragStart: d,
571
+ onDragEnd: p,
572
+ onKeyDown: C,
573
+ onClick: h ? void 0 : G,
574
+ className: c(
557
575
  "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",
558
576
  "shadow-[0_1px_3px_rgba(0,0,0,0.08)] hover:shadow-[0_2px_6px_rgba(0,0,0,0.12)]",
559
577
  "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
560
578
  "transition-all",
561
- L ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
562
- m && "opacity-50",
579
+ $ ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
580
+ h && "opacity-50",
563
581
  // Cancelled events get gray background with strikethrough
564
582
  M ? "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" : [
565
583
  // Colored/mixed variants
566
- !z && [
584
+ !I && [
567
585
  l.bg,
568
586
  l.accentBorder,
569
587
  l.text
570
588
  ],
571
589
  // Dot variant - neutral background
572
- z && "bg-neutral-50 dark:bg-neutral-900 border-l-neutral-400 dark:border-l-neutral-600"
590
+ I && "bg-neutral-50 dark:bg-neutral-900 border-l-neutral-400 dark:border-l-neutral-600"
573
591
  ],
574
592
  // Short events center content
575
- O && "py-0 justify-center",
593
+ T && "py-0 justify-center",
576
594
  f
577
595
  ),
578
- style: { height: `${Math.max(N, 20)}px` },
596
+ style: { height: `${Math.max(z, 20)}px` },
579
597
  children: [
580
598
  /* @__PURE__ */ r("div", { className: "flex items-start gap-1.5 min-w-0", children: [
581
599
  ["mixed", "dot"].includes(a) && !M && /* @__PURE__ */ e(
@@ -593,54 +611,54 @@ function lt({
593
611
  /* @__PURE__ */ e("div", { className: "flex-1 min-w-0 overflow-hidden", children: /* @__PURE__ */ r(
594
612
  "p",
595
613
  {
596
- className: d(
614
+ className: c(
597
615
  "font-semibold truncate leading-tight",
598
- !M && z && "text-foreground"
616
+ !M && I && "text-foreground"
599
617
  ),
600
618
  children: [
601
619
  t.title,
602
- I && /* @__PURE__ */ r("span", { className: "font-normal opacity-75", children: [
620
+ W && /* @__PURE__ */ r("span", { className: "font-normal opacity-75", children: [
603
621
  " ",
604
622
  "- ",
605
- I
623
+ W
606
624
  ] })
607
625
  ]
608
626
  }
609
627
  ) })
610
628
  ] }),
611
- A && B && /* @__PURE__ */ e(
629
+ E && V && /* @__PURE__ */ e(
612
630
  "p",
613
631
  {
614
- className: d(
632
+ className: c(
615
633
  "text-[11px] truncate leading-tight",
616
- z ? "text-muted-foreground" : "opacity-80"
634
+ I ? "text-muted-foreground" : "opacity-80"
617
635
  ),
618
- children: B
636
+ children: V
619
637
  }
620
638
  ),
621
- A && $ != null && /* @__PURE__ */ r(
639
+ R != null && R > 0 && /* @__PURE__ */ r(
622
640
  "div",
623
641
  {
624
- className: d(
642
+ className: c(
625
643
  "flex items-center gap-1 text-[11px] leading-tight",
626
- z ? "text-muted-foreground" : "opacity-80"
644
+ I ? "text-muted-foreground" : "opacity-80"
627
645
  ),
628
646
  children: [
629
- /* @__PURE__ */ e(Ee, { className: "h-3 w-3 shrink-0" }),
647
+ /* @__PURE__ */ e(ze, { className: "h-3 w-3 shrink-0" }),
630
648
  /* @__PURE__ */ r("span", { children: [
631
- $,
649
+ R,
632
650
  " participant",
633
- $ !== 1 ? "s" : ""
651
+ R !== 1 ? "s" : ""
634
652
  ] })
635
653
  ]
636
654
  }
637
655
  ),
638
- E && /* @__PURE__ */ r(
656
+ A && /* @__PURE__ */ r(
639
657
  "div",
640
658
  {
641
- className: d(
659
+ className: c(
642
660
  "flex items-center gap-1 text-[11px] tabular-nums leading-tight",
643
- z ? "text-muted-foreground" : "opacity-90"
661
+ I ? "text-muted-foreground" : "opacity-90"
644
662
  ),
645
663
  children: [
646
664
  /* @__PURE__ */ e(je, { className: "h-3 w-3 shrink-0" }),
@@ -648,38 +666,38 @@ function lt({
648
666
  ]
649
667
  }
650
668
  ),
651
- A && h && /* @__PURE__ */ r(
669
+ E && _ && /* @__PURE__ */ r(
652
670
  "div",
653
671
  {
654
- className: d(
672
+ className: c(
655
673
  "flex items-center gap-1 text-[11px] truncate leading-tight",
656
- z ? "text-muted-foreground" : "opacity-80"
674
+ I ? "text-muted-foreground" : "opacity-80"
657
675
  ),
658
676
  children: [
659
- /* @__PURE__ */ e(st, { className: "h-3 w-3 shrink-0" }),
660
- /* @__PURE__ */ e("span", { className: "truncate", children: h })
677
+ /* @__PURE__ */ e(lt, { className: "h-3 w-3 shrink-0" }),
678
+ /* @__PURE__ */ e("span", { className: "truncate", children: _ })
661
679
  ]
662
680
  }
663
681
  )
664
682
  ]
665
683
  }
666
- ), H = /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
684
+ ), j = /* @__PURE__ */ e(re, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
667
685
  /* @__PURE__ */ r("div", { className: "font-medium", children: [
668
686
  t.title,
669
- I && /* @__PURE__ */ r("span", { className: "font-normal opacity-75", children: [
687
+ W && /* @__PURE__ */ r("span", { className: "font-normal opacity-75", children: [
670
688
  " ",
671
689
  "- ",
672
- I
690
+ W
673
691
  ] })
674
692
  ] }),
675
- B && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: B }),
676
- $ != null && /* @__PURE__ */ r("div", { className: "text-xs text-muted-foreground", children: [
677
- $,
693
+ V && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: V }),
694
+ R != null && /* @__PURE__ */ r("div", { className: "text-xs text-muted-foreground", children: [
695
+ R,
678
696
  " participant",
679
- $ !== 1 ? "s" : ""
697
+ R !== 1 ? "s" : ""
680
698
  ] }),
681
699
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t) }),
682
- h && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: h })
700
+ _ && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: _ })
683
701
  ] }) });
684
702
  return s ? /* @__PURE__ */ e(
685
703
  "div",
@@ -692,8 +710,8 @@ function lt({
692
710
  minWidth: n.minWidth ? `${n.minWidth}px` : void 0
693
711
  },
694
712
  children: /* @__PURE__ */ r(ie, { children: [
695
- /* @__PURE__ */ e(se, { asChild: !0, children: C }),
696
- H
713
+ /* @__PURE__ */ e(se, { asChild: !0, children: O }),
714
+ j
697
715
  ] })
698
716
  }
699
717
  ) : /* @__PURE__ */ e(
@@ -706,14 +724,14 @@ function lt({
706
724
  width: n.minWidth ? `max(${n.minWidth}px, ${n.width}%)` : `${n.width}%`,
707
725
  minWidth: n.minWidth ? `${n.minWidth}px` : void 0
708
726
  },
709
- children: /* @__PURE__ */ r(re, { open: y, onOpenChange: w, children: [
710
- /* @__PURE__ */ e(oe, { asChild: !0, children: C }),
711
- /* @__PURE__ */ e(Q, { className: "w-80", children: x ? x({ event: t, onClose: P }) : /* @__PURE__ */ e(ye, { event: t, onClose: P }) })
727
+ children: /* @__PURE__ */ r(oe, { open: y, onOpenChange: w, children: [
728
+ /* @__PURE__ */ e(ae, { asChild: !0, children: O }),
729
+ /* @__PURE__ */ e(Q, { className: "w-80", children: x ? x({ event: t, onClose: k }) : /* @__PURE__ */ e(ye, { event: t, onClose: k }) })
712
730
  ] })
713
731
  }
714
732
  );
715
733
  }
716
- function Dn({
734
+ function Cn({
717
735
  event: t,
718
736
  spanDays: n,
719
737
  isStart: o,
@@ -723,19 +741,19 @@ function Dn({
723
741
  disablePopover: s = !1,
724
742
  renderPopover: x
725
743
  }) {
726
- const v = de(t.color), [l, y] = J(!1), w = t.isCanceled ?? !1, m = W(() => {
744
+ const N = de(t.color), [l, y] = Y(!1), w = t.isCanceled ?? !1, h = S(() => {
727
745
  s && i ? i(t) : s || y(!0);
728
- }, [s, i, t]), g = W(() => {
746
+ }, [s, i, t]), g = S(() => {
729
747
  y(!1);
730
748
  }, []), u = /* @__PURE__ */ e(
731
749
  "button",
732
750
  {
733
751
  type: "button",
734
- onClick: m,
735
- className: d(
752
+ onClick: h,
753
+ className: c(
736
754
  "flex h-5 items-center px-1.5 text-xs font-medium transition-opacity hover:opacity-80",
737
755
  // Cancelled events get gray background with strikethrough
738
- w ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [v.dot, "text-white"],
756
+ w ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [N.dot, "text-white"],
739
757
  o && "rounded-l",
740
758
  a && "rounded-r",
741
759
  !o && "border-l-0",
@@ -745,15 +763,15 @@ function Dn({
745
763
  style: { width: `${n * 100}%` },
746
764
  children: o && /* @__PURE__ */ e("span", { className: "truncate", children: t.title })
747
765
  }
748
- ), b = /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
766
+ ), v = /* @__PURE__ */ e(re, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
749
767
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
750
768
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t) })
751
769
  ] }) });
752
770
  return s ? /* @__PURE__ */ r(ie, { children: [
753
771
  /* @__PURE__ */ e(se, { asChild: !0, children: u }),
754
- b
755
- ] }) : /* @__PURE__ */ r(re, { open: l, onOpenChange: y, children: [
756
- /* @__PURE__ */ e(oe, { asChild: !0, children: u }),
772
+ v
773
+ ] }) : /* @__PURE__ */ r(oe, { open: l, onOpenChange: y, children: [
774
+ /* @__PURE__ */ e(ae, { asChild: !0, children: u }),
757
775
  /* @__PURE__ */ e(Q, { className: "w-80", children: x ? x({ event: t, onClose: g }) : /* @__PURE__ */ e(ye, { event: t, onClose: g }) })
758
776
  ] });
759
777
  }
@@ -770,36 +788,36 @@ if (typeof window < "u" && !document.getElementById("inno-calendar-event-marquee
770
788
  }
771
789
  `, document.head.appendChild(t);
772
790
  }
773
- const Ge = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Ue = ft, dt = (t, n) => (o) => {
791
+ const Ge = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Ue = gt, ct = (t, n) => (o) => {
774
792
  var a;
775
793
  if (n?.variants == null) return Ue(t, o?.class, o?.className);
776
794
  const { variants: i, defaultVariants: f } = n, s = Object.keys(i).map((l) => {
777
795
  const y = o?.[l], w = f?.[l];
778
796
  if (y === null) return null;
779
- const m = Ge(y) || Ge(w);
780
- return i[l][m];
797
+ const h = Ge(y) || Ge(w);
798
+ return i[l][h];
781
799
  }), x = o && Object.entries(o).reduce((l, y) => {
782
- let [w, m] = y;
783
- return m === void 0 || (l[w] = m), l;
784
- }, {}), v = n == null || (a = n.compoundVariants) === null || a === void 0 ? void 0 : a.reduce((l, y) => {
785
- let { class: w, className: m, ...g } = y;
800
+ let [w, h] = y;
801
+ return h === void 0 || (l[w] = h), l;
802
+ }, {}), N = n == null || (a = n.compoundVariants) === null || a === void 0 ? void 0 : a.reduce((l, y) => {
803
+ let { class: w, className: h, ...g } = y;
786
804
  return Object.entries(g).every((u) => {
787
- let [b, N] = u;
788
- return Array.isArray(N) ? N.includes({
805
+ let [v, b] = u;
806
+ return Array.isArray(b) ? b.includes({
789
807
  ...f,
790
808
  ...x
791
- }[b]) : {
809
+ }[v]) : {
792
810
  ...f,
793
811
  ...x
794
- }[b] === N;
812
+ }[v] === b;
795
813
  }) ? [
796
814
  ...l,
797
815
  w,
798
- m
816
+ h
799
817
  ] : l;
800
818
  }, []);
801
- return Ue(t, s, v, o?.class, o?.className);
802
- }, kt = dt(
819
+ return Ue(t, s, N, o?.class, o?.className);
820
+ }, Dt = ct(
803
821
  "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",
804
822
  {
805
823
  variants: {
@@ -823,11 +841,11 @@ const Ge = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Ue = ft, d
823
841
  size: "default"
824
842
  }
825
843
  }
826
- ), me = $e(
844
+ ), me = Be(
827
845
  ({ className: t, variant: n, size: o, loading: a, disabled: i, children: f, ...s }, x) => /* @__PURE__ */ r(
828
846
  "button",
829
847
  {
830
- className: d(kt({ variant: n, size: o, className: t })),
848
+ className: c(Dt({ variant: n, size: o, className: t })),
831
849
  ref: x,
832
850
  disabled: i || a,
833
851
  ...s,
@@ -868,17 +886,17 @@ const Ge = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Ue = ft, d
868
886
  )
869
887
  );
870
888
  me.displayName = "Button";
871
- const ct = (...t) => t.filter((n, o, a) => !!n && n.trim() !== "" && a.indexOf(n) === o).join(" ").trim();
872
- const Dt = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
873
- const Ct = (t) => t.replace(
889
+ const ut = (...t) => t.filter((n, o, a) => !!n && n.trim() !== "" && a.indexOf(n) === o).join(" ").trim();
890
+ const Ct = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
891
+ const St = (t) => t.replace(
874
892
  /^([A-Z])|[\s-_]+(\w)/g,
875
893
  (n, o, a) => a ? a.toUpperCase() : o.toLowerCase()
876
894
  );
877
895
  const qe = (t) => {
878
- const n = Ct(t);
896
+ const n = St(t);
879
897
  return n.charAt(0).toUpperCase() + n.slice(1);
880
898
  };
881
- var St = {
899
+ var Mt = {
882
900
  xmlns: "http://www.w3.org/2000/svg",
883
901
  width: 24,
884
902
  height: 24,
@@ -889,13 +907,13 @@ var St = {
889
907
  strokeLinecap: "round",
890
908
  strokeLinejoin: "round"
891
909
  };
892
- const Mt = (t) => {
910
+ const Tt = (t) => {
893
911
  for (const n in t)
894
912
  if (n.startsWith("aria-") || n === "role" || n === "title")
895
913
  return !0;
896
914
  return !1;
897
915
  };
898
- const Tt = $e(
916
+ const Wt = Be(
899
917
  ({
900
918
  color: t = "currentColor",
901
919
  size: n = 24,
@@ -905,32 +923,32 @@ const Tt = $e(
905
923
  children: f,
906
924
  iconNode: s,
907
925
  ...x
908
- }, v) => Ae(
926
+ }, N) => Ee(
909
927
  "svg",
910
928
  {
911
- ref: v,
912
- ...St,
929
+ ref: N,
930
+ ...Mt,
913
931
  width: n,
914
932
  height: n,
915
933
  stroke: t,
916
934
  strokeWidth: a ? Number(o) * 24 / Number(n) : o,
917
- className: ct("lucide", i),
918
- ...!f && !Mt(x) && { "aria-hidden": "true" },
935
+ className: ut("lucide", i),
936
+ ...!f && !Tt(x) && { "aria-hidden": "true" },
919
937
  ...x
920
938
  },
921
939
  [
922
- ...s.map(([l, y]) => Ae(l, y)),
940
+ ...s.map(([l, y]) => Ee(l, y)),
923
941
  ...Array.isArray(f) ? f : [f]
924
942
  ]
925
943
  )
926
944
  );
927
945
  const Pe = (t, n) => {
928
- const o = $e(
929
- ({ className: a, ...i }, f) => Ae(Tt, {
946
+ const o = Be(
947
+ ({ className: a, ...i }, f) => Ee(Wt, {
930
948
  ref: f,
931
949
  iconNode: n,
932
- className: ct(
933
- `lucide-${Dt(qe(t))}`,
950
+ className: ut(
951
+ `lucide-${Ct(qe(t))}`,
934
952
  `lucide-${t}`,
935
953
  a
936
954
  ),
@@ -939,13 +957,13 @@ const Pe = (t, n) => {
939
957
  );
940
958
  return o.displayName = qe(t), o;
941
959
  };
942
- const Wt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], Lt = Pe("check", Wt);
943
- const At = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], zt = Pe("chevron-right", At);
944
- const Et = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], _t = Pe("circle", Et), Ke = V.Root, Xe = V.Trigger, Bt = ee.forwardRef(({ className: t, inset: n, children: o, ...a }, i) => /* @__PURE__ */ r(
945
- V.SubTrigger,
960
+ const Lt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], At = Pe("check", Lt);
961
+ const Et = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], zt = Pe("chevron-right", Et);
962
+ const _t = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], It = Pe("circle", _t), Ke = K.Root, Xe = K.Trigger, Bt = ee.forwardRef(({ className: t, inset: n, children: o, ...a }, i) => /* @__PURE__ */ r(
963
+ K.SubTrigger,
946
964
  {
947
965
  ref: i,
948
- className: d(
966
+ className: c(
949
967
  "flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
950
968
  n && "pl-8",
951
969
  t
@@ -957,37 +975,37 @@ const Et = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], _t = Pe
957
975
  ]
958
976
  }
959
977
  ));
960
- Bt.displayName = V.SubTrigger.displayName;
978
+ Bt.displayName = K.SubTrigger.displayName;
961
979
  const $t = ee.forwardRef(({ className: t, ...n }, o) => /* @__PURE__ */ e(
962
- V.SubContent,
980
+ K.SubContent,
963
981
  {
964
982
  ref: o,
965
- className: d(
983
+ className: c(
966
984
  "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
967
985
  t
968
986
  ),
969
987
  ...n
970
988
  }
971
989
  ));
972
- $t.displayName = V.SubContent.displayName;
973
- const _e = ee.forwardRef(({ className: t, sideOffset: n = 4, ...o }, a) => /* @__PURE__ */ e(V.Portal, { children: /* @__PURE__ */ e(
974
- V.Content,
990
+ $t.displayName = K.SubContent.displayName;
991
+ const _e = ee.forwardRef(({ className: t, sideOffset: n = 4, ...o }, a) => /* @__PURE__ */ e(K.Portal, { children: /* @__PURE__ */ e(
992
+ K.Content,
975
993
  {
976
994
  ref: a,
977
995
  sideOffset: n,
978
- className: d(
996
+ className: c(
979
997
  "z-50 rounded-xl border bg-popover p-1 text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
980
998
  t
981
999
  ),
982
1000
  ...o
983
1001
  }
984
1002
  ) }));
985
- _e.displayName = V.Content.displayName;
986
- const Be = ee.forwardRef(({ className: t, inset: n, ...o }, a) => /* @__PURE__ */ e(
987
- V.Item,
1003
+ _e.displayName = K.Content.displayName;
1004
+ const Ie = ee.forwardRef(({ className: t, inset: n, ...o }, a) => /* @__PURE__ */ e(
1005
+ K.Item,
988
1006
  {
989
1007
  ref: a,
990
- className: d(
1008
+ className: c(
991
1009
  "relative flex cursor-pointer select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
992
1010
  n && "pl-8",
993
1011
  t
@@ -995,59 +1013,59 @@ const Be = ee.forwardRef(({ className: t, inset: n, ...o }, a) => /* @__PURE__ *
995
1013
  ...o
996
1014
  }
997
1015
  ));
998
- Be.displayName = V.Item.displayName;
999
- const It = ee.forwardRef(({ className: t, children: n, checked: o = !1, ...a }, i) => /* @__PURE__ */ r(
1000
- V.CheckboxItem,
1016
+ Ie.displayName = K.Item.displayName;
1017
+ const Ht = ee.forwardRef(({ className: t, children: n, checked: o = !1, ...a }, i) => /* @__PURE__ */ r(
1018
+ K.CheckboxItem,
1001
1019
  {
1002
1020
  ref: i,
1003
- className: d(
1021
+ className: c(
1004
1022
  "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1005
1023
  t
1006
1024
  ),
1007
1025
  checked: o,
1008
1026
  ...a,
1009
1027
  children: [
1010
- /* @__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(Lt, { className: "h-4 w-4" }) }) }),
1028
+ /* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(K.ItemIndicator, { children: /* @__PURE__ */ e(At, { className: "h-4 w-4" }) }) }),
1011
1029
  n
1012
1030
  ]
1013
1031
  }
1014
1032
  ));
1015
- It.displayName = V.CheckboxItem.displayName;
1016
- const Ht = ee.forwardRef(({ className: t, children: n, ...o }, a) => /* @__PURE__ */ r(
1017
- V.RadioItem,
1033
+ Ht.displayName = K.CheckboxItem.displayName;
1034
+ const Rt = ee.forwardRef(({ className: t, children: n, ...o }, a) => /* @__PURE__ */ r(
1035
+ K.RadioItem,
1018
1036
  {
1019
1037
  ref: a,
1020
- className: d(
1038
+ className: c(
1021
1039
  "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1022
1040
  t
1023
1041
  ),
1024
1042
  ...o,
1025
1043
  children: [
1026
- /* @__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(_t, { className: "h-2 w-2 fill-current" }) }) }),
1044
+ /* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(K.ItemIndicator, { children: /* @__PURE__ */ e(It, { className: "h-2 w-2 fill-current" }) }) }),
1027
1045
  n
1028
1046
  ]
1029
1047
  }
1030
1048
  ));
1031
- Ht.displayName = V.RadioItem.displayName;
1032
- const Rt = ee.forwardRef(({ className: t, inset: n, ...o }, a) => /* @__PURE__ */ e(
1033
- V.Label,
1049
+ Rt.displayName = K.RadioItem.displayName;
1050
+ const Ot = ee.forwardRef(({ className: t, inset: n, ...o }, a) => /* @__PURE__ */ e(
1051
+ K.Label,
1034
1052
  {
1035
1053
  ref: a,
1036
- className: d("px-2 py-1.5 text-sm font-semibold", n && "pl-8", t),
1054
+ className: c("px-2 py-1.5 text-sm font-semibold", n && "pl-8", t),
1037
1055
  ...o
1038
1056
  }
1039
1057
  ));
1040
- Rt.displayName = V.Label.displayName;
1041
- const Ot = ee.forwardRef(({ className: t, ...n }, o) => /* @__PURE__ */ e(
1042
- V.Separator,
1058
+ Ot.displayName = K.Label.displayName;
1059
+ const jt = ee.forwardRef(({ className: t, ...n }, o) => /* @__PURE__ */ e(
1060
+ K.Separator,
1043
1061
  {
1044
1062
  ref: o,
1045
- className: d("-mx-1 my-1 h-px bg-muted", t),
1063
+ className: c("-mx-1 my-1 h-px bg-muted", t),
1046
1064
  ...n
1047
1065
  }
1048
1066
  ));
1049
- Ot.displayName = V.Separator.displayName;
1050
- const jt = dt(
1067
+ jt.displayName = K.Separator.displayName;
1068
+ const Pt = ct(
1051
1069
  "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
1052
1070
  {
1053
1071
  variants: {
@@ -1061,10 +1079,10 @@ const jt = dt(
1061
1079
  defaultVariants: { variant: "default" }
1062
1080
  }
1063
1081
  );
1064
- function Pt({ className: t, variant: n, ...o }) {
1065
- return /* @__PURE__ */ e("div", { className: d(jt({ variant: n }), t), ...o });
1082
+ function Ft({ className: t, variant: n, ...o }) {
1083
+ return /* @__PURE__ */ e("div", { className: c(Pt({ variant: n }), t), ...o });
1066
1084
  }
1067
- function Ft({ className: t }) {
1085
+ function Vt({ className: t }) {
1068
1086
  return /* @__PURE__ */ e(
1069
1087
  "svg",
1070
1088
  {
@@ -1082,7 +1100,7 @@ function Ft({ className: t }) {
1082
1100
  }
1083
1101
  );
1084
1102
  }
1085
- function Vt({ className: t }) {
1103
+ function Gt({ className: t }) {
1086
1104
  return /* @__PURE__ */ e(
1087
1105
  "svg",
1088
1106
  {
@@ -1100,7 +1118,7 @@ function Vt({ className: t }) {
1100
1118
  }
1101
1119
  );
1102
1120
  }
1103
- const Gt = [
1121
+ const Ut = [
1104
1122
  "January",
1105
1123
  "February",
1106
1124
  "March",
@@ -1114,7 +1132,7 @@ const Gt = [
1114
1132
  "November",
1115
1133
  "December"
1116
1134
  ];
1117
- function Ut({
1135
+ function qt({
1118
1136
  date: t,
1119
1137
  view: n,
1120
1138
  events: o = [],
@@ -1124,15 +1142,15 @@ function Ut({
1124
1142
  showEventCount: s = !0,
1125
1143
  className: x
1126
1144
  }) {
1127
- const v = Gt[t.getMonth()], l = t.getFullYear(), y = s ? gt(o, t, n, f) : 0, w = xt(t, n);
1128
- return /* @__PURE__ */ r("div", { className: d("min-w-0 flex-1", x), children: [
1145
+ const N = Ut[t.getMonth()], l = t.getFullYear(), y = s ? xt(o, t, n, f) : 0, w = yt(t, n);
1146
+ return /* @__PURE__ */ r("div", { className: c("min-w-0 flex-1", x), children: [
1129
1147
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 sm:gap-2 flex-wrap", children: [
1130
1148
  /* @__PURE__ */ r("span", { className: "text-base sm:text-lg font-semibold truncate", children: [
1131
- v,
1149
+ N,
1132
1150
  " ",
1133
1151
  l
1134
1152
  ] }),
1135
- s && /* @__PURE__ */ e(Pt, { variant: "outline", className: "px-1 sm:px-1.5 text-[10px] sm:text-xs shrink-0", children: y })
1153
+ s && /* @__PURE__ */ e(Ft, { variant: "outline", className: "px-1 sm:px-1.5 text-[10px] sm:text-xs shrink-0", children: y })
1136
1154
  ] }),
1137
1155
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 sm:gap-2", children: [
1138
1156
  /* @__PURE__ */ e(
@@ -1142,7 +1160,7 @@ function Ut({
1142
1160
  size: "icon",
1143
1161
  className: "size-5 sm:size-6 [&_svg]:size-3 sm:[&_svg]:size-4",
1144
1162
  onClick: a,
1145
- children: /* @__PURE__ */ e(Ft, {})
1163
+ children: /* @__PURE__ */ e(Vt, {})
1146
1164
  }
1147
1165
  ),
1148
1166
  /* @__PURE__ */ e("p", { className: "text-xs sm:text-sm text-muted-foreground truncate", children: w }),
@@ -1153,13 +1171,13 @@ function Ut({
1153
1171
  size: "icon",
1154
1172
  className: "size-5 sm:size-6 [&_svg]:size-3 sm:[&_svg]:size-4",
1155
1173
  onClick: i,
1156
- children: /* @__PURE__ */ e(Vt, {})
1174
+ children: /* @__PURE__ */ e(Gt, {})
1157
1175
  }
1158
1176
  )
1159
1177
  ] })
1160
1178
  ] });
1161
1179
  }
1162
- const qt = [
1180
+ const Kt = [
1163
1181
  "JAN",
1164
1182
  "FEB",
1165
1183
  "MAR",
@@ -1173,13 +1191,13 @@ const qt = [
1173
1191
  "NOV",
1174
1192
  "DEC"
1175
1193
  ];
1176
- function Kt({ onClick: t, className: n }) {
1194
+ function Xt({ onClick: t, className: n }) {
1177
1195
  const o = /* @__PURE__ */ new Date();
1178
1196
  return /* @__PURE__ */ r(
1179
1197
  "button",
1180
1198
  {
1181
1199
  type: "button",
1182
- className: d(
1200
+ className: c(
1183
1201
  "flex size-11 sm:size-14 flex-col items-start overflow-hidden rounded-lg border shrink-0",
1184
1202
  "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
1185
1203
  "hover:bg-accent/50 transition-colors",
@@ -1187,13 +1205,13 @@ function Kt({ onClick: t, className: n }) {
1187
1205
  ),
1188
1206
  onClick: t,
1189
1207
  children: [
1190
- /* @__PURE__ */ e("p", { className: "flex h-4 sm:h-6 w-full items-center justify-center bg-primary text-center text-[10px] sm:text-xs font-semibold text-primary-foreground", children: qt[o.getMonth()] }),
1208
+ /* @__PURE__ */ e("p", { className: "flex h-4 sm:h-6 w-full items-center justify-center bg-primary text-center text-[10px] sm:text-xs font-semibold text-primary-foreground", children: Kt[o.getMonth()] }),
1191
1209
  /* @__PURE__ */ e("p", { className: "flex w-full flex-1 items-center justify-center text-sm sm:text-lg font-bold", children: o.getDate() })
1192
1210
  ]
1193
1211
  }
1194
1212
  );
1195
1213
  }
1196
- function Xt({ className: t }) {
1214
+ function Yt({ className: t }) {
1197
1215
  return /* @__PURE__ */ r(
1198
1216
  "svg",
1199
1217
  {
@@ -1263,7 +1281,7 @@ function Ye({ className: t }) {
1263
1281
  }
1264
1282
  );
1265
1283
  }
1266
- function Yt({ className: t }) {
1284
+ function Jt({ className: t }) {
1267
1285
  return /* @__PURE__ */ r(
1268
1286
  "svg",
1269
1287
  {
@@ -1305,7 +1323,7 @@ function Je({ className: t }) {
1305
1323
  }
1306
1324
  );
1307
1325
  }
1308
- function Jt({ className: t }) {
1326
+ function Zt({ className: t }) {
1309
1327
  return /* @__PURE__ */ r(
1310
1328
  "svg",
1311
1329
  {
@@ -1330,7 +1348,7 @@ function Jt({ className: t }) {
1330
1348
  }
1331
1349
  );
1332
1350
  }
1333
- function Zt({ className: t }) {
1351
+ function Qt({ className: t }) {
1334
1352
  return /* @__PURE__ */ r(
1335
1353
  "svg",
1336
1354
  {
@@ -1351,7 +1369,7 @@ function Zt({ className: t }) {
1351
1369
  }
1352
1370
  );
1353
1371
  }
1354
- function Qt({ className: t }) {
1372
+ function en({ className: t }) {
1355
1373
  return /* @__PURE__ */ r(
1356
1374
  "svg",
1357
1375
  {
@@ -1373,7 +1391,7 @@ function Qt({ className: t }) {
1373
1391
  }
1374
1392
  );
1375
1393
  }
1376
- function en({ className: t }) {
1394
+ function tn({ className: t }) {
1377
1395
  return /* @__PURE__ */ r(
1378
1396
  "svg",
1379
1397
  {
@@ -1397,21 +1415,21 @@ function en({ className: t }) {
1397
1415
  }
1398
1416
  );
1399
1417
  }
1400
- const tn = [
1401
- { value: "day", label: "Day", icon: Jt },
1402
- { value: "week", label: "Week", icon: Zt },
1403
- { value: "month", label: "Month", icon: Qt },
1404
- { value: "year", label: "Year", icon: en }
1418
+ const nn = [
1419
+ { value: "day", label: "Day", icon: Zt },
1420
+ { value: "week", label: "Week", icon: Qt },
1421
+ { value: "month", label: "Month", icon: en },
1422
+ { value: "year", label: "Year", icon: tn }
1405
1423
  // { value: 'agenda', label: 'Agenda', icon: ListIcon }, NOTE: Not needed currently
1406
1424
  ], Ze = [
1407
1425
  { value: "timeline-day", label: "1 Day", icon: he },
1408
1426
  { value: "timeline-3day", label: "3 Days", icon: he },
1409
1427
  { value: "timeline-week", label: "7 Days", icon: he }
1410
- ], nn = [
1428
+ ], rn = [
1411
1429
  { value: "resource-day", label: "1 Day", icon: he },
1412
1430
  { value: "resource-week", label: "7 Days", icon: he }
1413
1431
  ];
1414
- function Cn({
1432
+ function Sn({
1415
1433
  currentDate: t,
1416
1434
  view: n,
1417
1435
  events: o = [],
@@ -1420,98 +1438,98 @@ function Cn({
1420
1438
  onNavigateNext: f,
1421
1439
  onNavigate: s,
1422
1440
  onViewChange: x,
1423
- onAddEvent: v,
1441
+ onAddEvent: N,
1424
1442
  availableViews: l = ["day", "week", "month", "agenda"],
1425
1443
  showTimelineViews: y = !1,
1426
1444
  timelineViews: w,
1427
- settingsContent: m,
1445
+ settingsContent: h,
1428
1446
  showSettings: g = !1,
1429
1447
  filterContent: u,
1430
- actions: b,
1431
- className: N,
1432
- weekStartsOn: _ = 1,
1433
- labels: M = {}
1448
+ actions: v,
1449
+ className: b,
1450
+ weekStartsOn: z = 1,
1451
+ labels: L = {}
1434
1452
  }) {
1435
- const L = F(
1453
+ const M = q(
1436
1454
  () => ({
1437
1455
  today: "Today",
1438
1456
  addEvent: "Add Event",
1439
1457
  calendarView: "Calendar View",
1440
1458
  resourceView: "Resource View",
1441
- ...M
1459
+ ...L
1442
1460
  }),
1443
- [M]
1444
- ), O = () => {
1461
+ [L]
1462
+ ), $ = () => {
1445
1463
  a?.(), s?.("today");
1446
- }, E = () => {
1464
+ }, T = () => {
1447
1465
  i?.(), s?.("prev");
1448
1466
  }, A = () => {
1449
1467
  f?.(), s?.("next");
1450
- }, S = ["day", "week", "month", "year", "agenda"].includes(
1468
+ }, E = ["day", "week", "month", "year", "agenda"].includes(
1451
1469
  n
1452
- ), I = n.startsWith("timeline-") || n.startsWith("resource-"), B = tn.filter(
1453
- (h) => l.includes(h.value)
1454
- ), $ = S ? B.find((h) => h.value === n) : null, q = [...Ze, ...nn], D = I ? q.find((h) => h.value === n) : null;
1455
- return /* @__PURE__ */ r("div", { className: d("flex flex-col w-full gap-3 mb-2", N), children: [
1470
+ ), B = n.startsWith("timeline-") || n.startsWith("resource-"), W = nn.filter(
1471
+ (m) => l.includes(m.value)
1472
+ ), V = E ? W.find((m) => m.value === n) : null, R = [...Ze, ...rn], D = B ? R.find((m) => m.value === n) : null;
1473
+ return /* @__PURE__ */ r("div", { className: c("flex flex-col w-full gap-3 mb-2", b), children: [
1456
1474
  /* @__PURE__ */ r("div", { className: "flex lg:flex-row flex-col w-full justify-between gap-3", children: [
1457
1475
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between gap-2", children: [
1458
1476
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2 sm:gap-3 min-w-0", children: [
1459
- /* @__PURE__ */ e(Kt, { onClick: O }),
1477
+ /* @__PURE__ */ e(Xt, { onClick: $ }),
1460
1478
  /* @__PURE__ */ e(
1461
- Ut,
1479
+ qt,
1462
1480
  {
1463
1481
  date: t,
1464
1482
  view: n,
1465
1483
  events: o,
1466
- onNavigatePrev: E,
1484
+ onNavigatePrev: T,
1467
1485
  onNavigateNext: A,
1468
- weekStartsOn: _
1486
+ weekStartsOn: z
1469
1487
  }
1470
1488
  )
1471
1489
  ] }),
1472
- v && /* @__PURE__ */ e(
1490
+ N && /* @__PURE__ */ e(
1473
1491
  me,
1474
1492
  {
1475
1493
  size: "icon",
1476
1494
  className: "shrink-0 lg:hidden",
1477
- onClick: v,
1495
+ onClick: N,
1478
1496
  children: /* @__PURE__ */ e(Je, { className: "size-4" })
1479
1497
  }
1480
1498
  )
1481
1499
  ] }),
1482
1500
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 sm:gap-2 overflow-x-auto pb-1 -mb-1 scrollbar-none", children: [
1483
- x && B.length > 0 && /* @__PURE__ */ r(Ke, { children: [
1501
+ x && W.length > 0 && /* @__PURE__ */ r(Ke, { children: [
1484
1502
  /* @__PURE__ */ r(
1485
1503
  Xe,
1486
1504
  {
1487
- className: d(
1505
+ className: c(
1488
1506
  "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors",
1489
1507
  "h-10 px-2 sm:px-3 gap-1 sm:gap-1.5 shrink-0",
1490
- S ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-background hover:bg-accent hover:text-accent-foreground"
1508
+ E ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-background hover:bg-accent hover:text-accent-foreground"
1491
1509
  ),
1492
1510
  children: [
1493
- /* @__PURE__ */ e(Xt, { className: "size-4" }),
1494
- /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: $?.label ?? L.calendarView }),
1511
+ /* @__PURE__ */ e(Yt, { className: "size-4" }),
1512
+ /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: V?.label ?? M.calendarView }),
1495
1513
  /* @__PURE__ */ e(Ye, { className: "size-3 opacity-60" })
1496
1514
  ]
1497
1515
  }
1498
1516
  ),
1499
- /* @__PURE__ */ e(_e, { align: "start", className: "min-w-[120px]", children: B.map((h) => {
1500
- const z = h.icon;
1517
+ /* @__PURE__ */ e(_e, { align: "start", className: "min-w-[120px]", children: W.map((m) => {
1518
+ const _ = m.icon;
1501
1519
  return /* @__PURE__ */ r(
1502
- Be,
1520
+ Ie,
1503
1521
  {
1504
- onClick: () => x(h.value),
1505
- className: d(
1522
+ onClick: () => x(m.value),
1523
+ className: c(
1506
1524
  "gap-2",
1507
- n === h.value && "bg-accent"
1525
+ n === m.value && "bg-accent"
1508
1526
  ),
1509
1527
  children: [
1510
- /* @__PURE__ */ e(z, { className: "size-4" }),
1511
- /* @__PURE__ */ e("span", { children: h.label })
1528
+ /* @__PURE__ */ e(_, { className: "size-4" }),
1529
+ /* @__PURE__ */ e("span", { children: m.label })
1512
1530
  ]
1513
1531
  },
1514
- h.value
1532
+ m.value
1515
1533
  );
1516
1534
  }) })
1517
1535
  ] }),
@@ -1519,45 +1537,45 @@ function Cn({
1519
1537
  /* @__PURE__ */ r(
1520
1538
  Xe,
1521
1539
  {
1522
- className: d(
1540
+ className: c(
1523
1541
  "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors",
1524
1542
  "h-10 px-2 sm:px-3 gap-1 sm:gap-1.5 shrink-0",
1525
- I ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-white hover:bg-zinc-50 hover:text-accent-foreground"
1543
+ B ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-white hover:bg-zinc-50 hover:text-accent-foreground"
1526
1544
  ),
1527
1545
  children: [
1528
1546
  /* @__PURE__ */ e(he, { className: "size-4" }),
1529
- /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: D?.label ?? L.resourceView }),
1547
+ /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: D?.label ?? M.resourceView }),
1530
1548
  /* @__PURE__ */ e(Ye, { className: "size-3 opacity-60" })
1531
1549
  ]
1532
1550
  }
1533
1551
  ),
1534
- /* @__PURE__ */ e(_e, { align: "start", className: "min-w-[120px]", children: Ze.map((h) => {
1535
- const z = h.icon;
1552
+ /* @__PURE__ */ e(_e, { align: "start", className: "min-w-[120px]", children: Ze.map((m) => {
1553
+ const _ = m.icon;
1536
1554
  return /* @__PURE__ */ r(
1537
- Be,
1555
+ Ie,
1538
1556
  {
1539
- onClick: () => x(h.value),
1540
- className: d(
1557
+ onClick: () => x(m.value),
1558
+ className: c(
1541
1559
  "gap-2",
1542
- n === h.value && "bg-accent"
1560
+ n === m.value && "bg-accent"
1543
1561
  ),
1544
1562
  children: [
1545
- /* @__PURE__ */ e(z, { className: "size-4" }),
1546
- /* @__PURE__ */ e("span", { children: h.label })
1563
+ /* @__PURE__ */ e(_, { className: "size-4" }),
1564
+ /* @__PURE__ */ e("span", { children: m.label })
1547
1565
  ]
1548
1566
  },
1549
- h.value
1567
+ m.value
1550
1568
  );
1551
1569
  }) })
1552
1570
  ] }),
1553
- g && m && /* @__PURE__ */ r(re, { children: [
1554
- /* @__PURE__ */ e(oe, { asChild: !0, children: /* @__PURE__ */ e(
1571
+ g && h && /* @__PURE__ */ r(oe, { children: [
1572
+ /* @__PURE__ */ e(ae, { asChild: !0, children: /* @__PURE__ */ e(
1555
1573
  me,
1556
1574
  {
1557
1575
  variant: "outline",
1558
1576
  size: "icon",
1559
1577
  className: "min-w-10 min-h-10 shrink-0 mx-0",
1560
- children: /* @__PURE__ */ e(Yt, { className: "size-4 sm:size-5" })
1578
+ children: /* @__PURE__ */ e(Jt, { className: "size-4 sm:size-5" })
1561
1579
  }
1562
1580
  ) }),
1563
1581
  /* @__PURE__ */ e(
@@ -1566,19 +1584,19 @@ function Cn({
1566
1584
  className: "w-auto min-w-80 p-0",
1567
1585
  align: "end",
1568
1586
  sideOffset: 8,
1569
- children: /* @__PURE__ */ e("div", { className: "max-h-[70vh] overflow-y-auto p-4 space-y-6", children: m })
1587
+ children: /* @__PURE__ */ e("div", { className: "max-h-[70vh] overflow-y-auto p-4 space-y-6", children: h })
1570
1588
  }
1571
1589
  )
1572
1590
  ] }),
1573
- b,
1574
- v && /* @__PURE__ */ r(
1591
+ v,
1592
+ N && /* @__PURE__ */ r(
1575
1593
  me,
1576
1594
  {
1577
1595
  className: "hidden lg:flex shrink-0 max-h-10",
1578
- onClick: v,
1596
+ onClick: N,
1579
1597
  children: [
1580
1598
  /* @__PURE__ */ e(Je, { className: "size-4" }),
1581
- L.addEvent
1599
+ M.addEvent
1582
1600
  ]
1583
1601
  }
1584
1602
  )
@@ -1587,7 +1605,7 @@ function Cn({
1587
1605
  u && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 pb-1 -mb-1 scrollbar-none", children: u })
1588
1606
  ] });
1589
1607
  }
1590
- function Sn({
1608
+ function Mn({
1591
1609
  events: t,
1592
1610
  date: n,
1593
1611
  daysAhead: o = 60,
@@ -1596,28 +1614,28 @@ function Sn({
1596
1614
  className: f,
1597
1615
  renderEvent: s,
1598
1616
  renderPopover: x,
1599
- slots: v,
1617
+ slots: N,
1600
1618
  classNames: l
1601
1619
  }) {
1602
- const y = F(() => {
1603
- const m = new Date(n);
1604
- m.setHours(0, 0, 0, 0);
1605
- const g = new Date(m);
1606
- return g.setDate(g.getDate() + o), t.filter((u) => u.endDate >= m && u.startDate <= g);
1607
- }, [t, o, n]), w = F(() => {
1608
- const m = yt(y), g = [];
1609
- for (const [u, b] of m)
1620
+ const y = q(() => {
1621
+ const h = new Date(n);
1622
+ h.setHours(0, 0, 0, 0);
1623
+ const g = new Date(h);
1624
+ return g.setDate(g.getDate() + o), t.filter((u) => u.endDate >= h && u.startDate <= g);
1625
+ }, [t, o, n]), w = q(() => {
1626
+ const h = bt(y), g = [];
1627
+ for (const [u, v] of h)
1610
1628
  g.push({
1611
1629
  date: new Date(u),
1612
1630
  dateKey: u,
1613
- events: b
1631
+ events: v
1614
1632
  });
1615
- return g.sort((u, b) => u.date.getTime() - b.date.getTime()), g;
1633
+ return g.sort((u, v) => u.date.getTime() - v.date.getTime()), g;
1616
1634
  }, [y]);
1617
- return w.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: [
1635
+ return w.length === 0 ? /* @__PURE__ */ e("div", { className: c("flex flex-col items-center justify-center h-full py-12", f), children: /* @__PURE__ */ r("div", { className: "text-center", children: [
1618
1636
  /* @__PURE__ */ e("p", { className: "text-muted-foreground", children: "No events found" }),
1619
1637
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground/70", children: "No events scheduled for this period" })
1620
- ] }) }) : /* @__PURE__ */ r("div", { className: d("flex flex-col h-full overflow-auto", l?.agendaList, f), children: [
1638
+ ] }) }) : /* @__PURE__ */ r("div", { className: c("flex flex-col h-full overflow-auto", l?.agendaList, f), children: [
1621
1639
  /* @__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: [
1622
1640
  /* @__PURE__ */ e("h2", { className: "text-lg font-medium", children: "Schedule" }),
1623
1641
  /* @__PURE__ */ r("span", { className: "text-sm text-muted-foreground", children: [
@@ -1626,13 +1644,13 @@ function Sn({
1626
1644
  y.length !== 1 ? "s" : ""
1627
1645
  ] })
1628
1646
  ] }) }),
1629
- /* @__PURE__ */ e("div", { className: "flex-1", children: w.map(({ date: m, dateKey: g, events: u }) => {
1630
- const b = ce(m), N = m.toLocaleDateString([], { weekday: "short" }), _ = m.getDate(), M = m.toLocaleDateString([], { month: "short" });
1631
- return /* @__PURE__ */ r("div", { className: d("", l?.agendaDayGroup), children: [
1647
+ /* @__PURE__ */ e("div", { className: "flex-1", children: w.map(({ date: h, dateKey: g, events: u }) => {
1648
+ const v = ce(h), b = h.toLocaleDateString([], { weekday: "short" }), z = h.getDate(), L = h.toLocaleDateString([], { month: "short" });
1649
+ return /* @__PURE__ */ r("div", { className: c("", l?.agendaDayGroup), children: [
1632
1650
  /* @__PURE__ */ e(
1633
1651
  "div",
1634
1652
  {
1635
- className: d(
1653
+ className: c(
1636
1654
  "sticky top-[52px] z-10 bg-background px-4 py-3 border-b",
1637
1655
  l?.agendaDayHeader
1638
1656
  ),
@@ -1641,38 +1659,38 @@ function Sn({
1641
1659
  /* @__PURE__ */ e(
1642
1660
  "span",
1643
1661
  {
1644
- className: d(
1662
+ className: c(
1645
1663
  "text-[11px] font-medium uppercase tracking-wide",
1646
- b ? "text-primary" : "text-muted-foreground"
1664
+ v ? "text-primary" : "text-muted-foreground"
1647
1665
  ),
1648
- children: N
1666
+ children: b
1649
1667
  }
1650
1668
  ),
1651
1669
  /* @__PURE__ */ e(
1652
1670
  "span",
1653
1671
  {
1654
- className: d(
1672
+ className: c(
1655
1673
  "flex items-center justify-center rounded-full mt-0.5",
1656
1674
  "size-10 text-xl font-normal",
1657
- b ? "bg-primary text-primary-foreground" : "text-foreground"
1675
+ v ? "bg-primary text-primary-foreground" : "text-foreground"
1658
1676
  ),
1659
- children: _
1677
+ children: z
1660
1678
  }
1661
1679
  )
1662
1680
  ] }),
1663
1681
  /* @__PURE__ */ r("span", { className: "text-sm text-muted-foreground", children: [
1664
- M,
1682
+ L,
1665
1683
  " ",
1666
- m.getFullYear()
1684
+ h.getFullYear()
1667
1685
  ] })
1668
1686
  ] })
1669
1687
  }
1670
1688
  ),
1671
1689
  /* @__PURE__ */ e("div", { className: "px-4 py-3 space-y-2 border-b last:border-b-0", children: u.map(
1672
- (L) => s ? /* @__PURE__ */ e("div", { children: s({ event: L, variant: "full" }) }, L.id) : /* @__PURE__ */ e(
1673
- Se,
1690
+ (M) => s ? /* @__PURE__ */ e("div", { children: s({ event: M, variant: "full" }) }, M.id) : /* @__PURE__ */ e(
1691
+ Me,
1674
1692
  {
1675
- event: L,
1693
+ event: M,
1676
1694
  variant: "full",
1677
1695
  badgeVariant: a,
1678
1696
  onClick: i,
@@ -1683,15 +1701,15 @@ function Sn({
1683
1701
  showParticipants: !0,
1684
1702
  ...l?.eventCard && { className: l.eventCard }
1685
1703
  },
1686
- L.id
1704
+ M.id
1687
1705
  )
1688
1706
  ) })
1689
1707
  ] }, g);
1690
1708
  }) })
1691
1709
  ] });
1692
1710
  }
1693
- const we = 360, ve = 480, Te = 280;
1694
- function rn({
1711
+ const ve = 360, Ne = 480, We = 280;
1712
+ function on({
1695
1713
  isOpen: t,
1696
1714
  onClose: n,
1697
1715
  date: o,
@@ -1700,52 +1718,52 @@ function rn({
1700
1718
  badgeVariant: f = "colored",
1701
1719
  onEventClick: s,
1702
1720
  renderEvent: x,
1703
- renderPopover: v,
1721
+ renderPopover: N,
1704
1722
  className: l
1705
1723
  }) {
1706
- const y = te(null), w = te(null), [m, g] = J("closed"), u = F(
1707
- () => [...a].sort((E, A) => E.startDate.getTime() - A.startDate.getTime()),
1724
+ const y = ne(null), w = ne(null), [h, g] = Y("closed"), u = q(
1725
+ () => [...a].sort((T, A) => T.startDate.getTime() - A.startDate.getTime()),
1708
1726
  [a]
1709
- ), b = F(() => {
1710
- if (!i) return { top: 0, left: 0, width: we, maxHeight: ve };
1711
- const E = typeof window < "u" ? window.innerWidth : 1200, A = typeof window < "u" ? window.innerHeight : 800;
1712
- let S = i.left + i.width / 2 - we / 2;
1713
- S = Math.max(16, Math.min(S, E - we - 16));
1714
- const I = Math.min(a.length * 68 + 80, ve);
1715
- let B = i.top + i.height / 2 - I / 2;
1716
- return B = Math.max(16, Math.min(B, A - I - 16)), { top: B, left: S, width: we, maxHeight: ve };
1727
+ ), v = q(() => {
1728
+ if (!i) return { top: 0, left: 0, width: ve, maxHeight: Ne };
1729
+ const T = typeof window < "u" ? window.innerWidth : 1200, A = typeof window < "u" ? window.innerHeight : 800;
1730
+ let E = i.left + i.width / 2 - ve / 2;
1731
+ E = Math.max(16, Math.min(E, T - ve - 16));
1732
+ const B = Math.min(a.length * 68 + 80, Ne);
1733
+ let W = i.top + i.height / 2 - B / 2;
1734
+ return W = Math.max(16, Math.min(W, A - B - 16)), { top: W, left: E, width: ve, maxHeight: Ne };
1717
1735
  }, [i, a.length]);
1718
- Ie(() => {
1736
+ $e(() => {
1719
1737
  if (t && i)
1720
1738
  g("entering"), requestAnimationFrame(() => {
1721
1739
  requestAnimationFrame(() => {
1722
1740
  g("open");
1723
1741
  });
1724
1742
  });
1725
- else if (!t && m === "open") {
1743
+ else if (!t && h === "open") {
1726
1744
  g("exiting");
1727
- const E = setTimeout(() => {
1745
+ const T = setTimeout(() => {
1728
1746
  g("closed");
1729
- }, Te);
1730
- return () => clearTimeout(E);
1747
+ }, We);
1748
+ return () => clearTimeout(T);
1731
1749
  }
1732
- }, [t, i]), ze(() => {
1733
- if (m === "closed") return;
1734
- const E = (A) => {
1750
+ }, [t, i]), be(() => {
1751
+ if (h === "closed") return;
1752
+ const T = (A) => {
1735
1753
  A.key === "Escape" && (A.stopPropagation(), n());
1736
1754
  };
1737
- return document.addEventListener("keydown", E), () => document.removeEventListener("keydown", E);
1738
- }, [m, n]), ze(() => {
1739
- m === "open" && w.current && w.current.focus();
1740
- }, [m]);
1741
- const N = W(
1742
- (E) => {
1743
- E.target === y.current && n();
1755
+ return document.addEventListener("keydown", T), () => document.removeEventListener("keydown", T);
1756
+ }, [h, n]), be(() => {
1757
+ h === "open" && w.current && w.current.focus();
1758
+ }, [h]);
1759
+ const b = S(
1760
+ (T) => {
1761
+ T.target === y.current && n();
1744
1762
  },
1745
1763
  [n]
1746
1764
  );
1747
- if (m === "closed") return null;
1748
- const _ = m === "entering" || m === "exiting", M = _ && i ? {
1765
+ if (h === "closed") return null;
1766
+ const z = h === "entering" || h === "exiting", L = z && i ? {
1749
1767
  // Collapsed state: match the day cell exactly
1750
1768
  position: "fixed",
1751
1769
  top: i.top,
@@ -1753,39 +1771,39 @@ function rn({
1753
1771
  width: i.width,
1754
1772
  height: i.height,
1755
1773
  maxHeight: i.height,
1756
- opacity: m === "entering" ? 0.7 : 0,
1774
+ opacity: h === "entering" ? 0.7 : 0,
1757
1775
  transform: "scale(1)",
1758
1776
  borderRadius: "8px"
1759
1777
  } : {
1760
1778
  // Expanded state: full panel
1761
1779
  position: "fixed",
1762
- top: b.top,
1763
- left: b.left,
1764
- width: b.width,
1765
- maxHeight: b.maxHeight,
1780
+ top: v.top,
1781
+ left: v.left,
1782
+ width: v.width,
1783
+ maxHeight: v.maxHeight,
1766
1784
  opacity: 1,
1767
1785
  transform: "scale(1)",
1768
1786
  borderRadius: "12px"
1769
- }, L = _ ? 0 : 1, O = o.toLocaleDateString(void 0, {
1787
+ }, M = z ? 0 : 1, $ = o.toLocaleDateString(void 0, {
1770
1788
  weekday: "long",
1771
1789
  month: "long",
1772
1790
  day: "numeric"
1773
1791
  });
1774
- return /* @__PURE__ */ r(pt, { children: [
1792
+ return /* @__PURE__ */ r(ft, { children: [
1775
1793
  /* @__PURE__ */ e(
1776
1794
  "div",
1777
1795
  {
1778
1796
  ref: y,
1779
1797
  role: "presentation",
1780
- onClick: N,
1798
+ onClick: b,
1781
1799
  className: "ic-expansion-backdrop",
1782
1800
  style: {
1783
1801
  position: "fixed",
1784
1802
  inset: 0,
1785
1803
  zIndex: 50,
1786
1804
  backgroundColor: "rgba(0, 0, 0, 0.2)",
1787
- opacity: L,
1788
- transition: `opacity ${Te}ms cubic-bezier(0.32, 0.72, 0, 1)`
1805
+ opacity: M,
1806
+ transition: `opacity ${We}ms cubic-bezier(0.32, 0.72, 0, 1)`
1789
1807
  }
1790
1808
  }
1791
1809
  ),
@@ -1795,24 +1813,24 @@ function rn({
1795
1813
  ref: w,
1796
1814
  role: "dialog",
1797
1815
  "aria-modal": "true",
1798
- "aria-label": `Events for ${O}`,
1816
+ "aria-label": `Events for ${$}`,
1799
1817
  tabIndex: -1,
1800
- className: d(
1818
+ className: c(
1801
1819
  "ic-expansion-panel",
1802
1820
  "bg-background border border-border shadow-2xl overflow-hidden",
1803
1821
  "focus:outline-none",
1804
1822
  l
1805
1823
  ),
1806
1824
  style: {
1807
- ...M,
1825
+ ...L,
1808
1826
  zIndex: 51,
1809
- transition: `all ${Te}ms cubic-bezier(0.32, 0.72, 0, 1)`,
1827
+ transition: `all ${We}ms cubic-bezier(0.32, 0.72, 0, 1)`,
1810
1828
  willChange: "top, left, width, height, max-height, opacity, border-radius"
1811
1829
  },
1812
1830
  children: [
1813
1831
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between px-4 py-3 border-b bg-muted/30", children: [
1814
1832
  /* @__PURE__ */ r("div", { className: "flex flex-col", children: [
1815
- /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-foreground", children: O }),
1833
+ /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-foreground", children: $ }),
1816
1834
  /* @__PURE__ */ r("span", { className: "text-xs text-muted-foreground", children: [
1817
1835
  a.length,
1818
1836
  " event",
@@ -1850,28 +1868,28 @@ function rn({
1850
1868
  "div",
1851
1869
  {
1852
1870
  className: "overflow-y-auto px-3 py-2 space-y-1.5",
1853
- style: { maxHeight: `${ve - 64}px` },
1871
+ style: { maxHeight: `${Ne - 64}px` },
1854
1872
  children: [
1855
- u.map((E) => /* @__PURE__ */ e(
1873
+ u.map((T) => /* @__PURE__ */ e(
1856
1874
  "div",
1857
1875
  {
1858
1876
  onPointerDown: (A) => A.stopPropagation(),
1859
- children: x ? x({ event: E, variant: "compact" }) : /* @__PURE__ */ e(
1860
- Se,
1877
+ children: x ? x({ event: T, variant: "compact" }) : /* @__PURE__ */ e(
1878
+ Me,
1861
1879
  {
1862
- event: E,
1880
+ event: T,
1863
1881
  variant: "compact",
1864
1882
  badgeVariant: f,
1865
1883
  onClick: (A) => {
1866
1884
  n(), s?.(A);
1867
1885
  },
1868
- disablePopover: !!s && !v,
1869
- renderPopover: v,
1886
+ disablePopover: !!s && !N,
1887
+ renderPopover: N,
1870
1888
  showTime: !0
1871
1889
  }
1872
1890
  )
1873
1891
  },
1874
- E.id
1892
+ T.id
1875
1893
  )),
1876
1894
  a.length === 0 && /* @__PURE__ */ e("div", { className: "py-6 text-center text-sm text-muted-foreground", children: "No events" })
1877
1895
  ]
@@ -1882,24 +1900,24 @@ function rn({
1882
1900
  )
1883
1901
  ] });
1884
1902
  }
1885
- function on({
1903
+ function an({
1886
1904
  event: t,
1887
1905
  date: n,
1888
1906
  onEventClick: o,
1889
1907
  disablePopover: a,
1890
1908
  renderPopover: i
1891
1909
  }) {
1892
- const [f, s] = J(!1), x = de(t.color), v = De(t), l = le(t.startDate, n), y = le(t.endDate, n), w = v && le(t.startDate, t.endDate), m = W(() => {
1910
+ const [f, s] = Y(!1), x = de(t.color), N = Ce(t), l = le(t.startDate, n), y = le(t.endDate, n), w = N && le(t.startDate, t.endDate), h = S(() => {
1893
1911
  a && o ? o(t) : a || s(!0);
1894
- }, [a, o, t]), g = W(() => {
1912
+ }, [a, o, t]), g = S(() => {
1895
1913
  s(!1);
1896
1914
  }, []), u = /* @__PURE__ */ r(
1897
1915
  "button",
1898
1916
  {
1899
1917
  type: "button",
1900
- onClick: m,
1918
+ onClick: h,
1901
1919
  title: X(t),
1902
- className: d(
1920
+ className: c(
1903
1921
  "inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium transition-opacity hover:opacity-80",
1904
1922
  "sm:px-2 sm:py-1 sm:text-xs",
1905
1923
  x.bg,
@@ -1914,28 +1932,28 @@ function on({
1914
1932
  w && /* @__PURE__ */ e("span", { className: "text-[9px] opacity-70 sm:text-[10px]", children: "All day" })
1915
1933
  ]
1916
1934
  }
1917
- ), b = /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
1935
+ ), v = /* @__PURE__ */ e(re, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
1918
1936
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
1919
1937
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t) })
1920
1938
  ] }) });
1921
1939
  return a ? /* @__PURE__ */ r(ie, { children: [
1922
1940
  /* @__PURE__ */ e(se, { asChild: !0, children: u }),
1923
- b
1924
- ] }) : /* @__PURE__ */ r(re, { open: f, onOpenChange: s, children: [
1925
- /* @__PURE__ */ e(oe, { asChild: !0, children: u }),
1926
- /* @__PURE__ */ e(Q, { className: "w-80", children: i ? i({ event: t, onClose: g }) : /* @__PURE__ */ e(an, { event: t, onClose: g }) })
1941
+ v
1942
+ ] }) : /* @__PURE__ */ r(oe, { open: f, onOpenChange: s, children: [
1943
+ /* @__PURE__ */ e(ae, { asChild: !0, children: u }),
1944
+ /* @__PURE__ */ e(Q, { className: "w-80", children: i ? i({ event: t, onClose: g }) : /* @__PURE__ */ e(sn, { event: t, onClose: g }) })
1927
1945
  ] });
1928
1946
  }
1929
- function an({
1947
+ function sn({
1930
1948
  event: t,
1931
1949
  onClose: n
1932
1950
  }) {
1933
1951
  const o = de(t.color), a = t.isCanceled ?? !1;
1934
1952
  return /* @__PURE__ */ r("div", { className: "space-y-3", children: [
1935
1953
  /* @__PURE__ */ r("div", { className: "flex items-start gap-3", children: [
1936
- /* @__PURE__ */ e("div", { className: d("size-4 rounded shrink-0 mt-0.5", o.dot) }),
1954
+ /* @__PURE__ */ e("div", { className: c("size-4 rounded shrink-0 mt-0.5", o.dot) }),
1937
1955
  /* @__PURE__ */ r("div", { className: "flex-1 min-w-0", children: [
1938
- /* @__PURE__ */ e("h3", { className: d("font-semibold text-lg", a && "line-through opacity-50"), children: t.title }),
1956
+ /* @__PURE__ */ e("h3", { className: c("font-semibold text-lg", a && "line-through opacity-50"), children: t.title }),
1939
1957
  /* @__PURE__ */ e("div", { className: "flex items-center gap-1 text-sm text-muted-foreground mt-1 tabular-nums", children: X(t) })
1940
1958
  ] })
1941
1959
  ] }),
@@ -1955,7 +1973,7 @@ function an({
1955
1973
  ) })
1956
1974
  ] });
1957
1975
  }
1958
- function sn({
1976
+ function ln({
1959
1977
  events: t,
1960
1978
  date: n,
1961
1979
  onEventClick: o,
@@ -1964,13 +1982,13 @@ function sn({
1964
1982
  className: f
1965
1983
  }) {
1966
1984
  if (t.length === 0) return null;
1967
- const s = t.some((l) => De(l) && le(l.startDate, l.endDate)), x = t.some(
1968
- (l) => !le(l.startDate, l.endDate) || De(l) && !le(l.startDate, l.endDate)
1969
- ), v = s && x ? "All day / Multi-day" : s ? "All day" : "Multi-day";
1970
- 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: [
1971
- /* @__PURE__ */ e("span", { className: "text-[10px] font-medium text-muted-foreground sm:text-xs", children: v }),
1985
+ const s = t.some((l) => Ce(l) && le(l.startDate, l.endDate)), x = t.some(
1986
+ (l) => !le(l.startDate, l.endDate) || Ce(l) && !le(l.startDate, l.endDate)
1987
+ ), N = s && x ? "All day / Multi-day" : s ? "All day" : "Multi-day";
1988
+ return /* @__PURE__ */ r("div", { className: c("border-b bg-muted/20 px-2 py-1.5 space-y-1", "sm:px-4 sm:py-2", f), children: [
1989
+ /* @__PURE__ */ e("span", { className: "text-[10px] font-medium text-muted-foreground sm:text-xs", children: N }),
1972
1990
  /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: t.map((l) => /* @__PURE__ */ e(
1973
- on,
1991
+ an,
1974
1992
  {
1975
1993
  event: l,
1976
1994
  date: n,
@@ -1982,8 +2000,8 @@ function sn({
1982
2000
  )) })
1983
2001
  ] });
1984
2002
  }
1985
- const ln = 5;
1986
- function ut({
2003
+ const dn = 5;
2004
+ function mt({
1987
2005
  slot: t,
1988
2006
  onSelectionStart: n,
1989
2007
  onSelectionMove: o,
@@ -1992,56 +2010,56 @@ function ut({
1992
2010
  isSelecting: f = !1,
1993
2011
  disabled: s = !1,
1994
2012
  ariaLabel: x,
1995
- children: v,
2013
+ children: N,
1996
2014
  className: l,
1997
2015
  height: y,
1998
2016
  style: w,
1999
- dataAttributes: m
2017
+ dataAttributes: h
2000
2018
  }) {
2001
- const g = te(null), u = te(!1), b = te(!1), N = te(null), [_, M] = J(!1), L = Re(), O = W(
2019
+ const g = ne(null), u = ne(!1), v = ne(!1), b = ne(null), [z, L] = Y(!1), M = Re(), $ = S(
2002
2020
  (D) => {
2003
- 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));
2021
+ s || D.button !== 0 && D.pointerType === "mouse" || (D.preventDefault(), g.current = { x: D.clientX, y: D.clientY }, u.current = !1, v.current = !0, n?.(t));
2004
2022
  },
2005
2023
  [s, t, n]
2006
- ), E = W(
2024
+ ), T = S(
2007
2025
  (D) => {
2008
- if (!(g.current && b.current && !s)) return;
2009
- const h = D.clientX - g.current.x, z = D.clientY - g.current.y;
2010
- Math.sqrt(h * h + z * z) >= ln && (u.current = !0);
2026
+ if (!(g.current && v.current && !s)) return;
2027
+ const m = D.clientX - g.current.x, _ = D.clientY - g.current.y;
2028
+ Math.sqrt(m * m + _ * _) >= dn && (u.current = !0);
2011
2029
  },
2012
2030
  [s]
2013
- ), A = W(
2031
+ ), A = S(
2014
2032
  (D) => {
2015
2033
  s || (D.buttons > 0 || f) && o?.(t);
2016
2034
  },
2017
2035
  [s, f, t, o]
2018
- ), S = W(() => {
2019
- s || (a?.(), g.current = null, u.current = !1, b.current = !1);
2020
- }, [s, a]), I = W(
2036
+ ), E = S(() => {
2037
+ s || (a?.(), g.current = null, u.current = !1, v.current = !1);
2038
+ }, [s, a]), B = S(
2021
2039
  (D) => {
2022
- if (!L?.isDragging || s) return;
2023
- D.preventDefault(), D.dataTransfer.dropEffect = "move", M(!0);
2024
- const h = /* @__PURE__ */ new Date(), z = t.hour ?? h.getHours(), R = t.minute ?? (h.getMinutes() >= 30 ? 30 : 0);
2025
- L.updateDragPreview?.(t.date, z, R);
2040
+ if (!M?.isDragging || s) return;
2041
+ D.preventDefault(), D.dataTransfer.dropEffect = "move", L(!0);
2042
+ const m = /* @__PURE__ */ new Date(), _ = t.hour ?? m.getHours(), I = t.minute ?? (m.getMinutes() >= 30 ? 30 : 0);
2043
+ M.updateDragPreview?.(t.date, _, I);
2026
2044
  },
2027
- [L, s, t]
2028
- ), B = W(() => {
2029
- M(!1);
2030
- }, []), $ = W(
2045
+ [M, s, t]
2046
+ ), W = S(() => {
2047
+ L(!1);
2048
+ }, []), V = S(
2031
2049
  (D) => {
2032
- D.preventDefault(), M(!1), !(!L?.isDragging || s) && L.endDrag?.();
2050
+ D.preventDefault(), L(!1), !(!M?.isDragging || s) && M.endDrag?.();
2033
2051
  },
2034
- [L, s]
2052
+ [M, s]
2035
2053
  );
2036
- ze(() => {
2054
+ be(() => {
2037
2055
  const D = () => {
2038
- b.current && (b.current = !1, g.current = null, u.current = !1);
2056
+ v.current && (v.current = !1, g.current = null, u.current = !1);
2039
2057
  };
2040
2058
  return window.addEventListener("pointerup", D), window.addEventListener("pointercancel", D), () => {
2041
2059
  window.removeEventListener("pointerup", D), window.removeEventListener("pointercancel", D);
2042
2060
  };
2043
2061
  }, []);
2044
- const q = W(
2062
+ const R = S(
2045
2063
  (D) => {
2046
2064
  s || (D.key === "Enter" || D.key === " ") && (D.preventDefault(), n?.(t), a?.());
2047
2065
  },
@@ -2050,21 +2068,21 @@ function ut({
2050
2068
  return /* @__PURE__ */ e(
2051
2069
  "button",
2052
2070
  {
2053
- ref: N,
2071
+ ref: b,
2054
2072
  type: "button",
2055
2073
  "aria-label": x,
2056
2074
  "aria-disabled": s,
2057
2075
  "aria-pressed": i,
2058
2076
  disabled: s,
2059
- onPointerDown: O,
2060
- onPointerMove: E,
2061
- onPointerUp: S,
2077
+ onPointerDown: $,
2078
+ onPointerMove: T,
2079
+ onPointerUp: E,
2062
2080
  onPointerEnter: A,
2063
- onKeyDown: q,
2064
- onDragOver: I,
2065
- onDragLeave: B,
2066
- onDrop: $,
2067
- className: d(
2081
+ onKeyDown: R,
2082
+ onDragOver: B,
2083
+ onDragLeave: W,
2084
+ onDrop: V,
2085
+ className: c(
2068
2086
  "select-none touch-none cursor-pointer transition-colors",
2069
2087
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
2070
2088
  // Hover state (only when not in selection)
@@ -2072,18 +2090,18 @@ function ut({
2072
2090
  // Selection state — blue tint matching the primary color
2073
2091
  i && "bg-blue-100/70",
2074
2092
  // Drag over state - visual feedback when event is dragged over
2075
- _ && "bg-primary/20 ring-2 ring-primary ring-inset",
2093
+ z && "bg-primary/20 ring-2 ring-primary ring-inset",
2076
2094
  // Disabled state
2077
2095
  s && "cursor-not-allowed opacity-50",
2078
2096
  l
2079
2097
  ),
2080
2098
  style: { height: y, ...w },
2081
- ...m,
2082
- children: v
2099
+ ...h,
2100
+ children: N
2083
2101
  }
2084
2102
  );
2085
2103
  }
2086
- function mt({
2104
+ function ht({
2087
2105
  slot: t,
2088
2106
  date: n,
2089
2107
  hour: o,
@@ -2092,14 +2110,14 @@ function mt({
2092
2110
  ...f
2093
2111
  }) {
2094
2112
  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()}`;
2095
- return /* @__PURE__ */ e(ut, { slot: s, ariaLabel: x, ...f });
2113
+ return /* @__PURE__ */ e(mt, { slot: s, ariaLabel: x, ...f });
2096
2114
  }
2097
- function dn({ slot: t, date: n, ariaLabel: o, ...a }) {
2115
+ function cn({ slot: t, date: n, ariaLabel: o, ...a }) {
2098
2116
  const i = t ?? { date: n }, f = o ?? `Select ${i.date.toLocaleDateString()}`;
2099
- return /* @__PURE__ */ e(ut, { slot: i, ariaLabel: f, ...a });
2117
+ return /* @__PURE__ */ e(mt, { slot: i, ariaLabel: f, ...a });
2100
2118
  }
2101
- const fe = 96, We = 72, Le = 80;
2102
- function Mn({
2119
+ const fe = 96, Le = 72, Ae = 80;
2120
+ function Tn({
2103
2121
  events: t,
2104
2122
  date: n,
2105
2123
  visibleHours: o = { startHour: 0, endHour: 24 },
@@ -2108,38 +2126,38 @@ function Mn({
2108
2126
  badgeVariant: f = "colored",
2109
2127
  onEventClick: s,
2110
2128
  onSlotSelect: x,
2111
- className: v,
2129
+ className: N,
2112
2130
  renderEvent: l,
2113
2131
  renderPopover: y,
2114
2132
  slots: w,
2115
- classNames: m
2133
+ classNames: h
2116
2134
  }) {
2117
- const g = 60 / i, u = 100 / g, b = F(() => {
2135
+ const g = 60 / i, u = 100 / g, v = q(() => {
2118
2136
  const k = [];
2119
- for (let c = 0; c < g; c++)
2120
- k.push(c * i);
2137
+ for (let d = 0; d < g; d++)
2138
+ k.push(d * i);
2121
2139
  return k;
2122
- }, [g, i]), N = F(() => He(t, n), [t, n]), { singleDay: _, multiDay: M } = F(() => nt(N), [N]), L = F(() => {
2123
- const k = rt(_, n, o, fe), c = /* @__PURE__ */ new Map();
2140
+ }, [g, i]), b = q(() => He(t, n), [t, n]), { singleDay: z, multiDay: L } = q(() => nt(b), [b]), M = q(() => {
2141
+ const k = rt(z, n, o, fe), d = /* @__PURE__ */ new Map();
2124
2142
  for (const p of k)
2125
- c.set(p.event.id, p.position);
2126
- return c;
2127
- }, [_, n, o]), O = F(() => ot(o), [o]), E = /* @__PURE__ */ new Date(), A = ce(n), S = F(() => {
2143
+ d.set(p.event.id, p.position);
2144
+ return d;
2145
+ }, [z, n, o]), $ = q(() => ot(o), [o]), T = /* @__PURE__ */ new Date(), A = ce(n), E = q(() => {
2128
2146
  if (!A) return 0;
2129
- const k = E.getHours() + E.getMinutes() / 60;
2147
+ const k = T.getHours() + T.getMinutes() / 60;
2130
2148
  return k < o.startHour || k > o.endHour ? -1 : (k - o.startHour) * fe;
2131
- }, [A, o, E]), I = te(null);
2132
- Ie(() => {
2133
- const k = I.current;
2149
+ }, [A, o, T]), B = ne(null);
2150
+ $e(() => {
2151
+ const k = B.current;
2134
2152
  if (!k) return;
2135
- const c = () => {
2153
+ const d = () => {
2136
2154
  let p;
2137
2155
  if (A) {
2138
- const H = (/* @__PURE__ */ new Date()).getHours();
2139
- p = Math.max(H - 1, o.startHour);
2156
+ const O = (/* @__PURE__ */ new Date()).getHours();
2157
+ p = Math.max(O - 1, o.startHour);
2140
2158
  } else {
2141
- const H = n.getDay(), T = a?.[H];
2142
- T?.enabled && T.from > 0 ? p = Math.max(T.from - 1, o.startHour) : p = Math.max(7, o.startHour);
2159
+ const O = n.getDay(), j = a?.[O];
2160
+ j?.enabled && j.from > 0 ? p = Math.max(j.from - 1, o.startHour) : p = Math.max(7, o.startHour);
2143
2161
  }
2144
2162
  const C = (p - o.startHour) * fe;
2145
2163
  k.scrollTo({
@@ -2148,142 +2166,142 @@ function Mn({
2148
2166
  });
2149
2167
  };
2150
2168
  requestAnimationFrame(() => {
2151
- requestAnimationFrame(c);
2169
+ requestAnimationFrame(d);
2152
2170
  });
2153
2171
  }, [n, a, o, A]);
2154
- const B = Oe(), $ = W(
2172
+ const W = Oe(), V = S(
2155
2173
  (k) => {
2156
- B?.startSelection(k);
2174
+ W?.startSelection(k);
2157
2175
  },
2158
- [B]
2159
- ), q = W(
2176
+ [W]
2177
+ ), R = S(
2160
2178
  (k) => {
2161
- B?.updateSelection(k);
2179
+ W?.updateSelection(k);
2162
2180
  },
2163
- [B]
2164
- ), D = W(() => {
2165
- B?.endSelection();
2166
- }, [B]), h = W(
2181
+ [W]
2182
+ ), D = S(() => {
2183
+ W?.endSelection();
2184
+ }, [W]), m = S(
2167
2185
  (k) => {
2168
2186
  s?.(k);
2169
2187
  },
2170
2188
  [s]
2171
- ), z = n.toLocaleDateString([], { weekday: "short" }), R = n.getDate(), P = ce(n);
2172
- return /* @__PURE__ */ r("div", { className: d("flex flex-col h-full", v), children: [
2189
+ ), _ = n.toLocaleDateString([], { weekday: "short" }), I = n.getDate(), G = ce(n);
2190
+ return /* @__PURE__ */ r("div", { className: c("flex flex-col h-full", N), children: [
2173
2191
  /* @__PURE__ */ e(
2174
2192
  "div",
2175
2193
  {
2176
- className: d(
2194
+ className: c(
2177
2195
  "flex items-center gap-3 border-b px-4 py-3",
2178
- m?.columnHeader,
2179
- P && m?.columnHeaderToday
2196
+ h?.columnHeader,
2197
+ G && h?.columnHeaderToday
2180
2198
  ),
2181
2199
  children: /* @__PURE__ */ r("div", { className: "flex flex-col items-center", children: [
2182
2200
  /* @__PURE__ */ e(
2183
2201
  "span",
2184
2202
  {
2185
- className: d(
2203
+ className: c(
2186
2204
  "text-[11px] font-medium uppercase tracking-wide",
2187
- P ? "text-primary" : "text-muted-foreground"
2205
+ G ? "text-primary" : "text-muted-foreground"
2188
2206
  ),
2189
- children: z
2207
+ children: _
2190
2208
  }
2191
2209
  ),
2192
2210
  /* @__PURE__ */ e(
2193
2211
  "span",
2194
2212
  {
2195
- className: d(
2213
+ className: c(
2196
2214
  "flex items-center justify-center rounded-full mt-0.5",
2197
2215
  "size-12 text-3xl font-normal",
2198
- P ? "bg-primary text-primary-foreground" : "text-foreground"
2216
+ G ? "bg-primary text-primary-foreground" : "text-foreground"
2199
2217
  ),
2200
- children: R
2218
+ children: I
2201
2219
  }
2202
2220
  )
2203
2221
  ] })
2204
2222
  }
2205
2223
  ),
2206
- M.length > 0 && /* @__PURE__ */ e(
2207
- sn,
2224
+ L.length > 0 && /* @__PURE__ */ e(
2225
+ ln,
2208
2226
  {
2209
- events: M,
2227
+ events: L,
2210
2228
  date: n,
2211
- onEventClick: h,
2229
+ onEventClick: m,
2212
2230
  disablePopover: !!s && !y,
2213
2231
  renderPopover: y,
2214
- ...m?.multiDayBanner && { className: m.multiDayBanner }
2232
+ ...h?.multiDayBanner && { className: h.multiDayBanner }
2215
2233
  }
2216
2234
  ),
2217
2235
  /* @__PURE__ */ e(
2218
2236
  "div",
2219
2237
  {
2220
- ref: I,
2221
- className: d("flex-1", m?.scrollContainer),
2238
+ ref: B,
2239
+ className: c("flex-1", h?.scrollContainer),
2222
2240
  children: /* @__PURE__ */ r("div", { className: "relative min-h-full", children: [
2223
- O.map((k, c) => {
2241
+ $.map((k, d) => {
2224
2242
  const C = !at(n, k, a);
2225
2243
  return /* @__PURE__ */ r(
2226
2244
  "div",
2227
2245
  {
2228
- className: d(
2246
+ className: c(
2229
2247
  "relative flex",
2230
2248
  C && "bg-calendar-disabled-hour",
2231
- m?.timeSlot,
2232
- C ? m?.timeSlotNonWorking : m?.timeSlotWorking
2249
+ h?.timeSlot,
2250
+ C ? h?.timeSlotNonWorking : h?.timeSlotWorking
2233
2251
  ),
2234
2252
  style: { height: fe },
2235
2253
  children: [
2236
2254
  /* @__PURE__ */ e(
2237
2255
  "div",
2238
2256
  {
2239
- className: d(
2257
+ className: c(
2240
2258
  "relative flex-shrink-0 border-r border-border/50 bg-zinc-50 dark:bg-zinc-900",
2241
- m?.timeGutter
2259
+ h?.timeGutter
2242
2260
  ),
2243
- style: { width: We },
2244
- children: /* @__PURE__ */ e("div", { className: "absolute -top-2.5 right-1 sm:right-2 flex h-5 items-center", children: c !== 0 && /* @__PURE__ */ e(
2261
+ style: { width: Le },
2262
+ children: /* @__PURE__ */ e("div", { className: "absolute -top-2.5 right-1 sm:right-2 flex h-5 items-center", children: d !== 0 && /* @__PURE__ */ e(
2245
2263
  "span",
2246
2264
  {
2247
- className: d(
2265
+ className: c(
2248
2266
  "text-[10px] sm:text-xs text-muted-foreground",
2249
- m?.timeGutterLabel
2267
+ h?.timeGutterLabel
2250
2268
  ),
2251
- children: Ce(k)
2269
+ children: Se(k)
2252
2270
  }
2253
2271
  ) })
2254
2272
  }
2255
2273
  ),
2256
2274
  /* @__PURE__ */ r("div", { className: "relative flex-1", children: [
2257
2275
  A && !C && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-primary/5" }),
2258
- c !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
2259
- b.slice(1).map((H) => /* @__PURE__ */ e(
2276
+ d !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
2277
+ v.slice(1).map((O) => /* @__PURE__ */ e(
2260
2278
  "div",
2261
2279
  {
2262
2280
  className: "pointer-events-none absolute inset-x-0 border-b border-dashed border-border/30",
2263
- style: { top: `${H / 60 * 100}%` }
2281
+ style: { top: `${O / 60 * 100}%` }
2264
2282
  },
2265
- H
2283
+ O
2266
2284
  )),
2267
- b.map((H, T) => {
2268
- const Y = { date: n, hour: k, minute: H };
2285
+ v.map((O, j) => {
2286
+ const H = { date: n, hour: k, minute: O };
2269
2287
  return /* @__PURE__ */ e(
2270
- mt,
2288
+ ht,
2271
2289
  {
2272
- slot: Y,
2273
- onSelectionStart: $,
2274
- onSelectionMove: q,
2290
+ slot: H,
2291
+ onSelectionStart: V,
2292
+ onSelectionMove: R,
2275
2293
  onSelectionEnd: D,
2276
- isSelected: B?.isSlotSelected(Y) ?? !1,
2277
- isSelecting: B?.isSelecting ?? !1,
2294
+ isSelected: W?.isSlotSelected(H) ?? !1,
2295
+ isSelecting: W?.isSelecting ?? !1,
2278
2296
  disabled: C,
2279
2297
  className: "absolute inset-x-0",
2280
2298
  style: {
2281
- top: `${T * u}%`,
2299
+ top: `${j * u}%`,
2282
2300
  height: `${u}%`
2283
2301
  },
2284
- ariaLabel: `Add event at ${Ce(k)}:${String(H).padStart(2, "0")}`
2302
+ ariaLabel: `Add event at ${Se(k)}:${String(O).padStart(2, "0")}`
2285
2303
  },
2286
- H
2304
+ O
2287
2305
  );
2288
2306
  })
2289
2307
  ] })
@@ -2296,56 +2314,56 @@ function Mn({
2296
2314
  "div",
2297
2315
  {
2298
2316
  className: "absolute top-0 bottom-0 right-0 pointer-events-none",
2299
- style: { left: We },
2300
- children: _.map((k) => {
2301
- const c = L.get(k.id);
2302
- if (!c) return null;
2303
- const p = `calc(${c.width}% - 2px)`, C = `max(${Le}px, ${p})`;
2317
+ style: { left: Le },
2318
+ children: z.map((k) => {
2319
+ const d = M.get(k.id);
2320
+ if (!d) return null;
2321
+ const p = `calc(${d.width}% - 2px)`, C = `max(${Ae}px, ${p})`;
2304
2322
  return l ? /* @__PURE__ */ e(
2305
2323
  "div",
2306
2324
  {
2307
2325
  className: "absolute pointer-events-auto p-0.5",
2308
2326
  style: {
2309
- top: `${c.top}px`,
2310
- left: `${c.left}%`,
2327
+ top: `${d.top}px`,
2328
+ left: `${d.left}%`,
2311
2329
  width: C,
2312
- minWidth: `${Le}px`
2330
+ minWidth: `${Ae}px`
2313
2331
  },
2314
- children: l({ event: k, position: c })
2332
+ children: l({ event: k, position: d })
2315
2333
  },
2316
2334
  k.id
2317
2335
  ) : /* @__PURE__ */ e(
2318
- lt,
2336
+ dt,
2319
2337
  {
2320
2338
  event: k,
2321
2339
  position: {
2322
- top: c.top,
2323
- left: c.left,
2324
- width: c.width,
2325
- minWidth: Le
2340
+ top: d.top,
2341
+ left: d.left,
2342
+ width: d.width,
2343
+ minWidth: Ae
2326
2344
  },
2327
2345
  hourHeight: fe,
2328
2346
  badgeVariant: f,
2329
2347
  onClick: s,
2330
2348
  disablePopover: !!s && !y,
2331
2349
  renderPopover: y,
2332
- className: d("pointer-events-auto", m?.eventCard)
2350
+ className: c("pointer-events-auto", h?.eventCard)
2333
2351
  },
2334
2352
  k.id
2335
2353
  );
2336
2354
  })
2337
2355
  }
2338
2356
  ),
2339
- A && S >= 0 && /* @__PURE__ */ r(
2357
+ A && E >= 0 && /* @__PURE__ */ r(
2340
2358
  "div",
2341
2359
  {
2342
- className: d(
2360
+ className: c(
2343
2361
  "absolute left-0 right-0 z-20 flex items-center pointer-events-none",
2344
- m?.currentTimeIndicator
2362
+ h?.currentTimeIndicator
2345
2363
  ),
2346
2364
  style: {
2347
- top: S,
2348
- left: We
2365
+ top: E,
2366
+ left: Le
2349
2367
  },
2350
2368
  children: [
2351
2369
  /* @__PURE__ */ e("div", { className: "h-2.5 w-2.5 -ml-1 rounded-full bg-red-500" }),
@@ -2358,7 +2376,7 @@ function Mn({
2358
2376
  )
2359
2377
  ] });
2360
2378
  }
2361
- const cn = [
2379
+ const un = [
2362
2380
  { full: "Monday", short: "Mon", tiny: "M" },
2363
2381
  { full: "Tuesday", short: "Tue", tiny: "T" },
2364
2382
  { full: "Wednesday", short: "Wed", tiny: "W" },
@@ -2366,7 +2384,7 @@ const cn = [
2366
2384
  { full: "Friday", short: "Fri", tiny: "F" },
2367
2385
  { full: "Saturday", short: "Sat", tiny: "S" },
2368
2386
  { full: "Sunday", short: "Sun", tiny: "S" }
2369
- ], un = [
2387
+ ], mn = [
2370
2388
  { full: "Sunday", short: "Sun", tiny: "S" },
2371
2389
  { full: "Monday", short: "Mon", tiny: "M" },
2372
2390
  { full: "Tuesday", short: "Tue", tiny: "T" },
@@ -2375,7 +2393,7 @@ const cn = [
2375
2393
  { full: "Friday", short: "Fri", tiny: "F" },
2376
2394
  { full: "Saturday", short: "Sat", tiny: "S" }
2377
2395
  ], ge = 3;
2378
- function Tn({
2396
+ function Wn({
2379
2397
  events: t,
2380
2398
  date: n,
2381
2399
  weekStartsOn: o = 1,
@@ -2384,95 +2402,95 @@ function Tn({
2384
2402
  onSlotSelect: f,
2385
2403
  onDayClick: s,
2386
2404
  className: x,
2387
- renderEvent: v,
2405
+ renderEvent: N,
2388
2406
  renderPopover: l,
2389
2407
  showMoreMode: y,
2390
2408
  showMoreEventsInPopover: w = !1,
2391
- slots: m,
2409
+ slots: h,
2392
2410
  classNames: g
2393
2411
  }) {
2394
- const u = y ?? (w ? "popover" : "expand"), b = m?.dayCellHeader, N = m?.dayCellFooter, [_, M] = J(null), [L, O] = J(null), E = F(() => bt(n, o), [n, o]), A = F(() => {
2395
- const h = /* @__PURE__ */ new Map();
2396
- for (const z of E) {
2397
- const R = z.date.toDateString(), P = He(t, z.date);
2398
- P.sort((k, c) => k.startDate.getTime() - c.startDate.getTime()), h.set(R, P);
2412
+ const u = y ?? (w ? "popover" : "expand"), v = h?.dayCellHeader, b = h?.dayCellFooter, [z, L] = Y(null), [M, $] = Y(null), T = q(() => wt(n, o), [n, o]), A = q(() => {
2413
+ const m = /* @__PURE__ */ new Map();
2414
+ for (const _ of T) {
2415
+ const I = _.date.toDateString(), G = He(t, _.date);
2416
+ G.sort((k, d) => k.startDate.getTime() - d.startDate.getTime()), m.set(I, G);
2399
2417
  }
2400
- return h;
2401
- }, [E, t]), S = Oe(), I = W(
2402
- (h) => {
2403
- S?.startSelection(h);
2418
+ return m;
2419
+ }, [T, t]), E = Oe(), B = S(
2420
+ (m) => {
2421
+ E?.startSelection(m);
2404
2422
  },
2405
- [S]
2406
- ), B = W(
2407
- (h) => {
2408
- S?.updateSelection(h);
2423
+ [E]
2424
+ ), W = S(
2425
+ (m) => {
2426
+ E?.updateSelection(m);
2409
2427
  },
2410
- [S]
2411
- ), $ = W(() => {
2412
- S?.endSelection();
2413
- }, [S]), q = W(
2414
- (h) => {
2415
- s?.(h);
2428
+ [E]
2429
+ ), V = S(() => {
2430
+ E?.endSelection();
2431
+ }, [E]), R = S(
2432
+ (m) => {
2433
+ s?.(m);
2416
2434
  },
2417
2435
  [s]
2418
- ), D = o === 0 ? un : cn;
2419
- return /* @__PURE__ */ r("div", { className: d("flex flex-col h-full overflow-hidden", x), children: [
2436
+ ), D = o === 0 ? mn : un;
2437
+ return /* @__PURE__ */ r("div", { className: c("flex flex-col h-full overflow-hidden", x), children: [
2420
2438
  /* @__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: [
2421
2439
  /* @__PURE__ */ e(
2422
2440
  "div",
2423
2441
  {
2424
- className: d(
2442
+ className: c(
2425
2443
  "grid grid-cols-7 border-b !sticky !top-0 bg-background z-10",
2426
2444
  g?.weekdayHeader
2427
2445
  ),
2428
- children: D.map((h, z) => /* @__PURE__ */ r(
2446
+ children: D.map((m, _) => /* @__PURE__ */ r(
2429
2447
  "div",
2430
2448
  {
2431
- className: d(
2449
+ className: c(
2432
2450
  "py-2 sm:py-2.5 text-center text-[11px] uppercase font-medium tracking-wide text-muted-foreground",
2433
- z >= 5 && "text-muted-foreground/70",
2451
+ _ >= 5 && "text-muted-foreground/70",
2434
2452
  // Weekend
2435
2453
  g?.weekdayLabel
2436
2454
  ),
2437
2455
  children: [
2438
- /* @__PURE__ */ e("span", { className: "sm:hidden", children: h.short }),
2439
- /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: h.short })
2456
+ /* @__PURE__ */ e("span", { className: "sm:hidden", children: m.short }),
2457
+ /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: m.short })
2440
2458
  ]
2441
2459
  },
2442
- h.full
2460
+ m.full
2443
2461
  ))
2444
2462
  }
2445
2463
  ),
2446
- /* @__PURE__ */ e("div", { className: d("grid grid-cols-7 auto-rows-min", g?.monthGrid), children: E.map((h) => {
2447
- const z = h.date.toDateString(), R = A.get(z) || [], P = ce(h.date), k = h.date.getDay() === 0 || h.date.getDay() === 6, c = R.length > ge;
2464
+ /* @__PURE__ */ e("div", { className: c("grid grid-cols-7 auto-rows-min", g?.monthGrid), children: T.map((m) => {
2465
+ const _ = m.date.toDateString(), I = A.get(_) || [], G = ce(m.date), k = m.date.getDay() === 0 || m.date.getDay() === 6, d = I.length > ge;
2448
2466
  return /* @__PURE__ */ r(
2449
- dn,
2467
+ cn,
2450
2468
  {
2451
- date: h.date,
2452
- dataAttributes: { "data-day-key": z },
2453
- onSelectionStart: I,
2454
- onSelectionMove: B,
2455
- onSelectionEnd: $,
2456
- isSelected: S?.isSlotSelected({ date: h.date }) ?? !1,
2457
- isSelecting: S?.isSelecting ?? !1,
2458
- className: d(
2469
+ date: m.date,
2470
+ dataAttributes: { "data-day-key": _ },
2471
+ onSelectionStart: B,
2472
+ onSelectionMove: W,
2473
+ onSelectionEnd: V,
2474
+ isSelected: E?.isSlotSelected({ date: m.date }) ?? !1,
2475
+ isSelecting: E?.isSelecting ?? !1,
2476
+ className: c(
2459
2477
  "relative flex flex-col border-r border-b text-left min-h-[80px] sm:min-h-[100px] overflow-hidden",
2460
2478
  "[&:nth-child(7n)]:border-r-0",
2461
- !h.isCurrentMonth && "bg-muted/20",
2462
- k && h.isCurrentMonth && "bg-muted/10",
2479
+ !m.isCurrentMonth && "bg-muted/20",
2480
+ k && m.isCurrentMonth && "bg-muted/10",
2463
2481
  g?.dayCell,
2464
- P && g?.dayCellToday,
2465
- !h.isCurrentMonth && g?.dayCellOutside,
2482
+ G && g?.dayCellToday,
2483
+ !m.isCurrentMonth && g?.dayCellOutside,
2466
2484
  k && g?.dayCellWeekend
2467
2485
  ),
2468
- ariaLabel: `${h.date.toLocaleDateString()} - ${R.length} events. Click to create event, double-click to view day.`,
2486
+ ariaLabel: `${m.date.toLocaleDateString()} - ${I.length} events. Click to create event, double-click to view day.`,
2469
2487
  children: [
2470
2488
  /* @__PURE__ */ e(
2471
2489
  "div",
2472
2490
  {
2473
- className: d(
2491
+ className: c(
2474
2492
  "flex items-center justify-center p-1",
2475
- !h.isCurrentMonth && "text-muted-foreground/40",
2493
+ !m.isCurrentMonth && "text-muted-foreground/40",
2476
2494
  g?.dayCellNumber
2477
2495
  ),
2478
2496
  children: /* @__PURE__ */ e(
@@ -2480,25 +2498,25 @@ function Tn({
2480
2498
  {
2481
2499
  type: "button",
2482
2500
  onClick: (p) => {
2483
- p.stopPropagation(), q(h.date);
2501
+ p.stopPropagation(), R(m.date);
2484
2502
  },
2485
- className: d(
2503
+ className: c(
2486
2504
  "flex items-center justify-center rounded-full transition-colors",
2487
2505
  "size-7 text-sm font-normal",
2488
- P ? "bg-primary text-primary-foreground" : "hover:bg-muted"
2506
+ G ? "bg-primary text-primary-foreground" : "hover:bg-muted"
2489
2507
  ),
2490
- children: h.date.getDate()
2508
+ children: m.date.getDate()
2491
2509
  }
2492
2510
  )
2493
2511
  }
2494
2512
  ),
2495
- b && /* @__PURE__ */ e(
2496
- b,
2513
+ v && /* @__PURE__ */ e(
2514
+ v,
2497
2515
  {
2498
- date: h.date,
2499
- events: R,
2500
- isToday: P,
2501
- isCurrentMonth: h.isCurrentMonth,
2516
+ date: m.date,
2517
+ events: I,
2518
+ isToday: G,
2519
+ isCurrentMonth: m.isCurrentMonth,
2502
2520
  isWeekend: k,
2503
2521
  view: "month"
2504
2522
  }
@@ -2506,19 +2524,19 @@ function Tn({
2506
2524
  /* @__PURE__ */ r(
2507
2525
  "div",
2508
2526
  {
2509
- className: d(
2527
+ className: c(
2510
2528
  "flex-1 overflow-hidden px-2 pt-1 pb-1 space-y-1",
2511
2529
  g?.dayCellContent
2512
2530
  ),
2513
2531
  children: [
2514
- R.slice(0, ge).map((p) => /* @__PURE__ */ e(
2532
+ I.slice(0, ge).map((p) => /* @__PURE__ */ e(
2515
2533
  "div",
2516
2534
  {
2517
2535
  onPointerDown: (C) => {
2518
2536
  C.stopPropagation();
2519
2537
  },
2520
- children: v ? v({ event: p, variant: "compact" }) : /* @__PURE__ */ e(
2521
- Se,
2538
+ children: N ? N({ event: p, variant: "compact" }) : /* @__PURE__ */ e(
2539
+ Me,
2522
2540
  {
2523
2541
  event: p,
2524
2542
  variant: "compact",
@@ -2536,52 +2554,52 @@ function Tn({
2536
2554
  },
2537
2555
  p.id
2538
2556
  )),
2539
- c && u === "expand" && /* @__PURE__ */ r(
2557
+ d && u === "expand" && /* @__PURE__ */ r(
2540
2558
  "button",
2541
2559
  {
2542
2560
  type: "button",
2543
2561
  onPointerDown: (p) => p.stopPropagation(),
2544
2562
  onClick: (p) => {
2545
2563
  p.stopPropagation();
2546
- const C = document.querySelector(`[data-day-key="${z}"]`);
2547
- O({
2548
- date: h.date,
2549
- events: R,
2564
+ const C = document.querySelector(`[data-day-key="${_}"]`);
2565
+ $({
2566
+ date: m.date,
2567
+ events: I,
2550
2568
  rect: C?.getBoundingClientRect() ?? new DOMRect(window.innerWidth / 2 - 180, window.innerHeight / 2 - 240, 0, 0)
2551
2569
  });
2552
2570
  },
2553
- className: d(
2571
+ className: c(
2554
2572
  "w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
2555
2573
  g?.moreEventsIndicator
2556
2574
  ),
2557
2575
  children: [
2558
2576
  "+",
2559
- R.length - ge,
2577
+ I.length - ge,
2560
2578
  " more"
2561
2579
  ]
2562
2580
  }
2563
2581
  ),
2564
- c && u === "popover" && /* @__PURE__ */ r(
2565
- re,
2582
+ d && u === "popover" && /* @__PURE__ */ r(
2583
+ oe,
2566
2584
  {
2567
- open: _ === z,
2568
- onOpenChange: (p) => M(p ? z : null),
2585
+ open: z === _,
2586
+ onOpenChange: (p) => L(p ? _ : null),
2569
2587
  children: [
2570
- /* @__PURE__ */ e(oe, { asChild: !0, children: /* @__PURE__ */ r(
2588
+ /* @__PURE__ */ e(ae, { asChild: !0, children: /* @__PURE__ */ r(
2571
2589
  "button",
2572
2590
  {
2573
2591
  type: "button",
2574
2592
  onPointerDown: (p) => p.stopPropagation(),
2575
2593
  onClick: (p) => {
2576
- p.stopPropagation(), M(z);
2594
+ p.stopPropagation(), L(_);
2577
2595
  },
2578
- className: d(
2596
+ className: c(
2579
2597
  "w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
2580
2598
  g?.moreEventsIndicator
2581
2599
  ),
2582
2600
  children: [
2583
2601
  "+",
2584
- R.length - ge,
2602
+ I.length - ge,
2585
2603
  " more"
2586
2604
  ]
2587
2605
  }
@@ -2596,24 +2614,24 @@ function Tn({
2596
2614
  onPointerDown: (p) => p.stopPropagation(),
2597
2615
  children: [
2598
2616
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between mb-2 pb-2 border-b", children: [
2599
- /* @__PURE__ */ e("span", { className: "text-sm font-medium", children: h.date.toLocaleDateString(void 0, {
2617
+ /* @__PURE__ */ e("span", { className: "text-sm font-medium", children: m.date.toLocaleDateString(void 0, {
2600
2618
  weekday: "short",
2601
2619
  month: "short",
2602
2620
  day: "numeric"
2603
2621
  }) }),
2604
2622
  /* @__PURE__ */ r("span", { className: "text-xs text-muted-foreground", children: [
2605
- R.length,
2623
+ I.length,
2606
2624
  " events"
2607
2625
  ] })
2608
2626
  ] }),
2609
- /* @__PURE__ */ e("div", { className: "space-y-1.5", children: R.map((p) => /* @__PURE__ */ e("div", { children: v ? v({ event: p, variant: "compact" }) : /* @__PURE__ */ e(
2610
- Se,
2627
+ /* @__PURE__ */ e("div", { className: "space-y-1.5", children: I.map((p) => /* @__PURE__ */ e("div", { children: N ? N({ event: p, variant: "compact" }) : /* @__PURE__ */ e(
2628
+ Me,
2611
2629
  {
2612
2630
  event: p,
2613
2631
  variant: "compact",
2614
2632
  badgeVariant: a,
2615
2633
  onClick: (C) => {
2616
- M(null), i?.(C);
2634
+ L(null), i?.(C);
2617
2635
  },
2618
2636
  disablePopover: !!i && !l,
2619
2637
  renderPopover: l,
@@ -2626,19 +2644,19 @@ function Tn({
2626
2644
  ]
2627
2645
  }
2628
2646
  ),
2629
- c && u === "dayView" && /* @__PURE__ */ r(
2647
+ d && u === "dayView" && /* @__PURE__ */ r(
2630
2648
  "div",
2631
2649
  {
2632
2650
  onPointerDown: (p) => {
2633
- p.stopPropagation(), q(h.date);
2651
+ p.stopPropagation(), R(m.date);
2634
2652
  },
2635
- className: d(
2653
+ className: c(
2636
2654
  "w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
2637
2655
  g?.moreEventsIndicator
2638
2656
  ),
2639
2657
  children: [
2640
2658
  "+",
2641
- R.length - ge,
2659
+ I.length - ge,
2642
2660
  " more"
2643
2661
  ]
2644
2662
  }
@@ -2646,40 +2664,40 @@ function Tn({
2646
2664
  ]
2647
2665
  }
2648
2666
  ),
2649
- N && /* @__PURE__ */ e(
2650
- N,
2667
+ b && /* @__PURE__ */ e(
2668
+ b,
2651
2669
  {
2652
- date: h.date,
2653
- events: R,
2654
- isToday: P,
2655
- isCurrentMonth: h.isCurrentMonth,
2670
+ date: m.date,
2671
+ events: I,
2672
+ isToday: G,
2673
+ isCurrentMonth: m.isCurrentMonth,
2656
2674
  isWeekend: k,
2657
2675
  view: "month"
2658
2676
  }
2659
2677
  )
2660
2678
  ]
2661
2679
  },
2662
- z
2680
+ _
2663
2681
  );
2664
2682
  }) })
2665
2683
  ] }) }),
2666
2684
  /* @__PURE__ */ e(
2667
- rn,
2685
+ on,
2668
2686
  {
2669
- isOpen: L !== null,
2670
- onClose: () => O(null),
2671
- date: L?.date ?? /* @__PURE__ */ new Date(),
2672
- events: L?.events ?? [],
2673
- anchorRect: L?.rect ?? null,
2687
+ isOpen: M !== null,
2688
+ onClose: () => $(null),
2689
+ date: M?.date ?? /* @__PURE__ */ new Date(),
2690
+ events: M?.events ?? [],
2691
+ anchorRect: M?.rect ?? null,
2674
2692
  badgeVariant: a,
2675
2693
  onEventClick: i,
2676
- renderEvent: v,
2694
+ renderEvent: N,
2677
2695
  renderPopover: l
2678
2696
  }
2679
2697
  )
2680
2698
  ] });
2681
2699
  }
2682
- const Me = 26, Qe = 2, Ne = 4;
2700
+ const Te = 26, Qe = 2, ke = 4;
2683
2701
  function et(t, n) {
2684
2702
  const o = Ve(t);
2685
2703
  for (let i = 0; i < n.length; i++) {
@@ -2689,7 +2707,7 @@ function et(t, n) {
2689
2707
  const a = n[0];
2690
2708
  return a && o < Ve(a) ? -1 : 7;
2691
2709
  }
2692
- function mn(t) {
2710
+ function hn(t) {
2693
2711
  const n = [...t].sort((a, i) => {
2694
2712
  const f = a.endCol - a.startCol, s = i.endCol - i.startCol;
2695
2713
  return s !== f ? s - f : a.startCol - i.startCol;
@@ -2699,13 +2717,13 @@ function mn(t) {
2699
2717
  for (let s = 0; s < o.length; s++) {
2700
2718
  const x = o[s];
2701
2719
  if (!x) continue;
2702
- let v = !0;
2720
+ let N = !0;
2703
2721
  for (let l = a.startCol; l <= a.endCol; l++)
2704
2722
  if (x[l]) {
2705
- v = !1;
2723
+ N = !1;
2706
2724
  break;
2707
2725
  }
2708
- if (v) {
2726
+ if (N) {
2709
2727
  i = s;
2710
2728
  break;
2711
2729
  }
@@ -2718,22 +2736,22 @@ function mn(t) {
2718
2736
  return { ...a, row: i };
2719
2737
  });
2720
2738
  }
2721
- function hn({
2739
+ function pn({
2722
2740
  pe: t,
2723
2741
  onEventClick: n,
2724
2742
  disablePopover: o,
2725
2743
  renderPopover: a
2726
2744
  }) {
2727
- const [i, f] = J(!1), s = de(t.event.color), x = W(() => {
2745
+ const [i, f] = Y(!1), s = de(t.event.color), x = S(() => {
2728
2746
  o && n ? n(t.event) : o || f(!0);
2729
- }, [o, n, t.event]), v = W(() => {
2747
+ }, [o, n, t.event]), N = S(() => {
2730
2748
  f(!1);
2731
2749
  }, []), l = /* @__PURE__ */ r(
2732
2750
  "button",
2733
2751
  {
2734
2752
  type: "button",
2735
2753
  onClick: x,
2736
- className: d(
2754
+ className: c(
2737
2755
  "inline-flex items-center gap-1 rounded text-[10px] font-medium transition-opacity hover:opacity-80 mx-0.5 overflow-hidden w-full",
2738
2756
  "sm:text-xs",
2739
2757
  s.bg,
@@ -2743,8 +2761,8 @@ function hn({
2743
2761
  t.continuesAfter && "rounded-r-none -mr-0.5 pr-1"
2744
2762
  ),
2745
2763
  style: {
2746
- height: Me,
2747
- lineHeight: `${Me}px`,
2764
+ height: Te,
2765
+ lineHeight: `${Te}px`,
2748
2766
  paddingLeft: t.continuesBefore ? 4 : 6,
2749
2767
  paddingRight: t.continuesAfter ? 4 : 6
2750
2768
  },
@@ -2755,7 +2773,7 @@ function hn({
2755
2773
  t.continuesAfter && /* @__PURE__ */ e("span", { className: "text-[9px] opacity-60 flex-shrink-0", children: "▸" })
2756
2774
  ]
2757
2775
  }
2758
- ), y = /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
2776
+ ), y = /* @__PURE__ */ e(re, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
2759
2777
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.event.title }),
2760
2778
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t.event) })
2761
2779
  ] }) }), w = {
@@ -2765,24 +2783,24 @@ function hn({
2765
2783
  return o ? /* @__PURE__ */ e("div", { style: w, children: /* @__PURE__ */ r(ie, { children: [
2766
2784
  /* @__PURE__ */ e(se, { asChild: !0, children: l }),
2767
2785
  y
2768
- ] }) }) : /* @__PURE__ */ e("div", { style: w, children: /* @__PURE__ */ r(re, { open: i, onOpenChange: f, children: [
2769
- /* @__PURE__ */ e(oe, { asChild: !0, children: l }),
2770
- /* @__PURE__ */ e(Q, { className: "w-80", children: a ? a({ event: t.event, onClose: v }) : /* @__PURE__ */ e(pn, { event: t.event, onClose: v }) })
2786
+ ] }) }) : /* @__PURE__ */ e("div", { style: w, children: /* @__PURE__ */ r(oe, { open: i, onOpenChange: f, children: [
2787
+ /* @__PURE__ */ e(ae, { asChild: !0, children: l }),
2788
+ /* @__PURE__ */ e(Q, { className: "w-80", children: a ? a({ event: t.event, onClose: N }) : /* @__PURE__ */ e(fn, { event: t.event, onClose: N }) })
2771
2789
  ] }) });
2772
2790
  }
2773
- function pn({
2791
+ function fn({
2774
2792
  event: t,
2775
2793
  onClose: n
2776
2794
  }) {
2777
2795
  const o = de(t.color), a = t.isCanceled ?? !1;
2778
2796
  return /* @__PURE__ */ r("div", { className: "space-y-3", children: [
2779
2797
  /* @__PURE__ */ r("div", { className: "flex items-start gap-3", children: [
2780
- /* @__PURE__ */ e("div", { className: d("size-4 rounded shrink-0 mt-0.5", o.dot) }),
2798
+ /* @__PURE__ */ e("div", { className: c("size-4 rounded shrink-0 mt-0.5", o.dot) }),
2781
2799
  /* @__PURE__ */ r("div", { className: "flex-1 min-w-0", children: [
2782
2800
  /* @__PURE__ */ e(
2783
2801
  "h3",
2784
2802
  {
2785
- className: d(
2803
+ className: c(
2786
2804
  "font-semibold text-lg",
2787
2805
  a && "line-through opacity-50"
2788
2806
  ),
@@ -2808,7 +2826,7 @@ function pn({
2808
2826
  ) })
2809
2827
  ] });
2810
2828
  }
2811
- function fn({
2829
+ function gn({
2812
2830
  events: t,
2813
2831
  weekDays: n,
2814
2832
  hourColumnWidth: o,
@@ -2817,45 +2835,45 @@ function fn({
2817
2835
  onEventClick: f,
2818
2836
  disablePopover: s = !1,
2819
2837
  renderPopover: x,
2820
- className: v
2838
+ className: N
2821
2839
  }) {
2822
- const l = F(() => {
2840
+ const l = q(() => {
2823
2841
  if (t.length === 0) return [];
2824
- const N = t.map((_) => {
2825
- const M = et(_.startDate, n), L = et(_.endDate, n), O = Math.max(0, M), E = Math.min(6, L);
2826
- if (O > 6 || E < 0) return null;
2827
- const A = M < 0, S = L > 6, B = De(_) && le(_.startDate, _.endDate);
2842
+ const b = t.map((z) => {
2843
+ const L = et(z.startDate, n), M = et(z.endDate, n), $ = Math.max(0, L), T = Math.min(6, M);
2844
+ if ($ > 6 || T < 0) return null;
2845
+ const A = L < 0, E = M > 6, W = Ce(z) && le(z.startDate, z.endDate);
2828
2846
  return {
2829
- event: _,
2830
- startCol: O,
2831
- endCol: E,
2847
+ event: z,
2848
+ startCol: $,
2849
+ endCol: T,
2832
2850
  continuesBefore: A,
2833
- continuesAfter: S,
2834
- isSingleDayAllDay: B
2851
+ continuesAfter: E,
2852
+ isSingleDayAllDay: W
2835
2853
  };
2836
2854
  }).filter(Boolean);
2837
- return mn(N);
2855
+ return hn(b);
2838
2856
  }, [t, n]);
2839
2857
  if (l.length === 0) return null;
2840
- const y = Math.max(...l.map((N) => N.row)) + 1, w = Math.min(y, Ne), m = y > Ne, g = m ? l.filter((N) => N.row >= Ne).length : 0, u = [
2858
+ const y = Math.max(...l.map((b) => b.row)) + 1, w = Math.min(y, ke), h = y > ke, g = h ? l.filter((b) => b.row >= ke).length : 0, u = [
2841
2859
  `${o}px`,
2842
- ...i.map((N) => N > a ? `${N}px` : `minmax(${a}px, 1fr)`)
2843
- ].join(" "), b = w * Me + (w - 1) * Qe + 8;
2860
+ ...i.map((b) => b > a ? `${b}px` : `minmax(${a}px, 1fr)`)
2861
+ ].join(" "), v = w * Te + (w - 1) * Qe + 8;
2844
2862
  return /* @__PURE__ */ r(
2845
2863
  "div",
2846
2864
  {
2847
- className: d(
2865
+ className: c(
2848
2866
  "ic-all-day-row border-b bg-muted/20 relative",
2849
- v
2867
+ N
2850
2868
  ),
2851
2869
  style: {
2852
2870
  display: "grid",
2853
2871
  gridTemplateColumns: u,
2854
- gridTemplateRows: `repeat(${w}, ${Me}px)`,
2872
+ gridTemplateRows: `repeat(${w}, ${Te}px)`,
2855
2873
  gap: `${Qe}px 0`,
2856
2874
  paddingTop: 4,
2857
2875
  paddingBottom: 4,
2858
- minHeight: b
2876
+ minHeight: v
2859
2877
  },
2860
2878
  children: [
2861
2879
  /* @__PURE__ */ e(
@@ -2869,28 +2887,28 @@ function fn({
2869
2887
  children: /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: "All day" })
2870
2888
  }
2871
2889
  ),
2872
- n.map((N, _) => /* @__PURE__ */ e(
2890
+ n.map((b, z) => /* @__PURE__ */ e(
2873
2891
  "div",
2874
2892
  {
2875
2893
  className: "pointer-events-none border-r last:border-r-0",
2876
2894
  style: {
2877
- gridColumn: _ + 2,
2895
+ gridColumn: z + 2,
2878
2896
  gridRow: `1 / span ${w}`
2879
2897
  }
2880
2898
  },
2881
- N.toDateString()
2899
+ b.toDateString()
2882
2900
  )),
2883
- l.filter((N) => N.row < Ne).map((N) => /* @__PURE__ */ e(
2884
- hn,
2901
+ l.filter((b) => b.row < ke).map((b) => /* @__PURE__ */ e(
2902
+ pn,
2885
2903
  {
2886
- pe: N,
2904
+ pe: b,
2887
2905
  onEventClick: f,
2888
2906
  disablePopover: s,
2889
2907
  renderPopover: x
2890
2908
  },
2891
- N.event.id
2909
+ b.event.id
2892
2910
  )),
2893
- m && /* @__PURE__ */ r(
2911
+ h && /* @__PURE__ */ r(
2894
2912
  "div",
2895
2913
  {
2896
2914
  className: "text-[10px] text-muted-foreground font-medium px-2 flex items-center",
@@ -2909,8 +2927,8 @@ function fn({
2909
2927
  }
2910
2928
  );
2911
2929
  }
2912
- const ue = 96, xe = 56, tt = 72, Z = 120, ke = 100, gn = 3;
2913
- function Wn({
2930
+ const ue = 96, xe = 56, tt = 72, Z = 120, De = 100, xn = 3;
2931
+ function Ln({
2914
2932
  events: t,
2915
2933
  date: n,
2916
2934
  weekStartsOn: o = 1,
@@ -2919,128 +2937,128 @@ function Wn({
2919
2937
  slotDuration: f = 30,
2920
2938
  badgeVariant: s = "colored",
2921
2939
  onEventClick: x,
2922
- onSlotSelect: v,
2940
+ onSlotSelect: N,
2923
2941
  onDayClick: l,
2924
2942
  className: y,
2925
2943
  renderEvent: w,
2926
- renderPopover: m,
2944
+ renderPopover: h,
2927
2945
  slots: g,
2928
2946
  classNames: u
2929
2947
  }) {
2930
- const b = 60 / f, N = 100 / b, _ = F(() => {
2931
- const c = [];
2932
- for (let p = 0; p < b; p++)
2933
- c.push(p * f);
2934
- return c;
2935
- }, [b, f]), M = F(
2936
- () => wt(n, o),
2948
+ const v = 60 / f, b = 100 / v, z = q(() => {
2949
+ const d = [];
2950
+ for (let p = 0; p < v; p++)
2951
+ d.push(p * f);
2952
+ return d;
2953
+ }, [v, f]), L = q(
2954
+ () => vt(n, o),
2937
2955
  [n, o]
2938
- ), L = F(
2956
+ ), M = q(
2939
2957
  () => ot(a),
2940
2958
  [a]
2941
- ), O = F(() => {
2942
- const c = /* @__PURE__ */ new Map();
2943
- for (const p of M) {
2944
- const C = p.toDateString(), H = He(t, p), { singleDay: T, multiDay: Y } = nt(H), j = rt(
2945
- T,
2959
+ ), $ = q(() => {
2960
+ const d = /* @__PURE__ */ new Map();
2961
+ for (const p of L) {
2962
+ const C = p.toDateString(), O = He(t, p), { singleDay: j, multiDay: H } = nt(O), F = rt(
2963
+ j,
2946
2964
  p,
2947
2965
  a,
2948
2966
  ue
2949
- ), G = /* @__PURE__ */ new Map();
2950
- let U = 1;
2951
- for (const K of j)
2952
- if (G.set(K.event.id, K.position), K.position.width > 0) {
2953
- const ae = Math.round(100 / K.position.width);
2954
- U = Math.max(U, ae);
2967
+ ), U = /* @__PURE__ */ new Map();
2968
+ let te = 1;
2969
+ for (const P of F)
2970
+ if (U.set(P.event.id, P.position), P.position.width > 0) {
2971
+ const J = Math.round(100 / P.position.width);
2972
+ te = Math.max(te, J);
2955
2973
  }
2956
- c.set(C, {
2957
- singleDay: T,
2958
- multiDay: Y,
2959
- positions: G,
2960
- maxOverlapping: U
2974
+ d.set(C, {
2975
+ singleDay: j,
2976
+ multiDay: H,
2977
+ positions: U,
2978
+ maxOverlapping: te
2961
2979
  });
2962
2980
  }
2963
- return c;
2964
- }, [M, t, a]), E = F(() => {
2965
- const c = /* @__PURE__ */ new Map();
2966
- for (const { multiDay: p } of O.values())
2981
+ return d;
2982
+ }, [L, t, a]), T = q(() => {
2983
+ const d = /* @__PURE__ */ new Map();
2984
+ for (const { multiDay: p } of $.values())
2967
2985
  for (const C of p)
2968
- c.set(C.id, C);
2969
- return Array.from(c.values());
2970
- }, [O]), A = /* @__PURE__ */ new Date(), S = M.findIndex((c) => ce(c)), I = F(() => {
2971
- if (S < 0) return -1;
2972
- const c = A.getHours() + A.getMinutes() / 60;
2973
- return c < a.startHour || c > a.endHour ? -1 : (c - a.startHour) * ue;
2974
- }, [S, a, A]), B = te(null);
2975
- Ie(() => {
2976
- const c = B.current;
2977
- if (!c) return;
2986
+ d.set(C.id, C);
2987
+ return Array.from(d.values());
2988
+ }, [$]), A = /* @__PURE__ */ new Date(), E = L.findIndex((d) => ce(d)), B = q(() => {
2989
+ if (E < 0) return -1;
2990
+ const d = A.getHours() + A.getMinutes() / 60;
2991
+ return d < a.startHour || d > a.endHour ? -1 : (d - a.startHour) * ue;
2992
+ }, [E, a, A]), W = ne(null);
2993
+ $e(() => {
2994
+ const d = W.current;
2995
+ if (!d) return;
2978
2996
  const p = () => {
2979
2997
  let C;
2980
- if (S !== -1) {
2981
- const T = (/* @__PURE__ */ new Date()).getHours();
2982
- C = Math.max(T - 1, a.startHour);
2998
+ if (E !== -1) {
2999
+ const j = (/* @__PURE__ */ new Date()).getHours();
3000
+ C = Math.max(j - 1, a.startHour);
2983
3001
  } else {
2984
- const Y = (/* @__PURE__ */ new Date()).getDay();
2985
- let j = i?.[Y];
2986
- if (!j?.enabled || j.from === 0) {
2987
- const G = i?.[1];
2988
- G?.enabled && (j = G);
3002
+ const H = (/* @__PURE__ */ new Date()).getDay();
3003
+ let F = i?.[H];
3004
+ if (!F?.enabled || F.from === 0) {
3005
+ const U = i?.[1];
3006
+ U?.enabled && (F = U);
2989
3007
  }
2990
- j?.enabled && j.from > 0 ? C = Math.max(
2991
- j.from - 1,
3008
+ F?.enabled && F.from > 0 ? C = Math.max(
3009
+ F.from - 1,
2992
3010
  a.startHour
2993
3011
  ) : C = Math.max(7, a.startHour);
2994
3012
  }
2995
- const H = (C - a.startHour) * ue;
2996
- c.scrollTo({
2997
- top: H,
3013
+ const O = (C - a.startHour) * ue;
3014
+ d.scrollTo({
3015
+ top: O,
2998
3016
  behavior: "instant"
2999
3017
  });
3000
3018
  };
3001
3019
  requestAnimationFrame(() => {
3002
3020
  requestAnimationFrame(p);
3003
3021
  });
3004
- }, [n, i, a, S]);
3005
- const $ = Oe(), q = W(
3006
- (c) => {
3007
- $?.startSelection(c);
3022
+ }, [n, i, a, E]);
3023
+ const V = Oe(), R = S(
3024
+ (d) => {
3025
+ V?.startSelection(d);
3008
3026
  },
3009
- [$]
3010
- ), D = W(
3011
- (c) => {
3012
- $?.updateSelection(c);
3027
+ [V]
3028
+ ), D = S(
3029
+ (d) => {
3030
+ V?.updateSelection(d);
3013
3031
  },
3014
- [$]
3015
- ), h = W(() => {
3016
- $?.endSelection();
3017
- }, [$]), z = W(
3018
- (c) => {
3019
- x?.(c);
3032
+ [V]
3033
+ ), m = S(() => {
3034
+ V?.endSelection();
3035
+ }, [V]), _ = S(
3036
+ (d) => {
3037
+ x?.(d);
3020
3038
  },
3021
3039
  [x]
3022
- ), R = xe + 7 * Z, P = F(() => {
3023
- const c = [];
3024
- for (const p of M) {
3025
- const C = p.toDateString(), T = O.get(C)?.maxOverlapping ?? 1;
3026
- T > gn ? c.push(
3027
- Math.max(Z, T * ke)
3028
- ) : c.push(Z);
3040
+ ), I = xe + 7 * Z, G = q(() => {
3041
+ const d = [];
3042
+ for (const p of L) {
3043
+ const C = p.toDateString(), j = $.get(C)?.maxOverlapping ?? 1;
3044
+ j > xn ? d.push(
3045
+ Math.max(Z, j * De)
3046
+ ) : d.push(Z);
3029
3047
  }
3030
- return c;
3031
- }, [M, O]), k = xe + P.reduce((c, p) => c + p, 0);
3032
- return /* @__PURE__ */ r("div", { className: d("ic-week-view flex flex-col h-full", y), children: [
3033
- E.length > 0 && /* @__PURE__ */ e(
3034
- fn,
3048
+ return d;
3049
+ }, [L, $]), k = xe + G.reduce((d, p) => d + p, 0);
3050
+ return /* @__PURE__ */ r("div", { className: c("ic-week-view flex flex-col h-full", y), children: [
3051
+ T.length > 0 && /* @__PURE__ */ e(
3052
+ gn,
3035
3053
  {
3036
- events: E,
3037
- weekDays: M,
3054
+ events: T,
3055
+ weekDays: L,
3038
3056
  hourColumnWidth: xe,
3039
3057
  minDayColumnWidth: Z,
3040
- dayColumnWidths: P,
3041
- onEventClick: z,
3042
- disablePopover: !!x && !m,
3043
- renderPopover: m,
3058
+ dayColumnWidths: G,
3059
+ onEventClick: _,
3060
+ disablePopover: !!x && !h,
3061
+ renderPopover: h,
3044
3062
  ...u?.multiDayBanner && {
3045
3063
  className: u.multiDayBanner
3046
3064
  }
@@ -3049,12 +3067,12 @@ function Wn({
3049
3067
  /* @__PURE__ */ e(
3050
3068
  "div",
3051
3069
  {
3052
- ref: B,
3053
- className: d(
3070
+ ref: W,
3071
+ className: c(
3054
3072
  "ic-week-scroll-container flex-1",
3055
3073
  u?.scrollContainer
3056
3074
  ),
3057
- children: /* @__PURE__ */ r("div", { style: { minWidth: Math.max(R, k) }, children: [
3075
+ children: /* @__PURE__ */ r("div", { style: { minWidth: Math.max(I, k) }, children: [
3058
3076
  /* @__PURE__ */ e("div", { className: "ic-week-header sticky top-0 z-20 border-b bg-background", children: /* @__PURE__ */ r("div", { className: "flex", children: [
3059
3077
  /* @__PURE__ */ e(
3060
3078
  "div",
@@ -3064,53 +3082,53 @@ function Wn({
3064
3082
  children: /* @__PURE__ */ r("span", { className: "hidden sm:inline", children: [
3065
3083
  "GMT",
3066
3084
  (() => {
3067
- const c = (/* @__PURE__ */ new Date()).getTimezoneOffset(), p = Math.abs(Math.floor(c / 60)), C = c <= 0 ? "+" : "-";
3085
+ const d = (/* @__PURE__ */ new Date()).getTimezoneOffset(), p = Math.abs(Math.floor(d / 60)), C = d <= 0 ? "+" : "-";
3068
3086
  return p > 0 ? `${C}${String(p).padStart(2, "0")}` : "";
3069
3087
  })()
3070
3088
  ] })
3071
3089
  }
3072
3090
  ),
3073
- M.map((c, p) => {
3074
- const C = ce(c), H = P[p] ?? Z, T = H > Z;
3091
+ L.map((d, p) => {
3092
+ const C = ce(d), O = G[p] ?? Z, j = O > Z;
3075
3093
  return /* @__PURE__ */ r(
3076
3094
  "div",
3077
3095
  {
3078
- className: d(
3096
+ className: c(
3079
3097
  "flex-1 flex flex-col items-center justify-center border-r last:border-r-0 py-2",
3080
3098
  u?.columnHeader,
3081
3099
  C && u?.columnHeaderToday
3082
3100
  ),
3083
3101
  style: {
3084
3102
  height: tt,
3085
- minWidth: T ? H : Z
3103
+ minWidth: j ? O : Z
3086
3104
  },
3087
3105
  children: [
3088
3106
  /* @__PURE__ */ e(
3089
3107
  "span",
3090
3108
  {
3091
- className: d(
3109
+ className: c(
3092
3110
  "text-[11px] font-medium uppercase tracking-wide",
3093
3111
  C ? "text-primary" : "text-muted-foreground"
3094
3112
  ),
3095
- children: c.toLocaleDateString([], { weekday: "short" })
3113
+ children: d.toLocaleDateString([], { weekday: "short" })
3096
3114
  }
3097
3115
  ),
3098
3116
  /* @__PURE__ */ e(
3099
3117
  "button",
3100
3118
  {
3101
3119
  type: "button",
3102
- onClick: () => l?.(c),
3103
- className: d(
3120
+ onClick: () => l?.(d),
3121
+ className: c(
3104
3122
  "flex items-center justify-center rounded-full transition-colors mt-0.5",
3105
3123
  "size-10 text-2xl font-normal",
3106
3124
  C ? "bg-primary text-primary-foreground" : "text-foreground hover:bg-muted"
3107
3125
  ),
3108
- children: c.getDate()
3126
+ children: d.getDate()
3109
3127
  }
3110
3128
  )
3111
3129
  ]
3112
3130
  },
3113
- c.toDateString()
3131
+ d.toDateString()
3114
3132
  );
3115
3133
  })
3116
3134
  ] }) }),
@@ -3118,12 +3136,12 @@ function Wn({
3118
3136
  /* @__PURE__ */ e(
3119
3137
  "div",
3120
3138
  {
3121
- className: d(
3139
+ className: c(
3122
3140
  "ic-hour-column sticky left-0 z-10 bg-zinc-50 border-r",
3123
3141
  u?.timeGutter
3124
3142
  ),
3125
3143
  style: { width: xe },
3126
- children: L.map((c, p) => /* @__PURE__ */ e(
3144
+ children: M.map((d, p) => /* @__PURE__ */ e(
3127
3145
  "div",
3128
3146
  {
3129
3147
  className: "relative",
@@ -3131,134 +3149,134 @@ function Wn({
3131
3149
  children: /* @__PURE__ */ e("div", { className: "absolute -top-2.5 right-1 sm:right-2 flex h-5 items-center", children: p !== 0 && /* @__PURE__ */ e(
3132
3150
  "span",
3133
3151
  {
3134
- className: d(
3152
+ className: c(
3135
3153
  "text-[10px] sm:text-xs text-muted-foreground",
3136
3154
  u?.timeGutterLabel
3137
3155
  ),
3138
- children: Ce(c)
3156
+ children: Se(d)
3139
3157
  }
3140
3158
  ) })
3141
3159
  },
3142
- c
3160
+ d
3143
3161
  ))
3144
3162
  }
3145
3163
  ),
3146
- /* @__PURE__ */ e("div", { className: "ic-week-grid relative flex-1", children: /* @__PURE__ */ e("div", { className: "flex divide-x", children: M.map((c, p) => {
3147
- const C = c.toDateString(), H = O.get(C), T = P[p] ?? Z, Y = T > Z;
3164
+ /* @__PURE__ */ e("div", { className: "ic-week-grid relative flex-1", children: /* @__PURE__ */ e("div", { className: "flex divide-x", children: L.map((d, p) => {
3165
+ const C = d.toDateString(), O = $.get(C), j = G[p] ?? Z, H = j > Z;
3148
3166
  return /* @__PURE__ */ r(
3149
3167
  "div",
3150
3168
  {
3151
3169
  className: "ic-day-column relative flex-1",
3152
3170
  style: {
3153
- minWidth: Y ? T : Z
3171
+ minWidth: H ? j : Z
3154
3172
  },
3155
3173
  children: [
3156
- L.map((j, G) => {
3157
- const K = !at(
3158
- c,
3159
- j,
3174
+ M.map((F, U) => {
3175
+ const P = !at(
3176
+ d,
3177
+ F,
3160
3178
  i
3161
3179
  );
3162
3180
  return /* @__PURE__ */ r(
3163
3181
  "div",
3164
3182
  {
3165
- className: d(
3183
+ className: c(
3166
3184
  "relative",
3167
- K && "bg-calendar-disabled-hour",
3168
- ce(c) && !K && "bg-primary/5",
3185
+ P && "bg-calendar-disabled-hour",
3186
+ ce(d) && !P && "bg-primary/5",
3169
3187
  u?.timeSlot,
3170
- K ? u?.timeSlotNonWorking : u?.timeSlotWorking
3188
+ P ? u?.timeSlotNonWorking : u?.timeSlotWorking
3171
3189
  ),
3172
3190
  style: { height: ue },
3173
3191
  children: [
3174
- G !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
3175
- _.slice(1).map((ae) => /* @__PURE__ */ e(
3192
+ U !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
3193
+ z.slice(1).map((J) => /* @__PURE__ */ e(
3176
3194
  "div",
3177
3195
  {
3178
3196
  className: "pointer-events-none absolute inset-x-0 border-b border-dashed border-border/30",
3179
- style: { top: `${ae / 60 * 100}%` }
3197
+ style: { top: `${J / 60 * 100}%` }
3180
3198
  },
3181
- ae
3199
+ J
3182
3200
  )),
3183
- _.map((ae, ht) => {
3201
+ z.map((J, pt) => {
3184
3202
  const Fe = {
3185
- date: c,
3186
- hour: j,
3187
- minute: ae
3203
+ date: d,
3204
+ hour: F,
3205
+ minute: J
3188
3206
  };
3189
3207
  return /* @__PURE__ */ e(
3190
- mt,
3208
+ ht,
3191
3209
  {
3192
3210
  slot: Fe,
3193
- onSelectionStart: q,
3211
+ onSelectionStart: R,
3194
3212
  onSelectionMove: D,
3195
- onSelectionEnd: h,
3196
- isSelected: $?.isSlotSelected(Fe) ?? !1,
3197
- isSelecting: $?.isSelecting ?? !1,
3198
- disabled: K,
3213
+ onSelectionEnd: m,
3214
+ isSelected: V?.isSlotSelected(Fe) ?? !1,
3215
+ isSelecting: V?.isSelecting ?? !1,
3216
+ disabled: P,
3199
3217
  className: "absolute inset-x-0",
3200
3218
  style: {
3201
- top: `${ht * N}%`,
3202
- height: `${N}%`
3219
+ top: `${pt * b}%`,
3220
+ height: `${b}%`
3203
3221
  },
3204
- ariaLabel: `Add event on ${c.toLocaleDateString()} at ${Ce(j)}:${String(ae).padStart(2, "0")}`
3222
+ ariaLabel: `Add event on ${d.toLocaleDateString()} at ${Se(F)}:${String(J).padStart(2, "0")}`
3205
3223
  },
3206
- ae
3224
+ J
3207
3225
  );
3208
3226
  })
3209
3227
  ]
3210
3228
  },
3211
- j
3229
+ F
3212
3230
  );
3213
3231
  }),
3214
- H?.singleDay.map((j) => {
3215
- const G = H.positions.get(j.id);
3216
- if (!G) return null;
3217
- const U = `calc(${G.width}% - 2px)`, K = `max(${ke}px, ${U})`;
3232
+ O?.singleDay.map((F) => {
3233
+ const U = O.positions.get(F.id);
3234
+ if (!U) return null;
3235
+ const te = `calc(${U.width}% - 2px)`, P = `max(${De}px, ${te})`;
3218
3236
  return w ? /* @__PURE__ */ e(
3219
3237
  "div",
3220
3238
  {
3221
3239
  className: "absolute pointer-events-auto p-0.5",
3222
3240
  style: {
3223
- top: `${G.top}px`,
3224
- left: `${G.left}%`,
3225
- width: K,
3226
- minWidth: `${ke}px`
3241
+ top: `${U.top}px`,
3242
+ left: `${U.left}%`,
3243
+ width: P,
3244
+ minWidth: `${De}px`
3227
3245
  },
3228
- children: w({ event: j, position: G })
3246
+ children: w({ event: F, position: U })
3229
3247
  },
3230
- j.id
3248
+ F.id
3231
3249
  ) : /* @__PURE__ */ e(
3232
- lt,
3250
+ dt,
3233
3251
  {
3234
- event: j,
3252
+ event: F,
3235
3253
  position: {
3236
- top: G.top,
3237
- left: G.left,
3238
- width: G.width,
3239
- minWidth: ke
3254
+ top: U.top,
3255
+ left: U.left,
3256
+ width: U.width,
3257
+ minWidth: De
3240
3258
  },
3241
3259
  hourHeight: ue,
3242
3260
  badgeVariant: s,
3243
3261
  onClick: x,
3244
- disablePopover: !!x && !m,
3245
- renderPopover: m,
3246
- className: d(
3262
+ disablePopover: !!x && !h,
3263
+ renderPopover: h,
3264
+ className: c(
3247
3265
  "pointer-events-auto",
3248
3266
  u?.eventCard
3249
3267
  )
3250
3268
  },
3251
- j.id
3269
+ F.id
3252
3270
  );
3253
3271
  }),
3254
- p === S && I >= 0 && /* @__PURE__ */ r(
3272
+ p === E && B >= 0 && /* @__PURE__ */ r(
3255
3273
  "div",
3256
3274
  {
3257
- className: d(
3275
+ className: c(
3258
3276
  "absolute left-0 right-0 z-20 flex items-center pointer-events-none",
3259
3277
  u?.currentTimeIndicator
3260
3278
  ),
3261
- style: { top: I },
3279
+ style: { top: B },
3262
3280
  children: [
3263
3281
  /* @__PURE__ */ e("div", { className: "h-2 w-2 -ml-1 rounded-full bg-red-500" }),
3264
3282
  /* @__PURE__ */ e("div", { className: "flex-1 h-0.5 bg-red-500" })
@@ -3267,7 +3285,7 @@ function Wn({
3267
3285
  )
3268
3286
  ]
3269
3287
  },
3270
- c.toDateString()
3288
+ d.toDateString()
3271
3289
  );
3272
3290
  }) }) })
3273
3291
  ] })
@@ -3277,35 +3295,35 @@ function Wn({
3277
3295
  ] });
3278
3296
  }
3279
3297
  export {
3280
- Sn as A,
3298
+ Mn as A,
3281
3299
  me as B,
3282
- Cn as C,
3283
- Ut as D,
3284
- lt as E,
3285
- Tn as M,
3286
- re as P,
3287
- mt as T,
3288
- Wn as W,
3289
- rn as a,
3290
- dn as b,
3291
- Mn as c,
3292
- Se as d,
3293
- sn as e,
3294
- Dn as f,
3295
- Nn as g,
3300
+ Sn as C,
3301
+ qt as D,
3302
+ dt as E,
3303
+ Wn as M,
3304
+ oe as P,
3305
+ ht as T,
3306
+ Ln as W,
3307
+ on as a,
3308
+ cn as b,
3309
+ Tn as c,
3310
+ Me as d,
3311
+ ln as e,
3312
+ Cn as f,
3313
+ kn as g,
3296
3314
  Q as h,
3297
- oe as i,
3298
- Kt as j,
3315
+ ae as i,
3316
+ Xt as j,
3299
3317
  ie as k,
3300
- ne as l,
3301
- kn as m,
3318
+ re as l,
3319
+ Dn as m,
3302
3320
  se as n,
3303
- kt as o,
3321
+ Dt as o,
3304
3322
  de as p,
3305
3323
  Ke as q,
3306
3324
  Xe as r,
3307
3325
  _e as s,
3308
- Be as t,
3309
- Pt as u
3326
+ Ie as t,
3327
+ Ft as u
3310
3328
  };
3311
- //# sourceMappingURL=week-view-C4YFlrPS.js.map
3329
+ //# sourceMappingURL=week-view-aRPB2cjn.js.map