vue-cal 5.0.1-rc.30 → 5.0.1-rc.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/i18n/ar.js +1 -1
  2. package/dist/i18n/bg.js +1 -1
  3. package/dist/i18n/bn.js +1 -1
  4. package/dist/i18n/bs.js +1 -1
  5. package/dist/i18n/ca.js +1 -1
  6. package/dist/i18n/cs.js +1 -1
  7. package/dist/i18n/da.js +1 -1
  8. package/dist/i18n/de.js +1 -1
  9. package/dist/i18n/el.js +1 -1
  10. package/dist/i18n/en-gb.js +1 -1
  11. package/dist/i18n/es.js +1 -1
  12. package/dist/i18n/et.js +1 -1
  13. package/dist/i18n/fa.js +1 -1
  14. package/dist/i18n/fi.js +1 -1
  15. package/dist/i18n/fr.js +1 -1
  16. package/dist/i18n/he.js +1 -1
  17. package/dist/i18n/hr.js +1 -1
  18. package/dist/i18n/hu.js +1 -1
  19. package/dist/i18n/id.js +1 -1
  20. package/dist/i18n/is.js +1 -1
  21. package/dist/i18n/it.js +1 -1
  22. package/dist/i18n/ja.js +1 -1
  23. package/dist/i18n/ka.js +1 -1
  24. package/dist/i18n/kaa.js +1 -1
  25. package/dist/i18n/kk.js +1 -1
  26. package/dist/i18n/ko.js +1 -1
  27. package/dist/i18n/ky.js +1 -1
  28. package/dist/i18n/lt.js +1 -1
  29. package/dist/i18n/mn.js +1 -1
  30. package/dist/i18n/nl.js +1 -1
  31. package/dist/i18n/no.js +1 -1
  32. package/dist/i18n/pl.js +1 -1
  33. package/dist/i18n/pt-br.js +1 -1
  34. package/dist/i18n/pt-pt.js +1 -1
  35. package/dist/i18n/ro.js +1 -1
  36. package/dist/i18n/ru.js +1 -1
  37. package/dist/i18n/sk.js +1 -1
  38. package/dist/i18n/sl.js +1 -1
  39. package/dist/i18n/sq.js +1 -1
  40. package/dist/i18n/sr.js +1 -1
  41. package/dist/i18n/sv.js +1 -1
  42. package/dist/i18n/tr.js +1 -1
  43. package/dist/i18n/uk.js +1 -1
  44. package/dist/i18n/uz-cryl.js +1 -1
  45. package/dist/i18n/uz.js +1 -1
  46. package/dist/i18n/vi.js +1 -1
  47. package/dist/i18n/zh-cn.js +1 -1
  48. package/dist/i18n/zh-hk.js +1 -1
  49. package/dist/vue-cal.es.js +399 -399
  50. package/dist/vue-cal.umd.js +3 -3
  51. package/package.json +9 -9
@@ -1,6 +1,6 @@
1
- import { computed as b, reactive as be, watch as De, toRefs as bt, ref as ue, onBeforeUnmount as Re, nextTick as Xe, inject as He, createElementBlock as P, openBlock as V, renderSlot as j, createCommentVNode as Q, unref as $, Fragment as de, renderList as we, normalizeClass as pe, createElementVNode as he, createVNode as Oe, Transition as Ue, withCtx as W, createBlock as Se, resolveDynamicComponent as xe, mergeProps as ie, toHandlers as Ie, normalizeProps as se, onMounted as Ze, toDisplayString as ce, createTextVNode as qe, withModifiers as et, normalizeStyle as $e, TransitionGroup as tt, createSlots as Ce, useTemplateRef as Tt, useId as Mt, useAttrs as Et, provide as at, guardReactiveProps as re } from "vue";
1
+ import { computed as b, reactive as be, watch as De, toRefs as bt, ref as ue, onBeforeUnmount as Re, nextTick as Xe, inject as He, createElementBlock as P, openBlock as V, renderSlot as j, createCommentVNode as x, unref as $, Fragment as de, renderList as we, normalizeClass as pe, createElementVNode as he, createVNode as Oe, Transition as Ue, withCtx as B, createBlock as Se, resolveDynamicComponent as xe, mergeProps as ie, toHandlers as Ie, normalizeProps as se, onMounted as Ze, toDisplayString as ce, createTextVNode as qe, withModifiers as et, normalizeStyle as $e, TransitionGroup as tt, createSlots as Ce, useTemplateRef as Tt, useId as Mt, useAttrs as Et, provide as at, guardReactiveProps as re } from "vue";
2
2
  /**
3
- * vue-cal v5.0.1-rc.30
3
+ * vue-cal v5.0.1-rc.31
4
4
  * (c) 2024-2025 Antoni Andre <antoniandre.web@gmail.com>
5
5
  * @license MIT
6
6
  */
@@ -40,7 +40,7 @@ const fe = {
40
40
  return E.value[u] ? u : (console.warn(
41
41
  `Vue Cal: the provided or default view \`${u}\` is either invalid or not in the list of available views. The first available view will be chosen: \`${Object.keys(E.value)[0]}\`.`
42
42
  ), Object.keys(E.value)[0]);
43
- }), B = b(() => t.sm && !t.xs), f = b(() => t.xs || t.datePicker), A = b(() => t.clickToNavigate || t.datePicker && t.clickToNavigate !== !1), Z = b(() => {
43
+ }), W = b(() => t.sm && !t.xs), v = b(() => t.xs || t.datePicker), A = b(() => t.clickToNavigate || t.datePicker && t.clickToNavigate !== !1), Z = b(() => {
44
44
  const c = {
45
45
  cell: {},
46
46
  // All possible event listeners to attach to cells.
@@ -68,8 +68,8 @@ const fe = {
68
68
  days: { cols: fe.availableViews.days.rows, rows: fe.availableViews.days.cols },
69
69
  week: { cols: fe.availableViews.week.rows, rows: fe.availableViews.week.cols }
70
70
  } : (a ? (Array.isArray(a) ? p = a.reduce((O, X) => (typeof X == "string" && fe.availableViews[X] ? O[X] = fe.availableViews[X] : u++, O), {}) : typeof a == "object" && (p = Object.entries(a).reduce((O, [X, U]) => {
71
- const { cols: K, rows: te } = fe.availableViews[X];
72
- return O[X] = { cols: U.cols || K, rows: U.rows || te }, O;
71
+ const { cols: Q, rows: te } = fe.availableViews[X];
72
+ return O[X] = { cols: U.cols || Q, rows: U.rows || te }, O;
73
73
  }, {})), u && console.warn("Vue Cal: the provided `views` prop contains invalid views that will be ignored."), Object.keys(p).length || (console.warn("Vue Cal: No valid view in the provided `views` prop. Falling back to default views."), p = { ...fe.availableViews })) : p = { ...fe.availableViews }, p);
74
74
  }), F = b(() => t.datePicker ? "month" : E.value.week ? "week" : Object.keys(E.value)[0]), m = b(() => {
75
75
  if (typeof t.selectedDate == "string") return r.stringToDate(t.selectedDate);
@@ -117,18 +117,18 @@ const fe = {
117
117
  u = await ((p = u[`../i18n/${c}.json`]) == null ? void 0 : p.call(u));
118
118
  }
119
119
  y.texts = Object.assign(y.texts, Object.assign({ ...fe.texts }, u)), r.updateTexts(y.texts);
120
- }, v = be(t.events || []);
121
- return De(() => t.events, (c) => v.splice(0, v.length, ...c)), De(() => t.locale, (c) => _(c || "en-us")), (t.locale || !y.texts.today) && _(t.locale || "en-us"), {
120
+ }, f = be(t.events || []);
121
+ return De(() => t.events, (c) => f.splice(0, f.length, ...c)), De(() => t.locale, (c) => _(c || "en-us")), (t.locale || !y.texts.today) && _(t.locale || "en-us"), {
122
122
  ...bt(t),
123
- events: v,
123
+ events: f,
124
124
  // All the events listeners for cells and events that the end user may have attached to vue-cal.
125
125
  eventListeners: Z,
126
126
  defaultView: F,
127
127
  availableViews: E,
128
128
  disableDays: i,
129
129
  ready: h,
130
- sm: B,
131
- xs: f,
130
+ sm: W,
131
+ xs: v,
132
132
  clickToNavigate: A,
133
133
  hideWeekdays: L,
134
134
  hideWeekends: l,
@@ -146,7 +146,7 @@ const fe = {
146
146
  return Object.keys(L.value).length;
147
147
  },
148
148
  get size() {
149
- return f.value ? "xs" : B.value ? "sm" : "lg";
149
+ return v.value ? "xs" : W.value ? "sm" : "lg";
150
150
  },
151
151
  loadTexts: _
152
152
  };
@@ -159,7 +159,7 @@ const fe = {
159
159
  }, Ke = (y, t) => {
160
160
  const d = t.clientHeight;
161
161
  return y * 100 / d;
162
- }, Be = be({ id: null, date: null });
162
+ }, We = be({ id: null, date: null });
163
163
  let nt = !1, Je = !0;
164
164
  const _e = be({ el: null, cell: null, timeout: null }), ke = be({
165
165
  eventId: null,
@@ -167,16 +167,16 @@ const _e = be({ el: null, cell: null, timeout: null }), ke = be({
167
167
  toVueCal: null
168
168
  });
169
169
  function zt(y) {
170
- const { config: t, view: d, eventsManager: r, emit: h, uid: C, dateUtils: B } = y, f = (S) => {
170
+ const { config: t, view: d, eventsManager: r, emit: h, uid: C, dateUtils: W } = y, v = (S) => {
171
171
  var _;
172
172
  const { timeStep: n, timeCellHeight: I, timeFrom: e } = t, z = (((_ = S.touches) == null ? void 0 : _[0]) || S).clientY, { top: H } = S.currentTarget.getBoundingClientRect(), Y = z - H - ~~S.dataTransfer.getData("cursor-grab-at");
173
173
  return je(Ke(Y, S.currentTarget), t);
174
174
  }, A = (S, n, I) => {
175
175
  const e = n.duration || Z(n.start, n.end) || t.timeStep;
176
- let z = Math.max(f(S), 0);
176
+ let z = Math.max(v(S), 0);
177
177
  if (t.snapToInterval) {
178
- const v = z + t.snapToInterval / 2;
179
- z = v - v % t.snapToInterval;
178
+ const f = z + t.snapToInterval / 2;
179
+ z = f - f % t.snapToInterval;
180
180
  }
181
181
  const H = new Date(new Date(I).setMinutes(z)), Y = Math.min(z + e, 1440), _ = new Date(new Date(I).setMinutes(Y));
182
182
  return { start: H, end: _ };
@@ -198,12 +198,12 @@ function zt(y) {
198
198
  const e = S.target.closest(".vuecal__event");
199
199
  e.classList.add("vuecal__event--dragging-ghost"), setTimeout(() => {
200
200
  e.classList.add("vuecal__event--dragging-original"), e.classList.remove("vuecal__event--dragging-ghost");
201
- }, 0), nt = !1, Object.assign(Be, { id: d.id, date: d.firstCellDate }), Je = !0, y.touch.isDraggingEvent = !0;
201
+ }, 0), nt = !1, Object.assign(We, { id: d.id, date: d.firstCellDate }), Je = !0, y.touch.isDraggingEvent = !0;
202
202
  },
203
203
  eventDragEnd: (S, n) => {
204
204
  ke.eventId = null, S.target.closest(".vuecal__event").classList.remove("vuecal__event--dragging-original");
205
205
  const { fromVueCal: I, toVueCal: e } = ke;
206
- e && I !== e && r.deleteEvent(n._.id, 3), nt && Je && Be.id && d.switchView(Be.id, Be.date, !0), h("event-drag-end", {
206
+ e && I !== e && r.deleteEvent(n._.id, 3), nt && Je && We.id && d.switchView(We.id, We.date, !0), h("event-drag-end", {
207
207
  e: S,
208
208
  event: n,
209
209
  external: ke.fromVueCal !== C
@@ -231,12 +231,12 @@ function zt(y) {
231
231
  let z, H, Y;
232
232
  I ? (H = new Date(n.start), Y = new Date(n.end)) : { start: H, end: Y } = A(S, e, n.start);
233
233
  const { schedule: _ } = ((p = S.target.closest("[data-schedule]")) == null ? void 0 : p.dataset) || {};
234
- let v = () => {
234
+ let f = () => {
235
235
  };
236
- ke.fromVueCal === C ? (z = r.getEvent(e._.id), z && (z._.dragging = !1, v = (X) => {
236
+ ke.fromVueCal === C ? (z = r.getEvent(e._.id), z && (z._.dragging = !1, f = (X) => {
237
237
  if (z.start = H, z.end = Y, z.allDay = I, _ !== void 0 && (z.schedule = ~~_), X && typeof X == "object") {
238
- const { _: U, ...K } = X;
239
- Object.assign(z, K);
238
+ const { _: U, ...Q } = X;
239
+ Object.assign(z, Q);
240
240
  }
241
241
  })) : (z = {
242
242
  ...e,
@@ -245,10 +245,10 @@ function zt(y) {
245
245
  ..._ !== void 0 && { schedule: ~~_ },
246
246
  _: { id: ((a = e._) == null ? void 0 : a.id) || e.id, duration: Z(H, Y) },
247
247
  getOverlappingEvents: () => r.getEventsInRange(H, Y, { schedule: ~~_ })
248
- }, v = (X) => {
248
+ }, f = (X) => {
249
249
  if (z = r.createEvent(z), X && typeof X == "object") {
250
- const { _: U, ...K } = X;
251
- Object.assign(z, K);
250
+ const { _: U, ...Q } = X;
251
+ Object.assign(z, Q);
252
252
  }
253
253
  });
254
254
  let c = !0;
@@ -259,7 +259,7 @@ function zt(y) {
259
259
  overlaps: z.getOverlappingEvents({ start: H, end: Y, schedule: ~~_ }),
260
260
  cell: n,
261
261
  external: ke.fromVueCal !== C
262
- })), c !== !1 && v(c), n.highlighted = !1, n.highlightedSchedule = null, Je = !1, ke.toVueCal = C, h("event-dropped", {
262
+ })), c !== !1 && f(c), n.highlighted = !1, n.highlightedSchedule = null, Je = !1, ke.toVueCal = C, h("event-dropped", {
263
263
  e: S,
264
264
  cell: n,
265
265
  event: z,
@@ -270,9 +270,9 @@ function zt(y) {
270
270
  };
271
271
  }
272
272
  const lt = (y, t) => {
273
- let d, r, h, C = {}, B = {};
274
- const f = ue(y), A = () => {
275
- f.value.today || (f.value = t), Date.prototype.addDays = function(s) {
273
+ let d, r, h, C = {}, W = {};
274
+ const v = ue(y), A = () => {
275
+ v.value.today || (v.value = t), Date.prototype.addDays = function(s) {
276
276
  return E(this, s || 0);
277
277
  }, Date.prototype.subtractDays = function(s) {
278
278
  return F(this, s || 0);
@@ -293,12 +293,12 @@ const lt = (y, t) => {
293
293
  }, Date.prototype.format = function(s = "YYYY-MM-DD") {
294
294
  return X(this, s);
295
295
  }, Date.prototype.formatTime = function(s = "HH:mm") {
296
- return K(this, s);
296
+ return Q(this, s);
297
297
  };
298
298
  }, Z = () => {
299
299
  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;
300
300
  }, L = (s) => {
301
- f.value = s, Date.prototype.subtractDays && A();
301
+ v.value = s, Date.prototype.subtractDays && A();
302
302
  }, l = () => (r !== (/* @__PURE__ */ new Date()).getDate() && (d = /* @__PURE__ */ new Date(), r = d.getDate(), h = `${d.getFullYear()}-${d.getMonth()}-${d.getDate()}`), h), E = (s, k) => {
303
303
  const D = new Date(s.valueOf());
304
304
  return D.setDate(D.getDate() + k), D;
@@ -341,7 +341,7 @@ const lt = (y, t) => {
341
341
  }, Y = (s, k, D) => O(s) ? s.getTime() >= k && s.getTime() <= D : console.warn(`Vue Cal: invalid date provided to \`isInRange(date, rangeStart, rangeEnd)\`: \`${s}\`.`), _ = (s) => {
342
342
  const k = s.getFullYear();
343
343
  return !(k % 400) || k % 100 && !(k % 4);
344
- }, v = (s = null, k) => {
344
+ }, f = (s = null, k) => {
345
345
  const D = s && new Date(s.valueOf()) || /* @__PURE__ */ new Date(), J = k ? 7 : 6;
346
346
  return D.setDate(D.getDate() - (D.getDay() + J) % 7), D;
347
347
  }, c = (s) => s instanceof Date ? s : (s.length === 10 && (s += " 00:00"), new Date(s.replace(/-/g, "/"))), u = (s) => s.getHours() * 60 + s.getMinutes(), p = (s, k) => {
@@ -349,8 +349,8 @@ const lt = (y, t) => {
349
349
  const D = (new Date(k).getTimezoneOffset() - new Date(s).getTimezoneOffset()) * 60 * 1e3;
350
350
  return Math.ceil((k - s - D) / (24 * 3600 * 1e3));
351
351
  }, a = (s, k, D) => Math.abs(s.getTime() - k.getTime()) <= D * 60 * 1e3, O = (s) => s && s instanceof Date && !isNaN(s), X = (s, k = "YYYY-MM-DD", D = null) => {
352
- if (D || (D = f.value), k || (k = "YYYY-MM-DD"), k === "YYYY-MM-DD") return U(s);
353
- C = {}, B = {};
352
+ if (D || (D = v.value), k || (k = "YYYY-MM-DD"), k === "YYYY-MM-DD") return U(s);
353
+ C = {}, W = {};
354
354
  const J = {
355
355
  YYYY: () => ae(s, D).YYYY,
356
356
  YY: () => ae(s, D).YY(),
@@ -383,14 +383,14 @@ const lt = (y, t) => {
383
383
  }, U = (s) => {
384
384
  const k = s.getMonth() + 1, D = s.getDate();
385
385
  return `${s.getFullYear()}-${k < 10 ? "0" : ""}${k}-${D < 10 ? "0" : ""}${D}`;
386
- }, K = (s, k = "HH:mm", D = null, J = !1) => {
386
+ }, Q = (s, k = "HH:mm", D = null, J = !1) => {
387
387
  let ne = !1;
388
388
  if (J) {
389
389
  const [T, M, w] = [s.getHours(), s.getMinutes(), s.getSeconds()];
390
390
  T + M + w === 141 && (ne = !0);
391
391
  }
392
392
  if (s instanceof Date && k === "HH:mm") return ne ? "24:00" : te(s);
393
- B = {}, D || (D = f.value);
393
+ W = {}, D || (D = v.value);
394
394
  const me = ve(s, D), o = k.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (T, M) => {
395
395
  const w = me[M.replace(/\{|\}/g, "")];
396
396
  return w !== void 0 ? w : M;
@@ -453,11 +453,11 @@ const lt = (y, t) => {
453
453
  // Monday to Sunday.
454
454
  }, C;
455
455
  }, ve = (s, k) => {
456
- if (B.am) return B;
456
+ if (W.am) return W;
457
457
  let D, J, ne;
458
458
  s instanceof Date ? (D = s.getHours(), J = s.getMinutes(), ne = s.getSeconds()) : (D = Math.floor(s / 60), J = Math.floor(s % 60));
459
459
  const me = D % 12 ? D % 12 : 12, o = (k || { am: "am", pm: "pm" })[D === 24 || D < 12 ? "am" : "pm"];
460
- return B = {
460
+ return W = {
461
461
  H: D,
462
462
  h: me,
463
463
  HH: D.toString().padStart(2, 0),
@@ -467,7 +467,7 @@ const lt = (y, t) => {
467
467
  m: J,
468
468
  mm: J.toString().padStart(2, 0),
469
469
  s: ne
470
- }, B;
470
+ }, W;
471
471
  };
472
472
  return {
473
473
  addDatePrototypes: A,
@@ -485,7 +485,7 @@ const lt = (y, t) => {
485
485
  isSameDate: H,
486
486
  isInRange: Y,
487
487
  isLeapYear: _,
488
- getPreviousFirstDayOfWeek: v,
488
+ getPreviousFirstDayOfWeek: f,
489
489
  stringToDate: c,
490
490
  dateToMinutes: u,
491
491
  countDays: p,
@@ -493,7 +493,7 @@ const lt = (y, t) => {
493
493
  isValid: O,
494
494
  formatDate: X,
495
495
  formatDateLite: U,
496
- formatTime: K,
496
+ formatTime: Q,
497
497
  formatTimeLite: te,
498
498
  formatMinutes: q
499
499
  };
@@ -501,7 +501,7 @@ const lt = (y, t) => {
501
501
  const { dateUtils: t, config: d } = y;
502
502
  let r = 0;
503
503
  const h = b(() => {
504
- var H, Y, _, v, c;
504
+ var H, Y, _, f, c;
505
505
  const e = {
506
506
  // A map of events indexed by { YYYY: { MM: { DD: [] } } }.
507
507
  // 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.
@@ -518,38 +518,38 @@ const lt = (y, t) => {
518
518
  for (let u of z) {
519
519
  const p = typeof u.start == "string" || typeof u.end == "string", a = !((H = u._) != null && H.register) || !u.isOverlapping || !u.delete;
520
520
  let O = !1;
521
- if (!p && ((Y = u._) != null && Y.cachedStart) && ((_ = u._) != null && _.cachedEnd) && (O = u.start.getTime() !== ((v = u._) == null ? void 0 : v.cachedStart) || u.end.getTime() !== ((c = u._) == null ? void 0 : c.cachedEnd)), p || a || O) {
521
+ if (!p && ((Y = u._) != null && Y.cachedStart) && ((_ = u._) != null && _.cachedEnd) && (O = u.start.getTime() !== ((f = u._) == null ? void 0 : f.cachedStart) || u.end.getTime() !== ((c = u._) == null ? void 0 : c.cachedEnd)), p || a || O) {
522
522
  if (!C(u)) continue;
523
- B(u), u._.cachedStart = u.start.getTime(), u._.cachedEnd = u.end.getTime();
523
+ W(u), u._.cachedStart = u.start.getTime(), u._.cachedEnd = u.end.getTime();
524
524
  }
525
525
  if (e.byId[u._.id] = u, u.recurring)
526
526
  e.recurring.push(u._.id);
527
527
  else if (!t.isSameDate(u.start, new Date(u.end.getTime() - 1)))
528
- u._.multiday = d.multidayEvents, d.multidayEvents ? e.multiday.push(u._.id) : (console.info("Vue Cal: Multi-day events provided without being enabled. Truncating event end to next midnight."), u.end = new Date(new Date(u.start).setHours(23, 59, 59, 999)), B(u)), e.byDate[u._.startFormatted] || (e.byDate[u._.startFormatted] = []), e.byDate[u._.startFormatted].push(u._.id);
528
+ u._.multiday = d.multidayEvents, d.multidayEvents ? e.multiday.push(u._.id) : (console.info("Vue Cal: Multi-day events provided without being enabled. Truncating event end to next midnight."), u.end = new Date(new Date(u.start).setHours(23, 59, 59, 999)), W(u)), e.byDate[u._.startFormatted] || (e.byDate[u._.startFormatted] = []), e.byDate[u._.startFormatted].push(u._.id);
529
529
  else {
530
530
  e.byDate[u._.startFormatted] || (e.byDate[u._.startFormatted] = []), e.byDate[u._.startFormatted].push(u._.id);
531
- const X = u._.startFormatted.substring(0, 4), U = u._.startFormatted.substring(5, 7), K = u._.startFormatted.substring(8, 10);
532
- e.byYear[X] || (e.byYear[X] = {}), e.byYear[X][U] || (e.byYear[X][U] = {}), e.byYear[X][U][K] || (e.byYear[X][U][K] = []), e.byYear[X][U][K].push(u._.id);
531
+ const X = u._.startFormatted.substring(0, 4), U = u._.startFormatted.substring(5, 7), Q = u._.startFormatted.substring(8, 10);
532
+ e.byYear[X] || (e.byYear[X] = {}), e.byYear[X][U] || (e.byYear[X][U] = {}), e.byYear[X][U][Q] || (e.byYear[X][U][Q] = []), e.byYear[X][U][Q].push(u._.id);
533
533
  }
534
534
  }
535
535
  return e;
536
- }), C = (e) => !e.start || !e.end ? (console.error("Vue Cal: Event is missing start or end date", e), !1) : (typeof e.start == "string" && (e.start = t.stringToDate(e.start)), typeof e.end == "string" && (e.end = t.stringToDate(e.end)), e.start.setSeconds(0, 0), e.end.getSeconds() === 59 ? e.end.setMinutes(e.end.getMinutes() + 1, 0, 0) : e.end.setSeconds(0, 0), isNaN(e.start) || isNaN(e.end) || e.end.getTime() < e.start.getTime() ? (isNaN(e.start) ? console.error(`Vue Cal: invalid start date for event "${e.title}".`, e.start) : isNaN(e.end) ? console.error(`Vue Cal: invalid end date for event "${e.title}".`, e.end) : console.error(`Vue Cal: invalid event dates for event "${e.title}". The event ends before it starts.`, e.start, e.end), !1) : !0), B = (e) => {
536
+ }), C = (e) => !e.start || !e.end ? (console.error("Vue Cal: Event is missing start or end date", e), !1) : (typeof e.start == "string" && (e.start = t.stringToDate(e.start)), typeof e.end == "string" && (e.end = t.stringToDate(e.end)), e.start.setSeconds(0, 0), e.end.getSeconds() === 59 ? e.end.setMinutes(e.end.getMinutes() + 1, 0, 0) : e.end.setSeconds(0, 0), isNaN(e.start) || isNaN(e.end) || e.end.getTime() < e.start.getTime() ? (isNaN(e.start) ? console.error(`Vue Cal: invalid start date for event "${e.title}".`, e.start) : isNaN(e.end) ? console.error(`Vue Cal: invalid end date for event "${e.title}".`, e.end) : console.error(`Vue Cal: invalid event dates for event "${e.title}". The event ends before it starts.`, e.start, e.end), !1) : !0), W = (e) => {
537
537
  e._ || (e._ = {}), e._.id = e._.id || ++r, e._.multiday = !t.isSameDate(e.start, new Date(e.end.getTime() - 1)), e._.startFormatted = t.formatDate(e.start), e._.endFormatted = t.formatDate(e.end), e._.startMinutes = ~~t.dateToMinutes(e.start), e._.endMinutes = ~~t.dateToMinutes(e.end);
538
538
  const z = e.start.getHours(), H = e.start.getMinutes().toString().padStart(2, 0), Y = e.end.getHours(), _ = e.end.getMinutes().toString().padStart(2, 0);
539
- e._.startTimeFormatted24 = `${z.toString().padStart(2, 0)}:${H}`, e._.startTimeFormatted12 = `${z % 12 || 12}${H ? `:${H}` : ""} ${z < 12 ? "AM" : "PM"}`, e._.endTimeFormatted24 = `${Y.toString().padStart(2, 0)}:${_}`, e._.endTimeFormatted12 = `${Y % 12 || 12}${_ ? `:${_}` : ""} ${Y < 12 ? "AM" : "PM"}`, e._.duration = Math.abs(~~((e.end - e.start) / 6e4)), e.delete || (e.delete = function(v) {
540
- return L(this._.id, v);
541
- }), e._.deleting === void 0 && (e._.deleting = !1), e._.deleted === void 0 && (e._.deleted = !1), e.isOverlapping || (e.isOverlapping = function(v = null) {
542
- return this.getOverlappingEvents(v).length;
543
- }), e.getOverlappingEvents || (e.getOverlappingEvents = function(v = null) {
539
+ e._.startTimeFormatted24 = `${z.toString().padStart(2, 0)}:${H}`, e._.startTimeFormatted12 = `${z % 12 || 12}${H ? `:${H}` : ""} ${z < 12 ? "AM" : "PM"}`, e._.endTimeFormatted24 = `${Y.toString().padStart(2, 0)}:${_}`, e._.endTimeFormatted12 = `${Y % 12 || 12}${_ ? `:${_}` : ""} ${Y < 12 ? "AM" : "PM"}`, e._.duration = Math.abs(~~((e.end - e.start) / 6e4)), e.delete || (e.delete = function(f) {
540
+ return L(this._.id, f);
541
+ }), e._.deleting === void 0 && (e._.deleting = !1), e._.deleted === void 0 && (e._.deleted = !1), e.isOverlapping || (e.isOverlapping = function(f = null) {
542
+ return this.getOverlappingEvents(f).length;
543
+ }), e.getOverlappingEvents || (e.getOverlappingEvents = function(f = null) {
544
544
  var a;
545
- const c = (v == null ? void 0 : v.start) || this.start, u = (v == null ? void 0 : v.end) || this.end, p = (a = d.schedules) != null && a.length ? ~~((v == null ? void 0 : v.schedule) || this.schedule) : null;
545
+ const c = (f == null ? void 0 : f.start) || this.start, u = (f == null ? void 0 : f.end) || this.end, p = (a = d.schedules) != null && a.length ? ~~((f == null ? void 0 : f.schedule) || this.schedule) : null;
546
546
  return E(c, u, { excludeIds: [this._.id], schedule: p });
547
- }), e._.register || (e._.register = (v) => {
548
- e._.$el = v, e._.fireCreated && (y.emit("event-created", e), delete e._.fireCreated);
547
+ }), e._.register || (e._.register = (f) => {
548
+ e._.$el = f, e._.fireCreated && (y.emit("event-created", e), delete e._.fireCreated);
549
549
  }), e._.unregister || (e._.unregister = () => {
550
550
  e._.$el = null, e._.register = null, e.isOverlapping = null, e.getOverlappingEvents = null, e.delete = null;
551
551
  });
552
- }, f = (e) => h.value.byId[e], A = (e) => {
552
+ }, v = (e) => h.value.byId[e], A = (e) => {
553
553
  const z = [];
554
554
  for (const { start: H, end: Y } of e) {
555
555
  const _ = E(H, Y);
@@ -576,66 +576,66 @@ const lt = (y, t) => {
576
576
  if (!H) return console.warn("Vue Cal: Cannot delete event without its ID.");
577
577
  const _ = d.events.findIndex((p) => p._.id === H);
578
578
  if (_ === -1) return console.warn(`Vue Cal: Cannot delete unknown event \`${H}\`.`);
579
- const v = d.events[_];
580
- if (v.deletable === !1) return console.warn(`Vue Cal: Can't delete event \`${H}\` since it was explicitely set to \`delete: false\`.`);
579
+ const f = d.events[_];
580
+ if (f.deletable === !1) return console.warn(`Vue Cal: Can't delete event \`${H}\` since it was explicitely set to \`delete: false\`.`);
581
581
  switch (z) {
582
582
  case 0:
583
- v._.deleting ? d.events.splice(_, 1) : v._.deleting = !0;
583
+ f._.deleting ? d.events.splice(_, 1) : f._.deleting = !0;
584
584
  break;
585
585
  // Display the delete button.
586
586
  case 1:
587
- v._.deleting = !0;
587
+ f._.deleting = !0;
588
588
  break;
589
589
  // Visual deletion + external DOM event firing.
590
590
  // When explicitly using this stage, the event will be visually deleted but still present in the
591
591
  // source of truth until the cell is unmounted (by navigating away).
592
592
  case 2:
593
- v._.deleted = !0, d.events[_]._.deleted = !0, (u = v._.$el) == null || u.dispatchEvent(new CustomEvent("event-deleted", { detail: v._.id }));
593
+ f._.deleted = !0, d.events[_]._.deleted = !0, (u = f._.$el) == null || u.dispatchEvent(new CustomEvent("event-deleted", { detail: f._.id }));
594
594
  break;
595
595
  // Effective deletion from the source of truth (by default, when unmounting the cell).
596
596
  case 3:
597
- d.events.splice(_, 1), y.emit("update:events", d.events), y.emit("event-delete", v);
597
+ d.events.splice(_, 1), y.emit("update:events", d.events), y.emit("event-delete", f);
598
598
  break;
599
599
  }
600
600
  return !0;
601
601
  }, l = (e, z, H) => {
602
602
  const Y = d.allDayEvents ? { allDay: H } : {}, _ = E(e, z, { background: !1, ...Y });
603
603
  if (!_.length) return { cellOverlaps: {}, longestStreak: 0 };
604
- const v = {};
604
+ const f = {};
605
605
  let c = [], u = 0;
606
606
  _.sort((p, a) => p.start - a.start || p.end - p.start - (a.end - a.start));
607
607
  for (const p of _) {
608
608
  const a = p._.id;
609
- v[a] || (v[a] = { overlaps: /* @__PURE__ */ new Set(), maxConcurrent: 1, position: 0 }), c = c.filter((te) => te.end > p.start);
609
+ f[a] || (f[a] = { overlaps: /* @__PURE__ */ new Set(), maxConcurrent: 1, position: 0 }), c = c.filter((te) => te.end > p.start);
610
610
  const O = c.filter((te) => {
611
611
  var le;
612
612
  return (!((le = d.schedules) != null && le.length) || p.schedule === te.schedule) && te.start < p.end;
613
613
  }), X = new Set(O.map((te) => {
614
614
  var q;
615
- return ((q = v[te._.id]) == null ? void 0 : q.position) ?? 0;
615
+ return ((q = f[te._.id]) == null ? void 0 : q.position) ?? 0;
616
616
  }));
617
617
  let U = 0;
618
618
  for (; X.has(U); ) U++;
619
- v[a].position = U, c.push(p);
620
- const K = Math.max(1, ...O.map((te) => {
619
+ f[a].position = U, c.push(p);
620
+ const Q = Math.max(1, ...O.map((te) => {
621
621
  var q;
622
- return ((q = v[te._.id]) == null ? void 0 : q.maxConcurrent) ?? 1;
622
+ return ((q = f[te._.id]) == null ? void 0 : q.maxConcurrent) ?? 1;
623
623
  }));
624
- v[a].maxConcurrent = Math.max(O.length + 1, K);
624
+ f[a].maxConcurrent = Math.max(O.length + 1, Q);
625
625
  for (const te of O)
626
- v[te._.id].overlaps.add(a), v[a].overlaps.add(te._.id), v[te._.id].maxConcurrent = v[a].maxConcurrent;
627
- u = Math.max(u, v[a].maxConcurrent);
626
+ f[te._.id].overlaps.add(a), f[a].overlaps.add(te._.id), f[te._.id].maxConcurrent = f[a].maxConcurrent;
627
+ u = Math.max(u, f[a].maxConcurrent);
628
628
  }
629
- for (const p in v) v[p].overlaps = [...v[p].overlaps];
630
- return { cellOverlaps: v, longestStreak: u };
631
- }, E = (e, z, { excludeIds: H = [], schedule: Y = null, background: _ = !0, allDay: v = !1 } = {}) => {
629
+ for (const p in f) f[p].overlaps = [...f[p].overlaps];
630
+ return { cellOverlaps: f, longestStreak: u };
631
+ }, E = (e, z, { excludeIds: H = [], schedule: Y = null, background: _ = !0, allDay: f = !1 } = {}) => {
632
632
  if (!Object.keys(h.value.byId).length) return [];
633
633
  const c = e.getFullYear(), u = z.getFullYear(), p = e.getMonth() + 1, a = z.getMonth() + 1, O = e.getDate(), X = z.getDate();
634
634
  e.getTime(), z.getTime();
635
- const U = new Date(e).setHours(0, 0, 0, 0), K = new Date(z).setHours(23, 59, 59, 999), te = new Set(H), q = [];
635
+ const U = new Date(e).setHours(0, 0, 0, 0), Q = new Date(z).setHours(23, 59, 59, 999), te = new Set(H), q = [];
636
636
  if (Object.keys(h.value.byId).length <= 100) {
637
637
  for (const le of Object.values(h.value.byId))
638
- !le || te.has(le._.id) || Y !== null && Y !== le.schedule || _ === !1 && le.background || d.allDayEvents && (v && !le.allDay || !v && le.allDay) || le.start.getTime() < K && le.end.getTime() > U && q.push(le);
638
+ !le || te.has(le._.id) || Y !== null && Y !== le.schedule || _ === !1 && le.background || d.allDayEvents && (f && !le.allDay || !f && le.allDay) || le.start.getTime() < Q && le.end.getTime() > U && q.push(le);
639
639
  return q;
640
640
  }
641
641
  for (let le = c; le <= u; le++) {
@@ -652,15 +652,15 @@ const lt = (y, t) => {
652
652
  if (T != null && T.length)
653
653
  for (let M = 0; M < T.length; M++) {
654
654
  const w = h.value.byId[T[M]];
655
- !w || te.has(w._.id) || Y !== null && Y !== w.schedule || _ === !1 && w.background || d.allDayEvents && (v && !w.allDay || !v && w.allDay) || w.start.getTime() < K && w.end.getTime() > U && q.push(w);
655
+ !w || te.has(w._.id) || Y !== null && Y !== w.schedule || _ === !1 && w.background || d.allDayEvents && (f && !w.allDay || !f && w.allDay) || w.start.getTime() < Q && w.end.getTime() > U && q.push(w);
656
656
  }
657
657
  }
658
658
  }
659
659
  }
660
660
  return q;
661
661
  }, F = (e, z, H) => {
662
- const Y = e.allDay || !d.time, _ = Y ? new Date(e.start).setHours(0, 0, 0, 0) : e.start.getTime(), v = Y ? new Date(e.end).setHours(23, 59, 59, 999) : e.end.getTime(), c = Y ? new Date(z).setHours(0, 0, 0, 0) : z.getTime(), u = Y ? new Date(H).setHours(23, 59, 59, 999) : H.getTime();
663
- return v > c && _ < u;
662
+ const Y = e.allDay || !d.time, _ = Y ? new Date(e.start).setHours(0, 0, 0, 0) : e.start.getTime(), f = Y ? new Date(e.end).setHours(23, 59, 59, 999) : e.end.getTime(), c = Y ? new Date(z).setHours(0, 0, 0, 0) : z.getTime(), u = Y ? new Date(H).setHours(23, 59, 59, 999) : H.getTime();
663
+ return f > c && _ < u;
664
664
  }, m = be({
665
665
  isResizing: !1,
666
666
  fromResizer: !1,
@@ -681,20 +681,20 @@ const lt = (y, t) => {
681
681
  cellEl: null,
682
682
  schedule: null
683
683
  }), i = (e, z) => {
684
- var v;
684
+ var f;
685
685
  let H = je(m.movePercentageY, d);
686
686
  if (H = Math.max(0, Math.min(H, 1440)), d.snapToInterval) {
687
687
  const c = H + d.snapToInterval / 2;
688
688
  H = c - c % d.snapToInterval;
689
689
  }
690
690
  let Y = e.start, _ = new Date(z.getTime() + H * 6e4);
691
- return m.moveX && ((v = y.touch) != null && v.currentHoveredCell) && m.cellEl && new Date(y.touch.currentHoveredCell.__vueParentComponent.props.start), _ < m.resizeStartDate && (Y = _, _ = m.resizeStartDate), { newStart: Y, newEnd: _ };
691
+ return m.moveX && ((f = y.touch) != null && f.currentHoveredCell) && m.cellEl && new Date(y.touch.currentHoveredCell.__vueParentComponent.props.start), _ < m.resizeStartDate && (Y = _, _ = m.resizeStartDate), { newStart: Y, newEnd: _ };
692
692
  }, S = async (e) => {
693
- var Y, _, v, c, u;
693
+ var Y, _, f, c, u;
694
694
  const { clientX: z, clientY: H } = ((Y = e.touches) == null ? void 0 : Y[0]) || e;
695
695
  if (m.fromResizer && !((_ = y.touch) != null && _.isResizingEvent)) {
696
696
  m.resizingOriginalEvent = { ...m.resizingEvent, _: { ...m.resizingEvent._ } }, y.touch.isResizingEvent = !0;
697
- const p = ((v = d.eventListeners) == null ? void 0 : v.event) || {};
697
+ const p = ((f = d.eventListeners) == null ? void 0 : f.event) || {};
698
698
  (c = p["resize-start"]) == null || c.call(p, { e, event: m.resizingEvent });
699
699
  }
700
700
  if (m.cellEl) {
@@ -714,7 +714,7 @@ const lt = (y, t) => {
714
714
  }, n = async (e) => {
715
715
  var z, H, Y, _;
716
716
  if ((z = y.touch) != null && z.isResizingEvent && m.resizingEvent) {
717
- const v = m.cellEl.__vueParentComponent.props.start, { newStart: c, newEnd: u } = i(m.resizingEvent, v);
717
+ const f = m.cellEl.__vueParentComponent.props.start, { newStart: c, newEnd: u } = i(m.resizingEvent, f);
718
718
  let p = !0;
719
719
  const O = (((H = d.eventListeners) == null ? void 0 : H.event) || {})["resize-end"];
720
720
  O && (p = await O({
@@ -730,7 +730,7 @@ const lt = (y, t) => {
730
730
  return {
731
731
  events: h,
732
732
  resizeState: m,
733
- getEvent: f,
733
+ getEvent: v,
734
734
  getViewEvents: A,
735
735
  getCellOverlappingEvents: l,
736
736
  getEventsInRange: E,
@@ -741,28 +741,28 @@ const lt = (y, t) => {
741
741
  var _;
742
742
  const Y = ((_ = e.touches) == null ? void 0 : _[0]) || e;
743
743
  if (m.fromResizer = !!Y.target.closest(".vuecal__event-resizer"), m.fromResizer) {
744
- const v = H.getBoundingClientRect();
745
- m.startX = Y.clientX - v.left, m.startY = Y.clientY - v.top, m.startPercentageX = m.startX * 100 / v.width, m.startPercentageY = m.startY * 100 / v.height, m.cellEl = H.closest(".vuecal__cell"), m.resizeStartDate = z.start, m.resizingEvent = z, document.addEventListener(e.type === "touchstart" ? "touchmove" : "mousemove", S, { passive: !m.fromResizer }), document.addEventListener(e.type === "touchstart" ? "touchend" : "mouseup", n, { once: !0 });
744
+ const f = H.getBoundingClientRect();
745
+ m.startX = Y.clientX - f.left, m.startY = Y.clientY - f.top, m.startPercentageX = m.startX * 100 / f.width, m.startPercentageY = m.startY * 100 / f.height, m.cellEl = H.closest(".vuecal__cell"), m.resizeStartDate = z.start, m.resizingEvent = z, document.addEventListener(e.type === "touchstart" ? "touchmove" : "mousemove", S, { passive: !m.fromResizer }), document.addEventListener(e.type === "touchstart" ? "touchend" : "mouseup", n, { once: !0 });
746
746
  }
747
747
  }
748
748
  };
749
749
  }, Ot = ({ config: y, dateUtils: t, emit: d, texts: r, eventsManager: h }, C) => {
750
- const { availableViews: B } = y, f = ue(y.view && B[y.view] ? y.view : y.defaultView), A = ue(y.selectedDate || null), Z = ue(/* @__PURE__ */ new Date()), L = ue(new Date(y.viewDate || Z.value));
750
+ const { availableViews: W } = y, v = ue(y.view && W[y.view] ? y.view : y.defaultView), A = ue(y.selectedDate || null), Z = ue(/* @__PURE__ */ new Date()), L = ue(new Date(y.viewDate || Z.value));
751
751
  L.value.setHours(0, 0, 0, 0);
752
752
  const l = ue(new Date(L));
753
753
  let E = null;
754
- const F = b(() => f.value === "month" ? l.value : _.value), m = b(() => f.value === "month" ? new Date(l.value.getFullYear(), l.value.getMonth() + 1, 0, 23, 59, 59, 999) : c.value), i = b(() => f.value === "week" ? t.getPreviousFirstDayOfWeek(_.value, y.startWeekOnSunday) : f.value === "month" ? _.value : F.value), S = b(() => {
755
- if (f.value === "week") {
754
+ const F = b(() => v.value === "month" ? l.value : _.value), m = b(() => v.value === "month" ? new Date(l.value.getFullYear(), l.value.getMonth() + 1, 0, 23, 59, 59, 999) : c.value), i = b(() => v.value === "week" ? t.getPreviousFirstDayOfWeek(_.value, y.startWeekOnSunday) : v.value === "month" ? _.value : F.value), S = b(() => {
755
+ if (v.value === "week") {
756
756
  const g = t.addDays(i.value, 7);
757
757
  return g.setMilliseconds(-1), g;
758
758
  }
759
- return f.value === "month" ? c.value : m.value;
759
+ return v.value === "month" ? c.value : m.value;
760
760
  }), n = b(() => {
761
761
  const g = Z.value.getTime();
762
- if (f.value === "week")
762
+ if (v.value === "week")
763
763
  return i.value.getTime() <= g && g <= S.value.getTime();
764
- const N = _.value.getTime(), ee = c.value.getTime();
765
- return N <= g && g <= ee;
764
+ const R = _.value.getTime(), ee = c.value.getTime();
765
+ return R <= g && g <= ee;
766
766
  });
767
767
  function I() {
768
768
  Z.value = /* @__PURE__ */ new Date(), E = setTimeout(I, 60 * 1e3);
@@ -771,34 +771,34 @@ const lt = (y, t) => {
771
771
  E = setTimeout(I, (60 - (/* @__PURE__ */ new Date()).getSeconds()) * 1e3), I();
772
772
  }
773
773
  const z = b(() => {
774
- if (!y.availableViews[f.value]) return 1;
775
- let g = y.availableViews[f.value].cols;
776
- return y.hasHiddenDays && ["week", "month"].includes(f.value) && (g -= y.hasHiddenDays), g;
774
+ if (!y.availableViews[v.value]) return 1;
775
+ let g = y.availableViews[v.value].cols;
776
+ return y.hasHiddenDays && ["week", "month"].includes(v.value) && (g -= y.hasHiddenDays), g;
777
777
  }), H = b(() => {
778
778
  var g;
779
- return ((g = y.availableViews[f.value]) == null ? void 0 : g.rows) || 1;
779
+ return ((g = y.availableViews[v.value]) == null ? void 0 : g.rows) || 1;
780
780
  }), Y = b(() => z.value * H.value), _ = b(() => {
781
- if (f.value === "month") {
781
+ if (v.value === "month") {
782
782
  let g = l.value.getDay() || 7;
783
783
  return y.startWeekOnSunday && !y.hideWeekdays[7] && (g += 1), y.viewDayOffset && (g -= y.viewDayOffset), t.subtractDays(l.value, g - 1);
784
784
  }
785
- if (f.value === "week") {
785
+ if (v.value === "week") {
786
786
  const g = "1234567".split("").filter((ee) => !Object.keys(y.hideWeekdays).includes(ee));
787
- let N = Math.min(...g);
788
- return y.startWeekOnSunday && !y.hideWeekdays[7] && (N = 1), y.viewDayOffset && (N += y.viewDayOffset), t.addDays(l.value, N - 1);
787
+ let R = Math.min(...g);
788
+ return y.startWeekOnSunday && !y.hideWeekdays[7] && (R = 1), y.viewDayOffset && (R += y.viewDayOffset), t.addDays(l.value, R - 1);
789
789
  }
790
790
  return l.value;
791
- }), v = b(() => {
792
- const g = [], N = ["days", "week", "month"].includes(f.value);
791
+ }), f = b(() => {
792
+ const g = [], R = ["days", "week", "month"].includes(v.value);
793
793
  let ee = 0;
794
- for (let x = 0; x < Y.value + ee; x++)
795
- switch (f.value) {
794
+ for (let K = 0; K < Y.value + ee; K++)
795
+ switch (v.value) {
796
796
  case "day":
797
797
  case "days":
798
798
  case "week":
799
799
  case "month": {
800
- const ye = t.addDays(_.value, x), Ne = ye.getDay() || 7;
801
- if (N && y.hasHiddenDays && y.hideWeekdays[Ne]) {
800
+ const ye = t.addDays(_.value, K), Ne = ye.getDay() || 7;
801
+ if (R && y.hasHiddenDays && y.hideWeekdays[Ne]) {
802
802
  ee++;
803
803
  continue;
804
804
  }
@@ -808,37 +808,37 @@ const lt = (y, t) => {
808
808
  }
809
809
  case "year":
810
810
  g.push({
811
- start: new Date(_.value.getFullYear(), x, 1, 0, 0, 0, 0),
812
- end: new Date(_.value.getFullYear(), x + 1, 0, 23, 59, 59, 999)
811
+ start: new Date(_.value.getFullYear(), K, 1, 0, 0, 0, 0),
812
+ end: new Date(_.value.getFullYear(), K + 1, 0, 23, 59, 59, 999)
813
813
  });
814
814
  break;
815
815
  case "years":
816
816
  g.push({
817
- start: new Date(_.value.getFullYear() + x, 0, 1, 0, 0, 0, 0),
818
- end: new Date(_.value.getFullYear() + x + 1, 0, 0, 23, 59, 59, 999)
817
+ start: new Date(_.value.getFullYear() + K, 0, 1, 0, 0, 0, 0),
818
+ end: new Date(_.value.getFullYear() + K + 1, 0, 0, 23, 59, 59, 999)
819
819
  });
820
820
  break;
821
821
  }
822
822
  return g;
823
- }), c = b(() => v.value[v.value.length - 1].end), u = ue("right"), p = b(() => {
823
+ }), c = b(() => f.value[f.value.length - 1].end), u = ue("right"), p = b(() => {
824
824
  const g = Object.keys(y.availableViews);
825
- return g[g.indexOf(f.value) + 1];
825
+ return g[g.indexOf(v.value) + 1];
826
826
  }), a = b(() => {
827
827
  const g = Object.keys(y.availableViews);
828
- return g[g.indexOf(f.value) - 1];
828
+ return g[g.indexOf(v.value) - 1];
829
829
  });
830
- function O(g, N, ee = !1) {
831
- if (!N || !N[g]) return g + 1;
832
- const x = N[g];
833
- return ee && typeof x == "string" ? x.substring(0, 3) : x;
830
+ function O(g, R, ee = !1) {
831
+ if (!R || !R[g]) return g + 1;
832
+ const K = R[g];
833
+ return ee && typeof K == "string" ? K.substring(0, 3) : K;
834
834
  }
835
- function X(g, N, ee) {
836
- const { monthsArray: x, monthBeforeDay: ye, canTruncate: Ne, xs: ze } = ee, Me = g.getMonth(), Ee = g.getFullYear(), Ye = N.getMonth(), Pe = N.getFullYear(), We = Me !== Ye, $t = Ee !== Pe, Te = Ne && (ze || We), Le = g.getDate(), Ae = N.getDate();
837
- return $t ? ye ? `${O(Me, x, Te)} ${Le}, ${Ee} - ${O(Ye, x, Te)} ${Ae}, ${Pe}` : `${Le} ${O(Me, x, Te)} ${Ee} - ${Ae} ${O(Ye, x, Te)} ${Pe}` : We ? ye ? `${O(Me, x, Te)} ${Le} - ${O(Ye, x, Te)} ${Ae}, ${Ee}` : `${Le} ${O(Me, x, Te)} - ${Ae} ${O(Ye, x, Te)} ${Ee}` : ye ? `${O(Me, x, Te)} ${Le}-${Ae}, ${Ee}` : `${Le}-${Ae} ${O(Me, x, Te)} ${Ee}`;
835
+ function X(g, R, ee) {
836
+ const { monthsArray: K, monthBeforeDay: ye, canTruncate: Ne, xs: ze } = ee, Me = g.getMonth(), Ee = g.getFullYear(), Ye = R.getMonth(), Pe = R.getFullYear(), Be = Me !== Ye, $t = Ee !== Pe, Te = Ne && (ze || Be), Le = g.getDate(), Ae = R.getDate();
837
+ return $t ? ye ? `${O(Me, K, Te)} ${Le}, ${Ee} - ${O(Ye, K, Te)} ${Ae}, ${Pe}` : `${Le} ${O(Me, K, Te)} ${Ee} - ${Ae} ${O(Ye, K, Te)} ${Pe}` : Be ? ye ? `${O(Me, K, Te)} ${Le} - ${O(Ye, K, Te)} ${Ae}, ${Ee}` : `${Le} ${O(Me, K, Te)} - ${Ae} ${O(Ye, K, Te)} ${Ee}` : ye ? `${O(Me, K, Te)} ${Le}-${Ae}, ${Ee}` : `${Le}-${Ae} ${O(Me, K, Te)} ${Ee}`;
838
838
  }
839
839
  const U = b(() => {
840
- const { dateFormat: g, months: N, monthsGenitive: ee, week: x, truncations: ye } = r, Ne = y.locale, ze = ye !== !1, Me = g.indexOf("M") < g.indexOf("D"), Ee = ee && Ne === "el" ? ee : N;
841
- switch (f.value) {
840
+ const { dateFormat: g, months: R, monthsGenitive: ee, week: K, truncations: ye } = r, Ne = y.locale, ze = ye !== !1, Me = g.indexOf("M") < g.indexOf("D"), Ee = ee && Ne === "el" ? ee : R;
841
+ switch (v.value) {
842
842
  case "day":
843
843
  return t.formatDate(_.value, g);
844
844
  case "days":
@@ -850,12 +850,12 @@ const lt = (y, t) => {
850
850
  xs: y.xs
851
851
  };
852
852
  let Pe = X(_.value, c.value, Ye);
853
- if (f.value === "week") {
854
- const We = t.getWeek(
853
+ if (v.value === "week") {
854
+ const Be = t.getWeek(
855
855
  _.value,
856
856
  y.startWeekOnSunday && !y.hideWeekdays[7]
857
857
  );
858
- Pe += ` <small>${x} ${We}</small>`;
858
+ Pe += ` <small>${K} ${Be}</small>`;
859
859
  }
860
860
  return Pe;
861
861
  }
@@ -869,8 +869,8 @@ const lt = (y, t) => {
869
869
  return `${_.value.getFullYear()} - ${m.value.getFullYear()}`;
870
870
  }
871
871
  });
872
- async function K() {
873
- switch (l.value = new Date(L.value || Z.value), l.value.setHours(0, 0, 0, 0), f.value) {
872
+ async function Q() {
873
+ switch (l.value = new Date(L.value || Z.value), l.value.setHours(0, 0, 0, 0), v.value) {
874
874
  case "day":
875
875
  break;
876
876
  case "days":
@@ -889,24 +889,24 @@ const lt = (y, t) => {
889
889
  break;
890
890
  }
891
891
  Z.value = /* @__PURE__ */ new Date(), y.ready && (await Xe(), d("view-change", {
892
- id: f.value,
892
+ id: v.value,
893
893
  title: U.value,
894
894
  start: F.value,
895
895
  end: m.value,
896
896
  extendedStart: i.value,
897
897
  extendedEnd: S.value,
898
- cellDates: v.value,
898
+ cellDates: f.value,
899
899
  containsToday: n.value,
900
900
  events: G.value
901
901
  }));
902
902
  }
903
903
  function te(g) {
904
- const N = f.value, ee = y.availableViews[N];
905
- g[N] && JSON.stringify(g[N]) === JSON.stringify(ee) || K();
904
+ const R = v.value, ee = y.availableViews[R];
905
+ g[R] && JSON.stringify(g[R]) === JSON.stringify(ee) || Q();
906
906
  }
907
- function q(g, N = !0) {
908
- const ee = Object.keys(y.availableViews);
909
- f.value !== g && (ee.includes(g) ? (u.value = ee.indexOf(g) < ee.indexOf(f.value) ? "left" : "right", f.value = g, N && d("update:view", g), K()) : console.warn(`Vue Cal: the \`${g}\` view is not available.`));
907
+ function q(g, R = !0, ee = null) {
908
+ const K = Object.keys(y.availableViews);
909
+ v.value === g && !ee || (K.includes(g) ? (u.value = K.indexOf(g) < K.indexOf(v.value) ? "left" : "right", R && v.value !== g && d("update:view", g), v.value = g, ee ? J(ee) : Q()) : console.warn(`Vue Cal: the \`${g}\` view is not available.`));
910
910
  }
911
911
  function le() {
912
912
  p.value ? q(p.value) : console.warn("Vue Cal: no broader view is available.");
@@ -921,77 +921,77 @@ const lt = (y, t) => {
921
921
  k(!0);
922
922
  }
923
923
  function k(g = !0) {
924
- let N = new Date(L.value);
925
- switch (f.value) {
924
+ let R = new Date(L.value);
925
+ switch (v.value) {
926
926
  case "day":
927
927
  case "days":
928
- g ? N = t.addDays(c.value, 1) : N = t.subtractDays(_.value, Y.value);
928
+ g ? R = t.addDays(c.value, 1) : R = t.subtractDays(_.value, Y.value);
929
929
  break;
930
930
  case "week": {
931
- g ? (N = t.addDays(S.value, 1), N.setHours(0, 0, 0, 0)) : N = t.subtractDays(i.value, Y.value);
931
+ g ? (R = t.addDays(S.value, 1), R.setHours(0, 0, 0, 0)) : R = t.subtractDays(i.value, Y.value);
932
932
  break;
933
933
  }
934
934
  case "month": {
935
935
  const ee = g ? 1 : -1;
936
- N = new Date(N.getFullYear(), N.getMonth() + ee, 1, 0, 0, 0, 0);
936
+ R = new Date(R.getFullYear(), R.getMonth() + ee, 1, 0, 0, 0, 0);
937
937
  break;
938
938
  }
939
939
  case "year": {
940
940
  const ee = g ? 1 : -1;
941
- N = new Date(N.getFullYear() + ee, 1, 1, 0, 0, 0, 0);
941
+ R = new Date(R.getFullYear() + ee, 1, 1, 0, 0, 0, 0);
942
942
  break;
943
943
  }
944
944
  case "years": {
945
945
  const ee = g ? Y.value : -Y.value;
946
- N = new Date(N.getFullYear() + ee, 1, 1, 0, 0, 0, 0);
946
+ R = new Date(R.getFullYear() + ee, 1, 1, 0, 0, 0, 0);
947
947
  break;
948
948
  }
949
949
  }
950
- J(N);
950
+ J(R);
951
951
  }
952
952
  function D() {
953
953
  const g = /* @__PURE__ */ new Date();
954
954
  g.setHours(0, 0, 0, 0), J(g);
955
955
  }
956
- function J(g, N = !0, ee = !1) {
956
+ function J(g, R = !0, ee = !1) {
957
957
  if (!t.isValid(g)) return console.warn("Vue Cal: can't navigate to the given date: invalid date provided to `updateViewDate(date)`.");
958
- let [x, ye] = [_.value, c.value];
959
- f.value === "month" && ([x, ye] = [F.value, m.value]), (!t.isInRange(g, x, ye) || ee) && (g.setHours(0, 0, 0, 0), u.value = g.getTime() < x.getTime() ? "left" : "right", L.value = g, N && d("update:viewDate", g), K());
958
+ let [K, ye] = [_.value, c.value];
959
+ v.value === "month" && ([K, ye] = [F.value, m.value]), (!t.isInRange(g, K, ye) || ee) && (g.setHours(0, 0, 0, 0), u.value = g.getTime() < K.getTime() ? "left" : "right", L.value = g, R && d("update:viewDate", g), Q());
960
960
  }
961
- function ne(g, N = !0) {
961
+ function ne(g, R = !0) {
962
962
  if (!t.isValid(g)) return console.warn("Vue Cal: can't update the selected date: invalid date provided to `updateSelectedDate(date)`.");
963
- const { isValid: ee, isSameDate: x } = t;
964
- (!A.value || !ee(A.value) || !x(g, A.value)) && (g.setHours(0, 0, 0, 0), A.value = g, N && d("update:selectedDate", g));
963
+ const { isValid: ee, isSameDate: K } = t;
964
+ (!A.value || !ee(A.value) || !K(g, A.value)) && (g.setHours(0, 0, 0, 0), A.value = g, R && d("update:selectedDate", g));
965
965
  }
966
966
  function me(g) {
967
- !g && !l.value.getDay() ? J(t.addDays(l.value, 1), !0, !0) : (u.value = "left", K());
967
+ !g && !l.value.getDay() ? J(t.addDays(l.value, 1), !0, !0) : (u.value = "left", Q());
968
968
  }
969
969
  function o(g) {
970
970
  g && y.startWeekOnSunday && !l.value.getDay() ? J(t.addDays(l.value, 1), !0, !0) : !g && y.startWeekOnSunday && l.value.getDay() === 1 && J(t.subtractDays(l.value, 1), !0, !0);
971
971
  }
972
972
  function T() {
973
- console.log("toggling weekdays", y.hideWeekdays), K();
973
+ Q();
974
974
  }
975
975
  function M(g) {
976
- var x;
977
- const N = (x = C.value) == null ? void 0 : x.querySelector(".vuecal__scrollable"), ee = g ? g * y.timeCellHeight / y.timeStep : 0;
978
- N == null || N.scrollTo({ top: ee, behavior: "smooth" });
976
+ var K;
977
+ const R = (K = C.value) == null ? void 0 : K.querySelector(".vuecal__scrollable"), ee = g ? g * y.timeCellHeight / y.timeStep : 0;
978
+ R == null || R.scrollTo({ top: ee, behavior: "smooth" });
979
979
  }
980
980
  function w() {
981
981
  const g = /* @__PURE__ */ new Date();
982
982
  M(g.getHours() * 60 + g.getMinutes());
983
983
  }
984
- function R() {
984
+ function N() {
985
985
  M(0);
986
986
  }
987
- const G = b(() => h.getViewEvents(v.value)), oe = h.createEvent, ge = h.deleteEvent;
987
+ const G = b(() => h.getViewEvents(f.value)), oe = h.createEvent, ge = h.deleteEvent;
988
988
  return De(() => y.view, (g) => q(g, !1)), De(() => y.availableViews, te), De(() => y.datePicker, () => q("month")), De(() => y.viewDate, (g) => J(g, !1)), De(() => y.selectedDate, (g) => ne(g, !1)), De(() => y.startWeekOnSunday, (g) => me(g)), De(() => y.hideWeekends, (g) => o(g)), De(() => y.hideWeekdays, T), De(() => Y.value, () => {
989
989
  Y.value > 90 && console.warn("Vue Cal: high cell count detected. Performance may degrade when interactions are enabled.");
990
990
  }), De(() => y.watchRealTime, (g) => {
991
991
  g && y.time ? e() : E = clearTimeout(E);
992
- }), K(), y.time && y.watchRealTime && e(), Re(() => E = clearTimeout(E)), {
992
+ }), Q(), y.time && y.watchRealTime && e(), Re(() => E = clearTimeout(E)), {
993
993
  now: Z,
994
- id: f,
994
+ id: v,
995
995
  broaderView: p,
996
996
  narrowerView: a,
997
997
  title: U,
@@ -1006,7 +1006,7 @@ const lt = (y, t) => {
1006
1006
  lastCellDate: c,
1007
1007
  containsToday: n,
1008
1008
  selectedDate: A,
1009
- cellDates: v,
1009
+ cellDates: f,
1010
1010
  cols: z,
1011
1011
  rows: H,
1012
1012
  // All the events are stored and indexed in the events object of the eventsManager.
@@ -1014,7 +1014,7 @@ const lt = (y, t) => {
1014
1014
  // and multi-day events.
1015
1015
  events: G,
1016
1016
  transitionDirection: u,
1017
- switch: q,
1017
+ switch: (g, R) => q(g, !0, R),
1018
1018
  broader: le,
1019
1019
  narrower: ae,
1020
1020
  previous: ve,
@@ -1025,27 +1025,27 @@ const lt = (y, t) => {
1025
1025
  updateSelectedDate: ne,
1026
1026
  scrollToCurrentTime: w,
1027
1027
  scrollToTime: M,
1028
- scrollTop: R,
1028
+ scrollTop: N,
1029
1029
  createEvent: oe,
1030
1030
  deleteEvent: ge,
1031
1031
  // Getters.
1032
1032
  get isDay() {
1033
- return f.value === "day";
1033
+ return v.value === "day";
1034
1034
  },
1035
1035
  get isDays() {
1036
- return f.value === "days";
1036
+ return v.value === "days";
1037
1037
  },
1038
1038
  get isWeek() {
1039
- return f.value === "week";
1039
+ return v.value === "week";
1040
1040
  },
1041
1041
  get isMonth() {
1042
- return f.value === "month";
1042
+ return v.value === "month";
1043
1043
  },
1044
1044
  get isYear() {
1045
- return f.value === "year";
1045
+ return v.value === "year";
1046
1046
  },
1047
1047
  get isYears() {
1048
- return f.value === "years";
1048
+ return v.value === "years";
1049
1049
  }
1050
1050
  };
1051
1051
  }, rt = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], ot = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], it = "Years", ut = "Year", ct = "Month", dt = "Week", vt = "Days", ft = "Day", mt = "Today", gt = "No Event", ht = "All-day", yt = "Delete", Dt = "Create an event", pt = "dddd, MMMM D, YYYY", wt = "am", _t = "pm", Qe = {
@@ -1223,19 +1223,19 @@ const lt = (y, t) => {
1223
1223
  }, Rt = ["onClick", "innerHTML"], Nt = {
1224
1224
  key: 1,
1225
1225
  class: "vuecal__title-bar"
1226
- }, Wt = { class: "vuecal__transition-wrap" }, Bt = ["disabled", "innerHTML"], Xt = {
1226
+ }, Bt = { class: "vuecal__transition-wrap" }, Wt = ["disabled", "innerHTML"], Xt = {
1227
1227
  __name: "header",
1228
1228
  setup(y) {
1229
1229
  const t = He("vuecal"), { view: d, config: r } = t, h = () => {
1230
1230
  r.clickToNavigate && d.broader();
1231
1231
  }, C = b(() => r.clickToNavigate ? { click: h } : {});
1232
- return (B, f) => (V(), P("div", At, [
1233
- j(B.$slots, "header", {
1232
+ return (W, v) => (V(), P("div", At, [
1233
+ j(W.$slots, "header", {
1234
1234
  view: $(d),
1235
1235
  availableViews: $(r).availableViews,
1236
1236
  vuecal: $(t)
1237
1237
  }),
1238
- B.$slots.header ? Q("", !0) : (V(), P(de, { key: 0 }, [
1238
+ W.$slots.header ? x("", !0) : (V(), P(de, { key: 0 }, [
1239
1239
  $(r).viewsBar ? (V(), P("div", Ft, [
1240
1240
  (V(!0), P(de, null, we($(r).availableViews, (A, Z) => (V(), P("button", {
1241
1241
  class: pe(["vuecal__view-button", { "vuecal__view-button--active": $(d).id === Z }]),
@@ -1243,29 +1243,29 @@ const lt = (y, t) => {
1243
1243
  innerHTML: $(t).texts[Z],
1244
1244
  type: "button"
1245
1245
  }, null, 10, Rt))), 256))
1246
- ])) : Q("", !0),
1246
+ ])) : x("", !0),
1247
1247
  $(r).titleBar ? (V(), P("nav", Nt, [
1248
1248
  he("button", {
1249
- class: pe(["vuecal__nav vuecal__nav--prev", { "vuecal__nav--default": !B.$slots["previous-button"] }]),
1250
- onClick: f[0] || (f[0] = (...A) => $(d).previous && $(d).previous(...A)),
1249
+ class: pe(["vuecal__nav vuecal__nav--prev", { "vuecal__nav--default": !W.$slots["previous-button"] }]),
1250
+ onClick: v[0] || (v[0] = (...A) => $(d).previous && $(d).previous(...A)),
1251
1251
  type: "button"
1252
1252
  }, [
1253
- j(B.$slots, "previous-button")
1253
+ j(W.$slots, "previous-button")
1254
1254
  ], 2),
1255
- he("div", Wt, [
1255
+ he("div", Bt, [
1256
1256
  Oe(Ue, {
1257
1257
  name: `vuecal-slide-fade--${$(d).transitionDirection}`
1258
1258
  }, {
1259
- default: W(() => [
1259
+ default: B(() => [
1260
1260
  (V(), P("div", {
1261
1261
  key: $(d).id + $(d).start.getTime()
1262
1262
  }, [
1263
- B.$slots.title || B.$slots[`title.${$(d).id}`] ? (V(), Se(xe($(r).clickToNavigate && $(d).broaderView ? "button" : "div"), ie({
1263
+ W.$slots.title || W.$slots[`title.${$(d).id}`] ? (V(), Se(xe($(r).clickToNavigate && $(d).broaderView ? "button" : "div"), ie({
1264
1264
  key: 0,
1265
1265
  class: "vuecal__title"
1266
1266
  }, Ie(C.value)), {
1267
- default: W(() => [
1268
- B.$slots[`title.${$(d).id}`] ? j(B.$slots, `title.${$(d).id}`, se(ie({ key: 0 }, $(d)))) : j(B.$slots, "title", se(ie({ key: 1 }, $(d))))
1267
+ default: B(() => [
1268
+ W.$slots[`title.${$(d).id}`] ? j(W.$slots, `title.${$(d).id}`, se(ie({ key: 0 }, $(d)))) : j(W.$slots, "title", se(ie({ key: 1 }, $(d))))
1269
1269
  ]),
1270
1270
  _: 3
1271
1271
  }, 16)) : (V(), Se(xe($(r).clickToNavigate && $(d).broaderView ? "button" : "div"), ie({
@@ -1280,27 +1280,27 @@ const lt = (y, t) => {
1280
1280
  }, 8, ["name"])
1281
1281
  ]),
1282
1282
  $(r).todayButton ? (V(), P(de, { key: 0 }, [
1283
- B.$slots["today-button"] ? j(B.$slots, "today-button", {
1283
+ W.$slots["today-button"] ? j(W.$slots, "today-button", {
1284
1284
  key: 0,
1285
1285
  navigate: () => !$(d).containsToday && $(d).goToToday(),
1286
1286
  active: $(d).containsToday
1287
1287
  }) : (V(), P("button", {
1288
1288
  key: 1,
1289
1289
  class: pe(["vuecal__nav vuecal__nav--today vuecal__nav--default", { "vuecal__nav--active": $(d).containsToday }]),
1290
- onClick: f[1] || (f[1] = (A) => !$(d).containsToday && $(d).goToToday()),
1290
+ onClick: v[1] || (v[1] = (A) => !$(d).containsToday && $(d).goToToday()),
1291
1291
  disabled: !!$(d).containsToday,
1292
1292
  type: "button",
1293
1293
  innerHTML: $(t).texts.today
1294
- }, null, 10, Bt))
1295
- ], 64)) : Q("", !0),
1294
+ }, null, 10, Wt))
1295
+ ], 64)) : x("", !0),
1296
1296
  he("button", {
1297
- class: pe(["vuecal__nav vuecal__nav--next", { "vuecal__nav--default": !B.$slots["next-button"] }]),
1298
- onClick: f[2] || (f[2] = (...A) => $(d).next && $(d).next(...A)),
1297
+ class: pe(["vuecal__nav vuecal__nav--next", { "vuecal__nav--default": !W.$slots["next-button"] }]),
1298
+ onClick: v[2] || (v[2] = (...A) => $(d).next && $(d).next(...A)),
1299
1299
  type: "button"
1300
1300
  }, [
1301
- j(B.$slots, "next-button")
1301
+ j(W.$slots, "next-button")
1302
1302
  ], 2)
1303
- ])) : Q("", !0)
1303
+ ])) : x("", !0)
1304
1304
  ], 64))
1305
1305
  ]));
1306
1306
  }
@@ -1323,7 +1323,7 @@ const lt = (y, t) => {
1323
1323
  },
1324
1324
  emits: ["event-drag-start", "event-drag-end", "event-resize-start", "event-resize-end"],
1325
1325
  setup(y, { emit: t }) {
1326
- const d = y, { config: r, view: h, dnd: C, touch: B, dateUtils: f, eventsManager: A } = He("vuecal"), { handleEventResize: Z } = A, L = ue(null), l = be(d.event), E = be({
1326
+ const d = y, { config: r, view: h, dnd: C, touch: W, dateUtils: v, eventsManager: A } = He("vuecal"), { handleEventResize: Z } = A, L = ue(null), l = be(d.event), E = be({
1327
1327
  dragging: !1,
1328
1328
  fromResizer: !1,
1329
1329
  // If the drag originates from the resizer element.
@@ -1368,16 +1368,16 @@ const lt = (y, t) => {
1368
1368
  b(() => r.editableEvents.delete && l.deletable !== !1 && !l.background);
1369
1369
  const i = b(() => {
1370
1370
  var c, u, p, a, O;
1371
- const v = !!((c = l._) != null && c.multiday);
1371
+ const f = !!((c = l._) != null && c.multiday);
1372
1372
  return {
1373
1373
  [`vuecal__event--${l._.id}`]: !0,
1374
1374
  [l.class]: !!l.class,
1375
1375
  "vuecal__event--recurring": !!l.recurring,
1376
1376
  "vuecal__event--background": !!l.background,
1377
1377
  "vuecal__event--all-day": l.allDay || ((u = l._) == null ? void 0 : u.startMinutes) === 0 && ((p = l._) == null ? void 0 : p.duration) === 1440,
1378
- "vuecal__event--multiday": v,
1379
- "vuecal__event--cut-top": !d.inAllDayBar && (((a = l._) == null ? void 0 : a.startMinutes) < r.timeFrom || v && !S.value),
1380
- "vuecal__event--cut-bottom": !d.inAllDayBar && (((O = l._) == null ? void 0 : O.endMinutes) > r.timeTo || v && !n.value),
1378
+ "vuecal__event--multiday": f,
1379
+ "vuecal__event--cut-top": !d.inAllDayBar && (((a = l._) == null ? void 0 : a.startMinutes) < r.timeFrom || f && !S.value),
1380
+ "vuecal__event--cut-bottom": !d.inAllDayBar && (((O = l._) == null ? void 0 : O.endMinutes) > r.timeTo || f && !n.value),
1381
1381
  // Only apply the dragging class on the event copy that is being dragged.
1382
1382
  "vuecal__event--dragging": !l._.draggingGhost && l._.dragging,
1383
1383
  // Only apply the dragging-ghost class on the event original that remains fixed while a copy is being
@@ -1387,68 +1387,68 @@ const lt = (y, t) => {
1387
1387
  // after event deletion (event._.dragging is already false) so the event ghost does not flash in before
1388
1388
  // deletion.
1389
1389
  "vuecal__event--dragging-ghost": l._.draggingGhost,
1390
- "vuecal__event--resizing": B.isResizingEvent
1390
+ "vuecal__event--resizing": W.isResizingEvent
1391
1391
  };
1392
- }), S = b(() => l._.multiday ? new Date(l.start).setHours(0, 0, 0, 0) === d.cellStart.getTime() : !0), n = b(() => l._.multiday ? f.isSameDate(new Date(new Date(l.end).setMilliseconds(-1)), d.cellEnd) : !0), I = b(() => {
1393
- const v = new Date(l.start).setHours(0, 0, 0, 0), c = new Date(l.end).setHours(0, 0, 0, 0);
1394
- return Math.ceil((c - v) / (1e3 * 60 * 60 * 24));
1392
+ }), S = b(() => l._.multiday ? new Date(l.start).setHours(0, 0, 0, 0) === d.cellStart.getTime() : !0), n = b(() => l._.multiday ? v.isSameDate(new Date(new Date(l.end).setMilliseconds(-1)), d.cellEnd) : !0), I = b(() => {
1393
+ const f = new Date(l.start).setHours(0, 0, 0, 0), c = new Date(l.end).setHours(0, 0, 0, 0);
1394
+ return Math.ceil((c - f) / (1e3 * 60 * 60 * 24));
1395
1395
  }), e = b(() => {
1396
- const v = (h.isDay || h.isDays || h.isWeek) && r.time && !d.inAllDayBar, c = r.horizontal;
1397
- if (!v && !l.backgroundColor && !l.color) return !1;
1396
+ const f = (h.isDay || h.isDays || h.isWeek) && r.time && !d.inAllDayBar, c = r.horizontal;
1397
+ if (!f && !l.backgroundColor && !l.color) return !1;
1398
1398
  const u = {
1399
1399
  backgroundColor: l.backgroundColor || null,
1400
1400
  color: l.color || null
1401
1401
  };
1402
- if (v) {
1402
+ if (f) {
1403
1403
  let p = l._.startMinutes, a = l._.endMinutes;
1404
1404
  l._.multiday && (S.value || (p = 0), n.value || (a = 1440));
1405
- const O = Math.max(r.timeFrom, p), X = Math.min(r.timeTo, a) + (l._.duration && !a ? 1440 : 0), U = Ve(O, r), K = Ve(X, r) - U;
1406
- u[c ? "left" : "top"] = `${U}%`, u[c ? "width" : "height"] = `${K}%`;
1405
+ const O = Math.max(r.timeFrom, p), X = Math.min(r.timeTo, a) + (l._.duration && !a ? 1440 : 0), U = Ve(O, r), Q = Ve(X, r) - U;
1406
+ u[c ? "left" : "top"] = `${U}%`, u[c ? "width" : "height"] = `${Q}%`;
1407
1407
  }
1408
1408
  return u;
1409
1409
  }), z = b(() => {
1410
- const v = { ...r.eventListeners.event };
1411
- for (const [p, a] of Object.entries(v))
1412
- ["resize-end"].includes(p) || (v[p] = (O) => {
1410
+ const f = { ...r.eventListeners.event };
1411
+ for (const [p, a] of Object.entries(f))
1412
+ ["resize-end"].includes(p) || (f[p] = (O) => {
1413
1413
  O.type !== "drop" && a(O.type ? { e: O, event: l } : O);
1414
1414
  });
1415
- const c = { ...v };
1416
- v.touchstart = (p) => {
1415
+ const c = { ...f };
1416
+ f.touchstart = (p) => {
1417
1417
  var a;
1418
1418
  p.stopPropagation(), E.touchAndDragTimer = setTimeout(() => {
1419
1419
  E.canTouchAndDrag = !0;
1420
1420
  }, 500), _(p), (a = c.touchstart) == null || a.call(c, { e: p, event: l });
1421
- }, v.mousedown = (p) => {
1421
+ }, f.mousedown = (p) => {
1422
1422
  var a;
1423
1423
  p.stopPropagation(), _(p), (a = c.mousedown) == null || a.call(c, { e: p, event: l });
1424
1424
  };
1425
1425
  let u = null;
1426
- return v.click = (p) => {
1426
+ return f.click = (p) => {
1427
1427
  var a;
1428
1428
  (a = c.click) == null || a.call(c, { e: p, event: l }), u ? u = clearTimeout(u) : u = setTimeout(() => {
1429
1429
  var O;
1430
1430
  u = null, (O = c["delayed-click"]) == null || O.call(c, { e: p, event: l });
1431
1431
  }, 400);
1432
- }, v.dblclick = (p) => {
1432
+ }, f.dblclick = (p) => {
1433
1433
  c.dblclick ? c.dblclick({ e: p, event: l }) : l.delete(1);
1434
- }, v;
1434
+ }, f;
1435
1435
  });
1436
1436
  let H = null, Y = 0;
1437
- const _ = (v) => {
1437
+ const _ = (f) => {
1438
1438
  var a, O, X;
1439
- const c = ((a = v.touches) == null ? void 0 : a[0]) || v;
1439
+ const c = ((a = f.touches) == null ? void 0 : a[0]) || f;
1440
1440
  E.fromResizer = c.target.closest(".vuecal__event-resizer");
1441
1441
  const u = Date.now();
1442
1442
  (!H || u - Y > ea) && (H = L.value.getBoundingClientRect(), Y = u);
1443
1443
  const p = H;
1444
- E.startX = (((O = v.touches) == null ? void 0 : O[0]) || v).clientX - p.left, E.startY = (((X = v.touches) == null ? void 0 : X[0]) || v).clientY - p.top, E.startPercentageX = E.startX * 100 / p.width, E.startPercentageY = E.startY * 100 / p.height, E.cellEl = L.value.closest(".vuecal__cell"), E.resizeStartDate = l.start, E.fromResizer && Z(v, l, L.value), E.holdTimer = setTimeout(() => {
1445
- var U, K;
1446
- E.holding = !0, (K = (U = z.value).hold) == null || K.call(U, { e: v, event: l });
1444
+ E.startX = (((O = f.touches) == null ? void 0 : O[0]) || f).clientX - p.left, E.startY = (((X = f.touches) == null ? void 0 : X[0]) || f).clientY - p.top, E.startPercentageX = E.startX * 100 / p.width, E.startPercentageY = E.startY * 100 / p.height, E.cellEl = L.value.closest(".vuecal__cell"), E.resizeStartDate = l.start, E.fromResizer && Z(f, l, L.value), E.holdTimer = setTimeout(() => {
1445
+ var U, Q;
1446
+ E.holding = !0, (Q = (U = z.value).hold) == null || Q.call(U, { e: f, event: l });
1447
1447
  }, 1e3);
1448
1448
  };
1449
1449
  return Ze(() => l._.register(L.value)), Re(() => {
1450
1450
  E.holdTimer && (E.holdTimer = clearTimeout(E.holdTimer)), E.touchAndDragTimer && (E.touchAndDragTimer = clearTimeout(E.touchAndDragTimer)), l._.unregister();
1451
- }), (v, c) => (V(), P("div", ie({ class: "vuecal__event" }, Ie(z.value, !0), {
1451
+ }), (f, c) => (V(), P("div", ie({ class: "vuecal__event" }, Ie(z.value, !0), {
1452
1452
  ref_key: "eventEl",
1453
1453
  ref: L,
1454
1454
  class: i.value,
@@ -1458,26 +1458,26 @@ const lt = (y, t) => {
1458
1458
  onDragend: c[3] || (c[3] = (u) => F.value && $(C).eventDragEnd(u, l))
1459
1459
  }), [
1460
1460
  he("div", qt, [
1461
- v.$slots["event.all-day"] ? j(v.$slots, "event.all-day", {
1461
+ f.$slots["event.all-day"] ? j(f.$slots, "event.all-day", {
1462
1462
  key: 0,
1463
1463
  event: l
1464
- }) : v.$slots[`event.${$(h).id}`] ? j(v.$slots, `event.${$(h).id}`, {
1464
+ }) : f.$slots[`event.${$(h).id}`] ? j(f.$slots, `event.${$(h).id}`, {
1465
1465
  key: 1,
1466
1466
  event: l
1467
- }) : j(v.$slots, "event", {
1467
+ }) : j(f.$slots, "event", {
1468
1468
  key: 2,
1469
1469
  event: l
1470
1470
  }, () => [
1471
1471
  he("div", Gt, ce(l.title), 1),
1472
1472
  $(r).time && !y.inAllDayBar && !(l._.multiday && !S.value) ? (V(), P("div", Ut, [
1473
- $(h).isMonth ? (V(), P("span", Jt, ",")) : Q("", !0),
1473
+ $(h).isMonth ? (V(), P("span", Jt, ",")) : x("", !0),
1474
1474
  he("span", Zt, ce(l._[`startTimeFormatted${$(r).twelveHour ? 12 : 24}`]), 1),
1475
- $(h).isMonth ? Q("", !0) : (V(), P("span", Kt, [
1475
+ $(h).isMonth ? x("", !0) : (V(), P("span", Kt, [
1476
1476
  qe(" - " + ce(l._[`endTimeFormatted${$(r).twelveHour ? 12 : 24}`]), 1),
1477
- l._.multiday && S.value ? (V(), P("span", Qt, "+" + ce(I.value) + "d", 1)) : Q("", !0)
1477
+ l._.multiday && S.value ? (V(), P("span", Qt, "+" + ce(I.value) + "d", 1)) : x("", !0)
1478
1478
  ]))
1479
- ])) : Q("", !0),
1480
- y.inAllDayBar ? Q("", !0) : (V(), P("div", {
1479
+ ])) : x("", !0),
1480
+ y.inAllDayBar ? x("", !0) : (V(), P("div", {
1481
1481
  key: 1,
1482
1482
  class: "vuecal__event-content",
1483
1483
  innerHTML: l.content
@@ -1489,14 +1489,14 @@ const lt = (y, t) => {
1489
1489
  class: "vuecal__event-resizer",
1490
1490
  onDragstart: c[0] || (c[0] = et(() => {
1491
1491
  }, ["prevent", "stop"]))
1492
- }, null, 32)) : Q("", !0),
1492
+ }, null, 32)) : x("", !0),
1493
1493
  Oe(Ue, { name: "vuecal-delete-btn" }, {
1494
- default: W(() => [
1494
+ default: B(() => [
1495
1495
  l._.deleting ? (V(), P("div", {
1496
1496
  key: 0,
1497
1497
  class: "vuecal__event-delete",
1498
1498
  onClick: c[1] || (c[1] = et((u) => l.delete(3), ["stop"]))
1499
- }, "Delete")) : Q("", !0)
1499
+ }, "Delete")) : x("", !0)
1500
1500
  ]),
1501
1501
  _: 1
1502
1502
  })
@@ -1535,7 +1535,7 @@ const lt = (y, t) => {
1535
1535
  // True when the cell is an all-day cell.
1536
1536
  },
1537
1537
  setup(y) {
1538
- const t = y, d = He("vuecal"), { view: r, config: h, dateUtils: C, eventsManager: B, dnd: f, touch: A } = d, Z = b(() => C.isToday(t.start)), L = ue(null), l = ue([]), E = ue(!1), F = (o) => {
1538
+ const t = y, d = He("vuecal"), { view: r, config: h, dateUtils: C, eventsManager: W, dnd: v, touch: A } = d, Z = b(() => C.isToday(t.start)), L = ue(null), l = ue([]), E = ue(!1), F = (o) => {
1539
1539
  l.value.push(o.detail), E.value = !0;
1540
1540
  }, m = () => setTimeout(() => E.value = !1, 300), i = be({
1541
1541
  dragging: !1,
@@ -1580,15 +1580,15 @@ const lt = (y, t) => {
1580
1580
  return o && T && M;
1581
1581
  }), z = b(() => {
1582
1582
  var oe;
1583
- const o = /* @__PURE__ */ new Date(), T = r.start.getFullYear(), M = r.start.getMonth(), w = t.start.getFullYear(), R = t.start.getMonth();
1583
+ const o = /* @__PURE__ */ new Date(), T = r.start.getFullYear(), M = r.start.getMonth(), w = t.start.getFullYear(), N = t.start.getMonth();
1584
1584
  return {
1585
1585
  [`vuecal__cell--${Ge[t.start.getDay()]}`]: r.isDay || r.isDays || r.isWeek || r.isMonth,
1586
- [`vuecal__cell--${Yt[R]}`]: r.isYear,
1586
+ [`vuecal__cell--${Yt[N]}`]: r.isYear,
1587
1587
  [`vuecal__cell--${w}`]: r.isYears,
1588
1588
  "vuecal__cell--today": Z.value,
1589
- "vuecal__cell--current-month": r.isYear && w === o.getFullYear() && R === o.getMonth(),
1589
+ "vuecal__cell--current-month": r.isYear && w === o.getFullYear() && N === o.getMonth(),
1590
1590
  "vuecal__cell--current-year": r.isYears && w === o.getFullYear(),
1591
- "vuecal__cell--out-of-range": r.isMonth && (w !== T || R !== M),
1591
+ "vuecal__cell--out-of-range": r.isMonth && (w !== T || N !== M),
1592
1592
  "vuecal__cell--before-min": U.value && O.value,
1593
1593
  "vuecal__cell--after-max": U.value && X.value,
1594
1594
  "vuecal__cell--disabled": U.value,
@@ -1614,26 +1614,26 @@ const lt = (y, t) => {
1614
1614
  case "years":
1615
1615
  return C.formatDate(t.start, "YYYY");
1616
1616
  }
1617
- }), Y = b(() => h.datePicker ? [] : B.getEventsInRange(
1617
+ }), Y = b(() => h.datePicker ? [] : W.getEventsInRange(
1618
1618
  t.start,
1619
1619
  t.end,
1620
1620
  { excludeIds: l.value, ...h.allDayEvents ? { allDay: t.allDay } : {} }
1621
- )), _ = b(() => Y.value.filter((o) => !o.background)), v = b(() => {
1621
+ )), _ = b(() => Y.value.filter((o) => !o.background)), f = b(() => {
1622
1622
  var o;
1623
1623
  return (o = h.schedules) == null ? void 0 : o.reduce((T, M) => (T[M.id] = Y.value.filter((w) => w.schedule === M.id), T), {});
1624
1624
  }), c = b(() => {
1625
1625
  if (r.isMonth || r.isYear || r.isYears || t.allDay) return {};
1626
1626
  const o = typeof document < "u" && document.documentElement.getAttribute("dir") === "rtl", T = h.horizontal, M = {};
1627
1627
  for (const w of Y.value) {
1628
- const R = w._.id, { maxConcurrent: G = 1, position: oe = 0 } = n.value.cellOverlaps[R] || {}, ge = o ? "right" : "left", g = T ? "height" : "width";
1629
- M[R] = { [T ? "top" : ge]: `${100 / G * oe}%` }, h.stackEvents ? M[R][g] = `${100 / G + (oe === G - 1 ? 0 : 15)}%` : M[R][g] = `${100 / G}%`;
1628
+ const N = w._.id, { maxConcurrent: G = 1, position: oe = 0 } = n.value.cellOverlaps[N] || {}, ge = o ? "right" : "left", g = T ? "height" : "width";
1629
+ M[N] = { [T ? "top" : ge]: `${100 / G * oe}%` }, h.stackEvents ? M[N][g] = `${100 / G + (oe === G - 1 ? 0 : 15)}%` : M[N][g] = `${100 / G}%`;
1630
1630
  }
1631
1631
  return M;
1632
1632
  }), u = b(() => {
1633
1633
  const o = {};
1634
1634
  for (const T of Y.value) {
1635
- const M = T._.id, { maxConcurrent: w = 1, position: R = 0 } = n.value.cellOverlaps[M] || {};
1636
- o[M] = `vuecal__event--stack-${R + 1}-${w}`;
1635
+ const M = T._.id, { maxConcurrent: w = 1, position: N = 0 } = n.value.cellOverlaps[M] || {};
1636
+ o[M] = `vuecal__event--stack-${N + 1}-${w}`;
1637
1637
  }
1638
1638
  return o;
1639
1639
  }), p = b(() => h.showCellEventCount && _.value.length), a = b(() => {
@@ -1643,12 +1643,12 @@ const lt = (y, t) => {
1643
1643
  let T = (M = h.specialHours) == null ? void 0 : M[o];
1644
1644
  if (T)
1645
1645
  return Array.isArray(T) || (T = [T]), T.map((w) => {
1646
- let { from: R, to: G, class: oe, label: ge } = w;
1647
- if (isNaN(R) || isNaN(G) || h.timeFrom >= G || h.timeTo <= R) return;
1648
- R = Math.max(h.timeFrom, R), G = Math.min(h.timeTo, G);
1649
- const g = Ve(R, h), N = Ve(G, h) - g;
1646
+ let { from: N, to: G, class: oe, label: ge } = w;
1647
+ if (isNaN(N) || isNaN(G) || h.timeFrom >= G || h.timeTo <= N) return;
1648
+ N = Math.max(h.timeFrom, N), G = Math.min(h.timeTo, G);
1649
+ const g = Ve(N, h), R = Ve(G, h) - g;
1650
1650
  return {
1651
- style: { top: `${g}%`, height: `${N}%` },
1651
+ style: { top: `${g}%`, height: `${R}%` },
1652
1652
  label: ge,
1653
1653
  class: oe
1654
1654
  };
@@ -1656,45 +1656,45 @@ const lt = (y, t) => {
1656
1656
  }), O = b(() => h.minTimestamp !== null && h.minTimestamp > t.end.getTime()), X = b(() => h.maxTimestamp && h.maxTimestamp < t.start.getTime()), U = b(() => {
1657
1657
  const { disableDays: o } = h, T = r.isYear || r.isYears;
1658
1658
  return o.length && o.includes(C.formatDate(t.start)) && !T ? !0 : O.value || X.value;
1659
- }), K = be({
1659
+ }), Q = be({
1660
1660
  show: b(() => {
1661
1661
  if (!(!r.isDay && !r.isDays && !r.isWeek) && !(!Z.value || !h.time || t.allDay) && !(h.timeFrom > C.dateToMinutes(r.now)) && !(C.dateToMinutes(r.now) > h.timeTo))
1662
1662
  return !0;
1663
1663
  }),
1664
1664
  nowInMinutes: b(() => C.dateToMinutes(r.now)),
1665
- todaysTimePosition: b(() => Ve(K.nowInMinutes, h)),
1666
- style: b(() => `${h.horizontal ? "left" : "top"}: ${K.todaysTimePosition}%`),
1665
+ todaysTimePosition: b(() => Ve(Q.nowInMinutes, h)),
1666
+ style: b(() => `${h.horizontal ? "left" : "top"}: ${Q.todaysTimePosition}%`),
1667
1667
  currentTime: b(() => C.formatTime(r.now))
1668
1668
  }), te = b(() => {
1669
1669
  if (U.value) return {};
1670
1670
  const o = { ...h.eventListeners.cell };
1671
- for (const [w, R] of Object.entries(o))
1671
+ for (const [w, N] of Object.entries(o))
1672
1672
  o[w] = (G) => {
1673
1673
  var oe, ge, g;
1674
- (g = (ge = G.target || ((oe = G.e) == null ? void 0 : oe.target)).closest) != null && g.call(ge, ".vuecal__event") || R(G.type ? { e: G, cell: q.value, cursor: ae.value } : G);
1674
+ (g = (ge = G.target || ((oe = G.e) == null ? void 0 : oe.target)).closest) != null && g.call(ge, ".vuecal__event") || N(G.type ? { e: G, cell: q.value, cursor: ae.value } : G);
1675
1675
  };
1676
1676
  const T = { ...o };
1677
1677
  let M = null;
1678
1678
  return o.click = (w) => {
1679
1679
  var G;
1680
1680
  ve();
1681
- const R = le(w);
1682
- (G = T.click) == null || G.call(T, { e: w, cell: q.value, cursor: R }), M ? M = clearTimeout(M) : M = setTimeout(() => {
1681
+ const N = le(w);
1682
+ (G = T.click) == null || G.call(T, { e: w, cell: q.value, cursor: N }), M ? M = clearTimeout(M) : M = setTimeout(() => {
1683
1683
  var oe;
1684
- M = null, (oe = T["delayed-click"]) == null || oe.call(T, { e: w, cell: q.value, cursor: R });
1684
+ M = null, (oe = T["delayed-click"]) == null || oe.call(T, { e: w, cell: q.value, cursor: N });
1685
1685
  }, 400);
1686
1686
  }, (h.time && r.isDay || r.isDays || r.isWeek) && (o.touchstart = (w) => {
1687
- var R;
1688
- s(w.e || w), (R = T.touchstart) == null || R.call(T, { e: w, cell: q.value, cursor: ae.value });
1687
+ var N;
1688
+ s(w.e || w), (N = T.touchstart) == null || N.call(T, { e: w, cell: q.value, cursor: ae.value });
1689
1689
  }, o.mousedown = (w) => {
1690
- var R;
1691
- s(w.e || w), (R = T.mousedown) == null || R.call(T, { e: w, cell: q.value, cursor: ae.value });
1690
+ var N;
1691
+ s(w.e || w), (N = T.mousedown) == null || N.call(T, { e: w, cell: q.value, cursor: ae.value });
1692
1692
  }), T.dblclick && (o.dblclick = (w) => {
1693
- var R;
1694
- (R = T.dblclick) == null || R.call(T, { e: w, cell: q.value, cursor: le(w) });
1695
- }), h.editableEvents.drag && (o.dragenter = (w) => f.cellDragEnter(w, q.value), o.dragover = (w) => {
1696
- w.preventDefault(), f.cellDragOver(w, q.value);
1697
- }, o.dragleave = (w) => f.cellDragLeave(w, q.value), o.drop = (w) => f.cellDragDrop(w, q.value, t.allDay)), o;
1693
+ var N;
1694
+ (N = T.dblclick) == null || N.call(T, { e: w, cell: q.value, cursor: le(w) });
1695
+ }), h.editableEvents.drag && (o.dragenter = (w) => v.cellDragEnter(w, q.value), o.dragover = (w) => {
1696
+ w.preventDefault(), v.cellDragOver(w, q.value);
1697
+ }, o.dragleave = (w) => v.cellDragLeave(w, q.value), o.drop = (w) => v.cellDragDrop(w, q.value, t.allDay)), o;
1698
1698
  }), q = b(() => ({
1699
1699
  start: t.start,
1700
1700
  end: t.end,
@@ -1706,8 +1706,8 @@ const lt = (y, t) => {
1706
1706
  narrower: r.narrowerView
1707
1707
  })), le = (o) => {
1708
1708
  var G;
1709
- const T = (((G = o.touches) == null ? void 0 : G[0]) || o).clientY, { top: M } = L.value.getBoundingClientRect(), w = Ke(T - M, L.value), R = new Date(t.start);
1710
- return R.setMinutes(je(w, h)), { y: w, date: R };
1709
+ const T = (((G = o.touches) == null ? void 0 : G[0]) || o).clientY, { top: M } = L.value.getBoundingClientRect(), w = Ke(T - M, L.value), N = new Date(t.start);
1710
+ return N.setMinutes(je(w, h)), { y: w, date: N };
1711
1711
  }, ae = b(() => {
1712
1712
  const o = je(i.movePercentageY || i.startPercentageY, h), T = new Date(t.start);
1713
1713
  return T.setMinutes(o), {
@@ -1718,24 +1718,24 @@ const lt = (y, t) => {
1718
1718
  }), ve = () => {
1719
1719
  r.updateSelectedDate(t.start), h.clickToNavigate && ((r.isMonth || r.isDays || r.isWeek) && h.availableViews.day ? r.switch("day") : r.isYear && h.availableViews.month ? r.switch("month") : r.isYears && h.availableViews.year && r.switch("year")), r.updateViewDate(t.start);
1720
1720
  }, s = (o) => {
1721
- var w, R;
1721
+ var w, N;
1722
1722
  const T = o.type === "touchstart";
1723
1723
  T ? (i.canTouchAndDrag = !1, i.touchAndDragTimer = setTimeout(() => {
1724
1724
  i.canTouchAndDrag = !0, (i.holding || i.dragging) && o.preventDefault();
1725
1725
  }, 500)) : i.canTouchAndDrag = !0, i.schedule = ~~o.target.dataset.schedule;
1726
1726
  const M = L.value.getBoundingClientRect();
1727
- i.startX = (((w = o.touches) == null ? void 0 : w[0]) || o).clientX - M.left, i.startY = (((R = o.touches) == null ? void 0 : R[0]) || o).clientY - M.top, i.startPercentageX = i.startX * 100 / M.width, i.startPercentageY = i.startY * 100 / M.height, i.thresholdPassed = !1, document.addEventListener(T ? "touchmove" : "mousemove", k, { passive: !T }), document.addEventListener(T ? "touchend" : "mouseup", D, { once: !0 }), i.holdTimer = setTimeout(() => {
1727
+ i.startX = (((w = o.touches) == null ? void 0 : w[0]) || o).clientX - M.left, i.startY = (((N = o.touches) == null ? void 0 : N[0]) || o).clientY - M.top, i.startPercentageX = i.startX * 100 / M.width, i.startPercentageY = i.startY * 100 / M.height, i.thresholdPassed = !1, document.addEventListener(T ? "touchmove" : "mousemove", k, { passive: !T }), document.addEventListener(T ? "touchend" : "mouseup", D, { once: !0 }), i.holdTimer = setTimeout(() => {
1728
1728
  var G, oe;
1729
1729
  i.holding = !0, (oe = (G = te.value).hold) == null || oe.call(G, { e: o, cell: q.value, cursor: ae.value });
1730
1730
  }, 1e3);
1731
1731
  }, k = (o) => {
1732
- var w, R, G, oe, ge, g;
1732
+ var w, N, G, oe, ge, g;
1733
1733
  const T = o.type === "touchmove";
1734
1734
  if (T && !i.canTouchAndDrag) {
1735
1735
  i.touchAndDragTimer && (clearTimeout(i.touchAndDragTimer), i.touchAndDragTimer = null), D(o);
1736
1736
  return;
1737
1737
  }
1738
- T && o.preventDefault(), i.dragging || (A.isDraggingCell = !0, (R = (w = te.value)["drag-start"]) == null || R.call(w, { e: o, cell: q.value, cursor: ae.value })), i.dragging = !0, i.holdTimer = clearTimeout(i.holdTimer), i.holding = !1;
1738
+ T && o.preventDefault(), i.dragging || (A.isDraggingCell = !0, (N = (w = te.value)["drag-start"]) == null || N.call(w, { e: o, cell: q.value, cursor: ae.value })), i.dragging = !0, i.holdTimer = clearTimeout(i.holdTimer), i.holding = !1;
1739
1739
  const M = L.value.getBoundingClientRect();
1740
1740
  i.moveX = (((G = o.touches) == null ? void 0 : G[0]) || o).clientX - M.left, i.moveY = (((oe = o.touches) == null ? void 0 : oe[0]) || o).clientY - M.top, i.movePercentageX = i.moveX * 100 / M.width, i.movePercentageY = i.moveY * 100 / M.height, h.eventCreateMinDrag && Math.abs(i.startY - i.moveY) > h.eventCreateMinDrag && (i.thresholdPassed = !0), (g = (ge = te.value).drag) == null || g.call(ge, { e: o, cell: q.value, cursor: ae.value });
1741
1741
  }, D = async (o) => {
@@ -1745,13 +1745,13 @@ const lt = (y, t) => {
1745
1745
  }, J = async (o) => {
1746
1746
  var ge;
1747
1747
  if (!e.value) return;
1748
- let { start: T, end: M, startMinutes: w, endMinutes: R } = I.value;
1749
- T = new Date(t.start), T.setMinutes(w), M = new Date(t.start), M.setMinutes(R);
1748
+ let { start: T, end: M, startMinutes: w, endMinutes: N } = I.value;
1749
+ T = new Date(t.start), T.setMinutes(w), M = new Date(t.start), M.setMinutes(N);
1750
1750
  let G = { ...I.value, start: T, end: M };
1751
1751
  const { create: oe } = h.eventListeners.event;
1752
1752
  if (typeof oe == "function") {
1753
1753
  const g = G;
1754
- G = await new Promise((N) => oe({ e: o, event: G, cell: q.value, resolve: N, cursor: ae.value })), G && typeof G == "object" && r.createEvent(G), G && typeof G == "boolean" && r.createEvent(g);
1754
+ G = await new Promise((R) => oe({ e: o, event: G, cell: q.value, resolve: R, cursor: ae.value })), G && typeof G == "object" && r.createEvent(G), G && typeof G == "boolean" && r.createEvent(g);
1755
1755
  } else r.createEvent(G);
1756
1756
  (ge = navigator.vibrate) == null || ge.call(navigator, 200);
1757
1757
  }, ne = () => {
@@ -1759,7 +1759,7 @@ const lt = (y, t) => {
1759
1759
  for (const T of Object.keys(te.value))
1760
1760
  (o = L.value) == null || o.removeEventListener(T, te.value[T]);
1761
1761
  }, me = () => {
1762
- n.value = B.getCellOverlappingEvents(t.start, t.end, t.allDay);
1762
+ n.value = W.getCellOverlappingEvents(t.start, t.end, t.allDay);
1763
1763
  };
1764
1764
  return De(
1765
1765
  // Watch event IDs and start/end dates (only) to detect event resizing/dnd.
@@ -1770,7 +1770,7 @@ const lt = (y, t) => {
1770
1770
  { immediate: !0, flush: "post" }
1771
1771
  // Use flush: 'post' to prevent infinite updates.
1772
1772
  ), Re(async () => {
1773
- for (const o of l.value) B.deleteEvent(o, 3);
1773
+ for (const o of l.value) W.deleteEvent(o, 3);
1774
1774
  ne(), await Xe();
1775
1775
  }), (o, T) => (V(), P("div", ie({
1776
1776
  class: ["vuecal__cell", z.value],
@@ -1780,12 +1780,12 @@ const lt = (y, t) => {
1780
1780
  o.$slots.cell ? j(o.$slots, "cell", {
1781
1781
  key: 0,
1782
1782
  cell: q.value
1783
- }) : Q("", !0),
1783
+ }) : x("", !0),
1784
1784
  a.value ? (V(!0), P(de, { key: 1 }, we(a.value, (M, w) => (V(), P("div", {
1785
1785
  class: pe(["vuecal__special-hours", M.class]),
1786
1786
  style: $e(M.style),
1787
1787
  innerHTML: M.label || ""
1788
- }, null, 14, ta))), 256)) : Q("", !0),
1788
+ }, null, 14, ta))), 256)) : x("", !0),
1789
1789
  !o.$slots.cell && $(h).schedules ? (V(!0), P(de, { key: 2 }, we($(h).schedules, (M) => (V(), P("div", {
1790
1790
  class: pe(["vuecal__schedule vuecal__schedule--cell", M.class]),
1791
1791
  key: M.id,
@@ -1795,15 +1795,15 @@ const lt = (y, t) => {
1795
1795
  o.$slots["cell-events"] ? j(o.$slots, "cell-events", {
1796
1796
  key: 0,
1797
1797
  cell: q.value
1798
- }) : Q("", !0),
1798
+ }) : x("", !0),
1799
1799
  H.value || o.$slots["cell-date"] ? (V(), P("div", na, [
1800
1800
  j(o.$slots, "cell-date", { cell: q.value }, () => [
1801
1801
  qe(ce(H.value), 1)
1802
1802
  ])
1803
- ])) : Q("", !0),
1803
+ ])) : x("", !0),
1804
1804
  o.$slots["cell-content"] ? (V(), P("div", sa, [
1805
1805
  j(o.$slots, "cell-content", { cell: q.value })
1806
- ])) : Q("", !0),
1806
+ ])) : x("", !0),
1807
1807
  o.$slots["cell-events"] && Y.value.length ? (V(), P("div", la, [
1808
1808
  j(o.$slots, "cell-events", { cell: q.value })
1809
1809
  ])) : Y.value.length || E.value ? (V(), Se(tt, {
@@ -1814,8 +1814,8 @@ const lt = (y, t) => {
1814
1814
  onAfterLeave: m,
1815
1815
  tag: "div"
1816
1816
  }, {
1817
- default: W(() => [
1818
- (V(!0), P(de, null, we(v.value[M.id], (w) => (V(), Se(st, {
1817
+ default: B(() => [
1818
+ (V(!0), P(de, null, we(f.value[M.id], (w) => (V(), Se(st, {
1819
1819
  key: w._.id,
1820
1820
  event: w,
1821
1821
  onEventDeleted: F,
@@ -1826,48 +1826,48 @@ const lt = (y, t) => {
1826
1826
  }, Ce({ _: 2 }, [
1827
1827
  o.$slots["event.all-day"] && t.allDay ? {
1828
1828
  name: "event.all-day",
1829
- fn: W((R) => [
1830
- j(o.$slots, "event.all-day", ie({ ref_for: !0 }, R))
1829
+ fn: B((N) => [
1830
+ j(o.$slots, "event.all-day", ie({ ref_for: !0 }, N))
1831
1831
  ]),
1832
1832
  key: "0"
1833
1833
  } : void 0,
1834
1834
  o.$slots[`event.${$(r).id}`] ? {
1835
1835
  name: `event.${$(r).id}`,
1836
- fn: W((R) => [
1837
- j(o.$slots, `event.${$(r).id}`, ie({ ref_for: !0 }, R))
1836
+ fn: B((N) => [
1837
+ j(o.$slots, `event.${$(r).id}`, ie({ ref_for: !0 }, N))
1838
1838
  ]),
1839
1839
  key: "1"
1840
1840
  } : void 0,
1841
1841
  o.$slots.event ? {
1842
1842
  name: "event",
1843
- fn: W((R) => [
1844
- j(o.$slots, "event", ie({ ref_for: !0 }, R))
1843
+ fn: B((N) => [
1844
+ j(o.$slots, "event", ie({ ref_for: !0 }, N))
1845
1845
  ]),
1846
1846
  key: "2"
1847
1847
  } : void 0
1848
1848
  ]), 1032, ["event", "in-all-day-bar", "cell-start", "cell-end", "style"]))), 128))
1849
1849
  ]),
1850
1850
  _: 2
1851
- }, 1024)) : Q("", !0),
1851
+ }, 1024)) : x("", !0),
1852
1852
  e.value && i.schedule === M.id && !t.allDay ? (V(), P("div", {
1853
1853
  key: 5,
1854
1854
  class: "vuecal__event-placeholder",
1855
1855
  style: $e(I.value.style)
1856
- }, ce(I.value.start) + " - " + ce(I.value.end), 5)) : Q("", !0)
1857
- ], 14, aa))), 128)) : Q("", !0),
1856
+ }, ce(I.value.start) + " - " + ce(I.value.end), 5)) : x("", !0)
1857
+ ], 14, aa))), 128)) : x("", !0),
1858
1858
  !o.$slots.cell && !$(h).schedules ? (V(), P(de, { key: 3 }, [
1859
1859
  o.$slots["cell-events"] ? j(o.$slots, "cell-events", {
1860
1860
  key: 0,
1861
1861
  cell: q.value
1862
- }) : Q("", !0),
1862
+ }) : x("", !0),
1863
1863
  H.value || o.$slots["cell-date"] ? (V(), P("div", ra, [
1864
1864
  j(o.$slots, "cell-date", { cell: q.value }, () => [
1865
1865
  qe(ce(H.value), 1)
1866
1866
  ])
1867
- ])) : Q("", !0),
1867
+ ])) : x("", !0),
1868
1868
  o.$slots["cell-content"] ? (V(), P("div", oa, [
1869
1869
  j(o.$slots, "cell-content", { cell: q.value })
1870
- ])) : Q("", !0),
1870
+ ])) : x("", !0),
1871
1871
  o.$slots["cell-events"] && Y.value.length ? (V(), P("div", ia, [
1872
1872
  j(o.$slots, "cell-events", { cell: q.value })
1873
1873
  ])) : !($(r).isMonth && !$(h).eventsOnMonthView) && !$(r).isYear && !$(r).isYears && (Y.value.length || E.value) ? (V(), Se(tt, {
@@ -1878,7 +1878,7 @@ const lt = (y, t) => {
1878
1878
  onAfterLeave: m,
1879
1879
  tag: "div"
1880
1880
  }, {
1881
- default: W(() => [
1881
+ default: B(() => [
1882
1882
  (V(!0), P(de, null, we(Y.value, (M) => (V(), Se(st, {
1883
1883
  key: M._.id,
1884
1884
  event: M,
@@ -1891,21 +1891,21 @@ const lt = (y, t) => {
1891
1891
  }, Ce({ _: 2 }, [
1892
1892
  o.$slots["event.all-day"] && t.allDay ? {
1893
1893
  name: "event.all-day",
1894
- fn: W((w) => [
1894
+ fn: B((w) => [
1895
1895
  j(o.$slots, "event.all-day", ie({ ref_for: !0 }, w))
1896
1896
  ]),
1897
1897
  key: "0"
1898
1898
  } : void 0,
1899
1899
  o.$slots[`event.${$(r).id}`] ? {
1900
1900
  name: `event.${$(r).id}`,
1901
- fn: W((w) => [
1901
+ fn: B((w) => [
1902
1902
  j(o.$slots, `event.${$(r).id}`, ie({ ref_for: !0 }, w))
1903
1903
  ]),
1904
1904
  key: "1"
1905
1905
  } : void 0,
1906
1906
  o.$slots.event ? {
1907
1907
  name: "event",
1908
- fn: W((w) => [
1908
+ fn: B((w) => [
1909
1909
  j(o.$slots, "event", ie({ ref_for: !0 }, w))
1910
1910
  ]),
1911
1911
  key: "2"
@@ -1913,25 +1913,25 @@ const lt = (y, t) => {
1913
1913
  ]), 1032, ["event", "in-all-day-bar", "cell-start", "cell-end", "class", "style"]))), 128))
1914
1914
  ]),
1915
1915
  _: 3
1916
- })) : Q("", !0),
1916
+ })) : x("", !0),
1917
1917
  e.value ? (V(), P("div", {
1918
1918
  key: 5,
1919
1919
  class: "vuecal__event-placeholder",
1920
1920
  style: $e(I.value.style)
1921
- }, ce(I.value.start) + " - " + ce(I.value.end), 5)) : Q("", !0)
1922
- ], 64)) : Q("", !0),
1921
+ }, ce(I.value.start) + " - " + ce(I.value.end), 5)) : x("", !0)
1922
+ ], 64)) : x("", !0),
1923
1923
  o.$slots["event-count"] ? j(o.$slots, "event-count", {
1924
1924
  key: 4,
1925
1925
  events: _.value
1926
- }) : p.value ? (V(), P("div", ua, ce(_.value.length), 1)) : Q("", !0),
1927
- K.show ? (V(), P("div", {
1926
+ }) : p.value ? (V(), P("div", ua, ce(_.value.length), 1)) : x("", !0),
1927
+ Q.show ? (V(), P("div", {
1928
1928
  key: 6,
1929
1929
  class: "vuecal__now-line",
1930
- style: $e(K.style),
1931
- title: K.currentTime
1930
+ style: $e(Q.style),
1931
+ title: Q.currentTime
1932
1932
  }, [
1933
- he("span", null, ce(K.currentTime), 1)
1934
- ], 12, ca)) : Q("", !0)
1933
+ he("span", null, ce(Q.currentTime), 1)
1934
+ ], 12, ca)) : x("", !0)
1935
1935
  ], 16));
1936
1936
  }
1937
1937
  }, da = {
@@ -1952,7 +1952,7 @@ const lt = (y, t) => {
1952
1952
  }, pa = {
1953
1953
  __name: "headings-bar",
1954
1954
  setup(y) {
1955
- const t = He("vuecal"), d = He("$vuecalEl"), { view: r, config: h, dateUtils: C } = t, B = b(() => h.xs ? "day-xs" : h.sm || r.isDays || r.isMonth ? "day-sm" : "day"), f = b(() => (r.isDay || r.isDays || r.isWeek || r.isMonth) && !(r.isDay && !h.schedules && !h.allDayEvents)), A = b(() => r.cellDates.slice(0, h.horizontal ? r.rows : r.cols).map(({ start: l }) => ({
1955
+ const t = He("vuecal"), d = He("$vuecalEl"), { view: r, config: h, dateUtils: C } = t, W = b(() => h.xs ? "day-xs" : h.sm || r.isDays || r.isMonth ? "day-sm" : "day"), v = b(() => (r.isDay || r.isDays || r.isWeek || r.isMonth) && !(r.isDay && !h.schedules && !h.allDayEvents)), A = b(() => r.cellDates.slice(0, h.horizontal ? r.rows : r.cols).map(({ start: l }) => ({
1956
1956
  id: Ge[l.getDay()],
1957
1957
  date: l,
1958
1958
  dateNumber: l.getDate(),
@@ -2013,20 +2013,20 @@ const lt = (y, t) => {
2013
2013
  };
2014
2014
  return Re(() => {
2015
2015
  L.cleanup();
2016
- }), (l, E) => f.value ? (V(), P("div", da, [
2017
- $(r).isDay ? Q("", !0) : (V(), P("div", va, [
2016
+ }), (l, E) => v.value ? (V(), P("div", da, [
2017
+ $(r).isDay ? x("", !0) : (V(), P("div", va, [
2018
2018
  (V(!0), P(de, null, we(A.value, (F, m) => (V(), P("div", {
2019
2019
  class: pe(["vuecal__weekday", { "vuecal__weekday--today": F.isToday }]),
2020
2020
  key: m,
2021
2021
  onClick: (i) => Z.click(F.date)
2022
2022
  }, [
2023
2023
  j(l.$slots, "weekday-heading", {
2024
- label: F[B.value],
2024
+ label: F[W.value],
2025
2025
  id: F.id,
2026
2026
  date: F.date
2027
2027
  }, () => [
2028
- he("span", ma, ce(F[B.value]), 1),
2029
- $(r).isMonth ? Q("", !0) : (V(), P("strong", ga, ce(F.dateNumber), 1))
2028
+ he("span", ma, ce(F[W.value]), 1),
2029
+ $(r).isMonth ? x("", !0) : (V(), P("strong", ga, ce(F.dateNumber), 1))
2030
2030
  ])
2031
2031
  ], 10, fa))), 128))
2032
2032
  ])),
@@ -2048,7 +2048,7 @@ const lt = (y, t) => {
2048
2048
  }, null, 10, ya))
2049
2049
  ], 64))), 128))
2050
2050
  ], 64))), 128))
2051
- ])) : Q("", !0),
2051
+ ])) : x("", !0),
2052
2052
  $(h).allDayEvents ? (V(), P("div", Da, [
2053
2053
  (V(!0), P(de, null, we(A.value, (F, m) => (V(), Se(kt, {
2054
2054
  class: pe(["vuecal__all-day-cell", { "vuecal__weekday--today": F.isToday }]),
@@ -2060,13 +2060,13 @@ const lt = (y, t) => {
2060
2060
  }, Ce({ _: 2 }, [
2061
2061
  l.$slots["event.all-day"] ? {
2062
2062
  name: "event.all-day",
2063
- fn: W((i) => [
2063
+ fn: B((i) => [
2064
2064
  j(l.$slots, "event.all-day", ie({ ref_for: !0 }, i))
2065
2065
  ]),
2066
2066
  key: "0"
2067
2067
  } : {
2068
2068
  name: "event",
2069
- fn: W((i) => [
2069
+ fn: B((i) => [
2070
2070
  j(l.$slots, "event", ie({ ref_for: !0 }, i))
2071
2071
  ]),
2072
2072
  key: "1"
@@ -2077,8 +2077,8 @@ const lt = (y, t) => {
2077
2077
  onMousedown: E[0] || (E[0] = (...F) => L.handleMouseDown && L.handleMouseDown(...F)),
2078
2078
  onTouchstart: E[1] || (E[1] = (...F) => L.handleTouchStart && L.handleTouchStart(...F))
2079
2079
  }, null, 32)
2080
- ])) : Q("", !0)
2081
- ])) : Q("", !0);
2080
+ ])) : x("", !0)
2081
+ ])) : x("", !0);
2082
2082
  }
2083
2083
  }, wa = { class: "vuecal__time-column" }, _a = {
2084
2084
  key: 0,
@@ -2088,11 +2088,11 @@ const lt = (y, t) => {
2088
2088
  setup(y) {
2089
2089
  const t = He("vuecal"), { config: d, texts: r } = t, h = b(() => {
2090
2090
  const C = [];
2091
- for (let f = d.timeFrom; f < d.timeTo; f += d.timeStep) {
2092
- const A = f + d.timeStep > d.timeTo, Z = ~~(f / 60), L = f % 60, l = r[f < 720 ? "am" : "pm"];
2091
+ for (let v = d.timeFrom; v < d.timeTo; v += d.timeStep) {
2092
+ const A = v + d.timeStep > d.timeTo, Z = ~~(v / 60), L = v % 60, l = r[v < 720 ? "am" : "pm"];
2093
2093
  let E = null;
2094
- A && (E = `calc(var(--vuecal-time-cell-height) * ${(d.timeTo - f) / d.timeStep})`), C.push({
2095
- minutesSum: f,
2094
+ A && (E = `calc(var(--vuecal-time-cell-height) * ${(d.timeTo - v) / d.timeStep})`), C.push({
2095
+ minutesSum: v,
2096
2096
  // The sum of hours + minutes in minutes.
2097
2097
  hours: Z,
2098
2098
  minutes: L,
@@ -2103,26 +2103,26 @@ const lt = (y, t) => {
2103
2103
  }
2104
2104
  return C;
2105
2105
  });
2106
- return (C, B) => (V(), P("div", wa, [
2106
+ return (C, W) => (V(), P("div", wa, [
2107
2107
  $(d).allDayEvents ? (V(), P("div", _a, [
2108
2108
  j(C.$slots, "all-day-label", {}, () => [
2109
2109
  qe(ce($(t).texts.allDay), 1)
2110
2110
  ])
2111
- ])) : Q("", !0),
2112
- (V(!0), P(de, null, we(h.value, (f, A) => (V(), P("div", {
2111
+ ])) : x("", !0),
2112
+ (V(!0), P(de, null, we(h.value, (v, A) => (V(), P("div", {
2113
2113
  class: "vuecal__time-cell",
2114
2114
  key: A,
2115
- style: $e({ height: f.height || null })
2115
+ style: $e({ height: v.height || null })
2116
2116
  }, [
2117
2117
  j(C.$slots, "time-cell", {
2118
2118
  index: A,
2119
- minutes: f.minutes,
2120
- hours: f.hours,
2121
- minutesSum: f.minutesSum,
2122
- format12: f.formatted12,
2123
- format24: f.formatted24
2119
+ minutes: v.minutes,
2120
+ hours: v.hours,
2121
+ minutesSum: v.minutesSum,
2122
+ format12: v.formatted12,
2123
+ format24: v.formatted24
2124
2124
  }, () => [
2125
- he("label", null, ce($(d).twelveHour ? f.formatted12 : f.formatted24), 1)
2125
+ he("label", null, ce($(d).twelveHour ? v.formatted12 : v.formatted24), 1)
2126
2126
  ])
2127
2127
  ], 4))), 128))
2128
2128
  ]));
@@ -2130,7 +2130,7 @@ const lt = (y, t) => {
2130
2130
  }, $a = {
2131
2131
  __name: "body",
2132
2132
  setup(y) {
2133
- const t = He("vuecal"), { view: d, config: r, dateUtils: h, touch: C, eventsManager: B } = t, f = ue(null), A = ue(null), { resizeState: Z } = B, L = b(() => ({
2133
+ const t = He("vuecal"), { view: d, config: r, dateUtils: h, touch: C, eventsManager: W } = t, v = ue(null), A = ue(null), { resizeState: Z } = W, L = b(() => ({
2134
2134
  "--vuecal-grid-columns": d.cols,
2135
2135
  "--vuecal-grid-rows": d.rows,
2136
2136
  "--vuecal-body-max-height": r.time ? `${r.timeCellHeight * (r.timeTo - r.timeFrom) / r.timeStep}px` : null
@@ -2143,8 +2143,8 @@ const lt = (y, t) => {
2143
2143
  }), E = (i) => {
2144
2144
  var z;
2145
2145
  if (d.isMonth || d.isYear || d.isYears) return;
2146
- const S = ((z = i.touches) == null ? void 0 : z[0]) || i, { clientX: n, clientY: I } = S, { top: e } = f.value.getBoundingClientRect();
2147
- A.value = Ke(I - e, f.value), C.isResizingEvent && r.editableEvents.resizeX && (Z.cellEl = m(n, I));
2146
+ const S = ((z = i.touches) == null ? void 0 : z[0]) || i, { clientX: n, clientY: I } = S, { top: e } = v.value.getBoundingClientRect();
2147
+ A.value = Ke(I - e, v.value), C.isResizingEvent && r.editableEvents.resizeX && (Z.cellEl = m(n, I));
2148
2148
  }, F = () => {
2149
2149
  A.value = null;
2150
2150
  }, m = (i, S) => {
@@ -2152,24 +2152,24 @@ const lt = (y, t) => {
2152
2152
  return console.log(n == null ? void 0 : n.closest(".vuecal__cell")), (n == null ? void 0 : n.closest(".vuecal__cell")) || null;
2153
2153
  };
2154
2154
  return Ze(() => {
2155
- f.value.addEventListener("mousemove", E), f.value.addEventListener("touchmove", E), f.value.addEventListener("mouseleave", F), f.value.addEventListener("touchend", F);
2155
+ v.value.addEventListener("mousemove", E), v.value.addEventListener("touchmove", E), v.value.addEventListener("mouseleave", F), v.value.addEventListener("touchend", F);
2156
2156
  }), Re(() => {
2157
- f.value && (f.value.removeEventListener("mousemove", E), f.value.removeEventListener("touchmove", E), f.value.removeEventListener("mouseleave", F), f.value.removeEventListener("touchend", F));
2157
+ v.value && (v.value.removeEventListener("mousemove", E), v.value.removeEventListener("touchmove", E), v.value.removeEventListener("mouseleave", F), v.value.removeEventListener("touchend", F));
2158
2158
  }), (i, S) => (V(), P("div", {
2159
2159
  class: "vuecal__body",
2160
2160
  ref_key: "bodyEl",
2161
- ref: f,
2161
+ ref: v,
2162
2162
  style: $e(L.value)
2163
2163
  }, [
2164
2164
  Oe(Ue, { name: "vuecal-shrink" }, {
2165
- default: W(() => [
2165
+ default: B(() => [
2166
2166
  $(r).timeAtCursor && A.value !== null ? (V(), P("div", {
2167
2167
  key: 0,
2168
2168
  class: "vuecal__time-at-cursor",
2169
2169
  style: $e(l.value.style)
2170
2170
  }, [
2171
2171
  he("label", null, ce(l.value.time), 1)
2172
- ], 4)) : Q("", !0)
2172
+ ], 4)) : x("", !0)
2173
2173
  ]),
2174
2174
  _: 1
2175
2175
  }),
@@ -2181,56 +2181,56 @@ const lt = (y, t) => {
2181
2181
  }, Ce({ _: 2 }, [
2182
2182
  i.$slots.cell ? {
2183
2183
  name: "cell",
2184
- fn: W((e) => [
2184
+ fn: B((e) => [
2185
2185
  j(i.$slots, "cell", ie({ ref_for: !0 }, e))
2186
2186
  ]),
2187
2187
  key: "0"
2188
2188
  } : void 0,
2189
2189
  i.$slots["cell-date"] ? {
2190
2190
  name: "cell-date",
2191
- fn: W((e) => [
2191
+ fn: B((e) => [
2192
2192
  j(i.$slots, "cell-date", ie({ ref_for: !0 }, e))
2193
2193
  ]),
2194
2194
  key: "1"
2195
2195
  } : void 0,
2196
2196
  i.$slots["cell-content"] ? {
2197
2197
  name: "cell-content",
2198
- fn: W((e) => [
2198
+ fn: B((e) => [
2199
2199
  j(i.$slots, "cell-content", ie({ ref_for: !0 }, e))
2200
2200
  ]),
2201
2201
  key: "2"
2202
2202
  } : void 0,
2203
2203
  i.$slots["cell-events"] ? {
2204
2204
  name: "cell-events",
2205
- fn: W((e) => [
2205
+ fn: B((e) => [
2206
2206
  j(i.$slots, "cell-events", ie({ ref_for: !0 }, e))
2207
2207
  ]),
2208
2208
  key: "3"
2209
2209
  } : void 0,
2210
2210
  i.$slots[`event.${$(d).id}`] ? {
2211
2211
  name: `event.${$(d).id}`,
2212
- fn: W((e) => [
2212
+ fn: B((e) => [
2213
2213
  j(i.$slots, `event.${$(d).id}`, ie({ ref_for: !0 }, e))
2214
2214
  ]),
2215
2215
  key: "4"
2216
2216
  } : void 0,
2217
2217
  i.$slots["event.all-day"] ? {
2218
2218
  name: "event.all-day",
2219
- fn: W((e) => [
2219
+ fn: B((e) => [
2220
2220
  j(i.$slots, "event.all-day", ie({ ref_for: !0 }, e))
2221
2221
  ]),
2222
2222
  key: "5"
2223
2223
  } : void 0,
2224
2224
  i.$slots.event ? {
2225
2225
  name: "event",
2226
- fn: W((e) => [
2226
+ fn: B((e) => [
2227
2227
  j(i.$slots, "event", ie({ ref_for: !0 }, e))
2228
2228
  ]),
2229
2229
  key: "6"
2230
2230
  } : void 0,
2231
2231
  i.$slots["event-count"] ? {
2232
2232
  name: "event-count",
2233
- fn: W((e) => [
2233
+ fn: B((e) => [
2234
2234
  j(i.$slots, "event-count", ie({ ref_for: !0 }, e))
2235
2235
  ]),
2236
2236
  key: "7"
@@ -2258,46 +2258,46 @@ const lt = (y, t) => {
2258
2258
  "event-drag-end"
2259
2259
  ],
2260
2260
  setup(y, { expose: t, emit: d }) {
2261
- const r = y, h = d, C = Tt("vuecal-el"), B = Ht({ props: r, emit: h, attrs: Et(), vuecalEl: C, uid: Mt() }), { config: f, view: A, dateUtils: Z, touch: L } = B, l = b(() => f.time && (A.isDay || A.isDays || A.isWeek)), E = b(() => Array(A.rows).fill().map((n, I) => Z.getWeek(Z.addDays(A.firstCellDate, 7 * I)))), F = b(() => {
2261
+ const r = y, h = d, C = Tt("vuecal-el"), W = Ht({ props: r, emit: h, attrs: Et(), vuecalEl: C, uid: Mt() }), { config: v, view: A, dateUtils: Z, touch: L } = W, l = b(() => v.time && (A.isDay || A.isDays || A.isWeek)), E = b(() => Array(A.rows).fill().map((n, I) => Z.getWeek(Z.addDays(A.firstCellDate, 7 * I)))), F = b(() => {
2262
2262
  var n;
2263
2263
  return {
2264
- "vuecal--ready": f.ready,
2265
- [`vuecal--${f.theme}-theme`]: f.theme,
2266
- [`vuecal--${f.size}`]: !0,
2267
- "vuecal--date-picker": f.datePicker,
2268
- "vuecal--dark": f.dark,
2269
- "vuecal--light": !f.dark,
2264
+ "vuecal--ready": v.ready,
2265
+ [`vuecal--${v.theme}-theme`]: v.theme,
2266
+ [`vuecal--${v.size}`]: !0,
2267
+ "vuecal--date-picker": v.datePicker,
2268
+ "vuecal--dark": v.dark,
2269
+ "vuecal--light": !v.dark,
2270
2270
  [`vuecal--${A.id}-view`]: !0,
2271
2271
  "vuecal--view-has-time": l.value,
2272
- "vuecal--timeless": !f.time,
2272
+ "vuecal--timeless": !v.time,
2273
2273
  "vuecal--dragging-cell": L.isDraggingCell,
2274
2274
  "vuecal--dragging-event": L.isDraggingEvent,
2275
2275
  "vuecal--resizing-event": L.isResizingEvent,
2276
- "vuecal--has-schedules": (n = f.schedules) == null ? void 0 : n.length,
2277
- "vuecal--horizontal": f.horizontal
2276
+ "vuecal--has-schedules": (n = v.schedules) == null ? void 0 : n.length,
2277
+ "vuecal--horizontal": v.horizontal
2278
2278
  };
2279
2279
  }), m = b(() => ({
2280
- "--vuecal-time-cell-height": f.timeCellHeight && `${f.timeCellHeight}px`
2280
+ "--vuecal-time-cell-height": v.timeCellHeight && `${v.timeCellHeight}px`
2281
2281
  })), i = b(() => {
2282
2282
  var n, I;
2283
2283
  return {
2284
- "vuecal__scrollable--row": l.value || f.weekNumbers && A.isMonth,
2284
+ "vuecal__scrollable--row": l.value || v.weekNumbers && A.isMonth,
2285
2285
  // Keep the states inside the Vue transition wrapper for smooth CSS transitions.
2286
2286
  [`vuecal__scrollable--${A.id}-view`]: !0,
2287
- "vuecal__scrollable--has-schedules": (n = f.schedules) == null ? void 0 : n.length,
2288
- "vuecal__scrollable--no-schedules": !((I = f.schedules) != null && I.length),
2289
- "vuecal__scrollable--no-all-day-bar": !f.allDayEvents,
2290
- "vuecal__scrollable--has-all-day-bar": f.allDayEvents
2287
+ "vuecal__scrollable--has-schedules": (n = v.schedules) == null ? void 0 : n.length,
2288
+ "vuecal__scrollable--no-schedules": !((I = v.schedules) != null && I.length),
2289
+ "vuecal__scrollable--no-all-day-bar": !v.allDayEvents,
2290
+ "vuecal__scrollable--has-all-day-bar": v.allDayEvents
2291
2291
  };
2292
2292
  }), S = (n) => {
2293
2293
  n.target.closest(".vuecal__cell") && n.preventDefault();
2294
2294
  };
2295
2295
  return Ze(async () => {
2296
- typeof window < "u" && window.hasOwnProperty("ontouchstart") && C.value.addEventListener("contextmenu", S), await Xe(), f.ready = !0, h("ready", { config: f, view: A });
2296
+ typeof window < "u" && window.hasOwnProperty("ontouchstart") && C.value.addEventListener("contextmenu", S), await Xe(), v.ready = !0, h("ready", { config: v, view: A });
2297
2297
  }), Re(() => {
2298
2298
  var n;
2299
2299
  (n = C == null ? void 0 : C.value) == null || n.removeEventListener("contextmenu", S);
2300
- }), at("vuecal", B), at("$vuecalEl", C), t({ view: B.view }), (n, I) => (V(), P("div", {
2300
+ }), at("vuecal", W), at("$vuecalEl", C), t({ view: W.view }), (n, I) => (V(), P("div", {
2301
2301
  class: pe(["vuecal", F.value]),
2302
2302
  ref: "vuecal-el",
2303
2303
  "data-locale": n.locale,
@@ -2305,89 +2305,89 @@ const lt = (y, t) => {
2305
2305
  }, [
2306
2306
  n.$slots.diy ? j(n.$slots, "diy", {
2307
2307
  key: 0,
2308
- vuecal: $(B)
2308
+ vuecal: $(W)
2309
2309
  }) : (V(), P(de, { key: 1 }, [
2310
2310
  Oe(Xt, null, Ce({ _: 2 }, [
2311
2311
  n.$slots.header ? {
2312
2312
  name: "header",
2313
- fn: W((e) => [
2313
+ fn: B((e) => [
2314
2314
  j(n.$slots, "header", se(re(e)))
2315
2315
  ]),
2316
2316
  key: "0"
2317
2317
  } : void 0,
2318
2318
  !n.$slots.header && n.$slots["previous-button"] ? {
2319
2319
  name: "previous-button",
2320
- fn: W((e) => [
2320
+ fn: B((e) => [
2321
2321
  j(n.$slots, "previous-button", se(re(e)))
2322
2322
  ]),
2323
2323
  key: "1"
2324
2324
  } : void 0,
2325
2325
  !n.$slots.header && n.$slots["next-button"] ? {
2326
2326
  name: "next-button",
2327
- fn: W((e) => [
2327
+ fn: B((e) => [
2328
2328
  j(n.$slots, "next-button", se(re(e)))
2329
2329
  ]),
2330
2330
  key: "2"
2331
2331
  } : void 0,
2332
2332
  !n.$slots.header && n.$slots["today-button"] ? {
2333
2333
  name: "today-button",
2334
- fn: W((e) => [
2334
+ fn: B((e) => [
2335
2335
  j(n.$slots, "today-button", se(re(e)))
2336
2336
  ]),
2337
2337
  key: "3"
2338
2338
  } : void 0,
2339
2339
  !n.$slots.header && n.$slots.title ? {
2340
2340
  name: "title",
2341
- fn: W((e) => [
2341
+ fn: B((e) => [
2342
2342
  j(n.$slots, "title", se(re(e)))
2343
2343
  ]),
2344
2344
  key: "4"
2345
2345
  } : void 0,
2346
2346
  !n.$slots.header && n.$slots["title.day"] ? {
2347
2347
  name: "title.day",
2348
- fn: W((e) => [
2348
+ fn: B((e) => [
2349
2349
  j(n.$slots, "title.day", se(re(e)))
2350
2350
  ]),
2351
2351
  key: "5"
2352
2352
  } : void 0,
2353
2353
  !n.$slots.header && n.$slots["title.days"] ? {
2354
2354
  name: "title.days",
2355
- fn: W((e) => [
2355
+ fn: B((e) => [
2356
2356
  j(n.$slots, "title.days", se(re(e)))
2357
2357
  ]),
2358
2358
  key: "6"
2359
2359
  } : void 0,
2360
2360
  !n.$slots.header && n.$slots["title.week"] ? {
2361
2361
  name: "title.week",
2362
- fn: W((e) => [
2362
+ fn: B((e) => [
2363
2363
  j(n.$slots, "title.week", se(re(e)))
2364
2364
  ]),
2365
2365
  key: "7"
2366
2366
  } : void 0,
2367
2367
  !n.$slots.header && n.$slots["title.month"] ? {
2368
2368
  name: "title.month",
2369
- fn: W((e) => [
2369
+ fn: B((e) => [
2370
2370
  j(n.$slots, "title.month", se(re(e)))
2371
2371
  ]),
2372
2372
  key: "8"
2373
2373
  } : void 0,
2374
2374
  !n.$slots.header && n.$slots["title.year"] ? {
2375
2375
  name: "title.year",
2376
- fn: W((e) => [
2376
+ fn: B((e) => [
2377
2377
  j(n.$slots, "title.year", se(re(e)))
2378
2378
  ]),
2379
2379
  key: "9"
2380
2380
  } : void 0,
2381
2381
  !n.$slots.header && n.$slots["title.years"] ? {
2382
2382
  name: "title.years",
2383
- fn: W((e) => [
2383
+ fn: B((e) => [
2384
2384
  j(n.$slots, "title.years", se(re(e)))
2385
2385
  ]),
2386
2386
  key: "10"
2387
2387
  } : void 0,
2388
2388
  !n.$slots.header && n.$slots["schedule-heading"] ? {
2389
2389
  name: "schedule-heading",
2390
- fn: W((e) => [
2390
+ fn: B((e) => [
2391
2391
  j(n.$slots, "schedule-heading", se(re(e)))
2392
2392
  ]),
2393
2393
  key: "11"
@@ -2397,7 +2397,7 @@ const lt = (y, t) => {
2397
2397
  Oe(Ue, {
2398
2398
  name: `vuecal-slide-fade--${$(A).transitionDirection}`
2399
2399
  }, {
2400
- default: W(() => [
2400
+ default: B(() => [
2401
2401
  (V(), P("div", {
2402
2402
  class: pe(["vuecal__scrollable", i.value]),
2403
2403
  key: $(A).id + $(A).start.getTime()
@@ -2405,45 +2405,45 @@ const lt = (y, t) => {
2405
2405
  l.value ? (V(), Se(ka, { key: 0 }, Ce({ _: 2 }, [
2406
2406
  n.$slots["time-cell"] ? {
2407
2407
  name: "time-cell",
2408
- fn: W((e) => [
2408
+ fn: B((e) => [
2409
2409
  j(n.$slots, "time-cell", se(re(e)))
2410
2410
  ]),
2411
2411
  key: "0"
2412
2412
  } : void 0
2413
- ]), 1024)) : Q("", !0),
2414
- $(f).weekNumbers && $(A).isMonth ? (V(), P("div", Ma, [
2413
+ ]), 1024)) : x("", !0),
2414
+ $(v).weekNumbers && $(A).isMonth ? (V(), P("div", Ma, [
2415
2415
  (V(!0), P(de, null, we(E.value, (e) => (V(), P("div", Ea, [
2416
2416
  j(n.$slots, "week-number", {}, () => [
2417
2417
  he("small", null, ce(e), 1)
2418
2418
  ])
2419
2419
  ]))), 256))
2420
- ])) : Q("", !0),
2420
+ ])) : x("", !0),
2421
2421
  he("div", Ya, [
2422
2422
  Oe(pa, null, Ce({ _: 2 }, [
2423
2423
  n.$slots["weekday-heading"] ? {
2424
2424
  name: "weekday-heading",
2425
- fn: W((e) => [
2425
+ fn: B((e) => [
2426
2426
  j(n.$slots, "weekday-heading", se(re(e)))
2427
2427
  ]),
2428
2428
  key: "0"
2429
2429
  } : void 0,
2430
2430
  n.$slots["schedule-heading"] ? {
2431
2431
  name: "schedule-heading",
2432
- fn: W((e) => [
2432
+ fn: B((e) => [
2433
2433
  j(n.$slots, "schedule-heading", se(re(e)))
2434
2434
  ]),
2435
2435
  key: "1"
2436
2436
  } : void 0,
2437
2437
  n.$slots["event.all-day"] ? {
2438
2438
  name: "event.all-day",
2439
- fn: W((e) => [
2439
+ fn: B((e) => [
2440
2440
  j(n.$slots, "event.all-day", se(re(e)))
2441
2441
  ]),
2442
2442
  key: "2"
2443
2443
  } : void 0,
2444
2444
  n.$slots.event ? {
2445
2445
  name: "event",
2446
- fn: W((e) => [
2446
+ fn: B((e) => [
2447
2447
  j(n.$slots, "event", se(re(e)))
2448
2448
  ]),
2449
2449
  key: "3"
@@ -2452,56 +2452,56 @@ const lt = (y, t) => {
2452
2452
  Oe($a, null, Ce({ _: 2 }, [
2453
2453
  n.$slots.cell ? {
2454
2454
  name: "cell",
2455
- fn: W((e) => [
2455
+ fn: B((e) => [
2456
2456
  j(n.$slots, "cell", se(re(e)))
2457
2457
  ]),
2458
2458
  key: "0"
2459
2459
  } : void 0,
2460
2460
  !n.$slots.cell && n.$slots["cell-date"] ? {
2461
2461
  name: "cell-date",
2462
- fn: W((e) => [
2462
+ fn: B((e) => [
2463
2463
  j(n.$slots, "cell-date", se(re(e)))
2464
2464
  ]),
2465
2465
  key: "1"
2466
2466
  } : void 0,
2467
2467
  !n.$slots.cell && n.$slots["cell-content"] ? {
2468
2468
  name: "cell-content",
2469
- fn: W((e) => [
2469
+ fn: B((e) => [
2470
2470
  j(n.$slots, "cell-content", se(re(e)))
2471
2471
  ]),
2472
2472
  key: "2"
2473
2473
  } : void 0,
2474
2474
  !n.$slots.cell && n.$slots["cell-events"] ? {
2475
2475
  name: "cell-events",
2476
- fn: W((e) => [
2476
+ fn: B((e) => [
2477
2477
  j(n.$slots, "cell-events", se(re(e)))
2478
2478
  ]),
2479
2479
  key: "3"
2480
2480
  } : void 0,
2481
2481
  !n.$slots.cell && !n.$slots["cell-events"] && n.$slots["event.all-day"] ? {
2482
2482
  name: "event.all-day",
2483
- fn: W((e) => [
2483
+ fn: B((e) => [
2484
2484
  j(n.$slots, "event.all-day", se(re(e)))
2485
2485
  ]),
2486
2486
  key: "4"
2487
2487
  } : void 0,
2488
2488
  !n.$slots.cell && !n.$slots["cell-events"] && n.$slots[`event.${$(A).id}`] ? {
2489
2489
  name: `event.${$(A).id}`,
2490
- fn: W((e) => [
2490
+ fn: B((e) => [
2491
2491
  j(n.$slots, `event.${$(A).id}`, se(re(e)))
2492
2492
  ]),
2493
2493
  key: "5"
2494
2494
  } : void 0,
2495
2495
  !n.$slots.cell && !n.$slots["cell-events"] && n.$slots.event ? {
2496
2496
  name: "event",
2497
- fn: W((e) => [
2497
+ fn: B((e) => [
2498
2498
  j(n.$slots, "event", se(re(e)))
2499
2499
  ]),
2500
2500
  key: "6"
2501
2501
  } : void 0,
2502
2502
  !n.$slots.cell && n.$slots["event-count"] ? {
2503
2503
  name: "event-count",
2504
- fn: W((e) => [
2504
+ fn: B((e) => [
2505
2505
  j(n.$slots, "event-count", se(re(e)))
2506
2506
  ]),
2507
2507
  key: "7"
@@ -2529,8 +2529,8 @@ const lt = (y, t) => {
2529
2529
  addMinutes: Fa,
2530
2530
  subtractMinutes: Ra,
2531
2531
  getWeek: Na,
2532
- isToday: Wa,
2533
- isSameDate: Ba,
2532
+ isToday: Ba,
2533
+ isSameDate: Wa,
2534
2534
  isInRange: Xa,
2535
2535
  isLeapYear: Ia,
2536
2536
  getPreviousFirstDayOfWeek: qa,
@@ -2563,8 +2563,8 @@ export {
2563
2563
  Na as getWeek,
2564
2564
  Xa as isInRange,
2565
2565
  Ia as isLeapYear,
2566
- Ba as isSameDate,
2567
- Wa as isToday,
2566
+ Wa as isSameDate,
2567
+ Ba as isToday,
2568
2568
  Ka as isValidDate,
2569
2569
  Oa as removeDatePrototypes,
2570
2570
  Ga as stringToDate,