@innosolutions/inno-calendar 1.0.49 → 1.0.50

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