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

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 Y, reactive as Te, watch as me, toRefs as bt, ref as ie, onBeforeUnmount as Be, inject as He, createElementBlock as L, openBlock as C, renderSlot as j, 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 B, 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 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";
2
2
  /**
3
- * vue-cal v5.0.1-rc.23
3
+ * vue-cal v5.0.1-rc.24
4
4
  * (c) 2024-2025 Antoni Andre <antoniandre.web@gmail.com>
5
5
  * @license MIT
6
6
  */
@@ -34,65 +34,65 @@ const ge = {
34
34
  // Arbitrary range of quarters of century (25y).
35
35
  }
36
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, _ = Y(() => {
38
- if (F.value[t.view]) return t.view;
37
+ const { dateUtils: o } = p, w = !1, _ = E(() => {
38
+ if (P.value[t.view]) return t.view;
39
39
  const f = t.datePicker ? "month" : "week", T = t.view || f;
40
- return F.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(F.value)[0]}\`.`
42
- ), Object.keys(F.value)[0]);
43
- }), N = Y(() => t.sm && !t.xs), d = Y(() => t.xs || t.datePicker), z = Y(() => t.clickToNavigate || t.datePicker && t.clickToNavigate !== !1), v = Y(() => {
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]}\`.`
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
44
  const f = {
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 = (E) => E.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
50
- for (const [E, l] of Object.entries(u)) {
51
- const [X, q, ae] = E.match(/^on(Cell|Event)(.+)$/) || [];
52
- X && (f[q.toLowerCase()][T(ae).replace(/^-+|-+$/g, "")] = l);
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);
53
53
  }
54
54
  return f;
55
- }), c = Y(() => {
55
+ }), c = E(() => {
56
56
  var T;
57
57
  const f = {};
58
- return t.hideWeekends && (f[6] = !0) && (f[7] = !0), (T = t.hideWeekdays) != null && T.length && t.hideWeekdays.forEach((E) => f[St[E]] = !0), f;
59
- }), y = Y(() => t.hideWeekends || c.value[6] && c.value[7]), F = Y(() => {
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
60
  const f = t.datePicker;
61
- let T = 0, E = {};
61
+ let T = 0, S = {};
62
62
  const l = t.views;
63
63
  return f && !l ? {
64
64
  month: { ...ge.availableViews.month },
65
65
  year: { ...ge.availableViews.year },
66
66
  years: { ...ge.availableViews.years }
67
- } : (l ? (Array.isArray(l) ? E = l.reduce((X, q) => (typeof q == "string" && ge.availableViews[q] ? X[q] = ge.availableViews[q] : T++, X), {}) : typeof l == "object" && (E = Object.entries(l).reduce((X, [q, ae]) => {
68
- const { cols: se, rows: de } = ge.availableViews[q];
69
- return X[q] = { 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(E).length || (console.warn("Vue Cal: No valid view in the provided `views` prop. Falling back to default views."), E = { ...ge.availableViews })) : E = { ...ge.availableViews }, E);
71
- }), W = Y(() => t.datePicker ? "month" : F.value.week ? "week" : Object.keys(F.value)[0]), a = Y(() => {
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(() => {
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 = Y(() => {
75
+ }), s = E(() => {
76
76
  if (!t.disableDays) return [];
77
77
  const f = [];
78
78
  if (Array.isArray(t.disableDays))
79
79
  for (let T of t.disableDays) {
80
- let E = T;
81
- typeof T == "string" ? E = o.stringToDate(T) : T instanceof Date && (T = o.formatDate(T, "YYYY-MM-DD")), E instanceof Date && !isNaN(E.getTime()) ? f.push(T) : console.warn("Vue Cal: The provided `disableDays` prop contains an invalid date:", T);
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);
82
82
  }
83
83
  else console.warn("Vue Cal: The provided `disableDays` prop is invalid:", t.disableDays);
84
84
  return f;
85
- }), e = Y(() => {
85
+ }), e = E(() => {
86
86
  let f = null;
87
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 = Y(() => {
88
+ }), k = E(() => {
89
89
  let f = null;
90
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 = Y(() => {
92
- var E;
91
+ }), i = E(() => {
92
+ var S;
93
93
  const { view: f } = p;
94
- return t.schedules.length && (f.isDay || f.isDays || f.isWeek) && ((E = t.schedules) == null ? void 0 : E.map((l, X) => ({ ...l, id: l.id ?? X + 1 }))) || void 0;
95
- }), V = Y(() => {
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
96
  const f = {
97
97
  drag: !0,
98
98
  resize: !0,
@@ -100,33 +100,33 @@ const ge = {
100
100
  create: !0
101
101
  };
102
102
  return t.editableEvents === !0 ? f : t.editableEvents === !1 ? Object.keys(f).map((T) => f[T] = !1) : { ...f, ...t.editableEvents };
103
- }), P = Y(() => {
103
+ }), F = E(() => {
104
104
  const { view: f } = p, { eventCount: T } = t;
105
105
  return (Array.isArray(T) ? T.includes(f.id) : T) && (f.isMonth && !t.eventsOnMonthView || f.isYear);
106
- }), A = Y(() => t.allDayEvents && t.time !== !1 && !_.isMonth), m = Y(() => t.timeAtCursor && t.time !== !1), h = async (f) => {
107
- var E;
106
+ }), A = E(() => t.allDayEvents && t.time !== !1 && !_.isMonth), m = E(() => t.timeAtCursor && t.time !== !1), h = async (f) => {
107
+ var S;
108
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) });
109
109
  {
110
110
  if (!T[`../i18n/${f}.json`]) {
111
111
  console.warn(`Vue Cal: the locale \`${f}\` does not exist. Falling back to \`en-us\`.`), f = "en-us";
112
112
  return;
113
113
  }
114
- T = await ((E = T[`../i18n/${f}.json`]) == null ? void 0 : E.call(T));
114
+ T = await ((S = T[`../i18n/${f}.json`]) == null ? void 0 : S.call(T));
115
115
  }
116
116
  p.texts = Object.assign(p.texts, Object.assign({ ...ge.texts }, T)), o.updateTexts(p.texts);
117
- }, H = Te(t.events || []);
118
- return me(() => t.events, (f) => H.splice(0, H.length, ...f)), me(() => t.locale, (f) => h(f || "en-us")), (t.locale || !p.texts.today) && h(t.locale || "en-us"), {
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"), {
119
119
  ...bt(t),
120
- events: H,
120
+ events: z,
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
- defaultView: W,
124
- availableViews: F,
123
+ defaultView: I,
124
+ availableViews: P,
125
125
  disableDays: s,
126
126
  ready: w,
127
127
  sm: N,
128
128
  xs: d,
129
- clickToNavigate: z,
129
+ clickToNavigate: H,
130
130
  hideWeekdays: c,
131
131
  hideWeekends: y,
132
132
  minTimestamp: e,
@@ -134,7 +134,7 @@ const ge = {
134
134
  schedules: i,
135
135
  selectedDate: a,
136
136
  editableEvents: V,
137
- showCellEventCount: P,
137
+ showCellEventCount: F,
138
138
  allDayEvents: A,
139
139
  timeAtCursor: m,
140
140
  view: _,
@@ -166,16 +166,16 @@ const ke = Te({ el: null, cell: null, timeout: null }), $e = Te({
166
166
  function Vt(p) {
167
167
  const { config: t, view: u, eventsManager: o, emit: w, uid: _, dateUtils: N } = p, d = (e) => {
168
168
  var h;
169
- const { timeStep: k, timeCellHeight: i, timeFrom: V } = t, P = (((h = e.touches) == null ? void 0 : h[0]) || e).clientY, { top: A } = e.currentTarget.getBoundingClientRect(), m = P - A - ~~e.dataTransfer.getData("cursor-grab-at");
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");
170
170
  return Le(Ke(m, e.currentTarget), t);
171
- }, z = (e, k, i) => {
171
+ }, H = (e, k, i) => {
172
172
  const V = k.duration || v(k.start, k.end) || t.timeStep;
173
- let P = Math.max(d(e), 0);
173
+ let F = Math.max(d(e), 0);
174
174
  if (t.snapToInterval) {
175
- const H = P + t.snapToInterval / 2;
176
- P = H - H % t.snapToInterval;
175
+ const z = F + t.snapToInterval / 2;
176
+ F = z - z % t.snapToInterval;
177
177
  }
178
- const A = new Date(new Date(i).setMinutes(P)), m = Math.min(P + V, 24 * 60), h = new Date(new Date(i).setMinutes(m));
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
179
  return { start: A, end: h };
180
180
  }, v = (e, k) => Math.round((k - e) / 6e4);
181
181
  return {
@@ -185,8 +185,8 @@ function Vt(p) {
185
185
  const i = { ...k, _: { id: k._.id, duration: v(k.start, k.end) } };
186
186
  try {
187
187
  e.dataTransfer.setData("text/plain", ""), e.dataTransfer.setData("event", JSON.stringify(i)), e.dataTransfer.setData("cursor-grab-at", e.offsetY);
188
- } catch (P) {
189
- return console.warn("Vue Cal: Failed to set drag data:", P), e.preventDefault();
188
+ } catch (F) {
189
+ return console.warn("Vue Cal: Failed to set drag data:", F), e.preventDefault();
190
190
  }
191
191
  $e.eventId = k._.id, $e.fromVueCal = _, w("event-drag-start", {
192
192
  e,
@@ -221,45 +221,45 @@ function Vt(p) {
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
223
  cellDragDrop: async (e, k, i = !1) => {
224
- var E, l, X;
224
+ var S, l, X;
225
225
  e.preventDefault(), clearTimeout(ke.timeout), Object.assign(ke, { el: null, cell: null, timeout: null });
226
226
  const V = JSON.parse(e.dataTransfer.getData("event") || "{}");
227
227
  V.start && (V.start = new Date(V.start)), V.end && (V.end = new Date(V.end));
228
- let P, A, m;
229
- i ? (A = new Date(k.start), m = new Date(k.end)) : { start: A, end: m } = z(e, V, k.start);
230
- const { schedule: h } = ((E = e.target.closest("[data-schedule]")) == null ? void 0 : E.dataset) || {};
231
- let H = () => {
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 = () => {
232
232
  };
233
- $e.fromVueCal === _ ? (P = o.getEvent(V._.id), P && (P._.dragging = !1, H = (q) => {
234
- if (P.start = A, P.end = m, P.allDay = i, h !== void 0 && (P.schedule = ~~h), q && typeof q == "object") {
235
- const { _: ae, ...se } = q;
236
- Object.assign(P, se);
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;
236
+ Object.assign(F, se);
237
237
  }
238
- })) : (P = {
238
+ })) : (F = {
239
239
  ...V,
240
240
  start: A,
241
241
  end: m,
242
242
  ...h !== void 0 && { schedule: ~~h },
243
243
  _: { id: ((l = V._) == null ? void 0 : l.id) || V.id, duration: v(A, m) },
244
244
  getOverlappingEvents: () => o.getEventsInRange(A, m, { schedule: ~~h })
245
- }, H = (q) => {
246
- if (P = o.createEvent(P), q && typeof q == "object") {
247
- const { _: ae, ...se } = q;
248
- Object.assign(P, se);
245
+ }, z = (J) => {
246
+ if (F = o.createEvent(F), J && typeof J == "object") {
247
+ const { _: ae, ...se } = J;
248
+ Object.assign(F, se);
249
249
  }
250
250
  });
251
251
  let f = !0;
252
252
  const { drop: T } = (X = t.eventListeners) == null ? void 0 : X.event;
253
253
  T && (f = await T({
254
254
  e,
255
- event: { ...P, start: A, end: m, schedule: ~~h },
256
- overlaps: P.getOverlappingEvents({ start: A, end: m, schedule: ~~h }),
255
+ event: { ...F, start: A, end: m, schedule: ~~h },
256
+ overlaps: F.getOverlappingEvents({ start: A, end: m, schedule: ~~h }),
257
257
  cell: k,
258
258
  external: $e.fromVueCal !== _
259
- })), f !== !1 && H(f), k.highlighted = !1, k.highlightedSchedule = null, qe = !1, $e.toVueCal = _, w("event-dropped", {
259
+ })), f !== !1 && z(f), k.highlighted = !1, k.highlightedSchedule = null, qe = !1, $e.toVueCal = _, w("event-dropped", {
260
260
  e,
261
261
  cell: k,
262
- event: P,
262
+ event: F,
263
263
  originalEvent: V,
264
264
  external: $e.fromVueCal !== _
265
265
  });
@@ -268,11 +268,11 @@ function Vt(p) {
268
268
  }
269
269
  const lt = (p, t) => {
270
270
  let u, o, w, _ = {}, N = {};
271
- const d = ie(p), z = () => {
271
+ const d = ie(p), H = () => {
272
272
  d.value.today || (d.value = t), Date.prototype.addDays = function(n) {
273
- return F(this, n || 0);
273
+ return P(this, n || 0);
274
274
  }, Date.prototype.subtractDays = function(n) {
275
- return W(this, n || 0);
275
+ return I(this, n || 0);
276
276
  }, Date.prototype.addHours = function(n) {
277
277
  return a(this, n || 0);
278
278
  }, Date.prototype.subtractHours = function(n) {
@@ -284,22 +284,22 @@ const lt = (p, t) => {
284
284
  }, Date.prototype.getWeek = function() {
285
285
  return V(this);
286
286
  }, Date.prototype.isToday = function() {
287
- return P(this);
287
+ return F(this);
288
288
  }, Date.prototype.isLeapYear = function() {
289
289
  return h(this);
290
290
  }, Date.prototype.format = function(n = "YYYY-MM-DD") {
291
- return q(this, n);
291
+ return J(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
297
  }, c = (n) => {
298
- d.value = n, Date.prototype.subtractDays && z();
299
- }, y = () => (o !== (/* @__PURE__ */ new Date()).getDate() && (u = /* @__PURE__ */ new Date(), o = u.getDate(), w = `${u.getFullYear()}-${u.getMonth()}-${u.getDate()}`), w), F = (n, $) => {
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, $) => {
300
300
  const D = new Date(n.valueOf());
301
301
  return D.setDate(D.getDate() + $), D;
302
- }, W = (n, $) => {
302
+ }, I = (n, $) => {
303
303
  const D = new Date(n.valueOf());
304
304
  return D.setDate(D.getDate() - $), D;
305
305
  }, a = (n, $) => {
@@ -329,7 +329,7 @@ const lt = (p, t) => {
329
329
  D.setUTCDate(D.getUTCDate() + 4 - G);
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
- }, P = (n) => `${n.getFullYear()}-${n.getMonth()}-${n.getDate()}` === y(), A = (n, $) => {
332
+ }, F = (n) => `${n.getFullYear()}-${n.getMonth()}-${n.getDate()}` === y(), A = (n, $) => {
333
333
  if (!n || !$) return console.warn(`Vue Cal: missing date${n ? "2" : "1"} parameter for comparison with \`isSameDate(date1, date2)\`.`);
334
334
  if (X(n)) {
335
335
  if (!X($)) return console.warn(`Vue Cal: invalid date2 provided for comparison with \`isSameDate(date1, date2)\`: \`${$}\`.`);
@@ -338,14 +338,14 @@ const lt = (p, t) => {
338
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) => {
339
339
  const $ = n.getFullYear();
340
340
  return !($ % 400) || $ % 100 && !($ % 4);
341
- }, H = (n = null, $) => {
341
+ }, z = (n = null, $) => {
342
342
  const D = n && new Date(n.valueOf()) || /* @__PURE__ */ new Date(), G = $ ? 7 : 6;
343
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(), E = (n, $) => {
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, $) => {
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), q = (n, $ = "YYYY-MM-DD", D = null) => {
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) => {
349
349
  if (D || (D = d.value), $ || ($ = "YYYY-MM-DD"), $ === "YYYY-MM-DD") return ae(n);
350
350
  _ = {}, N = {};
351
351
  const G = {
@@ -363,15 +363,15 @@ const lt = (p, t) => {
363
363
  dd: () => ee(n, D).dd(),
364
364
  ddd: () => ee(n, D).ddd(),
365
365
  dddd: () => ee(n, D).dddd(),
366
- HH: () => re(n, D).HH,
367
- H: () => re(n, D).H,
368
- hh: () => re(n, D).hh,
369
- h: () => re(n, D).h,
370
- am: () => re(n, D).am,
371
- AM: () => re(n, D).AM,
372
- mm: () => re(n, D).mm,
373
- m: () => re(n, D).m,
374
- s: () => re(n, D).s
366
+ HH: () => oe(n, D).HH,
367
+ H: () => oe(n, D).H,
368
+ hh: () => oe(n, D).hh,
369
+ h: () => oe(n, D).h,
370
+ am: () => oe(n, D).am,
371
+ AM: () => oe(n, D).AM,
372
+ mm: () => oe(n, D).mm,
373
+ m: () => oe(n, D).m,
374
+ s: () => oe(n, D).s
375
375
  };
376
376
  return $.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (K, De) => {
377
377
  const r = G[De.replace(/\{|\}/g, "")];
@@ -383,14 +383,14 @@ const lt = (p, t) => {
383
383
  }, se = (n, $ = "HH:mm", D = null, G = !1) => {
384
384
  let K = !1;
385
385
  if (G) {
386
- const [S, O, M] = [n.getHours(), n.getMinutes(), n.getSeconds()];
387
- S + O + M === 141 && (K = !0);
386
+ const [Y, j, M] = [n.getHours(), n.getMinutes(), n.getSeconds()];
387
+ Y + j + M === 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 = re(n, D), r = $.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (S, O) => {
392
- const M = De[O.replace(/\{|\}/g, "")];
393
- return M !== void 0 ? M : O;
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;
394
394
  });
395
395
  return K ? r.replace("23:59", "24:00") : r;
396
396
  }, de = (n) => {
@@ -449,7 +449,7 @@ const lt = (p, t) => {
449
449
  dddd: () => $.weekDays[r]
450
450
  // Monday to Sunday.
451
451
  }, _;
452
- }, re = (n, $) => {
452
+ }, oe = (n, $) => {
453
453
  if (N.am) return N;
454
454
  let D, G, K;
455
455
  n instanceof Date ? (D = n.getHours(), G = n.getMinutes(), K = n.getSeconds()) : (D = Math.floor(n / 60), G = Math.floor(n % 60));
@@ -467,28 +467,28 @@ const lt = (p, t) => {
467
467
  }, N;
468
468
  };
469
469
  return {
470
- addDatePrototypes: z,
470
+ addDatePrototypes: H,
471
471
  removeDatePrototypes: v,
472
472
  updateTexts: c,
473
- addDays: F,
474
- subtractDays: W,
473
+ addDays: P,
474
+ subtractDays: I,
475
475
  addHours: a,
476
476
  subtractHours: s,
477
477
  addMinutes: e,
478
478
  subtractMinutes: k,
479
479
  snapToInterval: i,
480
480
  getWeek: V,
481
- isToday: P,
481
+ isToday: F,
482
482
  isSameDate: A,
483
483
  isInRange: m,
484
484
  isLeapYear: h,
485
- getPreviousFirstDayOfWeek: H,
485
+ getPreviousFirstDayOfWeek: z,
486
486
  stringToDate: f,
487
487
  dateToMinutes: T,
488
- countDays: E,
488
+ countDays: S,
489
489
  datesInSameTimeStep: l,
490
490
  isValid: X,
491
- formatDate: q,
491
+ formatDate: J,
492
492
  formatDateLite: ae,
493
493
  formatTime: se,
494
494
  formatTimeLite: de,
@@ -497,7 +497,7 @@ const lt = (p, t) => {
497
497
  }, Ot = (p) => {
498
498
  const { dateUtils: t, config: u } = p;
499
499
  let o = 0;
500
- const w = Y(() => {
500
+ const w = E(() => {
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.
@@ -533,7 +533,7 @@ const lt = (p, t) => {
533
533
  }, N = (a) => {
534
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) => {
535
535
  var e;
536
- return F(
536
+ return P(
537
537
  (s == null ? void 0 : s.start) || a.start,
538
538
  (s == null ? void 0 : s.end) || a.end,
539
539
  { excludeIds: [a._.id], schedule: (e = u.schedules) != null && e.length ? ~~((s == null ? void 0 : s.schedule) || a.schedule) : null }
@@ -543,10 +543,10 @@ const lt = (p, t) => {
543
543
  }, a._.unregister = () => {
544
544
  a._.$el = null, a._.register = null, a.isOverlapping = null, a.getOverlappingEvents = null, a.delete = null;
545
545
  };
546
- }, d = (a) => w.value.byId[a], z = (a) => {
546
+ }, d = (a) => w.value.byId[a], H = (a) => {
547
547
  const s = [];
548
548
  for (const { start: e, end: k } of a) {
549
- const i = F(e, k);
549
+ const i = P(e, k);
550
550
  i.length && s.push(...i);
551
551
  }
552
552
  return s;
@@ -557,13 +557,13 @@ const lt = (p, t) => {
557
557
  }
558
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
559
  }, c = async (a, s = 0) => {
560
- var P, A;
560
+ var F, A;
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
565
  const [m, h] = k[0];
566
- e = (P = u.events.find((H) => H[m] === h)) == null ? void 0 : P._.id;
566
+ e = (F = u.events.find((z) => z[m] === h)) == null ? void 0 : F._.id;
567
567
  }
568
568
  if (!u.editableEvents.delete)
569
569
  return console.info("Vue Cal: Event deletion is disabled. Enable it with the `editable-events` props.");
@@ -593,51 +593,51 @@ const lt = (p, t) => {
593
593
  }
594
594
  return !0;
595
595
  }, y = (a, s) => {
596
- const e = u.allDayEvents ? { allDay: !0 } : {}, k = F(a, s, { background: !1, ...e });
596
+ const e = u.allDayEvents ? { allDay: !0 } : {}, k = P(a, s, { background: !1, ...e });
597
597
  if (!k.length) return { cellOverlaps: {}, longestStreak: 0 };
598
598
  const i = {};
599
- let V = [], P = 0;
599
+ let V = [], F = 0;
600
600
  k.sort((A, m) => A.start - m.start || A.end - A.start - (m.end - m.start));
601
601
  for (const A of k) {
602
602
  const m = A._.id;
603
- i[m] || (i[m] = { overlaps: /* @__PURE__ */ new Set(), maxConcurrent: 1, position: 0 }), V = V.filter((E) => E.end > A.start);
604
- const h = V.filter((E) => {
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) => {
605
605
  var X;
606
- return (!((X = u.schedules) != null && X.length) || A.schedule === E.schedule) && E.start < A.end;
607
- }), H = new Set(h.map((E) => {
606
+ return (!((X = u.schedules) != null && X.length) || A.schedule === S.schedule) && S.start < A.end;
607
+ }), z = new Set(h.map((S) => {
608
608
  var l;
609
- return ((l = i[E._.id]) == null ? void 0 : l.position) ?? 0;
609
+ return ((l = i[S._.id]) == null ? void 0 : l.position) ?? 0;
610
610
  }));
611
611
  let f = 0;
612
- for (; H.has(f); ) f++;
612
+ for (; z.has(f); ) f++;
613
613
  i[m].position = f, V.push(A);
614
- const T = Math.max(1, ...h.map((E) => {
614
+ const T = Math.max(1, ...h.map((S) => {
615
615
  var l;
616
- return ((l = i[E._.id]) == null ? void 0 : l.maxConcurrent) ?? 1;
616
+ return ((l = i[S._.id]) == null ? void 0 : l.maxConcurrent) ?? 1;
617
617
  }));
618
618
  i[m].maxConcurrent = Math.max(h.length + 1, T);
619
- for (const E of h)
620
- i[E._.id].overlaps.add(m), i[m].overlaps.add(E._.id), i[E._.id].maxConcurrent = i[m].maxConcurrent;
621
- P = Math.max(P, i[m].maxConcurrent);
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);
622
622
  }
623
623
  for (const A in i) i[A].overlaps = [...i[A].overlaps];
624
- return { cellOverlaps: i, longestStreak: P };
625
- }, F = (a, s, { excludeIds: e = [], schedule: k = null, background: i = !0, allDay: V = !1 } = {}) => {
626
- const P = a.getFullYear(), A = s.getFullYear(), m = a.getMonth() + 1, h = s.getMonth() + 1, H = a.getDate(), f = s.getDate(), T = a.getTime(), E = s.getTime(), l = [], X = new Set(e);
627
- for (let q = P; q <= A; q++) {
628
- const ae = `${q}`, se = w.value.byYear[ae];
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];
629
629
  if (!se) continue;
630
- const de = q === P ? m : 1, Z = q === A ? h : 12;
630
+ const de = J === F ? m : 1, Z = J === A ? h : 12;
631
631
  for (let he = de; he <= Z; he++) {
632
- const ee = String(he).padStart(2, "0"), re = se[ee];
633
- if (re)
634
- for (const n in re) {
632
+ const ee = String(he).padStart(2, "0"), oe = se[ee];
633
+ if (oe)
634
+ for (const n in oe) {
635
635
  const $ = +n;
636
- if (q === P && he === m && $ < H || q === A && he === h && $ > f) continue;
637
- const D = re[n];
636
+ if (J === F && he === m && $ < z || J === A && he === h && $ > f) continue;
637
+ const D = oe[n];
638
638
  for (let G = 0; G < D.length; G++) {
639
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() < E && l.push(K);
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);
641
641
  }
642
642
  }
643
643
  }
@@ -647,28 +647,28 @@ const lt = (p, t) => {
647
647
  return {
648
648
  events: w,
649
649
  getEvent: d,
650
- getViewEvents: z,
650
+ getViewEvents: H,
651
651
  getCellOverlappingEvents: y,
652
- getEventsInRange: F,
652
+ getEventsInRange: P,
653
653
  createEvent: v,
654
654
  deleteEvent: c,
655
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(), P = 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 > P && i < A;
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;
658
658
  }
659
659
  };
660
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), z = ie(p.selectedDate || null), v = ie(/* @__PURE__ */ new Date()), c = ie(new Date(p.viewDate || v.value));
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
662
  c.value.setHours(0, 0, 0, 0);
663
663
  const y = ie(new Date(c));
664
- let F = null;
665
- const W = Y(() => d.value === "month" ? y.value : h.value), a = Y(() => d.value === "month" ? new Date(y.value.getFullYear(), y.value.getMonth() + 1, 0, 23, 59, 59, 999) : f.value), s = Y(() => d.value === "week" ? t.getPreviousFirstDayOfWeek(h.value, p.startWeekOnSunday) : d.value === "month" ? h.value : W.value), e = Y(() => {
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(() => {
666
666
  if (d.value === "week") {
667
667
  const g = t.addDays(s.value, 7);
668
668
  return g.setMilliseconds(-1), g;
669
669
  }
670
670
  return d.value === "month" ? f.value : a.value;
671
- }), k = Y(() => {
671
+ }), k = E(() => {
672
672
  const g = v.value.getTime();
673
673
  if (d.value === "week")
674
674
  return s.value.getTime() <= g && g <= e.value.getTime();
@@ -676,19 +676,19 @@ const lt = (p, t) => {
676
676
  return R <= g && g <= x;
677
677
  });
678
678
  function i() {
679
- v.value = /* @__PURE__ */ new Date(), F = setTimeout(i, 60 * 1e3);
679
+ v.value = /* @__PURE__ */ new Date(), P = setTimeout(i, 60 * 1e3);
680
680
  }
681
681
  function V() {
682
- F = setTimeout(i, (60 - (/* @__PURE__ */ new Date()).getSeconds()) * 1e3), i();
682
+ P = setTimeout(i, (60 - (/* @__PURE__ */ new Date()).getSeconds()) * 1e3), i();
683
683
  }
684
- const P = Y(() => {
684
+ const F = E(() => {
685
685
  if (!p.availableViews[d.value]) return 1;
686
686
  let g = p.availableViews[d.value].cols;
687
687
  return p.hasHiddenDays && ["week", "month"].includes(d.value) && (g -= p.hasHiddenDays), g;
688
- }), A = Y(() => {
688
+ }), A = E(() => {
689
689
  var g;
690
690
  return ((g = p.availableViews[d.value]) == null ? void 0 : g.rows) || 1;
691
- }), m = Y(() => P.value * A.value), h = Y(() => {
691
+ }), m = E(() => F.value * A.value), h = E(() => {
692
692
  if (d.value === "month") {
693
693
  let g = y.value.getDay() || 7;
694
694
  return p.startWeekOnSunday && !p.hideWeekdays[7] && (g += 1), p.viewDayOffset && (g -= p.viewDayOffset), t.subtractDays(y.value, g - 1);
@@ -699,7 +699,7 @@ const lt = (p, t) => {
699
699
  return p.startWeekOnSunday && !p.hideWeekdays[7] && (R = 1), p.viewDayOffset && (R += p.viewDayOffset), t.addDays(y.value, R - 1);
700
700
  }
701
701
  return y.value;
702
- }), H = Y(() => {
702
+ }), z = E(() => {
703
703
  const g = [], R = ["days", "week", "month"].includes(d.value);
704
704
  let x = 0;
705
705
  for (let Q = 0; Q < m.value + x; Q++)
@@ -731,10 +731,10 @@ const lt = (p, t) => {
731
731
  break;
732
732
  }
733
733
  return g;
734
- }), f = Y(() => H.value[H.value.length - 1].end), T = ie("right"), E = Y(() => {
734
+ }), f = E(() => z.value[z.value.length - 1].end), T = ie("right"), S = E(() => {
735
735
  const g = Object.keys(p.availableViews);
736
736
  return g[g.indexOf(d.value) + 1];
737
- }), l = Y(() => {
737
+ }), l = E(() => {
738
738
  const g = Object.keys(p.availableViews);
739
739
  return g[g.indexOf(d.value) - 1];
740
740
  });
@@ -743,11 +743,11 @@ const lt = (p, t) => {
743
743
  const Q = R[g];
744
744
  return x && typeof Q == "string" ? Q.substring(0, 3) : Q;
745
745
  }
746
- function q(g, R, x) {
747
- const { monthsArray: Q, monthBeforeDay: fe, canTruncate: Ae, xs: Ve } = x, Me = g.getMonth(), Ye = g.getFullYear(), Ee = R.getMonth(), ze = R.getFullYear(), We = Me !== Ee, _t = Ye !== ze, be = Ae && (Ve || We), Fe = g.getDate(), Pe = R.getDate();
748
- return _t ? fe ? `${X(Me, Q, be)} ${Fe}, ${Ye} - ${X(Ee, Q, be)} ${Pe}, ${ze}` : `${Fe} ${X(Me, Q, be)} ${Ye} - ${Pe} ${X(Ee, Q, be)} ${ze}` : We ? fe ? `${X(Me, Q, be)} ${Fe} - ${X(Ee, Q, be)} ${Pe}, ${Ye}` : `${Fe} ${X(Me, Q, be)} - ${Pe} ${X(Ee, Q, be)} ${Ye}` : fe ? `${X(Me, Q, be)} ${Fe}-${Pe}, ${Ye}` : `${Fe}-${Pe} ${X(Me, Q, be)} ${Ye}`;
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}`;
749
749
  }
750
- const ae = Y(() => {
750
+ const ae = E(() => {
751
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;
752
752
  switch (d.value) {
753
753
  case "day":
@@ -760,19 +760,19 @@ const lt = (p, t) => {
760
760
  canTruncate: Ve,
761
761
  xs: p.xs
762
762
  };
763
- let ze = q(h.value, f.value, Ee);
763
+ let He = J(h.value, f.value, Ee);
764
764
  if (d.value === "week") {
765
765
  const We = t.getWeek(
766
766
  h.value,
767
767
  p.startWeekOnSunday && !p.hideWeekdays[7]
768
768
  );
769
- ze += ` <small>${Q} ${We}</small>`;
769
+ He += ` <small>${Q} ${We}</small>`;
770
770
  }
771
- return ze;
771
+ return He;
772
772
  }
773
773
  case "month": {
774
774
  const Ee = `${p.xs && Ve ? "MMM" : "MMMM"} YYYY`;
775
- return t.formatDate(W.value, Ee);
775
+ return t.formatDate(I.value, Ee);
776
776
  }
777
777
  case "year":
778
778
  return h.value.getFullYear();
@@ -802,13 +802,13 @@ const lt = (p, t) => {
802
802
  p.ready && u("view-change", {
803
803
  id: d.value,
804
804
  title: ae.value,
805
- start: W.value,
805
+ start: I.value,
806
806
  end: a.value,
807
807
  extendedStart: s.value,
808
808
  extendedEnd: e.value,
809
- cellDates: H.value,
809
+ cellDates: z.value,
810
810
  containsToday: k.value,
811
- events: J.value
811
+ events: q.value
812
812
  }), v.value = /* @__PURE__ */ new Date();
813
813
  }
814
814
  function de(g) {
@@ -820,12 +820,12 @@ const lt = (p, t) => {
820
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.`));
821
821
  }
822
822
  function he() {
823
- E.value ? Z(E.value) : console.warn("Vue Cal: no broader view is available.");
823
+ S.value ? Z(S.value) : console.warn("Vue Cal: no broader view is available.");
824
824
  }
825
825
  function ee() {
826
826
  l.value ? Z(l.value) : console.warn("Vue Cal: no narrower view is available.");
827
827
  }
828
- function re() {
828
+ function oe() {
829
829
  $(!1);
830
830
  }
831
831
  function n() {
@@ -867,12 +867,12 @@ const lt = (p, t) => {
867
867
  function G(g, R = !0, x = !1) {
868
868
  if (!t.isValid(g)) return console.warn("Vue Cal: can't navigate to the given date: invalid date provided to `updateViewDate(date)`.");
869
869
  let [Q, fe] = [h.value, f.value];
870
- d.value === "month" && ([Q, fe] = [W.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());
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());
871
871
  }
872
872
  function K(g, R = !0) {
873
873
  if (!t.isValid(g)) 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
- (!z.value || !x(z.value) || !Q(g, z.value)) && (g.setHours(0, 0, 0, 0), z.value = g, R && u("update:selectedDate", g));
875
+ (!H.value || !x(H.value) || !Q(g, H.value)) && (g.setHours(0, 0, 0, 0), H.value = g, R && u("update:selectedDate", g));
876
876
  }
877
877
  function De(g) {
878
878
  !g && !y.value.getDay() ? G(t.addDays(y.value, 1), !0, !0) : (T.value = "left", se());
@@ -880,34 +880,34 @@ const lt = (p, t) => {
880
880
  function r(g) {
881
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);
882
882
  }
883
- function S() {
883
+ function Y() {
884
884
  console.log("toggling weekdays", p.hideWeekdays);
885
885
  }
886
- function O(g) {
886
+ function j(g) {
887
887
  var Q;
888
888
  const R = (Q = _.value) == null ? void 0 : Q.querySelector(".vuecal__scrollable"), x = g ? g * p.timeCellHeight / p.timeStep : 0;
889
889
  R == null || R.scrollTo({ top: x, behavior: "smooth" });
890
890
  }
891
891
  function M() {
892
892
  const g = /* @__PURE__ */ new Date();
893
- O(g.getHours() * 60 + g.getMinutes());
893
+ j(g.getHours() * 60 + g.getMinutes());
894
894
  }
895
- function I() {
896
- O(0);
895
+ function B() {
896
+ j(0);
897
897
  }
898
- const J = Y(() => w.getViewEvents(H.value)), oe = 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, S), me(() => m.value, () => {
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, () => {
900
900
  m.value > 90 && console.warn("Vue Cal: high cell count detected. Performance may degrade when interactions are enabled.");
901
901
  }), me(() => p.watchRealTime, (g) => {
902
- g && p.time ? V() : F = clearTimeout(F);
903
- }), se(), p.time && p.watchRealTime && V(), Be(() => F = clearTimeout(F)), {
902
+ g && p.time ? V() : P = clearTimeout(P);
903
+ }), se(), p.time && p.watchRealTime && V(), Be(() => P = clearTimeout(P)), {
904
904
  now: v,
905
905
  id: d,
906
- broaderView: E,
906
+ broaderView: S,
907
907
  narrowerView: l,
908
908
  title: ae,
909
909
  viewDate: c,
910
- start: W,
910
+ start: I,
911
911
  end: a,
912
912
  extendedStart: s,
913
913
  // Full range, including out of scope month days, and hidden leading/trailing days.
@@ -916,28 +916,28 @@ const lt = (p, t) => {
916
916
  firstCellDate: h,
917
917
  lastCellDate: f,
918
918
  containsToday: k,
919
- selectedDate: z,
920
- cellDates: H,
921
- cols: P,
919
+ selectedDate: H,
920
+ cellDates: z,
921
+ cols: F,
922
922
  rows: A,
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: J,
926
+ events: q,
927
927
  transitionDirection: T,
928
928
  switch: Z,
929
929
  broader: he,
930
930
  narrower: ee,
931
- previous: re,
931
+ previous: oe,
932
932
  next: n,
933
933
  navigate: $,
934
934
  goToToday: D,
935
935
  updateViewDate: G,
936
936
  updateSelectedDate: K,
937
937
  scrollToCurrentTime: M,
938
- scrollToTime: O,
939
- scrollTop: I,
940
- createEvent: oe,
938
+ scrollToTime: j,
939
+ scrollTop: B,
940
+ createEvent: re,
941
941
  deleteEvent: we,
942
942
  // Getters.
943
943
  get isDay() {
@@ -1000,7 +1000,7 @@ 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
- }), Ht = ({ props: p, emit: t, attrs: u, vuecalEl: o, uid: w }) => {
1003
+ }), zt = ({ props: p, emit: t, attrs: u, vuecalEl: o, uid: w }) => {
1004
1004
  const _ = Te({
1005
1005
  uid: w,
1006
1006
  // The Vuecal instance unique ID, used for dnd source-target identification.
@@ -1026,7 +1026,7 @@ const lt = (p, t) => {
1026
1026
  }
1027
1027
  });
1028
1028
  return _.dateUtils = lt(Object.assign(ge.texts, _.texts), Qe), _.config = Ct(_, p, u), _.eventsManager = Ot(_), _.view = jt(_, o), _.dnd = Vt(_), _;
1029
- }, zt = 24 * 60, Ft = {
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.
1032
1032
  stackEvents: { type: Boolean, default: !1 },
@@ -1091,7 +1091,7 @@ const lt = (p, t) => {
1091
1091
  // Start time of the time column, in minutes.
1092
1092
  timeStep: { type: Number, default: 60 },
1093
1093
  // Step amount for the time in the time column, in minutes.
1094
- timeTo: { type: Number, default: zt },
1094
+ timeTo: { type: Number, default: Ht },
1095
1095
  // End time of the time column, in minutes.
1096
1096
  titleBar: { type: Boolean, default: !0 },
1097
1097
  // Show or hide the header title bar.
@@ -1123,7 +1123,7 @@ const lt = (p, t) => {
1123
1123
  // minScheduleWidth: { type: Number, default: 0 },
1124
1124
  // overlapsPerTimeStep: { type: Boolean, default: false },
1125
1125
  // resizeX: { type: Boolean, default: false },
1126
- }, Pt = { class: "vuecal__header" }, Nt = {
1126
+ }, Ft = { class: "vuecal__header" }, Nt = {
1127
1127
  key: 0,
1128
1128
  class: "vuecal__views-bar"
1129
1129
  }, At = ["onClick", "innerHTML"], Bt = {
@@ -1132,18 +1132,18 @@ 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 = He("vuecal"), { view: u, config: o } = t, w = () => {
1135
+ const t = ze("vuecal"), { view: u, config: o } = t, w = () => {
1136
1136
  o.clickToNavigate && u.broader();
1137
- }, _ = Y(() => o.clickToNavigate ? { click: w } : {});
1138
- return (N, d) => (C(), L("div", Pt, [
1139
- j(N.$slots, "header", {
1137
+ }, _ = E(() => o.clickToNavigate ? { click: w } : {});
1138
+ return (N, d) => (C(), L("div", Ft, [
1139
+ O(N.$slots, "header", {
1140
1140
  view: b(u),
1141
1141
  availableViews: b(o).availableViews,
1142
1142
  vuecal: b(t)
1143
1143
  }),
1144
1144
  N.$slots.header ? U("", !0) : (C(), L(ue, { key: 0 }, [
1145
1145
  b(o).viewsBar ? (C(), L("div", Nt, [
1146
- (C(!0), L(ue, null, pe(b(o).availableViews, (z, v) => (C(), L("button", {
1146
+ (C(!0), L(ue, null, pe(b(o).availableViews, (H, v) => (C(), L("button", {
1147
1147
  class: ye(["vuecal__view-button", { "vuecal__view-button--active": b(u).id === v }]),
1148
1148
  onClick: (c) => b(u).switch(v),
1149
1149
  innerHTML: b(t).texts[v],
@@ -1153,16 +1153,16 @@ const lt = (p, t) => {
1153
1153
  b(o).titleBar ? (C(), L("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] = (...z) => b(u).previous && b(u).previous(...z)),
1156
+ onClick: d[0] || (d[0] = (...H) => b(u).previous && b(u).previous(...H)),
1157
1157
  type: "button"
1158
1158
  }, [
1159
- j(N.$slots, "previous-button")
1159
+ O(N.$slots, "previous-button")
1160
1160
  ], 2),
1161
1161
  ve("div", Wt, [
1162
1162
  je(Ge, {
1163
1163
  name: `vuecal-slide-fade--${b(u).transitionDirection}`
1164
1164
  }, {
1165
- default: B(() => [
1165
+ default: W(() => [
1166
1166
  (C(), L("div", {
1167
1167
  key: b(u).id + b(u).start.getTime()
1168
1168
  }, [
@@ -1170,8 +1170,8 @@ const lt = (p, t) => {
1170
1170
  key: 0,
1171
1171
  class: "vuecal__title"
1172
1172
  }, Re(_.value)), {
1173
- default: B(() => [
1174
- N.$slots[`title.${b(u).id}`] ? j(N.$slots, `title.${b(u).id}`, te(le({ key: 0 }, b(u)))) : j(N.$slots, "title", te(le({ key: 1 }, b(u))))
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))))
1175
1175
  ]),
1176
1176
  _: 3
1177
1177
  }, 16)) : (C(), Se(xe(b(o).clickToNavigate && b(u).broaderView ? "button" : "div"), le({
@@ -1186,14 +1186,14 @@ const lt = (p, t) => {
1186
1186
  }, 8, ["name"])
1187
1187
  ]),
1188
1188
  b(o).todayButton ? (C(), L(ue, { key: 0 }, [
1189
- N.$slots["today-button"] ? j(N.$slots, "today-button", {
1189
+ N.$slots["today-button"] ? O(N.$slots, "today-button", {
1190
1190
  key: 0,
1191
1191
  navigate: () => !b(u).containsToday && b(u).goToToday(),
1192
1192
  active: b(u).containsToday
1193
1193
  }) : (C(), L("button", {
1194
1194
  key: 1,
1195
1195
  class: ye(["vuecal__nav vuecal__nav--today vuecal__nav--default", { "vuecal__nav--active": b(u).containsToday }]),
1196
- onClick: d[1] || (d[1] = (z) => !b(u).containsToday && b(u).goToToday()),
1196
+ onClick: d[1] || (d[1] = (H) => !b(u).containsToday && b(u).goToToday()),
1197
1197
  disabled: !!b(u).containsToday,
1198
1198
  type: "button",
1199
1199
  innerHTML: b(t).texts.today
@@ -1201,10 +1201,10 @@ const lt = (p, t) => {
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] = (...z) => b(u).next && b(u).next(...z)),
1204
+ onClick: d[2] || (d[2] = (...H) => b(u).next && b(u).next(...H)),
1205
1205
  type: "button"
1206
1206
  }, [
1207
- j(N.$slots, "next-button")
1207
+ O(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 } = He("vuecal"), d = p, z = ie(null), v = Te(d.event), c = Te({
1230
+ const { config: u, view: o, dnd: w, touch: _, dateUtils: N } = ze("vuecal"), d = p, H = ie(null), v = Te(d.event), c = Te({
1231
1231
  dragging: !1,
1232
1232
  resizing: !1,
1233
1233
  fromResizer: !1,
@@ -1261,17 +1261,17 @@ 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 = Y(() => u.editableEvents.drag && v.draggable !== !1 && !v.background), F = Y(() => o.isMonth || o.isYear || o.isYears || d.inAllDayBar ? !1 : u.time && u.editableEvents.resize && v.resizable !== !1 && !v.background);
1265
- Y(() => u.editableEvents.delete && v.deletable !== !1 && !v.background);
1266
- const W = Y(() => {
1267
- var m, h, H, f, T;
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;
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
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": !!((H = v._) != null && H.multiday),
1274
+ "vuecal__event--multiday": !!((z = v._) != null && z.multiday),
1275
1275
  "vuecal__event--cut-top": !d.inAllDayBar && ((f = v._) == null ? void 0 : f.startMinutes) < u.timeFrom,
1276
1276
  "vuecal__event--cut-bottom": !d.inAllDayBar && ((T = v._) == null ? void 0 : T.endMinutes) > u.timeTo || v._.multiday,
1277
1277
  // Only apply the dragging class on the event copy that is being dragged.
@@ -1285,7 +1285,7 @@ const lt = (p, t) => {
1285
1285
  "vuecal__event--dragging-ghost": v._.draggingGhost,
1286
1286
  "vuecal__event--resizing": c.resizing
1287
1287
  };
1288
- }), a = Y(() => {
1288
+ }), a = E(() => {
1289
1289
  const m = (o.isDay || o.isDays || o.isWeek) && u.time && !d.inAllDayBar;
1290
1290
  if (!m && !v.backgroundColor && !v.color) return !1;
1291
1291
  const h = {
@@ -1293,15 +1293,15 @@ const lt = (p, t) => {
1293
1293
  color: v.color || null
1294
1294
  };
1295
1295
  if (m) {
1296
- const H = Math.max(u.timeFrom, v._.startMinutes), f = Math.min(u.timeTo, v._.endMinutes) + (v._.duration && !v._.endMinutes ? 24 * 60 : 0), T = Oe(H, u), E = Oe(f, u) - T;
1297
- h.top = `${T}%`, h.height = `${E}%`;
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}%`;
1298
1298
  }
1299
1299
  return h;
1300
- }), s = Y(() => {
1300
+ }), s = E(() => {
1301
1301
  const m = { ...u.eventListeners.event };
1302
1302
  for (const [f, T] of Object.entries(m))
1303
- ["resize-end"].includes(f) || (m[f] = (E) => {
1304
- E.type !== "drop" && T(E.type ? { e: E, event: v } : E);
1303
+ ["resize-end"].includes(f) || (m[f] = (S) => {
1304
+ S.type !== "drop" && T(S.type ? { e: S, event: v } : S);
1305
1305
  });
1306
1306
  const h = { ...m };
1307
1307
  m.touchstart = (f) => {
@@ -1311,55 +1311,55 @@ const lt = (p, t) => {
1311
1311
  var T;
1312
1312
  f.stopPropagation(), e(f), (T = h.mousedown) == null || T.call(h, { e: f, event: v });
1313
1313
  };
1314
- let H = null;
1314
+ let z = null;
1315
1315
  return m.click = (f) => {
1316
1316
  var T;
1317
- (T = h.click) == null || T.call(h, { e: f, event: v }), H ? H = clearTimeout(H) : H = setTimeout(() => {
1318
- var E;
1319
- H = null, (E = h["delayed-click"]) == null || E.call(h, { e: f, event: v });
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 });
1320
1320
  }, 400);
1321
1321
  }, m.dblclick = (f) => {
1322
1322
  h.dblclick ? h.dblclick({ e: f, event: v }) : v.delete(1);
1323
1323
  }, m;
1324
1324
  }), e = (m) => {
1325
- var f, T, E;
1325
+ var f, T, S;
1326
1326
  const h = ((f = m.touches) == null ? void 0 : f[0]) || m;
1327
1327
  c.fromResizer = h.target.matches(".vuecal__event-resizer, .vuecal__event-resizer *");
1328
- const H = z.value.getBoundingClientRect();
1329
- c.startX = (((T = m.touches) == null ? void 0 : T[0]) || m).clientX - H.left, c.startY = (((E = m.touches) == null ? void 0 : E[0]) || m).clientY - H.top, c.startPercentageX = c.startX * 100 / H.width, c.startPercentageY = c.startY * 100 / H.height, c.cellEl = z.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(() => {
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
1330
  var l, X;
1331
1331
  c.holding = !0, (X = (l = s.value).hold) == null || X.call(l, { e: m, event: v });
1332
1332
  }, 1e3);
1333
1333
  }, k = async (m) => {
1334
- var H, f, T, E;
1335
- const h = ((H = m.touches) == null ? void 0 : H[0]) || m;
1334
+ var z, f, T, S;
1335
+ const h = ((z = m.touches) == null ? void 0 : z[0]) || m;
1336
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: q, height: ae } = c.cellEl.getBoundingClientRect();
1338
- c.moveX = h.clientX - X, c.moveY = h.clientY - l, c.movePercentageX = c.moveX * 100 / q, c.movePercentageY = c.moveY * 100 / ae;
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;
1339
1339
  }
1340
1340
  if (c.fromResizer) {
1341
1341
  const { newStart: l, newEnd: X } = V(v);
1342
- let q = !0;
1343
- const { resize: ae } = (E = u.eventListeners) == null ? void 0 : E.event;
1344
- ae && (q = await ae({
1342
+ let J = !0;
1343
+ const { resize: ae } = (S = u.eventListeners) == null ? void 0 : S.event;
1344
+ ae && (J = await ae({
1345
1345
  e: m,
1346
1346
  event: { ...v, start: l, end: X },
1347
1347
  overlaps: v.getOverlappingEvents({ start: l, end: X })
1348
- })), q !== !1 ? (v.start = l, v.end = X, c.resizingLastAcceptedEvent && (c.resizingLastAcceptedEvent = null)) : ae && (c.resizingLastAcceptedEvent = { ...v, _: { ...v._ } });
1348
+ })), J !== !1 ? (v.start = l, v.end = X, c.resizingLastAcceptedEvent && (c.resizingLastAcceptedEvent = null)) : ae && (c.resizingLastAcceptedEvent = { ...v, _: { ...v._ } });
1349
1349
  }
1350
1350
  }, i = async (m) => {
1351
- var h, H;
1351
+ var h, z;
1352
1352
  if (c.holdTimer = clearTimeout(c.holdTimer), c.holding = !1, c.resizing) {
1353
1353
  const { newStart: f, newEnd: T } = V(v);
1354
- let E = !0;
1354
+ let S = !0;
1355
1355
  const l = s.value["resize-end"];
1356
- l && (E = await l({
1356
+ l && (S = await l({
1357
1357
  e: m,
1358
1358
  event: v,
1359
1359
  original: c.resizingOriginalEvent,
1360
1360
  // Original event details before resizing.
1361
1361
  overlaps: v.getOverlappingEvents({ start: f, end: T })
1362
- })), v.start = E === !1 ? (c.resizingLastAcceptedEvent || c.resizingOriginalEvent).start : ((h = c.resizingLastAcceptedEvent) == null ? void 0 : h.start) || f, v.end = E === !1 ? (c.resizingLastAcceptedEvent || c.resizingOriginalEvent).end : ((H = c.resizingLastAcceptedEvent) == null ? void 0 : H.end) || T, v._.duration < 1 && (v.start = c.resizingOriginalEvent.start, v.end = c.resizingOriginalEvent.end), _.isResizingEvent = !1;
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;
1363
1363
  }
1364
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
1365
  }, V = (m) => {
@@ -1370,32 +1370,32 @@ const lt = (p, t) => {
1370
1370
  const l = f + u.snapToInterval / 2;
1371
1371
  f = l - l % u.snapToInterval;
1372
1372
  }
1373
- let T = m.start, E = new Date(h.getTime() + f * 6e4);
1374
- return E < c.resizeStartDate && (T = E, E = c.resizeStartDate), { newStart: T, newEnd: E };
1375
- }, P = [], A = (m, h, H) => {
1376
- document.addEventListener(m, h, H), P.push({ event: m, handler: h, options: H });
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 });
1377
1377
  };
1378
- return Ze(() => v._.register(z.value)), Be(() => {
1378
+ return Ze(() => v._.register(H.value)), Be(() => {
1379
1379
  v._.unregister();
1380
- for (const { event: m, handler: h, options: H } of P)
1381
- document.removeEventListener(m, h, H);
1380
+ for (const { event: m, handler: h, options: z } of F)
1381
+ document.removeEventListener(m, h, z);
1382
1382
  }), (m, h) => (C(), L("div", le({ class: "vuecal__event" }, Re(s.value, !0), {
1383
1383
  ref_key: "eventEl",
1384
- ref: z,
1385
- class: W.value,
1384
+ ref: H,
1385
+ class: I.value,
1386
1386
  style: a.value,
1387
1387
  draggable: y.value ? "true" : void 0,
1388
- onDragstart: h[2] || (h[2] = (H) => y.value && b(w).eventDragStart(H, v)),
1389
- onDragend: h[3] || (h[3] = (H) => y.value && b(w).eventDragEnd(H, v))
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))
1390
1390
  }), [
1391
1391
  ve("div", Gt, [
1392
- m.$slots["event.all-day"] ? j(m.$slots, "event.all-day", {
1392
+ m.$slots["event.all-day"] ? O(m.$slots, "event.all-day", {
1393
1393
  key: 0,
1394
1394
  event: v
1395
- }) : m.$slots[`event.${b(o).id}`] ? j(m.$slots, `event.${b(o).id}`, {
1395
+ }) : m.$slots[`event.${b(o).id}`] ? O(m.$slots, `event.${b(o).id}`, {
1396
1396
  key: 1,
1397
1397
  event: v
1398
- }) : j(m.$slots, "event", {
1398
+ }) : O(m.$slots, "event", {
1399
1399
  key: 2,
1400
1400
  event: v
1401
1401
  }, () => [
@@ -1412,18 +1412,18 @@ const lt = (p, t) => {
1412
1412
  }, null, 8, Qt))
1413
1413
  ])
1414
1414
  ]),
1415
- F.value ? (C(), L("div", {
1415
+ P.value ? (C(), L("div", {
1416
1416
  key: 0,
1417
1417
  class: "vuecal__event-resizer",
1418
1418
  onDragstart: h[0] || (h[0] = et(() => {
1419
1419
  }, ["prevent", "stop"]))
1420
1420
  }, null, 32)) : U("", !0),
1421
1421
  je(Ge, { name: "vuecal-delete-btn" }, {
1422
- default: B(() => [
1422
+ default: W(() => [
1423
1423
  v._.deleting ? (C(), L("div", {
1424
1424
  key: 0,
1425
1425
  class: "vuecal__event-delete",
1426
- onClick: h[1] || (h[1] = et((H) => v.delete(3), ["stop"]))
1426
+ onClick: h[1] || (h[1] = et((z) => 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 = He("vuecal"), { view: o, config: w, dateUtils: _, eventsManager: N, dnd: d, touch: z } = u, v = Y(() => _.isToday(t.start)), c = ie(null), y = ie([]), F = ie(!1), W = (r) => {
1467
- y.value.push(r.detail), F.value = !0;
1468
- }, a = () => setTimeout(() => F.value = !1, 300), s = Te({
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({
1469
1469
  dragging: !1,
1470
1470
  holding: !1,
1471
1471
  // When the cell is clicked and hold for a certain amount of time.
@@ -1486,44 +1486,44 @@ 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 = Y(() => {
1490
- let r = Math.min(s.startPercentageY, s.movePercentageY), S = Math.max(s.startPercentageY, s.movePercentageY), O = Le(r, w), M = Le(S, w);
1491
- return w.snapToInterval && (O = _.snapToInterval(O, w.snapToInterval), M = _.snapToInterval(M, w.snapToInterval), r = Oe(O, w), S = Oe(M, w)), {
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)), {
1492
1492
  style: {
1493
1493
  top: `${r}%`,
1494
- height: `${Math.abs(S - r)}%`
1494
+ height: `${Math.abs(Y - r)}%`
1495
1495
  },
1496
- startMinutes: O,
1496
+ startMinutes: j,
1497
1497
  endMinutes: M,
1498
- start: _.formatMinutes(O),
1498
+ start: _.formatMinutes(j),
1499
1499
  end: _.formatMinutes(M),
1500
1500
  ...s.schedule ? { schedule: s.schedule } : {}
1501
1501
  };
1502
- }), V = Y(() => {
1503
- const r = w.editableEvents.create && (s.dragging || e.value), S = w.eventCreateMinDrag && s.thresholdPassed || !w.eventCreateMinDrag;
1504
- return r && S;
1505
- }), P = Y(() => {
1506
- var oe;
1507
- const r = /* @__PURE__ */ new Date(), S = o.start.getFullYear(), O = o.start.getMonth(), M = t.start.getFullYear(), I = t.start.getMonth();
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(() => {
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();
1508
1508
  return {
1509
1509
  [`vuecal__cell--${Xe[t.start.getDay()]}`]: o.isDay || o.isDays || o.isWeek || o.isMonth,
1510
- [`vuecal__cell--${Et[I]}`]: o.isYear,
1510
+ [`vuecal__cell--${Et[B]}`]: o.isYear,
1511
1511
  [`vuecal__cell--${M}`]: o.isYears,
1512
1512
  "vuecal__cell--today": v.value,
1513
- "vuecal__cell--current-month": o.isYear && M === r.getFullYear() && I === r.getMonth(),
1513
+ "vuecal__cell--current-month": o.isYear && M === r.getFullYear() && B === r.getMonth(),
1514
1514
  "vuecal__cell--current-year": o.isYears && M === r.getFullYear(),
1515
- "vuecal__cell--out-of-range": o.isMonth && (M !== S || I !== O),
1515
+ "vuecal__cell--out-of-range": o.isMonth && (M !== Y || B !== j),
1516
1516
  "vuecal__cell--before-min": ae.value && X.value,
1517
- "vuecal__cell--after-max": ae.value && q.value,
1517
+ "vuecal__cell--after-max": ae.value && J.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
- "vuecal__cell--has-schedules": (oe = w.schedules) == null ? void 0 : oe.length,
1520
+ "vuecal__cell--has-schedules": (re = w.schedules) == null ? void 0 : re.length,
1521
1521
  "vuecal__cell--dragging": s.dragging,
1522
1522
  "vuecal__cell--has-events": m.value.length
1523
1523
  };
1524
1524
  });
1525
- Y(() => _.formatDate(t.start));
1526
- const A = Y(() => {
1525
+ E(() => _.formatDate(t.start));
1526
+ const A = E(() => {
1527
1527
  switch (o.id) {
1528
1528
  case "day":
1529
1529
  return "";
@@ -1538,88 +1538,88 @@ const lt = (p, t) => {
1538
1538
  case "years":
1539
1539
  return _.formatDate(t.start, "YYYY");
1540
1540
  }
1541
- }), m = Y(() => w.datePicker ? [] : N.getEventsInRange(
1541
+ }), m = E(() => w.datePicker ? [] : N.getEventsInRange(
1542
1542
  t.start,
1543
1543
  t.end,
1544
1544
  { excludeIds: y.value, ...w.allDayEvents ? { allDay: t.allDay } : {} }
1545
- )), h = Y(() => m.value.filter((r) => !r.background)), H = Y(() => {
1545
+ )), h = E(() => m.value.filter((r) => !r.background)), z = E(() => {
1546
1546
  var r;
1547
- return (r = w.schedules) == null ? void 0 : r.reduce((S, O) => (S[O.id] = m.value.filter((M) => M.schedule === O.id), S), {});
1548
- }), f = Y(() => {
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(() => {
1549
1549
  if (o.isMonth || o.isYear || o.isYears || t.allDay) return {};
1550
- const r = {};
1551
- for (const S of m.value) {
1552
- const O = S._.id, { maxConcurrent: M = 1, position: I = 0 } = k.value.cellOverlaps[O] || {};
1553
- r[O] = { left: `${100 / M * I}%` }, w.stackEvents ? r[O].width = `${100 / M + (I === M - 1 ? 0 : 15)}%` : r[O].width = `${100 / M}%`;
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}%`;
1554
1554
  }
1555
- return r;
1556
- }), T = Y(() => {
1555
+ return Y;
1556
+ }), T = E(() => {
1557
1557
  const r = {};
1558
- for (const S of m.value) {
1559
- const O = S._.id, { maxConcurrent: M = 1, position: I = 0 } = k.value.cellOverlaps[O] || {};
1560
- r[O] = `vuecal__event--stack-${I + 1}-${M}`;
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}`;
1561
1561
  }
1562
1562
  return r;
1563
- }), E = Y(() => w.showCellEventCount && h.value.length), l = Y(() => {
1564
- var O;
1563
+ }), S = E(() => w.showCellEventCount && h.value.length), l = E(() => {
1564
+ var j;
1565
1565
  if (!w.specialHours || o.isMonth || o.isYear || o.isYears || t.allDay) return;
1566
1566
  const r = Xe[t.start.getDay()];
1567
- let S = (O = w.specialHours) == null ? void 0 : O[r];
1568
- if (S)
1569
- return Array.isArray(S) || (S = [S]), S.map((M) => {
1570
- let { from: I, to: J, class: oe, label: we } = M;
1571
- if (isNaN(I) || isNaN(J) || w.timeFrom >= J || w.timeTo <= I) return;
1572
- I = Math.max(w.timeFrom, I), J = Math.min(w.timeTo, J);
1573
- const g = Oe(I, w), R = Oe(J, w) - g;
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;
1574
1574
  return {
1575
1575
  style: { top: `${g}%`, height: `${R}%` },
1576
1576
  label: we,
1577
- class: oe
1577
+ class: re
1578
1578
  };
1579
1579
  }).filter((M) => !!M);
1580
- }), X = Y(() => w.minTimestamp !== null && w.minTimestamp > t.end.getTime()), q = Y(() => w.maxTimestamp && w.maxTimestamp < t.start.getTime()), ae = Y(() => {
1581
- const { disableDays: r } = w, S = o.isYear || o.isYears;
1582
- return r.length && r.includes(_.formatDate(t.start)) && !S ? !0 : X.value || q.value;
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;
1583
1583
  }), se = Te({
1584
- show: Y(() => {
1584
+ show: E(() => {
1585
1585
  if (!(!o.isDay && !o.isDays && !o.isWeek) && !(!v.value || !w.time || t.allDay) && !(w.timeFrom > _.dateToMinutes(o.now)) && !(_.dateToMinutes(o.now) > w.timeTo))
1586
1586
  return !0;
1587
1587
  }),
1588
- nowInMinutes: Y(() => _.dateToMinutes(o.now)),
1589
- todaysTimePosition: Y(() => Oe(se.nowInMinutes, w)),
1590
- style: Y(() => `top: ${se.todaysTimePosition}%`),
1591
- currentTime: Y(() => _.formatTime(o.now))
1592
- }), de = Y(() => {
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(() => {
1593
1593
  if (ae.value) return {};
1594
1594
  const r = { ...w.eventListeners.cell };
1595
- for (const [M, I] of Object.entries(r))
1596
- r[M] = (J) => {
1597
- var oe, we, g;
1598
- (g = (we = J.target || ((oe = J.e) == null ? void 0 : oe.target)).closest) != null && g.call(we, ".vuecal__event") || I(J.type ? { e: J, cell: Z.value, cursor: ee.value } : J);
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);
1599
1599
  };
1600
- const S = { ...r };
1601
- let O = null;
1600
+ const Y = { ...r };
1601
+ let j = null;
1602
1602
  return r.click = (M) => {
1603
- var J;
1604
- re();
1605
- const I = he(M);
1606
- (J = S.click) == null || J.call(S, { e: M, cell: Z.value, cursor: I }), O ? O = clearTimeout(O) : O = setTimeout(() => {
1607
- var oe;
1608
- O = null, (oe = S["delayed-click"]) == null || oe.call(S, { e: M, cell: Z.value, cursor: I });
1603
+ var q;
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(() => {
1607
+ var re;
1608
+ j = null, (re = Y["delayed-click"]) == null || re.call(Y, { e: M, cell: Z.value, cursor: B });
1609
1609
  }, 400);
1610
1610
  }, (w.time && o.isDay || o.isDays || o.isWeek) && (r.touchstart = (M) => {
1611
- var I;
1612
- n(M.e || M), (I = S.touchstart) == null || I.call(S, { e: M, cell: Z.value, cursor: ee.value });
1611
+ var B;
1612
+ n(M.e || M), (B = Y.touchstart) == null || B.call(Y, { e: M, cell: Z.value, cursor: ee.value });
1613
1613
  }, r.mousedown = (M) => {
1614
- var I;
1615
- n(M.e || M), (I = S.mousedown) == null || I.call(S, { e: M, cell: Z.value, cursor: ee.value });
1616
- }), S.dblclick && (r.dblclick = (M) => {
1617
- var I;
1618
- (I = S.dblclick) == null || I.call(S, { e: M, cell: Z.value, cursor: he(M) });
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) => {
1617
+ var B;
1618
+ (B = Y.dblclick) == null || B.call(Y, { e: M, cell: Z.value, cursor: he(M) });
1619
1619
  }), w.editableEvents.drag && (r.dragenter = (M) => d.cellDragEnter(M, Z.value), r.dragover = (M) => {
1620
1620
  M.preventDefault(), d.cellDragOver(M, Z.value);
1621
1621
  }, r.dragleave = (M) => d.cellDragLeave(M, Z.value), r.drop = (M) => d.cellDragDrop(M, Z.value, t.allDay)), r;
1622
- }), Z = Y(() => ({
1622
+ }), Z = E(() => ({
1623
1623
  start: t.start,
1624
1624
  end: t.end,
1625
1625
  events: m,
@@ -1629,48 +1629,48 @@ const lt = (p, t) => {
1629
1629
  broader: o.broaderView,
1630
1630
  narrower: o.narrowerView
1631
1631
  })), he = (r) => {
1632
- var J;
1633
- const S = (((J = r.touches) == null ? void 0 : J[0]) || r).clientY, { top: O } = c.value.getBoundingClientRect(), M = Ke(S - O, c.value), I = new Date(t.start);
1634
- return I.setMinutes(Le(M, w)), { y: M, date: I };
1635
- }, ee = Y(() => {
1636
- const r = Le(s.movePercentageY || s.startPercentageY, w), S = new Date(t.start);
1637
- return S.setMinutes(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
1638
  x: s.movePercentageX || s.startPercentageX,
1639
1639
  y: s.movePercentageY || s.startPercentageY,
1640
- date: S
1640
+ date: Y
1641
1641
  };
1642
- }), re = () => {
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 O, M;
1645
+ var j, M;
1646
1646
  s.schedule = ~~r.target.dataset.schedule;
1647
- const S = c.value.getBoundingClientRect();
1648
- s.startX = (((O = r.touches) == null ? void 0 : O[0]) || r).clientX - S.left, s.startY = (((M = r.touches) == null ? void 0 : M[0]) || r).clientY - S.top, s.startPercentageX = s.startX * 100 / S.width, s.startPercentageY = s.startY * 100 / S.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 I, J;
1650
- s.holding = !0, (J = (I = de.value).hold) == null || J.call(I, { e: r, cell: Z.value, cursor: ee.value });
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 });
1651
1651
  }, 1e3);
1652
1652
  }, $ = (r) => {
1653
- var O, M, I, J, oe, we;
1654
- s.dragging || (z.isDraggingCell = !0, (M = (O = de.value)["drag-start"]) == null || M.call(O, { e: r, cell: Z.value, cursor: ee.value })), s.dragging = !0, s.holdTimer = clearTimeout(s.holdTimer), s.holding = !1;
1655
- const S = c.value.getBoundingClientRect();
1656
- s.moveX = (((I = r.touches) == null ? void 0 : I[0]) || r).clientX - S.left, s.moveY = (((J = r.touches) == null ? void 0 : J[0]) || r).clientY - S.top, s.movePercentageX = s.moveX * 100 / S.width, s.movePercentageY = s.moveY * 100 / S.height, w.eventCreateMinDrag && Math.abs(s.startY - s.moveY) > w.eventCreateMinDrag && (s.thresholdPassed = !0), (we = (oe = de.value).drag) == null || we.call(oe, { e: r, cell: Z.value, cursor: ee.value });
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 });
1657
1657
  }, D = async (r) => {
1658
- var S, O;
1659
- document.removeEventListener(r.type === "touchend" ? "touchmove" : "mousemove", $, { passive: !1 }), s.dragging && ((O = (S = de.value)["drag-end"]) == null || O.call(S, { e: r, cell: Z.value, cursor: ee.value }), z.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;
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
1660
  }, G = async (r) => {
1661
1661
  if (!V.value) return;
1662
- let { start: S, end: O, startMinutes: M, endMinutes: I } = i.value;
1663
- S = new Date(t.start), S.setMinutes(M), O = new Date(t.start), O.setMinutes(I);
1664
- let J = { ...i.value, start: S, end: O };
1665
- const { create: oe } = w.eventListeners.event;
1666
- if (typeof oe == "function") {
1667
- const we = J;
1668
- J = await new Promise((g) => oe({ e: r, event: J, cell: Z.value, resolve: g, cursor: ee.value })), J && typeof J == "object" && o.createEvent(J), J && typeof J == "boolean" && o.createEvent(we);
1669
- } else o.createEvent(J);
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 };
1665
+ const { create: re } = w.eventListeners.event;
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);
1670
1670
  }, K = () => {
1671
1671
  var r;
1672
- for (const S of Object.keys(de.value))
1673
- (r = c.value) == null || r.removeEventListener(S, de.value[S]);
1672
+ for (const Y of Object.keys(de.value))
1673
+ (r = c.value) == null || r.removeEventListener(Y, de.value[Y]);
1674
1674
  }, De = () => {
1675
1675
  k.value = N.getCellOverlappingEvents(t.start, t.end);
1676
1676
  };
@@ -1685,74 +1685,74 @@ const lt = (p, t) => {
1685
1685
  ), Be(async () => {
1686
1686
  for (const r of y.value) N.deleteEvent(r, 3);
1687
1687
  K(), await Je();
1688
- }), (r, S) => (C(), L("div", le({
1689
- class: ["vuecal__cell", P.value],
1688
+ }), (r, Y) => (C(), L("div", le({
1689
+ class: ["vuecal__cell", F.value],
1690
1690
  ref_key: "cellEl",
1691
1691
  ref: c
1692
1692
  }, Re(de.value, !0)), [
1693
- r.$slots.cell ? j(r.$slots, "cell", {
1693
+ r.$slots.cell ? O(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, (O, M) => (C(), L("div", {
1698
- class: ye(["vuecal__special-hours", O.class]),
1699
- style: _e(O.style),
1700
- innerHTML: O.label || ""
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 || ""
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, (O) => (C(), L("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
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
1707
1707
  }, [
1708
- r.$slots["cell-events"] ? j(r.$slots, "cell-events", {
1708
+ r.$slots["cell-events"] ? O(r.$slots, "cell-events", {
1709
1709
  key: 0,
1710
1710
  cell: Z.value
1711
1711
  }) : U("", !0),
1712
1712
  A.value || r.$slots["cell-date"] ? (C(), L("div", ta, [
1713
- j(r.$slots, "cell-date", { cell: Z.value }, () => [
1713
+ O(r.$slots, "cell-date", { cell: Z.value }, () => [
1714
1714
  Ue(ce(A.value), 1)
1715
1715
  ])
1716
1716
  ])) : U("", !0),
1717
1717
  r.$slots["cell-content"] ? (C(), L("div", aa, [
1718
- j(r.$slots, "cell-content", { cell: Z.value })
1718
+ O(r.$slots, "cell-content", { cell: Z.value })
1719
1719
  ])) : U("", !0),
1720
1720
  r.$slots["cell-events"] && m.value.length ? (C(), L("div", na, [
1721
- j(r.$slots, "cell-events", { cell: Z.value })
1722
- ])) : m.value.length || F.value ? (C(), Se(tt, {
1721
+ O(r.$slots, "cell-events", { cell: Z.value })
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: S[0] || (S[0] = (M) => F.value = !0),
1726
+ onBeforeLeave: Y[0] || (Y[0] = (M) => P.value = !0),
1727
1727
  onAfterLeave: a,
1728
1728
  tag: "div"
1729
1729
  }, {
1730
- default: B(() => [
1731
- (C(!0), L(ue, null, pe(H.value[O.id], (M) => (C(), Se(st, {
1730
+ default: W(() => [
1731
+ (C(!0), L(ue, null, pe(z.value[j.id], (M) => (C(), Se(st, {
1732
1732
  key: M._.id,
1733
1733
  event: M,
1734
- onEventDeleted: W,
1734
+ onEventDeleted: I,
1735
1735
  "in-all-day-bar": t.allDay,
1736
1736
  style: _e(f.value[M._.id])
1737
1737
  }, Ce({ _: 2 }, [
1738
1738
  r.$slots["event.all-day"] && t.allDay ? {
1739
1739
  name: "event.all-day",
1740
- fn: B((I) => [
1741
- j(r.$slots, "event.all-day", le({ ref_for: !0 }, I))
1740
+ fn: W((B) => [
1741
+ O(r.$slots, "event.all-day", le({ ref_for: !0 }, B))
1742
1742
  ]),
1743
1743
  key: "0"
1744
1744
  } : void 0,
1745
1745
  r.$slots[`event.${b(o).id}`] ? {
1746
1746
  name: `event.${b(o).id}`,
1747
- fn: B((I) => [
1748
- j(r.$slots, `event.${b(o).id}`, le({ ref_for: !0 }, I))
1747
+ fn: W((B) => [
1748
+ O(r.$slots, `event.${b(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
- fn: B((I) => [
1755
- j(r.$slots, "event", le({ ref_for: !0 }, I))
1754
+ fn: W((B) => [
1755
+ O(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 === O.id && !t.allDay ? (C(), L("div", {
1763
+ V.value && s.schedule === j.id && !t.allDay ? (C(), L("div", {
1764
1764
  key: 5,
1765
1765
  class: "vuecal__event-placeholder",
1766
1766
  style: _e(i.value.style)
1767
1767
  }, ce(i.value.start) + " - " + ce(i.value.end), 5)) : U("", !0)
1768
1768
  ], 14, ea))), 128)) : U("", !0),
1769
1769
  !r.$slots.cell && !b(w).schedules ? (C(), L(ue, { key: 3 }, [
1770
- r.$slots["cell-events"] ? j(r.$slots, "cell-events", {
1770
+ r.$slots["cell-events"] ? O(r.$slots, "cell-events", {
1771
1771
  key: 0,
1772
1772
  cell: Z.value
1773
1773
  }) : U("", !0),
1774
1774
  A.value || r.$slots["cell-date"] ? (C(), L("div", sa, [
1775
- j(r.$slots, "cell-date", { cell: Z.value }, () => [
1775
+ O(r.$slots, "cell-date", { cell: Z.value }, () => [
1776
1776
  Ue(ce(A.value), 1)
1777
1777
  ])
1778
1778
  ])) : U("", !0),
1779
1779
  r.$slots["cell-content"] ? (C(), L("div", la, [
1780
- j(r.$slots, "cell-content", { cell: Z.value })
1780
+ O(r.$slots, "cell-content", { cell: Z.value })
1781
1781
  ])) : U("", !0),
1782
1782
  r.$slots["cell-events"] && m.value.length ? (C(), L("div", ra, [
1783
- j(r.$slots, "cell-events", { cell: Z.value })
1784
- ])) : !(b(o).isMonth && !b(w).eventsOnMonthView) && !b(o).isYear && !b(o).isYears && (m.value.length || F.value) ? (C(), Se(tt, {
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, {
1785
1785
  key: 4,
1786
1786
  class: "vuecal__cell-events",
1787
1787
  name: "vuecal-event-delete",
1788
- onBeforeLeave: S[1] || (S[1] = (O) => F.value = !0),
1788
+ onBeforeLeave: Y[1] || (Y[1] = (j) => P.value = !0),
1789
1789
  onAfterLeave: a,
1790
1790
  tag: "div"
1791
1791
  }, {
1792
- default: B(() => [
1793
- (C(!0), L(ue, null, pe(m.value, (O) => (C(), Se(st, {
1794
- key: O._.id,
1795
- event: O,
1796
- onEventDeleted: W,
1792
+ default: W(() => [
1793
+ (C(!0), L(ue, null, pe(m.value, (j) => (C(), Se(st, {
1794
+ key: j._.id,
1795
+ event: j,
1796
+ onEventDeleted: I,
1797
1797
  "in-all-day-bar": t.allDay,
1798
- class: ye(T.value[O._.id]),
1799
- style: _e(f.value[O._.id])
1798
+ class: ye(T.value[j._.id]),
1799
+ style: _e(f.value[j._.id])
1800
1800
  }, Ce({ _: 2 }, [
1801
1801
  r.$slots["event.all-day"] && t.allDay ? {
1802
1802
  name: "event.all-day",
1803
- fn: B((M) => [
1804
- j(r.$slots, "event.all-day", le({ ref_for: !0 }, M))
1803
+ fn: W((M) => [
1804
+ O(r.$slots, "event.all-day", le({ ref_for: !0 }, M))
1805
1805
  ]),
1806
1806
  key: "0"
1807
1807
  } : void 0,
1808
1808
  r.$slots[`event.${b(o).id}`] ? {
1809
1809
  name: `event.${b(o).id}`,
1810
- fn: B((M) => [
1811
- j(r.$slots, `event.${b(o).id}`, le({ ref_for: !0 }, M))
1810
+ fn: W((M) => [
1811
+ O(r.$slots, `event.${b(o).id}`, le({ ref_for: !0 }, M))
1812
1812
  ]),
1813
1813
  key: "1"
1814
1814
  } : void 0,
1815
1815
  r.$slots.event ? {
1816
1816
  name: "event",
1817
- fn: B((M) => [
1818
- j(r.$slots, "event", le({ ref_for: !0 }, M))
1817
+ fn: W((M) => [
1818
+ O(r.$slots, "event", le({ ref_for: !0 }, M))
1819
1819
  ]),
1820
1820
  key: "2"
1821
1821
  } : void 0
@@ -1829,10 +1829,10 @@ const lt = (p, t) => {
1829
1829
  style: _e(i.value.style)
1830
1830
  }, ce(i.value.start) + " - " + ce(i.value.end), 5)) : U("", !0)
1831
1831
  ], 64)) : U("", !0),
1832
- r.$slots["event-count"] ? j(r.$slots, "event-count", {
1832
+ r.$slots["event-count"] ? O(r.$slots, "event-count", {
1833
1833
  key: 4,
1834
1834
  events: h.value
1835
- }) : E.value ? (C(), L("div", oa, ce(h.value.length), 1)) : U("", !0),
1835
+ }) : S.value ? (C(), L("div", oa, ce(h.value.length), 1)) : U("", !0),
1836
1836
  se.show ? (C(), L("div", {
1837
1837
  key: 6,
1838
1838
  class: "vuecal__now-line",
@@ -1861,7 +1861,7 @@ const lt = (p, t) => {
1861
1861
  }, ha = {
1862
1862
  __name: "headings-bar",
1863
1863
  setup(p) {
1864
- const t = He("vuecal"), u = He("$vuecalEl"), { view: o, config: w, dateUtils: _ } = t, N = Y(() => w.xs ? "day-xs" : w.sm || o.isDays || o.isMonth ? "day-sm" : "day"), d = Y(() => (o.isDay || o.isDays || o.isWeek || o.isMonth) && !(o.isDay && !w.schedules && !w.allDayEvents)), z = Y(() => o.cellDates.slice(0, o.cols).map(({ start: y }) => ({
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
1865
  id: Xe[y.getDay()],
1866
1866
  date: y,
1867
1867
  dateNumber: y.getDate(),
@@ -1884,17 +1884,17 @@ const lt = (p, t) => {
1884
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;
1885
1885
  },
1886
1886
  startResize(y) {
1887
- var W;
1887
+ var I;
1888
1888
  this.isResizing.value = !0, this.startY.value = y;
1889
- const F = (W = u.value) == null ? void 0 : W.querySelector(".vuecal__all-day");
1890
- F && (this.initialHeight.value = F.offsetHeight), document.addEventListener("mousemove", c.handleMouseMove), document.addEventListener("mouseup", c.cleanup), document.addEventListener("touchmove", c.handleTouchMove, { passive: !1 }), document.addEventListener("touchend", c.cleanup);
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);
1891
1891
  },
1892
1892
  // Update height based on mouse/touch movement.
1893
1893
  updateHeight(y) {
1894
1894
  var a;
1895
1895
  if (!this.isResizing.value) return;
1896
- const F = y - this.startY.value, W = Math.max(20, this.initialHeight.value + F);
1897
- (a = u.value) == null || a.style.setProperty("--vuecal-all-day-bar-height", `${W}px`);
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`);
1898
1898
  },
1899
1899
  // Mouse event handlers.
1900
1900
  handleMouseDown(y) {
@@ -1905,41 +1905,41 @@ const lt = (p, t) => {
1905
1905
  },
1906
1906
  // Touch event handlers.
1907
1907
  handleTouchStart(y) {
1908
- var F;
1909
- (F = y.touches) != null && F[0] && this.startResize(y.touches[0].clientY);
1908
+ var P;
1909
+ (P = y.touches) != null && P[0] && this.startResize(y.touches[0].clientY);
1910
1910
  },
1911
1911
  handleTouchMove(y) {
1912
- var F;
1913
- (F = y.touches) != null && F[0] && (c.updateHeight(y.touches[0].clientY), y.preventDefault());
1912
+ var P;
1913
+ (P = y.touches) != null && P[0] && (c.updateHeight(y.touches[0].clientY), y.preventDefault());
1914
1914
  }
1915
1915
  };
1916
1916
  return Be(() => {
1917
1917
  c.cleanup();
1918
- }), (y, F) => d.value ? (C(), L("div", ua, [
1918
+ }), (y, P) => d.value ? (C(), L("div", ua, [
1919
1919
  b(o).isDay ? U("", !0) : (C(), L("div", ca, [
1920
- (C(!0), L(ue, null, pe(z.value, (W, a) => (C(), L("div", {
1921
- class: ye(["vuecal__weekday", { "vuecal__weekday--today": W.isToday }]),
1920
+ (C(!0), L(ue, null, pe(H.value, (I, a) => (C(), L("div", {
1921
+ class: ye(["vuecal__weekday", { "vuecal__weekday--today": I.isToday }]),
1922
1922
  key: a,
1923
- onClick: (s) => v.click(W.date)
1923
+ onClick: (s) => v.click(I.date)
1924
1924
  }, [
1925
- j(y.$slots, "weekday-heading", {
1926
- label: W[N.value],
1927
- id: W.id,
1928
- date: W.date
1925
+ O(y.$slots, "weekday-heading", {
1926
+ label: I[N.value],
1927
+ id: I.id,
1928
+ date: I.date
1929
1929
  }, () => [
1930
- ve("span", va, ce(W[N.value]), 1),
1931
- b(o).isMonth ? U("", !0) : (C(), L("strong", fa, ce(W.dateNumber), 1))
1930
+ ve("span", va, ce(I[N.value]), 1),
1931
+ b(o).isMonth ? U("", !0) : (C(), L("strong", fa, ce(I.dateNumber), 1))
1932
1932
  ])
1933
1933
  ], 10, da))), 128))
1934
1934
  ])),
1935
1935
  b(w).schedules ? (C(), L("div", ma, [
1936
- (C(!0), L(ue, null, pe(z.value, (W, a) => (C(), L(ue, { key: a }, [
1936
+ (C(!0), L(ue, null, pe(H.value, (I, a) => (C(), L(ue, { key: a }, [
1937
1937
  (C(!0), L(ue, null, pe(b(w).schedules, (s, e) => (C(), L(ue, { key: e }, [
1938
1938
  y.$slots["schedule-heading"] ? (C(), L("div", {
1939
1939
  key: 0,
1940
1940
  class: ye(["vuecal__schedule vuecal__schedule--heading", s.class])
1941
1941
  }, [
1942
- j(y.$slots, "schedule-heading", {
1942
+ O(y.$slots, "schedule-heading", {
1943
1943
  schedule: s,
1944
1944
  view: b(o)
1945
1945
  })
@@ -1952,32 +1952,32 @@ const lt = (p, t) => {
1952
1952
  ], 64))), 128))
1953
1953
  ])) : U("", !0),
1954
1954
  b(w).allDayEvents ? (C(), L("div", ya, [
1955
- (C(!0), L(ue, null, pe(z.value, (W, a) => (C(), Se($t, {
1956
- class: ye(["vuecal__all-day-cell", { "vuecal__weekday--today": W.isToday }]),
1955
+ (C(!0), L(ue, null, pe(H.value, (I, a) => (C(), Se($t, {
1956
+ class: ye(["vuecal__all-day-cell", { "vuecal__weekday--today": I.isToday }]),
1957
1957
  key: a,
1958
- start: W.date,
1959
- end: new Date(W.date.getTime() + 24 * 60 * 60 * 1e3 - 1),
1958
+ start: I.date,
1959
+ end: new Date(I.date.getTime() + 24 * 60 * 60 * 1e3 - 1),
1960
1960
  index: a,
1961
1961
  "all-day": ""
1962
1962
  }, Ce({ _: 2 }, [
1963
1963
  y.$slots["event.all-day"] ? {
1964
1964
  name: "event.all-day",
1965
- fn: B((s) => [
1966
- j(y.$slots, "event.all-day", le({ ref_for: !0 }, s))
1965
+ fn: W((s) => [
1966
+ O(y.$slots, "event.all-day", le({ ref_for: !0 }, s))
1967
1967
  ]),
1968
1968
  key: "0"
1969
1969
  } : {
1970
1970
  name: "event",
1971
- fn: B((s) => [
1972
- j(y.$slots, "event", le({ ref_for: !0 }, s))
1971
+ fn: W((s) => [
1972
+ O(y.$slots, "event", le({ ref_for: !0 }, s))
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: F[0] || (F[0] = (...W) => c.handleMouseDown && c.handleMouseDown(...W)),
1980
- onTouchstart: F[1] || (F[1] = (...W) => c.handleTouchStart && c.handleTouchStart(...W))
1979
+ onMousedown: P[0] || (P[0] = (...I) => c.handleMouseDown && c.handleMouseDown(...I)),
1980
+ onTouchstart: P[1] || (P[1] = (...I) => c.handleTouchStart && c.handleTouchStart(...I))
1981
1981
  }, null, 32)
1982
1982
  ])) : U("", !0)
1983
1983
  ])) : U("", !0);
@@ -1988,36 +1988,36 @@ const lt = (p, t) => {
1988
1988
  }, wa = {
1989
1989
  __name: "time-column",
1990
1990
  setup(p) {
1991
- const t = He("vuecal"), { config: u, texts: o } = t, w = Y(() => {
1991
+ const t = ze("vuecal"), { config: u, texts: o } = t, w = E(() => {
1992
1992
  const _ = [];
1993
1993
  for (let d = u.timeFrom; d < u.timeTo; d += u.timeStep) {
1994
- const z = d + u.timeStep > u.timeTo, v = ~~(d / 60), c = d % 60, y = o[d < 720 ? "am" : "pm"];
1995
- let F = null;
1996
- z && (F = `calc(var(--vuecal-time-cell-height) * ${(u.timeTo - d) / u.timeStep})`), _.push({
1994
+ const H = d + u.timeStep > u.timeTo, v = ~~(d / 60), c = d % 60, y = o[d < 720 ? "am" : "pm"];
1995
+ let P = null;
1996
+ H && (P = `calc(var(--vuecal-time-cell-height) * ${(u.timeTo - d) / u.timeStep})`), _.push({
1997
1997
  minutesSum: d,
1998
1998
  // The sum of hours + minutes in minutes.
1999
1999
  hours: v,
2000
2000
  minutes: c,
2001
2001
  formatted12: `${v % 12 ? v % 12 : 12}${c ? `:${c.toString().padStart(2, 0)}` : ""}${y}`,
2002
2002
  formatted24: `${v.toString().padStart(2, 0)}:${c.toString().padStart(2, 0)}`,
2003
- height: F
2003
+ height: P
2004
2004
  });
2005
2005
  }
2006
2006
  return _;
2007
2007
  });
2008
2008
  return (_, N) => (C(), L("div", Da, [
2009
2009
  b(u).allDayEvents ? (C(), L("div", pa, [
2010
- j(_.$slots, "all-day-label", {}, () => [
2010
+ O(_.$slots, "all-day-label", {}, () => [
2011
2011
  Ue(ce(b(t).texts.allDay), 1)
2012
2012
  ])
2013
2013
  ])) : U("", !0),
2014
- (C(!0), L(ue, null, pe(w.value, (d, z) => (C(), L("div", {
2014
+ (C(!0), L(ue, null, pe(w.value, (d, H) => (C(), L("div", {
2015
2015
  class: "vuecal__time-cell",
2016
- key: z,
2016
+ key: H,
2017
2017
  style: _e({ height: d.height || null })
2018
2018
  }, [
2019
- j(_.$slots, "time-cell", {
2020
- index: z,
2019
+ O(_.$slots, "time-cell", {
2020
+ index: H,
2021
2021
  minutes: d.minutes,
2022
2022
  hours: d.hours,
2023
2023
  minutesSum: d.minutesSum,
@@ -2032,10 +2032,10 @@ const lt = (p, t) => {
2032
2032
  }, ka = {
2033
2033
  __name: "body",
2034
2034
  setup(p) {
2035
- const t = He("vuecal"), { view: u, config: o, dateUtils: w } = t, _ = ie(null), N = ie(null), d = Y(() => ({
2035
+ const t = ze("vuecal"), { view: u, config: o, dateUtils: w } = t, _ = ie(null), N = ie(null), d = E(() => ({
2036
2036
  "--vuecal-grid-columns": u.cols,
2037
2037
  "--vuecal-grid-rows": u.rows
2038
- })), z = Y(() => {
2038
+ })), H = E(() => {
2039
2039
  const y = w.formatTime(Le(N.value, o));
2040
2040
  return {
2041
2041
  style: { top: `${N.value}%` },
@@ -2044,8 +2044,8 @@ const lt = (p, t) => {
2044
2044
  }), v = (y) => {
2045
2045
  var a;
2046
2046
  if (u.isMonth || u.isYear || u.isYears) return;
2047
- const F = (((a = y.touches) == null ? void 0 : a[0]) || y).clientY, { top: W } = _.value.getBoundingClientRect();
2048
- N.value = Ke(F - W, _.value);
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
2049
  }, c = () => {
2050
2050
  N.value = null;
2051
2051
  };
@@ -2053,83 +2053,83 @@ const lt = (p, t) => {
2053
2053
  _.value.addEventListener("mousemove", v), _.value.addEventListener("touchmove", v), _.value.addEventListener("mouseleave", c), _.value.addEventListener("touchend", c);
2054
2054
  }), Be(() => {
2055
2055
  _.value && (_.value.removeEventListener("mousemove", v), _.value.removeEventListener("touchmove", v), _.value.removeEventListener("mouseleave", c), _.value.removeEventListener("touchend", c));
2056
- }), (y, F) => (C(), L("div", {
2056
+ }), (y, P) => (C(), L("div", {
2057
2057
  class: "vuecal__body",
2058
2058
  ref_key: "bodyEl",
2059
2059
  ref: _,
2060
2060
  style: _e(d.value)
2061
2061
  }, [
2062
2062
  je(Ge, { name: "vuecal-shrink" }, {
2063
- default: B(() => [
2063
+ default: W(() => [
2064
2064
  b(o).timeAtCursor && N.value !== null ? (C(), L("div", {
2065
2065
  key: 0,
2066
2066
  class: "vuecal__time-at-cursor",
2067
- style: _e(z.value.style)
2067
+ style: _e(H.value.style)
2068
2068
  }, [
2069
- ve("label", null, ce(z.value.time), 1)
2069
+ ve("label", null, ce(H.value.time), 1)
2070
2070
  ], 4)) : U("", !0)
2071
2071
  ]),
2072
2072
  _: 1
2073
2073
  }),
2074
- (C(!0), L(ue, null, pe(b(u).cellDates, (W, a) => (C(), Se($t, {
2074
+ (C(!0), L(ue, null, pe(b(u).cellDates, (I, a) => (C(), Se($t, {
2075
2075
  key: a,
2076
- start: W.start,
2077
- end: W.end,
2076
+ start: I.start,
2077
+ end: I.end,
2078
2078
  index: a
2079
2079
  }, Ce({ _: 2 }, [
2080
2080
  y.$slots.cell ? {
2081
2081
  name: "cell",
2082
- fn: B((s) => [
2083
- j(y.$slots, "cell", le({ ref_for: !0 }, s))
2082
+ fn: W((s) => [
2083
+ O(y.$slots, "cell", le({ ref_for: !0 }, s))
2084
2084
  ]),
2085
2085
  key: "0"
2086
2086
  } : void 0,
2087
2087
  y.$slots["cell-date"] ? {
2088
2088
  name: "cell-date",
2089
- fn: B((s) => [
2090
- j(y.$slots, "cell-date", le({ ref_for: !0 }, s))
2089
+ fn: W((s) => [
2090
+ O(y.$slots, "cell-date", le({ ref_for: !0 }, s))
2091
2091
  ]),
2092
2092
  key: "1"
2093
2093
  } : void 0,
2094
2094
  y.$slots["cell-content"] ? {
2095
2095
  name: "cell-content",
2096
- fn: B((s) => [
2097
- j(y.$slots, "cell-content", le({ ref_for: !0 }, s))
2096
+ fn: W((s) => [
2097
+ O(y.$slots, "cell-content", le({ ref_for: !0 }, s))
2098
2098
  ]),
2099
2099
  key: "2"
2100
2100
  } : void 0,
2101
2101
  y.$slots["cell-events"] ? {
2102
2102
  name: "cell-events",
2103
- fn: B((s) => [
2104
- j(y.$slots, "cell-events", le({ ref_for: !0 }, s))
2103
+ fn: W((s) => [
2104
+ O(y.$slots, "cell-events", le({ ref_for: !0 }, s))
2105
2105
  ]),
2106
2106
  key: "3"
2107
2107
  } : void 0,
2108
2108
  y.$slots[`event.${b(u).id}`] ? {
2109
2109
  name: `event.${b(u).id}`,
2110
- fn: B((s) => [
2111
- j(y.$slots, `event.${b(u).id}`, le({ ref_for: !0 }, s))
2110
+ fn: W((s) => [
2111
+ O(y.$slots, `event.${b(u).id}`, le({ ref_for: !0 }, s))
2112
2112
  ]),
2113
2113
  key: "4"
2114
2114
  } : void 0,
2115
2115
  y.$slots["event.all-day"] ? {
2116
2116
  name: "event.all-day",
2117
- fn: B((s) => [
2118
- j(y.$slots, "event.all-day", le({ ref_for: !0 }, s))
2117
+ fn: W((s) => [
2118
+ O(y.$slots, "event.all-day", le({ ref_for: !0 }, s))
2119
2119
  ]),
2120
2120
  key: "5"
2121
2121
  } : void 0,
2122
2122
  y.$slots.event ? {
2123
2123
  name: "event",
2124
- fn: B((s) => [
2125
- j(y.$slots, "event", le({ ref_for: !0 }, s))
2124
+ fn: W((s) => [
2125
+ O(y.$slots, "event", le({ ref_for: !0 }, s))
2126
2126
  ]),
2127
2127
  key: "6"
2128
2128
  } : void 0,
2129
2129
  y.$slots["event-count"] ? {
2130
2130
  name: "event-count",
2131
- fn: B((s) => [
2132
- j(y.$slots, "event-count", le({ ref_for: !0 }, s))
2131
+ fn: W((s) => [
2132
+ O(y.$slots, "event-count", le({ ref_for: !0 }, s))
2133
2133
  ]),
2134
2134
  key: "7"
2135
2135
  } : void 0
@@ -2141,7 +2141,7 @@ const lt = (p, t) => {
2141
2141
  class: "vuecal__week-numbers"
2142
2142
  }, Ta = { class: "vuecal__week-number" }, Ma = { class: "vuecal__body-wrap" }, Ea = {
2143
2143
  __name: "index",
2144
- props: Ft,
2144
+ props: Pt,
2145
2145
  emits: [
2146
2146
  "ready",
2147
2147
  "view-change",
@@ -2156,7 +2156,7 @@ const lt = (p, t) => {
2156
2156
  "event-drag-end"
2157
2157
  ],
2158
2158
  setup(p, { expose: t, emit: u }) {
2159
- const o = p, w = u, _ = Tt("vuecal-el"), N = Ht({ props: o, emit: w, attrs: Yt(), vuecalEl: _, uid: Mt() }), { config: d, view: z, dateUtils: v, touch: c } = N, y = Y(() => d.time && (z.isDay || z.isDays || z.isWeek)), F = Y(() => Array(z.rows).fill().map((e, k) => v.getWeek(v.addDays(z.firstCellDate, 7 * k)))), W = Y(() => {
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(() => {
2160
2160
  var e;
2161
2161
  return {
2162
2162
  "vuecal--ready": d.ready,
@@ -2165,7 +2165,7 @@ const lt = (p, t) => {
2165
2165
  "vuecal--date-picker": d.datePicker,
2166
2166
  "vuecal--dark": d.dark,
2167
2167
  "vuecal--light": !d.dark,
2168
- [`vuecal--${z.id}-view`]: !0,
2168
+ [`vuecal--${H.id}-view`]: !0,
2169
2169
  "vuecal--view-has-time": y.value,
2170
2170
  "vuecal--timeless": !d.time,
2171
2171
  "vuecal--dragging-cell": c.isDraggingCell,
@@ -2173,14 +2173,14 @@ const lt = (p, t) => {
2173
2173
  "vuecal--resizing-event": c.isResizingEvent,
2174
2174
  "vuecal--has-schedules": (e = d.schedules) == null ? void 0 : e.length
2175
2175
  };
2176
- }), a = Y(() => ({
2176
+ }), a = E(() => ({
2177
2177
  "--vuecal-time-cell-height": d.timeCellHeight && `${d.timeCellHeight}px`
2178
- })), s = Y(() => {
2178
+ })), s = E(() => {
2179
2179
  var e, k;
2180
2180
  return {
2181
- "vuecal__scrollable--row": y.value || d.weekNumbers && z.isMonth,
2181
+ "vuecal__scrollable--row": y.value || d.weekNumbers && H.isMonth,
2182
2182
  // Keep the states inside the Vue transition wrapper for smooth CSS transitions.
2183
- [`vuecal__scrollable--${z.id}-view`]: !0,
2183
+ [`vuecal__scrollable--${H.id}-view`]: !0,
2184
2184
  "vuecal__scrollable--has-schedules": (e = d.schedules) == null ? void 0 : e.length,
2185
2185
  "vuecal__scrollable--no-schedules": !((k = d.schedules) != null && k.length),
2186
2186
  "vuecal__scrollable--no-all-day-bar": !d.allDayEvents,
@@ -2188,124 +2188,124 @@ const lt = (p, t) => {
2188
2188
  };
2189
2189
  });
2190
2190
  return Ze(async () => {
2191
- await Je(), d.ready = !0, w("ready", { config: d, view: z });
2191
+ await Je(), d.ready = !0, w("ready", { config: d, view: H });
2192
2192
  }), at("vuecal", N), at("$vuecalEl", _), t({ view: N.view }), (e, k) => (C(), L("div", {
2193
- class: ye(["vuecal", W.value]),
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 ? j(e.$slots, "diy", {
2198
+ e.$slots.diy ? O(e.$slots, "diy", {
2199
2199
  key: 0,
2200
2200
  vuecal: b(N)
2201
2201
  }) : (C(), L(ue, { key: 1 }, [
2202
2202
  je(Rt, null, Ce({ _: 2 }, [
2203
2203
  e.$slots.header ? {
2204
2204
  name: "header",
2205
- fn: B((i) => [
2206
- j(e.$slots, "header", te(ne(i)))
2205
+ fn: W((i) => [
2206
+ O(e.$slots, "header", te(ne(i)))
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: B((i) => [
2213
- j(e.$slots, "previous-button", te(ne(i)))
2212
+ fn: W((i) => [
2213
+ O(e.$slots, "previous-button", te(ne(i)))
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: B((i) => [
2220
- j(e.$slots, "next-button", te(ne(i)))
2219
+ fn: W((i) => [
2220
+ O(e.$slots, "next-button", te(ne(i)))
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: B((i) => [
2227
- j(e.$slots, "today-button", te(ne(i)))
2226
+ fn: W((i) => [
2227
+ O(e.$slots, "today-button", te(ne(i)))
2228
2228
  ]),
2229
2229
  key: "3"
2230
2230
  } : void 0,
2231
2231
  !e.$slots.header && e.$slots.title ? {
2232
2232
  name: "title",
2233
- fn: B((i) => [
2234
- j(e.$slots, "title", te(ne(i)))
2233
+ fn: W((i) => [
2234
+ O(e.$slots, "title", te(ne(i)))
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: B((i) => [
2241
- j(e.$slots, "title.day", te(ne(i)))
2240
+ fn: W((i) => [
2241
+ O(e.$slots, "title.day", te(ne(i)))
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: B((i) => [
2248
- j(e.$slots, "title.days", te(ne(i)))
2247
+ fn: W((i) => [
2248
+ O(e.$slots, "title.days", te(ne(i)))
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: B((i) => [
2255
- j(e.$slots, "title.week", te(ne(i)))
2254
+ fn: W((i) => [
2255
+ O(e.$slots, "title.week", te(ne(i)))
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: B((i) => [
2262
- j(e.$slots, "title.month", te(ne(i)))
2261
+ fn: W((i) => [
2262
+ O(e.$slots, "title.month", te(ne(i)))
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: B((i) => [
2269
- j(e.$slots, "title.year", te(ne(i)))
2268
+ fn: W((i) => [
2269
+ O(e.$slots, "title.year", te(ne(i)))
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: B((i) => [
2276
- j(e.$slots, "title.years", te(ne(i)))
2275
+ fn: W((i) => [
2276
+ O(e.$slots, "title.years", te(ne(i)))
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: B((i) => [
2283
- j(e.$slots, "schedule-heading", te(ne(i)))
2282
+ fn: W((i) => [
2283
+ O(e.$slots, "schedule-heading", te(ne(i)))
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(z).transitionDirection}`
2290
+ name: `vuecal-slide-fade--${b(H).transitionDirection}`
2291
2291
  }, {
2292
- default: B(() => [
2292
+ default: W(() => [
2293
2293
  (C(), L("div", {
2294
2294
  class: ye(["vuecal__scrollable", s.value]),
2295
- key: b(z).id + b(z).start.getTime()
2295
+ key: b(H).id + b(H).start.getTime()
2296
2296
  }, [
2297
2297
  y.value ? (C(), Se(wa, { key: 0 }, Ce({ _: 2 }, [
2298
2298
  e.$slots["time-cell"] ? {
2299
2299
  name: "time-cell",
2300
- fn: B((i) => [
2301
- j(e.$slots, "time-cell", te(ne(i)))
2300
+ fn: W((i) => [
2301
+ O(e.$slots, "time-cell", te(ne(i)))
2302
2302
  ]),
2303
2303
  key: "0"
2304
2304
  } : void 0
2305
2305
  ]), 1024)) : U("", !0),
2306
- b(d).weekNumbers && b(z).isMonth ? (C(), L("div", ba, [
2307
- (C(!0), L(ue, null, pe(F.value, (i) => (C(), L("div", Ta, [
2308
- j(e.$slots, "week-number", {}, () => [
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
2309
  ve("small", null, ce(i), 1)
2310
2310
  ])
2311
2311
  ]))), 256))
@@ -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: B((i) => [
2318
- j(e.$slots, "weekday-heading", te(ne(i)))
2317
+ fn: W((i) => [
2318
+ O(e.$slots, "weekday-heading", te(ne(i)))
2319
2319
  ]),
2320
2320
  key: "0"
2321
2321
  } : void 0,
2322
2322
  e.$slots["schedule-heading"] ? {
2323
2323
  name: "schedule-heading",
2324
- fn: B((i) => [
2325
- j(e.$slots, "schedule-heading", te(ne(i)))
2324
+ fn: W((i) => [
2325
+ O(e.$slots, "schedule-heading", te(ne(i)))
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: B((i) => [
2332
- j(e.$slots, "event.all-day", te(ne(i)))
2331
+ fn: W((i) => [
2332
+ O(e.$slots, "event.all-day", te(ne(i)))
2333
2333
  ]),
2334
2334
  key: "2"
2335
2335
  } : void 0,
2336
2336
  e.$slots.event ? {
2337
2337
  name: "event",
2338
- fn: B((i) => [
2339
- j(e.$slots, "event", te(ne(i)))
2338
+ fn: W((i) => [
2339
+ O(e.$slots, "event", te(ne(i)))
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: B((i) => [
2348
- j(e.$slots, "cell", te(ne(i)))
2347
+ fn: W((i) => [
2348
+ O(e.$slots, "cell", te(ne(i)))
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: B((i) => [
2355
- j(e.$slots, "cell-date", te(ne(i)))
2354
+ fn: W((i) => [
2355
+ O(e.$slots, "cell-date", te(ne(i)))
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: B((i) => [
2362
- j(e.$slots, "cell-content", te(ne(i)))
2361
+ fn: W((i) => [
2362
+ O(e.$slots, "cell-content", te(ne(i)))
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: B((i) => [
2369
- j(e.$slots, "cell-events", te(ne(i)))
2368
+ fn: W((i) => [
2369
+ O(e.$slots, "cell-events", te(ne(i)))
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: B((i) => [
2376
- j(e.$slots, "event.all-day", te(ne(i)))
2375
+ fn: W((i) => [
2376
+ O(e.$slots, "event.all-day", te(ne(i)))
2377
2377
  ]),
2378
2378
  key: "4"
2379
2379
  } : void 0,
2380
- !e.$slots.cell && !e.$slots["cell-events"] && e.$slots[`event.${b(z).id}`] ? {
2381
- name: `event.${b(z).id}`,
2382
- fn: B((i) => [
2383
- j(e.$slots, `event.${b(z).id}`, te(ne(i)))
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)))
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: B((i) => [
2390
- j(e.$slots, "event", te(ne(i)))
2389
+ fn: W((i) => [
2390
+ O(e.$slots, "event", te(ne(i)))
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: B((i) => [
2397
- j(e.$slots, "event-count", te(ne(i)))
2396
+ fn: W((i) => [
2397
+ O(e.$slots, "event-count", te(ne(i)))
2398
2398
  ]),
2399
2399
  key: "7"
2400
2400
  } : void 0
@@ -2416,10 +2416,10 @@ const lt = (p, t) => {
2416
2416
  updateTexts: Oa,
2417
2417
  addDays: ja,
2418
2418
  subtractDays: La,
2419
- addHours: Ha,
2420
- subtractHours: za,
2421
- addMinutes: Fa,
2422
- subtractMinutes: Pa,
2419
+ addHours: za,
2420
+ subtractHours: Ha,
2421
+ addMinutes: Pa,
2422
+ subtractMinutes: Fa,
2423
2423
  getWeek: Na,
2424
2424
  isToday: Aa,
2425
2425
  isSameDate: Ba,
@@ -2441,8 +2441,8 @@ export {
2441
2441
  Ea as VueCal,
2442
2442
  Ca as addDatePrototypes,
2443
2443
  ja as addDays,
2444
- Ha as addHours,
2445
- Fa as addMinutes,
2444
+ za as addHours,
2445
+ Pa as addMinutes,
2446
2446
  qa as countDays,
2447
2447
  Ga as dateToMinutes,
2448
2448
  Ja as datesInSameTimeStep,
@@ -2461,8 +2461,8 @@ export {
2461
2461
  Va as removeDatePrototypes,
2462
2462
  Xa as stringToDate,
2463
2463
  La as subtractDays,
2464
- za as subtractHours,
2465
- Pa as subtractMinutes,
2464
+ Ha as subtractHours,
2465
+ Fa as subtractMinutes,
2466
2466
  Oa as updateTexts,
2467
2467
  Sa as useLocale
2468
2468
  };