@innosolutions/inno-calendar 1.0.34 → 1.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/{agenda-widget-BwL7DItQ.js → agenda-widget-BKIaXFpN.js} +1186 -1128
  2. package/dist/agenda-widget-BKIaXFpN.js.map +1 -0
  3. package/dist/agenda-widget-BtTvMs9i.cjs +2 -0
  4. package/dist/agenda-widget-BtTvMs9i.cjs.map +1 -0
  5. package/dist/components/event/event-card.d.ts +1 -0
  6. package/dist/components/event/event-card.d.ts.map +1 -1
  7. package/dist/components/index.cjs +1 -1
  8. package/dist/components/index.mjs +2 -2
  9. package/dist/components/inno-calendar.d.ts +8 -2
  10. package/dist/components/inno-calendar.d.ts.map +1 -1
  11. package/dist/components/views/day-view.d.ts.map +1 -1
  12. package/dist/components/views/timeline-view.d.ts.map +1 -1
  13. package/dist/components/views/week-view.d.ts.map +1 -1
  14. package/dist/core/index.d.ts +1 -1
  15. package/dist/core/index.d.ts.map +1 -1
  16. package/dist/core/types.d.ts +32 -0
  17. package/dist/core/types.d.ts.map +1 -1
  18. package/dist/core/utils/grid-utils.d.ts.map +1 -1
  19. package/dist/core/utils/position-utils.d.ts +5 -1
  20. package/dist/core/utils/position-utils.d.ts.map +1 -1
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.mjs +3 -3
  23. package/dist/presets/index.cjs +1 -1
  24. package/dist/presets/index.mjs +1 -1
  25. package/dist/{tailwind-calendar-CE6o8RLM.cjs → tailwind-calendar-3IAm_TdP.cjs} +2 -2
  26. package/dist/{tailwind-calendar-CE6o8RLM.cjs.map → tailwind-calendar-3IAm_TdP.cjs.map} +1 -1
  27. package/dist/{tailwind-calendar-BxW1RSkc.js → tailwind-calendar-B3HuJrjX.js} +2 -2
  28. package/dist/{tailwind-calendar-BxW1RSkc.js.map → tailwind-calendar-B3HuJrjX.js.map} +1 -1
  29. package/dist/utils.cjs +1 -1
  30. package/dist/utils.cjs.map +1 -1
  31. package/dist/utils.mjs +315 -303
  32. package/dist/utils.mjs.map +1 -1
  33. package/dist/{week-view-jpcXSE6k.js → week-view-1EUqFIRS.js} +554 -528
  34. package/dist/week-view-1EUqFIRS.js.map +1 -0
  35. package/dist/week-view-DXilsY50.cjs +11 -0
  36. package/dist/week-view-DXilsY50.cjs.map +1 -0
  37. package/package.json +1 -1
  38. package/dist/agenda-widget-B8blZmlr.cjs +0 -2
  39. package/dist/agenda-widget-B8blZmlr.cjs.map +0 -1
  40. package/dist/agenda-widget-BwL7DItQ.js.map +0 -1
  41. package/dist/week-view-DT8XnNbp.cjs +0 -11
  42. package/dist/week-view-DT8XnNbp.cjs.map +0 -1
  43. package/dist/week-view-jpcXSE6k.js.map +0 -1
@@ -1,17 +1,17 @@
1
- import { jsx as e, jsxs as r } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
2
  import * as Y from "react";
3
- import { useState as oe, useCallback as T, forwardRef as ze, createElement as De, useMemo as F, useRef as se, useEffect as it, useLayoutEffect as qe } from "react";
3
+ import { useState as oe, useCallback as M, forwardRef as ze, createElement as De, useMemo as V, useRef as se, useEffect as it, useLayoutEffect as qe } from "react";
4
4
  import { c as l, a as st } from "./index-DtaLkIY8.js";
5
- import * as B from "@radix-ui/react-dropdown-menu";
6
- import { getEventsCountInView as lt, getRangeText as dt, groupEventsByDate as ct, isToday as te, isSameDay as Pe, getEventsForDay as We, separateEventsByDuration as Ke, calculateOverlappingPositions as Ye, getVisibleHoursArray as Xe, isWorkingHour as Je, formatHourLabel as we, generateMonthGrid as ut, getWeekDays as mt, startOfWeek as ht } from "./utils.mjs";
7
- import { a as Le, b as Ee } from "./slot-selection-context-D2eu2o-7.js";
5
+ import * as H from "@radix-ui/react-dropdown-menu";
6
+ import { getEventsCountInView as lt, getRangeText as dt, groupEventsByDate as ct, isToday as te, isSameDay as Ae, getEventsForDay as Le, separateEventsByDuration as Ke, calculateOverlappingPositions as Ye, getVisibleHoursArray as Xe, isWorkingHour as Je, formatHourLabel as we, generateMonthGrid as ut, getWeekDays as mt, startOfWeek as ht } from "./utils.mjs";
7
+ import { a as We, b as _e } from "./slot-selection-context-D2eu2o-7.js";
8
8
  import * as ue from "@radix-ui/react-popover";
9
9
  import * as pe from "@radix-ui/react-tooltip";
10
- const ne = ue.Root, re = ue.Trigger, an = ue.Anchor, Q = Y.forwardRef(({ className: t, align: n = "center", sideOffset: o = 4, ...a }, d) => /* @__PURE__ */ e(ue.Portal, { children: /* @__PURE__ */ e(
10
+ const re = ue.Root, ne = ue.Trigger, ar = ue.Anchor, Q = Y.forwardRef(({ className: t, align: r = "center", sideOffset: o = 4, ...a }, d) => /* @__PURE__ */ e(ue.Portal, { children: /* @__PURE__ */ e(
11
11
  ue.Content,
12
12
  {
13
13
  ref: d,
14
- align: n,
14
+ align: r,
15
15
  sideOffset: o,
16
16
  className: l(
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",
@@ -21,11 +21,11 @@ const ne = ue.Root, re = ue.Trigger, an = ue.Anchor, Q = Y.forwardRef(({ classNa
21
21
  }
22
22
  ) }));
23
23
  Q.displayName = ue.Content.displayName;
24
- const sn = pe.Provider, le = pe.Root, de = pe.Trigger, ee = Y.forwardRef(({ className: t, sideOffset: n = 4, ...o }, a) => /* @__PURE__ */ e(
24
+ const ir = pe.Provider, le = pe.Root, de = pe.Trigger, ee = Y.forwardRef(({ className: t, sideOffset: r = 4, ...o }, a) => /* @__PURE__ */ e(
25
25
  pe.Content,
26
26
  {
27
27
  ref: a,
28
- sideOffset: n,
28
+ sideOffset: r,
29
29
  className: l(
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
@@ -41,70 +41,80 @@ function fe(t) {
41
41
  text: "text-blue-700 dark:text-blue-300",
42
42
  dot: "bg-blue-500",
43
43
  dotFill: "fill-blue-600 dark:fill-blue-500",
44
- border: "border-blue-400 dark:border-blue-600"
44
+ border: "border-blue-400 dark:border-blue-600",
45
+ accentBorder: "border-l-blue-500 dark:border-l-blue-400"
45
46
  },
46
47
  green: {
47
48
  bg: "bg-green-50 dark:bg-green-950/30",
48
49
  text: "text-green-700 dark:text-green-300",
49
50
  dot: "bg-green-500",
50
51
  dotFill: "fill-green-600 dark:fill-green-500",
51
- border: "border-green-400 dark:border-green-600"
52
+ border: "border-green-400 dark:border-green-600",
53
+ accentBorder: "border-l-green-500 dark:border-l-green-400"
52
54
  },
53
55
  red: {
54
56
  bg: "bg-red-50 dark:bg-red-950/30",
55
57
  text: "text-red-700 dark:text-red-300",
56
58
  dot: "bg-red-500",
57
59
  dotFill: "fill-red-600 dark:fill-red-500",
58
- border: "border-red-400 dark:border-red-600"
60
+ border: "border-red-400 dark:border-red-600",
61
+ accentBorder: "border-l-red-500 dark:border-l-red-400"
59
62
  },
60
63
  yellow: {
61
64
  bg: "bg-yellow-50 dark:bg-yellow-950/30",
62
65
  text: "text-yellow-700 dark:text-yellow-300",
63
66
  dot: "bg-yellow-500",
64
67
  dotFill: "fill-yellow-600 dark:fill-yellow-500",
65
- border: "border-yellow-400 dark:border-yellow-600"
68
+ border: "border-yellow-400 dark:border-yellow-600",
69
+ accentBorder: "border-l-yellow-500 dark:border-l-yellow-400"
66
70
  },
67
71
  purple: {
68
72
  bg: "bg-purple-50 dark:bg-purple-950/30",
69
73
  text: "text-purple-700 dark:text-purple-300",
70
74
  dot: "bg-purple-500",
71
75
  dotFill: "fill-purple-600 dark:fill-purple-500",
72
- border: "border-purple-400 dark:border-purple-600"
76
+ border: "border-purple-400 dark:border-purple-600",
77
+ accentBorder: "border-l-purple-500 dark:border-l-purple-400"
73
78
  },
74
79
  orange: {
75
80
  bg: "bg-orange-50 dark:bg-orange-950/30",
76
81
  text: "text-orange-700 dark:text-orange-300",
77
82
  dot: "bg-orange-500",
78
83
  dotFill: "fill-orange-600 dark:fill-orange-500",
79
- border: "border-orange-400 dark:border-orange-600"
84
+ border: "border-orange-400 dark:border-orange-600",
85
+ accentBorder: "border-l-orange-500 dark:border-l-orange-400"
80
86
  },
81
87
  pink: {
82
88
  bg: "bg-pink-50 dark:bg-pink-950/30",
83
89
  text: "text-pink-700 dark:text-pink-300",
84
90
  dot: "bg-pink-500",
85
91
  dotFill: "fill-pink-600 dark:fill-pink-500",
86
- border: "border-pink-400 dark:border-pink-600"
92
+ border: "border-pink-400 dark:border-pink-600",
93
+ accentBorder: "border-l-pink-500 dark:border-l-pink-400"
87
94
  },
88
95
  teal: {
89
96
  bg: "bg-teal-50 dark:bg-teal-950/30",
90
97
  text: "text-teal-700 dark:text-teal-300",
91
98
  dot: "bg-teal-500",
92
99
  dotFill: "fill-teal-600 dark:fill-teal-500",
93
- border: "border-teal-400 dark:border-teal-600"
100
+ border: "border-teal-400 dark:border-teal-600",
101
+ accentBorder: "border-l-teal-500 dark:border-l-teal-400"
94
102
  },
95
103
  gray: {
96
104
  bg: "bg-gray-50 dark:bg-gray-950/30",
97
105
  text: "text-gray-700 dark:text-gray-300",
98
106
  dot: "bg-gray-500",
99
107
  dotFill: "fill-gray-600 dark:fill-gray-500",
100
- border: "border-gray-400 dark:border-gray-600"
108
+ border: "border-gray-400 dark:border-gray-600",
109
+ accentBorder: "border-l-gray-500 dark:border-l-gray-400"
101
110
  },
102
111
  indigo: {
103
112
  bg: "bg-indigo-50 dark:bg-indigo-950/30",
104
113
  text: "text-indigo-700 dark:text-indigo-300",
105
114
  dot: "bg-indigo-500",
106
115
  dotFill: "fill-indigo-600 dark:fill-indigo-500",
107
- border: "border-indigo-400 dark:border-indigo-600"
116
+ border: "border-indigo-400 dark:border-indigo-600",
117
+ accentBorder: "border-l-indigo-500 dark:border-l-indigo-400"
108
118
  }
109
119
  }[t ?? "blue"];
110
120
  }
@@ -115,16 +125,16 @@ function ve(t) {
115
125
  hour12: !1
116
126
  });
117
127
  }
118
- function Z(t, n) {
119
- return `${ve(t)} - ${ve(n)}`;
128
+ function Z(t, r) {
129
+ return `${ve(t)} - ${ve(r)}`;
120
130
  }
121
- function _e(t) {
122
- const n = new Date(t);
123
- return n.setHours(0, 0, 0, 0), n;
131
+ function Ee(t) {
132
+ const r = new Date(t);
133
+ return r.setHours(0, 0, 0, 0), r;
124
134
  }
125
135
  function Ce({
126
136
  event: t,
127
- variant: n = "full",
137
+ variant: r = "full",
128
138
  badgeVariant: o = "colored",
129
139
  onClick: a,
130
140
  className: d,
@@ -134,21 +144,21 @@ function Ce({
134
144
  style: z,
135
145
  disablePopover: p = !1,
136
146
  renderPopover: y,
137
- enableDrag: W = !1
147
+ enableDrag: L = !1
138
148
  }) {
139
- const i = fe(t.color), [v, h] = oe(!1), [w, _] = oe(!1), L = Le(), D = t.endDate < _e(/* @__PURE__ */ new Date()), x = t.isCanceled ?? !1, R = W && L && !x && !D, j = t.data, H = j?.meetingTookPlace ?? t.meetingTookPlace ?? !1, I = x ? /* @__PURE__ */ e(ft, { className: "h-3 w-3 text-zinc-800 dark:text-zinc-200" }) : H ? /* @__PURE__ */ e(pt, { className: l("h-3 w-3", i.text) }) : null, O = t.scheduleTypeName || j?.scheduleTypeName || j?.typeName, u = j?.productName, k = j?.nrParticipant, A = j?.siteName, m = j?.siteCity, E = [A, m].filter(Boolean).join(", "), $ = T(() => {
149
+ const i = fe(t.color), [v, h] = oe(!1), [w, E] = oe(!1), W = We(), D = t.endDate < Ee(/* @__PURE__ */ new Date()), x = t.isCanceled ?? !1, O = L && W && !x && !D, P = t.data, j = P?.meetingTookPlace ?? t.meetingTookPlace ?? !1, B = x ? /* @__PURE__ */ e(ft, { className: "h-3 w-3 text-zinc-800 dark:text-zinc-200" }) : j ? /* @__PURE__ */ e(pt, { className: l("h-3 w-3", i.text) }) : null, F = t.scheduleTypeName || P?.scheduleTypeName || P?.typeName, u = P?.productName, k = P?.nrParticipant, I = P?.siteName, m = P?.siteCity, _ = [I, m].filter(Boolean).join(", "), $ = M(() => {
140
150
  w || (p && a ? a(t) : p || h(!0));
141
- }, [w, p, a, t]), N = T(() => {
151
+ }, [w, p, a, t]), N = M(() => {
142
152
  h(!1);
143
- }, []), G = T(
153
+ }, []), G = M(
144
154
  (f) => {
145
- R && (f.dataTransfer.effectAllowed = "move", f.dataTransfer.setData("text/plain", t.id), _(!0), L?.startDrag?.(t));
155
+ O && (f.dataTransfer.effectAllowed = "move", f.dataTransfer.setData("text/plain", t.id), E(!0), W?.startDrag?.(t));
146
156
  },
147
- [R, t, L]
148
- ), C = T(() => {
149
- _(!1), L?.isDragging && L.endDrag?.();
150
- }, [L]);
151
- if (n === "dot") {
157
+ [O, t, W]
158
+ ), C = M(() => {
159
+ E(!1), W?.isDragging && W.endDrag?.();
160
+ }, [W]);
161
+ if (r === "dot") {
152
162
  const f = /* @__PURE__ */ e(
153
163
  "button",
154
164
  {
@@ -164,27 +174,27 @@ function Ce({
164
174
  "aria-label": t.title
165
175
  }
166
176
  );
167
- return p ? /* @__PURE__ */ r(le, { children: [
177
+ return p ? /* @__PURE__ */ n(le, { children: [
168
178
  /* @__PURE__ */ e(de, { asChild: !0, children: f }),
169
- /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
179
+ /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
170
180
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
171
181
  /* @__PURE__ */ e("div", { className: "text-xs opacity-80", children: Z(t.startDate, t.endDate) })
172
182
  ] }) })
173
- ] }) : /* @__PURE__ */ r(ne, { open: v, onOpenChange: h, children: [
174
- /* @__PURE__ */ e(re, { asChild: !0, children: /* @__PURE__ */ r(le, { children: [
183
+ ] }) : /* @__PURE__ */ n(re, { open: v, onOpenChange: h, children: [
184
+ /* @__PURE__ */ e(ne, { asChild: !0, children: /* @__PURE__ */ n(le, { children: [
175
185
  /* @__PURE__ */ e(de, { asChild: !0, children: f }),
176
186
  /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }) })
177
187
  ] }) }),
178
188
  /* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: N }) : /* @__PURE__ */ e(he, { event: t, onClose: N }) })
179
189
  ] });
180
190
  }
181
- if (n === "compact") {
182
- const f = /* @__PURE__ */ r(
191
+ if (r === "compact") {
192
+ const f = /* @__PURE__ */ n(
183
193
  "div",
184
194
  {
185
195
  role: "button",
186
196
  tabIndex: 0,
187
- draggable: !!R,
197
+ draggable: !!O,
188
198
  onDragStart: G,
189
199
  onDragEnd: C,
190
200
  onClick: p ? $ : void 0,
@@ -193,7 +203,7 @@ function Ce({
193
203
  },
194
204
  className: l(
195
205
  "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",
196
- R ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
206
+ O ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
197
207
  w && "opacity-50",
198
208
  // Cancelled events get gray background with strikethrough
199
209
  x || // Past events get neutral zinc styling
@@ -218,7 +228,7 @@ function Ce({
218
228
  children: /* @__PURE__ */ e("circle", { cx: "4", cy: "4", r: "4", className: i.dotFill })
219
229
  }
220
230
  ),
221
- /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 overflow-hidden", children: /* @__PURE__ */ r("span", { className: "", children: [
231
+ /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 overflow-hidden", children: /* @__PURE__ */ n("span", { className: "", children: [
222
232
  /* @__PURE__ */ e(
223
233
  "span",
224
234
  {
@@ -227,7 +237,7 @@ function Ce({
227
237
  maskImage: "linear-gradient(to right, transparent 0, black 8px, black calc(100% - 8px), transparent 100%)",
228
238
  WebkitMaskImage: "linear-gradient(to right, transparent 0, black 8px, black calc(100% - 8px), transparent 100%)"
229
239
  },
230
- children: /* @__PURE__ */ r("span", { className: "inline-flex event-marquee", children: [
240
+ children: /* @__PURE__ */ n("span", { className: "inline-flex event-marquee", children: [
231
241
  /* @__PURE__ */ e("span", { className: "shrink-0 px-1", children: t.title }),
232
242
  /* @__PURE__ */ e("span", { className: "shrink-0 px-1", children: "•" }),
233
243
  /* @__PURE__ */ e("span", { "aria-hidden": "true", className: "shrink-0 px-1", children: t.title }),
@@ -246,50 +256,51 @@ function Ce({
246
256
  }
247
257
  )
248
258
  ] }) }),
249
- /* @__PURE__ */ e("div", { className: "flex gap-0.5", children: I })
259
+ /* @__PURE__ */ e("div", { className: "flex gap-0.5", children: B })
250
260
  ]
251
261
  }
252
262
  );
253
- return p ? /* @__PURE__ */ r(le, { children: [
263
+ return p ? /* @__PURE__ */ n(le, { children: [
254
264
  /* @__PURE__ */ e(de, { asChild: !0, children: f }),
255
- /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
265
+ /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
256
266
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
257
267
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: Z(t.startDate, t.endDate) })
258
268
  ] }) })
259
- ] }) : /* @__PURE__ */ r(ne, { open: v, onOpenChange: h, children: [
260
- /* @__PURE__ */ e(re, { asChild: !0, children: f }),
269
+ ] }) : /* @__PURE__ */ n(re, { open: v, onOpenChange: h, children: [
270
+ /* @__PURE__ */ e(ne, { asChild: !0, children: f }),
261
271
  /* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: N }) : /* @__PURE__ */ e(he, { event: t, onClose: N }) })
262
272
  ] });
263
273
  }
264
- const s = /* @__PURE__ */ r(
274
+ const s = /* @__PURE__ */ n(
265
275
  "button",
266
276
  {
267
277
  type: "button",
268
278
  onClick: $,
269
279
  className: l(
270
- "group relative flex w-full flex-col gap-1 rounded-md border px-2 py-1.5 text-left transition-all hover:shadow-md",
280
+ "group relative flex w-full flex-col gap-1 rounded-md border-l-[3px] px-2 py-1.5 text-left transition-all",
281
+ "shadow-[0_1px_3px_rgba(0,0,0,0.08)] hover:shadow-[0_2px_6px_rgba(0,0,0,0.12)]",
271
282
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
272
283
  // Cancelled events get gray background with strikethrough
273
284
  x || // Past events get neutral zinc styling with strikethrough
274
- D ? "bg-zinc-100 dark:bg-zinc-800 border-zinc-300 dark:border-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [
285
+ D ? "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" : [
275
286
  o === "colored" && [
276
287
  i.bg,
277
- i.border,
288
+ i.accentBorder,
278
289
  i.text
279
290
  ],
280
291
  o === "mixed" && [
281
292
  i.bg,
282
- i.border,
293
+ i.accentBorder,
283
294
  i.text
284
295
  ],
285
- o === "dot" && "bg-muted/50 border-border"
296
+ o === "dot" && "bg-muted/50 border-l-neutral-400 dark:border-l-neutral-600"
286
297
  ],
287
298
  d
288
299
  ),
289
300
  style: z,
290
301
  children: [
291
- /* @__PURE__ */ r("div", { className: "flex items-start justify-between gap-1", children: [
292
- /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 min-w-0", children: [
302
+ /* @__PURE__ */ n("div", { className: "flex items-start justify-between gap-1", children: [
303
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5 min-w-0", children: [
293
304
  ["dot", "mixed"].includes(o) && !D && !x && /* @__PURE__ */ e(
294
305
  "svg",
295
306
  {
@@ -302,7 +313,7 @@ function Ce({
302
313
  children: /* @__PURE__ */ e("circle", { cx: "4", cy: "4", r: "4", className: i.dotFill })
303
314
  }
304
315
  ),
305
- /* @__PURE__ */ r(
316
+ /* @__PURE__ */ n(
306
317
  "span",
307
318
  {
308
319
  className: l(
@@ -312,55 +323,55 @@ function Ce({
312
323
  ),
313
324
  children: [
314
325
  t.title,
315
- O && /* @__PURE__ */ r("span", { className: "font-normal opacity-75", children: [
326
+ F && /* @__PURE__ */ n("span", { className: "font-normal opacity-75", children: [
316
327
  " ",
317
328
  "- ",
318
- O
329
+ F
319
330
  ] })
320
331
  ]
321
332
  }
322
333
  )
323
334
  ] }),
324
- I
335
+ B
325
336
  ] }),
326
337
  u && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: u }),
327
- k != null && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
338
+ k != null && /* @__PURE__ */ n("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
328
339
  /* @__PURE__ */ e(Se, { className: "h-3 w-3 shrink-0" }),
329
- /* @__PURE__ */ r("span", { children: [
340
+ /* @__PURE__ */ n("span", { children: [
330
341
  k,
331
342
  " participant",
332
343
  k !== 1 ? "s" : ""
333
344
  ] })
334
345
  ] }),
335
- g && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
336
- /* @__PURE__ */ e($e, { className: "h-3 w-3 shrink-0" }),
346
+ g && /* @__PURE__ */ n("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
347
+ /* @__PURE__ */ e(Be, { className: "h-3 w-3 shrink-0" }),
337
348
  /* @__PURE__ */ e("span", { children: Z(t.startDate, t.endDate) })
338
349
  ] }),
339
- E && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
350
+ _ && /* @__PURE__ */ n("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
340
351
  /* @__PURE__ */ e(Ze, { className: "h-3 w-3 shrink-0" }),
341
- /* @__PURE__ */ e("span", { className: "truncate", children: E })
352
+ /* @__PURE__ */ e("span", { className: "truncate", children: _ })
342
353
  ] }),
343
354
  c && t.description && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground line-clamp-2", children: t.description }),
344
- b && t.participants && t.participants.length > 0 && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
355
+ b && t.participants && t.participants.length > 0 && /* @__PURE__ */ n("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
345
356
  /* @__PURE__ */ e(Se, { className: "h-3 w-3 shrink-0" }),
346
357
  /* @__PURE__ */ e("span", { className: "truncate", children: t.participants.map((f) => f.name).join(", ") })
347
358
  ] })
348
359
  ]
349
360
  }
350
361
  );
351
- return p ? /* @__PURE__ */ r(le, { children: [
362
+ return p ? /* @__PURE__ */ n(le, { children: [
352
363
  /* @__PURE__ */ e(de, { asChild: !0, children: s }),
353
- /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
364
+ /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
354
365
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
355
366
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: Z(t.startDate, t.endDate) })
356
367
  ] }) })
357
- ] }) : /* @__PURE__ */ r(ne, { open: v, onOpenChange: h, children: [
358
- /* @__PURE__ */ e(re, { asChild: !0, children: s }),
368
+ ] }) : /* @__PURE__ */ n(re, { open: v, onOpenChange: h, children: [
369
+ /* @__PURE__ */ e(ne, { asChild: !0, children: s }),
359
370
  /* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: N }) : /* @__PURE__ */ e(he, { event: t, onClose: N }) })
360
371
  ] });
361
372
  }
362
- function $e({ className: t }) {
363
- return /* @__PURE__ */ r(
373
+ function Be({ className: t }) {
374
+ return /* @__PURE__ */ n(
364
375
  "svg",
365
376
  {
366
377
  xmlns: "http://www.w3.org/2000/svg",
@@ -395,7 +406,7 @@ function pt({ className: t }) {
395
406
  );
396
407
  }
397
408
  function ft({ className: t }) {
398
- return /* @__PURE__ */ r(
409
+ return /* @__PURE__ */ n(
399
410
  "svg",
400
411
  {
401
412
  xmlns: "http://www.w3.org/2000/svg",
@@ -414,7 +425,7 @@ function ft({ className: t }) {
414
425
  );
415
426
  }
416
427
  function Se({ className: t }) {
417
- return /* @__PURE__ */ r(
428
+ return /* @__PURE__ */ n(
418
429
  "svg",
419
430
  {
420
431
  xmlns: "http://www.w3.org/2000/svg",
@@ -435,7 +446,7 @@ function Se({ className: t }) {
435
446
  );
436
447
  }
437
448
  function Ze({ className: t }) {
438
- return /* @__PURE__ */ r(
449
+ return /* @__PURE__ */ n(
439
450
  "svg",
440
451
  {
441
452
  xmlns: "http://www.w3.org/2000/svg",
@@ -455,13 +466,13 @@ function Ze({ className: t }) {
455
466
  }
456
467
  function he({
457
468
  event: t,
458
- onClose: n
469
+ onClose: r
459
470
  }) {
460
471
  const o = fe(t.color), a = t.isCanceled ?? !1;
461
- return /* @__PURE__ */ r("div", { className: "space-y-3", children: [
462
- /* @__PURE__ */ r("div", { className: "flex items-start gap-3", children: [
472
+ return /* @__PURE__ */ n("div", { className: "space-y-3", children: [
473
+ /* @__PURE__ */ n("div", { className: "flex items-start gap-3", children: [
463
474
  /* @__PURE__ */ e("div", { className: l("size-4 rounded shrink-0 mt-0.5", o.dot) }),
464
- /* @__PURE__ */ r("div", { className: "flex-1 min-w-0", children: [
475
+ /* @__PURE__ */ n("div", { className: "flex-1 min-w-0", children: [
465
476
  /* @__PURE__ */ e(
466
477
  "h3",
467
478
  {
@@ -472,14 +483,14 @@ function he({
472
483
  children: t.title
473
484
  }
474
485
  ),
475
- /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-sm text-muted-foreground mt-1", children: [
476
- /* @__PURE__ */ e($e, { className: "h-4 w-4 shrink-0" }),
486
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-1 text-sm text-muted-foreground mt-1", children: [
487
+ /* @__PURE__ */ e(Be, { className: "h-4 w-4 shrink-0" }),
477
488
  /* @__PURE__ */ e("span", { className: "tabular-nums", children: Z(t.startDate, t.endDate) })
478
489
  ] })
479
490
  ] })
480
491
  ] }),
481
492
  t.description && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: t.description }),
482
- /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1.5", children: [
493
+ /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-1.5", children: [
483
494
  t.isAllDay && /* @__PURE__ */ e("span", { className: "text-xs bg-muted px-2 py-0.5 rounded-full font-medium", children: "All day" }),
484
495
  t.isRecurring && /* @__PURE__ */ e("span", { className: "text-xs bg-muted px-2 py-0.5 rounded-full font-medium", children: "Recurring" }),
485
496
  a && /* @__PURE__ */ e("span", { className: "text-xs bg-red-100 dark:bg-red-950/30 text-red-700 dark:text-red-300 px-2 py-0.5 rounded-full font-medium", children: "Canceled" })
@@ -488,7 +499,7 @@ function he({
488
499
  "button",
489
500
  {
490
501
  type: "button",
491
- onClick: n,
502
+ onClick: r,
492
503
  className: "text-xs text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-muted transition-colors",
493
504
  children: "Close"
494
505
  }
@@ -497,7 +508,7 @@ function he({
497
508
  }
498
509
  function Qe({
499
510
  event: t,
500
- position: n,
511
+ position: r,
501
512
  hourHeight: o = 96,
502
513
  badgeVariant: a = "colored",
503
514
  onClick: d,
@@ -506,30 +517,30 @@ function Qe({
506
517
  renderPopover: b,
507
518
  enableDrag: z = !0
508
519
  }) {
509
- const p = fe(t.color), [y, W] = oe(!1), [i, v] = oe(!1), h = Le(), w = (t.endDate.getTime() - t.startDate.getTime()) / (1e3 * 60), _ = w / 60 * o - 8, L = t.endDate < _e(/* @__PURE__ */ new Date()), D = t.isCanceled ?? !1, x = z && h && !D && !L, R = w < 35, j = w > 25, H = w >= 45, I = t.data, O = t.scheduleTypeName || I?.scheduleTypeName || I?.typeName, u = I?.productName, k = I?.nrParticipant, A = I?.siteName, m = I?.siteCity, E = [A, m].filter(Boolean).join(", "), $ = a === "dot", N = T(() => {
510
- i || (c && d ? d(t) : c || W(!0));
511
- }, [i, c, d, t]), G = T(() => {
512
- W(!1);
513
- }, []), C = T(
514
- (M) => {
520
+ const p = fe(t.color), [y, L] = oe(!1), [i, v] = oe(!1), h = We(), w = (t.endDate.getTime() - t.startDate.getTime()) / (1e3 * 60), E = w / 60 * o - 8, W = t.endDate < Ee(/* @__PURE__ */ new Date()), D = t.isCanceled ?? !1, x = z && h && !D && !W, O = w < 35, P = w > 25, j = w >= 45, B = t.data, F = t.scheduleTypeName || B?.scheduleTypeName || B?.typeName, u = B?.productName, k = B?.nrParticipant, I = B?.siteName, m = B?.siteCity, _ = [I, m].filter(Boolean).join(", "), $ = a === "dot", N = M(() => {
521
+ i || (c && d ? d(t) : c || L(!0));
522
+ }, [i, c, d, t]), G = M(() => {
523
+ L(!1);
524
+ }, []), C = M(
525
+ (T) => {
515
526
  if (!x) return;
516
- M.dataTransfer.effectAllowed = "move", M.dataTransfer.setData("text/plain", t.id);
517
- const q = M.currentTarget, V = q.getBoundingClientRect();
518
- M.dataTransfer.setDragImage(
527
+ T.dataTransfer.effectAllowed = "move", T.dataTransfer.setData("text/plain", t.id);
528
+ const q = T.currentTarget, R = q.getBoundingClientRect();
529
+ T.dataTransfer.setDragImage(
519
530
  q,
520
- M.clientX - V.left,
521
- M.clientY - V.top
531
+ T.clientX - R.left,
532
+ T.clientY - R.top
522
533
  ), v(!0), h?.startDrag?.(t);
523
534
  },
524
535
  [x, t, h]
525
- ), s = T(() => {
536
+ ), s = M(() => {
526
537
  v(!1), h?.isDragging && h.endDrag?.();
527
- }, [h]), f = T(
528
- (M) => {
529
- (M.key === "Enter" || M.key === " ") && (M.preventDefault(), N());
538
+ }, [h]), f = M(
539
+ (T) => {
540
+ (T.key === "Enter" || T.key === " ") && (T.preventDefault(), N());
530
541
  },
531
542
  [N]
532
- ), S = /* @__PURE__ */ r(
543
+ ), S = /* @__PURE__ */ n(
533
544
  "div",
534
545
  {
535
546
  role: "button",
@@ -540,27 +551,32 @@ function Qe({
540
551
  onKeyDown: f,
541
552
  onClick: i ? void 0 : N,
542
553
  className: l(
543
- "group flex w-full select-none flex-col gap-0.5 overflow-hidden rounded-md border px-2 py-1.5 text-xs text-left",
554
+ "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",
555
+ "shadow-[0_1px_3px_rgba(0,0,0,0.08)] hover:shadow-[0_2px_6px_rgba(0,0,0,0.12)]",
544
556
  "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
545
- "transition-opacity",
557
+ "transition-all",
546
558
  x ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
547
559
  i && "opacity-50",
548
560
  // Cancelled events get gray background with strikethrough
549
561
  D || // Past events get neutral zinc styling with strikethrough
550
- L ? "bg-zinc-100 dark:bg-zinc-800 border-zinc-300 dark:border-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [
562
+ W ? "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" : [
551
563
  // Colored/mixed variants
552
- !$ && [p.bg, p.border, p.text],
564
+ !$ && [
565
+ p.bg,
566
+ p.accentBorder,
567
+ p.text
568
+ ],
553
569
  // Dot variant - neutral background
554
- $ && "bg-neutral-50 dark:bg-neutral-900 border-neutral-200 dark:border-neutral-700"
570
+ $ && "bg-neutral-50 dark:bg-neutral-900 border-l-neutral-400 dark:border-l-neutral-600"
555
571
  ],
556
572
  // Short events center content
557
- R && "py-0 justify-center",
573
+ O && "py-0 justify-center",
558
574
  g
559
575
  ),
560
- style: { height: `${Math.max(_, 20)}px` },
576
+ style: { height: `${Math.max(E, 20)}px` },
561
577
  children: [
562
- /* @__PURE__ */ r("div", { className: "flex items-start gap-1.5 min-w-0", children: [
563
- ["mixed", "dot"].includes(a) && !L && !D && /* @__PURE__ */ e(
578
+ /* @__PURE__ */ n("div", { className: "flex items-start gap-1.5 min-w-0", children: [
579
+ ["mixed", "dot"].includes(a) && !W && !D && /* @__PURE__ */ e(
564
580
  "svg",
565
581
  {
566
582
  width: "8",
@@ -572,25 +588,25 @@ function Qe({
572
588
  children: /* @__PURE__ */ e("circle", { cx: "4", cy: "4", r: "4", className: p.dotFill })
573
589
  }
574
590
  ),
575
- /* @__PURE__ */ e("div", { className: "flex-1 min-w-0 overflow-hidden", children: /* @__PURE__ */ r(
591
+ /* @__PURE__ */ e("div", { className: "flex-1 min-w-0 overflow-hidden", children: /* @__PURE__ */ n(
576
592
  "p",
577
593
  {
578
594
  className: l(
579
595
  "font-semibold truncate leading-tight",
580
- !L && !D && $ && "text-foreground"
596
+ !W && !D && $ && "text-foreground"
581
597
  ),
582
598
  children: [
583
599
  t.title,
584
- O && /* @__PURE__ */ r("span", { className: "font-normal opacity-75", children: [
600
+ F && /* @__PURE__ */ n("span", { className: "font-normal opacity-75", children: [
585
601
  " ",
586
602
  "- ",
587
- O
603
+ F
588
604
  ] })
589
605
  ]
590
606
  }
591
607
  ) })
592
608
  ] }),
593
- H && u && /* @__PURE__ */ e(
609
+ j && u && /* @__PURE__ */ e(
594
610
  "p",
595
611
  {
596
612
  className: l(
@@ -600,7 +616,7 @@ function Qe({
600
616
  children: u
601
617
  }
602
618
  ),
603
- H && k != null && /* @__PURE__ */ r(
619
+ j && k != null && /* @__PURE__ */ n(
604
620
  "div",
605
621
  {
606
622
  className: l(
@@ -609,7 +625,7 @@ function Qe({
609
625
  ),
610
626
  children: [
611
627
  /* @__PURE__ */ e(Se, { className: "h-3 w-3 shrink-0" }),
612
- /* @__PURE__ */ r("span", { children: [
628
+ /* @__PURE__ */ n("span", { children: [
613
629
  k,
614
630
  " participant",
615
631
  k !== 1 ? "s" : ""
@@ -617,7 +633,7 @@ function Qe({
617
633
  ]
618
634
  }
619
635
  ),
620
- j && /* @__PURE__ */ r(
636
+ P && /* @__PURE__ */ n(
621
637
  "div",
622
638
  {
623
639
  className: l(
@@ -625,8 +641,8 @@ function Qe({
625
641
  $ ? "text-muted-foreground" : "opacity-90"
626
642
  ),
627
643
  children: [
628
- /* @__PURE__ */ e($e, { className: "h-3 w-3 shrink-0" }),
629
- /* @__PURE__ */ r("span", { children: [
644
+ /* @__PURE__ */ e(Be, { className: "h-3 w-3 shrink-0" }),
645
+ /* @__PURE__ */ n("span", { children: [
630
646
  ve(t.startDate),
631
647
  " - ",
632
648
  ve(t.endDate)
@@ -634,7 +650,7 @@ function Qe({
634
650
  ]
635
651
  }
636
652
  ),
637
- H && E && /* @__PURE__ */ r(
653
+ j && _ && /* @__PURE__ */ n(
638
654
  "div",
639
655
  {
640
656
  className: l(
@@ -643,43 +659,43 @@ function Qe({
643
659
  ),
644
660
  children: [
645
661
  /* @__PURE__ */ e(Ze, { className: "h-3 w-3 shrink-0" }),
646
- /* @__PURE__ */ e("span", { className: "truncate", children: E })
662
+ /* @__PURE__ */ e("span", { className: "truncate", children: _ })
647
663
  ]
648
664
  }
649
665
  )
650
666
  ]
651
667
  }
652
- ), P = /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
653
- /* @__PURE__ */ r("div", { className: "font-medium", children: [
668
+ ), A = /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
669
+ /* @__PURE__ */ n("div", { className: "font-medium", children: [
654
670
  t.title,
655
- O && /* @__PURE__ */ r("span", { className: "font-normal opacity-75", children: [
671
+ F && /* @__PURE__ */ n("span", { className: "font-normal opacity-75", children: [
656
672
  " ",
657
673
  "- ",
658
- O
674
+ F
659
675
  ] })
660
676
  ] }),
661
677
  u && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: u }),
662
- k != null && /* @__PURE__ */ r("div", { className: "text-xs text-muted-foreground", children: [
678
+ k != null && /* @__PURE__ */ n("div", { className: "text-xs text-muted-foreground", children: [
663
679
  k,
664
680
  " participant",
665
681
  k !== 1 ? "s" : ""
666
682
  ] }),
667
683
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: Z(t.startDate, t.endDate) }),
668
- E && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: E })
684
+ _ && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: _ })
669
685
  ] }) });
670
686
  return c ? /* @__PURE__ */ e(
671
687
  "div",
672
688
  {
673
689
  className: "absolute p-0.5",
674
690
  style: {
675
- top: `${n.top}px`,
676
- left: `${n.left}%`,
677
- width: n.minWidth ? `max(${n.minWidth}px, ${n.width}%)` : `${n.width}%`,
678
- minWidth: n.minWidth ? `${n.minWidth}px` : void 0
691
+ top: `${r.top}px`,
692
+ left: `${r.left}%`,
693
+ width: r.minWidth ? `max(${r.minWidth}px, ${r.width}%)` : `${r.width}%`,
694
+ minWidth: r.minWidth ? `${r.minWidth}px` : void 0
679
695
  },
680
- children: /* @__PURE__ */ r(le, { children: [
696
+ children: /* @__PURE__ */ n(le, { children: [
681
697
  /* @__PURE__ */ e(de, { asChild: !0, children: S }),
682
- P
698
+ A
683
699
  ] })
684
700
  }
685
701
  ) : /* @__PURE__ */ e(
@@ -687,21 +703,21 @@ function Qe({
687
703
  {
688
704
  className: "absolute p-0.5",
689
705
  style: {
690
- top: `${n.top}px`,
691
- left: `${n.left}%`,
692
- width: n.minWidth ? `max(${n.minWidth}px, ${n.width}%)` : `${n.width}%`,
693
- minWidth: n.minWidth ? `${n.minWidth}px` : void 0
706
+ top: `${r.top}px`,
707
+ left: `${r.left}%`,
708
+ width: r.minWidth ? `max(${r.minWidth}px, ${r.width}%)` : `${r.width}%`,
709
+ minWidth: r.minWidth ? `${r.minWidth}px` : void 0
694
710
  },
695
- children: /* @__PURE__ */ r(ne, { open: y, onOpenChange: W, children: [
696
- /* @__PURE__ */ e(re, { asChild: !0, children: S }),
711
+ children: /* @__PURE__ */ n(re, { open: y, onOpenChange: L, children: [
712
+ /* @__PURE__ */ e(ne, { asChild: !0, children: S }),
697
713
  /* @__PURE__ */ e(Q, { className: "w-80", children: b ? b({ event: t, onClose: G }) : /* @__PURE__ */ e(he, { event: t, onClose: G }) })
698
714
  ] })
699
715
  }
700
716
  );
701
717
  }
702
- function ln({
718
+ function sr({
703
719
  event: t,
704
- spanDays: n,
720
+ spanDays: r,
705
721
  isStart: o,
706
722
  isEnd: a,
707
723
  onClick: d,
@@ -709,9 +725,9 @@ function ln({
709
725
  disablePopover: c = !1,
710
726
  renderPopover: b
711
727
  }) {
712
- const z = fe(t.color), [p, y] = oe(!1), W = t.endDate < _e(/* @__PURE__ */ new Date()), i = t.isCanceled ?? !1, v = T(() => {
728
+ const z = fe(t.color), [p, y] = oe(!1), L = t.endDate < Ee(/* @__PURE__ */ new Date()), i = t.isCanceled ?? !1, v = M(() => {
713
729
  c && d ? d(t) : c || y(!0);
714
- }, [c, d, t]), h = T(() => {
730
+ }, [c, d, t]), h = M(() => {
715
731
  y(!1);
716
732
  }, []), w = /* @__PURE__ */ e(
717
733
  "button",
@@ -722,25 +738,25 @@ function ln({
722
738
  "flex h-5 items-center px-1.5 text-xs font-medium transition-opacity hover:opacity-80",
723
739
  // Cancelled events get gray background with strikethrough
724
740
  i || // Past events get neutral zinc styling with strikethrough
725
- W ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [z.dot, "text-white"],
741
+ L ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [z.dot, "text-white"],
726
742
  o && "rounded-l",
727
743
  a && "rounded-r",
728
744
  !o && "border-l-0",
729
745
  !a && "border-r-0",
730
746
  g
731
747
  ),
732
- style: { width: `${n * 100}%` },
748
+ style: { width: `${r * 100}%` },
733
749
  children: o && /* @__PURE__ */ e("span", { className: "truncate", children: t.title })
734
750
  }
735
- ), _ = /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
751
+ ), E = /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
736
752
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
737
753
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: Z(t.startDate, t.endDate) })
738
754
  ] }) });
739
- return c ? /* @__PURE__ */ r(le, { children: [
755
+ return c ? /* @__PURE__ */ n(le, { children: [
740
756
  /* @__PURE__ */ e(de, { asChild: !0, children: w }),
741
- _
742
- ] }) : /* @__PURE__ */ r(ne, { open: p, onOpenChange: y, children: [
743
- /* @__PURE__ */ e(re, { asChild: !0, children: w }),
757
+ E
758
+ ] }) : /* @__PURE__ */ n(re, { open: p, onOpenChange: y, children: [
759
+ /* @__PURE__ */ e(ne, { asChild: !0, children: w }),
744
760
  /* @__PURE__ */ e(Q, { className: "w-80", children: b ? b({ event: t, onClose: h }) : /* @__PURE__ */ e(he, { event: t, onClose: h }) })
745
761
  ] });
746
762
  }
@@ -757,35 +773,35 @@ if (typeof window < "u" && !document.getElementById("inno-calendar-event-marquee
757
773
  }
758
774
  `, document.head.appendChild(t);
759
775
  }
760
- const je = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Be = st, et = (t, n) => (o) => {
776
+ const Pe = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, je = st, et = (t, r) => (o) => {
761
777
  var a;
762
- if (n?.variants == null) return Be(t, o?.class, o?.className);
763
- const { variants: d, defaultVariants: g } = n, c = Object.keys(d).map((p) => {
764
- const y = o?.[p], W = g?.[p];
778
+ if (r?.variants == null) return je(t, o?.class, o?.className);
779
+ const { variants: d, defaultVariants: g } = r, c = Object.keys(d).map((p) => {
780
+ const y = o?.[p], L = g?.[p];
765
781
  if (y === null) return null;
766
- const i = je(y) || je(W);
782
+ const i = Pe(y) || Pe(L);
767
783
  return d[p][i];
768
784
  }), b = o && Object.entries(o).reduce((p, y) => {
769
- let [W, i] = y;
770
- return i === void 0 || (p[W] = i), p;
771
- }, {}), z = n == null || (a = n.compoundVariants) === null || a === void 0 ? void 0 : a.reduce((p, y) => {
772
- let { class: W, className: i, ...v } = y;
785
+ let [L, i] = y;
786
+ return i === void 0 || (p[L] = i), p;
787
+ }, {}), z = r == null || (a = r.compoundVariants) === null || a === void 0 ? void 0 : a.reduce((p, y) => {
788
+ let { class: L, className: i, ...v } = y;
773
789
  return Object.entries(v).every((h) => {
774
- let [w, _] = h;
775
- return Array.isArray(_) ? _.includes({
790
+ let [w, E] = h;
791
+ return Array.isArray(E) ? E.includes({
776
792
  ...g,
777
793
  ...b
778
794
  }[w]) : {
779
795
  ...g,
780
796
  ...b
781
- }[w] === _;
797
+ }[w] === E;
782
798
  }) ? [
783
799
  ...p,
784
- W,
800
+ L,
785
801
  i
786
802
  ] : p;
787
803
  }, []);
788
- return Be(t, c, z, o?.class, o?.className);
804
+ return je(t, c, z, o?.class, o?.className);
789
805
  }, gt = et(
790
806
  "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",
791
807
  {
@@ -811,15 +827,15 @@ const je = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Be = st, e
811
827
  }
812
828
  }
813
829
  ), ce = ze(
814
- ({ className: t, variant: n, size: o, loading: a, disabled: d, children: g, ...c }, b) => /* @__PURE__ */ r(
830
+ ({ className: t, variant: r, size: o, loading: a, disabled: d, children: g, ...c }, b) => /* @__PURE__ */ n(
815
831
  "button",
816
832
  {
817
- className: l(gt({ variant: n, size: o, className: t })),
833
+ className: l(gt({ variant: r, size: o, className: t })),
818
834
  ref: b,
819
835
  disabled: d || a,
820
836
  ...c,
821
837
  children: [
822
- a && /* @__PURE__ */ r(
838
+ a && /* @__PURE__ */ n(
823
839
  "svg",
824
840
  {
825
841
  className: "animate-spin -ml-1 mr-2 size-4",
@@ -855,15 +871,15 @@ const je = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Be = st, e
855
871
  )
856
872
  );
857
873
  ce.displayName = "Button";
858
- const tt = (...t) => t.filter((n, o, a) => !!n && n.trim() !== "" && a.indexOf(n) === o).join(" ").trim();
874
+ const tt = (...t) => t.filter((r, o, a) => !!r && r.trim() !== "" && a.indexOf(r) === o).join(" ").trim();
859
875
  const xt = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
860
876
  const bt = (t) => t.replace(
861
877
  /^([A-Z])|[\s-_]+(\w)/g,
862
- (n, o, a) => a ? a.toUpperCase() : o.toLowerCase()
878
+ (r, o, a) => a ? a.toUpperCase() : o.toLowerCase()
863
879
  );
864
880
  const Re = (t) => {
865
- const n = bt(t);
866
- return n.charAt(0).toUpperCase() + n.slice(1);
881
+ const r = bt(t);
882
+ return r.charAt(0).toUpperCase() + r.slice(1);
867
883
  };
868
884
  var yt = {
869
885
  xmlns: "http://www.w3.org/2000/svg",
@@ -877,15 +893,15 @@ var yt = {
877
893
  strokeLinejoin: "round"
878
894
  };
879
895
  const wt = (t) => {
880
- for (const n in t)
881
- if (n.startsWith("aria-") || n === "role" || n === "title")
896
+ for (const r in t)
897
+ if (r.startsWith("aria-") || r === "role" || r === "title")
882
898
  return !0;
883
899
  return !1;
884
900
  };
885
901
  const vt = ze(
886
902
  ({
887
903
  color: t = "currentColor",
888
- size: n = 24,
904
+ size: r = 24,
889
905
  strokeWidth: o = 2,
890
906
  absoluteStrokeWidth: a,
891
907
  className: d = "",
@@ -897,10 +913,10 @@ const vt = ze(
897
913
  {
898
914
  ref: z,
899
915
  ...yt,
900
- width: n,
901
- height: n,
916
+ width: r,
917
+ height: r,
902
918
  stroke: t,
903
- strokeWidth: a ? Number(o) * 24 / Number(n) : o,
919
+ strokeWidth: a ? Number(o) * 24 / Number(r) : o,
904
920
  className: tt("lucide", d),
905
921
  ...!g && !wt(b) && { "aria-hidden": "true" },
906
922
  ...b
@@ -911,11 +927,11 @@ const vt = ze(
911
927
  ]
912
928
  )
913
929
  );
914
- const Ie = (t, n) => {
930
+ const $e = (t, r) => {
915
931
  const o = ze(
916
932
  ({ className: a, ...d }, g) => De(vt, {
917
933
  ref: g,
918
- iconNode: n,
934
+ iconNode: r,
919
935
  className: tt(
920
936
  `lucide-${xt(Re(t))}`,
921
937
  `lucide-${t}`,
@@ -926,15 +942,15 @@ const Ie = (t, n) => {
926
942
  );
927
943
  return o.displayName = Re(t), o;
928
944
  };
929
- const Nt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], kt = Ie("check", Nt);
930
- const Dt = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Ct = Ie("chevron-right", Dt);
931
- const St = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], Mt = Ie("circle", St), He = B.Root, Oe = B.Trigger, Tt = Y.forwardRef(({ className: t, inset: n, children: o, ...a }, d) => /* @__PURE__ */ r(
932
- B.SubTrigger,
945
+ const Nt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], kt = $e("check", Nt);
946
+ const Dt = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Ct = $e("chevron-right", Dt);
947
+ const St = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], Mt = $e("circle", St), He = H.Root, Oe = H.Trigger, Tt = Y.forwardRef(({ className: t, inset: r, children: o, ...a }, d) => /* @__PURE__ */ n(
948
+ H.SubTrigger,
933
949
  {
934
950
  ref: d,
935
951
  className: l(
936
952
  "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",
937
- n && "pl-8",
953
+ r && "pl-8",
938
954
  t
939
955
  ),
940
956
  ...a,
@@ -944,24 +960,24 @@ const St = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], Mt = Ie
944
960
  ]
945
961
  }
946
962
  ));
947
- Tt.displayName = B.SubTrigger.displayName;
948
- const zt = Y.forwardRef(({ className: t, ...n }, o) => /* @__PURE__ */ e(
949
- B.SubContent,
963
+ Tt.displayName = H.SubTrigger.displayName;
964
+ const zt = Y.forwardRef(({ className: t, ...r }, o) => /* @__PURE__ */ e(
965
+ H.SubContent,
950
966
  {
951
967
  ref: o,
952
968
  className: l(
953
969
  "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",
954
970
  t
955
971
  ),
956
- ...n
972
+ ...r
957
973
  }
958
974
  ));
959
- zt.displayName = B.SubContent.displayName;
960
- const Me = Y.forwardRef(({ className: t, sideOffset: n = 4, ...o }, a) => /* @__PURE__ */ e(B.Portal, { children: /* @__PURE__ */ e(
961
- B.Content,
975
+ zt.displayName = H.SubContent.displayName;
976
+ const Me = Y.forwardRef(({ className: t, sideOffset: r = 4, ...o }, a) => /* @__PURE__ */ e(H.Portal, { children: /* @__PURE__ */ e(
977
+ H.Content,
962
978
  {
963
979
  ref: a,
964
- sideOffset: n,
980
+ sideOffset: r,
965
981
  className: l(
966
982
  "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",
967
983
  t
@@ -969,22 +985,22 @@ const Me = Y.forwardRef(({ className: t, sideOffset: n = 4, ...o }, a) => /* @__
969
985
  ...o
970
986
  }
971
987
  ) }));
972
- Me.displayName = B.Content.displayName;
973
- const Te = Y.forwardRef(({ className: t, inset: n, ...o }, a) => /* @__PURE__ */ e(
974
- B.Item,
988
+ Me.displayName = H.Content.displayName;
989
+ const Te = Y.forwardRef(({ className: t, inset: r, ...o }, a) => /* @__PURE__ */ e(
990
+ H.Item,
975
991
  {
976
992
  ref: a,
977
993
  className: l(
978
994
  "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",
979
- n && "pl-8",
995
+ r && "pl-8",
980
996
  t
981
997
  ),
982
998
  ...o
983
999
  }
984
1000
  ));
985
- Te.displayName = B.Item.displayName;
986
- const Wt = Y.forwardRef(({ className: t, children: n, checked: o = !1, ...a }, d) => /* @__PURE__ */ r(
987
- B.CheckboxItem,
1001
+ Te.displayName = H.Item.displayName;
1002
+ const Lt = Y.forwardRef(({ className: t, children: r, checked: o = !1, ...a }, d) => /* @__PURE__ */ n(
1003
+ H.CheckboxItem,
988
1004
  {
989
1005
  ref: d,
990
1006
  className: l(
@@ -994,14 +1010,14 @@ const Wt = Y.forwardRef(({ className: t, children: n, checked: o = !1, ...a }, d
994
1010
  checked: o,
995
1011
  ...a,
996
1012
  children: [
997
- /* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(B.ItemIndicator, { children: /* @__PURE__ */ e(kt, { className: "h-4 w-4" }) }) }),
998
- n
1013
+ /* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(H.ItemIndicator, { children: /* @__PURE__ */ e(kt, { className: "h-4 w-4" }) }) }),
1014
+ r
999
1015
  ]
1000
1016
  }
1001
1017
  ));
1002
- Wt.displayName = B.CheckboxItem.displayName;
1003
- const Lt = Y.forwardRef(({ className: t, children: n, ...o }, a) => /* @__PURE__ */ r(
1004
- B.RadioItem,
1018
+ Lt.displayName = H.CheckboxItem.displayName;
1019
+ const Wt = Y.forwardRef(({ className: t, children: r, ...o }, a) => /* @__PURE__ */ n(
1020
+ H.RadioItem,
1005
1021
  {
1006
1022
  ref: a,
1007
1023
  className: l(
@@ -1010,31 +1026,31 @@ const Lt = Y.forwardRef(({ className: t, children: n, ...o }, a) => /* @__PURE__
1010
1026
  ),
1011
1027
  ...o,
1012
1028
  children: [
1013
- /* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(B.ItemIndicator, { children: /* @__PURE__ */ e(Mt, { className: "h-2 w-2 fill-current" }) }) }),
1014
- n
1029
+ /* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(H.ItemIndicator, { children: /* @__PURE__ */ e(Mt, { className: "h-2 w-2 fill-current" }) }) }),
1030
+ r
1015
1031
  ]
1016
1032
  }
1017
1033
  ));
1018
- Lt.displayName = B.RadioItem.displayName;
1019
- const Et = Y.forwardRef(({ className: t, inset: n, ...o }, a) => /* @__PURE__ */ e(
1020
- B.Label,
1034
+ Wt.displayName = H.RadioItem.displayName;
1035
+ const _t = Y.forwardRef(({ className: t, inset: r, ...o }, a) => /* @__PURE__ */ e(
1036
+ H.Label,
1021
1037
  {
1022
1038
  ref: a,
1023
- className: l("px-2 py-1.5 text-sm font-semibold", n && "pl-8", t),
1039
+ className: l("px-2 py-1.5 text-sm font-semibold", r && "pl-8", t),
1024
1040
  ...o
1025
1041
  }
1026
1042
  ));
1027
- Et.displayName = B.Label.displayName;
1028
- const _t = Y.forwardRef(({ className: t, ...n }, o) => /* @__PURE__ */ e(
1029
- B.Separator,
1043
+ _t.displayName = H.Label.displayName;
1044
+ const Et = Y.forwardRef(({ className: t, ...r }, o) => /* @__PURE__ */ e(
1045
+ H.Separator,
1030
1046
  {
1031
1047
  ref: o,
1032
1048
  className: l("-mx-1 my-1 h-px bg-muted", t),
1033
- ...n
1049
+ ...r
1034
1050
  }
1035
1051
  ));
1036
- _t.displayName = B.Separator.displayName;
1037
- const $t = et(
1052
+ Et.displayName = H.Separator.displayName;
1053
+ const Bt = et(
1038
1054
  "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",
1039
1055
  {
1040
1056
  variants: {
@@ -1048,10 +1064,10 @@ const $t = et(
1048
1064
  defaultVariants: { variant: "default" }
1049
1065
  }
1050
1066
  );
1051
- function It({ className: t, variant: n, ...o }) {
1052
- return /* @__PURE__ */ e("div", { className: l($t({ variant: n }), t), ...o });
1067
+ function $t({ className: t, variant: r, ...o }) {
1068
+ return /* @__PURE__ */ e("div", { className: l(Bt({ variant: r }), t), ...o });
1053
1069
  }
1054
- function At({ className: t }) {
1070
+ function It({ className: t }) {
1055
1071
  return /* @__PURE__ */ e(
1056
1072
  "svg",
1057
1073
  {
@@ -1069,7 +1085,7 @@ function At({ className: t }) {
1069
1085
  }
1070
1086
  );
1071
1087
  }
1072
- function Pt({ className: t }) {
1088
+ function At({ className: t }) {
1073
1089
  return /* @__PURE__ */ e(
1074
1090
  "svg",
1075
1091
  {
@@ -1087,7 +1103,7 @@ function Pt({ className: t }) {
1087
1103
  }
1088
1104
  );
1089
1105
  }
1090
- const jt = [
1106
+ const Pt = [
1091
1107
  "January",
1092
1108
  "February",
1093
1109
  "March",
@@ -1101,9 +1117,9 @@ const jt = [
1101
1117
  "November",
1102
1118
  "December"
1103
1119
  ];
1104
- function Bt({
1120
+ function jt({
1105
1121
  date: t,
1106
- view: n,
1122
+ view: r,
1107
1123
  events: o = [],
1108
1124
  onNavigatePrev: a,
1109
1125
  onNavigateNext: d,
@@ -1111,17 +1127,17 @@ function Bt({
1111
1127
  showEventCount: c = !0,
1112
1128
  className: b
1113
1129
  }) {
1114
- const z = jt[t.getMonth()], p = t.getFullYear(), y = c ? lt(o, t, n, g) : 0, W = dt(t, n);
1115
- return /* @__PURE__ */ r("div", { className: l("min-w-0 flex-1", b), children: [
1116
- /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 sm:gap-2 flex-wrap", children: [
1117
- /* @__PURE__ */ r("span", { className: "text-base sm:text-lg font-semibold truncate", children: [
1130
+ const z = Pt[t.getMonth()], p = t.getFullYear(), y = c ? lt(o, t, r, g) : 0, L = dt(t, r);
1131
+ return /* @__PURE__ */ n("div", { className: l("min-w-0 flex-1", b), children: [
1132
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5 sm:gap-2 flex-wrap", children: [
1133
+ /* @__PURE__ */ n("span", { className: "text-base sm:text-lg font-semibold truncate", children: [
1118
1134
  z,
1119
1135
  " ",
1120
1136
  p
1121
1137
  ] }),
1122
- c && /* @__PURE__ */ e(It, { variant: "outline", className: "px-1 sm:px-1.5 text-[10px] sm:text-xs shrink-0", children: y })
1138
+ c && /* @__PURE__ */ e($t, { variant: "outline", className: "px-1 sm:px-1.5 text-[10px] sm:text-xs shrink-0", children: y })
1123
1139
  ] }),
1124
- /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 sm:gap-2", children: [
1140
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5 sm:gap-2", children: [
1125
1141
  /* @__PURE__ */ e(
1126
1142
  ce,
1127
1143
  {
@@ -1129,10 +1145,10 @@ function Bt({
1129
1145
  size: "icon",
1130
1146
  className: "size-5 sm:size-6 [&_svg]:size-3 sm:[&_svg]:size-4",
1131
1147
  onClick: a,
1132
- children: /* @__PURE__ */ e(At, {})
1148
+ children: /* @__PURE__ */ e(It, {})
1133
1149
  }
1134
1150
  ),
1135
- /* @__PURE__ */ e("p", { className: "text-xs sm:text-sm text-muted-foreground truncate", children: W }),
1151
+ /* @__PURE__ */ e("p", { className: "text-xs sm:text-sm text-muted-foreground truncate", children: L }),
1136
1152
  /* @__PURE__ */ e(
1137
1153
  ce,
1138
1154
  {
@@ -1140,7 +1156,7 @@ function Bt({
1140
1156
  size: "icon",
1141
1157
  className: "size-5 sm:size-6 [&_svg]:size-3 sm:[&_svg]:size-4",
1142
1158
  onClick: d,
1143
- children: /* @__PURE__ */ e(Pt, {})
1159
+ children: /* @__PURE__ */ e(At, {})
1144
1160
  }
1145
1161
  )
1146
1162
  ] })
@@ -1160,9 +1176,9 @@ const Rt = [
1160
1176
  "NOV",
1161
1177
  "DEC"
1162
1178
  ];
1163
- function Ht({ onClick: t, className: n }) {
1179
+ function Ht({ onClick: t, className: r }) {
1164
1180
  const o = /* @__PURE__ */ new Date();
1165
- return /* @__PURE__ */ r(
1181
+ return /* @__PURE__ */ n(
1166
1182
  "button",
1167
1183
  {
1168
1184
  type: "button",
@@ -1170,7 +1186,7 @@ function Ht({ onClick: t, className: n }) {
1170
1186
  "flex size-11 sm:size-14 flex-col items-start overflow-hidden rounded-lg border shrink-0",
1171
1187
  "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
1172
1188
  "hover:bg-accent/50 transition-colors",
1173
- n
1189
+ r
1174
1190
  ),
1175
1191
  onClick: t,
1176
1192
  children: [
@@ -1181,7 +1197,7 @@ function Ht({ onClick: t, className: n }) {
1181
1197
  );
1182
1198
  }
1183
1199
  function Ot({ className: t }) {
1184
- return /* @__PURE__ */ r(
1200
+ return /* @__PURE__ */ n(
1185
1201
  "svg",
1186
1202
  {
1187
1203
  className: t,
@@ -1210,7 +1226,7 @@ function Ot({ className: t }) {
1210
1226
  );
1211
1227
  }
1212
1228
  function ye({ className: t }) {
1213
- return /* @__PURE__ */ r(
1229
+ return /* @__PURE__ */ n(
1214
1230
  "svg",
1215
1231
  {
1216
1232
  className: t,
@@ -1251,7 +1267,7 @@ function Fe({ className: t }) {
1251
1267
  );
1252
1268
  }
1253
1269
  function Ft({ className: t }) {
1254
- return /* @__PURE__ */ r(
1270
+ return /* @__PURE__ */ n(
1255
1271
  "svg",
1256
1272
  {
1257
1273
  className: t,
@@ -1272,7 +1288,7 @@ function Ft({ className: t }) {
1272
1288
  );
1273
1289
  }
1274
1290
  function Ve({ className: t }) {
1275
- return /* @__PURE__ */ r(
1291
+ return /* @__PURE__ */ n(
1276
1292
  "svg",
1277
1293
  {
1278
1294
  className: t,
@@ -1293,7 +1309,7 @@ function Ve({ className: t }) {
1293
1309
  );
1294
1310
  }
1295
1311
  function Vt({ className: t }) {
1296
- return /* @__PURE__ */ r(
1312
+ return /* @__PURE__ */ n(
1297
1313
  "svg",
1298
1314
  {
1299
1315
  className: t,
@@ -1318,7 +1334,7 @@ function Vt({ className: t }) {
1318
1334
  );
1319
1335
  }
1320
1336
  function Gt({ className: t }) {
1321
- return /* @__PURE__ */ r(
1337
+ return /* @__PURE__ */ n(
1322
1338
  "svg",
1323
1339
  {
1324
1340
  className: t,
@@ -1339,7 +1355,7 @@ function Gt({ className: t }) {
1339
1355
  );
1340
1356
  }
1341
1357
  function Ut({ className: t }) {
1342
- return /* @__PURE__ */ r(
1358
+ return /* @__PURE__ */ n(
1343
1359
  "svg",
1344
1360
  {
1345
1361
  className: t,
@@ -1361,7 +1377,7 @@ function Ut({ className: t }) {
1361
1377
  );
1362
1378
  }
1363
1379
  function qt({ className: t }) {
1364
- return /* @__PURE__ */ r(
1380
+ return /* @__PURE__ */ n(
1365
1381
  "svg",
1366
1382
  {
1367
1383
  className: t,
@@ -1395,9 +1411,9 @@ const Kt = [
1395
1411
  { value: "timeline-3day", label: "3 Days", icon: ye },
1396
1412
  { value: "timeline-week", label: "7 Days", icon: ye }
1397
1413
  ];
1398
- function dn({
1414
+ function lr({
1399
1415
  currentDate: t,
1400
- view: n,
1416
+ view: r,
1401
1417
  events: o = [],
1402
1418
  onNavigateToday: a,
1403
1419
  onNavigatePrev: d,
@@ -1407,16 +1423,16 @@ function dn({
1407
1423
  onAddEvent: z,
1408
1424
  availableViews: p = ["day", "week", "month", "agenda"],
1409
1425
  showTimelineViews: y = !1,
1410
- timelineViews: W,
1426
+ timelineViews: L,
1411
1427
  settingsContent: i,
1412
1428
  showSettings: v = !1,
1413
1429
  filterContent: h,
1414
1430
  actions: w,
1415
- className: _,
1416
- weekStartsOn: L = 1,
1431
+ className: E,
1432
+ weekStartsOn: W = 1,
1417
1433
  labels: D = {}
1418
1434
  }) {
1419
- const x = F(
1435
+ const x = V(
1420
1436
  () => ({
1421
1437
  today: "Today",
1422
1438
  addEvent: "Add Event",
@@ -1425,31 +1441,31 @@ function dn({
1425
1441
  ...D
1426
1442
  }),
1427
1443
  [D]
1428
- ), R = () => {
1444
+ ), O = () => {
1429
1445
  a?.(), c?.("today");
1430
- }, j = () => {
1446
+ }, P = () => {
1431
1447
  d?.(), c?.("prev");
1432
- }, H = () => {
1448
+ }, j = () => {
1433
1449
  g?.(), c?.("next");
1434
- }, I = ["day", "week", "month", "year", "agenda"].includes(
1435
- n
1436
- ), O = n.startsWith("timeline-") || n.startsWith("resource-"), u = Kt.filter(
1450
+ }, B = ["day", "week", "month", "year", "agenda"].includes(
1451
+ r
1452
+ ), F = r.startsWith("timeline-") || r.startsWith("resource-"), u = Kt.filter(
1437
1453
  (m) => p.includes(m.value)
1438
- ), k = I ? u.find((m) => m.value === n) : null, A = O ? Ge.find((m) => m.value === n) : null;
1439
- return /* @__PURE__ */ r("div", { className: l("flex flex-col w-full gap-3 mb-2", _), children: [
1440
- /* @__PURE__ */ r("div", { className: "flex lg:flex-row flex-col w-full justify-between gap-3", children: [
1441
- /* @__PURE__ */ r("div", { className: "flex items-center justify-between gap-2", children: [
1442
- /* @__PURE__ */ r("div", { className: "flex items-center gap-2 sm:gap-3 min-w-0", children: [
1443
- /* @__PURE__ */ e(Ht, { onClick: R }),
1454
+ ), k = B ? u.find((m) => m.value === r) : null, I = F ? Ge.find((m) => m.value === r) : null;
1455
+ return /* @__PURE__ */ n("div", { className: l("flex flex-col w-full gap-3 mb-2", E), children: [
1456
+ /* @__PURE__ */ n("div", { className: "flex lg:flex-row flex-col w-full justify-between gap-3", children: [
1457
+ /* @__PURE__ */ n("div", { className: "flex items-center justify-between gap-2", children: [
1458
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-2 sm:gap-3 min-w-0", children: [
1459
+ /* @__PURE__ */ e(Ht, { onClick: O }),
1444
1460
  /* @__PURE__ */ e(
1445
- Bt,
1461
+ jt,
1446
1462
  {
1447
1463
  date: t,
1448
- view: n,
1464
+ view: r,
1449
1465
  events: o,
1450
- onNavigatePrev: j,
1451
- onNavigateNext: H,
1452
- weekStartsOn: L
1466
+ onNavigatePrev: P,
1467
+ onNavigateNext: j,
1468
+ weekStartsOn: W
1453
1469
  }
1454
1470
  )
1455
1471
  ] }),
@@ -1463,15 +1479,15 @@ function dn({
1463
1479
  }
1464
1480
  )
1465
1481
  ] }),
1466
- /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 sm:gap-2 overflow-x-auto pb-1 -mb-1 scrollbar-none", children: [
1467
- b && u.length > 0 && /* @__PURE__ */ r(He, { children: [
1468
- /* @__PURE__ */ r(
1482
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5 sm:gap-2 overflow-x-auto pb-1 -mb-1 scrollbar-none", children: [
1483
+ b && u.length > 0 && /* @__PURE__ */ n(He, { children: [
1484
+ /* @__PURE__ */ n(
1469
1485
  Oe,
1470
1486
  {
1471
1487
  className: l(
1472
1488
  "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors",
1473
1489
  "h-10 px-2 sm:px-3 gap-1 sm:gap-1.5 shrink-0",
1474
- I ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-background hover:bg-accent hover:text-accent-foreground"
1490
+ B ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-background hover:bg-accent hover:text-accent-foreground"
1475
1491
  ),
1476
1492
  children: [
1477
1493
  /* @__PURE__ */ e(Ot, { className: "size-4" }),
@@ -1481,17 +1497,17 @@ function dn({
1481
1497
  }
1482
1498
  ),
1483
1499
  /* @__PURE__ */ e(Me, { align: "start", className: "min-w-[120px]", children: u.map((m) => {
1484
- const E = m.icon;
1485
- return /* @__PURE__ */ r(
1500
+ const _ = m.icon;
1501
+ return /* @__PURE__ */ n(
1486
1502
  Te,
1487
1503
  {
1488
1504
  onClick: () => b(m.value),
1489
1505
  className: l(
1490
1506
  "gap-2",
1491
- n === m.value && "bg-accent"
1507
+ r === m.value && "bg-accent"
1492
1508
  ),
1493
1509
  children: [
1494
- /* @__PURE__ */ e(E, { className: "size-4" }),
1510
+ /* @__PURE__ */ e(_, { className: "size-4" }),
1495
1511
  /* @__PURE__ */ e("span", { children: m.label })
1496
1512
  ]
1497
1513
  },
@@ -1499,34 +1515,34 @@ function dn({
1499
1515
  );
1500
1516
  }) })
1501
1517
  ] }),
1502
- y && b && /* @__PURE__ */ r(He, { children: [
1503
- /* @__PURE__ */ r(
1518
+ y && b && /* @__PURE__ */ n(He, { children: [
1519
+ /* @__PURE__ */ n(
1504
1520
  Oe,
1505
1521
  {
1506
1522
  className: l(
1507
1523
  "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors",
1508
1524
  "h-10 px-2 sm:px-3 gap-1 sm:gap-1.5 shrink-0",
1509
- O ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-white hover:bg-zinc-50 hover:text-accent-foreground"
1525
+ F ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-white hover:bg-zinc-50 hover:text-accent-foreground"
1510
1526
  ),
1511
1527
  children: [
1512
1528
  /* @__PURE__ */ e(ye, { className: "size-4" }),
1513
- /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: A?.label ?? x.resourceView }),
1529
+ /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: I?.label ?? x.resourceView }),
1514
1530
  /* @__PURE__ */ e(Fe, { className: "size-3 opacity-60" })
1515
1531
  ]
1516
1532
  }
1517
1533
  ),
1518
1534
  /* @__PURE__ */ e(Me, { align: "start", className: "min-w-[120px]", children: Ge.map((m) => {
1519
- const E = m.icon;
1520
- return /* @__PURE__ */ r(
1535
+ const _ = m.icon;
1536
+ return /* @__PURE__ */ n(
1521
1537
  Te,
1522
1538
  {
1523
1539
  onClick: () => b(m.value),
1524
1540
  className: l(
1525
1541
  "gap-2",
1526
- n === m.value && "bg-accent"
1542
+ r === m.value && "bg-accent"
1527
1543
  ),
1528
1544
  children: [
1529
- /* @__PURE__ */ e(E, { className: "size-4" }),
1545
+ /* @__PURE__ */ e(_, { className: "size-4" }),
1530
1546
  /* @__PURE__ */ e("span", { children: m.label })
1531
1547
  ]
1532
1548
  },
@@ -1534,8 +1550,8 @@ function dn({
1534
1550
  );
1535
1551
  }) })
1536
1552
  ] }),
1537
- v && i && /* @__PURE__ */ r(ne, { children: [
1538
- /* @__PURE__ */ e(re, { asChild: !0, children: /* @__PURE__ */ e(
1553
+ v && i && /* @__PURE__ */ n(re, { children: [
1554
+ /* @__PURE__ */ e(ne, { asChild: !0, children: /* @__PURE__ */ e(
1539
1555
  ce,
1540
1556
  {
1541
1557
  variant: "outline",
@@ -1555,7 +1571,7 @@ function dn({
1555
1571
  )
1556
1572
  ] }),
1557
1573
  w,
1558
- z && /* @__PURE__ */ r(
1574
+ z && /* @__PURE__ */ n(
1559
1575
  ce,
1560
1576
  {
1561
1577
  className: "hidden lg:flex shrink-0 max-h-10",
@@ -1571,9 +1587,9 @@ function dn({
1571
1587
  h && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 pb-1 -mb-1 scrollbar-none", children: h })
1572
1588
  ] });
1573
1589
  }
1574
- function cn({
1590
+ function dr({
1575
1591
  events: t,
1576
- date: n,
1592
+ date: r,
1577
1593
  daysAhead: o = 60,
1578
1594
  badgeVariant: a = "colored",
1579
1595
  onEventClick: d,
@@ -1583,12 +1599,12 @@ function cn({
1583
1599
  slots: z,
1584
1600
  classNames: p
1585
1601
  }) {
1586
- const y = F(() => {
1587
- const i = new Date(n);
1602
+ const y = V(() => {
1603
+ const i = new Date(r);
1588
1604
  i.setHours(0, 0, 0, 0);
1589
1605
  const v = new Date(i);
1590
1606
  return v.setDate(v.getDate() + o), t.filter((h) => h.endDate >= i && h.startDate <= v);
1591
- }, [t, o, n]), W = F(() => {
1607
+ }, [t, o, r]), L = V(() => {
1592
1608
  const i = ct(y), v = [];
1593
1609
  for (const [h, w] of i)
1594
1610
  v.push({
@@ -1598,21 +1614,21 @@ function cn({
1598
1614
  });
1599
1615
  return v.sort((h, w) => h.date.getTime() - w.date.getTime()), v;
1600
1616
  }, [y]);
1601
- return W.length === 0 ? /* @__PURE__ */ e("div", { className: l("flex flex-col items-center justify-center h-full py-12", g), children: /* @__PURE__ */ r("div", { className: "text-center", children: [
1617
+ return L.length === 0 ? /* @__PURE__ */ e("div", { className: l("flex flex-col items-center justify-center h-full py-12", g), children: /* @__PURE__ */ n("div", { className: "text-center", children: [
1602
1618
  /* @__PURE__ */ e("p", { className: "text-muted-foreground", children: "No events found" }),
1603
1619
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground/70", children: "No events scheduled for this period" })
1604
- ] }) }) : /* @__PURE__ */ r("div", { className: l("flex flex-col h-full overflow-auto", p?.agendaList, g), children: [
1605
- /* @__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: [
1620
+ ] }) }) : /* @__PURE__ */ n("div", { className: l("flex flex-col h-full overflow-auto", p?.agendaList, g), children: [
1621
+ /* @__PURE__ */ e("div", { className: "sticky top-0 z-10 bg-background border-b px-4 py-3", children: /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
1606
1622
  /* @__PURE__ */ e("h2", { className: "text-lg font-medium", children: "Schedule" }),
1607
- /* @__PURE__ */ r("span", { className: "text-sm text-muted-foreground", children: [
1623
+ /* @__PURE__ */ n("span", { className: "text-sm text-muted-foreground", children: [
1608
1624
  y.length,
1609
1625
  " event",
1610
1626
  y.length !== 1 ? "s" : ""
1611
1627
  ] })
1612
1628
  ] }) }),
1613
- /* @__PURE__ */ e("div", { className: "flex-1", children: W.map(({ date: i, dateKey: v, events: h }) => {
1614
- const w = te(i), _ = i.toLocaleDateString([], { weekday: "short" }), L = i.getDate(), D = i.toLocaleDateString([], { month: "short" });
1615
- return /* @__PURE__ */ r("div", { className: l("", p?.agendaDayGroup), children: [
1629
+ /* @__PURE__ */ e("div", { className: "flex-1", children: L.map(({ date: i, dateKey: v, events: h }) => {
1630
+ const w = te(i), E = i.toLocaleDateString([], { weekday: "short" }), W = i.getDate(), D = i.toLocaleDateString([], { month: "short" });
1631
+ return /* @__PURE__ */ n("div", { className: l("", p?.agendaDayGroup), children: [
1616
1632
  /* @__PURE__ */ e(
1617
1633
  "div",
1618
1634
  {
@@ -1620,8 +1636,8 @@ function cn({
1620
1636
  "sticky top-[52px] z-10 bg-background px-4 py-3 border-b",
1621
1637
  p?.agendaDayHeader
1622
1638
  ),
1623
- children: /* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
1624
- /* @__PURE__ */ r("div", { className: "flex flex-col items-center min-w-[40px]", children: [
1639
+ children: /* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
1640
+ /* @__PURE__ */ n("div", { className: "flex flex-col items-center min-w-[40px]", children: [
1625
1641
  /* @__PURE__ */ e(
1626
1642
  "span",
1627
1643
  {
@@ -1629,7 +1645,7 @@ function cn({
1629
1645
  "text-[11px] font-medium uppercase tracking-wide",
1630
1646
  w ? "text-primary" : "text-muted-foreground"
1631
1647
  ),
1632
- children: _
1648
+ children: E
1633
1649
  }
1634
1650
  ),
1635
1651
  /* @__PURE__ */ e(
@@ -1640,11 +1656,11 @@ function cn({
1640
1656
  "size-10 text-xl font-normal",
1641
1657
  w ? "bg-primary text-primary-foreground" : "text-foreground"
1642
1658
  ),
1643
- children: L
1659
+ children: W
1644
1660
  }
1645
1661
  )
1646
1662
  ] }),
1647
- /* @__PURE__ */ r("span", { className: "text-sm text-muted-foreground", children: [
1663
+ /* @__PURE__ */ n("span", { className: "text-sm text-muted-foreground", children: [
1648
1664
  D,
1649
1665
  " ",
1650
1666
  i.getFullYear()
@@ -1674,17 +1690,17 @@ function cn({
1674
1690
  }) })
1675
1691
  ] });
1676
1692
  }
1677
- function nt({
1693
+ function rt({
1678
1694
  events: t,
1679
- date: n,
1695
+ date: r,
1680
1696
  onEventClick: o,
1681
1697
  className: a
1682
1698
  }) {
1683
- return t.length === 0 ? null : /* @__PURE__ */ r("div", { className: l("border-b bg-muted/20 px-2 py-1.5 space-y-1", "sm:px-4 sm:py-2", a), children: [
1699
+ return t.length === 0 ? null : /* @__PURE__ */ n("div", { className: l("border-b bg-muted/20 px-2 py-1.5 space-y-1", "sm:px-4 sm:py-2", a), children: [
1684
1700
  /* @__PURE__ */ e("span", { className: "text-[10px] font-medium text-muted-foreground sm:text-xs", children: "All day / Multi-day" }),
1685
1701
  /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: t.map((d) => {
1686
- const g = fe(d.color), c = Pe(d.startDate, n), b = Pe(d.endDate, n);
1687
- return /* @__PURE__ */ r(
1702
+ const g = fe(d.color), c = Ae(d.startDate, r), b = Ae(d.endDate, r);
1703
+ return /* @__PURE__ */ n(
1688
1704
  "button",
1689
1705
  {
1690
1706
  type: "button",
@@ -1708,9 +1724,9 @@ function nt({
1708
1724
  ] });
1709
1725
  }
1710
1726
  const Yt = 5;
1711
- function rt({
1727
+ function nt({
1712
1728
  slot: t,
1713
- onSelectionStart: n,
1729
+ onSelectionStart: r,
1714
1730
  onSelectionMove: o,
1715
1731
  onSelectionEnd: a,
1716
1732
  isSelected: d = !1,
@@ -1720,39 +1736,39 @@ function rt({
1720
1736
  children: z,
1721
1737
  className: p,
1722
1738
  height: y,
1723
- style: W,
1739
+ style: L,
1724
1740
  dataAttributes: i
1725
1741
  }) {
1726
- const v = se(null), h = se(!1), w = se(!1), _ = se(null), [L, D] = oe(!1), x = Le(), R = T(
1742
+ const v = se(null), h = se(!1), w = se(!1), E = se(null), [W, D] = oe(!1), x = We(), O = M(
1727
1743
  (m) => {
1728
- c || m.button !== 0 && m.pointerType === "mouse" || (m.preventDefault(), v.current = { x: m.clientX, y: m.clientY }, h.current = !1, w.current = !0, n?.(t));
1744
+ c || m.button !== 0 && m.pointerType === "mouse" || (m.preventDefault(), v.current = { x: m.clientX, y: m.clientY }, h.current = !1, w.current = !0, r?.(t));
1729
1745
  },
1730
- [c, t, n]
1731
- ), j = T(
1746
+ [c, t, r]
1747
+ ), P = M(
1732
1748
  (m) => {
1733
1749
  if (!(v.current && w.current && !c)) return;
1734
- const E = m.clientX - v.current.x, $ = m.clientY - v.current.y;
1735
- Math.sqrt(E * E + $ * $) >= Yt && (h.current = !0);
1750
+ const _ = m.clientX - v.current.x, $ = m.clientY - v.current.y;
1751
+ Math.sqrt(_ * _ + $ * $) >= Yt && (h.current = !0);
1736
1752
  },
1737
1753
  [c]
1738
- ), H = T(
1754
+ ), j = M(
1739
1755
  (m) => {
1740
1756
  c || (m.buttons > 0 || g) && o?.(t);
1741
1757
  },
1742
1758
  [c, g, t, o]
1743
- ), I = T(() => {
1759
+ ), B = M(() => {
1744
1760
  c || (a?.(), v.current = null, h.current = !1, w.current = !1);
1745
- }, [c, a]), O = T(
1761
+ }, [c, a]), F = M(
1746
1762
  (m) => {
1747
1763
  if (!x?.isDragging || c) return;
1748
1764
  m.preventDefault(), m.dataTransfer.dropEffect = "move", D(!0);
1749
- const E = /* @__PURE__ */ new Date(), $ = t.hour ?? E.getHours(), N = t.minute ?? (E.getMinutes() >= 30 ? 30 : 0);
1765
+ const _ = /* @__PURE__ */ new Date(), $ = t.hour ?? _.getHours(), N = t.minute ?? (_.getMinutes() >= 30 ? 30 : 0);
1750
1766
  x.updateDragPreview?.(t.date, $, N);
1751
1767
  },
1752
1768
  [x, c, t]
1753
- ), u = T(() => {
1769
+ ), u = M(() => {
1754
1770
  D(!1);
1755
- }, []), k = T(
1771
+ }, []), k = M(
1756
1772
  (m) => {
1757
1773
  m.preventDefault(), D(!1), !(!x?.isDragging || c) && x.endDrag?.();
1758
1774
  },
@@ -1766,27 +1782,27 @@ function rt({
1766
1782
  window.removeEventListener("pointerup", m), window.removeEventListener("pointercancel", m);
1767
1783
  };
1768
1784
  }, []);
1769
- const A = T(
1785
+ const I = M(
1770
1786
  (m) => {
1771
- c || (m.key === "Enter" || m.key === " ") && (m.preventDefault(), n?.(t), a?.());
1787
+ c || (m.key === "Enter" || m.key === " ") && (m.preventDefault(), r?.(t), a?.());
1772
1788
  },
1773
- [c, t, n, a]
1789
+ [c, t, r, a]
1774
1790
  );
1775
1791
  return /* @__PURE__ */ e(
1776
1792
  "button",
1777
1793
  {
1778
- ref: _,
1794
+ ref: E,
1779
1795
  type: "button",
1780
1796
  "aria-label": b,
1781
1797
  "aria-disabled": c,
1782
1798
  "aria-pressed": d,
1783
1799
  disabled: c,
1784
- onPointerDown: R,
1785
- onPointerMove: j,
1786
- onPointerUp: I,
1787
- onPointerEnter: H,
1788
- onKeyDown: A,
1789
- onDragOver: O,
1800
+ onPointerDown: O,
1801
+ onPointerMove: P,
1802
+ onPointerUp: B,
1803
+ onPointerEnter: j,
1804
+ onKeyDown: I,
1805
+ onDragOver: F,
1790
1806
  onDragLeave: u,
1791
1807
  onDrop: k,
1792
1808
  className: l(
@@ -1797,12 +1813,12 @@ function rt({
1797
1813
  // Selection state — blue tint matching the primary color
1798
1814
  d && "bg-blue-100/70",
1799
1815
  // Drag over state - visual feedback when event is dragged over
1800
- L && "bg-primary/20 ring-2 ring-primary ring-inset",
1816
+ W && "bg-primary/20 ring-2 ring-primary ring-inset",
1801
1817
  // Disabled state
1802
1818
  c && "cursor-not-allowed opacity-50",
1803
1819
  p
1804
1820
  ),
1805
- style: { height: y, ...W },
1821
+ style: { height: y, ...L },
1806
1822
  ...i,
1807
1823
  children: z
1808
1824
  }
@@ -1810,23 +1826,23 @@ function rt({
1810
1826
  }
1811
1827
  function ot({
1812
1828
  slot: t,
1813
- date: n,
1829
+ date: r,
1814
1830
  hour: o,
1815
1831
  minute: a,
1816
1832
  ariaLabel: d,
1817
1833
  ...g
1818
1834
  }) {
1819
- const c = t ?? { date: n, hour: o ?? 0, minute: a ?? 0 }, b = d ?? `Add event at ${(c.hour ?? 0).toString().padStart(2, "0")}:${(c.minute ?? 0).toString().padStart(2, "0")} on ${c.date.toLocaleDateString()}`;
1820
- return /* @__PURE__ */ e(rt, { slot: c, ariaLabel: b, ...g });
1835
+ const c = t ?? { date: r, hour: o ?? 0, minute: a ?? 0 }, b = d ?? `Add event at ${(c.hour ?? 0).toString().padStart(2, "0")}:${(c.minute ?? 0).toString().padStart(2, "0")} on ${c.date.toLocaleDateString()}`;
1836
+ return /* @__PURE__ */ e(nt, { slot: c, ariaLabel: b, ...g });
1821
1837
  }
1822
- function Xt({ slot: t, date: n, ariaLabel: o, ...a }) {
1823
- const d = t ?? { date: n }, g = o ?? `Select ${d.date.toLocaleDateString()}`;
1824
- return /* @__PURE__ */ e(rt, { slot: d, ariaLabel: g, ...a });
1838
+ function Xt({ slot: t, date: r, ariaLabel: o, ...a }) {
1839
+ const d = t ?? { date: r }, g = o ?? `Select ${d.date.toLocaleDateString()}`;
1840
+ return /* @__PURE__ */ e(nt, { slot: d, ariaLabel: g, ...a });
1825
1841
  }
1826
1842
  const me = 96, Ne = 72, ke = 80;
1827
- function un({
1843
+ function cr({
1828
1844
  events: t,
1829
- date: n,
1845
+ date: r,
1830
1846
  visibleHours: o = { startHour: 0, endHour: 24 },
1831
1847
  workingHours: a,
1832
1848
  slotDuration: d = 30,
@@ -1836,60 +1852,65 @@ function un({
1836
1852
  className: z,
1837
1853
  renderEvent: p,
1838
1854
  renderPopover: y,
1839
- slots: W,
1855
+ slots: L,
1840
1856
  classNames: i
1841
1857
  }) {
1842
- const v = 60 / d, h = 100 / v, w = F(() => {
1858
+ const v = 60 / d, h = 100 / v, w = V(() => {
1843
1859
  const C = [];
1844
1860
  for (let s = 0; s < v; s++)
1845
1861
  C.push(s * d);
1846
1862
  return C;
1847
- }, [v, d]), _ = F(() => We(t, n), [t, n]), { singleDay: L, multiDay: D } = F(() => Ke(_), [_]), x = F(() => {
1848
- const C = Ye(L, n, o, me), s = /* @__PURE__ */ new Map();
1863
+ }, [v, d]), E = V(() => Le(t, r), [t, r]), { singleDay: W, multiDay: D } = V(() => Ke(E), [E]), x = V(() => {
1864
+ const C = Ye(W, r, o, me), s = /* @__PURE__ */ new Map();
1849
1865
  for (const f of C)
1850
1866
  s.set(f.event.id, f.position);
1851
1867
  return s;
1852
- }, [L, n, o]), R = F(() => Xe(o), [o]), j = /* @__PURE__ */ new Date(), H = te(n), I = F(() => {
1853
- if (!H) return 0;
1854
- const C = j.getHours() + j.getMinutes() / 60;
1868
+ }, [W, r, o]), O = V(() => Xe(o), [o]), P = /* @__PURE__ */ new Date(), j = te(r), B = V(() => {
1869
+ if (!j) return 0;
1870
+ const C = P.getHours() + P.getMinutes() / 60;
1855
1871
  return C < o.startHour || C > o.endHour ? -1 : (C - o.startHour) * me;
1856
- }, [H, o, j]), O = se(null);
1872
+ }, [j, o, P]), F = se(null);
1857
1873
  qe(() => {
1858
- const C = O.current;
1874
+ const C = F.current;
1859
1875
  if (!C) return;
1860
1876
  const s = () => {
1861
- const f = n.getDay(), S = a?.[f];
1862
- let P;
1863
- S?.enabled && S.from > 0 ? P = Math.max(S.from - 1, o.startHour) : P = Math.max(7, o.startHour);
1864
- const M = (P - o.startHour) * me;
1877
+ let f;
1878
+ if (j) {
1879
+ const A = (/* @__PURE__ */ new Date()).getHours();
1880
+ f = Math.max(A - 1, o.startHour);
1881
+ } else {
1882
+ const A = r.getDay(), T = a?.[A];
1883
+ T?.enabled && T.from > 0 ? f = Math.max(T.from - 1, o.startHour) : f = Math.max(7, o.startHour);
1884
+ }
1885
+ const S = (f - o.startHour) * me;
1865
1886
  C.scrollTo({
1866
- top: M,
1887
+ top: S,
1867
1888
  behavior: "instant"
1868
1889
  });
1869
1890
  };
1870
1891
  requestAnimationFrame(() => {
1871
1892
  requestAnimationFrame(s);
1872
1893
  });
1873
- }, [n, a, o]);
1874
- const u = Ee(), k = T(
1894
+ }, [r, a, o, j]);
1895
+ const u = _e(), k = M(
1875
1896
  (C) => {
1876
1897
  u?.startSelection(C);
1877
1898
  },
1878
1899
  [u]
1879
- ), A = T(
1900
+ ), I = M(
1880
1901
  (C) => {
1881
1902
  u?.updateSelection(C);
1882
1903
  },
1883
1904
  [u]
1884
- ), m = T(() => {
1905
+ ), m = M(() => {
1885
1906
  u?.endSelection();
1886
- }, [u]), E = T(
1907
+ }, [u]), _ = M(
1887
1908
  (C) => {
1888
1909
  c?.(C);
1889
1910
  },
1890
1911
  [c]
1891
- ), $ = n.toLocaleDateString([], { weekday: "short" }), N = n.getDate(), G = te(n);
1892
- return /* @__PURE__ */ r("div", { className: l("flex flex-col h-full", z), children: [
1912
+ ), $ = r.toLocaleDateString([], { weekday: "short" }), N = r.getDate(), G = te(r);
1913
+ return /* @__PURE__ */ n("div", { className: l("flex flex-col h-full", z), children: [
1893
1914
  /* @__PURE__ */ e(
1894
1915
  "div",
1895
1916
  {
@@ -1898,7 +1919,7 @@ function un({
1898
1919
  i?.columnHeader,
1899
1920
  G && i?.columnHeaderToday
1900
1921
  ),
1901
- children: /* @__PURE__ */ r("div", { className: "flex flex-col items-center", children: [
1922
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col items-center", children: [
1902
1923
  /* @__PURE__ */ e(
1903
1924
  "span",
1904
1925
  {
@@ -1924,23 +1945,23 @@ function un({
1924
1945
  }
1925
1946
  ),
1926
1947
  D.length > 0 && /* @__PURE__ */ e(
1927
- nt,
1948
+ rt,
1928
1949
  {
1929
1950
  events: D,
1930
- date: n,
1931
- onEventClick: E,
1951
+ date: r,
1952
+ onEventClick: _,
1932
1953
  ...i?.multiDayBanner && { className: i.multiDayBanner }
1933
1954
  }
1934
1955
  ),
1935
1956
  /* @__PURE__ */ e(
1936
1957
  "div",
1937
1958
  {
1938
- ref: O,
1959
+ ref: F,
1939
1960
  className: l("flex-1 overflow-auto", i?.scrollContainer),
1940
- children: /* @__PURE__ */ r("div", { className: "relative min-h-full", children: [
1941
- R.map((C, s) => {
1942
- const S = !Je(n, C, a);
1943
- return /* @__PURE__ */ r(
1961
+ children: /* @__PURE__ */ n("div", { className: "relative min-h-full", children: [
1962
+ O.map((C, s) => {
1963
+ const S = !Je(r, C, a);
1964
+ return /* @__PURE__ */ n(
1944
1965
  "div",
1945
1966
  {
1946
1967
  className: l(
@@ -1971,37 +1992,37 @@ function un({
1971
1992
  ) })
1972
1993
  }
1973
1994
  ),
1974
- /* @__PURE__ */ r("div", { className: "relative flex-1", children: [
1975
- H && !S && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-primary/5" }),
1995
+ /* @__PURE__ */ n("div", { className: "relative flex-1", children: [
1996
+ j && !S && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-primary/5" }),
1976
1997
  s !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
1977
- w.slice(1).map((P) => /* @__PURE__ */ e(
1998
+ w.slice(1).map((A) => /* @__PURE__ */ e(
1978
1999
  "div",
1979
2000
  {
1980
2001
  className: "pointer-events-none absolute inset-x-0 border-b border-dashed border-border/30",
1981
- style: { top: `${P / 60 * 100}%` }
2002
+ style: { top: `${A / 60 * 100}%` }
1982
2003
  },
1983
- P
2004
+ A
1984
2005
  )),
1985
- w.map((P, M) => {
1986
- const q = { date: n, hour: C, minute: P };
2006
+ w.map((A, T) => {
2007
+ const q = { date: r, hour: C, minute: A };
1987
2008
  return /* @__PURE__ */ e(
1988
2009
  ot,
1989
2010
  {
1990
2011
  slot: q,
1991
2012
  onSelectionStart: k,
1992
- onSelectionMove: A,
2013
+ onSelectionMove: I,
1993
2014
  onSelectionEnd: m,
1994
2015
  isSelected: u?.isSlotSelected(q) ?? !1,
1995
2016
  isSelecting: u?.isSelecting ?? !1,
1996
2017
  disabled: S,
1997
2018
  className: "absolute inset-x-0",
1998
2019
  style: {
1999
- top: `${M * h}%`,
2020
+ top: `${T * h}%`,
2000
2021
  height: `${h}%`
2001
2022
  },
2002
- ariaLabel: `Add event at ${we(C)}:${String(P).padStart(2, "0")}`
2023
+ ariaLabel: `Add event at ${we(C)}:${String(A).padStart(2, "0")}`
2003
2024
  },
2004
- P
2025
+ A
2005
2026
  );
2006
2027
  })
2007
2028
  ] })
@@ -2015,7 +2036,7 @@ function un({
2015
2036
  {
2016
2037
  className: "absolute top-0 bottom-0 right-0 pointer-events-none",
2017
2038
  style: { left: Ne },
2018
- children: L.map((C) => {
2039
+ children: W.map((C) => {
2019
2040
  const s = x.get(C.id);
2020
2041
  if (!s) return null;
2021
2042
  const f = `calc(${s.width}% - 2px)`, S = `max(${ke}px, ${f})`;
@@ -2054,7 +2075,7 @@ function un({
2054
2075
  })
2055
2076
  }
2056
2077
  ),
2057
- H && I >= 0 && /* @__PURE__ */ r(
2078
+ j && B >= 0 && /* @__PURE__ */ n(
2058
2079
  "div",
2059
2080
  {
2060
2081
  className: l(
@@ -2062,7 +2083,7 @@ function un({
2062
2083
  i?.currentTimeIndicator
2063
2084
  ),
2064
2085
  style: {
2065
- top: I,
2086
+ top: B,
2066
2087
  left: Ne
2067
2088
  },
2068
2089
  children: [
@@ -2093,9 +2114,9 @@ const Jt = [
2093
2114
  { full: "Friday", short: "Fri", tiny: "F" },
2094
2115
  { full: "Saturday", short: "Sat", tiny: "S" }
2095
2116
  ], ge = 3;
2096
- function mn({
2117
+ function ur({
2097
2118
  events: t,
2098
- date: n,
2119
+ date: r,
2099
2120
  weekStartsOn: o = 1,
2100
2121
  badgeVariant: a = "colored",
2101
2122
  onEventClick: d,
@@ -2105,35 +2126,35 @@ function mn({
2105
2126
  renderEvent: z,
2106
2127
  renderPopover: p,
2107
2128
  showMoreEventsInPopover: y = !1,
2108
- slots: W,
2129
+ slots: L,
2109
2130
  classNames: i
2110
2131
  }) {
2111
- const v = W?.dayCellHeader, h = W?.dayCellFooter, [w, _] = oe(null), L = F(() => ut(n, o), [n, o]), D = F(() => {
2132
+ const v = L?.dayCellHeader, h = L?.dayCellFooter, [w, E] = oe(null), W = V(() => ut(r, o), [r, o]), D = V(() => {
2112
2133
  const u = /* @__PURE__ */ new Map();
2113
- for (const k of L) {
2114
- const A = k.date.toDateString(), m = We(t, k.date);
2115
- m.sort((E, $) => E.startDate.getTime() - $.startDate.getTime()), u.set(A, m);
2134
+ for (const k of W) {
2135
+ const I = k.date.toDateString(), m = Le(t, k.date);
2136
+ m.sort((_, $) => _.startDate.getTime() - $.startDate.getTime()), u.set(I, m);
2116
2137
  }
2117
2138
  return u;
2118
- }, [L, t]), x = Ee(), R = T(
2139
+ }, [W, t]), x = _e(), O = M(
2119
2140
  (u) => {
2120
2141
  x?.startSelection(u);
2121
2142
  },
2122
2143
  [x]
2123
- ), j = T(
2144
+ ), P = M(
2124
2145
  (u) => {
2125
2146
  x?.updateSelection(u);
2126
2147
  },
2127
2148
  [x]
2128
- ), H = T(() => {
2149
+ ), j = M(() => {
2129
2150
  x?.endSelection();
2130
- }, [x]), I = T(
2151
+ }, [x]), B = M(
2131
2152
  (u) => {
2132
2153
  c?.(u);
2133
2154
  },
2134
2155
  [c]
2135
- ), O = o === 0 ? Zt : Jt;
2136
- return /* @__PURE__ */ e("div", { className: l("flex flex-col h-full overflow-hidden", b), children: /* @__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: [
2156
+ ), F = o === 0 ? Zt : Jt;
2157
+ return /* @__PURE__ */ e("div", { className: l("flex flex-col h-full overflow-hidden", b), children: /* @__PURE__ */ e("div", { className: "flex flex-col flex-1 overflow-auto", children: /* @__PURE__ */ n("div", { className: "flex flex-col flex-1 min-w-[560px] sm:min-w-0", children: [
2137
2158
  /* @__PURE__ */ e(
2138
2159
  "div",
2139
2160
  {
@@ -2141,7 +2162,7 @@ function mn({
2141
2162
  "grid grid-cols-7 border-b !sticky !top-0 bg-background z-10",
2142
2163
  i?.weekdayHeader
2143
2164
  ),
2144
- children: O.map((u, k) => /* @__PURE__ */ r(
2165
+ children: F.map((u, k) => /* @__PURE__ */ n(
2145
2166
  "div",
2146
2167
  {
2147
2168
  className: l(
@@ -2159,28 +2180,28 @@ function mn({
2159
2180
  ))
2160
2181
  }
2161
2182
  ),
2162
- /* @__PURE__ */ e("div", { className: l("grid grid-cols-7 auto-rows-min", i?.monthGrid), children: L.map((u) => {
2163
- const k = u.date.toDateString(), A = D.get(k) || [], m = te(u.date), E = u.date.getDay() === 0 || u.date.getDay() === 6, $ = A.length > ge;
2164
- return /* @__PURE__ */ r(
2183
+ /* @__PURE__ */ e("div", { className: l("grid grid-cols-7 auto-rows-min", i?.monthGrid), children: W.map((u) => {
2184
+ const k = u.date.toDateString(), I = D.get(k) || [], m = te(u.date), _ = u.date.getDay() === 0 || u.date.getDay() === 6, $ = I.length > ge;
2185
+ return /* @__PURE__ */ n(
2165
2186
  Xt,
2166
2187
  {
2167
2188
  date: u.date,
2168
- onSelectionStart: R,
2169
- onSelectionMove: j,
2170
- onSelectionEnd: H,
2189
+ onSelectionStart: O,
2190
+ onSelectionMove: P,
2191
+ onSelectionEnd: j,
2171
2192
  isSelected: x?.isSlotSelected({ date: u.date }) ?? !1,
2172
2193
  isSelecting: x?.isSelecting ?? !1,
2173
2194
  className: l(
2174
2195
  "relative flex flex-col border-r border-b text-left min-h-[80px] sm:min-h-[100px] overflow-hidden",
2175
2196
  "[&:nth-child(7n)]:border-r-0",
2176
2197
  !u.isCurrentMonth && "bg-muted/20",
2177
- E && u.isCurrentMonth && "bg-muted/10",
2198
+ _ && u.isCurrentMonth && "bg-muted/10",
2178
2199
  i?.dayCell,
2179
2200
  m && i?.dayCellToday,
2180
2201
  !u.isCurrentMonth && i?.dayCellOutside,
2181
- E && i?.dayCellWeekend
2202
+ _ && i?.dayCellWeekend
2182
2203
  ),
2183
- ariaLabel: `${u.date.toLocaleDateString()} - ${A.length} events. Click to create event, double-click to view day.`,
2204
+ ariaLabel: `${u.date.toLocaleDateString()} - ${I.length} events. Click to create event, double-click to view day.`,
2184
2205
  children: [
2185
2206
  /* @__PURE__ */ e(
2186
2207
  "div",
@@ -2195,7 +2216,7 @@ function mn({
2195
2216
  {
2196
2217
  type: "button",
2197
2218
  onClick: (N) => {
2198
- N.stopPropagation(), I(u.date);
2219
+ N.stopPropagation(), B(u.date);
2199
2220
  },
2200
2221
  className: l(
2201
2222
  "flex items-center justify-center rounded-full transition-colors",
@@ -2211,14 +2232,14 @@ function mn({
2211
2232
  v,
2212
2233
  {
2213
2234
  date: u.date,
2214
- events: A,
2235
+ events: I,
2215
2236
  isToday: m,
2216
2237
  isCurrentMonth: u.isCurrentMonth,
2217
- isWeekend: E,
2238
+ isWeekend: _,
2218
2239
  view: "month"
2219
2240
  }
2220
2241
  ),
2221
- /* @__PURE__ */ r(
2242
+ /* @__PURE__ */ n(
2222
2243
  "div",
2223
2244
  {
2224
2245
  className: l(
@@ -2226,7 +2247,7 @@ function mn({
2226
2247
  i?.dayCellContent
2227
2248
  ),
2228
2249
  children: [
2229
- A.slice(0, ge).map((N) => /* @__PURE__ */ e(
2250
+ I.slice(0, ge).map((N) => /* @__PURE__ */ e(
2230
2251
  "div",
2231
2252
  {
2232
2253
  onPointerDown: (G) => {
@@ -2251,19 +2272,19 @@ function mn({
2251
2272
  },
2252
2273
  N.id
2253
2274
  )),
2254
- $ && (y ? /* @__PURE__ */ r(
2255
- ne,
2275
+ $ && (y ? /* @__PURE__ */ n(
2276
+ re,
2256
2277
  {
2257
2278
  open: w === k,
2258
- onOpenChange: (N) => _(N ? k : null),
2279
+ onOpenChange: (N) => E(N ? k : null),
2259
2280
  children: [
2260
- /* @__PURE__ */ e(re, { asChild: !0, children: /* @__PURE__ */ r(
2281
+ /* @__PURE__ */ e(ne, { asChild: !0, children: /* @__PURE__ */ n(
2261
2282
  "button",
2262
2283
  {
2263
2284
  type: "button",
2264
2285
  onPointerDown: (N) => N.stopPropagation(),
2265
2286
  onClick: (N) => {
2266
- N.stopPropagation(), _(k);
2287
+ N.stopPropagation(), E(k);
2267
2288
  },
2268
2289
  className: l(
2269
2290
  "w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
@@ -2271,12 +2292,12 @@ function mn({
2271
2292
  ),
2272
2293
  children: [
2273
2294
  "+",
2274
- A.length - ge,
2295
+ I.length - ge,
2275
2296
  " more"
2276
2297
  ]
2277
2298
  }
2278
2299
  ) }),
2279
- /* @__PURE__ */ r(
2300
+ /* @__PURE__ */ n(
2280
2301
  Q,
2281
2302
  {
2282
2303
  align: "start",
@@ -2285,25 +2306,25 @@ function mn({
2285
2306
  className: "w-72 max-h-80 overflow-y-auto p-2",
2286
2307
  onPointerDown: (N) => N.stopPropagation(),
2287
2308
  children: [
2288
- /* @__PURE__ */ r("div", { className: "flex items-center justify-between mb-2 pb-2 border-b", children: [
2309
+ /* @__PURE__ */ n("div", { className: "flex items-center justify-between mb-2 pb-2 border-b", children: [
2289
2310
  /* @__PURE__ */ e("span", { className: "text-sm font-medium", children: u.date.toLocaleDateString(void 0, {
2290
2311
  weekday: "short",
2291
2312
  month: "short",
2292
2313
  day: "numeric"
2293
2314
  }) }),
2294
- /* @__PURE__ */ r("span", { className: "text-xs text-muted-foreground", children: [
2295
- A.length,
2315
+ /* @__PURE__ */ n("span", { className: "text-xs text-muted-foreground", children: [
2316
+ I.length,
2296
2317
  " events"
2297
2318
  ] })
2298
2319
  ] }),
2299
- /* @__PURE__ */ e("div", { className: "space-y-1.5", children: A.map((N) => /* @__PURE__ */ e("div", { children: z ? z({ event: N, variant: "compact" }) : /* @__PURE__ */ e(
2320
+ /* @__PURE__ */ e("div", { className: "space-y-1.5", children: I.map((N) => /* @__PURE__ */ e("div", { children: z ? z({ event: N, variant: "compact" }) : /* @__PURE__ */ e(
2300
2321
  Ce,
2301
2322
  {
2302
2323
  event: N,
2303
2324
  variant: "compact",
2304
2325
  badgeVariant: a,
2305
2326
  onClick: (G) => {
2306
- _(null), d?.(G);
2327
+ E(null), d?.(G);
2307
2328
  },
2308
2329
  disablePopover: !!d && !p,
2309
2330
  renderPopover: p,
@@ -2315,11 +2336,11 @@ function mn({
2315
2336
  )
2316
2337
  ]
2317
2338
  }
2318
- ) : /* @__PURE__ */ r(
2339
+ ) : /* @__PURE__ */ n(
2319
2340
  "div",
2320
2341
  {
2321
2342
  onPointerDown: (N) => {
2322
- N.stopPropagation(), I(u.date);
2343
+ N.stopPropagation(), B(u.date);
2323
2344
  },
2324
2345
  className: l(
2325
2346
  "w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
@@ -2327,7 +2348,7 @@ function mn({
2327
2348
  ),
2328
2349
  children: [
2329
2350
  "+",
2330
- A.length - ge,
2351
+ I.length - ge,
2331
2352
  " more"
2332
2353
  ]
2333
2354
  }
@@ -2339,10 +2360,10 @@ function mn({
2339
2360
  h,
2340
2361
  {
2341
2362
  date: u.date,
2342
- events: A,
2363
+ events: I,
2343
2364
  isToday: m,
2344
2365
  isCurrentMonth: u.isCurrentMonth,
2345
- isWeekend: E,
2366
+ isWeekend: _,
2346
2367
  view: "month"
2347
2368
  }
2348
2369
  )
@@ -2354,9 +2375,9 @@ function mn({
2354
2375
  ] }) }) });
2355
2376
  }
2356
2377
  const ie = 96, xe = 56, Ue = 72, X = 120, be = 100, Qt = 3;
2357
- function hn({
2378
+ function mr({
2358
2379
  events: t,
2359
- date: n,
2380
+ date: r,
2360
2381
  weekStartsOn: o = 1,
2361
2382
  visibleHours: a = { startHour: 0, endHour: 24 },
2362
2383
  workingHours: d,
@@ -2366,114 +2387,119 @@ function hn({
2366
2387
  onSlotSelect: z,
2367
2388
  onDayClick: p,
2368
2389
  className: y,
2369
- renderEvent: W,
2390
+ renderEvent: L,
2370
2391
  renderPopover: i,
2371
2392
  slots: v,
2372
2393
  classNames: h
2373
2394
  }) {
2374
- const w = 60 / g, _ = 100 / w, L = F(() => {
2395
+ const w = 60 / g, E = 100 / w, W = V(() => {
2375
2396
  const s = [];
2376
2397
  for (let f = 0; f < w; f++)
2377
2398
  s.push(f * g);
2378
2399
  return s;
2379
- }, [w, g]), D = F(
2380
- () => mt(n, o),
2381
- [n, o]
2382
- ), x = F(
2400
+ }, [w, g]), D = V(
2401
+ () => mt(r, o),
2402
+ [r, o]
2403
+ ), x = V(
2383
2404
  () => Xe(a),
2384
2405
  [a]
2385
- ), R = F(() => {
2406
+ ), O = V(() => {
2386
2407
  const s = /* @__PURE__ */ new Map();
2387
2408
  for (const f of D) {
2388
- const S = f.toDateString(), P = We(t, f), { singleDay: M, multiDay: q } = Ke(P), V = Ye(
2389
- M,
2409
+ const S = f.toDateString(), A = Le(t, f), { singleDay: T, multiDay: q } = Ke(A), R = Ye(
2410
+ T,
2390
2411
  f,
2391
2412
  a,
2392
2413
  ie
2393
2414
  ), U = /* @__PURE__ */ new Map();
2394
2415
  let ae = 1;
2395
- for (const K of V)
2416
+ for (const K of R)
2396
2417
  if (U.set(K.event.id, K.position), K.position.width > 0) {
2397
2418
  const J = Math.round(100 / K.position.width);
2398
2419
  ae = Math.max(ae, J);
2399
2420
  }
2400
2421
  s.set(S, {
2401
- singleDay: M,
2422
+ singleDay: T,
2402
2423
  multiDay: q,
2403
2424
  positions: U,
2404
2425
  maxOverlapping: ae
2405
2426
  });
2406
2427
  }
2407
2428
  return s;
2408
- }, [D, t, a]), j = F(() => {
2429
+ }, [D, t, a]), P = V(() => {
2409
2430
  const s = /* @__PURE__ */ new Map();
2410
- for (const { multiDay: f } of R.values())
2431
+ for (const { multiDay: f } of O.values())
2411
2432
  for (const S of f)
2412
2433
  s.set(S.id, S);
2413
2434
  return Array.from(s.values());
2414
- }, [R]), H = /* @__PURE__ */ new Date(), I = D.findIndex((s) => te(s)), O = F(() => {
2415
- if (I < 0) return -1;
2416
- const s = H.getHours() + H.getMinutes() / 60;
2435
+ }, [O]), j = /* @__PURE__ */ new Date(), B = D.findIndex((s) => te(s)), F = V(() => {
2436
+ if (B < 0) return -1;
2437
+ const s = j.getHours() + j.getMinutes() / 60;
2417
2438
  return s < a.startHour || s > a.endHour ? -1 : (s - a.startHour) * ie;
2418
- }, [I, a, H]), u = se(null);
2439
+ }, [B, a, j]), u = se(null);
2419
2440
  qe(() => {
2420
2441
  const s = u.current;
2421
2442
  if (!s) return;
2422
2443
  const f = () => {
2423
- const P = (/* @__PURE__ */ new Date()).getDay();
2424
- let M = d?.[P];
2425
- if (!M?.enabled || M.from === 0) {
2426
- const U = d?.[1];
2427
- U?.enabled && (M = U);
2444
+ let S;
2445
+ if (B !== -1) {
2446
+ const T = (/* @__PURE__ */ new Date()).getHours();
2447
+ S = Math.max(T - 1, a.startHour);
2448
+ } else {
2449
+ const q = (/* @__PURE__ */ new Date()).getDay();
2450
+ let R = d?.[q];
2451
+ if (!R?.enabled || R.from === 0) {
2452
+ const U = d?.[1];
2453
+ U?.enabled && (R = U);
2454
+ }
2455
+ R?.enabled && R.from > 0 ? S = Math.max(
2456
+ R.from - 1,
2457
+ a.startHour
2458
+ ) : S = Math.max(7, a.startHour);
2428
2459
  }
2429
- let q;
2430
- M?.enabled && M.from > 0 ? q = Math.max(
2431
- M.from - 1,
2432
- a.startHour
2433
- ) : q = Math.max(7, a.startHour);
2434
- const V = (q - a.startHour) * ie;
2460
+ const A = (S - a.startHour) * ie;
2435
2461
  s.scrollTo({
2436
- top: V,
2462
+ top: A,
2437
2463
  behavior: "instant"
2438
2464
  });
2439
2465
  };
2440
2466
  requestAnimationFrame(() => {
2441
2467
  requestAnimationFrame(f);
2442
2468
  });
2443
- }, [n, d, a]);
2444
- const k = Ee(), A = T(
2469
+ }, [r, d, a, B]);
2470
+ const k = _e(), I = M(
2445
2471
  (s) => {
2446
2472
  k?.startSelection(s);
2447
2473
  },
2448
2474
  [k]
2449
- ), m = T(
2475
+ ), m = M(
2450
2476
  (s) => {
2451
2477
  k?.updateSelection(s);
2452
2478
  },
2453
2479
  [k]
2454
- ), E = T(() => {
2480
+ ), _ = M(() => {
2455
2481
  k?.endSelection();
2456
- }, [k]), $ = T(
2482
+ }, [k]), $ = M(
2457
2483
  (s) => {
2458
2484
  b?.(s);
2459
2485
  },
2460
2486
  [b]
2461
- ), N = xe + 7 * X, G = F(() => {
2487
+ ), N = xe + 7 * X, G = V(() => {
2462
2488
  const s = [];
2463
2489
  for (const f of D) {
2464
- const S = f.toDateString(), M = R.get(S)?.maxOverlapping ?? 1;
2465
- M > Qt ? s.push(
2466
- Math.max(X, M * be)
2490
+ const S = f.toDateString(), T = O.get(S)?.maxOverlapping ?? 1;
2491
+ T > Qt ? s.push(
2492
+ Math.max(X, T * be)
2467
2493
  ) : s.push(X);
2468
2494
  }
2469
2495
  return s;
2470
- }, [D, R]), C = xe + G.reduce((s, f) => s + f, 0);
2471
- return /* @__PURE__ */ r("div", { className: l("ic-week-view flex flex-col h-full", y), children: [
2472
- j.length > 0 && /* @__PURE__ */ e(
2473
- nt,
2496
+ }, [D, O]), C = xe + G.reduce((s, f) => s + f, 0);
2497
+ return /* @__PURE__ */ n("div", { className: l("ic-week-view flex flex-col h-full", y), children: [
2498
+ P.length > 0 && /* @__PURE__ */ e(
2499
+ rt,
2474
2500
  {
2475
- events: j,
2476
- date: ht(n, o),
2501
+ events: P,
2502
+ date: ht(r, o),
2477
2503
  onEventClick: $,
2478
2504
  ...h?.multiDayBanner && {
2479
2505
  className: h.multiDayBanner
@@ -2488,14 +2514,14 @@ function hn({
2488
2514
  "ic-week-scroll-container flex-1",
2489
2515
  h?.scrollContainer
2490
2516
  ),
2491
- children: /* @__PURE__ */ r("div", { style: { minWidth: Math.max(N, C) }, children: [
2492
- /* @__PURE__ */ e("div", { className: "ic-week-header sticky top-0 z-20 border-b bg-background", children: /* @__PURE__ */ r("div", { className: "flex", children: [
2517
+ children: /* @__PURE__ */ n("div", { style: { minWidth: Math.max(N, C) }, children: [
2518
+ /* @__PURE__ */ e("div", { className: "ic-week-header sticky top-0 z-20 border-b bg-background", children: /* @__PURE__ */ n("div", { className: "flex", children: [
2493
2519
  /* @__PURE__ */ e(
2494
2520
  "div",
2495
2521
  {
2496
2522
  className: "flex-shrink-0 flex items-end justify-center pb-2 text-[10px] text-muted-foreground/70",
2497
2523
  style: { width: xe, height: Ue },
2498
- children: /* @__PURE__ */ r("span", { className: "hidden sm:inline", children: [
2524
+ children: /* @__PURE__ */ n("span", { className: "hidden sm:inline", children: [
2499
2525
  "GMT",
2500
2526
  (() => {
2501
2527
  const s = (/* @__PURE__ */ new Date()).getTimezoneOffset(), f = Math.abs(Math.floor(s / 60)), S = s <= 0 ? "+" : "-";
@@ -2505,8 +2531,8 @@ function hn({
2505
2531
  }
2506
2532
  ),
2507
2533
  D.map((s, f) => {
2508
- const S = te(s), P = G[f] ?? X, M = P > X;
2509
- return /* @__PURE__ */ r(
2534
+ const S = te(s), A = G[f] ?? X, T = A > X;
2535
+ return /* @__PURE__ */ n(
2510
2536
  "div",
2511
2537
  {
2512
2538
  className: l(
@@ -2516,7 +2542,7 @@ function hn({
2516
2542
  ),
2517
2543
  style: {
2518
2544
  height: Ue,
2519
- minWidth: M ? P : X
2545
+ minWidth: T ? A : X
2520
2546
  },
2521
2547
  children: [
2522
2548
  /* @__PURE__ */ e(
@@ -2548,7 +2574,7 @@ function hn({
2548
2574
  );
2549
2575
  })
2550
2576
  ] }) }),
2551
- /* @__PURE__ */ r("div", { className: "relative flex", children: [
2577
+ /* @__PURE__ */ n("div", { className: "relative flex", children: [
2552
2578
  /* @__PURE__ */ e(
2553
2579
  "div",
2554
2580
  {
@@ -2578,22 +2604,22 @@ function hn({
2578
2604
  }
2579
2605
  ),
2580
2606
  /* @__PURE__ */ e("div", { className: "ic-week-grid relative flex-1", children: /* @__PURE__ */ e("div", { className: "flex divide-x", children: D.map((s, f) => {
2581
- const S = s.toDateString(), P = R.get(S), M = G[f] ?? X, q = M > X;
2582
- return /* @__PURE__ */ r(
2607
+ const S = s.toDateString(), A = O.get(S), T = G[f] ?? X, q = T > X;
2608
+ return /* @__PURE__ */ n(
2583
2609
  "div",
2584
2610
  {
2585
2611
  className: "ic-day-column relative flex-1",
2586
2612
  style: {
2587
- minWidth: q ? M : X
2613
+ minWidth: q ? T : X
2588
2614
  },
2589
2615
  children: [
2590
- x.map((V, U) => {
2616
+ x.map((R, U) => {
2591
2617
  const K = !Je(
2592
2618
  s,
2593
- V,
2619
+ R,
2594
2620
  d
2595
2621
  );
2596
- return /* @__PURE__ */ r(
2622
+ return /* @__PURE__ */ n(
2597
2623
  "div",
2598
2624
  {
2599
2625
  className: l(
@@ -2606,7 +2632,7 @@ function hn({
2606
2632
  style: { height: ie },
2607
2633
  children: [
2608
2634
  U !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
2609
- L.slice(1).map((J) => /* @__PURE__ */ e(
2635
+ W.slice(1).map((J) => /* @__PURE__ */ e(
2610
2636
  "div",
2611
2637
  {
2612
2638
  className: "pointer-events-none absolute inset-x-0 border-b border-dashed border-border/30",
@@ -2614,42 +2640,42 @@ function hn({
2614
2640
  },
2615
2641
  J
2616
2642
  )),
2617
- L.map((J, at) => {
2618
- const Ae = {
2643
+ W.map((J, at) => {
2644
+ const Ie = {
2619
2645
  date: s,
2620
- hour: V,
2646
+ hour: R,
2621
2647
  minute: J
2622
2648
  };
2623
2649
  return /* @__PURE__ */ e(
2624
2650
  ot,
2625
2651
  {
2626
- slot: Ae,
2627
- onSelectionStart: A,
2652
+ slot: Ie,
2653
+ onSelectionStart: I,
2628
2654
  onSelectionMove: m,
2629
- onSelectionEnd: E,
2630
- isSelected: k?.isSlotSelected(Ae) ?? !1,
2655
+ onSelectionEnd: _,
2656
+ isSelected: k?.isSlotSelected(Ie) ?? !1,
2631
2657
  isSelecting: k?.isSelecting ?? !1,
2632
2658
  disabled: K,
2633
2659
  className: "absolute inset-x-0",
2634
2660
  style: {
2635
- top: `${at * _}%`,
2636
- height: `${_}%`
2661
+ top: `${at * E}%`,
2662
+ height: `${E}%`
2637
2663
  },
2638
- ariaLabel: `Add event on ${s.toLocaleDateString()} at ${we(V)}:${String(J).padStart(2, "0")}`
2664
+ ariaLabel: `Add event on ${s.toLocaleDateString()} at ${we(R)}:${String(J).padStart(2, "0")}`
2639
2665
  },
2640
2666
  J
2641
2667
  );
2642
2668
  })
2643
2669
  ]
2644
2670
  },
2645
- V
2671
+ R
2646
2672
  );
2647
2673
  }),
2648
- P?.singleDay.map((V) => {
2649
- const U = P.positions.get(V.id);
2674
+ A?.singleDay.map((R) => {
2675
+ const U = A.positions.get(R.id);
2650
2676
  if (!U) return null;
2651
2677
  const ae = `calc(${U.width}% - 2px)`, K = `max(${be}px, ${ae})`;
2652
- return W ? /* @__PURE__ */ e(
2678
+ return L ? /* @__PURE__ */ e(
2653
2679
  "div",
2654
2680
  {
2655
2681
  className: "absolute pointer-events-auto p-0.5",
@@ -2659,13 +2685,13 @@ function hn({
2659
2685
  width: K,
2660
2686
  minWidth: `${be}px`
2661
2687
  },
2662
- children: W({ event: V, position: U })
2688
+ children: L({ event: R, position: U })
2663
2689
  },
2664
- V.id
2690
+ R.id
2665
2691
  ) : /* @__PURE__ */ e(
2666
2692
  Qe,
2667
2693
  {
2668
- event: V,
2694
+ event: R,
2669
2695
  position: {
2670
2696
  top: U.top,
2671
2697
  left: U.left,
@@ -2682,17 +2708,17 @@ function hn({
2682
2708
  h?.eventCard
2683
2709
  )
2684
2710
  },
2685
- V.id
2711
+ R.id
2686
2712
  );
2687
2713
  }),
2688
- f === I && O >= 0 && /* @__PURE__ */ r(
2714
+ f === B && F >= 0 && /* @__PURE__ */ n(
2689
2715
  "div",
2690
2716
  {
2691
2717
  className: l(
2692
2718
  "absolute left-0 right-0 z-20 flex items-center pointer-events-none",
2693
2719
  h?.currentTimeIndicator
2694
2720
  ),
2695
- style: { top: O },
2721
+ style: { top: F },
2696
2722
  children: [
2697
2723
  /* @__PURE__ */ e("div", { className: "h-2 w-2 -ml-1 rounded-full bg-red-500" }),
2698
2724
  /* @__PURE__ */ e("div", { className: "flex-1 h-0.5 bg-red-500" })
@@ -2711,27 +2737,27 @@ function hn({
2711
2737
  ] });
2712
2738
  }
2713
2739
  export {
2714
- cn as A,
2740
+ dr as A,
2715
2741
  ce as B,
2716
- dn as C,
2717
- Bt as D,
2742
+ lr as C,
2743
+ jt as D,
2718
2744
  Qe as E,
2719
- mn as M,
2720
- ne as P,
2745
+ ur as M,
2746
+ re as P,
2721
2747
  ot as T,
2722
- hn as W,
2748
+ mr as W,
2723
2749
  Xt as a,
2724
- un as b,
2750
+ cr as b,
2725
2751
  Ce as c,
2726
- nt as d,
2727
- ln as e,
2728
- an as f,
2752
+ rt as d,
2753
+ sr as e,
2754
+ ar as f,
2729
2755
  Q as g,
2730
- re as h,
2756
+ ne as h,
2731
2757
  Ht as i,
2732
2758
  le as j,
2733
2759
  ee as k,
2734
- sn as l,
2760
+ ir as l,
2735
2761
  de as m,
2736
2762
  gt as n,
2737
2763
  fe as o,
@@ -2739,6 +2765,6 @@ export {
2739
2765
  Oe as q,
2740
2766
  Me as r,
2741
2767
  Te as s,
2742
- It as t
2768
+ $t as t
2743
2769
  };
2744
- //# sourceMappingURL=week-view-jpcXSE6k.js.map
2770
+ //# sourceMappingURL=week-view-1EUqFIRS.js.map