vue-cal 5.0.1-rc.24 → 5.0.1-rc.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import { computed as E, reactive as Te, watch as me, toRefs as bt, ref as ie, onBeforeUnmount as Be, inject as ze, createElementBlock as L, openBlock as C, renderSlot as O, createCommentVNode as U, unref as b, Fragment as ue, renderList as pe, normalizeClass as ye, createElementVNode as ve, createVNode as je, Transition as Ge, withCtx as W, createBlock as Se, resolveDynamicComponent as xe, mergeProps as le, toHandlers as Re, normalizeProps as te, onMounted as Ze, toDisplayString as ce, withModifiers as et, nextTick as Je, normalizeStyle as _e, createTextVNode as Ue, TransitionGroup as tt, createSlots as Ce, useTemplateRef as Tt, useId as Mt, useAttrs as Yt, provide as at, guardReactiveProps as ne } from "vue";
1
+ import { computed as S, reactive as Te, watch as me, toRefs as bt, ref as ie, onBeforeUnmount as Be, inject as ze, createElementBlock as z, openBlock as C, renderSlot as V, createCommentVNode as U, unref as T, Fragment as ue, renderList as pe, normalizeClass as ye, createElementVNode as ve, createVNode as je, Transition as Ge, withCtx as W, createBlock as Se, resolveDynamicComponent as xe, mergeProps as le, toHandlers as Re, normalizeProps as te, onMounted as Ze, toDisplayString as ce, withModifiers as et, nextTick as Je, normalizeStyle as _e, createTextVNode as Ue, TransitionGroup as tt, createSlots as Ce, useTemplateRef as Tt, useId as Mt, useAttrs as Yt, provide as at, guardReactiveProps as ne } from "vue";
2
2
  /**
3
- * vue-cal v5.0.1-rc.24
3
+ * vue-cal v5.0.1-rc.25
4
4
  * (c) 2024-2025 Antoni Andre <antoniandre.web@gmail.com>
5
5
  * @license MIT
6
6
  */
@@ -33,129 +33,129 @@ const ge = {
33
33
  years: { cols: 5, rows: 5 }
34
34
  // Arbitrary range of quarters of century (25y).
35
35
  }
36
- }, Et = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"], Xe = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"], St = Xe.reduce((p, t, u) => (p[t] = u || 7, p), {}), Ct = (p, t, u) => {
37
- const { dateUtils: o } = p, w = !1, _ = E(() => {
36
+ }, Et = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"], Xe = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"], St = Xe.reduce((p, t, i) => (p[t] = i || 7, p), {}), Ct = (p, t, i) => {
37
+ const { dateUtils: o } = p, w = !1, b = S(() => {
38
38
  if (P.value[t.view]) return t.view;
39
- const f = t.datePicker ? "month" : "week", T = t.view || f;
40
- return P.value[T] ? T : (console.warn(
41
- `Vue Cal: the provided or default view \`${T}\` is either invalid or not in the list of available views. The first available view will be chosen: \`${Object.keys(P.value)[0]}\`.`
39
+ const g = t.datePicker ? "month" : "week", _ = t.view || g;
40
+ return P.value[_] ? _ : (console.warn(
41
+ `Vue Cal: the provided or default view \`${_}\` is either invalid or not in the list of available views. The first available view will be chosen: \`${Object.keys(P.value)[0]}\`.`
42
42
  ), Object.keys(P.value)[0]);
43
- }), N = E(() => t.sm && !t.xs), d = E(() => t.xs || t.datePicker), H = E(() => t.clickToNavigate || t.datePicker && t.clickToNavigate !== !1), v = E(() => {
44
- const f = {
43
+ }), N = S(() => t.sm && !t.xs), d = S(() => t.xs || t.datePicker), H = S(() => t.clickToNavigate || t.datePicker && t.clickToNavigate !== !1), v = S(() => {
44
+ const g = {
45
45
  cell: {},
46
46
  // All possible event listeners to attach to cells.
47
47
  event: {}
48
48
  // All possible event listeners to attach to calendar events.
49
- }, T = (S) => S.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
50
- for (const [S, l] of Object.entries(u)) {
51
- const [X, J, ae] = S.match(/^on(Cell|Event)(.+)$/) || [];
52
- X && (f[J.toLowerCase()][T(ae).replace(/^-+|-+$/g, "")] = l);
49
+ }, _ = (j) => j.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
50
+ for (const [j, s] of Object.entries(i)) {
51
+ const [A, X, ae] = j.match(/^on(Cell|Event)(.+)$/) || [];
52
+ A && (g[X.toLowerCase()][_(ae).replace(/^-+|-+$/g, "")] = s);
53
53
  }
54
- return f;
55
- }), c = E(() => {
56
- var T;
57
- const f = {};
58
- return t.hideWeekends && (f[6] = !0) && (f[7] = !0), (T = t.hideWeekdays) != null && T.length && t.hideWeekdays.forEach((S) => f[St[S]] = !0), f;
59
- }), y = E(() => t.hideWeekends || c.value[6] && c.value[7]), P = E(() => {
60
- const f = t.datePicker;
61
- let T = 0, S = {};
62
- const l = t.views;
63
- return f && !l ? {
54
+ return g;
55
+ }), u = S(() => {
56
+ var _;
57
+ const g = {};
58
+ return t.hideWeekends && (g[6] = !0) && (g[7] = !0), (_ = t.hideWeekdays) != null && _.length && t.hideWeekdays.forEach((j) => g[St[j]] = !0), g;
59
+ }), h = S(() => t.hideWeekends || u.value[6] && u.value[7]), P = S(() => {
60
+ const g = t.datePicker;
61
+ let _ = 0, j = {};
62
+ const s = t.views;
63
+ return g && !s ? {
64
64
  month: { ...ge.availableViews.month },
65
65
  year: { ...ge.availableViews.year },
66
66
  years: { ...ge.availableViews.years }
67
- } : (l ? (Array.isArray(l) ? S = l.reduce((X, J) => (typeof J == "string" && ge.availableViews[J] ? X[J] = ge.availableViews[J] : T++, X), {}) : typeof l == "object" && (S = Object.entries(l).reduce((X, [J, ae]) => {
68
- const { cols: se, rows: de } = ge.availableViews[J];
69
- return X[J] = { cols: ae.cols || se, rows: ae.rows || de }, X;
70
- }, {})), T && console.warn("Vue Cal: the provided `views` prop contains invalid views that will be ignored."), Object.keys(S).length || (console.warn("Vue Cal: No valid view in the provided `views` prop. Falling back to default views."), S = { ...ge.availableViews })) : S = { ...ge.availableViews }, S);
71
- }), I = E(() => t.datePicker ? "month" : P.value.week ? "week" : Object.keys(P.value)[0]), a = E(() => {
67
+ } : (s ? (Array.isArray(s) ? j = s.reduce((A, X) => (typeof X == "string" && ge.availableViews[X] ? A[X] = ge.availableViews[X] : _++, A), {}) : typeof s == "object" && (j = Object.entries(s).reduce((A, [X, ae]) => {
68
+ const { cols: se, rows: de } = ge.availableViews[X];
69
+ return A[X] = { cols: ae.cols || se, rows: ae.rows || de }, A;
70
+ }, {})), _ && console.warn("Vue Cal: the provided `views` prop contains invalid views that will be ignored."), Object.keys(j).length || (console.warn("Vue Cal: No valid view in the provided `views` prop. Falling back to default views."), j = { ...ge.availableViews })) : j = { ...ge.availableViews }, j);
71
+ }), I = S(() => t.datePicker ? "month" : P.value.week ? "week" : Object.keys(P.value)[0]), a = S(() => {
72
72
  if (typeof t.selectedDate == "string") return o.stringToDate(t.selectedDate);
73
73
  if (t.selectedDate instanceof Date) return t.selectedDate;
74
74
  t.selectedDate ? console.warn("Vue Cal: The provided selected date is invalid:", t.selectedDate) : console.log("Vue Cal: Info - The provided selected date is undefined.");
75
- }), s = E(() => {
75
+ }), l = S(() => {
76
76
  if (!t.disableDays) return [];
77
- const f = [];
77
+ const g = [];
78
78
  if (Array.isArray(t.disableDays))
79
- for (let T of t.disableDays) {
80
- let S = T;
81
- typeof T == "string" ? S = o.stringToDate(T) : T instanceof Date && (T = o.formatDate(T, "YYYY-MM-DD")), S instanceof Date && !isNaN(S.getTime()) ? f.push(T) : console.warn("Vue Cal: The provided `disableDays` prop contains an invalid date:", T);
79
+ for (let _ of t.disableDays) {
80
+ let j = _;
81
+ typeof _ == "string" ? j = o.stringToDate(_) : _ instanceof Date && (_ = o.formatDate(_, "YYYY-MM-DD")), j instanceof Date && !isNaN(j.getTime()) ? g.push(_) : console.warn("Vue Cal: The provided `disableDays` prop contains an invalid date:", _);
82
82
  }
83
83
  else console.warn("Vue Cal: The provided `disableDays` prop is invalid:", t.disableDays);
84
- return f;
85
- }), e = E(() => {
86
- let f = null;
87
- return t.minDate && typeof t.minDate == "string" ? f = o.stringToDate(t.minDate) : t.minDate && t.minDate instanceof Date && (f = t.minDate), (f == null ? void 0 : f.getTime()) || null;
88
- }), k = E(() => {
89
- let f = null;
90
- return t.maxDate && typeof t.maxDate == "string" ? f = o.stringToDate(t.maxDate) : t.maxDate && t.maxDate instanceof Date && (f = t.maxDate), (f == null ? void 0 : f.getTime()) || null;
91
- }), i = E(() => {
92
- var S;
93
- const { view: f } = p;
94
- return t.schedules.length && (f.isDay || f.isDays || f.isWeek) && ((S = t.schedules) == null ? void 0 : S.map((l, X) => ({ ...l, id: l.id ?? X + 1 }))) || void 0;
95
- }), V = E(() => {
96
- const f = {
84
+ return g;
85
+ }), e = S(() => {
86
+ let g = null;
87
+ return t.minDate && typeof t.minDate == "string" ? g = o.stringToDate(t.minDate) : t.minDate && t.minDate instanceof Date && (g = t.minDate), (g == null ? void 0 : g.getTime()) || null;
88
+ }), k = S(() => {
89
+ let g = null;
90
+ return t.maxDate && typeof t.maxDate == "string" ? g = o.stringToDate(t.maxDate) : t.maxDate && t.maxDate instanceof Date && (g = t.maxDate), (g == null ? void 0 : g.getTime()) || null;
91
+ }), c = S(() => {
92
+ var j;
93
+ const { view: g } = p;
94
+ return t.schedules.length && (g.isDay || g.isDays || g.isWeek) && ((j = t.schedules) == null ? void 0 : j.map((s, A) => ({ ...s, id: s.id ?? A + 1 }))) || void 0;
95
+ }), M = S(() => {
96
+ const g = {
97
97
  drag: !0,
98
98
  resize: !0,
99
99
  delete: !0,
100
100
  create: !0
101
101
  };
102
- return t.editableEvents === !0 ? f : t.editableEvents === !1 ? Object.keys(f).map((T) => f[T] = !1) : { ...f, ...t.editableEvents };
103
- }), F = E(() => {
104
- const { view: f } = p, { eventCount: T } = t;
105
- return (Array.isArray(T) ? T.includes(f.id) : T) && (f.isMonth && !t.eventsOnMonthView || f.isYear);
106
- }), A = E(() => t.allDayEvents && t.time !== !1 && !_.isMonth), m = E(() => t.timeAtCursor && t.time !== !1), h = async (f) => {
107
- var S;
108
- let T = /* @__PURE__ */ Object.assign({ "../i18n/ar.json": () => import("./i18n/ar.js").then((l) => l.default), "../i18n/bg.json": () => import("./i18n/bg.js").then((l) => l.default), "../i18n/bn.json": () => import("./i18n/bn.js").then((l) => l.default), "../i18n/bs.json": () => import("./i18n/bs.js").then((l) => l.default), "../i18n/ca.json": () => import("./i18n/ca.js").then((l) => l.default), "../i18n/cs.json": () => import("./i18n/cs.js").then((l) => l.default), "../i18n/da.json": () => import("./i18n/da.js").then((l) => l.default), "../i18n/de.json": () => import("./i18n/de.js").then((l) => l.default), "../i18n/el.json": () => import("./i18n/el.js").then((l) => l.default), "../i18n/en-gb.json": () => import("./i18n/en-gb.js").then((l) => l.default), "../i18n/en-us.json": () => Promise.resolve().then(() => Lt).then((l) => l.default), "../i18n/es.json": () => import("./i18n/es.js").then((l) => l.default), "../i18n/et.json": () => import("./i18n/et.js").then((l) => l.default), "../i18n/fa.json": () => import("./i18n/fa.js").then((l) => l.default), "../i18n/fi.json": () => import("./i18n/fi.js").then((l) => l.default), "../i18n/fr.json": () => import("./i18n/fr.js").then((l) => l.default), "../i18n/he.json": () => import("./i18n/he.js").then((l) => l.default), "../i18n/hr.json": () => import("./i18n/hr.js").then((l) => l.default), "../i18n/hu.json": () => import("./i18n/hu.js").then((l) => l.default), "../i18n/id.json": () => import("./i18n/id.js").then((l) => l.default), "../i18n/is.json": () => import("./i18n/is.js").then((l) => l.default), "../i18n/it.json": () => import("./i18n/it.js").then((l) => l.default), "../i18n/ja.json": () => import("./i18n/ja.js").then((l) => l.default), "../i18n/ka.json": () => import("./i18n/ka.js").then((l) => l.default), "../i18n/ko.json": () => import("./i18n/ko.js").then((l) => l.default), "../i18n/lt.json": () => import("./i18n/lt.js").then((l) => l.default), "../i18n/mn.json": () => import("./i18n/mn.js").then((l) => l.default), "../i18n/nl.json": () => import("./i18n/nl.js").then((l) => l.default), "../i18n/no.json": () => import("./i18n/no.js").then((l) => l.default), "../i18n/pl.json": () => import("./i18n/pl.js").then((l) => l.default), "../i18n/pt-br.json": () => import("./i18n/pt-br.js").then((l) => l.default), "../i18n/pt-pt.json": () => import("./i18n/pt-pt.js").then((l) => l.default), "../i18n/ro.json": () => import("./i18n/ro.js").then((l) => l.default), "../i18n/ru.json": () => import("./i18n/ru.js").then((l) => l.default), "../i18n/sk.json": () => import("./i18n/sk.js").then((l) => l.default), "../i18n/sl.json": () => import("./i18n/sl.js").then((l) => l.default), "../i18n/sq.json": () => import("./i18n/sq.js").then((l) => l.default), "../i18n/sr.json": () => import("./i18n/sr.js").then((l) => l.default), "../i18n/sv.json": () => import("./i18n/sv.js").then((l) => l.default), "../i18n/tr.json": () => import("./i18n/tr.js").then((l) => l.default), "../i18n/uk.json": () => import("./i18n/uk.js").then((l) => l.default), "../i18n/vi.json": () => import("./i18n/vi.js").then((l) => l.default), "../i18n/zh-cn.json": () => import("./i18n/zh-cn.js").then((l) => l.default), "../i18n/zh-hk.json": () => import("./i18n/zh-hk.js").then((l) => l.default) });
102
+ return t.editableEvents === !0 ? g : t.editableEvents === !1 ? Object.keys(g).map((_) => g[_] = !1) : { ...g, ...t.editableEvents };
103
+ }), F = S(() => {
104
+ const { view: g } = p, { eventCount: _ } = t;
105
+ return (Array.isArray(_) ? _.includes(g.id) : _) && (g.isMonth && !t.eventsOnMonthView || g.isYear);
106
+ }), G = S(() => t.allDayEvents && t.time !== !1 && !b.isMonth), m = S(() => t.timeAtCursor && t.time !== !1), f = async (g) => {
107
+ var j;
108
+ let _ = /* @__PURE__ */ Object.assign({ "../i18n/ar.json": () => import("./i18n/ar.js").then((s) => s.default), "../i18n/bg.json": () => import("./i18n/bg.js").then((s) => s.default), "../i18n/bn.json": () => import("./i18n/bn.js").then((s) => s.default), "../i18n/bs.json": () => import("./i18n/bs.js").then((s) => s.default), "../i18n/ca.json": () => import("./i18n/ca.js").then((s) => s.default), "../i18n/cs.json": () => import("./i18n/cs.js").then((s) => s.default), "../i18n/da.json": () => import("./i18n/da.js").then((s) => s.default), "../i18n/de.json": () => import("./i18n/de.js").then((s) => s.default), "../i18n/el.json": () => import("./i18n/el.js").then((s) => s.default), "../i18n/en-gb.json": () => import("./i18n/en-gb.js").then((s) => s.default), "../i18n/en-us.json": () => Promise.resolve().then(() => Lt).then((s) => s.default), "../i18n/es.json": () => import("./i18n/es.js").then((s) => s.default), "../i18n/et.json": () => import("./i18n/et.js").then((s) => s.default), "../i18n/fa.json": () => import("./i18n/fa.js").then((s) => s.default), "../i18n/fi.json": () => import("./i18n/fi.js").then((s) => s.default), "../i18n/fr.json": () => import("./i18n/fr.js").then((s) => s.default), "../i18n/he.json": () => import("./i18n/he.js").then((s) => s.default), "../i18n/hr.json": () => import("./i18n/hr.js").then((s) => s.default), "../i18n/hu.json": () => import("./i18n/hu.js").then((s) => s.default), "../i18n/id.json": () => import("./i18n/id.js").then((s) => s.default), "../i18n/is.json": () => import("./i18n/is.js").then((s) => s.default), "../i18n/it.json": () => import("./i18n/it.js").then((s) => s.default), "../i18n/ja.json": () => import("./i18n/ja.js").then((s) => s.default), "../i18n/ka.json": () => import("./i18n/ka.js").then((s) => s.default), "../i18n/ko.json": () => import("./i18n/ko.js").then((s) => s.default), "../i18n/lt.json": () => import("./i18n/lt.js").then((s) => s.default), "../i18n/mn.json": () => import("./i18n/mn.js").then((s) => s.default), "../i18n/nl.json": () => import("./i18n/nl.js").then((s) => s.default), "../i18n/no.json": () => import("./i18n/no.js").then((s) => s.default), "../i18n/pl.json": () => import("./i18n/pl.js").then((s) => s.default), "../i18n/pt-br.json": () => import("./i18n/pt-br.js").then((s) => s.default), "../i18n/pt-pt.json": () => import("./i18n/pt-pt.js").then((s) => s.default), "../i18n/ro.json": () => import("./i18n/ro.js").then((s) => s.default), "../i18n/ru.json": () => import("./i18n/ru.js").then((s) => s.default), "../i18n/sk.json": () => import("./i18n/sk.js").then((s) => s.default), "../i18n/sl.json": () => import("./i18n/sl.js").then((s) => s.default), "../i18n/sq.json": () => import("./i18n/sq.js").then((s) => s.default), "../i18n/sr.json": () => import("./i18n/sr.js").then((s) => s.default), "../i18n/sv.json": () => import("./i18n/sv.js").then((s) => s.default), "../i18n/tr.json": () => import("./i18n/tr.js").then((s) => s.default), "../i18n/uk.json": () => import("./i18n/uk.js").then((s) => s.default), "../i18n/vi.json": () => import("./i18n/vi.js").then((s) => s.default), "../i18n/zh-cn.json": () => import("./i18n/zh-cn.js").then((s) => s.default), "../i18n/zh-hk.json": () => import("./i18n/zh-hk.js").then((s) => s.default) });
109
109
  {
110
- if (!T[`../i18n/${f}.json`]) {
111
- console.warn(`Vue Cal: the locale \`${f}\` does not exist. Falling back to \`en-us\`.`), f = "en-us";
110
+ if (!_[`../i18n/${g}.json`]) {
111
+ console.warn(`Vue Cal: the locale \`${g}\` does not exist. Falling back to \`en-us\`.`), g = "en-us";
112
112
  return;
113
113
  }
114
- T = await ((S = T[`../i18n/${f}.json`]) == null ? void 0 : S.call(T));
114
+ _ = await ((j = _[`../i18n/${g}.json`]) == null ? void 0 : j.call(_));
115
115
  }
116
- p.texts = Object.assign(p.texts, Object.assign({ ...ge.texts }, T)), o.updateTexts(p.texts);
117
- }, z = Te(t.events || []);
118
- return me(() => t.events, (f) => z.splice(0, z.length, ...f)), me(() => t.locale, (f) => h(f || "en-us")), (t.locale || !p.texts.today) && h(t.locale || "en-us"), {
116
+ p.texts = Object.assign(p.texts, Object.assign({ ...ge.texts }, _)), o.updateTexts(p.texts);
117
+ }, L = Te(t.events || []);
118
+ return me(() => t.events, (g) => L.splice(0, L.length, ...g)), me(() => t.locale, (g) => f(g || "en-us")), (t.locale || !p.texts.today) && f(t.locale || "en-us"), {
119
119
  ...bt(t),
120
- events: z,
120
+ events: L,
121
121
  // All the events listeners for cells and events that the end user may have attached to vue-cal.
122
122
  eventListeners: v,
123
123
  defaultView: I,
124
124
  availableViews: P,
125
- disableDays: s,
125
+ disableDays: l,
126
126
  ready: w,
127
127
  sm: N,
128
128
  xs: d,
129
129
  clickToNavigate: H,
130
- hideWeekdays: c,
131
- hideWeekends: y,
130
+ hideWeekdays: u,
131
+ hideWeekends: h,
132
132
  minTimestamp: e,
133
133
  maxTimestamp: k,
134
- schedules: i,
134
+ schedules: c,
135
135
  selectedDate: a,
136
- editableEvents: V,
136
+ editableEvents: M,
137
137
  showCellEventCount: F,
138
- allDayEvents: A,
138
+ allDayEvents: G,
139
139
  timeAtCursor: m,
140
- view: _,
140
+ view: b,
141
141
  // Getters.
142
142
  get hasHiddenDays() {
143
- return Object.keys(c.value).length;
143
+ return Object.keys(u.value).length;
144
144
  },
145
145
  get size() {
146
146
  return d.value ? "xs" : N.value ? "sm" : "lg";
147
147
  },
148
- loadTexts: h
148
+ loadTexts: f
149
149
  };
150
150
  }, Oe = (p, t) => {
151
- const u = t.timeTo - t.timeFrom;
152
- return (p - t.timeFrom) * 100 / u;
151
+ const i = t.timeTo - t.timeFrom;
152
+ return (p - t.timeFrom) * 100 / i;
153
153
  }, Le = (p, t) => {
154
- const u = t.timeTo - t.timeFrom;
155
- return ~~(p * u / 100 + t.timeFrom);
154
+ const i = t.timeTo - t.timeFrom;
155
+ return ~~(p * i / 100 + t.timeFrom);
156
156
  }, Ke = (p, t) => {
157
- const u = t.clientHeight;
158
- return p * 100 / u;
157
+ const i = t.clientHeight;
158
+ return p * 100 / i;
159
159
  }, Ie = Te({ id: null, date: null });
160
160
  let nt = !1, qe = !0;
161
161
  const ke = Te({ el: null, cell: null, timeout: null }), $e = Te({
@@ -164,110 +164,110 @@ const ke = Te({ el: null, cell: null, timeout: null }), $e = Te({
164
164
  toVueCal: null
165
165
  });
166
166
  function Vt(p) {
167
- const { config: t, view: u, eventsManager: o, emit: w, uid: _, dateUtils: N } = p, d = (e) => {
168
- var h;
169
- const { timeStep: k, timeCellHeight: i, timeFrom: V } = t, F = (((h = e.touches) == null ? void 0 : h[0]) || e).clientY, { top: A } = e.currentTarget.getBoundingClientRect(), m = F - A - ~~e.dataTransfer.getData("cursor-grab-at");
167
+ const { config: t, view: i, eventsManager: o, emit: w, uid: b, dateUtils: N } = p, d = (e) => {
168
+ var f;
169
+ const { timeStep: k, timeCellHeight: c, timeFrom: M } = t, F = (((f = e.touches) == null ? void 0 : f[0]) || e).clientY, { top: G } = e.currentTarget.getBoundingClientRect(), m = F - G - ~~e.dataTransfer.getData("cursor-grab-at");
170
170
  return Le(Ke(m, e.currentTarget), t);
171
- }, H = (e, k, i) => {
172
- const V = k.duration || v(k.start, k.end) || t.timeStep;
171
+ }, H = (e, k, c) => {
172
+ const M = k.duration || v(k.start, k.end) || t.timeStep;
173
173
  let F = Math.max(d(e), 0);
174
174
  if (t.snapToInterval) {
175
- const z = F + t.snapToInterval / 2;
176
- F = z - z % t.snapToInterval;
175
+ const L = F + t.snapToInterval / 2;
176
+ F = L - L % t.snapToInterval;
177
177
  }
178
- const A = new Date(new Date(i).setMinutes(F)), m = Math.min(F + V, 24 * 60), h = new Date(new Date(i).setMinutes(m));
179
- return { start: A, end: h };
178
+ const G = new Date(new Date(c).setMinutes(F)), m = Math.min(F + M, 24 * 60), f = new Date(new Date(c).setMinutes(m));
179
+ return { start: G, end: f };
180
180
  }, v = (e, k) => Math.round((k - e) / 6e4);
181
181
  return {
182
182
  eventDragStart: (e, k) => {
183
183
  if (e.target.nodeType === 3 || p.touch.isResizingEvent) return e.preventDefault();
184
184
  e.dataTransfer.effectAllowed = "move", e.dataTransfer.dropEffect = "move";
185
- const i = { ...k, _: { id: k._.id, duration: v(k.start, k.end) } };
185
+ const c = { ...k, _: { id: k._.id, duration: v(k.start, k.end) } };
186
186
  try {
187
- e.dataTransfer.setData("text/plain", ""), e.dataTransfer.setData("event", JSON.stringify(i)), e.dataTransfer.setData("cursor-grab-at", e.offsetY);
187
+ e.dataTransfer.setData("text/plain", ""), e.dataTransfer.setData("event", JSON.stringify(c)), e.dataTransfer.setData("cursor-grab-at", e.offsetY);
188
188
  } catch (F) {
189
189
  return console.warn("Vue Cal: Failed to set drag data:", F), e.preventDefault();
190
190
  }
191
- $e.eventId = k._.id, $e.fromVueCal = _, w("event-drag-start", {
191
+ $e.eventId = k._.id, $e.fromVueCal = b, w("event-drag-start", {
192
192
  e,
193
193
  event: k
194
194
  });
195
- const V = e.target.closest(".vuecal__event");
196
- V.classList.add("vuecal__event--dragging-ghost"), setTimeout(() => {
197
- V.classList.add("vuecal__event--dragging-original"), V.classList.remove("vuecal__event--dragging-ghost");
198
- }, 0), nt = !1, Object.assign(Ie, { id: u.id, date: u.firstCellDate }), qe = !0, p.touch.isDraggingEvent = !0;
195
+ const M = e.target.closest(".vuecal__event");
196
+ M.classList.add("vuecal__event--dragging-ghost"), setTimeout(() => {
197
+ M.classList.add("vuecal__event--dragging-original"), M.classList.remove("vuecal__event--dragging-ghost");
198
+ }, 0), nt = !1, Object.assign(Ie, { id: i.id, date: i.firstCellDate }), qe = !0, p.touch.isDraggingEvent = !0;
199
199
  },
200
200
  eventDragEnd: (e, k) => {
201
201
  $e.eventId = null, e.target.closest(".vuecal__event").classList.remove("vuecal__event--dragging-original");
202
- const { fromVueCal: i, toVueCal: V } = $e;
203
- V && i !== V && o.deleteEvent(k._.id, 3), nt && qe && Ie.id && u.switchView(Ie.id, Ie.date, !0), w("event-drag-end", {
202
+ const { fromVueCal: c, toVueCal: M } = $e;
203
+ M && c !== M && o.deleteEvent(k._.id, 3), nt && qe && Ie.id && i.switchView(Ie.id, Ie.date, !0), w("event-drag-end", {
204
204
  e,
205
205
  event: k,
206
- external: $e.fromVueCal !== _
206
+ external: $e.fromVueCal !== b
207
207
  }), $e.fromVueCal = null, $e.toVueCal = null, p.touch.isDraggingEvent = !1;
208
208
  },
209
209
  cellDragEnter: (e, k) => {
210
- const { start: i } = k, V = e.currentTarget;
210
+ const { start: c } = k, M = e.currentTarget;
211
211
  if (!e.currentTarget.contains(e.relatedTarget)) {
212
- if (V === ke.el || !V.className.includes("vuecal__cell-content")) return !1;
213
- ke.el && (ke.cell.highlighted = !1), Object.assign(ke, { el: V, cell: k, timeout: clearTimeout(ke.timeout) }), k.highlighted = !0, ["years", "year", "month"].includes(u.id) && (ke.timeout = setTimeout(() => p.switchToNarrowerView(i), 2e3));
212
+ if (M === ke.el || !M.className.includes("vuecal__cell-content")) return !1;
213
+ ke.el && (ke.cell.highlighted = !1), Object.assign(ke, { el: M, cell: k, timeout: clearTimeout(ke.timeout) }), k.highlighted = !0, ["years", "year", "month"].includes(i.id) && (ke.timeout = setTimeout(() => p.switchToNarrowerView(c), 2e3));
214
214
  }
215
215
  },
216
216
  cellDragOver: (e, k) => {
217
- const { start: i, schedule: V } = k;
218
- e.preventDefault(), k.highlighted = !0, (V || V === 0) && (k.highlightedSchedule = V);
217
+ const { start: c, schedule: M } = k;
218
+ e.preventDefault(), k.highlighted = !0, (M || M === 0) && (k.highlightedSchedule = M);
219
219
  },
220
220
  cellDragLeave: (e, k) => {
221
221
  e.preventDefault(), !e.currentTarget.contains(e.relatedTarget) && (k.highlightedSchedule = !1, ke.cell === k && (clearTimeout(ke.timeout), Object.assign(ke, { el: null, cell: null, timeout: null }), k.highlighted = !1));
222
222
  },
223
- cellDragDrop: async (e, k, i = !1) => {
224
- var S, l, X;
223
+ cellDragDrop: async (e, k, c = !1) => {
224
+ var j, s, A;
225
225
  e.preventDefault(), clearTimeout(ke.timeout), Object.assign(ke, { el: null, cell: null, timeout: null });
226
- const V = JSON.parse(e.dataTransfer.getData("event") || "{}");
227
- V.start && (V.start = new Date(V.start)), V.end && (V.end = new Date(V.end));
228
- let F, A, m;
229
- i ? (A = new Date(k.start), m = new Date(k.end)) : { start: A, end: m } = H(e, V, k.start);
230
- const { schedule: h } = ((S = e.target.closest("[data-schedule]")) == null ? void 0 : S.dataset) || {};
231
- let z = () => {
226
+ const M = JSON.parse(e.dataTransfer.getData("event") || "{}");
227
+ M.start && (M.start = new Date(M.start)), M.end && (M.end = new Date(M.end));
228
+ let F, G, m;
229
+ c ? (G = new Date(k.start), m = new Date(k.end)) : { start: G, end: m } = H(e, M, k.start);
230
+ const { schedule: f } = ((j = e.target.closest("[data-schedule]")) == null ? void 0 : j.dataset) || {};
231
+ let L = () => {
232
232
  };
233
- $e.fromVueCal === _ ? (F = o.getEvent(V._.id), F && (F._.dragging = !1, z = (J) => {
234
- if (F.start = A, F.end = m, F.allDay = i, h !== void 0 && (F.schedule = ~~h), J && typeof J == "object") {
235
- const { _: ae, ...se } = J;
233
+ $e.fromVueCal === b ? (F = o.getEvent(M._.id), F && (F._.dragging = !1, L = (X) => {
234
+ if (F.start = G, F.end = m, F.allDay = c, f !== void 0 && (F.schedule = ~~f), X && typeof X == "object") {
235
+ const { _: ae, ...se } = X;
236
236
  Object.assign(F, se);
237
237
  }
238
238
  })) : (F = {
239
- ...V,
240
- start: A,
239
+ ...M,
240
+ start: G,
241
241
  end: m,
242
- ...h !== void 0 && { schedule: ~~h },
243
- _: { id: ((l = V._) == null ? void 0 : l.id) || V.id, duration: v(A, m) },
244
- getOverlappingEvents: () => o.getEventsInRange(A, m, { schedule: ~~h })
245
- }, z = (J) => {
246
- if (F = o.createEvent(F), J && typeof J == "object") {
247
- const { _: ae, ...se } = J;
242
+ ...f !== void 0 && { schedule: ~~f },
243
+ _: { id: ((s = M._) == null ? void 0 : s.id) || M.id, duration: v(G, m) },
244
+ getOverlappingEvents: () => o.getEventsInRange(G, m, { schedule: ~~f })
245
+ }, L = (X) => {
246
+ if (F = o.createEvent(F), X && typeof X == "object") {
247
+ const { _: ae, ...se } = X;
248
248
  Object.assign(F, se);
249
249
  }
250
250
  });
251
- let f = !0;
252
- const { drop: T } = (X = t.eventListeners) == null ? void 0 : X.event;
253
- T && (f = await T({
251
+ let g = !0;
252
+ const { drop: _ } = (A = t.eventListeners) == null ? void 0 : A.event;
253
+ _ && (g = await _({
254
254
  e,
255
- event: { ...F, start: A, end: m, schedule: ~~h },
256
- overlaps: F.getOverlappingEvents({ start: A, end: m, schedule: ~~h }),
255
+ event: { ...F, start: G, end: m, schedule: ~~f },
256
+ overlaps: F.getOverlappingEvents({ start: G, end: m, schedule: ~~f }),
257
257
  cell: k,
258
- external: $e.fromVueCal !== _
259
- })), f !== !1 && z(f), k.highlighted = !1, k.highlightedSchedule = null, qe = !1, $e.toVueCal = _, w("event-dropped", {
258
+ external: $e.fromVueCal !== b
259
+ })), g !== !1 && L(g), k.highlighted = !1, k.highlightedSchedule = null, qe = !1, $e.toVueCal = b, w("event-dropped", {
260
260
  e,
261
261
  cell: k,
262
262
  event: F,
263
- originalEvent: V,
264
- external: $e.fromVueCal !== _
263
+ originalEvent: M,
264
+ external: $e.fromVueCal !== b
265
265
  });
266
266
  }
267
267
  };
268
268
  }
269
269
  const lt = (p, t) => {
270
- let u, o, w, _ = {}, N = {};
270
+ let i, o, w, b = {}, N = {};
271
271
  const d = ie(p), H = () => {
272
272
  d.value.today || (d.value = t), Date.prototype.addDays = function(n) {
273
273
  return P(this, n || 0);
@@ -276,27 +276,27 @@ const lt = (p, t) => {
276
276
  }, Date.prototype.addHours = function(n) {
277
277
  return a(this, n || 0);
278
278
  }, Date.prototype.subtractHours = function(n) {
279
- return s(this, n || 0);
279
+ return l(this, n || 0);
280
280
  }, Date.prototype.addMinutes = function(n) {
281
281
  return e(this, n || 0);
282
282
  }, Date.prototype.subtractMinutes = function(n) {
283
283
  return k(this, n || 0);
284
284
  }, Date.prototype.getWeek = function() {
285
- return V(this);
285
+ return M(this);
286
286
  }, Date.prototype.isToday = function() {
287
287
  return F(this);
288
288
  }, Date.prototype.isLeapYear = function() {
289
- return h(this);
289
+ return f(this);
290
290
  }, Date.prototype.format = function(n = "YYYY-MM-DD") {
291
- return J(this, n);
291
+ return X(this, n);
292
292
  }, Date.prototype.formatTime = function(n = "HH:mm") {
293
293
  return se(this, n);
294
294
  };
295
295
  }, v = () => {
296
296
  delete Date.prototype.addDays, delete Date.prototype.subtractDays, delete Date.prototype.addHours, delete Date.prototype.subtractHours, delete Date.prototype.addMinutes, delete Date.prototype.subtractMinutes, delete Date.prototype.getWeek, delete Date.prototype.isToday, delete Date.prototype.isLeapYear, delete Date.prototype.format, delete Date.prototype.formatTime;
297
- }, c = (n) => {
297
+ }, u = (n) => {
298
298
  d.value = n, Date.prototype.subtractDays && H();
299
- }, y = () => (o !== (/* @__PURE__ */ new Date()).getDate() && (u = /* @__PURE__ */ new Date(), o = u.getDate(), w = `${u.getFullYear()}-${u.getMonth()}-${u.getDate()}`), w), P = (n, $) => {
299
+ }, h = () => (o !== (/* @__PURE__ */ new Date()).getDate() && (i = /* @__PURE__ */ new Date(), o = i.getDate(), w = `${i.getFullYear()}-${i.getMonth()}-${i.getDate()}`), w), P = (n, $) => {
300
300
  const D = new Date(n.valueOf());
301
301
  return D.setDate(D.getDate() + $), D;
302
302
  }, I = (n, $) => {
@@ -305,7 +305,7 @@ const lt = (p, t) => {
305
305
  }, a = (n, $) => {
306
306
  const D = new Date(n.valueOf());
307
307
  return D.setHours(D.getHours() + $), D;
308
- }, s = (n, $) => {
308
+ }, l = (n, $) => {
309
309
  const D = new Date(n.valueOf());
310
310
  return D.setHours(D.getHours() - $), D;
311
311
  }, e = (n, $) => {
@@ -314,41 +314,41 @@ const lt = (p, t) => {
314
314
  }, k = (n, $) => {
315
315
  const D = new Date(n.valueOf());
316
316
  return D.setMinutes(D.getMinutes() - $), D;
317
- }, i = (n, $) => {
318
- const D = (G) => {
319
- const K = G % $;
320
- return K !== 0 && (G += K >= $ / 2 ? $ - K : -K), G;
317
+ }, c = (n, $) => {
318
+ const D = (q) => {
319
+ const K = q % $;
320
+ return K !== 0 && (q += K >= $ / 2 ? $ - K : -K), q;
321
321
  };
322
322
  if (typeof n == "number") return D(n);
323
323
  if (n instanceof Date) {
324
- let G = D(n.getMinutes());
325
- G >= 60 && (n.setHours(n.getHours() + 1), G = 0), n.setMinutes(G, 0, 0);
324
+ let q = D(n.getMinutes());
325
+ q >= 60 && (n.setHours(n.getHours() + 1), q = 0), n.setMinutes(q, 0, 0);
326
326
  }
327
- }, V = (n, $ = !1) => {
328
- const D = new Date(Date.UTC(n.getFullYear(), n.getMonth(), n.getDate())), G = D.getUTCDay() || 7;
329
- D.setUTCDate(D.getUTCDate() + 4 - G);
327
+ }, M = (n, $ = !1) => {
328
+ const D = new Date(Date.UTC(n.getFullYear(), n.getMonth(), n.getDate())), q = D.getUTCDay() || 7;
329
+ D.setUTCDate(D.getUTCDate() + 4 - q);
330
330
  const K = new Date(Date.UTC(D.getUTCFullYear(), 0, 1));
331
331
  return Math.ceil(((D - K) / 864e5 + 1) / 7) + ($ ? 1 : 0);
332
- }, F = (n) => `${n.getFullYear()}-${n.getMonth()}-${n.getDate()}` === y(), A = (n, $) => {
332
+ }, F = (n) => `${n.getFullYear()}-${n.getMonth()}-${n.getDate()}` === h(), G = (n, $) => {
333
333
  if (!n || !$) return console.warn(`Vue Cal: missing date${n ? "2" : "1"} parameter for comparison with \`isSameDate(date1, date2)\`.`);
334
- if (X(n)) {
335
- if (!X($)) return console.warn(`Vue Cal: invalid date2 provided for comparison with \`isSameDate(date1, date2)\`: \`${$}\`.`);
334
+ if (A(n)) {
335
+ if (!A($)) return console.warn(`Vue Cal: invalid date2 provided for comparison with \`isSameDate(date1, date2)\`: \`${$}\`.`);
336
336
  } else return console.warn(`Vue Cal: invalid date1 provided for comparison with \`isSameDate(date1, date2)\`: \`${n}\`.`);
337
337
  return n.getFullYear() === $.getFullYear() && n.getMonth() === $.getMonth() && n.getDate() === $.getDate();
338
- }, m = (n, $, D) => X(n) ? n.getTime() >= $ && n.getTime() <= D : console.warn(`Vue Cal: invalid date provided to \`isInRange(date, rangeStart, rangeEnd)\`: \`${n}\`.`), h = (n) => {
338
+ }, m = (n, $, D) => A(n) ? n.getTime() >= $ && n.getTime() <= D : console.warn(`Vue Cal: invalid date provided to \`isInRange(date, rangeStart, rangeEnd)\`: \`${n}\`.`), f = (n) => {
339
339
  const $ = n.getFullYear();
340
340
  return !($ % 400) || $ % 100 && !($ % 4);
341
- }, z = (n = null, $) => {
342
- const D = n && new Date(n.valueOf()) || /* @__PURE__ */ new Date(), G = $ ? 7 : 6;
343
- return D.setDate(D.getDate() - (D.getDay() + G) % 7), D;
344
- }, f = (n) => n instanceof Date ? n : (n.length === 10 && (n += " 00:00"), new Date(n.replace(/-/g, "/"))), T = (n) => n.getHours() * 60 + n.getMinutes(), S = (n, $) => {
341
+ }, L = (n = null, $) => {
342
+ const D = n && new Date(n.valueOf()) || /* @__PURE__ */ new Date(), q = $ ? 7 : 6;
343
+ return D.setDate(D.getDate() - (D.getDay() + q) % 7), D;
344
+ }, g = (n) => n instanceof Date ? n : (n.length === 10 && (n += " 00:00"), new Date(n.replace(/-/g, "/"))), _ = (n) => n.getHours() * 60 + n.getMinutes(), j = (n, $) => {
345
345
  typeof n == "string" && (n = n.replace(/-/g, "/")), typeof $ == "string" && ($ = $.replace(/-/g, "/")), n = new Date(n).setHours(0, 0, 0, 0), $ = new Date($).setHours(0, 0, 1, 0);
346
346
  const D = (new Date($).getTimezoneOffset() - new Date(n).getTimezoneOffset()) * 60 * 1e3;
347
347
  return Math.ceil(($ - n - D) / (24 * 3600 * 1e3));
348
- }, l = (n, $, D) => Math.abs(n.getTime() - $.getTime()) <= D * 60 * 1e3, X = (n) => n && n instanceof Date && !isNaN(n), J = (n, $ = "YYYY-MM-DD", D = null) => {
348
+ }, s = (n, $, D) => Math.abs(n.getTime() - $.getTime()) <= D * 60 * 1e3, A = (n) => n && n instanceof Date && !isNaN(n), X = (n, $ = "YYYY-MM-DD", D = null) => {
349
349
  if (D || (D = d.value), $ || ($ = "YYYY-MM-DD"), $ === "YYYY-MM-DD") return ae(n);
350
- _ = {}, N = {};
351
- const G = {
350
+ b = {}, N = {};
351
+ const q = {
352
352
  YYYY: () => ee(n, D).YYYY,
353
353
  YY: () => ee(n, D).YY(),
354
354
  M: () => ee(n, D).M,
@@ -374,23 +374,23 @@ const lt = (p, t) => {
374
374
  s: () => oe(n, D).s
375
375
  };
376
376
  return $.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (K, De) => {
377
- const r = G[De.replace(/\{|\}/g, "")];
377
+ const r = q[De.replace(/\{|\}/g, "")];
378
378
  return r !== void 0 ? r() : De;
379
379
  });
380
380
  }, ae = (n) => {
381
381
  const $ = n.getMonth() + 1, D = n.getDate();
382
382
  return `${n.getFullYear()}-${$ < 10 ? "0" : ""}${$}-${D < 10 ? "0" : ""}${D}`;
383
- }, se = (n, $ = "HH:mm", D = null, G = !1) => {
383
+ }, se = (n, $ = "HH:mm", D = null, q = !1) => {
384
384
  let K = !1;
385
- if (G) {
386
- const [Y, j, M] = [n.getHours(), n.getMinutes(), n.getSeconds()];
387
- Y + j + M === 141 && (K = !0);
385
+ if (q) {
386
+ const [E, O, Y] = [n.getHours(), n.getMinutes(), n.getSeconds()];
387
+ E + O + Y === 141 && (K = !0);
388
388
  }
389
389
  if (n instanceof Date && $ === "HH:mm") return K ? "24:00" : de(n);
390
390
  N = {}, D || (D = d.value);
391
- const De = oe(n, D), r = $.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (Y, j) => {
392
- const M = De[j.replace(/\{|\}/g, "")];
393
- return M !== void 0 ? M : j;
391
+ const De = oe(n, D), r = $.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (E, O) => {
392
+ const Y = De[O.replace(/\{|\}/g, "")];
393
+ return Y !== void 0 ? Y : O;
394
394
  });
395
395
  return K ? r.replace("23:59", "24:00") : r;
396
396
  }, de = (n) => {
@@ -412,24 +412,24 @@ const lt = (p, t) => {
412
412
  return "th";
413
413
  }
414
414
  }, ee = (n, $) => {
415
- if (_.D) return _;
416
- const D = n.getFullYear(), G = n.getMonth() + 1, K = n.getDate(), r = (n.getDay() - 1 + 7) % 7;
417
- return _ = {
415
+ if (b.D) return b;
416
+ const D = n.getFullYear(), q = n.getMonth() + 1, K = n.getDate(), r = (n.getDay() - 1 + 7) % 7;
417
+ return b = {
418
418
  // Year.
419
419
  YYYY: D,
420
420
  // 2024.
421
421
  YY: () => D.toString().substring(2),
422
422
  // 24.
423
423
  // Month.
424
- M: G,
424
+ M: q,
425
425
  // 1 to 12.
426
- MM: () => G.toString().padStart(2, 0),
426
+ MM: () => q.toString().padStart(2, 0),
427
427
  // 01 to 12.
428
- MMM: () => $.months[G - 1].substring(0, 3),
428
+ MMM: () => $.months[q - 1].substring(0, 3),
429
429
  // Jan to Dec.
430
- MMMM: () => $.months[G - 1],
430
+ MMMM: () => $.months[q - 1],
431
431
  // January to December.
432
- MMMMG: () => ($.monthsGenitive || $.months)[G - 1],
432
+ MMMMG: () => ($.monthsGenitive || $.months)[q - 1],
433
433
  // January to December in genitive form (Greek...)
434
434
  // Day.
435
435
  D: K,
@@ -448,11 +448,11 @@ const lt = (p, t) => {
448
448
  // Mon to Sun.
449
449
  dddd: () => $.weekDays[r]
450
450
  // Monday to Sunday.
451
- }, _;
451
+ }, b;
452
452
  }, oe = (n, $) => {
453
453
  if (N.am) return N;
454
- let D, G, K;
455
- n instanceof Date ? (D = n.getHours(), G = n.getMinutes(), K = n.getSeconds()) : (D = Math.floor(n / 60), G = Math.floor(n % 60));
454
+ let D, q, K;
455
+ n instanceof Date ? (D = n.getHours(), q = n.getMinutes(), K = n.getSeconds()) : (D = Math.floor(n / 60), q = Math.floor(n % 60));
456
456
  const De = D % 12 ? D % 12 : 12, r = ($ || { am: "am", pm: "pm" })[D === 24 || D < 12 ? "am" : "pm"];
457
457
  return N = {
458
458
  H: D,
@@ -461,43 +461,43 @@ const lt = (p, t) => {
461
461
  hh: De.toString().padStart(2, 0),
462
462
  am: r,
463
463
  AM: r.toUpperCase(),
464
- m: G,
465
- mm: G.toString().padStart(2, 0),
464
+ m: q,
465
+ mm: q.toString().padStart(2, 0),
466
466
  s: K
467
467
  }, N;
468
468
  };
469
469
  return {
470
470
  addDatePrototypes: H,
471
471
  removeDatePrototypes: v,
472
- updateTexts: c,
472
+ updateTexts: u,
473
473
  addDays: P,
474
474
  subtractDays: I,
475
475
  addHours: a,
476
- subtractHours: s,
476
+ subtractHours: l,
477
477
  addMinutes: e,
478
478
  subtractMinutes: k,
479
- snapToInterval: i,
480
- getWeek: V,
479
+ snapToInterval: c,
480
+ getWeek: M,
481
481
  isToday: F,
482
- isSameDate: A,
482
+ isSameDate: G,
483
483
  isInRange: m,
484
- isLeapYear: h,
485
- getPreviousFirstDayOfWeek: z,
486
- stringToDate: f,
487
- dateToMinutes: T,
488
- countDays: S,
489
- datesInSameTimeStep: l,
490
- isValid: X,
491
- formatDate: J,
484
+ isLeapYear: f,
485
+ getPreviousFirstDayOfWeek: L,
486
+ stringToDate: g,
487
+ dateToMinutes: _,
488
+ countDays: j,
489
+ datesInSameTimeStep: s,
490
+ isValid: A,
491
+ formatDate: X,
492
492
  formatDateLite: ae,
493
493
  formatTime: se,
494
494
  formatTimeLite: de,
495
495
  formatMinutes: Z
496
496
  };
497
497
  }, Ot = (p) => {
498
- const { dateUtils: t, config: u } = p;
498
+ const { dateUtils: t, config: i } = p;
499
499
  let o = 0;
500
- const w = E(() => {
500
+ const w = S(() => {
501
501
  const a = {
502
502
  // A map of events indexed by { YYYY: { MM: { DD: [] } } }.
503
503
  // Each year contains a map of 12 months starting from 1, each containing a map of days starting from 1, each containing an array of event IDs.
@@ -510,197 +510,197 @@ const lt = (p, t) => {
510
510
  // An array of events IDs that are multiday.
511
511
  byId: {}
512
512
  // A map of all the events indexed by ID for fast lookup. Each event is the original full event object.
513
- }, s = u.events.sort((e, k) => e.start - k.start < 0 ? -1 : 1);
514
- for (const e of s)
515
- if (_(e), N(e), a.byId[e._.id] = e, e.recurring)
513
+ }, l = i.events.sort((e, k) => e.start - k.start < 0 ? -1 : 1);
514
+ for (const e of l)
515
+ if (b(e), N(e), a.byId[e._.id] = e, e.recurring)
516
516
  a.recurring.push(e._.id);
517
517
  else if (e._.multiday)
518
518
  a.multiday.push(e._.id), a.byDate[e._.startFormatted] || (a.byDate[e._.startFormatted] = []), a.byDate[e._.startFormatted].push(e._.id);
519
519
  else {
520
520
  a.byDate[e._.startFormatted] || (a.byDate[e._.startFormatted] = []), a.byDate[e._.startFormatted].push(e._.id);
521
- const k = e._.startFormatted.substring(0, 4), i = e._.startFormatted.substring(5, 7), V = e._.startFormatted.substring(8, 10);
522
- a.byYear[k] || (a.byYear[k] = {}), a.byYear[k][i] || (a.byYear[k][i] = {}), a.byYear[k][i][V] || (a.byYear[k][i][V] = []), a.byYear[k][i][V].push(e._.id);
521
+ const k = e._.startFormatted.substring(0, 4), c = e._.startFormatted.substring(5, 7), M = e._.startFormatted.substring(8, 10);
522
+ a.byYear[k] || (a.byYear[k] = {}), a.byYear[k][c] || (a.byYear[k][c] = {}), a.byYear[k][c][M] || (a.byYear[k][c][M] = []), a.byYear[k][c][M].push(e._.id);
523
523
  }
524
524
  return a;
525
- }), _ = (a) => {
525
+ }), b = (a) => {
526
526
  if (typeof a.start == "string" && (a.start = t.stringToDate(a.start)), typeof a.end == "string" && (a.end = t.stringToDate(a.end)), a.start.setSeconds(0, 0), a.end.getSeconds() >= 59 ? a.end.setMinutes(60, 0, 0) : a.end.setSeconds(0, 0), isNaN(a.start) || isNaN(a.end) || a.end.getTime() < a.start.getTime()) {
527
527
  isNaN(a.start) ? console.error(`Vue Cal: invalid start date for event "${a.title}".`, a.start) : isNaN(a.end) ? console.error(`Vue Cal: invalid end date for event "${a.title}".`, a.end) : console.error(`Vue Cal: invalid event dates for event "${a.title}". The event ends before it starts.`, a.start, a.end);
528
528
  return;
529
529
  }
530
530
  a._ || (a._ = {}), a._.multiday = !t.isSameDate(a.start, new Date(a.end.getTime() - 1)), a._.startFormatted = t.formatDate(a.start), a._.startMinutes = ~~t.dateToMinutes(a.start), a._.endMinutes = ~~t.dateToMinutes(a.end);
531
- const s = a.start.getHours(), e = a.start.getMinutes().toString().padStart(2, 0), k = a.end.getHours(), i = a.end.getMinutes().toString().padStart(2, 0);
532
- a._.startTimeFormatted24 = `${s.toString().padStart(2, 0)}:${e}`, a._.startTimeFormatted12 = `${s % 12 || 12}${e ? `:${e}` : ""} ${s < 12 ? "AM" : "PM"}`, a._.endTimeFormatted24 = `${k.toString().padStart(2, 0)}:${i}`, a._.endTimeFormatted12 = `${k % 12 || 12}${i ? `:${i}` : ""} ${k < 12 ? "AM" : "PM"}`, a._.duration = Math.abs(~~((a.end - a.start) / 6e4));
531
+ const l = a.start.getHours(), e = a.start.getMinutes().toString().padStart(2, 0), k = a.end.getHours(), c = a.end.getMinutes().toString().padStart(2, 0);
532
+ a._.startTimeFormatted24 = `${l.toString().padStart(2, 0)}:${e}`, a._.startTimeFormatted12 = `${l % 12 || 12}${e ? `:${e}` : ""} ${l < 12 ? "AM" : "PM"}`, a._.endTimeFormatted24 = `${k.toString().padStart(2, 0)}:${c}`, a._.endTimeFormatted12 = `${k % 12 || 12}${c ? `:${c}` : ""} ${k < 12 ? "AM" : "PM"}`, a._.duration = Math.abs(~~((a.end - a.start) / 6e4));
533
533
  }, N = (a) => {
534
- a._ || (a._ = {}), a._.id = a._.id || ++o, a.delete || (a.delete = (s) => c(a._.id, s)), a._.deleting = !1, a._.deleted = !1, a.isOverlapping = (s = null) => a.getOverlappingEvents(s).length, a.getOverlappingEvents = (s = null) => {
534
+ a._ || (a._ = {}), a._.id = a._.id || ++o, a.delete || (a.delete = (l) => u(a._.id, l)), a._.deleting = !1, a._.deleted = !1, a.isOverlapping = (l = null) => a.getOverlappingEvents(l).length, a.getOverlappingEvents = (l = null) => {
535
535
  var e;
536
536
  return P(
537
- (s == null ? void 0 : s.start) || a.start,
538
- (s == null ? void 0 : s.end) || a.end,
539
- { excludeIds: [a._.id], schedule: (e = u.schedules) != null && e.length ? ~~((s == null ? void 0 : s.schedule) || a.schedule) : null }
537
+ (l == null ? void 0 : l.start) || a.start,
538
+ (l == null ? void 0 : l.end) || a.end,
539
+ { excludeIds: [a._.id], schedule: (e = i.schedules) != null && e.length ? ~~((l == null ? void 0 : l.schedule) || a.schedule) : null }
540
540
  );
541
- }, a._.register = (s) => {
542
- a._.$el = s, a._.fireCreated && (p.emit("event-created", a), delete a._.fireCreated);
541
+ }, a._.register = (l) => {
542
+ a._.$el = l, a._.fireCreated && (p.emit("event-created", a), delete a._.fireCreated);
543
543
  }, a._.unregister = () => {
544
544
  a._.$el = null, a._.register = null, a.isOverlapping = null, a.getOverlappingEvents = null, a.delete = null;
545
545
  };
546
546
  }, d = (a) => w.value.byId[a], H = (a) => {
547
- const s = [];
547
+ const l = [];
548
548
  for (const { start: e, end: k } of a) {
549
- const i = P(e, k);
550
- i.length && s.push(...i);
549
+ const c = P(e, k);
550
+ c.length && l.push(...c);
551
551
  }
552
- return s;
552
+ return l;
553
553
  }, v = (a) => {
554
554
  if (!a.start || !a.end) {
555
555
  console.error("Vue Cal: Cannot create an event without valid start and end dates.");
556
556
  return;
557
557
  }
558
- return u.snapToInterval && (t.snapToInterval(a.start, u.snapToInterval), t.snapToInterval(a.end, u.snapToInterval)), a = { ...a }, a._ || (a._ = {}), a._.id = ++o, a._.fireCreated = !0, u.events.push(a), a;
559
- }, c = async (a, s = 0) => {
560
- var F, A;
558
+ return i.snapToInterval && (t.snapToInterval(a.start, i.snapToInterval), t.snapToInterval(a.end, i.snapToInterval)), a = { ...a }, a._ || (a._ = {}), a._.id = ++o, a._.fireCreated = !0, i.events.push(a), a;
559
+ }, u = async (a, l = 0) => {
560
+ var F, G;
561
561
  if (!a) return console.warn("Vue Cal: Cannot delete event without its ID or criteria.");
562
562
  let e = typeof a == "string" || !isNaN(a) ? a : null;
563
563
  const k = typeof a == "object" ? Object.entries(a) : null;
564
564
  if (k) {
565
- const [m, h] = k[0];
566
- e = (F = u.events.find((z) => z[m] === h)) == null ? void 0 : F._.id;
565
+ const [m, f] = k[0];
566
+ e = (F = i.events.find((L) => L[m] === f)) == null ? void 0 : F._.id;
567
567
  }
568
- if (!u.editableEvents.delete)
568
+ if (!i.editableEvents.delete)
569
569
  return console.info("Vue Cal: Event deletion is disabled. Enable it with the `editable-events` props.");
570
570
  if (!e) return console.warn("Vue Cal: Cannot delete event without its ID.");
571
- const i = u.events.findIndex((m) => m._.id === e);
572
- if (i === -1) return console.warn(`Vue Cal: Cannot delete unknown event \`${e}\`.`);
573
- const V = u.events[i];
574
- if (V.deletable === !1) return console.warn(`Vue Cal: Can't delete event \`${e}\` since it was explicitely set to \`delete: false\`.`);
575
- switch (s) {
571
+ const c = i.events.findIndex((m) => m._.id === e);
572
+ if (c === -1) return console.warn(`Vue Cal: Cannot delete unknown event \`${e}\`.`);
573
+ const M = i.events[c];
574
+ if (M.deletable === !1) return console.warn(`Vue Cal: Can't delete event \`${e}\` since it was explicitely set to \`delete: false\`.`);
575
+ switch (l) {
576
576
  case 0:
577
- V._.deleting ? u.events.splice(i, 1) : V._.deleting = !0;
577
+ M._.deleting ? i.events.splice(c, 1) : M._.deleting = !0;
578
578
  break;
579
579
  // Display the delete button.
580
580
  case 1:
581
- V._.deleting = !0;
581
+ M._.deleting = !0;
582
582
  break;
583
583
  // Visual deletion + external DOM event firing.
584
584
  // When explicitly using this stage, the event will be visually deleted but still present in the
585
585
  // source of truth until the cell is unmounted (by navigating away).
586
586
  case 2:
587
- V._.deleted = !0, u.events[i]._.deleted = !0, (A = V._.$el) == null || A.dispatchEvent(new CustomEvent("event-deleted", { detail: V._.id }));
587
+ M._.deleted = !0, i.events[c]._.deleted = !0, (G = M._.$el) == null || G.dispatchEvent(new CustomEvent("event-deleted", { detail: M._.id }));
588
588
  break;
589
589
  // Effective deletion from the source of truth (by default, when unmounting the cell).
590
590
  case 3:
591
- u.events.splice(i, 1), p.emit("update:events", u.events), p.emit("event-delete", V);
591
+ i.events.splice(c, 1), p.emit("update:events", i.events), p.emit("event-delete", M);
592
592
  break;
593
593
  }
594
594
  return !0;
595
- }, y = (a, s) => {
596
- const e = u.allDayEvents ? { allDay: !0 } : {}, k = P(a, s, { background: !1, ...e });
597
- if (!k.length) return { cellOverlaps: {}, longestStreak: 0 };
598
- const i = {};
599
- let V = [], F = 0;
600
- k.sort((A, m) => A.start - m.start || A.end - A.start - (m.end - m.start));
601
- for (const A of k) {
602
- const m = A._.id;
603
- i[m] || (i[m] = { overlaps: /* @__PURE__ */ new Set(), maxConcurrent: 1, position: 0 }), V = V.filter((S) => S.end > A.start);
604
- const h = V.filter((S) => {
595
+ }, h = (a, l, e) => {
596
+ const k = i.allDayEvents ? { allDay: e } : {}, c = P(a, l, { background: !1, ...k });
597
+ if (!c.length) return { cellOverlaps: {}, longestStreak: 0 };
598
+ const M = {};
599
+ let F = [], G = 0;
600
+ c.sort((m, f) => m.start - f.start || m.end - m.start - (f.end - f.start));
601
+ for (const m of c) {
602
+ const f = m._.id;
603
+ M[f] || (M[f] = { overlaps: /* @__PURE__ */ new Set(), maxConcurrent: 1, position: 0 }), F = F.filter((s) => s.end > m.start);
604
+ const L = F.filter((s) => {
605
605
  var X;
606
- return (!((X = u.schedules) != null && X.length) || A.schedule === S.schedule) && S.start < A.end;
607
- }), z = new Set(h.map((S) => {
608
- var l;
609
- return ((l = i[S._.id]) == null ? void 0 : l.position) ?? 0;
606
+ return (!((X = i.schedules) != null && X.length) || m.schedule === s.schedule) && s.start < m.end;
607
+ }), g = new Set(L.map((s) => {
608
+ var A;
609
+ return ((A = M[s._.id]) == null ? void 0 : A.position) ?? 0;
610
610
  }));
611
- let f = 0;
612
- for (; z.has(f); ) f++;
613
- i[m].position = f, V.push(A);
614
- const T = Math.max(1, ...h.map((S) => {
615
- var l;
616
- return ((l = i[S._.id]) == null ? void 0 : l.maxConcurrent) ?? 1;
611
+ let _ = 0;
612
+ for (; g.has(_); ) _++;
613
+ M[f].position = _, F.push(m);
614
+ const j = Math.max(1, ...L.map((s) => {
615
+ var A;
616
+ return ((A = M[s._.id]) == null ? void 0 : A.maxConcurrent) ?? 1;
617
617
  }));
618
- i[m].maxConcurrent = Math.max(h.length + 1, T);
619
- for (const S of h)
620
- i[S._.id].overlaps.add(m), i[m].overlaps.add(S._.id), i[S._.id].maxConcurrent = i[m].maxConcurrent;
621
- F = Math.max(F, i[m].maxConcurrent);
618
+ M[f].maxConcurrent = Math.max(L.length + 1, j);
619
+ for (const s of L)
620
+ M[s._.id].overlaps.add(f), M[f].overlaps.add(s._.id), M[s._.id].maxConcurrent = M[f].maxConcurrent;
621
+ G = Math.max(G, M[f].maxConcurrent);
622
622
  }
623
- for (const A in i) i[A].overlaps = [...i[A].overlaps];
624
- return { cellOverlaps: i, longestStreak: F };
625
- }, P = (a, s, { excludeIds: e = [], schedule: k = null, background: i = !0, allDay: V = !1 } = {}) => {
626
- const F = a.getFullYear(), A = s.getFullYear(), m = a.getMonth() + 1, h = s.getMonth() + 1, z = a.getDate(), f = s.getDate(), T = a.getTime(), S = s.getTime(), l = [], X = new Set(e);
627
- for (let J = F; J <= A; J++) {
628
- const ae = `${J}`, se = w.value.byYear[ae];
623
+ for (const m in M) M[m].overlaps = [...M[m].overlaps];
624
+ return { cellOverlaps: M, longestStreak: G };
625
+ }, P = (a, l, { excludeIds: e = [], schedule: k = null, background: c = !0, allDay: M = !1 } = {}) => {
626
+ const F = a.getFullYear(), G = l.getFullYear(), m = a.getMonth() + 1, f = l.getMonth() + 1, L = a.getDate(), g = l.getDate(), _ = a.getTime(), j = l.getTime(), s = [], A = new Set(e);
627
+ for (let X = F; X <= G; X++) {
628
+ const ae = `${X}`, se = w.value.byYear[ae];
629
629
  if (!se) continue;
630
- const de = J === F ? m : 1, Z = J === A ? h : 12;
630
+ const de = X === F ? m : 1, Z = X === G ? f : 12;
631
631
  for (let he = de; he <= Z; he++) {
632
632
  const ee = String(he).padStart(2, "0"), oe = se[ee];
633
633
  if (oe)
634
634
  for (const n in oe) {
635
635
  const $ = +n;
636
- if (J === F && he === m && $ < z || J === A && he === h && $ > f) continue;
636
+ if (X === F && he === m && $ < L || X === G && he === f && $ > g) continue;
637
637
  const D = oe[n];
638
- for (let G = 0; G < D.length; G++) {
639
- const K = w.value.byId[D[G]];
640
- !K || X.has(K._.id) || k !== null && k !== K.schedule || i === !1 && K.background || u.allDayEvents && (V && !K.allDay || !V && K.allDay) || K.end.getTime() > T && K.start.getTime() < S && l.push(K);
638
+ for (let q = 0; q < D.length; q++) {
639
+ const K = w.value.byId[D[q]];
640
+ !K || A.has(K._.id) || k !== null && k !== K.schedule || c === !1 && K.background || i.allDayEvents && (M && !K.allDay || !M && K.allDay) || K.end.getTime() > _ && K.start.getTime() < j && s.push(K);
641
641
  }
642
642
  }
643
643
  }
644
644
  }
645
- return l;
645
+ return s;
646
646
  };
647
647
  return {
648
648
  events: w,
649
649
  getEvent: d,
650
650
  getViewEvents: H,
651
- getCellOverlappingEvents: y,
651
+ getCellOverlappingEvents: h,
652
652
  getEventsInRange: P,
653
653
  createEvent: v,
654
- deleteEvent: c,
655
- isEventInRange: (a, s, e) => {
656
- const k = a.allDay || !u.time, i = k ? new Date(a.start).setHours(0, 0, 0, 0) : a.start.getTime(), V = k ? new Date(a.end).setHours(23, 59, 59, 999) : a.end.getTime(), F = k ? new Date(s).setHours(0, 0, 0, 0) : s.getTime(), A = k ? new Date(e).setHours(23, 59, 59, 999) : e.getTime();
657
- return V > F && i < A;
654
+ deleteEvent: u,
655
+ isEventInRange: (a, l, e) => {
656
+ const k = a.allDay || !i.time, c = k ? new Date(a.start).setHours(0, 0, 0, 0) : a.start.getTime(), M = k ? new Date(a.end).setHours(23, 59, 59, 999) : a.end.getTime(), F = k ? new Date(l).setHours(0, 0, 0, 0) : l.getTime(), G = k ? new Date(e).setHours(23, 59, 59, 999) : e.getTime();
657
+ return M > F && c < G;
658
658
  }
659
659
  };
660
- }, jt = ({ config: p, dateUtils: t, emit: u, texts: o, eventsManager: w }, _) => {
661
- const { availableViews: N } = p, d = ie(p.view && N[p.view] ? p.view : p.defaultView), H = ie(p.selectedDate || null), v = ie(/* @__PURE__ */ new Date()), c = ie(new Date(p.viewDate || v.value));
662
- c.value.setHours(0, 0, 0, 0);
663
- const y = ie(new Date(c));
660
+ }, jt = ({ config: p, dateUtils: t, emit: i, texts: o, eventsManager: w }, b) => {
661
+ const { availableViews: N } = p, d = ie(p.view && N[p.view] ? p.view : p.defaultView), H = ie(p.selectedDate || null), v = ie(/* @__PURE__ */ new Date()), u = ie(new Date(p.viewDate || v.value));
662
+ u.value.setHours(0, 0, 0, 0);
663
+ const h = ie(new Date(u));
664
664
  let P = null;
665
- const I = E(() => d.value === "month" ? y.value : h.value), a = E(() => d.value === "month" ? new Date(y.value.getFullYear(), y.value.getMonth() + 1, 0, 23, 59, 59, 999) : f.value), s = E(() => d.value === "week" ? t.getPreviousFirstDayOfWeek(h.value, p.startWeekOnSunday) : d.value === "month" ? h.value : I.value), e = E(() => {
665
+ const I = S(() => d.value === "month" ? h.value : f.value), a = S(() => d.value === "month" ? new Date(h.value.getFullYear(), h.value.getMonth() + 1, 0, 23, 59, 59, 999) : g.value), l = S(() => d.value === "week" ? t.getPreviousFirstDayOfWeek(f.value, p.startWeekOnSunday) : d.value === "month" ? f.value : I.value), e = S(() => {
666
666
  if (d.value === "week") {
667
- const g = t.addDays(s.value, 7);
668
- return g.setMilliseconds(-1), g;
667
+ const y = t.addDays(l.value, 7);
668
+ return y.setMilliseconds(-1), y;
669
669
  }
670
- return d.value === "month" ? f.value : a.value;
671
- }), k = E(() => {
672
- const g = v.value.getTime();
670
+ return d.value === "month" ? g.value : a.value;
671
+ }), k = S(() => {
672
+ const y = v.value.getTime();
673
673
  if (d.value === "week")
674
- return s.value.getTime() <= g && g <= e.value.getTime();
675
- const R = h.value.getTime(), x = f.value.getTime();
676
- return R <= g && g <= x;
674
+ return l.value.getTime() <= y && y <= e.value.getTime();
675
+ const R = f.value.getTime(), x = g.value.getTime();
676
+ return R <= y && y <= x;
677
677
  });
678
- function i() {
679
- v.value = /* @__PURE__ */ new Date(), P = setTimeout(i, 60 * 1e3);
678
+ function c() {
679
+ v.value = /* @__PURE__ */ new Date(), P = setTimeout(c, 60 * 1e3);
680
680
  }
681
- function V() {
682
- P = setTimeout(i, (60 - (/* @__PURE__ */ new Date()).getSeconds()) * 1e3), i();
681
+ function M() {
682
+ P = setTimeout(c, (60 - (/* @__PURE__ */ new Date()).getSeconds()) * 1e3), c();
683
683
  }
684
- const F = E(() => {
684
+ const F = S(() => {
685
685
  if (!p.availableViews[d.value]) return 1;
686
- let g = p.availableViews[d.value].cols;
687
- return p.hasHiddenDays && ["week", "month"].includes(d.value) && (g -= p.hasHiddenDays), g;
688
- }), A = E(() => {
689
- var g;
690
- return ((g = p.availableViews[d.value]) == null ? void 0 : g.rows) || 1;
691
- }), m = E(() => F.value * A.value), h = E(() => {
686
+ let y = p.availableViews[d.value].cols;
687
+ return p.hasHiddenDays && ["week", "month"].includes(d.value) && (y -= p.hasHiddenDays), y;
688
+ }), G = S(() => {
689
+ var y;
690
+ return ((y = p.availableViews[d.value]) == null ? void 0 : y.rows) || 1;
691
+ }), m = S(() => F.value * G.value), f = S(() => {
692
692
  if (d.value === "month") {
693
- let g = y.value.getDay() || 7;
694
- return p.startWeekOnSunday && !p.hideWeekdays[7] && (g += 1), p.viewDayOffset && (g -= p.viewDayOffset), t.subtractDays(y.value, g - 1);
693
+ let y = h.value.getDay() || 7;
694
+ return p.startWeekOnSunday && !p.hideWeekdays[7] && (y += 1), p.viewDayOffset && (y -= p.viewDayOffset), t.subtractDays(h.value, y - 1);
695
695
  }
696
696
  if (d.value === "week") {
697
- const g = "1234567".split("").filter((x) => !Object.keys(p.hideWeekdays).includes(x));
698
- let R = Math.min(...g);
699
- return p.startWeekOnSunday && !p.hideWeekdays[7] && (R = 1), p.viewDayOffset && (R += p.viewDayOffset), t.addDays(y.value, R - 1);
697
+ const y = "1234567".split("").filter((x) => !Object.keys(p.hideWeekdays).includes(x));
698
+ let R = Math.min(...y);
699
+ return p.startWeekOnSunday && !p.hideWeekdays[7] && (R = 1), p.viewDayOffset && (R += p.viewDayOffset), t.addDays(h.value, R - 1);
700
700
  }
701
- return y.value;
702
- }), z = E(() => {
703
- const g = [], R = ["days", "week", "month"].includes(d.value);
701
+ return h.value;
702
+ }), L = S(() => {
703
+ const y = [], R = ["days", "week", "month"].includes(d.value);
704
704
  let x = 0;
705
705
  for (let Q = 0; Q < m.value + x; Q++)
706
706
  switch (d.value) {
@@ -708,50 +708,50 @@ const lt = (p, t) => {
708
708
  case "days":
709
709
  case "week":
710
710
  case "month": {
711
- const fe = t.addDays(h.value, Q), Ae = fe.getDay() || 7;
711
+ const fe = t.addDays(f.value, Q), Ae = fe.getDay() || 7;
712
712
  if (R && p.hasHiddenDays && p.hideWeekdays[Ae]) {
713
713
  x++;
714
714
  continue;
715
715
  }
716
716
  const Ve = new Date(fe);
717
- Ve.setHours(23, 59, 59, 999), g.push({ start: fe, startFormatted: t.formatDate(fe), end: Ve });
717
+ Ve.setHours(23, 59, 59, 999), y.push({ start: fe, startFormatted: t.formatDate(fe), end: Ve });
718
718
  break;
719
719
  }
720
720
  case "year":
721
- g.push({
722
- start: new Date(h.value.getFullYear(), Q, 1, 0, 0, 0, 0),
723
- end: new Date(h.value.getFullYear(), Q + 1, 0, 23, 59, 59, 999)
721
+ y.push({
722
+ start: new Date(f.value.getFullYear(), Q, 1, 0, 0, 0, 0),
723
+ end: new Date(f.value.getFullYear(), Q + 1, 0, 23, 59, 59, 999)
724
724
  });
725
725
  break;
726
726
  case "years":
727
- g.push({
728
- start: new Date(h.value.getFullYear() + Q, 0, 1, 0, 0, 0, 0),
729
- end: new Date(h.value.getFullYear() + Q + 1, 0, 0, 23, 59, 59, 999)
727
+ y.push({
728
+ start: new Date(f.value.getFullYear() + Q, 0, 1, 0, 0, 0, 0),
729
+ end: new Date(f.value.getFullYear() + Q + 1, 0, 0, 23, 59, 59, 999)
730
730
  });
731
731
  break;
732
732
  }
733
- return g;
734
- }), f = E(() => z.value[z.value.length - 1].end), T = ie("right"), S = E(() => {
735
- const g = Object.keys(p.availableViews);
736
- return g[g.indexOf(d.value) + 1];
737
- }), l = E(() => {
738
- const g = Object.keys(p.availableViews);
739
- return g[g.indexOf(d.value) - 1];
733
+ return y;
734
+ }), g = S(() => L.value[L.value.length - 1].end), _ = ie("right"), j = S(() => {
735
+ const y = Object.keys(p.availableViews);
736
+ return y[y.indexOf(d.value) + 1];
737
+ }), s = S(() => {
738
+ const y = Object.keys(p.availableViews);
739
+ return y[y.indexOf(d.value) - 1];
740
740
  });
741
- function X(g, R, x = !1) {
742
- if (!R || !R[g]) return g + 1;
743
- const Q = R[g];
741
+ function A(y, R, x = !1) {
742
+ if (!R || !R[y]) return y + 1;
743
+ const Q = R[y];
744
744
  return x && typeof Q == "string" ? Q.substring(0, 3) : Q;
745
745
  }
746
- function J(g, R, x) {
747
- const { monthsArray: Q, monthBeforeDay: fe, canTruncate: Ae, xs: Ve } = x, Me = g.getMonth(), Ye = g.getFullYear(), Ee = R.getMonth(), He = R.getFullYear(), We = Me !== Ee, _t = Ye !== He, be = Ae && (Ve || We), Pe = g.getDate(), Fe = R.getDate();
748
- return _t ? fe ? `${X(Me, Q, be)} ${Pe}, ${Ye} - ${X(Ee, Q, be)} ${Fe}, ${He}` : `${Pe} ${X(Me, Q, be)} ${Ye} - ${Fe} ${X(Ee, Q, be)} ${He}` : We ? fe ? `${X(Me, Q, be)} ${Pe} - ${X(Ee, Q, be)} ${Fe}, ${Ye}` : `${Pe} ${X(Me, Q, be)} - ${Fe} ${X(Ee, Q, be)} ${Ye}` : fe ? `${X(Me, Q, be)} ${Pe}-${Fe}, ${Ye}` : `${Pe}-${Fe} ${X(Me, Q, be)} ${Ye}`;
746
+ function X(y, R, x) {
747
+ const { monthsArray: Q, monthBeforeDay: fe, canTruncate: Ae, xs: Ve } = x, Me = y.getMonth(), Ye = y.getFullYear(), Ee = R.getMonth(), He = R.getFullYear(), We = Me !== Ee, _t = Ye !== He, be = Ae && (Ve || We), Pe = y.getDate(), Fe = R.getDate();
748
+ return _t ? fe ? `${A(Me, Q, be)} ${Pe}, ${Ye} - ${A(Ee, Q, be)} ${Fe}, ${He}` : `${Pe} ${A(Me, Q, be)} ${Ye} - ${Fe} ${A(Ee, Q, be)} ${He}` : We ? fe ? `${A(Me, Q, be)} ${Pe} - ${A(Ee, Q, be)} ${Fe}, ${Ye}` : `${Pe} ${A(Me, Q, be)} - ${Fe} ${A(Ee, Q, be)} ${Ye}` : fe ? `${A(Me, Q, be)} ${Pe}-${Fe}, ${Ye}` : `${Pe}-${Fe} ${A(Me, Q, be)} ${Ye}`;
749
749
  }
750
- const ae = E(() => {
751
- const { dateFormat: g, months: R, monthsGenitive: x, week: Q, truncations: fe } = o, Ae = p.locale, Ve = fe !== !1, Me = g.indexOf("M") < g.indexOf("D"), Ye = x && Ae === "el" ? x : R;
750
+ const ae = S(() => {
751
+ const { dateFormat: y, months: R, monthsGenitive: x, week: Q, truncations: fe } = o, Ae = p.locale, Ve = fe !== !1, Me = y.indexOf("M") < y.indexOf("D"), Ye = x && Ae === "el" ? x : R;
752
752
  switch (d.value) {
753
753
  case "day":
754
- return t.formatDate(h.value, g);
754
+ return t.formatDate(f.value, y);
755
755
  case "days":
756
756
  case "week": {
757
757
  const Ee = {
@@ -760,10 +760,10 @@ const lt = (p, t) => {
760
760
  canTruncate: Ve,
761
761
  xs: p.xs
762
762
  };
763
- let He = J(h.value, f.value, Ee);
763
+ let He = X(f.value, g.value, Ee);
764
764
  if (d.value === "week") {
765
765
  const We = t.getWeek(
766
- h.value,
766
+ f.value,
767
767
  p.startWeekOnSunday && !p.hideWeekdays[7]
768
768
  );
769
769
  He += ` <small>${Q} ${We}</small>`;
@@ -775,55 +775,55 @@ const lt = (p, t) => {
775
775
  return t.formatDate(I.value, Ee);
776
776
  }
777
777
  case "year":
778
- return h.value.getFullYear();
778
+ return f.value.getFullYear();
779
779
  case "years":
780
- return `${h.value.getFullYear()} - ${a.value.getFullYear()}`;
780
+ return `${f.value.getFullYear()} - ${a.value.getFullYear()}`;
781
781
  }
782
782
  });
783
783
  function se() {
784
- switch (y.value = new Date(c.value || v.value), y.value.setHours(0, 0, 0, 0), d.value) {
784
+ switch (h.value = new Date(u.value || v.value), h.value.setHours(0, 0, 0, 0), d.value) {
785
785
  case "day":
786
786
  break;
787
787
  case "days":
788
788
  break;
789
789
  case "week":
790
- y.value = t.getPreviousFirstDayOfWeek(y.value, p.startWeekOnSunday && !p.hideWeekdays[7]);
790
+ h.value = t.getPreviousFirstDayOfWeek(h.value, p.startWeekOnSunday && !p.hideWeekdays[7]);
791
791
  break;
792
792
  case "month":
793
- y.value = new Date(y.value.getFullYear(), y.value.getMonth(), 1, 0, 0, 0, 0);
793
+ h.value = new Date(h.value.getFullYear(), h.value.getMonth(), 1, 0, 0, 0, 0);
794
794
  break;
795
795
  case "year":
796
- y.value = new Date(y.value.getFullYear(), 0, 1, 0, 0, 0, 0);
796
+ h.value = new Date(h.value.getFullYear(), 0, 1, 0, 0, 0, 0);
797
797
  break;
798
798
  case "years":
799
- y.value = new Date(y.value.getFullYear() - y.value.getFullYear() % m.value, 0, 1, 0, 0, 0, 0);
799
+ h.value = new Date(h.value.getFullYear() - h.value.getFullYear() % m.value, 0, 1, 0, 0, 0, 0);
800
800
  break;
801
801
  }
802
- p.ready && u("view-change", {
802
+ p.ready && i("view-change", {
803
803
  id: d.value,
804
804
  title: ae.value,
805
805
  start: I.value,
806
806
  end: a.value,
807
- extendedStart: s.value,
807
+ extendedStart: l.value,
808
808
  extendedEnd: e.value,
809
- cellDates: z.value,
809
+ cellDates: L.value,
810
810
  containsToday: k.value,
811
- events: q.value
811
+ events: J.value
812
812
  }), v.value = /* @__PURE__ */ new Date();
813
813
  }
814
- function de(g) {
814
+ function de(y) {
815
815
  const R = d.value, x = p.availableViews[R];
816
- g[R] && JSON.stringify(g[R]) === JSON.stringify(x) || se();
816
+ y[R] && JSON.stringify(y[R]) === JSON.stringify(x) || se();
817
817
  }
818
- function Z(g, R = !0) {
818
+ function Z(y, R = !0) {
819
819
  const x = Object.keys(p.availableViews);
820
- d.value !== g && (x.includes(g) ? (T.value = x.indexOf(g) < x.indexOf(d.value) ? "left" : "right", d.value = g, u("update:view", g), se()) : console.warn(`Vue Cal: the \`${g}\` view is not available.`));
820
+ d.value !== y && (x.includes(y) ? (_.value = x.indexOf(y) < x.indexOf(d.value) ? "left" : "right", d.value = y, i("update:view", y), se()) : console.warn(`Vue Cal: the \`${y}\` view is not available.`));
821
821
  }
822
822
  function he() {
823
- S.value ? Z(S.value) : console.warn("Vue Cal: no broader view is available.");
823
+ j.value ? Z(j.value) : console.warn("Vue Cal: no broader view is available.");
824
824
  }
825
825
  function ee() {
826
- l.value ? Z(l.value) : console.warn("Vue Cal: no narrower view is available.");
826
+ s.value ? Z(s.value) : console.warn("Vue Cal: no narrower view is available.");
827
827
  }
828
828
  function oe() {
829
829
  $(!1);
@@ -831,100 +831,100 @@ const lt = (p, t) => {
831
831
  function n() {
832
832
  $(!0);
833
833
  }
834
- function $(g = !0) {
835
- let R = new Date(c.value);
834
+ function $(y = !0) {
835
+ let R = new Date(u.value);
836
836
  switch (d.value) {
837
837
  case "day":
838
838
  case "days":
839
- g ? R = t.addDays(f.value, 1) : R = t.subtractDays(h.value, m.value);
839
+ y ? R = t.addDays(g.value, 1) : R = t.subtractDays(f.value, m.value);
840
840
  break;
841
841
  case "week": {
842
- g ? (R = t.addDays(e.value, 1), R.setHours(0, 0, 0, 0)) : R = t.subtractDays(s.value, m.value);
842
+ y ? (R = t.addDays(e.value, 1), R.setHours(0, 0, 0, 0)) : R = t.subtractDays(l.value, m.value);
843
843
  break;
844
844
  }
845
845
  case "month": {
846
- const x = g ? 1 : -1;
846
+ const x = y ? 1 : -1;
847
847
  R = new Date(R.getFullYear(), R.getMonth() + x, 1, 0, 0, 0, 0);
848
848
  break;
849
849
  }
850
850
  case "year": {
851
- const x = g ? 1 : -1;
851
+ const x = y ? 1 : -1;
852
852
  R = new Date(R.getFullYear() + x, 1, 1, 0, 0, 0, 0);
853
853
  break;
854
854
  }
855
855
  case "years": {
856
- const x = g ? m.value : -m.value;
856
+ const x = y ? m.value : -m.value;
857
857
  R = new Date(R.getFullYear() + x, 1, 1, 0, 0, 0, 0);
858
858
  break;
859
859
  }
860
860
  }
861
- G(R);
861
+ q(R);
862
862
  }
863
863
  function D() {
864
- const g = /* @__PURE__ */ new Date();
865
- g.setHours(0, 0, 0, 0), G(g);
864
+ const y = /* @__PURE__ */ new Date();
865
+ y.setHours(0, 0, 0, 0), q(y);
866
866
  }
867
- function G(g, R = !0, x = !1) {
868
- if (!t.isValid(g)) return console.warn("Vue Cal: can't navigate to the given date: invalid date provided to `updateViewDate(date)`.");
869
- let [Q, fe] = [h.value, f.value];
870
- d.value === "month" && ([Q, fe] = [I.value, a.value]), (!t.isInRange(g, Q, fe) || x) && (g.setHours(0, 0, 0, 0), T.value = g.getTime() < Q.getTime() ? "left" : "right", c.value = g, R && u("update:viewDate", g), se());
867
+ function q(y, R = !0, x = !1) {
868
+ if (!t.isValid(y)) return console.warn("Vue Cal: can't navigate to the given date: invalid date provided to `updateViewDate(date)`.");
869
+ let [Q, fe] = [f.value, g.value];
870
+ d.value === "month" && ([Q, fe] = [I.value, a.value]), (!t.isInRange(y, Q, fe) || x) && (y.setHours(0, 0, 0, 0), _.value = y.getTime() < Q.getTime() ? "left" : "right", u.value = y, R && i("update:viewDate", y), se());
871
871
  }
872
- function K(g, R = !0) {
873
- if (!t.isValid(g)) return console.warn("Vue Cal: can't update the selected date: invalid date provided to `updateSelectedDate(date)`.");
872
+ function K(y, R = !0) {
873
+ if (!t.isValid(y)) return console.warn("Vue Cal: can't update the selected date: invalid date provided to `updateSelectedDate(date)`.");
874
874
  const { isValid: x, isSameDate: Q } = t;
875
- (!H.value || !x(H.value) || !Q(g, H.value)) && (g.setHours(0, 0, 0, 0), H.value = g, R && u("update:selectedDate", g));
875
+ (!H.value || !x(H.value) || !Q(y, H.value)) && (y.setHours(0, 0, 0, 0), H.value = y, R && i("update:selectedDate", y));
876
876
  }
877
- function De(g) {
878
- !g && !y.value.getDay() ? G(t.addDays(y.value, 1), !0, !0) : (T.value = "left", se());
877
+ function De(y) {
878
+ !y && !h.value.getDay() ? q(t.addDays(h.value, 1), !0, !0) : (_.value = "left", se());
879
879
  }
880
- function r(g) {
881
- g && p.startWeekOnSunday && !y.value.getDay() ? G(t.addDays(y.value, 1), !0, !0) : !g && p.startWeekOnSunday && y.value.getDay() === 1 && G(t.subtractDays(y.value, 1), !0, !0);
880
+ function r(y) {
881
+ y && p.startWeekOnSunday && !h.value.getDay() ? q(t.addDays(h.value, 1), !0, !0) : !y && p.startWeekOnSunday && h.value.getDay() === 1 && q(t.subtractDays(h.value, 1), !0, !0);
882
882
  }
883
- function Y() {
883
+ function E() {
884
884
  console.log("toggling weekdays", p.hideWeekdays);
885
885
  }
886
- function j(g) {
886
+ function O(y) {
887
887
  var Q;
888
- const R = (Q = _.value) == null ? void 0 : Q.querySelector(".vuecal__scrollable"), x = g ? g * p.timeCellHeight / p.timeStep : 0;
888
+ const R = (Q = b.value) == null ? void 0 : Q.querySelector(".vuecal__scrollable"), x = y ? y * p.timeCellHeight / p.timeStep : 0;
889
889
  R == null || R.scrollTo({ top: x, behavior: "smooth" });
890
890
  }
891
- function M() {
892
- const g = /* @__PURE__ */ new Date();
893
- j(g.getHours() * 60 + g.getMinutes());
891
+ function Y() {
892
+ const y = /* @__PURE__ */ new Date();
893
+ O(y.getHours() * 60 + y.getMinutes());
894
894
  }
895
895
  function B() {
896
- j(0);
896
+ O(0);
897
897
  }
898
- const q = E(() => w.getViewEvents(z.value)), re = w.createEvent, we = w.deleteEvent;
899
- return me(() => p.view, (g) => Z(g, !1)), me(() => p.availableViews, de), me(() => p.datePicker, () => Z("month", !1)), me(() => p.viewDate, (g) => G(g, !1)), me(() => p.selectedDate, (g) => K(g, !1)), me(() => p.startWeekOnSunday, (g) => De(g)), me(() => p.hideWeekends, (g) => r(g)), me(() => p.hideWeekdays, Y), me(() => m.value, () => {
898
+ const J = S(() => w.getViewEvents(L.value)), re = w.createEvent, we = w.deleteEvent;
899
+ return me(() => p.view, (y) => Z(y, !1)), me(() => p.availableViews, de), me(() => p.datePicker, () => Z("month", !1)), me(() => p.viewDate, (y) => q(y, !1)), me(() => p.selectedDate, (y) => K(y, !1)), me(() => p.startWeekOnSunday, (y) => De(y)), me(() => p.hideWeekends, (y) => r(y)), me(() => p.hideWeekdays, E), me(() => m.value, () => {
900
900
  m.value > 90 && console.warn("Vue Cal: high cell count detected. Performance may degrade when interactions are enabled.");
901
- }), me(() => p.watchRealTime, (g) => {
902
- g && p.time ? V() : P = clearTimeout(P);
903
- }), se(), p.time && p.watchRealTime && V(), Be(() => P = clearTimeout(P)), {
901
+ }), me(() => p.watchRealTime, (y) => {
902
+ y && p.time ? M() : P = clearTimeout(P);
903
+ }), se(), p.time && p.watchRealTime && M(), Be(() => P = clearTimeout(P)), {
904
904
  now: v,
905
905
  id: d,
906
- broaderView: S,
907
- narrowerView: l,
906
+ broaderView: j,
907
+ narrowerView: s,
908
908
  title: ae,
909
- viewDate: c,
909
+ viewDate: u,
910
910
  start: I,
911
911
  end: a,
912
- extendedStart: s,
912
+ extendedStart: l,
913
913
  // Full range, including out of scope month days, and hidden leading/trailing days.
914
914
  extendedEnd: e,
915
915
  // Full range, including out of scope month days, and hidden leading/trailing days.
916
- firstCellDate: h,
917
- lastCellDate: f,
916
+ firstCellDate: f,
917
+ lastCellDate: g,
918
918
  containsToday: k,
919
919
  selectedDate: H,
920
- cellDates: z,
920
+ cellDates: L,
921
921
  cols: F,
922
- rows: A,
922
+ rows: G,
923
923
  // All the events are stored and indexed in the events object of the eventsManager.
924
924
  // The following events array is only a subset of visible ones, plus any potential recurring
925
925
  // and multi-day events.
926
- events: q,
927
- transitionDirection: T,
926
+ events: J,
927
+ transitionDirection: _,
928
928
  switch: Z,
929
929
  broader: he,
930
930
  narrower: ee,
@@ -932,10 +932,10 @@ const lt = (p, t) => {
932
932
  next: n,
933
933
  navigate: $,
934
934
  goToToday: D,
935
- updateViewDate: G,
935
+ updateViewDate: q,
936
936
  updateSelectedDate: K,
937
- scrollToCurrentTime: M,
938
- scrollToTime: j,
937
+ scrollToCurrentTime: Y,
938
+ scrollToTime: O,
939
939
  scrollTop: B,
940
940
  createEvent: re,
941
941
  deleteEvent: we,
@@ -1000,8 +1000,8 @@ const lt = (p, t) => {
1000
1000
  // Make texts reactive before a locale is loaded.
1001
1001
  dateUtils: lt(ge.texts, Qe)
1002
1002
  // Some Date utils functions need localized texts.
1003
- }), zt = ({ props: p, emit: t, attrs: u, vuecalEl: o, uid: w }) => {
1004
- const _ = Te({
1003
+ }), zt = ({ props: p, emit: t, attrs: i, vuecalEl: o, uid: w }) => {
1004
+ const b = Te({
1005
1005
  uid: w,
1006
1006
  // The Vuecal instance unique ID, used for dnd source-target identification.
1007
1007
  emit: t,
@@ -1025,7 +1025,7 @@ const lt = (p, t) => {
1025
1025
  isResizingEvent: !1
1026
1026
  }
1027
1027
  });
1028
- return _.dateUtils = lt(Object.assign(ge.texts, _.texts), Qe), _.config = Ct(_, p, u), _.eventsManager = Ot(_), _.view = jt(_, o), _.dnd = Vt(_), _;
1028
+ return b.dateUtils = lt(Object.assign(ge.texts, b.texts), Qe), b.config = Ct(b, p, i), b.eventsManager = Ot(b), b.view = jt(b, o), b.dnd = Vt(b), b;
1029
1029
  }, Ht = 24 * 60, Pt = {
1030
1030
  allDayEvents: { type: Boolean, default: !1 },
1031
1031
  // Display all-day events in a fixed top bar on the day, days & week views.
@@ -1132,79 +1132,79 @@ const lt = (p, t) => {
1132
1132
  }, Wt = { class: "vuecal__transition-wrap" }, It = ["disabled", "innerHTML"], Rt = {
1133
1133
  __name: "header",
1134
1134
  setup(p) {
1135
- const t = ze("vuecal"), { view: u, config: o } = t, w = () => {
1136
- o.clickToNavigate && u.broader();
1137
- }, _ = E(() => o.clickToNavigate ? { click: w } : {});
1138
- return (N, d) => (C(), L("div", Ft, [
1139
- O(N.$slots, "header", {
1140
- view: b(u),
1141
- availableViews: b(o).availableViews,
1142
- vuecal: b(t)
1135
+ const t = ze("vuecal"), { view: i, config: o } = t, w = () => {
1136
+ o.clickToNavigate && i.broader();
1137
+ }, b = S(() => o.clickToNavigate ? { click: w } : {});
1138
+ return (N, d) => (C(), z("div", Ft, [
1139
+ V(N.$slots, "header", {
1140
+ view: T(i),
1141
+ availableViews: T(o).availableViews,
1142
+ vuecal: T(t)
1143
1143
  }),
1144
- N.$slots.header ? U("", !0) : (C(), L(ue, { key: 0 }, [
1145
- b(o).viewsBar ? (C(), L("div", Nt, [
1146
- (C(!0), L(ue, null, pe(b(o).availableViews, (H, v) => (C(), L("button", {
1147
- class: ye(["vuecal__view-button", { "vuecal__view-button--active": b(u).id === v }]),
1148
- onClick: (c) => b(u).switch(v),
1149
- innerHTML: b(t).texts[v],
1144
+ N.$slots.header ? U("", !0) : (C(), z(ue, { key: 0 }, [
1145
+ T(o).viewsBar ? (C(), z("div", Nt, [
1146
+ (C(!0), z(ue, null, pe(T(o).availableViews, (H, v) => (C(), z("button", {
1147
+ class: ye(["vuecal__view-button", { "vuecal__view-button--active": T(i).id === v }]),
1148
+ onClick: (u) => T(i).switch(v),
1149
+ innerHTML: T(t).texts[v],
1150
1150
  type: "button"
1151
1151
  }, null, 10, At))), 256))
1152
1152
  ])) : U("", !0),
1153
- b(o).titleBar ? (C(), L("nav", Bt, [
1153
+ T(o).titleBar ? (C(), z("nav", Bt, [
1154
1154
  ve("button", {
1155
1155
  class: ye(["vuecal__nav vuecal__nav--prev", { "vuecal__nav--default": !N.$slots["previous-button"] }]),
1156
- onClick: d[0] || (d[0] = (...H) => b(u).previous && b(u).previous(...H)),
1156
+ onClick: d[0] || (d[0] = (...H) => T(i).previous && T(i).previous(...H)),
1157
1157
  type: "button"
1158
1158
  }, [
1159
- O(N.$slots, "previous-button")
1159
+ V(N.$slots, "previous-button")
1160
1160
  ], 2),
1161
1161
  ve("div", Wt, [
1162
1162
  je(Ge, {
1163
- name: `vuecal-slide-fade--${b(u).transitionDirection}`
1163
+ name: `vuecal-slide-fade--${T(i).transitionDirection}`
1164
1164
  }, {
1165
1165
  default: W(() => [
1166
- (C(), L("div", {
1167
- key: b(u).id + b(u).start.getTime()
1166
+ (C(), z("div", {
1167
+ key: T(i).id + T(i).start.getTime()
1168
1168
  }, [
1169
- N.$slots.title || N.$slots[`title.${b(u).id}`] ? (C(), Se(xe(b(o).clickToNavigate && b(u).broaderView ? "button" : "div"), le({
1169
+ N.$slots.title || N.$slots[`title.${T(i).id}`] ? (C(), Se(xe(T(o).clickToNavigate && T(i).broaderView ? "button" : "div"), le({
1170
1170
  key: 0,
1171
1171
  class: "vuecal__title"
1172
- }, Re(_.value)), {
1172
+ }, Re(b.value)), {
1173
1173
  default: W(() => [
1174
- N.$slots[`title.${b(u).id}`] ? O(N.$slots, `title.${b(u).id}`, te(le({ key: 0 }, b(u)))) : O(N.$slots, "title", te(le({ key: 1 }, b(u))))
1174
+ N.$slots[`title.${T(i).id}`] ? V(N.$slots, `title.${T(i).id}`, te(le({ key: 0 }, T(i)))) : V(N.$slots, "title", te(le({ key: 1 }, T(i))))
1175
1175
  ]),
1176
1176
  _: 3
1177
- }, 16)) : (C(), Se(xe(b(o).clickToNavigate && b(u).broaderView ? "button" : "div"), le({
1177
+ }, 16)) : (C(), Se(xe(T(o).clickToNavigate && T(i).broaderView ? "button" : "div"), le({
1178
1178
  key: 1,
1179
1179
  class: "vuecal__title"
1180
- }, Re(_.value), {
1181
- innerHTML: b(u).title
1180
+ }, Re(b.value), {
1181
+ innerHTML: T(i).title
1182
1182
  }), null, 16, ["innerHTML"]))
1183
1183
  ]))
1184
1184
  ]),
1185
1185
  _: 3
1186
1186
  }, 8, ["name"])
1187
1187
  ]),
1188
- b(o).todayButton ? (C(), L(ue, { key: 0 }, [
1189
- N.$slots["today-button"] ? O(N.$slots, "today-button", {
1188
+ T(o).todayButton ? (C(), z(ue, { key: 0 }, [
1189
+ N.$slots["today-button"] ? V(N.$slots, "today-button", {
1190
1190
  key: 0,
1191
- navigate: () => !b(u).containsToday && b(u).goToToday(),
1192
- active: b(u).containsToday
1193
- }) : (C(), L("button", {
1191
+ navigate: () => !T(i).containsToday && T(i).goToToday(),
1192
+ active: T(i).containsToday
1193
+ }) : (C(), z("button", {
1194
1194
  key: 1,
1195
- class: ye(["vuecal__nav vuecal__nav--today vuecal__nav--default", { "vuecal__nav--active": b(u).containsToday }]),
1196
- onClick: d[1] || (d[1] = (H) => !b(u).containsToday && b(u).goToToday()),
1197
- disabled: !!b(u).containsToday,
1195
+ class: ye(["vuecal__nav vuecal__nav--today vuecal__nav--default", { "vuecal__nav--active": T(i).containsToday }]),
1196
+ onClick: d[1] || (d[1] = (H) => !T(i).containsToday && T(i).goToToday()),
1197
+ disabled: !!T(i).containsToday,
1198
1198
  type: "button",
1199
- innerHTML: b(t).texts.today
1199
+ innerHTML: T(t).texts.today
1200
1200
  }, null, 10, It))
1201
1201
  ], 64)) : U("", !0),
1202
1202
  ve("button", {
1203
1203
  class: ye(["vuecal__nav vuecal__nav--next", { "vuecal__nav--default": !N.$slots["next-button"] }]),
1204
- onClick: d[2] || (d[2] = (...H) => b(u).next && b(u).next(...H)),
1204
+ onClick: d[2] || (d[2] = (...H) => T(i).next && T(i).next(...H)),
1205
1205
  type: "button"
1206
1206
  }, [
1207
- O(N.$slots, "next-button")
1207
+ V(N.$slots, "next-button")
1208
1208
  ], 2)
1209
1209
  ])) : U("", !0)
1210
1210
  ], 64))
@@ -1227,7 +1227,7 @@ const lt = (p, t) => {
1227
1227
  },
1228
1228
  emits: ["event-drag-start", "event-drag-end", "event-resize-start", "event-resize-end"],
1229
1229
  setup(p, { emit: t }) {
1230
- const { config: u, view: o, dnd: w, touch: _, dateUtils: N } = ze("vuecal"), d = p, H = ie(null), v = Te(d.event), c = Te({
1230
+ const { config: i, view: o, dnd: w, touch: b, dateUtils: N } = ze("vuecal"), d = p, H = ie(null), v = Te(d.event), u = Te({
1231
1231
  dragging: !1,
1232
1232
  resizing: !1,
1233
1233
  fromResizer: !1,
@@ -1261,19 +1261,19 @@ const lt = (p, t) => {
1261
1261
  cellEl: null,
1262
1262
  // Store the cell DOM node for a more efficient resizing calc in mousemove/touchmove.
1263
1263
  schedule: null
1264
- }), y = E(() => u.editableEvents.drag && v.draggable !== !1 && !v.background), P = E(() => o.isMonth || o.isYear || o.isYears || d.inAllDayBar ? !1 : u.time && u.editableEvents.resize && v.resizable !== !1 && !v.background);
1265
- E(() => u.editableEvents.delete && v.deletable !== !1 && !v.background);
1266
- const I = E(() => {
1267
- var m, h, z, f, T;
1264
+ }), h = S(() => i.editableEvents.drag && v.draggable !== !1 && !v.background), P = S(() => o.isMonth || o.isYear || o.isYears || d.inAllDayBar ? !1 : i.time && i.editableEvents.resize && v.resizable !== !1 && !v.background);
1265
+ S(() => i.editableEvents.delete && v.deletable !== !1 && !v.background);
1266
+ const I = S(() => {
1267
+ var m, f, L, g, _;
1268
1268
  return {
1269
1269
  [`vuecal__event--${v._.id}`]: !0,
1270
1270
  [v.class]: !!v.class,
1271
1271
  "vuecal__event--recurring": !!v.recurring,
1272
1272
  "vuecal__event--background": !!v.background,
1273
- "vuecal__event--all-day": v.allDay || ((m = v._) == null ? void 0 : m.startMinutes) === 0 && ((h = v._) == null ? void 0 : h.duration) === 24 * 60,
1274
- "vuecal__event--multiday": !!((z = v._) != null && z.multiday),
1275
- "vuecal__event--cut-top": !d.inAllDayBar && ((f = v._) == null ? void 0 : f.startMinutes) < u.timeFrom,
1276
- "vuecal__event--cut-bottom": !d.inAllDayBar && ((T = v._) == null ? void 0 : T.endMinutes) > u.timeTo || v._.multiday,
1273
+ "vuecal__event--all-day": v.allDay || ((m = v._) == null ? void 0 : m.startMinutes) === 0 && ((f = v._) == null ? void 0 : f.duration) === 24 * 60,
1274
+ "vuecal__event--multiday": !!((L = v._) != null && L.multiday),
1275
+ "vuecal__event--cut-top": !d.inAllDayBar && ((g = v._) == null ? void 0 : g.startMinutes) < i.timeFrom,
1276
+ "vuecal__event--cut-bottom": !d.inAllDayBar && ((_ = v._) == null ? void 0 : _.endMinutes) > i.timeTo || v._.multiday,
1277
1277
  // Only apply the dragging class on the event copy that is being dragged.
1278
1278
  "vuecal__event--dragging": !v._.draggingGhost && v._.dragging,
1279
1279
  // Only apply the dragging-ghost class on the event original that remains fixed while a copy is being
@@ -1283,147 +1283,147 @@ const lt = (p, t) => {
1283
1283
  // after event deletion (event._.dragging is already false) so the event ghost does not flash in before
1284
1284
  // deletion.
1285
1285
  "vuecal__event--dragging-ghost": v._.draggingGhost,
1286
- "vuecal__event--resizing": c.resizing
1286
+ "vuecal__event--resizing": u.resizing
1287
1287
  };
1288
- }), a = E(() => {
1289
- const m = (o.isDay || o.isDays || o.isWeek) && u.time && !d.inAllDayBar;
1288
+ }), a = S(() => {
1289
+ const m = (o.isDay || o.isDays || o.isWeek) && i.time && !d.inAllDayBar;
1290
1290
  if (!m && !v.backgroundColor && !v.color) return !1;
1291
- const h = {
1291
+ const f = {
1292
1292
  backgroundColor: v.backgroundColor || null,
1293
1293
  color: v.color || null
1294
1294
  };
1295
1295
  if (m) {
1296
- const z = Math.max(u.timeFrom, v._.startMinutes), f = Math.min(u.timeTo, v._.endMinutes) + (v._.duration && !v._.endMinutes ? 24 * 60 : 0), T = Oe(z, u), S = Oe(f, u) - T;
1297
- h.top = `${T}%`, h.height = `${S}%`;
1296
+ const L = Math.max(i.timeFrom, v._.startMinutes), g = Math.min(i.timeTo, v._.endMinutes) + (v._.duration && !v._.endMinutes ? 24 * 60 : 0), _ = Oe(L, i), j = Oe(g, i) - _;
1297
+ f.top = `${_}%`, f.height = `${j}%`;
1298
1298
  }
1299
- return h;
1300
- }), s = E(() => {
1301
- const m = { ...u.eventListeners.event };
1302
- for (const [f, T] of Object.entries(m))
1303
- ["resize-end"].includes(f) || (m[f] = (S) => {
1304
- S.type !== "drop" && T(S.type ? { e: S, event: v } : S);
1299
+ return f;
1300
+ }), l = S(() => {
1301
+ const m = { ...i.eventListeners.event };
1302
+ for (const [g, _] of Object.entries(m))
1303
+ ["resize-end"].includes(g) || (m[g] = (j) => {
1304
+ j.type !== "drop" && _(j.type ? { e: j, event: v } : j);
1305
1305
  });
1306
- const h = { ...m };
1307
- m.touchstart = (f) => {
1308
- var T;
1309
- f.stopPropagation(), e(f), (T = h.touchstart) == null || T.call(h, { e: f, event: v });
1310
- }, m.mousedown = (f) => {
1311
- var T;
1312
- f.stopPropagation(), e(f), (T = h.mousedown) == null || T.call(h, { e: f, event: v });
1306
+ const f = { ...m };
1307
+ m.touchstart = (g) => {
1308
+ var _;
1309
+ g.stopPropagation(), e(g), (_ = f.touchstart) == null || _.call(f, { e: g, event: v });
1310
+ }, m.mousedown = (g) => {
1311
+ var _;
1312
+ g.stopPropagation(), e(g), (_ = f.mousedown) == null || _.call(f, { e: g, event: v });
1313
1313
  };
1314
- let z = null;
1315
- return m.click = (f) => {
1316
- var T;
1317
- (T = h.click) == null || T.call(h, { e: f, event: v }), z ? z = clearTimeout(z) : z = setTimeout(() => {
1318
- var S;
1319
- z = null, (S = h["delayed-click"]) == null || S.call(h, { e: f, event: v });
1314
+ let L = null;
1315
+ return m.click = (g) => {
1316
+ var _;
1317
+ (_ = f.click) == null || _.call(f, { e: g, event: v }), L ? L = clearTimeout(L) : L = setTimeout(() => {
1318
+ var j;
1319
+ L = null, (j = f["delayed-click"]) == null || j.call(f, { e: g, event: v });
1320
1320
  }, 400);
1321
- }, m.dblclick = (f) => {
1322
- h.dblclick ? h.dblclick({ e: f, event: v }) : v.delete(1);
1321
+ }, m.dblclick = (g) => {
1322
+ f.dblclick ? f.dblclick({ e: g, event: v }) : v.delete(1);
1323
1323
  }, m;
1324
1324
  }), e = (m) => {
1325
- var f, T, S;
1326
- const h = ((f = m.touches) == null ? void 0 : f[0]) || m;
1327
- c.fromResizer = h.target.matches(".vuecal__event-resizer, .vuecal__event-resizer *");
1328
- const z = H.value.getBoundingClientRect();
1329
- c.startX = (((T = m.touches) == null ? void 0 : T[0]) || m).clientX - z.left, c.startY = (((S = m.touches) == null ? void 0 : S[0]) || m).clientY - z.top, c.startPercentageX = c.startX * 100 / z.width, c.startPercentageY = c.startY * 100 / z.height, c.cellEl = H.value.closest(".vuecal__cell"), c.resizeStartDate = v.start, A(m.type === "touchstart" ? "touchmove" : "mousemove", k), A(m.type === "touchstart" ? "touchend" : "mouseup", i, { once: !0 }), c.holdTimer = setTimeout(() => {
1330
- var l, X;
1331
- c.holding = !0, (X = (l = s.value).hold) == null || X.call(l, { e: m, event: v });
1325
+ var g, _, j;
1326
+ const f = ((g = m.touches) == null ? void 0 : g[0]) || m;
1327
+ u.fromResizer = f.target.matches(".vuecal__event-resizer, .vuecal__event-resizer *");
1328
+ const L = H.value.getBoundingClientRect();
1329
+ u.startX = (((_ = m.touches) == null ? void 0 : _[0]) || m).clientX - L.left, u.startY = (((j = m.touches) == null ? void 0 : j[0]) || m).clientY - L.top, u.startPercentageX = u.startX * 100 / L.width, u.startPercentageY = u.startY * 100 / L.height, u.cellEl = H.value.closest(".vuecal__cell"), u.resizeStartDate = v.start, G(m.type === "touchstart" ? "touchmove" : "mousemove", k), G(m.type === "touchstart" ? "touchend" : "mouseup", c, { once: !0 }), u.holdTimer = setTimeout(() => {
1330
+ var s, A;
1331
+ u.holding = !0, (A = (s = l.value).hold) == null || A.call(s, { e: m, event: v });
1332
1332
  }, 1e3);
1333
1333
  }, k = async (m) => {
1334
- var z, f, T, S;
1335
- const h = ((z = m.touches) == null ? void 0 : z[0]) || m;
1336
- if (c.fromResizer && !c.resizing && (c.resizing = !0, c.resizingOriginalEvent = { ...v, _: { ...v._ } }, _.isResizingEvent = !0, (T = (f = s.value)["resize-start"]) == null || T.call(f, { e: m, event: v })), c.holdTimer = clearTimeout(c.holdTimer), c.holding = !1, c.cellEl) {
1337
- const { top: l, left: X, width: J, height: ae } = c.cellEl.getBoundingClientRect();
1338
- c.moveX = h.clientX - X, c.moveY = h.clientY - l, c.movePercentageX = c.moveX * 100 / J, c.movePercentageY = c.moveY * 100 / ae;
1334
+ var L, g, _, j;
1335
+ const f = ((L = m.touches) == null ? void 0 : L[0]) || m;
1336
+ if (u.fromResizer && !u.resizing && (u.resizing = !0, u.resizingOriginalEvent = { ...v, _: { ...v._ } }, b.isResizingEvent = !0, (_ = (g = l.value)["resize-start"]) == null || _.call(g, { e: m, event: v })), u.holdTimer = clearTimeout(u.holdTimer), u.holding = !1, u.cellEl) {
1337
+ const { top: s, left: A, width: X, height: ae } = u.cellEl.getBoundingClientRect();
1338
+ u.moveX = f.clientX - A, u.moveY = f.clientY - s, u.movePercentageX = u.moveX * 100 / X, u.movePercentageY = u.moveY * 100 / ae;
1339
1339
  }
1340
- if (c.fromResizer) {
1341
- const { newStart: l, newEnd: X } = V(v);
1342
- let J = !0;
1343
- const { resize: ae } = (S = u.eventListeners) == null ? void 0 : S.event;
1344
- ae && (J = await ae({
1340
+ if (u.fromResizer) {
1341
+ const { newStart: s, newEnd: A } = M(v);
1342
+ let X = !0;
1343
+ const { resize: ae } = (j = i.eventListeners) == null ? void 0 : j.event;
1344
+ ae && (X = await ae({
1345
1345
  e: m,
1346
- event: { ...v, start: l, end: X },
1347
- overlaps: v.getOverlappingEvents({ start: l, end: X })
1348
- })), J !== !1 ? (v.start = l, v.end = X, c.resizingLastAcceptedEvent && (c.resizingLastAcceptedEvent = null)) : ae && (c.resizingLastAcceptedEvent = { ...v, _: { ...v._ } });
1346
+ event: { ...v, start: s, end: A },
1347
+ overlaps: v.getOverlappingEvents({ start: s, end: A })
1348
+ })), X !== !1 ? (v.start = s, v.end = A, u.resizingLastAcceptedEvent && (u.resizingLastAcceptedEvent = null)) : ae && (u.resizingLastAcceptedEvent = { ...v, _: { ...v._ } });
1349
1349
  }
1350
- }, i = async (m) => {
1351
- var h, z;
1352
- if (c.holdTimer = clearTimeout(c.holdTimer), c.holding = !1, c.resizing) {
1353
- const { newStart: f, newEnd: T } = V(v);
1354
- let S = !0;
1355
- const l = s.value["resize-end"];
1356
- l && (S = await l({
1350
+ }, c = async (m) => {
1351
+ var f, L;
1352
+ if (u.holdTimer = clearTimeout(u.holdTimer), u.holding = !1, u.resizing) {
1353
+ const { newStart: g, newEnd: _ } = M(v);
1354
+ let j = !0;
1355
+ const s = l.value["resize-end"];
1356
+ s && (j = await s({
1357
1357
  e: m,
1358
1358
  event: v,
1359
- original: c.resizingOriginalEvent,
1359
+ original: u.resizingOriginalEvent,
1360
1360
  // Original event details before resizing.
1361
- overlaps: v.getOverlappingEvents({ start: f, end: T })
1362
- })), v.start = S === !1 ? (c.resizingLastAcceptedEvent || c.resizingOriginalEvent).start : ((h = c.resizingLastAcceptedEvent) == null ? void 0 : h.start) || f, v.end = S === !1 ? (c.resizingLastAcceptedEvent || c.resizingOriginalEvent).end : ((z = c.resizingLastAcceptedEvent) == null ? void 0 : z.end) || T, v._.duration < 1 && (v.start = c.resizingOriginalEvent.start, v.end = c.resizingOriginalEvent.end), _.isResizingEvent = !1;
1361
+ overlaps: v.getOverlappingEvents({ start: g, end: _ })
1362
+ })), v.start = j === !1 ? (u.resizingLastAcceptedEvent || u.resizingOriginalEvent).start : ((f = u.resizingLastAcceptedEvent) == null ? void 0 : f.start) || g, v.end = j === !1 ? (u.resizingLastAcceptedEvent || u.resizingOriginalEvent).end : ((L = u.resizingLastAcceptedEvent) == null ? void 0 : L.end) || _, v._.duration < 1 && (v.start = u.resizingOriginalEvent.start, v.end = u.resizingOriginalEvent.end), b.isResizingEvent = !1;
1363
1363
  }
1364
- document.removeEventListener(m.type === "touchend" ? "touchmove" : "mousemove", k), c.resizing = !1, c.fromResizer = !1, c.dragging = !1, c.startX = 0, c.startY = 0, c.moveX = 0, c.moveY = 0, c.startPercentageX = 0, c.startPercentageY = 0, c.movePercentageX = 0, c.movePercentageY = 0, c.cellEl = null, c.resizeStartDate = null, c.resizingOriginalEvent = null, c.resizingLastAcceptedEvent = null, c.schedule = null;
1365
- }, V = (m) => {
1366
- const h = new Date(m.start.getFullYear(), m.start.getMonth(), m.start.getDate());
1367
- new Date(h).setDate(h.getDate() + 1);
1368
- let f = Le(c.movePercentageY, u);
1369
- if (f = Math.max(0, Math.min(f, 24 * 60)), u.snapToInterval) {
1370
- const l = f + u.snapToInterval / 2;
1371
- f = l - l % u.snapToInterval;
1364
+ document.removeEventListener(m.type === "touchend" ? "touchmove" : "mousemove", k), u.resizing = !1, u.fromResizer = !1, u.dragging = !1, u.startX = 0, u.startY = 0, u.moveX = 0, u.moveY = 0, u.startPercentageX = 0, u.startPercentageY = 0, u.movePercentageX = 0, u.movePercentageY = 0, u.cellEl = null, u.resizeStartDate = null, u.resizingOriginalEvent = null, u.resizingLastAcceptedEvent = null, u.schedule = null;
1365
+ }, M = (m) => {
1366
+ const f = new Date(m.start.getFullYear(), m.start.getMonth(), m.start.getDate());
1367
+ new Date(f).setDate(f.getDate() + 1);
1368
+ let g = Le(u.movePercentageY, i);
1369
+ if (g = Math.max(0, Math.min(g, 24 * 60)), i.snapToInterval) {
1370
+ const s = g + i.snapToInterval / 2;
1371
+ g = s - s % i.snapToInterval;
1372
1372
  }
1373
- let T = m.start, S = new Date(h.getTime() + f * 6e4);
1374
- return S < c.resizeStartDate && (T = S, S = c.resizeStartDate), { newStart: T, newEnd: S };
1375
- }, F = [], A = (m, h, z) => {
1376
- document.addEventListener(m, h, z), F.push({ event: m, handler: h, options: z });
1373
+ let _ = m.start, j = new Date(f.getTime() + g * 6e4);
1374
+ return j < u.resizeStartDate && (_ = j, j = u.resizeStartDate), { newStart: _, newEnd: j };
1375
+ }, F = [], G = (m, f, L) => {
1376
+ document.addEventListener(m, f, L), F.push({ event: m, handler: f, options: L });
1377
1377
  };
1378
1378
  return Ze(() => v._.register(H.value)), Be(() => {
1379
1379
  v._.unregister();
1380
- for (const { event: m, handler: h, options: z } of F)
1381
- document.removeEventListener(m, h, z);
1382
- }), (m, h) => (C(), L("div", le({ class: "vuecal__event" }, Re(s.value, !0), {
1380
+ for (const { event: m, handler: f, options: L } of F)
1381
+ document.removeEventListener(m, f, L);
1382
+ }), (m, f) => (C(), z("div", le({ class: "vuecal__event" }, Re(l.value, !0), {
1383
1383
  ref_key: "eventEl",
1384
1384
  ref: H,
1385
1385
  class: I.value,
1386
1386
  style: a.value,
1387
- draggable: y.value ? "true" : void 0,
1388
- onDragstart: h[2] || (h[2] = (z) => y.value && b(w).eventDragStart(z, v)),
1389
- onDragend: h[3] || (h[3] = (z) => y.value && b(w).eventDragEnd(z, v))
1387
+ draggable: h.value ? "true" : void 0,
1388
+ onDragstart: f[2] || (f[2] = (L) => h.value && T(w).eventDragStart(L, v)),
1389
+ onDragend: f[3] || (f[3] = (L) => h.value && T(w).eventDragEnd(L, v))
1390
1390
  }), [
1391
1391
  ve("div", Gt, [
1392
- m.$slots["event.all-day"] ? O(m.$slots, "event.all-day", {
1392
+ m.$slots["event.all-day"] ? V(m.$slots, "event.all-day", {
1393
1393
  key: 0,
1394
1394
  event: v
1395
- }) : m.$slots[`event.${b(o).id}`] ? O(m.$slots, `event.${b(o).id}`, {
1395
+ }) : m.$slots[`event.${T(o).id}`] ? V(m.$slots, `event.${T(o).id}`, {
1396
1396
  key: 1,
1397
1397
  event: v
1398
- }) : O(m.$slots, "event", {
1398
+ }) : V(m.$slots, "event", {
1399
1399
  key: 2,
1400
1400
  event: v
1401
1401
  }, () => [
1402
1402
  ve("div", qt, ce(v.title), 1),
1403
- b(u).time && !p.inAllDayBar ? (C(), L("div", Jt, [
1404
- b(o).isMonth ? (C(), L("span", Ut, ",")) : U("", !0),
1405
- ve("span", Zt, ce(v._[`startTimeFormatted${b(u).twelveHour ? 12 : 24}`]), 1),
1406
- b(o).isMonth ? U("", !0) : (C(), L("span", Kt, " - " + ce(v._[`endTimeFormatted${b(u).twelveHour ? 12 : 24}`]), 1))
1403
+ T(i).time && !p.inAllDayBar ? (C(), z("div", Jt, [
1404
+ T(o).isMonth ? (C(), z("span", Ut, ",")) : U("", !0),
1405
+ ve("span", Zt, ce(v._[`startTimeFormatted${T(i).twelveHour ? 12 : 24}`]), 1),
1406
+ T(o).isMonth ? U("", !0) : (C(), z("span", Kt, " - " + ce(v._[`endTimeFormatted${T(i).twelveHour ? 12 : 24}`]), 1))
1407
1407
  ])) : U("", !0),
1408
- p.inAllDayBar ? U("", !0) : (C(), L("div", {
1408
+ p.inAllDayBar ? U("", !0) : (C(), z("div", {
1409
1409
  key: 1,
1410
1410
  class: "vuecal__event-content",
1411
1411
  innerHTML: v.content
1412
1412
  }, null, 8, Qt))
1413
1413
  ])
1414
1414
  ]),
1415
- P.value ? (C(), L("div", {
1415
+ P.value ? (C(), z("div", {
1416
1416
  key: 0,
1417
1417
  class: "vuecal__event-resizer",
1418
- onDragstart: h[0] || (h[0] = et(() => {
1418
+ onDragstart: f[0] || (f[0] = et(() => {
1419
1419
  }, ["prevent", "stop"]))
1420
1420
  }, null, 32)) : U("", !0),
1421
1421
  je(Ge, { name: "vuecal-delete-btn" }, {
1422
1422
  default: W(() => [
1423
- v._.deleting ? (C(), L("div", {
1423
+ v._.deleting ? (C(), z("div", {
1424
1424
  key: 0,
1425
1425
  class: "vuecal__event-delete",
1426
- onClick: h[1] || (h[1] = et((z) => v.delete(3), ["stop"]))
1426
+ onClick: f[1] || (f[1] = et((L) => v.delete(3), ["stop"]))
1427
1427
  }, "Delete")) : U("", !0)
1428
1428
  ]),
1429
1429
  _: 1
@@ -1463,9 +1463,9 @@ const lt = (p, t) => {
1463
1463
  // True when the cell is an all-day cell.
1464
1464
  },
1465
1465
  setup(p) {
1466
- const t = p, u = ze("vuecal"), { view: o, config: w, dateUtils: _, eventsManager: N, dnd: d, touch: H } = u, v = E(() => _.isToday(t.start)), c = ie(null), y = ie([]), P = ie(!1), I = (r) => {
1467
- y.value.push(r.detail), P.value = !0;
1468
- }, a = () => setTimeout(() => P.value = !1, 300), s = Te({
1466
+ const t = p, i = ze("vuecal"), { view: o, config: w, dateUtils: b, eventsManager: N, dnd: d, touch: H } = i, v = S(() => b.isToday(t.start)), u = ie(null), h = ie([]), P = ie(!1), I = (r) => {
1467
+ h.value.push(r.detail), P.value = !0;
1468
+ }, a = () => setTimeout(() => P.value = !1, 300), l = Te({
1469
1469
  dragging: !1,
1470
1470
  holding: !1,
1471
1471
  // When the cell is clicked and hold for a certain amount of time.
@@ -1486,273 +1486,273 @@ const lt = (p, t) => {
1486
1486
  movePercentageX: 0,
1487
1487
  movePercentageY: 0,
1488
1488
  schedule: null
1489
- }), e = ie(!1), k = ie({ cellOverlaps: {}, longestStreak: 0 }), i = E(() => {
1490
- let r = Math.min(s.startPercentageY, s.movePercentageY), Y = Math.max(s.startPercentageY, s.movePercentageY), j = Le(r, w), M = Le(Y, w);
1491
- return w.snapToInterval && (j = _.snapToInterval(j, w.snapToInterval), M = _.snapToInterval(M, w.snapToInterval), r = Oe(j, w), Y = Oe(M, w)), {
1489
+ }), e = ie(!1), k = ie({ cellOverlaps: {}, longestStreak: 0 }), c = S(() => {
1490
+ let r = Math.min(l.startPercentageY, l.movePercentageY), E = Math.max(l.startPercentageY, l.movePercentageY), O = Le(r, w), Y = Le(E, w);
1491
+ return w.snapToInterval && (O = b.snapToInterval(O, w.snapToInterval), Y = b.snapToInterval(Y, w.snapToInterval), r = Oe(O, w), E = Oe(Y, w)), {
1492
1492
  style: {
1493
1493
  top: `${r}%`,
1494
- height: `${Math.abs(Y - r)}%`
1494
+ height: `${Math.abs(E - r)}%`
1495
1495
  },
1496
- startMinutes: j,
1497
- endMinutes: M,
1498
- start: _.formatMinutes(j),
1499
- end: _.formatMinutes(M),
1500
- ...s.schedule ? { schedule: s.schedule } : {}
1496
+ startMinutes: O,
1497
+ endMinutes: Y,
1498
+ start: b.formatMinutes(O),
1499
+ end: b.formatMinutes(Y),
1500
+ ...l.schedule ? { schedule: l.schedule } : {}
1501
1501
  };
1502
- }), V = E(() => {
1503
- const r = w.editableEvents.create && (s.dragging || e.value), Y = w.eventCreateMinDrag && s.thresholdPassed || !w.eventCreateMinDrag;
1504
- return r && Y;
1505
- }), F = E(() => {
1502
+ }), M = S(() => {
1503
+ const r = w.editableEvents.create && (l.dragging || e.value), E = w.eventCreateMinDrag && l.thresholdPassed || !w.eventCreateMinDrag;
1504
+ return r && E;
1505
+ }), F = S(() => {
1506
1506
  var re;
1507
- const r = /* @__PURE__ */ new Date(), Y = o.start.getFullYear(), j = o.start.getMonth(), M = t.start.getFullYear(), B = t.start.getMonth();
1507
+ const r = /* @__PURE__ */ new Date(), E = o.start.getFullYear(), O = o.start.getMonth(), Y = t.start.getFullYear(), B = t.start.getMonth();
1508
1508
  return {
1509
1509
  [`vuecal__cell--${Xe[t.start.getDay()]}`]: o.isDay || o.isDays || o.isWeek || o.isMonth,
1510
1510
  [`vuecal__cell--${Et[B]}`]: o.isYear,
1511
- [`vuecal__cell--${M}`]: o.isYears,
1511
+ [`vuecal__cell--${Y}`]: o.isYears,
1512
1512
  "vuecal__cell--today": v.value,
1513
- "vuecal__cell--current-month": o.isYear && M === r.getFullYear() && B === r.getMonth(),
1514
- "vuecal__cell--current-year": o.isYears && M === r.getFullYear(),
1515
- "vuecal__cell--out-of-range": o.isMonth && (M !== Y || B !== j),
1516
- "vuecal__cell--before-min": ae.value && X.value,
1517
- "vuecal__cell--after-max": ae.value && J.value,
1513
+ "vuecal__cell--current-month": o.isYear && Y === r.getFullYear() && B === r.getMonth(),
1514
+ "vuecal__cell--current-year": o.isYears && Y === r.getFullYear(),
1515
+ "vuecal__cell--out-of-range": o.isMonth && (Y !== E || B !== O),
1516
+ "vuecal__cell--before-min": ae.value && A.value,
1517
+ "vuecal__cell--after-max": ae.value && X.value,
1518
1518
  "vuecal__cell--disabled": ae.value,
1519
1519
  "vuecal__cell--selected": o.selectedDate && o.selectedDate.getTime() >= t.start.getTime() && o.selectedDate.getTime() <= t.end.getTime(),
1520
1520
  "vuecal__cell--has-schedules": (re = w.schedules) == null ? void 0 : re.length,
1521
- "vuecal__cell--dragging": s.dragging,
1521
+ "vuecal__cell--dragging": l.dragging,
1522
1522
  "vuecal__cell--has-events": m.value.length
1523
1523
  };
1524
1524
  });
1525
- E(() => _.formatDate(t.start));
1526
- const A = E(() => {
1525
+ S(() => b.formatDate(t.start));
1526
+ const G = S(() => {
1527
1527
  switch (o.id) {
1528
1528
  case "day":
1529
1529
  return "";
1530
1530
  case "days":
1531
- return w.availableViews.days.rows > 1 && _.formatDate(t.start, "D"), "";
1531
+ return w.availableViews.days.rows > 1 && b.formatDate(t.start, "D"), "";
1532
1532
  case "week":
1533
1533
  return "";
1534
1534
  case "month":
1535
- return _.formatDate(t.start, "D");
1535
+ return b.formatDate(t.start, "D");
1536
1536
  case "year":
1537
- return _.formatDate(t.start, w.xs ? "MMM" : "MMMM");
1537
+ return b.formatDate(t.start, w.xs ? "MMM" : "MMMM");
1538
1538
  case "years":
1539
- return _.formatDate(t.start, "YYYY");
1539
+ return b.formatDate(t.start, "YYYY");
1540
1540
  }
1541
- }), m = E(() => w.datePicker ? [] : N.getEventsInRange(
1541
+ }), m = S(() => w.datePicker ? [] : N.getEventsInRange(
1542
1542
  t.start,
1543
1543
  t.end,
1544
- { excludeIds: y.value, ...w.allDayEvents ? { allDay: t.allDay } : {} }
1545
- )), h = E(() => m.value.filter((r) => !r.background)), z = E(() => {
1544
+ { excludeIds: h.value, ...w.allDayEvents ? { allDay: t.allDay } : {} }
1545
+ )), f = S(() => m.value.filter((r) => !r.background)), L = S(() => {
1546
1546
  var r;
1547
- return (r = w.schedules) == null ? void 0 : r.reduce((Y, j) => (Y[j.id] = m.value.filter((M) => M.schedule === j.id), Y), {});
1548
- }), f = E(() => {
1547
+ return (r = w.schedules) == null ? void 0 : r.reduce((E, O) => (E[O.id] = m.value.filter((Y) => Y.schedule === O.id), E), {});
1548
+ }), g = S(() => {
1549
1549
  if (o.isMonth || o.isYear || o.isYears || t.allDay) return {};
1550
- const r = typeof document < "u" && document.documentElement.getAttribute("dir") === "rtl", Y = {};
1551
- for (const j of m.value) {
1552
- const M = j._.id, { maxConcurrent: B = 1, position: q = 0 } = k.value.cellOverlaps[M] || {}, re = r ? "right" : "left";
1553
- Y[M] = { [re]: `${100 / B * q}%` }, w.stackEvents ? Y[M].width = `${100 / B + (q === B - 1 ? 0 : 15)}%` : Y[M].width = `${100 / B}%`;
1550
+ const r = typeof document < "u" && document.documentElement.getAttribute("dir") === "rtl", E = {};
1551
+ for (const O of m.value) {
1552
+ const Y = O._.id, { maxConcurrent: B = 1, position: J = 0 } = k.value.cellOverlaps[Y] || {}, re = r ? "right" : "left";
1553
+ E[Y] = { [re]: `${100 / B * J}%` }, w.stackEvents ? E[Y].width = `${100 / B + (J === B - 1 ? 0 : 15)}%` : E[Y].width = `${100 / B}%`;
1554
1554
  }
1555
- return Y;
1556
- }), T = E(() => {
1555
+ return E;
1556
+ }), _ = S(() => {
1557
1557
  const r = {};
1558
- for (const Y of m.value) {
1559
- const j = Y._.id, { maxConcurrent: M = 1, position: B = 0 } = k.value.cellOverlaps[j] || {};
1560
- r[j] = `vuecal__event--stack-${B + 1}-${M}`;
1558
+ for (const E of m.value) {
1559
+ const O = E._.id, { maxConcurrent: Y = 1, position: B = 0 } = k.value.cellOverlaps[O] || {};
1560
+ r[O] = `vuecal__event--stack-${B + 1}-${Y}`;
1561
1561
  }
1562
1562
  return r;
1563
- }), S = E(() => w.showCellEventCount && h.value.length), l = E(() => {
1564
- var j;
1563
+ }), j = S(() => w.showCellEventCount && f.value.length), s = S(() => {
1564
+ var O;
1565
1565
  if (!w.specialHours || o.isMonth || o.isYear || o.isYears || t.allDay) return;
1566
1566
  const r = Xe[t.start.getDay()];
1567
- let Y = (j = w.specialHours) == null ? void 0 : j[r];
1568
- if (Y)
1569
- return Array.isArray(Y) || (Y = [Y]), Y.map((M) => {
1570
- let { from: B, to: q, class: re, label: we } = M;
1571
- if (isNaN(B) || isNaN(q) || w.timeFrom >= q || w.timeTo <= B) return;
1572
- B = Math.max(w.timeFrom, B), q = Math.min(w.timeTo, q);
1573
- const g = Oe(B, w), R = Oe(q, w) - g;
1567
+ let E = (O = w.specialHours) == null ? void 0 : O[r];
1568
+ if (E)
1569
+ return Array.isArray(E) || (E = [E]), E.map((Y) => {
1570
+ let { from: B, to: J, class: re, label: we } = Y;
1571
+ if (isNaN(B) || isNaN(J) || w.timeFrom >= J || w.timeTo <= B) return;
1572
+ B = Math.max(w.timeFrom, B), J = Math.min(w.timeTo, J);
1573
+ const y = Oe(B, w), R = Oe(J, w) - y;
1574
1574
  return {
1575
- style: { top: `${g}%`, height: `${R}%` },
1575
+ style: { top: `${y}%`, height: `${R}%` },
1576
1576
  label: we,
1577
1577
  class: re
1578
1578
  };
1579
- }).filter((M) => !!M);
1580
- }), X = E(() => w.minTimestamp !== null && w.minTimestamp > t.end.getTime()), J = E(() => w.maxTimestamp && w.maxTimestamp < t.start.getTime()), ae = E(() => {
1581
- const { disableDays: r } = w, Y = o.isYear || o.isYears;
1582
- return r.length && r.includes(_.formatDate(t.start)) && !Y ? !0 : X.value || J.value;
1579
+ }).filter((Y) => !!Y);
1580
+ }), A = S(() => w.minTimestamp !== null && w.minTimestamp > t.end.getTime()), X = S(() => w.maxTimestamp && w.maxTimestamp < t.start.getTime()), ae = S(() => {
1581
+ const { disableDays: r } = w, E = o.isYear || o.isYears;
1582
+ return r.length && r.includes(b.formatDate(t.start)) && !E ? !0 : A.value || X.value;
1583
1583
  }), se = Te({
1584
- show: E(() => {
1585
- if (!(!o.isDay && !o.isDays && !o.isWeek) && !(!v.value || !w.time || t.allDay) && !(w.timeFrom > _.dateToMinutes(o.now)) && !(_.dateToMinutes(o.now) > w.timeTo))
1584
+ show: S(() => {
1585
+ if (!(!o.isDay && !o.isDays && !o.isWeek) && !(!v.value || !w.time || t.allDay) && !(w.timeFrom > b.dateToMinutes(o.now)) && !(b.dateToMinutes(o.now) > w.timeTo))
1586
1586
  return !0;
1587
1587
  }),
1588
- nowInMinutes: E(() => _.dateToMinutes(o.now)),
1589
- todaysTimePosition: E(() => Oe(se.nowInMinutes, w)),
1590
- style: E(() => `top: ${se.todaysTimePosition}%`),
1591
- currentTime: E(() => _.formatTime(o.now))
1592
- }), de = E(() => {
1588
+ nowInMinutes: S(() => b.dateToMinutes(o.now)),
1589
+ todaysTimePosition: S(() => Oe(se.nowInMinutes, w)),
1590
+ style: S(() => `top: ${se.todaysTimePosition}%`),
1591
+ currentTime: S(() => b.formatTime(o.now))
1592
+ }), de = S(() => {
1593
1593
  if (ae.value) return {};
1594
1594
  const r = { ...w.eventListeners.cell };
1595
- for (const [M, B] of Object.entries(r))
1596
- r[M] = (q) => {
1597
- var re, we, g;
1598
- (g = (we = q.target || ((re = q.e) == null ? void 0 : re.target)).closest) != null && g.call(we, ".vuecal__event") || B(q.type ? { e: q, cell: Z.value, cursor: ee.value } : q);
1595
+ for (const [Y, B] of Object.entries(r))
1596
+ r[Y] = (J) => {
1597
+ var re, we, y;
1598
+ (y = (we = J.target || ((re = J.e) == null ? void 0 : re.target)).closest) != null && y.call(we, ".vuecal__event") || B(J.type ? { e: J, cell: Z.value, cursor: ee.value } : J);
1599
1599
  };
1600
- const Y = { ...r };
1601
- let j = null;
1602
- return r.click = (M) => {
1603
- var q;
1600
+ const E = { ...r };
1601
+ let O = null;
1602
+ return r.click = (Y) => {
1603
+ var J;
1604
1604
  oe();
1605
- const B = he(M);
1606
- (q = Y.click) == null || q.call(Y, { e: M, cell: Z.value, cursor: B }), j ? j = clearTimeout(j) : j = setTimeout(() => {
1605
+ const B = he(Y);
1606
+ (J = E.click) == null || J.call(E, { e: Y, cell: Z.value, cursor: B }), O ? O = clearTimeout(O) : O = setTimeout(() => {
1607
1607
  var re;
1608
- j = null, (re = Y["delayed-click"]) == null || re.call(Y, { e: M, cell: Z.value, cursor: B });
1608
+ O = null, (re = E["delayed-click"]) == null || re.call(E, { e: Y, cell: Z.value, cursor: B });
1609
1609
  }, 400);
1610
- }, (w.time && o.isDay || o.isDays || o.isWeek) && (r.touchstart = (M) => {
1610
+ }, (w.time && o.isDay || o.isDays || o.isWeek) && (r.touchstart = (Y) => {
1611
1611
  var B;
1612
- n(M.e || M), (B = Y.touchstart) == null || B.call(Y, { e: M, cell: Z.value, cursor: ee.value });
1613
- }, r.mousedown = (M) => {
1612
+ n(Y.e || Y), (B = E.touchstart) == null || B.call(E, { e: Y, cell: Z.value, cursor: ee.value });
1613
+ }, r.mousedown = (Y) => {
1614
1614
  var B;
1615
- n(M.e || M), (B = Y.mousedown) == null || B.call(Y, { e: M, cell: Z.value, cursor: ee.value });
1616
- }), Y.dblclick && (r.dblclick = (M) => {
1615
+ n(Y.e || Y), (B = E.mousedown) == null || B.call(E, { e: Y, cell: Z.value, cursor: ee.value });
1616
+ }), E.dblclick && (r.dblclick = (Y) => {
1617
1617
  var B;
1618
- (B = Y.dblclick) == null || B.call(Y, { e: M, cell: Z.value, cursor: he(M) });
1619
- }), w.editableEvents.drag && (r.dragenter = (M) => d.cellDragEnter(M, Z.value), r.dragover = (M) => {
1620
- M.preventDefault(), d.cellDragOver(M, Z.value);
1621
- }, r.dragleave = (M) => d.cellDragLeave(M, Z.value), r.drop = (M) => d.cellDragDrop(M, Z.value, t.allDay)), r;
1622
- }), Z = E(() => ({
1618
+ (B = E.dblclick) == null || B.call(E, { e: Y, cell: Z.value, cursor: he(Y) });
1619
+ }), w.editableEvents.drag && (r.dragenter = (Y) => d.cellDragEnter(Y, Z.value), r.dragover = (Y) => {
1620
+ Y.preventDefault(), d.cellDragOver(Y, Z.value);
1621
+ }, r.dragleave = (Y) => d.cellDragLeave(Y, Z.value), r.drop = (Y) => d.cellDragDrop(Y, Z.value, t.allDay)), r;
1622
+ }), Z = S(() => ({
1623
1623
  start: t.start,
1624
1624
  end: t.end,
1625
1625
  events: m,
1626
- ...s.schedule ? { schedule: s.schedule } : {},
1626
+ ...l.schedule ? { schedule: l.schedule } : {},
1627
1627
  goNarrower: () => o.narrower(),
1628
1628
  goBroader: () => o.broader(),
1629
1629
  broader: o.broaderView,
1630
1630
  narrower: o.narrowerView
1631
1631
  })), he = (r) => {
1632
- var q;
1633
- const Y = (((q = r.touches) == null ? void 0 : q[0]) || r).clientY, { top: j } = c.value.getBoundingClientRect(), M = Ke(Y - j, c.value), B = new Date(t.start);
1634
- return B.setMinutes(Le(M, w)), { y: M, date: B };
1635
- }, ee = E(() => {
1636
- const r = Le(s.movePercentageY || s.startPercentageY, w), Y = new Date(t.start);
1637
- return Y.setMinutes(r), {
1638
- x: s.movePercentageX || s.startPercentageX,
1639
- y: s.movePercentageY || s.startPercentageY,
1640
- date: Y
1632
+ var J;
1633
+ const E = (((J = r.touches) == null ? void 0 : J[0]) || r).clientY, { top: O } = u.value.getBoundingClientRect(), Y = Ke(E - O, u.value), B = new Date(t.start);
1634
+ return B.setMinutes(Le(Y, w)), { y: Y, date: B };
1635
+ }, ee = S(() => {
1636
+ const r = Le(l.movePercentageY || l.startPercentageY, w), E = new Date(t.start);
1637
+ return E.setMinutes(r), {
1638
+ x: l.movePercentageX || l.startPercentageX,
1639
+ y: l.movePercentageY || l.startPercentageY,
1640
+ date: E
1641
1641
  };
1642
1642
  }), oe = () => {
1643
1643
  o.updateSelectedDate(t.start), w.clickToNavigate && ((o.isMonth || o.isDays || o.isWeek) && w.availableViews.day ? o.switch("day") : o.isYear && w.availableViews.month ? o.switch("month") : o.isYears && w.availableViews.year && o.switch("year")), o.updateViewDate(t.start);
1644
1644
  }, n = (r) => {
1645
- var j, M;
1646
- s.schedule = ~~r.target.dataset.schedule;
1647
- const Y = c.value.getBoundingClientRect();
1648
- s.startX = (((j = r.touches) == null ? void 0 : j[0]) || r).clientX - Y.left, s.startY = (((M = r.touches) == null ? void 0 : M[0]) || r).clientY - Y.top, s.startPercentageX = s.startX * 100 / Y.width, s.startPercentageY = s.startY * 100 / Y.height, s.thresholdPassed = !1, document.addEventListener(r.type === "touchstart" ? "touchmove" : "mousemove", $), document.addEventListener(r.type === "touchstart" ? "touchend" : "mouseup", D, { once: !0 }), s.holdTimer = setTimeout(() => {
1649
- var B, q;
1650
- s.holding = !0, (q = (B = de.value).hold) == null || q.call(B, { e: r, cell: Z.value, cursor: ee.value });
1645
+ var O, Y;
1646
+ l.schedule = ~~r.target.dataset.schedule;
1647
+ const E = u.value.getBoundingClientRect();
1648
+ l.startX = (((O = r.touches) == null ? void 0 : O[0]) || r).clientX - E.left, l.startY = (((Y = r.touches) == null ? void 0 : Y[0]) || r).clientY - E.top, l.startPercentageX = l.startX * 100 / E.width, l.startPercentageY = l.startY * 100 / E.height, l.thresholdPassed = !1, document.addEventListener(r.type === "touchstart" ? "touchmove" : "mousemove", $), document.addEventListener(r.type === "touchstart" ? "touchend" : "mouseup", D, { once: !0 }), l.holdTimer = setTimeout(() => {
1649
+ var B, J;
1650
+ l.holding = !0, (J = (B = de.value).hold) == null || J.call(B, { e: r, cell: Z.value, cursor: ee.value });
1651
1651
  }, 1e3);
1652
1652
  }, $ = (r) => {
1653
- var j, M, B, q, re, we;
1654
- s.dragging || (H.isDraggingCell = !0, (M = (j = de.value)["drag-start"]) == null || M.call(j, { e: r, cell: Z.value, cursor: ee.value })), s.dragging = !0, s.holdTimer = clearTimeout(s.holdTimer), s.holding = !1;
1655
- const Y = c.value.getBoundingClientRect();
1656
- s.moveX = (((B = r.touches) == null ? void 0 : B[0]) || r).clientX - Y.left, s.moveY = (((q = r.touches) == null ? void 0 : q[0]) || r).clientY - Y.top, s.movePercentageX = s.moveX * 100 / Y.width, s.movePercentageY = s.moveY * 100 / Y.height, w.eventCreateMinDrag && Math.abs(s.startY - s.moveY) > w.eventCreateMinDrag && (s.thresholdPassed = !0), (we = (re = de.value).drag) == null || we.call(re, { e: r, cell: Z.value, cursor: ee.value });
1653
+ var O, Y, B, J, re, we;
1654
+ l.dragging || (H.isDraggingCell = !0, (Y = (O = de.value)["drag-start"]) == null || Y.call(O, { e: r, cell: Z.value, cursor: ee.value })), l.dragging = !0, l.holdTimer = clearTimeout(l.holdTimer), l.holding = !1;
1655
+ const E = u.value.getBoundingClientRect();
1656
+ l.moveX = (((B = r.touches) == null ? void 0 : B[0]) || r).clientX - E.left, l.moveY = (((J = r.touches) == null ? void 0 : J[0]) || r).clientY - E.top, l.movePercentageX = l.moveX * 100 / E.width, l.movePercentageY = l.moveY * 100 / E.height, w.eventCreateMinDrag && Math.abs(l.startY - l.moveY) > w.eventCreateMinDrag && (l.thresholdPassed = !0), (we = (re = de.value).drag) == null || we.call(re, { e: r, cell: Z.value, cursor: ee.value });
1657
1657
  }, D = async (r) => {
1658
- var Y, j;
1659
- document.removeEventListener(r.type === "touchend" ? "touchmove" : "mousemove", $, { passive: !1 }), s.dragging && ((j = (Y = de.value)["drag-end"]) == null || j.call(Y, { e: r, cell: Z.value, cursor: ee.value }), H.isDraggingCell = !1, w.editableEvents.create && (e.value = !0, await G(r), e.value = !1)), s.holdTimer = clearTimeout(s.holdTimer), s.holding = !1, s.dragging = !1, s.startX = 0, s.startY = 0, s.moveX = 0, s.moveY = 0, s.startPercentageX = 0, s.startPercentageY = 0, s.movePercentageX = 0, s.movePercentageY = 0, s.thresholdPassed = !1, s.schedule = null;
1660
- }, G = async (r) => {
1661
- if (!V.value) return;
1662
- let { start: Y, end: j, startMinutes: M, endMinutes: B } = i.value;
1663
- Y = new Date(t.start), Y.setMinutes(M), j = new Date(t.start), j.setMinutes(B);
1664
- let q = { ...i.value, start: Y, end: j };
1658
+ var E, O;
1659
+ document.removeEventListener(r.type === "touchend" ? "touchmove" : "mousemove", $, { passive: !1 }), l.dragging && ((O = (E = de.value)["drag-end"]) == null || O.call(E, { e: r, cell: Z.value, cursor: ee.value }), H.isDraggingCell = !1, w.editableEvents.create && (e.value = !0, await q(r), e.value = !1)), l.holdTimer = clearTimeout(l.holdTimer), l.holding = !1, l.dragging = !1, l.startX = 0, l.startY = 0, l.moveX = 0, l.moveY = 0, l.startPercentageX = 0, l.startPercentageY = 0, l.movePercentageX = 0, l.movePercentageY = 0, l.thresholdPassed = !1, l.schedule = null;
1660
+ }, q = async (r) => {
1661
+ if (!M.value) return;
1662
+ let { start: E, end: O, startMinutes: Y, endMinutes: B } = c.value;
1663
+ E = new Date(t.start), E.setMinutes(Y), O = new Date(t.start), O.setMinutes(B);
1664
+ let J = { ...c.value, start: E, end: O };
1665
1665
  const { create: re } = w.eventListeners.event;
1666
1666
  if (typeof re == "function") {
1667
- const we = q;
1668
- q = await new Promise((g) => re({ e: r, event: q, cell: Z.value, resolve: g, cursor: ee.value })), q && typeof q == "object" && o.createEvent(q), q && typeof q == "boolean" && o.createEvent(we);
1669
- } else o.createEvent(q);
1667
+ const we = J;
1668
+ J = await new Promise((y) => re({ e: r, event: J, cell: Z.value, resolve: y, cursor: ee.value })), J && typeof J == "object" && o.createEvent(J), J && typeof J == "boolean" && o.createEvent(we);
1669
+ } else o.createEvent(J);
1670
1670
  }, K = () => {
1671
1671
  var r;
1672
- for (const Y of Object.keys(de.value))
1673
- (r = c.value) == null || r.removeEventListener(Y, de.value[Y]);
1672
+ for (const E of Object.keys(de.value))
1673
+ (r = u.value) == null || r.removeEventListener(E, de.value[E]);
1674
1674
  }, De = () => {
1675
- k.value = N.getCellOverlappingEvents(t.start, t.end);
1675
+ k.value = N.getCellOverlappingEvents(t.start, t.end, t.allDay);
1676
1676
  };
1677
1677
  return me(
1678
1678
  // Watch event IDs and start/end dates (only) to detect event resizing/dnd.
1679
- () => !o.isYears && !o.isYear && h.value.map((r) => `${r._.id}${r.start.getTime()}${r.end.getTime()}`).join(),
1679
+ () => !o.isYears && !o.isYear && f.value.map((r) => `${r._.id}${r.start.getTime()}${r.end.getTime()}`).join(),
1680
1680
  async () => {
1681
1681
  await Je(), De();
1682
1682
  },
1683
1683
  { immediate: !0, flush: "post" }
1684
1684
  // Use flush: 'post' to prevent infinite updates.
1685
1685
  ), Be(async () => {
1686
- for (const r of y.value) N.deleteEvent(r, 3);
1686
+ for (const r of h.value) N.deleteEvent(r, 3);
1687
1687
  K(), await Je();
1688
- }), (r, Y) => (C(), L("div", le({
1688
+ }), (r, E) => (C(), z("div", le({
1689
1689
  class: ["vuecal__cell", F.value],
1690
1690
  ref_key: "cellEl",
1691
- ref: c
1691
+ ref: u
1692
1692
  }, Re(de.value, !0)), [
1693
- r.$slots.cell ? O(r.$slots, "cell", {
1693
+ r.$slots.cell ? V(r.$slots, "cell", {
1694
1694
  key: 0,
1695
1695
  cell: Z.value
1696
1696
  }) : U("", !0),
1697
- l.value ? (C(!0), L(ue, { key: 1 }, pe(l.value, (j, M) => (C(), L("div", {
1698
- class: ye(["vuecal__special-hours", j.class]),
1699
- style: _e(j.style),
1700
- innerHTML: j.label || ""
1697
+ s.value ? (C(!0), z(ue, { key: 1 }, pe(s.value, (O, Y) => (C(), z("div", {
1698
+ class: ye(["vuecal__special-hours", O.class]),
1699
+ style: _e(O.style),
1700
+ innerHTML: O.label || ""
1701
1701
  }, null, 14, xt))), 256)) : U("", !0),
1702
- !r.$slots.cell && b(w).schedules ? (C(!0), L(ue, { key: 2 }, pe(b(w).schedules, (j) => (C(), L("div", {
1703
- class: ye(["vuecal__schedule vuecal__schedule--cell", j.class]),
1704
- key: j.id,
1705
- style: _e(j.style || null),
1706
- "data-schedule": j.id
1702
+ !r.$slots.cell && T(w).schedules ? (C(!0), z(ue, { key: 2 }, pe(T(w).schedules, (O) => (C(), z("div", {
1703
+ class: ye(["vuecal__schedule vuecal__schedule--cell", O.class]),
1704
+ key: O.id,
1705
+ style: _e(O.style || null),
1706
+ "data-schedule": O.id
1707
1707
  }, [
1708
- r.$slots["cell-events"] ? O(r.$slots, "cell-events", {
1708
+ r.$slots["cell-events"] ? V(r.$slots, "cell-events", {
1709
1709
  key: 0,
1710
1710
  cell: Z.value
1711
1711
  }) : U("", !0),
1712
- A.value || r.$slots["cell-date"] ? (C(), L("div", ta, [
1713
- O(r.$slots, "cell-date", { cell: Z.value }, () => [
1714
- Ue(ce(A.value), 1)
1712
+ G.value || r.$slots["cell-date"] ? (C(), z("div", ta, [
1713
+ V(r.$slots, "cell-date", { cell: Z.value }, () => [
1714
+ Ue(ce(G.value), 1)
1715
1715
  ])
1716
1716
  ])) : U("", !0),
1717
- r.$slots["cell-content"] ? (C(), L("div", aa, [
1718
- O(r.$slots, "cell-content", { cell: Z.value })
1717
+ r.$slots["cell-content"] ? (C(), z("div", aa, [
1718
+ V(r.$slots, "cell-content", { cell: Z.value })
1719
1719
  ])) : U("", !0),
1720
- r.$slots["cell-events"] && m.value.length ? (C(), L("div", na, [
1721
- O(r.$slots, "cell-events", { cell: Z.value })
1720
+ r.$slots["cell-events"] && m.value.length ? (C(), z("div", na, [
1721
+ V(r.$slots, "cell-events", { cell: Z.value })
1722
1722
  ])) : m.value.length || P.value ? (C(), Se(tt, {
1723
1723
  key: 4,
1724
1724
  class: "vuecal__cell-events",
1725
1725
  name: "vuecal-event-delete",
1726
- onBeforeLeave: Y[0] || (Y[0] = (M) => P.value = !0),
1726
+ onBeforeLeave: E[0] || (E[0] = (Y) => P.value = !0),
1727
1727
  onAfterLeave: a,
1728
1728
  tag: "div"
1729
1729
  }, {
1730
1730
  default: W(() => [
1731
- (C(!0), L(ue, null, pe(z.value[j.id], (M) => (C(), Se(st, {
1732
- key: M._.id,
1733
- event: M,
1731
+ (C(!0), z(ue, null, pe(L.value[O.id], (Y) => (C(), Se(st, {
1732
+ key: Y._.id,
1733
+ event: Y,
1734
1734
  onEventDeleted: I,
1735
1735
  "in-all-day-bar": t.allDay,
1736
- style: _e(f.value[M._.id])
1736
+ style: _e(g.value[Y._.id])
1737
1737
  }, Ce({ _: 2 }, [
1738
1738
  r.$slots["event.all-day"] && t.allDay ? {
1739
1739
  name: "event.all-day",
1740
1740
  fn: W((B) => [
1741
- O(r.$slots, "event.all-day", le({ ref_for: !0 }, B))
1741
+ V(r.$slots, "event.all-day", le({ ref_for: !0 }, B))
1742
1742
  ]),
1743
1743
  key: "0"
1744
1744
  } : void 0,
1745
- r.$slots[`event.${b(o).id}`] ? {
1746
- name: `event.${b(o).id}`,
1745
+ r.$slots[`event.${T(o).id}`] ? {
1746
+ name: `event.${T(o).id}`,
1747
1747
  fn: W((B) => [
1748
- O(r.$slots, `event.${b(o).id}`, le({ ref_for: !0 }, B))
1748
+ V(r.$slots, `event.${T(o).id}`, le({ ref_for: !0 }, B))
1749
1749
  ]),
1750
1750
  key: "1"
1751
1751
  } : void 0,
1752
1752
  r.$slots.event ? {
1753
1753
  name: "event",
1754
1754
  fn: W((B) => [
1755
- O(r.$slots, "event", le({ ref_for: !0 }, B))
1755
+ V(r.$slots, "event", le({ ref_for: !0 }, B))
1756
1756
  ]),
1757
1757
  key: "2"
1758
1758
  } : void 0
@@ -1760,62 +1760,62 @@ const lt = (p, t) => {
1760
1760
  ]),
1761
1761
  _: 2
1762
1762
  }, 1024)) : U("", !0),
1763
- V.value && s.schedule === j.id && !t.allDay ? (C(), L("div", {
1763
+ M.value && l.schedule === O.id && !t.allDay ? (C(), z("div", {
1764
1764
  key: 5,
1765
1765
  class: "vuecal__event-placeholder",
1766
- style: _e(i.value.style)
1767
- }, ce(i.value.start) + " - " + ce(i.value.end), 5)) : U("", !0)
1766
+ style: _e(c.value.style)
1767
+ }, ce(c.value.start) + " - " + ce(c.value.end), 5)) : U("", !0)
1768
1768
  ], 14, ea))), 128)) : U("", !0),
1769
- !r.$slots.cell && !b(w).schedules ? (C(), L(ue, { key: 3 }, [
1770
- r.$slots["cell-events"] ? O(r.$slots, "cell-events", {
1769
+ !r.$slots.cell && !T(w).schedules ? (C(), z(ue, { key: 3 }, [
1770
+ r.$slots["cell-events"] ? V(r.$slots, "cell-events", {
1771
1771
  key: 0,
1772
1772
  cell: Z.value
1773
1773
  }) : U("", !0),
1774
- A.value || r.$slots["cell-date"] ? (C(), L("div", sa, [
1775
- O(r.$slots, "cell-date", { cell: Z.value }, () => [
1776
- Ue(ce(A.value), 1)
1774
+ G.value || r.$slots["cell-date"] ? (C(), z("div", sa, [
1775
+ V(r.$slots, "cell-date", { cell: Z.value }, () => [
1776
+ Ue(ce(G.value), 1)
1777
1777
  ])
1778
1778
  ])) : U("", !0),
1779
- r.$slots["cell-content"] ? (C(), L("div", la, [
1780
- O(r.$slots, "cell-content", { cell: Z.value })
1779
+ r.$slots["cell-content"] ? (C(), z("div", la, [
1780
+ V(r.$slots, "cell-content", { cell: Z.value })
1781
1781
  ])) : U("", !0),
1782
- r.$slots["cell-events"] && m.value.length ? (C(), L("div", ra, [
1783
- O(r.$slots, "cell-events", { cell: Z.value })
1784
- ])) : !(b(o).isMonth && !b(w).eventsOnMonthView) && !b(o).isYear && !b(o).isYears && (m.value.length || P.value) ? (C(), Se(tt, {
1782
+ r.$slots["cell-events"] && m.value.length ? (C(), z("div", ra, [
1783
+ V(r.$slots, "cell-events", { cell: Z.value })
1784
+ ])) : !(T(o).isMonth && !T(w).eventsOnMonthView) && !T(o).isYear && !T(o).isYears && (m.value.length || P.value) ? (C(), Se(tt, {
1785
1785
  key: 4,
1786
1786
  class: "vuecal__cell-events",
1787
1787
  name: "vuecal-event-delete",
1788
- onBeforeLeave: Y[1] || (Y[1] = (j) => P.value = !0),
1788
+ onBeforeLeave: E[1] || (E[1] = (O) => P.value = !0),
1789
1789
  onAfterLeave: a,
1790
1790
  tag: "div"
1791
1791
  }, {
1792
1792
  default: W(() => [
1793
- (C(!0), L(ue, null, pe(m.value, (j) => (C(), Se(st, {
1794
- key: j._.id,
1795
- event: j,
1793
+ (C(!0), z(ue, null, pe(m.value, (O) => (C(), Se(st, {
1794
+ key: O._.id,
1795
+ event: O,
1796
1796
  onEventDeleted: I,
1797
1797
  "in-all-day-bar": t.allDay,
1798
- class: ye(T.value[j._.id]),
1799
- style: _e(f.value[j._.id])
1798
+ class: ye(_.value[O._.id]),
1799
+ style: _e(g.value[O._.id])
1800
1800
  }, Ce({ _: 2 }, [
1801
1801
  r.$slots["event.all-day"] && t.allDay ? {
1802
1802
  name: "event.all-day",
1803
- fn: W((M) => [
1804
- O(r.$slots, "event.all-day", le({ ref_for: !0 }, M))
1803
+ fn: W((Y) => [
1804
+ V(r.$slots, "event.all-day", le({ ref_for: !0 }, Y))
1805
1805
  ]),
1806
1806
  key: "0"
1807
1807
  } : void 0,
1808
- r.$slots[`event.${b(o).id}`] ? {
1809
- name: `event.${b(o).id}`,
1810
- fn: W((M) => [
1811
- O(r.$slots, `event.${b(o).id}`, le({ ref_for: !0 }, M))
1808
+ r.$slots[`event.${T(o).id}`] ? {
1809
+ name: `event.${T(o).id}`,
1810
+ fn: W((Y) => [
1811
+ V(r.$slots, `event.${T(o).id}`, le({ ref_for: !0 }, Y))
1812
1812
  ]),
1813
1813
  key: "1"
1814
1814
  } : void 0,
1815
1815
  r.$slots.event ? {
1816
1816
  name: "event",
1817
- fn: W((M) => [
1818
- O(r.$slots, "event", le({ ref_for: !0 }, M))
1817
+ fn: W((Y) => [
1818
+ V(r.$slots, "event", le({ ref_for: !0 }, Y))
1819
1819
  ]),
1820
1820
  key: "2"
1821
1821
  } : void 0
@@ -1823,17 +1823,17 @@ const lt = (p, t) => {
1823
1823
  ]),
1824
1824
  _: 3
1825
1825
  })) : U("", !0),
1826
- V.value ? (C(), L("div", {
1826
+ M.value ? (C(), z("div", {
1827
1827
  key: 5,
1828
1828
  class: "vuecal__event-placeholder",
1829
- style: _e(i.value.style)
1830
- }, ce(i.value.start) + " - " + ce(i.value.end), 5)) : U("", !0)
1829
+ style: _e(c.value.style)
1830
+ }, ce(c.value.start) + " - " + ce(c.value.end), 5)) : U("", !0)
1831
1831
  ], 64)) : U("", !0),
1832
- r.$slots["event-count"] ? O(r.$slots, "event-count", {
1832
+ r.$slots["event-count"] ? V(r.$slots, "event-count", {
1833
1833
  key: 4,
1834
- events: h.value
1835
- }) : S.value ? (C(), L("div", oa, ce(h.value.length), 1)) : U("", !0),
1836
- se.show ? (C(), L("div", {
1834
+ events: f.value
1835
+ }) : j.value ? (C(), z("div", oa, ce(f.value.length), 1)) : U("", !0),
1836
+ se.show ? (C(), z("div", {
1837
1837
  key: 6,
1838
1838
  class: "vuecal__now-line",
1839
1839
  style: _e(se.style),
@@ -1861,19 +1861,19 @@ const lt = (p, t) => {
1861
1861
  }, ha = {
1862
1862
  __name: "headings-bar",
1863
1863
  setup(p) {
1864
- const t = ze("vuecal"), u = ze("$vuecalEl"), { view: o, config: w, dateUtils: _ } = t, N = E(() => w.xs ? "day-xs" : w.sm || o.isDays || o.isMonth ? "day-sm" : "day"), d = E(() => (o.isDay || o.isDays || o.isWeek || o.isMonth) && !(o.isDay && !w.schedules && !w.allDayEvents)), H = E(() => o.cellDates.slice(0, o.cols).map(({ start: y }) => ({
1865
- id: Xe[y.getDay()],
1866
- date: y,
1867
- dateNumber: y.getDate(),
1868
- day: _.formatDate(y, "dddd"),
1869
- "day-sm": _.formatDate(y, "ddd"),
1870
- "day-xs": _.formatDate(y, "dd"),
1871
- isToday: _.isToday(y)
1864
+ const t = ze("vuecal"), i = ze("$vuecalEl"), { view: o, config: w, dateUtils: b } = t, N = S(() => w.xs ? "day-xs" : w.sm || o.isDays || o.isMonth ? "day-sm" : "day"), d = S(() => (o.isDay || o.isDays || o.isWeek || o.isMonth) && !(o.isDay && !w.schedules && !w.allDayEvents)), H = S(() => o.cellDates.slice(0, o.cols).map(({ start: h }) => ({
1865
+ id: Xe[h.getDay()],
1866
+ date: h,
1867
+ dateNumber: h.getDate(),
1868
+ day: b.formatDate(h, "dddd"),
1869
+ "day-sm": b.formatDate(h, "ddd"),
1870
+ "day-xs": b.formatDate(h, "dd"),
1871
+ isToday: b.isToday(h)
1872
1872
  }))), v = {
1873
- click: (y) => {
1874
- (o.isDays || o.isWeek) && o.updateSelectedDate(y);
1873
+ click: (h) => {
1874
+ (o.isDays || o.isWeek) && o.updateSelectedDate(h);
1875
1875
  }
1876
- }, c = {
1876
+ }, u = {
1877
1877
  isResizing: ie(!1),
1878
1878
  startY: ie(0),
1879
1879
  initialHeight: ie(0),
@@ -1881,78 +1881,78 @@ const lt = (p, t) => {
1881
1881
  // Default height in pixels.
1882
1882
  // Cleanup event listeners.
1883
1883
  cleanup() {
1884
- typeof document < "u" && (document.removeEventListener("mousemove", c.handleMouseMove), document.removeEventListener("mouseup", c.cleanup), document.removeEventListener("touchmove", c.handleTouchMove, { passive: !1 }), document.removeEventListener("touchend", c.cleanup)), c.isResizing.value = !1;
1884
+ typeof document < "u" && (document.removeEventListener("mousemove", u.handleMouseMove), document.removeEventListener("mouseup", u.cleanup), document.removeEventListener("touchmove", u.handleTouchMove, { passive: !1 }), document.removeEventListener("touchend", u.cleanup)), u.isResizing.value = !1;
1885
1885
  },
1886
- startResize(y) {
1886
+ startResize(h) {
1887
1887
  var I;
1888
- this.isResizing.value = !0, this.startY.value = y;
1889
- const P = (I = u.value) == null ? void 0 : I.querySelector(".vuecal__all-day");
1890
- P && (this.initialHeight.value = P.offsetHeight), document.addEventListener("mousemove", c.handleMouseMove), document.addEventListener("mouseup", c.cleanup), document.addEventListener("touchmove", c.handleTouchMove, { passive: !1 }), document.addEventListener("touchend", c.cleanup);
1888
+ this.isResizing.value = !0, this.startY.value = h;
1889
+ const P = (I = i.value) == null ? void 0 : I.querySelector(".vuecal__all-day");
1890
+ P && (this.initialHeight.value = P.offsetHeight), document.addEventListener("mousemove", u.handleMouseMove), document.addEventListener("mouseup", u.cleanup), document.addEventListener("touchmove", u.handleTouchMove, { passive: !1 }), document.addEventListener("touchend", u.cleanup);
1891
1891
  },
1892
1892
  // Update height based on mouse/touch movement.
1893
- updateHeight(y) {
1893
+ updateHeight(h) {
1894
1894
  var a;
1895
1895
  if (!this.isResizing.value) return;
1896
- const P = y - this.startY.value, I = Math.max(20, this.initialHeight.value + P);
1897
- (a = u.value) == null || a.style.setProperty("--vuecal-all-day-bar-height", `${I}px`);
1896
+ const P = h - this.startY.value, I = Math.max(20, this.initialHeight.value + P);
1897
+ (a = i.value) == null || a.style.setProperty("--vuecal-all-day-bar-height", `${I}px`);
1898
1898
  },
1899
1899
  // Mouse event handlers.
1900
- handleMouseDown(y) {
1901
- this.startResize(y.clientY);
1900
+ handleMouseDown(h) {
1901
+ this.startResize(h.clientY);
1902
1902
  },
1903
- handleMouseMove(y) {
1904
- c.updateHeight(y.clientY);
1903
+ handleMouseMove(h) {
1904
+ u.updateHeight(h.clientY);
1905
1905
  },
1906
1906
  // Touch event handlers.
1907
- handleTouchStart(y) {
1907
+ handleTouchStart(h) {
1908
1908
  var P;
1909
- (P = y.touches) != null && P[0] && this.startResize(y.touches[0].clientY);
1909
+ (P = h.touches) != null && P[0] && this.startResize(h.touches[0].clientY);
1910
1910
  },
1911
- handleTouchMove(y) {
1911
+ handleTouchMove(h) {
1912
1912
  var P;
1913
- (P = y.touches) != null && P[0] && (c.updateHeight(y.touches[0].clientY), y.preventDefault());
1913
+ (P = h.touches) != null && P[0] && (u.updateHeight(h.touches[0].clientY), h.preventDefault());
1914
1914
  }
1915
1915
  };
1916
1916
  return Be(() => {
1917
- c.cleanup();
1918
- }), (y, P) => d.value ? (C(), L("div", ua, [
1919
- b(o).isDay ? U("", !0) : (C(), L("div", ca, [
1920
- (C(!0), L(ue, null, pe(H.value, (I, a) => (C(), L("div", {
1917
+ u.cleanup();
1918
+ }), (h, P) => d.value ? (C(), z("div", ua, [
1919
+ T(o).isDay ? U("", !0) : (C(), z("div", ca, [
1920
+ (C(!0), z(ue, null, pe(H.value, (I, a) => (C(), z("div", {
1921
1921
  class: ye(["vuecal__weekday", { "vuecal__weekday--today": I.isToday }]),
1922
1922
  key: a,
1923
- onClick: (s) => v.click(I.date)
1923
+ onClick: (l) => v.click(I.date)
1924
1924
  }, [
1925
- O(y.$slots, "weekday-heading", {
1925
+ V(h.$slots, "weekday-heading", {
1926
1926
  label: I[N.value],
1927
1927
  id: I.id,
1928
1928
  date: I.date
1929
1929
  }, () => [
1930
1930
  ve("span", va, ce(I[N.value]), 1),
1931
- b(o).isMonth ? U("", !0) : (C(), L("strong", fa, ce(I.dateNumber), 1))
1931
+ T(o).isMonth ? U("", !0) : (C(), z("strong", fa, ce(I.dateNumber), 1))
1932
1932
  ])
1933
1933
  ], 10, da))), 128))
1934
1934
  ])),
1935
- b(w).schedules ? (C(), L("div", ma, [
1936
- (C(!0), L(ue, null, pe(H.value, (I, a) => (C(), L(ue, { key: a }, [
1937
- (C(!0), L(ue, null, pe(b(w).schedules, (s, e) => (C(), L(ue, { key: e }, [
1938
- y.$slots["schedule-heading"] ? (C(), L("div", {
1935
+ T(w).schedules ? (C(), z("div", ma, [
1936
+ (C(!0), z(ue, null, pe(H.value, (I, a) => (C(), z(ue, { key: a }, [
1937
+ (C(!0), z(ue, null, pe(T(w).schedules, (l, e) => (C(), z(ue, { key: e }, [
1938
+ h.$slots["schedule-heading"] ? (C(), z("div", {
1939
1939
  key: 0,
1940
- class: ye(["vuecal__schedule vuecal__schedule--heading", s.class])
1940
+ class: ye(["vuecal__schedule vuecal__schedule--heading", l.class])
1941
1941
  }, [
1942
- O(y.$slots, "schedule-heading", {
1943
- schedule: s,
1944
- view: b(o)
1942
+ V(h.$slots, "schedule-heading", {
1943
+ schedule: l,
1944
+ view: T(o)
1945
1945
  })
1946
- ], 2)) : (C(), L("div", {
1946
+ ], 2)) : (C(), z("div", {
1947
1947
  key: 1,
1948
- class: ye(["vuecal__schedule vuecal__schedule--heading", s.class]),
1949
- innerHTML: s.label
1948
+ class: ye(["vuecal__schedule vuecal__schedule--heading", l.class]),
1949
+ innerHTML: l.label
1950
1950
  }, null, 10, ga))
1951
1951
  ], 64))), 128))
1952
1952
  ], 64))), 128))
1953
1953
  ])) : U("", !0),
1954
- b(w).allDayEvents ? (C(), L("div", ya, [
1955
- (C(!0), L(ue, null, pe(H.value, (I, a) => (C(), Se($t, {
1954
+ T(w).allDayEvents ? (C(), z("div", ya, [
1955
+ (C(!0), z(ue, null, pe(H.value, (I, a) => (C(), Se($t, {
1956
1956
  class: ye(["vuecal__all-day-cell", { "vuecal__weekday--today": I.isToday }]),
1957
1957
  key: a,
1958
1958
  start: I.date,
@@ -1960,24 +1960,24 @@ const lt = (p, t) => {
1960
1960
  index: a,
1961
1961
  "all-day": ""
1962
1962
  }, Ce({ _: 2 }, [
1963
- y.$slots["event.all-day"] ? {
1963
+ h.$slots["event.all-day"] ? {
1964
1964
  name: "event.all-day",
1965
- fn: W((s) => [
1966
- O(y.$slots, "event.all-day", le({ ref_for: !0 }, s))
1965
+ fn: W((l) => [
1966
+ V(h.$slots, "event.all-day", le({ ref_for: !0 }, l))
1967
1967
  ]),
1968
1968
  key: "0"
1969
1969
  } : {
1970
1970
  name: "event",
1971
- fn: W((s) => [
1972
- O(y.$slots, "event", le({ ref_for: !0 }, s))
1971
+ fn: W((l) => [
1972
+ V(h.$slots, "event", le({ ref_for: !0 }, l))
1973
1973
  ]),
1974
1974
  key: "1"
1975
1975
  }
1976
1976
  ]), 1032, ["class", "start", "end", "index"]))), 128)),
1977
1977
  ve("div", {
1978
1978
  class: "vuecal__all-day-resizer",
1979
- onMousedown: P[0] || (P[0] = (...I) => c.handleMouseDown && c.handleMouseDown(...I)),
1980
- onTouchstart: P[1] || (P[1] = (...I) => c.handleTouchStart && c.handleTouchStart(...I))
1979
+ onMousedown: P[0] || (P[0] = (...I) => u.handleMouseDown && u.handleMouseDown(...I)),
1980
+ onTouchstart: P[1] || (P[1] = (...I) => u.handleTouchStart && u.handleTouchStart(...I))
1981
1981
  }, null, 32)
1982
1982
  ])) : U("", !0)
1983
1983
  ])) : U("", !0);
@@ -1988,35 +1988,35 @@ const lt = (p, t) => {
1988
1988
  }, wa = {
1989
1989
  __name: "time-column",
1990
1990
  setup(p) {
1991
- const t = ze("vuecal"), { config: u, texts: o } = t, w = E(() => {
1992
- const _ = [];
1993
- for (let d = u.timeFrom; d < u.timeTo; d += u.timeStep) {
1994
- const H = d + u.timeStep > u.timeTo, v = ~~(d / 60), c = d % 60, y = o[d < 720 ? "am" : "pm"];
1991
+ const t = ze("vuecal"), { config: i, texts: o } = t, w = S(() => {
1992
+ const b = [];
1993
+ for (let d = i.timeFrom; d < i.timeTo; d += i.timeStep) {
1994
+ const H = d + i.timeStep > i.timeTo, v = ~~(d / 60), u = d % 60, h = o[d < 720 ? "am" : "pm"];
1995
1995
  let P = null;
1996
- H && (P = `calc(var(--vuecal-time-cell-height) * ${(u.timeTo - d) / u.timeStep})`), _.push({
1996
+ H && (P = `calc(var(--vuecal-time-cell-height) * ${(i.timeTo - d) / i.timeStep})`), b.push({
1997
1997
  minutesSum: d,
1998
1998
  // The sum of hours + minutes in minutes.
1999
1999
  hours: v,
2000
- minutes: c,
2001
- formatted12: `${v % 12 ? v % 12 : 12}${c ? `:${c.toString().padStart(2, 0)}` : ""}${y}`,
2002
- formatted24: `${v.toString().padStart(2, 0)}:${c.toString().padStart(2, 0)}`,
2000
+ minutes: u,
2001
+ formatted12: `${v % 12 ? v % 12 : 12}${u ? `:${u.toString().padStart(2, 0)}` : ""}${h}`,
2002
+ formatted24: `${v.toString().padStart(2, 0)}:${u.toString().padStart(2, 0)}`,
2003
2003
  height: P
2004
2004
  });
2005
2005
  }
2006
- return _;
2006
+ return b;
2007
2007
  });
2008
- return (_, N) => (C(), L("div", Da, [
2009
- b(u).allDayEvents ? (C(), L("div", pa, [
2010
- O(_.$slots, "all-day-label", {}, () => [
2011
- Ue(ce(b(t).texts.allDay), 1)
2008
+ return (b, N) => (C(), z("div", Da, [
2009
+ T(i).allDayEvents ? (C(), z("div", pa, [
2010
+ V(b.$slots, "all-day-label", {}, () => [
2011
+ Ue(ce(T(t).texts.allDay), 1)
2012
2012
  ])
2013
2013
  ])) : U("", !0),
2014
- (C(!0), L(ue, null, pe(w.value, (d, H) => (C(), L("div", {
2014
+ (C(!0), z(ue, null, pe(w.value, (d, H) => (C(), z("div", {
2015
2015
  class: "vuecal__time-cell",
2016
2016
  key: H,
2017
2017
  style: _e({ height: d.height || null })
2018
2018
  }, [
2019
- O(_.$slots, "time-cell", {
2019
+ V(b.$slots, "time-cell", {
2020
2020
  index: H,
2021
2021
  minutes: d.minutes,
2022
2022
  hours: d.hours,
@@ -2024,7 +2024,7 @@ const lt = (p, t) => {
2024
2024
  format12: d.formatted12,
2025
2025
  format24: d.formatted24
2026
2026
  }, () => [
2027
- ve("label", null, ce(b(u).twelveHour ? d.formatted12 : d.formatted24), 1)
2027
+ ve("label", null, ce(T(i).twelveHour ? d.formatted12 : d.formatted24), 1)
2028
2028
  ])
2029
2029
  ], 4))), 128))
2030
2030
  ]));
@@ -2032,36 +2032,36 @@ const lt = (p, t) => {
2032
2032
  }, ka = {
2033
2033
  __name: "body",
2034
2034
  setup(p) {
2035
- const t = ze("vuecal"), { view: u, config: o, dateUtils: w } = t, _ = ie(null), N = ie(null), d = E(() => ({
2036
- "--vuecal-grid-columns": u.cols,
2037
- "--vuecal-grid-rows": u.rows
2038
- })), H = E(() => {
2039
- const y = w.formatTime(Le(N.value, o));
2035
+ const t = ze("vuecal"), { view: i, config: o, dateUtils: w } = t, b = ie(null), N = ie(null), d = S(() => ({
2036
+ "--vuecal-grid-columns": i.cols,
2037
+ "--vuecal-grid-rows": i.rows
2038
+ })), H = S(() => {
2039
+ const h = w.formatTime(Le(N.value, o));
2040
2040
  return {
2041
2041
  style: { top: `${N.value}%` },
2042
- time: y
2042
+ time: h
2043
2043
  };
2044
- }), v = (y) => {
2044
+ }), v = (h) => {
2045
2045
  var a;
2046
- if (u.isMonth || u.isYear || u.isYears) return;
2047
- const P = (((a = y.touches) == null ? void 0 : a[0]) || y).clientY, { top: I } = _.value.getBoundingClientRect();
2048
- N.value = Ke(P - I, _.value);
2049
- }, c = () => {
2046
+ if (i.isMonth || i.isYear || i.isYears) return;
2047
+ const P = (((a = h.touches) == null ? void 0 : a[0]) || h).clientY, { top: I } = b.value.getBoundingClientRect();
2048
+ N.value = Ke(P - I, b.value);
2049
+ }, u = () => {
2050
2050
  N.value = null;
2051
2051
  };
2052
2052
  return Ze(() => {
2053
- _.value.addEventListener("mousemove", v), _.value.addEventListener("touchmove", v), _.value.addEventListener("mouseleave", c), _.value.addEventListener("touchend", c);
2053
+ b.value.addEventListener("mousemove", v), b.value.addEventListener("touchmove", v), b.value.addEventListener("mouseleave", u), b.value.addEventListener("touchend", u);
2054
2054
  }), Be(() => {
2055
- _.value && (_.value.removeEventListener("mousemove", v), _.value.removeEventListener("touchmove", v), _.value.removeEventListener("mouseleave", c), _.value.removeEventListener("touchend", c));
2056
- }), (y, P) => (C(), L("div", {
2055
+ b.value && (b.value.removeEventListener("mousemove", v), b.value.removeEventListener("touchmove", v), b.value.removeEventListener("mouseleave", u), b.value.removeEventListener("touchend", u));
2056
+ }), (h, P) => (C(), z("div", {
2057
2057
  class: "vuecal__body",
2058
2058
  ref_key: "bodyEl",
2059
- ref: _,
2059
+ ref: b,
2060
2060
  style: _e(d.value)
2061
2061
  }, [
2062
2062
  je(Ge, { name: "vuecal-shrink" }, {
2063
2063
  default: W(() => [
2064
- b(o).timeAtCursor && N.value !== null ? (C(), L("div", {
2064
+ T(o).timeAtCursor && N.value !== null ? (C(), z("div", {
2065
2065
  key: 0,
2066
2066
  class: "vuecal__time-at-cursor",
2067
2067
  style: _e(H.value.style)
@@ -2071,65 +2071,65 @@ const lt = (p, t) => {
2071
2071
  ]),
2072
2072
  _: 1
2073
2073
  }),
2074
- (C(!0), L(ue, null, pe(b(u).cellDates, (I, a) => (C(), Se($t, {
2074
+ (C(!0), z(ue, null, pe(T(i).cellDates, (I, a) => (C(), Se($t, {
2075
2075
  key: a,
2076
2076
  start: I.start,
2077
2077
  end: I.end,
2078
2078
  index: a
2079
2079
  }, Ce({ _: 2 }, [
2080
- y.$slots.cell ? {
2080
+ h.$slots.cell ? {
2081
2081
  name: "cell",
2082
- fn: W((s) => [
2083
- O(y.$slots, "cell", le({ ref_for: !0 }, s))
2082
+ fn: W((l) => [
2083
+ V(h.$slots, "cell", le({ ref_for: !0 }, l))
2084
2084
  ]),
2085
2085
  key: "0"
2086
2086
  } : void 0,
2087
- y.$slots["cell-date"] ? {
2087
+ h.$slots["cell-date"] ? {
2088
2088
  name: "cell-date",
2089
- fn: W((s) => [
2090
- O(y.$slots, "cell-date", le({ ref_for: !0 }, s))
2089
+ fn: W((l) => [
2090
+ V(h.$slots, "cell-date", le({ ref_for: !0 }, l))
2091
2091
  ]),
2092
2092
  key: "1"
2093
2093
  } : void 0,
2094
- y.$slots["cell-content"] ? {
2094
+ h.$slots["cell-content"] ? {
2095
2095
  name: "cell-content",
2096
- fn: W((s) => [
2097
- O(y.$slots, "cell-content", le({ ref_for: !0 }, s))
2096
+ fn: W((l) => [
2097
+ V(h.$slots, "cell-content", le({ ref_for: !0 }, l))
2098
2098
  ]),
2099
2099
  key: "2"
2100
2100
  } : void 0,
2101
- y.$slots["cell-events"] ? {
2101
+ h.$slots["cell-events"] ? {
2102
2102
  name: "cell-events",
2103
- fn: W((s) => [
2104
- O(y.$slots, "cell-events", le({ ref_for: !0 }, s))
2103
+ fn: W((l) => [
2104
+ V(h.$slots, "cell-events", le({ ref_for: !0 }, l))
2105
2105
  ]),
2106
2106
  key: "3"
2107
2107
  } : void 0,
2108
- y.$slots[`event.${b(u).id}`] ? {
2109
- name: `event.${b(u).id}`,
2110
- fn: W((s) => [
2111
- O(y.$slots, `event.${b(u).id}`, le({ ref_for: !0 }, s))
2108
+ h.$slots[`event.${T(i).id}`] ? {
2109
+ name: `event.${T(i).id}`,
2110
+ fn: W((l) => [
2111
+ V(h.$slots, `event.${T(i).id}`, le({ ref_for: !0 }, l))
2112
2112
  ]),
2113
2113
  key: "4"
2114
2114
  } : void 0,
2115
- y.$slots["event.all-day"] ? {
2115
+ h.$slots["event.all-day"] ? {
2116
2116
  name: "event.all-day",
2117
- fn: W((s) => [
2118
- O(y.$slots, "event.all-day", le({ ref_for: !0 }, s))
2117
+ fn: W((l) => [
2118
+ V(h.$slots, "event.all-day", le({ ref_for: !0 }, l))
2119
2119
  ]),
2120
2120
  key: "5"
2121
2121
  } : void 0,
2122
- y.$slots.event ? {
2122
+ h.$slots.event ? {
2123
2123
  name: "event",
2124
- fn: W((s) => [
2125
- O(y.$slots, "event", le({ ref_for: !0 }, s))
2124
+ fn: W((l) => [
2125
+ V(h.$slots, "event", le({ ref_for: !0 }, l))
2126
2126
  ]),
2127
2127
  key: "6"
2128
2128
  } : void 0,
2129
- y.$slots["event-count"] ? {
2129
+ h.$slots["event-count"] ? {
2130
2130
  name: "event-count",
2131
- fn: W((s) => [
2132
- O(y.$slots, "event-count", le({ ref_for: !0 }, s))
2131
+ fn: W((l) => [
2132
+ V(h.$slots, "event-count", le({ ref_for: !0 }, l))
2133
2133
  ]),
2134
2134
  key: "7"
2135
2135
  } : void 0
@@ -2155,8 +2155,8 @@ const lt = (p, t) => {
2155
2155
  "event-drag-start",
2156
2156
  "event-drag-end"
2157
2157
  ],
2158
- setup(p, { expose: t, emit: u }) {
2159
- const o = p, w = u, _ = Tt("vuecal-el"), N = zt({ props: o, emit: w, attrs: Yt(), vuecalEl: _, uid: Mt() }), { config: d, view: H, dateUtils: v, touch: c } = N, y = E(() => d.time && (H.isDay || H.isDays || H.isWeek)), P = E(() => Array(H.rows).fill().map((e, k) => v.getWeek(v.addDays(H.firstCellDate, 7 * k)))), I = E(() => {
2158
+ setup(p, { expose: t, emit: i }) {
2159
+ const o = p, w = i, b = Tt("vuecal-el"), N = zt({ props: o, emit: w, attrs: Yt(), vuecalEl: b, uid: Mt() }), { config: d, view: H, dateUtils: v, touch: u } = N, h = S(() => d.time && (H.isDay || H.isDays || H.isWeek)), P = S(() => Array(H.rows).fill().map((e, k) => v.getWeek(v.addDays(H.firstCellDate, 7 * k)))), I = S(() => {
2160
2160
  var e;
2161
2161
  return {
2162
2162
  "vuecal--ready": d.ready,
@@ -2166,19 +2166,19 @@ const lt = (p, t) => {
2166
2166
  "vuecal--dark": d.dark,
2167
2167
  "vuecal--light": !d.dark,
2168
2168
  [`vuecal--${H.id}-view`]: !0,
2169
- "vuecal--view-has-time": y.value,
2169
+ "vuecal--view-has-time": h.value,
2170
2170
  "vuecal--timeless": !d.time,
2171
- "vuecal--dragging-cell": c.isDraggingCell,
2172
- "vuecal--dragging-event": c.isDraggingEvent,
2173
- "vuecal--resizing-event": c.isResizingEvent,
2171
+ "vuecal--dragging-cell": u.isDraggingCell,
2172
+ "vuecal--dragging-event": u.isDraggingEvent,
2173
+ "vuecal--resizing-event": u.isResizingEvent,
2174
2174
  "vuecal--has-schedules": (e = d.schedules) == null ? void 0 : e.length
2175
2175
  };
2176
- }), a = E(() => ({
2176
+ }), a = S(() => ({
2177
2177
  "--vuecal-time-cell-height": d.timeCellHeight && `${d.timeCellHeight}px`
2178
- })), s = E(() => {
2178
+ })), l = S(() => {
2179
2179
  var e, k;
2180
2180
  return {
2181
- "vuecal__scrollable--row": y.value || d.weekNumbers && H.isMonth,
2181
+ "vuecal__scrollable--row": h.value || d.weekNumbers && H.isMonth,
2182
2182
  // Keep the states inside the Vue transition wrapper for smooth CSS transitions.
2183
2183
  [`vuecal__scrollable--${H.id}-view`]: !0,
2184
2184
  "vuecal__scrollable--has-schedules": (e = d.schedules) == null ? void 0 : e.length,
@@ -2189,124 +2189,124 @@ const lt = (p, t) => {
2189
2189
  });
2190
2190
  return Ze(async () => {
2191
2191
  await Je(), d.ready = !0, w("ready", { config: d, view: H });
2192
- }), at("vuecal", N), at("$vuecalEl", _), t({ view: N.view }), (e, k) => (C(), L("div", {
2192
+ }), at("vuecal", N), at("$vuecalEl", b), t({ view: N.view }), (e, k) => (C(), z("div", {
2193
2193
  class: ye(["vuecal", I.value]),
2194
2194
  ref: "vuecal-el",
2195
2195
  "data-locale": e.locale,
2196
2196
  style: _e(a.value)
2197
2197
  }, [
2198
- e.$slots.diy ? O(e.$slots, "diy", {
2198
+ e.$slots.diy ? V(e.$slots, "diy", {
2199
2199
  key: 0,
2200
- vuecal: b(N)
2201
- }) : (C(), L(ue, { key: 1 }, [
2200
+ vuecal: T(N)
2201
+ }) : (C(), z(ue, { key: 1 }, [
2202
2202
  je(Rt, null, Ce({ _: 2 }, [
2203
2203
  e.$slots.header ? {
2204
2204
  name: "header",
2205
- fn: W((i) => [
2206
- O(e.$slots, "header", te(ne(i)))
2205
+ fn: W((c) => [
2206
+ V(e.$slots, "header", te(ne(c)))
2207
2207
  ]),
2208
2208
  key: "0"
2209
2209
  } : void 0,
2210
2210
  !e.$slots.header && e.$slots["previous-button"] ? {
2211
2211
  name: "previous-button",
2212
- fn: W((i) => [
2213
- O(e.$slots, "previous-button", te(ne(i)))
2212
+ fn: W((c) => [
2213
+ V(e.$slots, "previous-button", te(ne(c)))
2214
2214
  ]),
2215
2215
  key: "1"
2216
2216
  } : void 0,
2217
2217
  !e.$slots.header && e.$slots["next-button"] ? {
2218
2218
  name: "next-button",
2219
- fn: W((i) => [
2220
- O(e.$slots, "next-button", te(ne(i)))
2219
+ fn: W((c) => [
2220
+ V(e.$slots, "next-button", te(ne(c)))
2221
2221
  ]),
2222
2222
  key: "2"
2223
2223
  } : void 0,
2224
2224
  !e.$slots.header && e.$slots["today-button"] ? {
2225
2225
  name: "today-button",
2226
- fn: W((i) => [
2227
- O(e.$slots, "today-button", te(ne(i)))
2226
+ fn: W((c) => [
2227
+ V(e.$slots, "today-button", te(ne(c)))
2228
2228
  ]),
2229
2229
  key: "3"
2230
2230
  } : void 0,
2231
2231
  !e.$slots.header && e.$slots.title ? {
2232
2232
  name: "title",
2233
- fn: W((i) => [
2234
- O(e.$slots, "title", te(ne(i)))
2233
+ fn: W((c) => [
2234
+ V(e.$slots, "title", te(ne(c)))
2235
2235
  ]),
2236
2236
  key: "4"
2237
2237
  } : void 0,
2238
2238
  !e.$slots.header && e.$slots["title.day"] ? {
2239
2239
  name: "title.day",
2240
- fn: W((i) => [
2241
- O(e.$slots, "title.day", te(ne(i)))
2240
+ fn: W((c) => [
2241
+ V(e.$slots, "title.day", te(ne(c)))
2242
2242
  ]),
2243
2243
  key: "5"
2244
2244
  } : void 0,
2245
2245
  !e.$slots.header && e.$slots["title.days"] ? {
2246
2246
  name: "title.days",
2247
- fn: W((i) => [
2248
- O(e.$slots, "title.days", te(ne(i)))
2247
+ fn: W((c) => [
2248
+ V(e.$slots, "title.days", te(ne(c)))
2249
2249
  ]),
2250
2250
  key: "6"
2251
2251
  } : void 0,
2252
2252
  !e.$slots.header && e.$slots["title.week"] ? {
2253
2253
  name: "title.week",
2254
- fn: W((i) => [
2255
- O(e.$slots, "title.week", te(ne(i)))
2254
+ fn: W((c) => [
2255
+ V(e.$slots, "title.week", te(ne(c)))
2256
2256
  ]),
2257
2257
  key: "7"
2258
2258
  } : void 0,
2259
2259
  !e.$slots.header && e.$slots["title.month"] ? {
2260
2260
  name: "title.month",
2261
- fn: W((i) => [
2262
- O(e.$slots, "title.month", te(ne(i)))
2261
+ fn: W((c) => [
2262
+ V(e.$slots, "title.month", te(ne(c)))
2263
2263
  ]),
2264
2264
  key: "8"
2265
2265
  } : void 0,
2266
2266
  !e.$slots.header && e.$slots["title.year"] ? {
2267
2267
  name: "title.year",
2268
- fn: W((i) => [
2269
- O(e.$slots, "title.year", te(ne(i)))
2268
+ fn: W((c) => [
2269
+ V(e.$slots, "title.year", te(ne(c)))
2270
2270
  ]),
2271
2271
  key: "9"
2272
2272
  } : void 0,
2273
2273
  !e.$slots.header && e.$slots["title.years"] ? {
2274
2274
  name: "title.years",
2275
- fn: W((i) => [
2276
- O(e.$slots, "title.years", te(ne(i)))
2275
+ fn: W((c) => [
2276
+ V(e.$slots, "title.years", te(ne(c)))
2277
2277
  ]),
2278
2278
  key: "10"
2279
2279
  } : void 0,
2280
2280
  !e.$slots.header && e.$slots["schedule-heading"] ? {
2281
2281
  name: "schedule-heading",
2282
- fn: W((i) => [
2283
- O(e.$slots, "schedule-heading", te(ne(i)))
2282
+ fn: W((c) => [
2283
+ V(e.$slots, "schedule-heading", te(ne(c)))
2284
2284
  ]),
2285
2285
  key: "11"
2286
2286
  } : void 0
2287
2287
  ]), 1024),
2288
2288
  ve("div", _a, [
2289
2289
  je(Ge, {
2290
- name: `vuecal-slide-fade--${b(H).transitionDirection}`
2290
+ name: `vuecal-slide-fade--${T(H).transitionDirection}`
2291
2291
  }, {
2292
2292
  default: W(() => [
2293
- (C(), L("div", {
2294
- class: ye(["vuecal__scrollable", s.value]),
2295
- key: b(H).id + b(H).start.getTime()
2293
+ (C(), z("div", {
2294
+ class: ye(["vuecal__scrollable", l.value]),
2295
+ key: T(H).id + T(H).start.getTime()
2296
2296
  }, [
2297
- y.value ? (C(), Se(wa, { key: 0 }, Ce({ _: 2 }, [
2297
+ h.value ? (C(), Se(wa, { key: 0 }, Ce({ _: 2 }, [
2298
2298
  e.$slots["time-cell"] ? {
2299
2299
  name: "time-cell",
2300
- fn: W((i) => [
2301
- O(e.$slots, "time-cell", te(ne(i)))
2300
+ fn: W((c) => [
2301
+ V(e.$slots, "time-cell", te(ne(c)))
2302
2302
  ]),
2303
2303
  key: "0"
2304
2304
  } : void 0
2305
2305
  ]), 1024)) : U("", !0),
2306
- b(d).weekNumbers && b(H).isMonth ? (C(), L("div", ba, [
2307
- (C(!0), L(ue, null, pe(P.value, (i) => (C(), L("div", Ta, [
2308
- O(e.$slots, "week-number", {}, () => [
2309
- ve("small", null, ce(i), 1)
2306
+ T(d).weekNumbers && T(H).isMonth ? (C(), z("div", ba, [
2307
+ (C(!0), z(ue, null, pe(P.value, (c) => (C(), z("div", Ta, [
2308
+ V(e.$slots, "week-number", {}, () => [
2309
+ ve("small", null, ce(c), 1)
2310
2310
  ])
2311
2311
  ]))), 256))
2312
2312
  ])) : U("", !0),
@@ -2314,29 +2314,29 @@ const lt = (p, t) => {
2314
2314
  je(ha, null, Ce({ _: 2 }, [
2315
2315
  e.$slots["weekday-heading"] ? {
2316
2316
  name: "weekday-heading",
2317
- fn: W((i) => [
2318
- O(e.$slots, "weekday-heading", te(ne(i)))
2317
+ fn: W((c) => [
2318
+ V(e.$slots, "weekday-heading", te(ne(c)))
2319
2319
  ]),
2320
2320
  key: "0"
2321
2321
  } : void 0,
2322
2322
  e.$slots["schedule-heading"] ? {
2323
2323
  name: "schedule-heading",
2324
- fn: W((i) => [
2325
- O(e.$slots, "schedule-heading", te(ne(i)))
2324
+ fn: W((c) => [
2325
+ V(e.$slots, "schedule-heading", te(ne(c)))
2326
2326
  ]),
2327
2327
  key: "1"
2328
2328
  } : void 0,
2329
2329
  e.$slots["event.all-day"] ? {
2330
2330
  name: "event.all-day",
2331
- fn: W((i) => [
2332
- O(e.$slots, "event.all-day", te(ne(i)))
2331
+ fn: W((c) => [
2332
+ V(e.$slots, "event.all-day", te(ne(c)))
2333
2333
  ]),
2334
2334
  key: "2"
2335
2335
  } : void 0,
2336
2336
  e.$slots.event ? {
2337
2337
  name: "event",
2338
- fn: W((i) => [
2339
- O(e.$slots, "event", te(ne(i)))
2338
+ fn: W((c) => [
2339
+ V(e.$slots, "event", te(ne(c)))
2340
2340
  ]),
2341
2341
  key: "3"
2342
2342
  } : void 0
@@ -2344,57 +2344,57 @@ const lt = (p, t) => {
2344
2344
  je(ka, null, Ce({ _: 2 }, [
2345
2345
  e.$slots.cell ? {
2346
2346
  name: "cell",
2347
- fn: W((i) => [
2348
- O(e.$slots, "cell", te(ne(i)))
2347
+ fn: W((c) => [
2348
+ V(e.$slots, "cell", te(ne(c)))
2349
2349
  ]),
2350
2350
  key: "0"
2351
2351
  } : void 0,
2352
2352
  !e.$slots.cell && e.$slots["cell-date"] ? {
2353
2353
  name: "cell-date",
2354
- fn: W((i) => [
2355
- O(e.$slots, "cell-date", te(ne(i)))
2354
+ fn: W((c) => [
2355
+ V(e.$slots, "cell-date", te(ne(c)))
2356
2356
  ]),
2357
2357
  key: "1"
2358
2358
  } : void 0,
2359
2359
  !e.$slots.cell && e.$slots["cell-content"] ? {
2360
2360
  name: "cell-content",
2361
- fn: W((i) => [
2362
- O(e.$slots, "cell-content", te(ne(i)))
2361
+ fn: W((c) => [
2362
+ V(e.$slots, "cell-content", te(ne(c)))
2363
2363
  ]),
2364
2364
  key: "2"
2365
2365
  } : void 0,
2366
2366
  !e.$slots.cell && e.$slots["cell-events"] ? {
2367
2367
  name: "cell-events",
2368
- fn: W((i) => [
2369
- O(e.$slots, "cell-events", te(ne(i)))
2368
+ fn: W((c) => [
2369
+ V(e.$slots, "cell-events", te(ne(c)))
2370
2370
  ]),
2371
2371
  key: "3"
2372
2372
  } : void 0,
2373
2373
  !e.$slots.cell && !e.$slots["cell-events"] && e.$slots["event.all-day"] ? {
2374
2374
  name: "event.all-day",
2375
- fn: W((i) => [
2376
- O(e.$slots, "event.all-day", te(ne(i)))
2375
+ fn: W((c) => [
2376
+ V(e.$slots, "event.all-day", te(ne(c)))
2377
2377
  ]),
2378
2378
  key: "4"
2379
2379
  } : void 0,
2380
- !e.$slots.cell && !e.$slots["cell-events"] && e.$slots[`event.${b(H).id}`] ? {
2381
- name: `event.${b(H).id}`,
2382
- fn: W((i) => [
2383
- O(e.$slots, `event.${b(H).id}`, te(ne(i)))
2380
+ !e.$slots.cell && !e.$slots["cell-events"] && e.$slots[`event.${T(H).id}`] ? {
2381
+ name: `event.${T(H).id}`,
2382
+ fn: W((c) => [
2383
+ V(e.$slots, `event.${T(H).id}`, te(ne(c)))
2384
2384
  ]),
2385
2385
  key: "5"
2386
2386
  } : void 0,
2387
2387
  !e.$slots.cell && !e.$slots["cell-events"] && e.$slots.event ? {
2388
2388
  name: "event",
2389
- fn: W((i) => [
2390
- O(e.$slots, "event", te(ne(i)))
2389
+ fn: W((c) => [
2390
+ V(e.$slots, "event", te(ne(c)))
2391
2391
  ]),
2392
2392
  key: "6"
2393
2393
  } : void 0,
2394
2394
  !e.$slots.cell && e.$slots["event-count"] ? {
2395
2395
  name: "event-count",
2396
- fn: W((i) => [
2397
- O(e.$slots, "event-count", te(ne(i)))
2396
+ fn: W((c) => [
2397
+ V(e.$slots, "event-count", te(ne(c)))
2398
2398
  ]),
2399
2399
  key: "7"
2400
2400
  } : void 0