vue-cal 5.0.1-rc.12 → 5.0.1-rc.13

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 (91) hide show
  1. package/README.md +1 -0
  2. package/dist/i18n/ar.js +42 -0
  3. package/dist/i18n/bg.js +38 -0
  4. package/dist/i18n/bn.js +38 -0
  5. package/dist/i18n/bs.js +38 -0
  6. package/dist/i18n/ca.js +40 -0
  7. package/dist/i18n/cs.js +38 -0
  8. package/dist/i18n/da.js +38 -0
  9. package/dist/i18n/de.js +38 -0
  10. package/dist/i18n/el.js +44 -0
  11. package/dist/i18n/en-gb.js +38 -0
  12. package/dist/i18n/es.js +38 -0
  13. package/dist/i18n/et.js +38 -0
  14. package/dist/i18n/fa.js +42 -0
  15. package/dist/i18n/fi.js +38 -0
  16. package/dist/i18n/fr.js +38 -0
  17. package/dist/i18n/he.js +42 -0
  18. package/dist/i18n/hr.js +38 -0
  19. package/dist/i18n/hu.js +38 -0
  20. package/dist/i18n/id.js +38 -0
  21. package/dist/i18n/is.js +38 -0
  22. package/dist/i18n/it.js +38 -0
  23. package/dist/i18n/ja.js +40 -0
  24. package/dist/i18n/ka.js +38 -0
  25. package/dist/i18n/ko.js +40 -0
  26. package/dist/i18n/lt.js +38 -0
  27. package/dist/i18n/mn.js +38 -0
  28. package/dist/i18n/nl.js +38 -0
  29. package/dist/i18n/no.js +38 -0
  30. package/dist/i18n/pl.js +38 -0
  31. package/dist/i18n/pt-br.js +38 -0
  32. package/dist/i18n/pt-pt.js +38 -0
  33. package/dist/i18n/ro.js +38 -0
  34. package/dist/i18n/ru.js +40 -0
  35. package/dist/i18n/sk.js +38 -0
  36. package/dist/i18n/sl.js +38 -0
  37. package/dist/i18n/sq.js +40 -0
  38. package/dist/i18n/sr.js +38 -0
  39. package/dist/i18n/sv.js +38 -0
  40. package/dist/i18n/tr.js +38 -0
  41. package/dist/i18n/uk.js +40 -0
  42. package/dist/i18n/vi.js +40 -0
  43. package/dist/i18n/zh-cn.js +40 -0
  44. package/dist/i18n/zh-hk.js +40 -0
  45. package/dist/vue-cal.es.js +822 -792
  46. package/dist/vue-cal.umd.js +3 -3
  47. package/package.json +10 -11
  48. package/dist/i18n/ar.json +0 -18
  49. package/dist/i18n/bg.json +0 -16
  50. package/dist/i18n/bn.json +0 -16
  51. package/dist/i18n/bs.json +0 -16
  52. package/dist/i18n/ca.json +0 -17
  53. package/dist/i18n/cs.json +0 -16
  54. package/dist/i18n/da.json +0 -16
  55. package/dist/i18n/de.json +0 -16
  56. package/dist/i18n/el.json +0 -19
  57. package/dist/i18n/en-gb.json +0 -16
  58. package/dist/i18n/en-us.json +0 -16
  59. package/dist/i18n/es.json +0 -16
  60. package/dist/i18n/et.json +0 -16
  61. package/dist/i18n/fa.json +0 -18
  62. package/dist/i18n/fi.json +0 -16
  63. package/dist/i18n/fr.json +0 -16
  64. package/dist/i18n/he.json +0 -18
  65. package/dist/i18n/hr.json +0 -16
  66. package/dist/i18n/hu.json +0 -16
  67. package/dist/i18n/id.json +0 -16
  68. package/dist/i18n/is.json +0 -16
  69. package/dist/i18n/it.json +0 -16
  70. package/dist/i18n/ja.json +0 -17
  71. package/dist/i18n/ka.json +0 -16
  72. package/dist/i18n/ko.json +0 -17
  73. package/dist/i18n/lt.json +0 -16
  74. package/dist/i18n/mn.json +0 -16
  75. package/dist/i18n/nl.json +0 -16
  76. package/dist/i18n/no.json +0 -16
  77. package/dist/i18n/pl.json +0 -16
  78. package/dist/i18n/pt-br.json +0 -16
  79. package/dist/i18n/pt-pt.json +0 -16
  80. package/dist/i18n/ro.json +0 -16
  81. package/dist/i18n/ru.json +0 -17
  82. package/dist/i18n/sk.json +0 -16
  83. package/dist/i18n/sl.json +0 -16
  84. package/dist/i18n/sq.json +0 -17
  85. package/dist/i18n/sr.json +0 -16
  86. package/dist/i18n/sv.json +0 -16
  87. package/dist/i18n/tr.json +0 -16
  88. package/dist/i18n/uk.json +0 -17
  89. package/dist/i18n/vi.json +0 -17
  90. package/dist/i18n/zh-cn.json +0 -17
  91. package/dist/i18n/zh-hk.json +0 -17
@@ -1,11 +1,10 @@
1
- import { computed as T, reactive as $e, watch as me, toRefs as rt, ref as ie, onBeforeUnmount as Xe, inject as Ne, createElementBlock as j, openBlock as E, renderSlot as F, createCommentVNode as Z, unref as O, Fragment as te, renderList as we, normalizeClass as _e, createElementVNode as ge, createVNode as Oe, Transition as Ge, withCtx as J, createBlock as Se, resolveDynamicComponent as Ke, mergeProps as De, toHandlers as Ie, normalizeProps as ne, guardReactiveProps as se, toDisplayString as le, onMounted as Ze, withModifiers as Qe, nextTick as Ue, normalizeStyle as Te, createTextVNode as xe, TransitionGroup as et, createSlots as je, useTemplateRef as ot, useId as it, useAttrs as ut, provide as ct } from "vue";
2
- import nt from "./i18n/en-us.json";
1
+ import { computed as T, reactive as Te, watch as he, toRefs as pt, ref as ie, onBeforeUnmount as Re, inject as Le, createElementBlock as j, openBlock as E, renderSlot as L, createCommentVNode as q, unref as O, Fragment as te, renderList as pe, normalizeClass as we, createElementVNode as fe, createVNode as Ve, Transition as Xe, withCtx as Z, createBlock as Ee, resolveDynamicComponent as Ke, mergeProps as ye, toHandlers as Be, normalizeProps as se, guardReactiveProps as le, toDisplayString as re, onMounted as Je, withModifiers as Qe, nextTick as Ge, normalizeStyle as be, createTextVNode as xe, TransitionGroup as et, createSlots as Oe, useTemplateRef as wt, useId as _t, useAttrs as kt, provide as bt } from "vue";
3
2
  /**
4
3
  * vue-cal v5.0.1-rc.12
5
4
  * (c) 2024-2025 Antoni Andre <antoniandre.web@gmail.com>
6
5
  * @license MIT
7
6
  */
8
- const fe = {
7
+ const me = {
9
8
  texts: {
10
9
  weekDays: Array(7).fill(""),
11
10
  weekDaysShort: [],
@@ -34,14 +33,14 @@ const fe = {
34
33
  years: { cols: 5, rows: 5 }
35
34
  // Arbitrary range of quarters of century (25y).
36
35
  }
37
- }, dt = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"], Re = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"], vt = Re.reduce((D, n, r) => (D[n] = r || 7, D), {}), mt = (D, n, r) => {
36
+ }, Tt = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"], Ie = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"], Mt = Ie.reduce((D, n, r) => (D[n] = r || 7, D), {}), $t = (D, n, r) => {
38
37
  const { dateUtils: h } = D, p = !1, b = T(() => {
39
38
  if (W.value[n.view]) return n.view;
40
39
  const s = n.datePicker ? "month" : "week", l = n.view || s;
41
40
  return W.value[l] ? l : (console.warn(
42
41
  `Vue Cal: the provided or default view \`${l}\` is either invalid or not in the list of available views. The first available view will be chosen: \`${Object.keys(W.value)[0]}\`.`
43
42
  ), Object.keys(W.value)[0]);
44
- }), L = T(() => n.sm && !n.xs), v = T(() => n.xs || n.datePicker), C = T(() => n.clickToNavigate || n.datePicker && n.clickToNavigate !== !1), i = T(() => {
43
+ }), H = T(() => n.sm && !n.xs), v = T(() => n.xs || n.datePicker), C = T(() => n.clickToNavigate || n.datePicker && n.clickToNavigate !== !1), i = T(() => {
45
44
  const s = {
46
45
  cell: {},
47
46
  // All possible event listeners to attach to cells.
@@ -49,27 +48,29 @@ const fe = {
49
48
  // All possible event listeners to attach to calendar events.
50
49
  }, l = (_) => _.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
51
50
  for (const [_, t] of Object.entries(r)) {
52
- const [V, H, U] = _.match(/^on(Cell|Event)(.+)$/) || [];
53
- V && (s[H.toLowerCase()][l(U).replace(/^-+|-+$/g, "")] = t);
51
+ const [V, F, J] = _.match(/^on(Cell|Event)(.+)$/) || [];
52
+ V && (s[F.toLowerCase()][l(J).replace(/^-+|-+$/g, "")] = t);
54
53
  }
55
54
  return s;
56
- }), m = T(() => {
55
+ }), f = T(() => {
57
56
  var l;
58
57
  const s = {};
59
- return n.hideWeekends && (s[6] = !0) && (s[7] = !0), (l = n.hideWeekdays) != null && l.length && n.hideWeekdays.forEach((_) => s[vt[_]] = !0), s;
60
- }), $ = T(() => n.hideWeekends || m.value[6] && m.value[7]), W = T(() => {
58
+ if (n.hideWeekends && (s[6] = s[7] = !0), (l = n.hideWeekdays) != null && l.length)
59
+ for (const _ of n.hideWeekdays) weekDays[Mt[_]] = !0;
60
+ return s;
61
+ }), Y = T(() => f.value[6] && f.value[7]), W = T(() => {
61
62
  const s = n.datePicker;
62
63
  let l = 0, _ = {};
63
64
  const t = n.views;
64
65
  return s && !t ? {
65
- month: { ...fe.availableViews.month },
66
- year: { ...fe.availableViews.year },
67
- years: { ...fe.availableViews.years }
68
- } : (t ? (Array.isArray(t) ? _ = t.reduce((V, H) => (typeof H == "string" && fe.availableViews[H] ? V[H] = fe.availableViews[H] : l++, V), {}) : typeof t == "object" && (_ = Object.entries(t).reduce((V, [H, U]) => {
69
- const { cols: K, rows: ue } = fe.availableViews[H];
70
- return V[H] = { cols: U.cols || K, rows: U.rows || ue }, V;
71
- }, {})), l && console.warn("Vue Cal: the provided `views` prop contains invalid views that will be ignored."), Object.keys(_).length || (console.warn("Vue Cal: No valid view in the provided `views` prop. Falling back to default views."), _ = { ...fe.availableViews })) : _ = { ...fe.availableViews }, _);
72
- }), G = T(() => n.datePicker ? "month" : W.value.week ? "week" : Object.keys(W.value)[0]), o = T(() => {
66
+ month: { ...me.availableViews.month },
67
+ year: { ...me.availableViews.year },
68
+ years: { ...me.availableViews.years }
69
+ } : (t ? (Array.isArray(t) ? _ = t.reduce((V, F) => (typeof F == "string" && me.availableViews[F] ? V[F] = me.availableViews[F] : l++, V), {}) : typeof t == "object" && (_ = Object.entries(t).reduce((V, [F, J]) => {
70
+ const { cols: K, rows: ue } = me.availableViews[F];
71
+ return V[F] = { cols: J.cols || K, rows: J.rows || ue }, V;
72
+ }, {})), l && console.warn("Vue Cal: the provided `views` prop contains invalid views that will be ignored."), Object.keys(_).length || (console.warn("Vue Cal: No valid view in the provided `views` prop. Falling back to default views."), _ = { ...me.availableViews })) : _ = { ...me.availableViews }, _);
73
+ }), U = T(() => n.datePicker ? "month" : W.value.week ? "week" : Object.keys(W.value)[0]), o = T(() => {
73
74
  if (typeof n.selectedDate == "string") return h.stringToDate(n.selectedDate);
74
75
  if (n.selectedDate instanceof Date) return n.selectedDate;
75
76
  n.selectedDate ? console.warn("Vue Cal: The provided selected date is invalid:", n.selectedDate) : console.log("Vue Cal: Info - The provided selected date is undefined.");
@@ -89,7 +90,7 @@ const fe = {
89
90
  }), d = T(() => {
90
91
  let s = null;
91
92
  return n.maxDate && typeof n.maxDate == "string" ? s = h.stringToDate(n.maxDate) : n.maxDate && n.maxDate instanceof Date && (s = n.maxDate), (s == null ? void 0 : s.getTime()) || null;
92
- }), f = T(() => {
93
+ }), g = T(() => {
93
94
  var _;
94
95
  const { view: s } = D;
95
96
  return n.schedules.length && (s.isDay || s.isDays || s.isWeek) && ((_ = n.schedules) == null ? void 0 : _.map((t, V) => ({ ...t, id: t.id ?? V + 1 }))) || void 0;
@@ -103,7 +104,7 @@ const fe = {
103
104
  return n.editableEvents === !0 ? s : n.editableEvents === !1 ? Object.keys(s).map((l) => s[l] = !1) : { ...s, ...n.editableEvents };
104
105
  }), P = async (s) => {
105
106
  var _;
106
- let l = /* @__PURE__ */ Object.assign({ "../i18n/ar.json": () => import("./i18n/ar.json").then((t) => t.default), "../i18n/bg.json": () => import("./i18n/bg.json").then((t) => t.default), "../i18n/bn.json": () => import("./i18n/bn.json").then((t) => t.default), "../i18n/bs.json": () => import("./i18n/bs.json").then((t) => t.default), "../i18n/ca.json": () => import("./i18n/ca.json").then((t) => t.default), "../i18n/cs.json": () => import("./i18n/cs.json").then((t) => t.default), "../i18n/da.json": () => import("./i18n/da.json").then((t) => t.default), "../i18n/de.json": () => import("./i18n/de.json").then((t) => t.default), "../i18n/el.json": () => import("./i18n/el.json").then((t) => t.default), "../i18n/en-gb.json": () => import("./i18n/en-gb.json").then((t) => t.default), "../i18n/en-us.json": () => import("./i18n/en-us.json").then((t) => t.default), "../i18n/es.json": () => import("./i18n/es.json").then((t) => t.default), "../i18n/et.json": () => import("./i18n/et.json").then((t) => t.default), "../i18n/fa.json": () => import("./i18n/fa.json").then((t) => t.default), "../i18n/fi.json": () => import("./i18n/fi.json").then((t) => t.default), "../i18n/fr.json": () => import("./i18n/fr.json").then((t) => t.default), "../i18n/he.json": () => import("./i18n/he.json").then((t) => t.default), "../i18n/hr.json": () => import("./i18n/hr.json").then((t) => t.default), "../i18n/hu.json": () => import("./i18n/hu.json").then((t) => t.default), "../i18n/id.json": () => import("./i18n/id.json").then((t) => t.default), "../i18n/is.json": () => import("./i18n/is.json").then((t) => t.default), "../i18n/it.json": () => import("./i18n/it.json").then((t) => t.default), "../i18n/ja.json": () => import("./i18n/ja.json").then((t) => t.default), "../i18n/ka.json": () => import("./i18n/ka.json").then((t) => t.default), "../i18n/ko.json": () => import("./i18n/ko.json").then((t) => t.default), "../i18n/lt.json": () => import("./i18n/lt.json").then((t) => t.default), "../i18n/mn.json": () => import("./i18n/mn.json").then((t) => t.default), "../i18n/nl.json": () => import("./i18n/nl.json").then((t) => t.default), "../i18n/no.json": () => import("./i18n/no.json").then((t) => t.default), "../i18n/pl.json": () => import("./i18n/pl.json").then((t) => t.default), "../i18n/pt-br.json": () => import("./i18n/pt-br.json").then((t) => t.default), "../i18n/pt-pt.json": () => import("./i18n/pt-pt.json").then((t) => t.default), "../i18n/ro.json": () => import("./i18n/ro.json").then((t) => t.default), "../i18n/ru.json": () => import("./i18n/ru.json").then((t) => t.default), "../i18n/sk.json": () => import("./i18n/sk.json").then((t) => t.default), "../i18n/sl.json": () => import("./i18n/sl.json").then((t) => t.default), "../i18n/sq.json": () => import("./i18n/sq.json").then((t) => t.default), "../i18n/sr.json": () => import("./i18n/sr.json").then((t) => t.default), "../i18n/sv.json": () => import("./i18n/sv.json").then((t) => t.default), "../i18n/tr.json": () => import("./i18n/tr.json").then((t) => t.default), "../i18n/uk.json": () => import("./i18n/uk.json").then((t) => t.default), "../i18n/vi.json": () => import("./i18n/vi.json").then((t) => t.default), "../i18n/zh-cn.json": () => import("./i18n/zh-cn.json").then((t) => t.default), "../i18n/zh-hk.json": () => import("./i18n/zh-hk.json").then((t) => t.default) });
107
+ let l = /* @__PURE__ */ Object.assign({ "../i18n/ar.json": () => import("./i18n/ar.js").then((t) => t.default), "../i18n/bg.json": () => import("./i18n/bg.js").then((t) => t.default), "../i18n/bn.json": () => import("./i18n/bn.js").then((t) => t.default), "../i18n/bs.json": () => import("./i18n/bs.js").then((t) => t.default), "../i18n/ca.json": () => import("./i18n/ca.js").then((t) => t.default), "../i18n/cs.json": () => import("./i18n/cs.js").then((t) => t.default), "../i18n/da.json": () => import("./i18n/da.js").then((t) => t.default), "../i18n/de.json": () => import("./i18n/de.js").then((t) => t.default), "../i18n/el.json": () => import("./i18n/el.js").then((t) => t.default), "../i18n/en-gb.json": () => import("./i18n/en-gb.js").then((t) => t.default), "../i18n/en-us.json": () => Promise.resolve().then(() => Ct).then((t) => t.default), "../i18n/es.json": () => import("./i18n/es.js").then((t) => t.default), "../i18n/et.json": () => import("./i18n/et.js").then((t) => t.default), "../i18n/fa.json": () => import("./i18n/fa.js").then((t) => t.default), "../i18n/fi.json": () => import("./i18n/fi.js").then((t) => t.default), "../i18n/fr.json": () => import("./i18n/fr.js").then((t) => t.default), "../i18n/he.json": () => import("./i18n/he.js").then((t) => t.default), "../i18n/hr.json": () => import("./i18n/hr.js").then((t) => t.default), "../i18n/hu.json": () => import("./i18n/hu.js").then((t) => t.default), "../i18n/id.json": () => import("./i18n/id.js").then((t) => t.default), "../i18n/is.json": () => import("./i18n/is.js").then((t) => t.default), "../i18n/it.json": () => import("./i18n/it.js").then((t) => t.default), "../i18n/ja.json": () => import("./i18n/ja.js").then((t) => t.default), "../i18n/ka.json": () => import("./i18n/ka.js").then((t) => t.default), "../i18n/ko.json": () => import("./i18n/ko.js").then((t) => t.default), "../i18n/lt.json": () => import("./i18n/lt.js").then((t) => t.default), "../i18n/mn.json": () => import("./i18n/mn.js").then((t) => t.default), "../i18n/nl.json": () => import("./i18n/nl.js").then((t) => t.default), "../i18n/no.json": () => import("./i18n/no.js").then((t) => t.default), "../i18n/pl.json": () => import("./i18n/pl.js").then((t) => t.default), "../i18n/pt-br.json": () => import("./i18n/pt-br.js").then((t) => t.default), "../i18n/pt-pt.json": () => import("./i18n/pt-pt.js").then((t) => t.default), "../i18n/ro.json": () => import("./i18n/ro.js").then((t) => t.default), "../i18n/ru.json": () => import("./i18n/ru.js").then((t) => t.default), "../i18n/sk.json": () => import("./i18n/sk.js").then((t) => t.default), "../i18n/sl.json": () => import("./i18n/sl.js").then((t) => t.default), "../i18n/sq.json": () => import("./i18n/sq.js").then((t) => t.default), "../i18n/sr.json": () => import("./i18n/sr.js").then((t) => t.default), "../i18n/sv.json": () => import("./i18n/sv.js").then((t) => t.default), "../i18n/tr.json": () => import("./i18n/tr.js").then((t) => t.default), "../i18n/uk.json": () => import("./i18n/uk.js").then((t) => t.default), "../i18n/vi.json": () => import("./i18n/vi.js").then((t) => t.default), "../i18n/zh-cn.json": () => import("./i18n/zh-cn.js").then((t) => t.default), "../i18n/zh-hk.json": () => import("./i18n/zh-hk.js").then((t) => t.default) });
107
108
  {
108
109
  if (!l[`../i18n/${s}.json`]) {
109
110
  console.warn(`Vue Cal: the locale \`${s}\` does not exist. Falling back to \`en-us\`.`), s = "en-us";
@@ -111,153 +112,153 @@ const fe = {
111
112
  }
112
113
  l = await ((_ = l[`../i18n/${s}.json`]) == null ? void 0 : _.call(l));
113
114
  }
114
- D.texts = Object.assign(D.texts, Object.assign({ ...fe.texts }, l)), h.updateTexts(D.texts);
115
- }, B = $e(n.events || []);
116
- return me(() => n.events, (s) => B.splice(0, B.length, ...s)), me(() => n.locale, (s) => P(s || "en-us")), (n.locale || !D.texts.today) && P(n.locale || "en-us"), {
117
- ...rt(n),
118
- events: B,
115
+ D.texts = Object.assign(D.texts, Object.assign({ ...me.texts }, l)), h.updateTexts(D.texts);
116
+ }, A = Te(n.events || []);
117
+ return he(() => n.events, (s) => A.splice(0, A.length, ...s)), he(() => n.locale, (s) => P(s || "en-us")), (n.locale || !D.texts.today) && P(n.locale || "en-us"), {
118
+ ...pt(n),
119
+ events: A,
119
120
  // All the events listeners for cells and events that the end user may have attached to vue-cal.
120
121
  eventListeners: i,
121
- defaultView: G,
122
+ defaultView: U,
122
123
  availableViews: W,
123
124
  disableDays: u,
124
125
  ready: p,
125
- sm: L,
126
+ sm: H,
126
127
  xs: v,
127
128
  clickToNavigate: C,
128
- hideWeekdays: m,
129
- hideWeekends: $,
129
+ hideWeekdays: f,
130
+ hideWeekends: Y,
130
131
  minTimestamp: e,
131
132
  maxTimestamp: d,
132
- schedules: f,
133
+ schedules: g,
133
134
  selectedDate: o,
134
135
  editableEvents: M,
135
136
  view: b,
136
137
  // Getters.
137
138
  get hasHiddenDays() {
138
- return Object.keys(m.value).length;
139
+ return Object.keys(f.value).length;
139
140
  },
140
141
  get size() {
141
- return v.value ? "xs" : L.value ? "sm" : "lg";
142
+ return v.value ? "xs" : H.value ? "sm" : "lg";
142
143
  },
143
144
  loadTexts: P
144
145
  };
145
- }, Ve = (D, n) => {
146
+ }, Ce = (D, n) => {
146
147
  const r = n.timeTo - n.timeFrom;
147
148
  return (D - n.timeFrom) * 100 / r;
148
- }, Pe = (D, n) => {
149
+ }, je = (D, n) => {
149
150
  const r = n.timeTo - n.timeFrom;
150
151
  return ~~(D * r / 100 + n.timeFrom);
151
- }, Je = (D, n) => {
152
+ }, qe = (D, n) => {
152
153
  const r = n.clientHeight;
153
154
  return D * 100 / r;
154
- }, Ae = $e({ id: null, date: null });
155
- let tt = !1, qe = !0;
156
- const pe = $e({ el: null, cell: null, timeout: null }), be = $e({
155
+ }, Ae = Te({ id: null, date: null });
156
+ let tt = !1, Ue = !0;
157
+ const De = Te({ el: null, cell: null, timeout: null }), ke = Te({
157
158
  eventId: null,
158
159
  fromVueCal: null,
159
160
  toVueCal: null
160
161
  });
161
- function ft(D) {
162
- const { config: n, view: r, eventsManager: h, emit: p, uid: b, dateUtils: L } = D, v = (e) => {
162
+ function Yt(D) {
163
+ const { config: n, view: r, eventsManager: h, emit: p, uid: b, dateUtils: H } = D, v = (e) => {
163
164
  var l;
164
- const { timeStep: d, timeCellHeight: f, timeFrom: M } = n, P = (((l = e.touches) == null ? void 0 : l[0]) || e).clientY, { top: B } = e.currentTarget.getBoundingClientRect(), s = P - B - ~~e.dataTransfer.getData("cursor-grab-at");
165
- return Pe(Je(s, e.currentTarget), n);
166
- }, C = (e, d, f) => {
165
+ const { timeStep: d, timeCellHeight: g, timeFrom: M } = n, P = (((l = e.touches) == null ? void 0 : l[0]) || e).clientY, { top: A } = e.currentTarget.getBoundingClientRect(), s = P - A - ~~e.dataTransfer.getData("cursor-grab-at");
166
+ return je(qe(s, e.currentTarget), n);
167
+ }, C = (e, d, g) => {
167
168
  const M = d.duration || i(d.start, d.end) || n.timeStep;
168
169
  let P = Math.max(v(e), 0);
169
170
  if (n.snapToInterval) {
170
171
  const _ = P + n.snapToInterval / 2;
171
172
  P = _ - _ % n.snapToInterval;
172
173
  }
173
- const B = new Date(new Date(f).setMinutes(P)), s = Math.min(P + M, 24 * 60), l = new Date(new Date(f).setMinutes(s));
174
- return { start: B, end: l };
174
+ const A = new Date(new Date(g).setMinutes(P)), s = Math.min(P + M, 24 * 60), l = new Date(new Date(g).setMinutes(s));
175
+ return { start: A, end: l };
175
176
  }, i = (e, d) => Math.round((d - e) / 6e4);
176
177
  return {
177
178
  eventDragStart: (e, d) => {
178
179
  if (e.target.nodeType === 3 || D.touch.isResizingEvent) return e.preventDefault();
179
180
  e.dataTransfer.effectAllowed = "move", e.dataTransfer.dropEffect = "move";
180
- const f = { ...d, _: { id: d._.id, duration: i(d.start, d.end) } };
181
+ const g = { ...d, _: { id: d._.id, duration: i(d.start, d.end) } };
181
182
  try {
182
- e.dataTransfer.setData("text/plain", ""), e.dataTransfer.setData("event", JSON.stringify(f)), e.dataTransfer.setData("cursor-grab-at", e.offsetY);
183
+ e.dataTransfer.setData("text/plain", ""), e.dataTransfer.setData("event", JSON.stringify(g)), e.dataTransfer.setData("cursor-grab-at", e.offsetY);
183
184
  } catch (P) {
184
185
  return console.warn("Vue Cal: Failed to set drag data:", P), e.preventDefault();
185
186
  }
186
- be.eventId = d._.id, be.fromVueCal = b;
187
+ ke.eventId = d._.id, ke.fromVueCal = b;
187
188
  const M = e.target.closest(".vuecal__event");
188
189
  M.classList.add("vuecal__event--dragging-ghost"), setTimeout(() => {
189
190
  M.classList.add("vuecal__event--dragging-original"), M.classList.remove("vuecal__event--dragging-ghost");
190
- }, 0), tt = !1, Object.assign(Ae, { id: r.id, date: r.firstCellDate }), qe = !0, D.touch.isDraggingEvent = !0;
191
+ }, 0), tt = !1, Object.assign(Ae, { id: r.id, date: r.firstCellDate }), Ue = !0, D.touch.isDraggingEvent = !0;
191
192
  },
192
193
  eventDragEnd: (e, d) => {
193
- be.eventId = null, e.target.closest(".vuecal__event").classList.remove("vuecal__event--dragging-original");
194
- const { fromVueCal: f, toVueCal: M } = be;
195
- M && f !== M && h.deleteEvent(d._.id, 3), be.fromVueCal = null, be.toVueCal = null, tt && qe && Ae.id && r.switchView(Ae.id, Ae.date, !0), D.touch.isDraggingEvent = !1;
194
+ ke.eventId = null, e.target.closest(".vuecal__event").classList.remove("vuecal__event--dragging-original");
195
+ const { fromVueCal: g, toVueCal: M } = ke;
196
+ M && g !== M && h.deleteEvent(d._.id, 3), ke.fromVueCal = null, ke.toVueCal = null, tt && Ue && Ae.id && r.switchView(Ae.id, Ae.date, !0), D.touch.isDraggingEvent = !1;
196
197
  },
197
198
  cellDragEnter: (e, d) => {
198
- const { start: f } = d, M = e.currentTarget;
199
+ const { start: g } = d, M = e.currentTarget;
199
200
  if (!e.currentTarget.contains(e.relatedTarget)) {
200
- if (M === pe.el || !M.className.includes("vuecal__cell-content")) return !1;
201
- pe.el && (pe.cell.highlighted = !1), Object.assign(pe, { el: M, cell: d, timeout: clearTimeout(pe.timeout) }), d.highlighted = !0, ["years", "year", "month"].includes(r.id) && (pe.timeout = setTimeout(() => D.switchToNarrowerView(f), 2e3));
201
+ if (M === De.el || !M.className.includes("vuecal__cell-content")) return !1;
202
+ De.el && (De.cell.highlighted = !1), Object.assign(De, { el: M, cell: d, timeout: clearTimeout(De.timeout) }), d.highlighted = !0, ["years", "year", "month"].includes(r.id) && (De.timeout = setTimeout(() => D.switchToNarrowerView(g), 2e3));
202
203
  }
203
204
  },
204
205
  cellDragOver: (e, d) => {
205
- const { start: f, schedule: M } = d;
206
+ const { start: g, schedule: M } = d;
206
207
  e.preventDefault(), d.highlighted = !0, (M || M === 0) && (d.highlightedSchedule = M);
207
208
  },
208
209
  cellDragLeave: (e, d) => {
209
- e.preventDefault(), !e.currentTarget.contains(e.relatedTarget) && (d.highlightedSchedule = !1, pe.cell === d && (clearTimeout(pe.timeout), Object.assign(pe, { el: null, cell: null, timeout: null }), d.highlighted = !1));
210
+ e.preventDefault(), !e.currentTarget.contains(e.relatedTarget) && (d.highlightedSchedule = !1, De.cell === d && (clearTimeout(De.timeout), Object.assign(De, { el: null, cell: null, timeout: null }), d.highlighted = !1));
210
211
  },
211
212
  cellDragDrop: async (e, d) => {
212
- var V, H, U;
213
- e.preventDefault(), clearTimeout(pe.timeout), Object.assign(pe, { el: null, cell: null, timeout: null });
214
- const f = JSON.parse(e.dataTransfer.getData("event") || "{}");
215
- f.start && (f.start = new Date(f.start)), f.end && (f.end = new Date(f.end));
213
+ var V, F, J;
214
+ e.preventDefault(), clearTimeout(De.timeout), Object.assign(De, { el: null, cell: null, timeout: null });
215
+ const g = JSON.parse(e.dataTransfer.getData("event") || "{}");
216
+ g.start && (g.start = new Date(g.start)), g.end && (g.end = new Date(g.end));
216
217
  let M;
217
- const { start: P, end: B } = C(e, f, d.start), { schedule: s } = ((V = e.target.closest("[data-schedule]")) == null ? void 0 : V.dataset) || {};
218
+ const { start: P, end: A } = C(e, g, d.start), { schedule: s } = ((V = e.target.closest("[data-schedule]")) == null ? void 0 : V.dataset) || {};
218
219
  let l = () => {
219
220
  };
220
- be.fromVueCal === b ? (M = h.getEvent(f._.id), M && (M._.dragging = !1, l = () => {
221
- M.start = P, M.end = B, s !== void 0 && (M.schedule = ~~s);
221
+ ke.fromVueCal === b ? (M = h.getEvent(g._.id), M && (M._.dragging = !1, l = () => {
222
+ M.start = P, M.end = A, s !== void 0 && (M.schedule = ~~s);
222
223
  })) : (M = {
223
- ...f,
224
+ ...g,
224
225
  start: P,
225
- end: B,
226
+ end: A,
226
227
  ...s !== void 0 && { schedule: ~~s },
227
- _: { id: ((H = f._) == null ? void 0 : H.id) || f.id, duration: i(P, B) },
228
+ _: { id: ((F = g._) == null ? void 0 : F.id) || g.id, duration: i(P, A) },
228
229
  getOverlappingEvents: () => h.getEventsInRange(
229
- h.getEventsByDate(L.formatDate(P), !0),
230
- { start: P, end: B },
230
+ h.getEventsByDate(H.formatDate(P), !0),
231
+ { start: P, end: A },
231
232
  { schedule: ~~s }
232
233
  )
233
234
  }, l = () => {
234
235
  M = h.createEvent(M);
235
236
  });
236
237
  let _ = !0;
237
- const { drop: t } = (U = n.eventListeners) == null ? void 0 : U.event;
238
+ const { drop: t } = (J = n.eventListeners) == null ? void 0 : J.event;
238
239
  t && (_ = await t({
239
240
  e,
240
- event: { ...M, start: P, end: B, schedule: ~~s },
241
- overlaps: M.getOverlappingEvents({ start: P, end: B, schedule: ~~s }),
241
+ event: { ...M, start: P, end: A, schedule: ~~s },
242
+ overlaps: M.getOverlappingEvents({ start: P, end: A, schedule: ~~s }),
242
243
  cell: d,
243
- external: be.fromVueCal !== b
244
- })), _ !== !1 && l(), d.highlighted = !1, d.highlightedSchedule = null, qe = !1, be.toVueCal = b, p("event-dropped", {
244
+ external: ke.fromVueCal !== b
245
+ })), _ !== !1 && l(), d.highlighted = !1, d.highlightedSchedule = null, Ue = !1, ke.toVueCal = b, p("event-dropped", {
245
246
  e,
246
247
  cell: d,
247
248
  event: M,
248
- originalEvent: f,
249
- external: be.fromVueCal !== b
249
+ originalEvent: g,
250
+ external: ke.fromVueCal !== b
250
251
  });
251
252
  }
252
253
  };
253
254
  }
254
- const st = (D, n) => {
255
- let r, h, p, b = {}, L = {};
255
+ const nt = (D, n) => {
256
+ let r, h, p, b = {}, H = {};
256
257
  const v = ie(D), C = () => {
257
258
  v.value.today || (v.value = n), Date.prototype.addDays = function(a) {
258
259
  return W(this, a || 0);
259
260
  }, Date.prototype.subtractDays = function(a) {
260
- return G(this, a || 0);
261
+ return U(this, a || 0);
261
262
  }, Date.prototype.addHours = function(a) {
262
263
  return o(this, a || 0);
263
264
  }, Date.prototype.subtractHours = function(a) {
@@ -275,16 +276,16 @@ const st = (D, n) => {
275
276
  }, Date.prototype.format = function(a = "YYYY-MM-DD") {
276
277
  return ue(this, a);
277
278
  }, Date.prototype.formatTime = function(a = "HH:mm") {
278
- return re(this, a);
279
+ return ne(this, a);
279
280
  };
280
281
  }, i = () => {
281
282
  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;
282
- }, m = (a) => {
283
+ }, f = (a) => {
283
284
  v.value = a, Date.prototype.subtractDays && C();
284
- }, $ = () => (h !== (/* @__PURE__ */ new Date()).getDate() && (r = /* @__PURE__ */ new Date(), h = r.getDate(), p = `${r.getFullYear()}-${r.getMonth()}-${r.getDate()}`), p), W = (a, k) => {
285
+ }, Y = () => (h !== (/* @__PURE__ */ new Date()).getDate() && (r = /* @__PURE__ */ new Date(), h = r.getDate(), p = `${r.getFullYear()}-${r.getMonth()}-${r.getDate()}`), p), W = (a, k) => {
285
286
  const y = new Date(a.valueOf());
286
287
  return y.setDate(y.getDate() + k), y;
287
- }, G = (a, k) => {
288
+ }, U = (a, k) => {
288
289
  const y = new Date(a.valueOf());
289
290
  return y.setDate(y.getDate() - k), y;
290
291
  }, o = (a, k) => {
@@ -299,22 +300,22 @@ const st = (D, n) => {
299
300
  }, d = (a, k) => {
300
301
  const y = new Date(a.valueOf());
301
302
  return y.setMinutes(y.getMinutes() - k), y;
302
- }, f = (a, k) => {
303
- const y = (A) => {
304
- const Q = A % k;
305
- return Q !== 0 && (A += Q >= k / 2 ? k - Q : -Q), A;
303
+ }, g = (a, k) => {
304
+ const y = (R) => {
305
+ const Q = R % k;
306
+ return Q !== 0 && (R += Q >= k / 2 ? k - Q : -Q), R;
306
307
  };
307
308
  if (typeof a == "number") return y(a);
308
309
  if (a instanceof Date) {
309
- let A = y(a.getMinutes());
310
- A >= 60 && (a.setHours(a.getHours() + 1), A = 0), a.setMinutes(A, 0, 0);
310
+ let R = y(a.getMinutes());
311
+ R >= 60 && (a.setHours(a.getHours() + 1), R = 0), a.setMinutes(R, 0, 0);
311
312
  }
312
313
  }, M = (a, k = !1) => {
313
- const y = new Date(Date.UTC(a.getFullYear(), a.getMonth(), a.getDate())), A = y.getUTCDay() || 7;
314
- y.setUTCDate(y.getUTCDate() + 4 - A);
314
+ const y = new Date(Date.UTC(a.getFullYear(), a.getMonth(), a.getDate())), R = y.getUTCDay() || 7;
315
+ y.setUTCDate(y.getUTCDate() + 4 - R);
315
316
  const Q = new Date(Date.UTC(y.getUTCFullYear(), 0, 1));
316
317
  return Math.ceil(((y - Q) / 864e5 + 1) / 7) + (k ? 1 : 0);
317
- }, P = (a) => `${a.getFullYear()}-${a.getMonth()}-${a.getDate()}` === $(), B = (a, k) => {
318
+ }, P = (a) => `${a.getFullYear()}-${a.getMonth()}-${a.getDate()}` === Y(), A = (a, k) => {
318
319
  if (!a || !k) return console.warn(`Vue Cal: missing date${a ? "2" : "1"} parameter for comparison with \`isSameDate(date1, date2)\`.`);
319
320
  if (K(a)) {
320
321
  if (!K(k)) return console.warn(`Vue Cal: invalid date2 provided for comparison with \`isSameDate(date1, date2)\`: \`${k}\`.`);
@@ -324,30 +325,30 @@ const st = (D, n) => {
324
325
  const k = a.getFullYear();
325
326
  return !(k % 400) || k % 100 && !(k % 4);
326
327
  }, _ = (a = null, k) => {
327
- const y = a && new Date(a.valueOf()) || /* @__PURE__ */ new Date(), A = k ? 7 : 6;
328
- return y.setDate(y.getDate() - (y.getDay() + A) % 7), y;
329
- }, t = (a) => a instanceof Date ? a : (a.length === 10 && (a += " 00:00"), new Date(a.replace(/-/g, "/"))), V = (a) => a.getHours() * 60 + a.getMinutes(), H = (a, k) => {
328
+ const y = a && new Date(a.valueOf()) || /* @__PURE__ */ new Date(), R = k ? 7 : 6;
329
+ return y.setDate(y.getDate() - (y.getDay() + R) % 7), y;
330
+ }, t = (a) => a instanceof Date ? a : (a.length === 10 && (a += " 00:00"), new Date(a.replace(/-/g, "/"))), V = (a) => a.getHours() * 60 + a.getMinutes(), F = (a, k) => {
330
331
  typeof a == "string" && (a = a.replace(/-/g, "/")), typeof k == "string" && (k = k.replace(/-/g, "/")), a = new Date(a).setHours(0, 0, 0, 0), k = new Date(k).setHours(0, 0, 1, 0);
331
332
  const y = (new Date(k).getTimezoneOffset() - new Date(a).getTimezoneOffset()) * 60 * 1e3;
332
333
  return Math.ceil((k - a - y) / (24 * 3600 * 1e3));
333
- }, U = (a, k, y) => Math.abs(a.getTime() - k.getTime()) <= y * 60 * 1e3, K = (a) => a && a instanceof Date && !isNaN(a), ue = (a, k = "YYYY-MM-DD", y = null) => {
334
+ }, J = (a, k, y) => Math.abs(a.getTime() - k.getTime()) <= y * 60 * 1e3, K = (a) => a && a instanceof Date && !isNaN(a), ue = (a, k = "YYYY-MM-DD", y = null) => {
334
335
  if (y || (y = v.value), k || (k = "YYYY-MM-DD"), k === "YYYY-MM-DD") return ae(a);
335
- b = {}, L = {};
336
- const A = {
337
- YYYY: () => ee(a, y).YYYY,
338
- YY: () => ee(a, y).YY(),
339
- M: () => ee(a, y).M,
340
- MM: () => ee(a, y).MM(),
341
- MMM: () => ee(a, y).MMM(),
342
- MMMM: () => ee(a, y).MMMM(),
343
- MMMMG: () => ee(a, y).MMMMG(),
344
- D: () => ee(a, y).D,
345
- DD: () => ee(a, y).DD(),
346
- S: () => ee(a, y).S(),
347
- d: () => ee(a, y).d,
348
- dd: () => ee(a, y).dd(),
349
- ddd: () => ee(a, y).ddd(),
350
- dddd: () => ee(a, y).dddd(),
336
+ b = {}, H = {};
337
+ const R = {
338
+ YYYY: () => x(a, y).YYYY,
339
+ YY: () => x(a, y).YY(),
340
+ M: () => x(a, y).M,
341
+ MM: () => x(a, y).MM(),
342
+ MMM: () => x(a, y).MMM(),
343
+ MMMM: () => x(a, y).MMMM(),
344
+ MMMMG: () => x(a, y).MMMMG(),
345
+ D: () => x(a, y).D,
346
+ DD: () => x(a, y).DD(),
347
+ S: () => x(a, y).S(),
348
+ d: () => x(a, y).d,
349
+ dd: () => x(a, y).dd(),
350
+ ddd: () => x(a, y).ddd(),
351
+ dddd: () => x(a, y).dddd(),
351
352
  HH: () => oe(a, y).HH,
352
353
  H: () => oe(a, y).H,
353
354
  hh: () => oe(a, y).hh,
@@ -359,29 +360,29 @@ const st = (D, n) => {
359
360
  s: () => oe(a, y).s
360
361
  };
361
362
  return k.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (Q, c) => {
362
- const w = A[c.replace(/\{|\}/g, "")];
363
+ const w = R[c.replace(/\{|\}/g, "")];
363
364
  return w !== void 0 ? w() : c;
364
365
  });
365
366
  }, ae = (a) => {
366
367
  const k = a.getMonth() + 1, y = a.getDate();
367
368
  return `${a.getFullYear()}-${k < 10 ? "0" : ""}${k}-${y < 10 ? "0" : ""}${y}`;
368
- }, re = (a, k = "HH:mm", y = null, A = !1) => {
369
+ }, ne = (a, k = "HH:mm", y = null, R = !1) => {
369
370
  let Q = !1;
370
- if (A) {
371
- const [S, Y, N] = [a.getHours(), a.getMinutes(), a.getSeconds()];
372
- S + Y + N === 141 && (Q = !0);
371
+ if (R) {
372
+ const [S, $, N] = [a.getHours(), a.getMinutes(), a.getSeconds()];
373
+ S + $ + N === 141 && (Q = !0);
373
374
  }
374
- if (a instanceof Date && k === "HH:mm") return Q ? "24:00" : he(a);
375
- L = {}, y || (y = v.value);
376
- const c = oe(a, y), w = k.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (S, Y) => {
377
- const N = c[Y.replace(/\{|\}/g, "")];
378
- return N !== void 0 ? N : Y;
375
+ if (a instanceof Date && k === "HH:mm") return Q ? "24:00" : ge(a);
376
+ H = {}, y || (y = v.value);
377
+ const c = oe(a, y), w = k.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (S, $) => {
378
+ const N = c[$.replace(/\{|\}/g, "")];
379
+ return N !== void 0 ? N : $;
379
380
  });
380
381
  return Q ? w.replace("23:59", "24:00") : w;
381
- }, he = (a) => {
382
+ }, ge = (a) => {
382
383
  const k = a.getHours(), y = a.getMinutes();
383
384
  return `${(k < 10 ? "0" : "") + k}:${(y < 10 ? "0" : "") + y}`;
384
- }, q = (a) => {
385
+ }, G = (a) => {
385
386
  const k = Math.floor(a / 60).toString().padStart(2, 0), y = (a % 60).toString().padStart(2, 0);
386
387
  return `${k}:${y}`;
387
388
  }, ce = (a) => {
@@ -396,9 +397,9 @@ const st = (D, n) => {
396
397
  default:
397
398
  return "th";
398
399
  }
399
- }, ee = (a, k) => {
400
+ }, x = (a, k) => {
400
401
  if (b.D) return b;
401
- const y = a.getFullYear(), A = a.getMonth() + 1, Q = a.getDate(), w = (a.getDay() - 1 + 7) % 7;
402
+ const y = a.getFullYear(), R = a.getMonth() + 1, Q = a.getDate(), w = (a.getDay() - 1 + 7) % 7;
402
403
  return b = {
403
404
  // Year.
404
405
  YYYY: y,
@@ -406,15 +407,15 @@ const st = (D, n) => {
406
407
  YY: () => y.toString().substring(2),
407
408
  // 24.
408
409
  // Month.
409
- M: A,
410
+ M: R,
410
411
  // 1 to 12.
411
- MM: () => A.toString().padStart(2, 0),
412
+ MM: () => R.toString().padStart(2, 0),
412
413
  // 01 to 12.
413
- MMM: () => k.months[A - 1].substring(0, 3),
414
+ MMM: () => k.months[R - 1].substring(0, 3),
414
415
  // Jan to Dec.
415
- MMMM: () => k.months[A - 1],
416
+ MMMM: () => k.months[R - 1],
416
417
  // January to December.
417
- MMMMG: () => (k.monthsGenitive || k.months)[A - 1],
418
+ MMMMG: () => (k.monthsGenitive || k.months)[R - 1],
418
419
  // January to December in genitive form (Greek...)
419
420
  // Day.
420
421
  D: Q,
@@ -435,51 +436,51 @@ const st = (D, n) => {
435
436
  // Monday to Sunday.
436
437
  }, b;
437
438
  }, oe = (a, k) => {
438
- if (L.am) return L;
439
- let y, A, Q;
440
- a instanceof Date ? (y = a.getHours(), A = a.getMinutes(), Q = a.getSeconds()) : (y = Math.floor(a / 60), A = Math.floor(a % 60));
439
+ if (H.am) return H;
440
+ let y, R, Q;
441
+ a instanceof Date ? (y = a.getHours(), R = a.getMinutes(), Q = a.getSeconds()) : (y = Math.floor(a / 60), R = Math.floor(a % 60));
441
442
  const c = y % 12 ? y % 12 : 12, w = (k || { am: "am", pm: "pm" })[y === 24 || y < 12 ? "am" : "pm"];
442
- return L = {
443
+ return H = {
443
444
  H: y,
444
445
  h: c,
445
446
  HH: y.toString().padStart(2, 0),
446
447
  hh: c.toString().padStart(2, 0),
447
448
  am: w,
448
449
  AM: w.toUpperCase(),
449
- m: A,
450
- mm: A.toString().padStart(2, 0),
450
+ m: R,
451
+ mm: R.toString().padStart(2, 0),
451
452
  s: Q
452
- }, L;
453
+ }, H;
453
454
  };
454
455
  return {
455
456
  addDatePrototypes: C,
456
457
  removeDatePrototypes: i,
457
- updateTexts: m,
458
+ updateTexts: f,
458
459
  addDays: W,
459
- subtractDays: G,
460
+ subtractDays: U,
460
461
  addHours: o,
461
462
  subtractHours: u,
462
463
  addMinutes: e,
463
464
  subtractMinutes: d,
464
- snapToInterval: f,
465
+ snapToInterval: g,
465
466
  getWeek: M,
466
467
  isToday: P,
467
- isSameDate: B,
468
+ isSameDate: A,
468
469
  isInRange: s,
469
470
  isLeapYear: l,
470
471
  getPreviousFirstDayOfWeek: _,
471
472
  stringToDate: t,
472
473
  dateToMinutes: V,
473
- countDays: H,
474
- datesInSameTimeStep: U,
474
+ countDays: F,
475
+ datesInSameTimeStep: J,
475
476
  isValid: K,
476
477
  formatDate: ue,
477
478
  formatDateLite: ae,
478
- formatTime: re,
479
- formatTimeLite: he,
480
- formatMinutes: q
479
+ formatTime: ne,
480
+ formatTimeLite: ge,
481
+ formatMinutes: G
481
482
  };
482
- }, gt = (D) => {
483
+ }, Et = (D) => {
483
484
  const { dateUtils: n, config: r } = D;
484
485
  let h = 0;
485
486
  const p = T(() => {
@@ -494,12 +495,12 @@ const st = (D, n) => {
494
495
  // A map of all the events indexed by ID for fast lookup.
495
496
  }, u = r.events.sort((e, d) => e.start - d.start < 0 ? -1 : 1);
496
497
  for (const e of u)
497
- b(e), e._ || (e._ = {}), e._.id = e._.id || ++h, e.delete || (e.delete = (d) => m(e._.id, d)), e._.deleting = !1, e._.deleted = !1, e.isOverlapping = (d = null) => e.getOverlappingEvents(d).length, e.getOverlappingEvents = (d = null) => {
498
- var f;
498
+ b(e), e._ || (e._ = {}), e._.id = e._.id || ++h, e.delete || (e.delete = (d) => f(e._.id, d)), e._.deleting = !1, e._.deleted = !1, e.isOverlapping = (d = null) => e.getOverlappingEvents(d).length, e.getOverlappingEvents = (d = null) => {
499
+ var g;
499
500
  return W(
500
501
  v(n.formatDate((d == null ? void 0 : d.start) || e.start), !0),
501
502
  { start: (d == null ? void 0 : d.start) || e.start, end: (d == null ? void 0 : d.end) || e.end },
502
- { excludeIds: [e._.id], schedule: (f = r.schedules) != null && f.length ? ~~((d == null ? void 0 : d.schedule) || e.schedule) : null }
503
+ { excludeIds: [e._.id], schedule: (g = r.schedules) != null && g.length ? ~~((d == null ? void 0 : d.schedule) || e.schedule) : null }
503
504
  );
504
505
  }, e._.register = (d) => {
505
506
  e._.$el = d, e._.fireCreated && (D.emit("event-created", e), delete e._.fireCreated);
@@ -513,11 +514,11 @@ const st = (D, n) => {
513
514
  return;
514
515
  } else o.end.getTime() < o.start.getTime() && console.error(`Vue Cal: invalid event dates for event "${o.title}". The event ends before it starts.`, o.start, o.end);
515
516
  o._ || (o._ = {}), o._.multiday = !n.isSameDate(o.start, new Date(o.end.getTime() - 1)), o._.startFormatted = n.formatDate(o.start), o._.startMinutes = ~~n.dateToMinutes(o.start), o._.endMinutes = ~~n.dateToMinutes(o.end);
516
- const u = o.start.getHours(), e = o.start.getMinutes().toString().padStart(2, 0), d = o.end.getHours(), f = o.end.getMinutes().toString().padStart(2, 0);
517
- o._.startTimeFormatted24 = `${u.toString().padStart(2, 0)}:${e}`, o._.startTimeFormatted12 = `${u % 12 || 12}${e ? `:${e}` : ""} ${u < 12 ? "AM" : "PM"}`, o._.endTimeFormatted24 = `${d.toString().padStart(2, 0)}:${f}`, o._.endTimeFormatted12 = `${d % 12 || 12}${f ? `:${f}` : ""} ${d < 12 ? "AM" : "PM"}`, o._.duration = Math.abs(~~((o.end - o.start) / 6e4));
518
- }, L = (o) => p.value.byId[o], v = (o, u = !1, e = !1) => {
517
+ const u = o.start.getHours(), e = o.start.getMinutes().toString().padStart(2, 0), d = o.end.getHours(), g = o.end.getMinutes().toString().padStart(2, 0);
518
+ o._.startTimeFormatted24 = `${u.toString().padStart(2, 0)}:${e}`, o._.startTimeFormatted12 = `${u % 12 || 12}${e ? `:${e}` : ""} ${u < 12 ? "AM" : "PM"}`, o._.endTimeFormatted24 = `${d.toString().padStart(2, 0)}:${g}`, o._.endTimeFormatted12 = `${d % 12 || 12}${g ? `:${g}` : ""} ${d < 12 ? "AM" : "PM"}`, o._.duration = Math.abs(~~((o.end - o.start) / 6e4));
519
+ }, H = (o) => p.value.byId[o], v = (o, u = !1, e = !1) => {
519
520
  let d = p.value.byDate[o] || [];
520
- return d = u || e ? d.map(L) : d, e || (d = d.filter((f) => !f.background && !f._.deleted), u || (d = d.map((f) => f._.id))), d;
521
+ return d = u || e ? d.map(H) : d, e || (d = d.filter((g) => !g.background && !g._.deleted), u || (d = d.map((g) => g._.id))), d;
521
522
  }, C = (o) => {
522
523
  const u = {};
523
524
  for (const { startFormatted: e } of o) {
@@ -532,8 +533,8 @@ const st = (D, n) => {
532
533
  return;
533
534
  }
534
535
  return r.snapToInterval && (n.snapToInterval(o.start, r.snapToInterval), n.snapToInterval(o.end, r.snapToInterval)), o = { ...o }, o._ || (o._ = {}), o._.id = ++h, o._.fireCreated = !0, r.events.push(o), o;
535
- }, m = async (o, u = 0) => {
536
- var P, B;
536
+ }, f = async (o, u = 0) => {
537
+ var P, A;
537
538
  if (!o) return console.warn("Vue Cal: Cannot delete event without its ID or criteria.");
538
539
  let e = typeof o == "string" || !isNaN(o) ? o : null;
539
540
  const d = typeof o == "object" ? Object.entries(o) : null;
@@ -544,13 +545,13 @@ const st = (D, n) => {
544
545
  if (!r.editableEvents.delete)
545
546
  return console.info("Vue Cal: Event deletion is disabled. Enable it with the `editable-events` props.");
546
547
  if (!e) return console.warn("Vue Cal: Cannot delete event without its ID.");
547
- const f = r.events.findIndex((s) => s._.id === e);
548
- if (f === -1) return console.warn(`Vue Cal: Cannot delete unknown event \`${e}\`.`);
549
- const M = r.events[f];
548
+ const g = r.events.findIndex((s) => s._.id === e);
549
+ if (g === -1) return console.warn(`Vue Cal: Cannot delete unknown event \`${e}\`.`);
550
+ const M = r.events[g];
550
551
  if (M.deletable === !1) return console.warn(`Vue Cal: Can't delete event \`${e}\` since it was explicitely set to \`delete: false\`.`);
551
552
  switch (u) {
552
553
  case 0:
553
- M._.deleting ? r.events.splice(f, 1) : M._.deleting = !0;
554
+ M._.deleting ? r.events.splice(g, 1) : M._.deleting = !0;
554
555
  break;
555
556
  // Display the delete button.
556
557
  case 1:
@@ -560,180 +561,180 @@ const st = (D, n) => {
560
561
  // When explicitly using this stage, the event will be visually deleted but still present in the
561
562
  // source of truth until the cell is unmounted (by navigating away).
562
563
  case 2:
563
- M._.deleted = !0, r.events[f]._.deleted = !0, (B = M._.$el) == null || B.dispatchEvent(new CustomEvent("event-deleted", { detail: M._.id }));
564
+ M._.deleted = !0, r.events[g]._.deleted = !0, (A = M._.$el) == null || A.dispatchEvent(new CustomEvent("event-deleted", { detail: M._.id }));
564
565
  break;
565
566
  // Effective deletion from the source of truth (by default, when unmounting the cell).
566
567
  case 3:
567
- r.events.splice(f, 1), D.emit("update:events", r.events), D.emit("event-delete", M);
568
+ r.events.splice(g, 1), D.emit("update:events", r.events), D.emit("event-delete", M);
568
569
  break;
569
570
  }
570
571
  return !0;
571
- }, $ = (o) => {
572
+ }, Y = (o) => {
572
573
  const u = v(o, !0);
573
574
  if (!u.length) return { cellOverlaps: {}, longestStreak: 0 };
574
575
  const e = {};
575
- let d = [], f = 0;
576
+ let d = [], g = 0;
576
577
  u.sort((M, P) => M.start - P.start || M.end - M.start - (P.end - P.start));
577
578
  for (const M of u) {
578
579
  const P = M._.id;
579
580
  e[P] || (e[P] = { overlaps: /* @__PURE__ */ new Set(), maxConcurrent: 1, position: 0 }), d = d.filter((t) => t.end > M.start);
580
- let B = d.filter((t) => {
581
- var H;
582
- return (!((H = r.schedules) != null && H.length) || M.schedule === t.schedule) && t.start < M.end;
583
- }), s = new Set(B.map((t) => {
581
+ let A = d.filter((t) => {
582
+ var F;
583
+ return (!((F = r.schedules) != null && F.length) || M.schedule === t.schedule) && t.start < M.end;
584
+ }), s = new Set(A.map((t) => {
584
585
  var V;
585
586
  return ((V = e[t._.id]) == null ? void 0 : V.position) ?? 0;
586
587
  })), l = 0;
587
588
  for (; s.has(l); ) l++;
588
589
  e[P].position = l, d.push(M);
589
- let _ = Math.max(1, ...B.map((t) => {
590
+ let _ = Math.max(1, ...A.map((t) => {
590
591
  var V;
591
592
  return ((V = e[t._.id]) == null ? void 0 : V.maxConcurrent) ?? 1;
592
593
  }));
593
- e[P].maxConcurrent = Math.max(B.length + 1, _);
594
- for (const t of B)
594
+ e[P].maxConcurrent = Math.max(A.length + 1, _);
595
+ for (const t of A)
595
596
  e[t._.id].overlaps.add(P), e[P].overlaps.add(t._.id), e[t._.id].maxConcurrent = e[P].maxConcurrent;
596
- f = Math.max(f, e[P].maxConcurrent);
597
+ g = Math.max(g, e[P].maxConcurrent);
597
598
  }
598
599
  for (const M in e) e[M].overlaps = [...e[M].overlaps];
599
- return { cellOverlaps: e, longestStreak: f };
600
- }, W = (o = [], { start: u, end: e }, { excludeIds: d = [], schedule: f = null }) => {
601
- var B;
600
+ return { cellOverlaps: e, longestStreak: g };
601
+ }, W = (o = [], { start: u, end: e }, { excludeIds: d = [], schedule: g = null }) => {
602
+ var A;
602
603
  const M = new Set(d), P = [];
603
604
  for (const s of o)
604
- !M.has((B = s._) == null ? void 0 : B.id) && (f === null || f === s.schedule) && G(s, u, e) && P.push(s);
605
+ !M.has((A = s._) == null ? void 0 : A.id) && (g === null || g === s.schedule) && U(s, u, e) && P.push(s);
605
606
  return P;
606
- }, G = (o, u, e) => {
607
- const d = o.allDay || !r.time, f = d ? new Date(o.start).setHours(0, 0, 0, 0) : o.start.getTime(), M = d ? new Date(o.end).setHours(23, 59, 59, 999) : o.end.getTime(), P = d ? new Date(u).setHours(0, 0, 0, 0) : u.getTime(), B = d ? new Date(e).setHours(23, 59, 59, 999) : e.getTime();
608
- return M > P && f < B;
607
+ }, U = (o, u, e) => {
608
+ const d = o.allDay || !r.time, g = d ? new Date(o.start).setHours(0, 0, 0, 0) : o.start.getTime(), M = d ? new Date(o.end).setHours(23, 59, 59, 999) : o.end.getTime(), P = d ? new Date(u).setHours(0, 0, 0, 0) : u.getTime(), A = d ? new Date(e).setHours(23, 59, 59, 999) : e.getTime();
609
+ return M > P && g < A;
609
610
  };
610
611
  return {
611
612
  events: p,
612
- getEvent: L,
613
+ getEvent: H,
613
614
  getEventsByDate: v,
614
615
  getViewEvents: C,
615
- getCellOverlappingEvents: $,
616
+ getCellOverlappingEvents: Y,
616
617
  getEventsInRange: W,
617
618
  createEvent: i,
618
- deleteEvent: m,
619
- isEventInRange: G
619
+ deleteEvent: f,
620
+ isEventInRange: U
620
621
  };
621
- }, ht = ({ config: D, dateUtils: n, emit: r, texts: h, eventsManager: p }, b) => {
622
- const { availableViews: L } = D, v = ie(D.view && L[D.view] ? D.view : D.defaultView), C = ie(D.selectedDate || null), i = ie(/* @__PURE__ */ new Date()), m = ie(new Date(D.viewDate || i.value));
623
- m.value.setHours(0, 0, 0, 0);
624
- const $ = ie(new Date(m));
622
+ }, St = ({ config: D, dateUtils: n, emit: r, texts: h, eventsManager: p }, b) => {
623
+ const { availableViews: H } = D, v = ie(D.view && H[D.view] ? D.view : D.defaultView), C = ie(D.selectedDate || null), i = ie(/* @__PURE__ */ new Date()), f = ie(new Date(D.viewDate || i.value));
624
+ f.value.setHours(0, 0, 0, 0);
625
+ const Y = ie(new Date(f));
625
626
  let W = null;
626
- const G = T(() => v.value === "month" ? $.value : l.value), o = T(() => v.value === "month" ? new Date($.value.getFullYear(), $.value.getMonth() + 1, 0, 23, 59, 59, 999) : t.value), u = T(() => v.value === "week" ? n.getPreviousFirstDayOfWeek(l.value, D.startWeekOnSunday) : v.value === "month" ? l.value : G.value), e = T(() => {
627
+ const U = T(() => v.value === "month" ? Y.value : l.value), o = T(() => v.value === "month" ? new Date(Y.value.getFullYear(), Y.value.getMonth() + 1, 0, 23, 59, 59, 999) : t.value), u = T(() => v.value === "week" ? n.getPreviousFirstDayOfWeek(l.value, D.startWeekOnSunday) : v.value === "month" ? l.value : U.value), e = T(() => {
627
628
  if (v.value === "week") {
628
- const g = n.addDays(u.value, 7);
629
- return g.setMilliseconds(-1), g;
629
+ const m = n.addDays(u.value, 7);
630
+ return m.setMilliseconds(-1), m;
630
631
  }
631
632
  return v.value === "month" ? t.value : o.value;
632
633
  }), d = T(() => {
633
- const g = i.value.getTime();
634
+ const m = i.value.getTime();
634
635
  if (v.value === "week")
635
- return u.value.getTime() <= g && g <= e.value.getTime();
636
- const z = l.value.getTime(), R = t.value.getTime();
637
- return z <= g && g <= R;
636
+ return u.value.getTime() <= m && m <= e.value.getTime();
637
+ const z = l.value.getTime(), X = t.value.getTime();
638
+ return z <= m && m <= X;
638
639
  });
639
- function f() {
640
- i.value = /* @__PURE__ */ new Date(), W = setTimeout(f, 60 * 1e3);
640
+ function g() {
641
+ i.value = /* @__PURE__ */ new Date(), W = setTimeout(g, 60 * 1e3);
641
642
  }
642
643
  function M() {
643
- W = setTimeout(f, (60 - (/* @__PURE__ */ new Date()).getSeconds()) * 1e3), f();
644
+ W = setTimeout(g, (60 - (/* @__PURE__ */ new Date()).getSeconds()) * 1e3), g();
644
645
  }
645
646
  const P = T(() => {
646
647
  if (!D.availableViews[v.value]) return 1;
647
- let g = D.availableViews[v.value].cols;
648
- return D.hasHiddenDays && ["week", "month"].includes(v.value) && (g -= D.hasHiddenDays), g;
649
- }), B = T(() => {
650
- var g;
651
- return ((g = D.availableViews[v.value]) == null ? void 0 : g.rows) || 1;
652
- }), s = T(() => P.value * B.value), l = T(() => {
648
+ let m = D.availableViews[v.value].cols;
649
+ return D.hasHiddenDays && ["week", "month"].includes(v.value) && (m -= D.hasHiddenDays), m;
650
+ }), A = T(() => {
651
+ var m;
652
+ return ((m = D.availableViews[v.value]) == null ? void 0 : m.rows) || 1;
653
+ }), s = T(() => P.value * A.value), l = T(() => {
653
654
  if (v.value === "month") {
654
- let g = $.value.getDay() || 7;
655
- return D.startWeekOnSunday && !D.hideWeekdays[7] && (g += 1), D.viewDayOffset && (g -= D.viewDayOffset), n.subtractDays($.value, g - 1);
655
+ let m = Y.value.getDay() || 7;
656
+ return D.startWeekOnSunday && !D.hideWeekdays[7] && (m += 1), D.viewDayOffset && (m -= D.viewDayOffset), n.subtractDays(Y.value, m - 1);
656
657
  }
657
658
  if (v.value === "week") {
658
- const g = "1234567".split("").filter((R) => !Object.keys(D.hideWeekdays).includes(R));
659
- let z = Math.min(...g);
660
- return D.startWeekOnSunday && !D.hideWeekdays[7] && (z = 1), D.viewDayOffset && (z += D.viewDayOffset), n.addDays($.value, z - 1);
659
+ const m = "1234567".split("").filter((X) => !Object.keys(D.hideWeekdays).includes(X));
660
+ let z = Math.min(...m);
661
+ return D.startWeekOnSunday && !D.hideWeekdays[7] && (z = 1), D.viewDayOffset && (z += D.viewDayOffset), n.addDays(Y.value, z - 1);
661
662
  }
662
- return $.value;
663
+ return Y.value;
663
664
  }), _ = T(() => {
664
- const g = [], z = ["days", "week", "month"].includes(v.value);
665
- let R = 0;
666
- for (let X = 0; X < s.value + R; X++)
665
+ const m = [], z = ["days", "week", "month"].includes(v.value);
666
+ let X = 0;
667
+ for (let I = 0; I < s.value + X; I++)
667
668
  switch (v.value) {
668
669
  case "day":
669
670
  case "days":
670
671
  case "week":
671
672
  case "month": {
672
- const ve = n.addDays(l.value, X), We = ve.getDay() || 7;
673
- if (z && D.hasHiddenDays && D.hideWeekdays[We]) {
674
- R++;
673
+ const ve = n.addDays(l.value, I), Ne = ve.getDay() || 7;
674
+ if (z && D.hasHiddenDays && D.hideWeekdays[Ne]) {
675
+ X++;
675
676
  continue;
676
677
  }
677
- const Ce = new Date(ve);
678
- Ce.setHours(23, 59, 59, 999), g.push({ start: ve, startFormatted: n.formatDate(ve), end: Ce });
678
+ const Se = new Date(ve);
679
+ Se.setHours(23, 59, 59, 999), m.push({ start: ve, startFormatted: n.formatDate(ve), end: Se });
679
680
  break;
680
681
  }
681
682
  case "year":
682
- g.push({
683
- start: new Date(l.value.getFullYear(), X, 1, 0, 0, 0, 0),
684
- end: new Date(l.value.getFullYear(), X + 1, 0, 23, 59, 59, 999)
683
+ m.push({
684
+ start: new Date(l.value.getFullYear(), I, 1, 0, 0, 0, 0),
685
+ end: new Date(l.value.getFullYear(), I + 1, 0, 23, 59, 59, 999)
685
686
  });
686
687
  break;
687
688
  case "years":
688
- g.push({
689
- start: new Date(l.value.getFullYear() + X, 0, 1, 0, 0, 0, 0),
690
- end: new Date(l.value.getFullYear() + X + 1, 0, 0, 23, 59, 59, 999)
689
+ m.push({
690
+ start: new Date(l.value.getFullYear() + I, 0, 1, 0, 0, 0, 0),
691
+ end: new Date(l.value.getFullYear() + I + 1, 0, 0, 23, 59, 59, 999)
691
692
  });
692
693
  break;
693
694
  }
694
- return g;
695
- }), t = T(() => _.value[_.value.length - 1].end), V = ie("right"), H = T(() => {
696
- const g = Object.keys(D.availableViews);
697
- return g[g.indexOf(v.value) + 1];
698
- }), U = T(() => {
699
- const g = Object.keys(D.availableViews);
700
- return g[g.indexOf(v.value) - 1];
695
+ return m;
696
+ }), t = T(() => _.value[_.value.length - 1].end), V = ie("right"), F = T(() => {
697
+ const m = Object.keys(D.availableViews);
698
+ return m[m.indexOf(v.value) + 1];
699
+ }), J = T(() => {
700
+ const m = Object.keys(D.availableViews);
701
+ return m[m.indexOf(v.value) - 1];
701
702
  });
702
- function K(g, z, R = !1) {
703
- if (!z || !z[g]) return g + 1;
704
- const X = z[g];
705
- return R && typeof X == "string" ? X.substring(0, 3) : X;
703
+ function K(m, z, X = !1) {
704
+ if (!z || !z[m]) return m + 1;
705
+ const I = z[m];
706
+ return X && typeof I == "string" ? I.substring(0, 3) : I;
706
707
  }
707
- function ue(g, z, R) {
708
- const { monthsArray: X, monthBeforeDay: ve, canTruncate: We, xs: Ce } = R, Me = g.getMonth(), Ye = g.getFullYear(), Ee = z.getMonth(), He = z.getFullYear(), Be = Me !== Ee, lt = Ye !== He, ke = We && (Ce || Be), Le = g.getDate(), ze = z.getDate();
709
- return lt ? ve ? `${K(Me, X, ke)} ${Le}, ${Ye} - ${K(Ee, X, ke)} ${ze}, ${He}` : `${Le} ${K(Me, X, ke)} ${Ye} - ${ze} ${K(Ee, X, ke)} ${He}` : Be ? ve ? `${K(Me, X, ke)} ${Le} - ${K(Ee, X, ke)} ${ze}, ${Ye}` : `${Le} ${K(Me, X, ke)} - ${ze} ${K(Ee, X, ke)} ${Ye}` : ve ? `${K(Me, X, ke)} ${Le}-${ze}, ${Ye}` : `${Le}-${ze} ${K(Me, X, ke)} ${Ye}`;
708
+ function ue(m, z, X) {
709
+ const { monthsArray: I, monthBeforeDay: ve, canTruncate: Ne, xs: Se } = X, Me = m.getMonth(), $e = m.getFullYear(), Ye = z.getMonth(), Pe = z.getFullYear(), We = Me !== Ye, Dt = $e !== Pe, _e = Ne && (Se || We), Fe = m.getDate(), ze = z.getDate();
710
+ return Dt ? ve ? `${K(Me, I, _e)} ${Fe}, ${$e} - ${K(Ye, I, _e)} ${ze}, ${Pe}` : `${Fe} ${K(Me, I, _e)} ${$e} - ${ze} ${K(Ye, I, _e)} ${Pe}` : We ? ve ? `${K(Me, I, _e)} ${Fe} - ${K(Ye, I, _e)} ${ze}, ${$e}` : `${Fe} ${K(Me, I, _e)} - ${ze} ${K(Ye, I, _e)} ${$e}` : ve ? `${K(Me, I, _e)} ${Fe}-${ze}, ${$e}` : `${Fe}-${ze} ${K(Me, I, _e)} ${$e}`;
710
711
  }
711
712
  const ae = T(() => {
712
- const { dateFormat: g, months: z, monthsGenitive: R, week: X, truncations: ve } = h, We = D.locale, Ce = ve !== !1, Me = g.indexOf("M") < g.indexOf("D"), Ye = R && We === "el" ? R : z;
713
+ const { dateFormat: m, months: z, monthsGenitive: X, week: I, truncations: ve } = h, Ne = D.locale, Se = ve !== !1, Me = m.indexOf("M") < m.indexOf("D"), $e = X && Ne === "el" ? X : z;
713
714
  switch (v.value) {
714
715
  case "day":
715
- return n.formatDate(l.value, g);
716
+ return n.formatDate(l.value, m);
716
717
  case "days":
717
718
  case "week": {
718
- const Ee = {
719
- monthsArray: Ye,
719
+ const Ye = {
720
+ monthsArray: $e,
720
721
  monthBeforeDay: Me,
721
- canTruncate: Ce,
722
+ canTruncate: Se,
722
723
  xs: D.xs
723
724
  };
724
- let He = ue(l.value, t.value, Ee);
725
+ let Pe = ue(l.value, t.value, Ye);
725
726
  if (v.value === "week") {
726
- const Be = n.getWeek(
727
+ const We = n.getWeek(
727
728
  l.value,
728
729
  D.startWeekOnSunday && !D.hideWeekdays[7]
729
730
  );
730
- He += ` <small>${X} ${Be}</small>`;
731
+ Pe += ` <small>${I} ${We}</small>`;
731
732
  }
732
- return He;
733
+ return Pe;
733
734
  }
734
735
  case "month": {
735
- const Ee = `${D.xs && Ce ? "MMM" : "MMMM"} YYYY`;
736
- return n.formatDate(G.value, Ee);
736
+ const Ye = `${D.xs && Se ? "MMM" : "MMMM"} YYYY`;
737
+ return n.formatDate(U.value, Ye);
737
738
  }
738
739
  case "year":
739
740
  return l.value.getFullYear();
@@ -741,50 +742,50 @@ const st = (D, n) => {
741
742
  return `${l.value.getFullYear()} - ${o.value.getFullYear()}`;
742
743
  }
743
744
  });
744
- function re() {
745
- switch ($.value = new Date(m.value || i.value), $.value.setHours(0, 0, 0, 0), v.value) {
745
+ function ne() {
746
+ switch (console.log("👨‍👩‍👧", "updateView!!!!"), Y.value = new Date(f.value || i.value), Y.value.setHours(0, 0, 0, 0), v.value) {
746
747
  case "day":
747
748
  break;
748
749
  case "days":
749
750
  break;
750
751
  case "week":
751
- $.value = n.getPreviousFirstDayOfWeek($.value, D.startWeekOnSunday && !D.hideWeekdays[7]);
752
+ Y.value = n.getPreviousFirstDayOfWeek(Y.value, D.startWeekOnSunday && !D.hideWeekdays[7]);
752
753
  break;
753
754
  case "month":
754
- $.value = new Date($.value.getFullYear(), $.value.getMonth(), 1, 0, 0, 0, 0);
755
+ Y.value = new Date(Y.value.getFullYear(), Y.value.getMonth(), 1, 0, 0, 0, 0);
755
756
  break;
756
757
  case "year":
757
- $.value = new Date($.value.getFullYear(), 0, 1, 0, 0, 0, 0);
758
+ Y.value = new Date(Y.value.getFullYear(), 0, 1, 0, 0, 0, 0);
758
759
  break;
759
760
  case "years":
760
- $.value = new Date($.value.getFullYear() - $.value.getFullYear() % s.value, 0, 1, 0, 0, 0, 0);
761
+ Y.value = new Date(Y.value.getFullYear() - Y.value.getFullYear() % s.value, 0, 1, 0, 0, 0, 0);
761
762
  break;
762
763
  }
763
764
  D.ready && r("view-change", {
764
765
  id: v.value,
765
766
  title: ae.value,
766
- start: G.value,
767
+ start: U.value,
767
768
  end: o.value,
768
769
  extendedStart: u.value,
769
770
  extendedEnd: e.value,
770
771
  cellDates: _.value,
771
772
  containsToday: d.value,
772
- events: x.value
773
+ events: B.value
773
774
  }), i.value = /* @__PURE__ */ new Date();
774
775
  }
775
- function he(g) {
776
- const z = v.value, R = D.availableViews[z];
777
- g[z] && JSON.stringify(g[z]) === JSON.stringify(R) || re();
776
+ function ge(m) {
777
+ const z = v.value, X = D.availableViews[z];
778
+ m[z] && JSON.stringify(m[z]) === JSON.stringify(X) || ne();
778
779
  }
779
- function q(g, z = !0) {
780
- const R = Object.keys(D.availableViews);
781
- v.value !== g && (R.includes(g) ? (V.value = R.indexOf(g) < R.indexOf(v.value) ? "left" : "right", v.value = g, r("update:view", g), re()) : console.warn(`Vue Cal: the \`${g}\` view is not available.`));
780
+ function G(m, z = !0) {
781
+ const X = Object.keys(D.availableViews);
782
+ v.value !== m && (X.includes(m) ? (V.value = X.indexOf(m) < X.indexOf(v.value) ? "left" : "right", v.value = m, r("update:view", m), ne()) : console.warn(`Vue Cal: the \`${m}\` view is not available.`));
782
783
  }
783
784
  function ce() {
784
- H.value ? q(H.value) : console.warn("Vue Cal: no broader view is available.");
785
+ F.value ? G(F.value) : console.warn("Vue Cal: no broader view is available.");
785
786
  }
786
- function ee() {
787
- U.value ? q(U.value) : console.warn("Vue Cal: no narrower view is available.");
787
+ function x() {
788
+ J.value ? G(J.value) : console.warn("Vue Cal: no narrower view is available.");
788
789
  }
789
790
  function oe() {
790
791
  k(!1);
@@ -792,83 +793,80 @@ const st = (D, n) => {
792
793
  function a() {
793
794
  k(!0);
794
795
  }
795
- function k(g = !0) {
796
- let z = new Date(m.value);
796
+ function k(m = !0) {
797
+ let z = new Date(f.value);
797
798
  switch (v.value) {
798
799
  case "day":
799
800
  case "days":
800
- g ? z = n.addDays(t.value, 1) : z = n.subtractDays(l.value, s.value);
801
+ m ? z = n.addDays(t.value, 1) : z = n.subtractDays(l.value, s.value);
801
802
  break;
802
803
  case "week": {
803
- g ? (z = n.addDays(e.value, 1), z.setHours(0, 0, 0, 0)) : z = n.subtractDays(u.value, s.value);
804
+ m ? (z = n.addDays(e.value, 1), z.setHours(0, 0, 0, 0)) : z = n.subtractDays(u.value, s.value);
804
805
  break;
805
806
  }
806
807
  case "month": {
807
- const R = g ? 1 : -1;
808
- z = new Date(z.getFullYear(), z.getMonth() + R, 1, 0, 0, 0, 0);
808
+ const X = m ? 1 : -1;
809
+ z = new Date(z.getFullYear(), z.getMonth() + X, 1, 0, 0, 0, 0);
809
810
  break;
810
811
  }
811
812
  case "year": {
812
- const R = g ? 1 : -1;
813
- z = new Date(z.getFullYear() + R, 1, 1, 0, 0, 0, 0);
813
+ const X = m ? 1 : -1;
814
+ z = new Date(z.getFullYear() + X, 1, 1, 0, 0, 0, 0);
814
815
  break;
815
816
  }
816
817
  case "years": {
817
- const R = g ? s.value : -s.value;
818
- z = new Date(z.getFullYear() + R, 1, 1, 0, 0, 0, 0);
818
+ const X = m ? s.value : -s.value;
819
+ z = new Date(z.getFullYear() + X, 1, 1, 0, 0, 0, 0);
819
820
  break;
820
821
  }
821
822
  }
822
- A(z);
823
+ R(z);
823
824
  }
824
825
  function y() {
825
- const g = /* @__PURE__ */ new Date();
826
- g.setHours(0, 0, 0, 0), A(g);
826
+ const m = /* @__PURE__ */ new Date();
827
+ m.setHours(0, 0, 0, 0), R(m);
827
828
  }
828
- function A(g, z = !0, R = !1) {
829
- if (!n.isValid(g)) return console.warn("Vue Cal: can't navigate to the given date: invalid date provided to `updateViewDate(date)`.");
830
- let [X, ve] = [l.value, t.value];
831
- v.value === "month" && ([X, ve] = [G.value, o.value]), (!n.isInRange(g, X, ve) || R) && (g.setHours(0, 0, 0, 0), V.value = g.getTime() < X.getTime() ? "left" : "right", m.value = g, z && r("update:viewDate", g), re());
829
+ function R(m, z = !0, X = !1) {
830
+ if (!n.isValid(m)) return console.warn("Vue Cal: can't navigate to the given date: invalid date provided to `updateViewDate(date)`.");
831
+ let [I, ve] = [l.value, t.value];
832
+ v.value === "month" && ([I, ve] = [U.value, o.value]), (!n.isInRange(m, I, ve) || X) && (m.setHours(0, 0, 0, 0), V.value = m.getTime() < I.getTime() ? "left" : "right", f.value = m, z && r("update:viewDate", m), ne());
832
833
  }
833
- function Q(g, z = !0) {
834
- if (!n.isValid(g)) return console.warn("Vue Cal: can't update the selected date: invalid date provided to `updateSelectedDate(date)`.");
835
- const { isValid: R, isSameDate: X } = n;
836
- (!C.value || !R(C.value) || !X(g, C.value)) && (g.setHours(0, 0, 0, 0), C.value = g, z && r("update:selectedDate", g));
834
+ function Q(m, z = !0) {
835
+ if (!n.isValid(m)) return console.warn("Vue Cal: can't update the selected date: invalid date provided to `updateSelectedDate(date)`.");
836
+ const { isValid: X, isSameDate: I } = n;
837
+ (!C.value || !X(C.value) || !I(m, C.value)) && (m.setHours(0, 0, 0, 0), C.value = m, z && r("update:selectedDate", m));
837
838
  }
838
- function c(g) {
839
- !g && !$.value.getDay() ? A(n.addDays($.value, 1), !0, !0) : (V.value = "left", re());
839
+ function c(m) {
840
+ !m && !Y.value.getDay() ? R(n.addDays(Y.value, 1), !0, !0) : (V.value = "left", ne());
840
841
  }
841
- function w(g) {
842
- g && D.startWeekOnSunday && !$.value.getDay() ? A(n.addDays($.value, 1), !0, !0) : !g && D.startWeekOnSunday && $.value.getDay() === 1 && A(n.subtractDays($.value, 1), !0, !0);
842
+ function w() {
843
+ ne();
843
844
  }
844
- function S() {
845
- console.log("toggling weekdays", D.hideWeekdays);
845
+ function S(m) {
846
+ var I;
847
+ const z = (I = b.value) == null ? void 0 : I.querySelector(".vuecal__scrollable"), X = m ? m * D.timeCellHeight / D.timeStep : 0;
848
+ z == null || z.scrollTo({ top: X, behavior: "smooth" });
846
849
  }
847
- function Y(g) {
848
- var X;
849
- const z = (X = b.value) == null ? void 0 : X.querySelector(".vuecal__scrollable"), R = g ? g * D.timeCellHeight / D.timeStep : 0;
850
- z == null || z.scrollTo({ top: R, behavior: "smooth" });
850
+ function $() {
851
+ const m = /* @__PURE__ */ new Date();
852
+ S(m.getHours() * 60 + m.getMinutes());
851
853
  }
852
854
  function N() {
853
- const g = /* @__PURE__ */ new Date();
854
- Y(g.getHours() * 60 + g.getMinutes());
855
+ S(0);
855
856
  }
856
- function I() {
857
- Y(0);
858
- }
859
- const x = T(() => p.getViewEvents(_.value)), de = p.createEvent, ye = p.deleteEvent;
860
- return me(() => D.view, (g) => q(g, !1)), me(() => D.availableViews, he), me(() => D.datePicker, () => q("month", !1)), me(() => D.viewDate, (g) => A(g, !1)), me(() => D.selectedDate, (g) => Q(g, !1)), me(() => D.startWeekOnSunday, (g) => c(g)), me(() => D.hideWeekends, (g) => w(g)), me(() => D.hideWeekdays, S), me(() => s.value, () => {
857
+ const B = T(() => p.getViewEvents(_.value)), ee = p.createEvent, de = p.deleteEvent;
858
+ return he(() => D.view, (m) => G(m, !1)), he(() => D.availableViews, ge), he(() => D.datePicker, () => G("month", !1)), he(() => D.viewDate, (m) => R(m, !1)), he(() => D.selectedDate, (m) => Q(m, !1)), he(() => D.startWeekOnSunday, (m) => c(m)), he(() => D.hideWeekdays, w), he(() => s.value, () => {
861
859
  s.value > 90 && console.warn("Vue Cal: high cell count detected. Performance may degrade when interactions are enabled.");
862
- }), me(() => D.watchRealTime, (g) => {
863
- g && D.time ? M() : W = clearTimeout(W);
864
- }), re(), D.time && D.watchRealTime && M(), Xe(() => W = clearTimeout(W)), {
860
+ }), he(() => D.watchRealTime, (m) => {
861
+ m && D.time ? M() : W = clearTimeout(W);
862
+ }), ne(), D.time && D.watchRealTime && M(), Re(() => W = clearTimeout(W)), {
865
863
  now: i,
866
864
  id: v,
867
- broaderView: H,
868
- narrowerView: U,
865
+ broaderView: F,
866
+ narrowerView: J,
869
867
  title: ae,
870
- viewDate: m,
871
- start: G,
868
+ viewDate: f,
869
+ start: U,
872
870
  end: o,
873
871
  extendedStart: u,
874
872
  // Full range, including out of scope month days, and hidden leading/trailing days.
@@ -880,26 +878,26 @@ const st = (D, n) => {
880
878
  selectedDate: C,
881
879
  cellDates: _,
882
880
  cols: P,
883
- rows: B,
881
+ rows: A,
884
882
  // All the events are stored and indexed in the events object of the eventsManager.
885
883
  // The following events array is only a subset of visible ones, plus any potential recurring
886
884
  // and multi-day events.
887
- events: x,
885
+ events: B,
888
886
  transitionDirection: V,
889
- switch: q,
887
+ switch: G,
890
888
  broader: ce,
891
- narrower: ee,
889
+ narrower: x,
892
890
  previous: oe,
893
891
  next: a,
894
892
  navigate: k,
895
893
  goToToday: y,
896
- updateViewDate: A,
894
+ updateViewDate: R,
897
895
  updateSelectedDate: Q,
898
- scrollToCurrentTime: N,
899
- scrollToTime: Y,
900
- scrollTop: I,
901
- createEvent: de,
902
- deleteEvent: ye,
896
+ scrollToCurrentTime: $,
897
+ scrollToTime: S,
898
+ scrollTop: N,
899
+ createEvent: ee,
900
+ deleteEvent: de,
903
901
  // Getters.
904
902
  get isDay() {
905
903
  return v.value === "day";
@@ -920,22 +918,54 @@ const st = (D, n) => {
920
918
  return v.value === "years";
921
919
  }
922
920
  };
923
- }, Fe = $e({
924
- texts: { ...fe.texts },
921
+ }, st = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], lt = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], rt = "Years", ot = "Year", it = "Month", ut = "Week", ct = "Days", dt = "Day", vt = "Today", mt = "No Event", ft = "All day", gt = "Delete", ht = "Create an event", yt = "dddd, MMMM D, YYYY", Ze = {
922
+ weekDays: st,
923
+ months: lt,
924
+ years: rt,
925
+ year: ot,
926
+ month: it,
927
+ week: ut,
928
+ days: ct,
929
+ day: dt,
930
+ today: vt,
931
+ noEvent: mt,
932
+ allDay: ft,
933
+ deleteEvent: gt,
934
+ createEvent: ht,
935
+ dateFormat: yt
936
+ }, Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
937
+ __proto__: null,
938
+ allDay: ft,
939
+ createEvent: ht,
940
+ dateFormat: yt,
941
+ day: dt,
942
+ days: ct,
943
+ default: Ze,
944
+ deleteEvent: gt,
945
+ month: it,
946
+ months: lt,
947
+ noEvent: mt,
948
+ today: vt,
949
+ week: ut,
950
+ weekDays: st,
951
+ year: ot,
952
+ years: rt
953
+ }, Symbol.toStringTag, { value: "Module" })), He = Te({
954
+ texts: { ...me.texts },
925
955
  // Make texts reactive before a locale is loaded.
926
- dateUtils: st(fe.texts, nt)
956
+ dateUtils: nt(me.texts, Ze)
927
957
  // Some Date utils functions need localized texts.
928
- }), yt = ({ props: D, emit: n, attrs: r, vuecalEl: h, uid: p }) => {
929
- const b = $e({
958
+ }), Vt = ({ props: D, emit: n, attrs: r, vuecalEl: h, uid: p }) => {
959
+ const b = Te({
930
960
  uid: p,
931
961
  // The Vuecal instance unique ID, used for dnd source-target identification.
932
962
  emit: n,
933
- texts: { ...Fe.texts },
963
+ texts: { ...He.texts },
934
964
  // Make texts reactive before a locale is loaded.
935
965
  // The date utils composable.
936
966
  // A class/composable is needed in order to access the user locale in all the methods, and
937
967
  // independently of other potential Vue Cal instances on the same page.
938
- dateUtils: { ...Fe.dateUtils },
968
+ dateUtils: { ...He.dateUtils },
939
969
  now: /* @__PURE__ */ new Date(),
940
970
  config: {},
941
971
  eventsManager: {},
@@ -950,8 +980,8 @@ const st = (D, n) => {
950
980
  isResizingEvent: !1
951
981
  }
952
982
  });
953
- return b.dateUtils = st(Object.assign(fe.texts, b.texts), nt), b.config = mt(b, D, r), b.eventsManager = gt(b), b.view = ht(b, h), b.dnd = ft(b), b;
954
- }, Dt = 24 * 60, pt = {
983
+ return b.dateUtils = nt(Object.assign(me.texts, b.texts), Ze), b.config = $t(b, D, r), b.eventsManager = Et(b), b.view = St(b, h), b.dnd = Yt(b), b;
984
+ }, Ot = 24 * 60, jt = {
955
985
  allDayEvents: { type: [Boolean, String], default: !1 },
956
986
  // Coming soon.
957
987
  // avoidEventOverlap: { type: Boolean, default: undefined }, // Coming soon.
@@ -1015,7 +1045,7 @@ const st = (D, n) => {
1015
1045
  // Start time of the time column, in minutes.
1016
1046
  timeStep: { type: Number, default: 60 },
1017
1047
  // Step amount for the time in the time column, in minutes.
1018
- timeTo: { type: Number, default: Dt },
1048
+ timeTo: { type: Number, default: Ot },
1019
1049
  // End time of the time column, in minutes.
1020
1050
  titleBar: { type: Boolean, default: !0 },
1021
1051
  // Show or hide the header title bar.
@@ -1047,61 +1077,61 @@ const st = (D, n) => {
1047
1077
  // minScheduleWidth: { type: Number, default: 0 },
1048
1078
  // overlapsPerTimeStep: { type: Boolean, default: false },
1049
1079
  // resizeX: { type: Boolean, default: false },
1050
- }, wt = { class: "vuecal__header" }, _t = {
1080
+ }, Pt = { class: "vuecal__header" }, Ft = {
1051
1081
  key: 0,
1052
1082
  class: "vuecal__views-bar"
1053
- }, kt = ["onClick", "innerHTML"], bt = {
1083
+ }, zt = ["onClick", "innerHTML"], Ht = {
1054
1084
  key: 1,
1055
1085
  class: "vuecal__title-bar"
1056
- }, Tt = { class: "vuecal__transition-wrap" }, $t = ["disabled", "innerHTML"], Mt = {
1086
+ }, Lt = { class: "vuecal__transition-wrap" }, Nt = ["disabled", "innerHTML"], Wt = {
1057
1087
  __name: "header",
1058
1088
  setup(D) {
1059
- const n = Ne("vuecal"), { view: r, config: h } = n, p = () => {
1089
+ const n = Le("vuecal"), { view: r, config: h } = n, p = () => {
1060
1090
  h.clickToNavigate && r.broader();
1061
1091
  }, b = T(() => h.clickToNavigate ? { click: p } : {});
1062
- return (L, v) => (E(), j("div", wt, [
1063
- F(L.$slots, "header", {
1092
+ return (H, v) => (E(), j("div", Pt, [
1093
+ L(H.$slots, "header", {
1064
1094
  view: O(r),
1065
1095
  availableViews: O(h).availableViews,
1066
1096
  vuecal: O(n)
1067
1097
  }),
1068
- L.$slots.header ? Z("", !0) : (E(), j(te, { key: 0 }, [
1069
- O(h).viewsBar ? (E(), j("div", _t, [
1070
- (E(!0), j(te, null, we(O(h).availableViews, (C, i) => (E(), j("button", {
1071
- class: _e(["vuecal__view-button", { "vuecal__view-button--active": O(r).id === i }]),
1072
- onClick: (m) => O(r).switch(i),
1098
+ H.$slots.header ? q("", !0) : (E(), j(te, { key: 0 }, [
1099
+ O(h).viewsBar ? (E(), j("div", Ft, [
1100
+ (E(!0), j(te, null, pe(O(h).availableViews, (C, i) => (E(), j("button", {
1101
+ class: we(["vuecal__view-button", { "vuecal__view-button--active": O(r).id === i }]),
1102
+ onClick: (f) => O(r).switch(i),
1073
1103
  innerHTML: O(n).texts[i],
1074
1104
  type: "button"
1075
- }, null, 10, kt))), 256))
1076
- ])) : Z("", !0),
1077
- O(h).titleBar ? (E(), j("nav", bt, [
1078
- ge("button", {
1079
- class: _e(["vuecal__nav vuecal__nav--prev", { "vuecal__nav--default": !L.$slots["previous-button"] }]),
1105
+ }, null, 10, zt))), 256))
1106
+ ])) : q("", !0),
1107
+ O(h).titleBar ? (E(), j("nav", Ht, [
1108
+ fe("button", {
1109
+ class: we(["vuecal__nav vuecal__nav--prev", { "vuecal__nav--default": !H.$slots["previous-button"] }]),
1080
1110
  onClick: v[0] || (v[0] = (...C) => O(r).previous && O(r).previous(...C)),
1081
1111
  type: "button"
1082
1112
  }, [
1083
- F(L.$slots, "previous-button")
1113
+ L(H.$slots, "previous-button")
1084
1114
  ], 2),
1085
- ge("div", Tt, [
1086
- Oe(Ge, {
1115
+ fe("div", Lt, [
1116
+ Ve(Xe, {
1087
1117
  name: `vuecal-slide-fade--${O(r).transitionDirection}`
1088
1118
  }, {
1089
- default: J(() => [
1119
+ default: Z(() => [
1090
1120
  (E(), j("div", {
1091
1121
  key: O(r).id + O(r).start.getTime()
1092
1122
  }, [
1093
- L.$slots.title ? (E(), Se(Ke(O(h).clickToNavigate && O(r).broaderView ? "button" : "div"), De({
1123
+ H.$slots.title ? (E(), Ee(Ke(O(h).clickToNavigate && O(r).broaderView ? "button" : "div"), ye({
1094
1124
  key: 0,
1095
1125
  class: "vuecal__title"
1096
- }, Ie(b.value)), {
1097
- default: J(() => [
1098
- F(L.$slots, "title", ne(se(O(r))))
1126
+ }, Be(b.value)), {
1127
+ default: Z(() => [
1128
+ L(H.$slots, "title", se(le(O(r))))
1099
1129
  ]),
1100
1130
  _: 3
1101
- }, 16)) : (E(), Se(Ke(O(h).clickToNavigate && O(r).broaderView ? "button" : "div"), De({
1131
+ }, 16)) : (E(), Ee(Ke(O(h).clickToNavigate && O(r).broaderView ? "button" : "div"), ye({
1102
1132
  key: 1,
1103
1133
  class: "vuecal__title"
1104
- }, Ie(b.value), {
1134
+ }, Be(b.value), {
1105
1135
  innerHTML: O(r).title
1106
1136
  }), null, 16, ["innerHTML"]))
1107
1137
  ]))
@@ -1110,47 +1140,47 @@ const st = (D, n) => {
1110
1140
  }, 8, ["name"])
1111
1141
  ]),
1112
1142
  O(h).todayButton ? (E(), j(te, { key: 0 }, [
1113
- L.$slots["today-button"] ? F(L.$slots, "today-button", {
1143
+ H.$slots["today-button"] ? L(H.$slots, "today-button", {
1114
1144
  key: 0,
1115
1145
  navigate: () => !O(r).containsToday && O(r).goToToday(),
1116
1146
  active: O(r).containsToday
1117
1147
  }) : (E(), j("button", {
1118
1148
  key: 1,
1119
- class: _e(["vuecal__nav vuecal__nav--today vuecal__nav--default", { "vuecal__nav--active": O(r).containsToday }]),
1149
+ class: we(["vuecal__nav vuecal__nav--today vuecal__nav--default", { "vuecal__nav--active": O(r).containsToday }]),
1120
1150
  onClick: v[1] || (v[1] = (C) => !O(r).containsToday && O(r).goToToday()),
1121
1151
  disabled: !!O(r).containsToday,
1122
1152
  type: "button",
1123
1153
  innerHTML: O(n).texts.today
1124
- }, null, 10, $t))
1125
- ], 64)) : Z("", !0),
1126
- ge("button", {
1127
- class: _e(["vuecal__nav vuecal__nav--next", { "vuecal__nav--default": !L.$slots["next-button"] }]),
1154
+ }, null, 10, Nt))
1155
+ ], 64)) : q("", !0),
1156
+ fe("button", {
1157
+ class: we(["vuecal__nav vuecal__nav--next", { "vuecal__nav--default": !H.$slots["next-button"] }]),
1128
1158
  onClick: v[2] || (v[2] = (...C) => O(r).next && O(r).next(...C)),
1129
1159
  type: "button"
1130
1160
  }, [
1131
- F(L.$slots, "next-button")
1161
+ L(H.$slots, "next-button")
1132
1162
  ], 2)
1133
- ])) : Z("", !0)
1163
+ ])) : q("", !0)
1134
1164
  ], 64))
1135
1165
  ]));
1136
1166
  }
1137
- }, Yt = {
1167
+ }, At = {
1138
1168
  key: 0,
1139
1169
  class: "vuecal__headings"
1140
- }, Et = {
1170
+ }, Bt = {
1141
1171
  key: 0,
1142
1172
  class: "vuecal__weekdays-headings"
1143
- }, St = ["onClick"], Ct = { class: "vuecal__weekday-day" }, Vt = {
1173
+ }, It = ["onClick"], Rt = { class: "vuecal__weekday-day" }, Xt = {
1144
1174
  key: 0,
1145
1175
  class: "vuecal__weekday-date"
1146
- }, Ot = {
1176
+ }, Ut = {
1147
1177
  key: 1,
1148
1178
  class: "vuecal__schedules-headings w-flex grow"
1149
- }, jt = ["innerHTML"], Pt = {
1179
+ }, Gt = ["innerHTML"], Jt = {
1150
1180
  __name: "headings-bar",
1151
1181
  setup(D) {
1152
- const n = Ne("vuecal"), { view: r, config: h, dateUtils: p } = n, b = T(() => h.xs ? "day-xs" : h.sm || r.isDays || r.isMonth ? "day-sm" : "day"), L = T(() => (r.isDay || r.isDays || r.isWeek || r.isMonth) && !(r.isDay && !h.schedules)), v = T(() => r.cellDates.slice(0, r.cols).map(({ start: i }) => ({
1153
- id: Re[i.getDay()],
1182
+ const n = Le("vuecal"), { view: r, config: h, dateUtils: p } = n, b = T(() => h.xs ? "day-xs" : h.sm || r.isDays || r.isMonth ? "day-sm" : "day"), H = T(() => (r.isDay || r.isDays || r.isWeek || r.isMonth) && !(r.isDay && !h.schedules)), v = T(() => r.cellDates.slice(0, r.cols).map(({ start: i }) => ({
1183
+ id: Ie[i.getDay()],
1154
1184
  date: i,
1155
1185
  dateNumber: i.getDate(),
1156
1186
  day: p.formatDate(i, "dddd"),
@@ -1162,68 +1192,68 @@ const st = (D, n) => {
1162
1192
  (r.isDays || r.isWeek) && r.updateSelectedDate(i);
1163
1193
  }
1164
1194
  };
1165
- return (i, m) => L.value ? (E(), j("div", Yt, [
1166
- O(r).isDay ? Z("", !0) : (E(), j("div", Et, [
1167
- (E(!0), j(te, null, we(v.value, ($, W) => (E(), j("div", {
1168
- class: _e(["vuecal__weekday", { "vuecal__weekday--today": $.isToday }]),
1195
+ return (i, f) => H.value ? (E(), j("div", At, [
1196
+ O(r).isDay ? q("", !0) : (E(), j("div", Bt, [
1197
+ (E(!0), j(te, null, pe(v.value, (Y, W) => (E(), j("div", {
1198
+ class: we(["vuecal__weekday", { "vuecal__weekday--today": Y.isToday }]),
1169
1199
  key: W,
1170
- onClick: (G) => C.click($.date)
1200
+ onClick: (U) => C.click(Y.date)
1171
1201
  }, [
1172
- F(i.$slots, "weekday-heading", {
1173
- label: $[b.value],
1174
- id: $.id,
1175
- date: $.date
1202
+ L(i.$slots, "weekday-heading", {
1203
+ label: Y[b.value],
1204
+ id: Y.id,
1205
+ date: Y.date
1176
1206
  }, () => [
1177
- ge("span", Ct, le($[b.value]), 1),
1178
- O(r).isMonth ? Z("", !0) : (E(), j("strong", Vt, le($.dateNumber), 1))
1207
+ fe("span", Rt, re(Y[b.value]), 1),
1208
+ O(r).isMonth ? q("", !0) : (E(), j("strong", Xt, re(Y.dateNumber), 1))
1179
1209
  ])
1180
- ], 10, St))), 128))
1210
+ ], 10, It))), 128))
1181
1211
  ])),
1182
- O(h).schedules ? (E(), j("div", Ot, [
1183
- (E(!0), j(te, null, we(v.value, ($, W) => (E(), j(te, { key: W }, [
1184
- (E(!0), j(te, null, we(O(h).schedules, (G, o) => (E(), j(te, { key: o }, [
1212
+ O(h).schedules ? (E(), j("div", Ut, [
1213
+ (E(!0), j(te, null, pe(v.value, (Y, W) => (E(), j(te, { key: W }, [
1214
+ (E(!0), j(te, null, pe(O(h).schedules, (U, o) => (E(), j(te, { key: o }, [
1185
1215
  i.$slots["schedule-heading"] ? (E(), j("div", {
1186
1216
  key: 0,
1187
- class: _e(["vuecal__schedule vuecal__schedule--heading", G.class])
1217
+ class: we(["vuecal__schedule vuecal__schedule--heading", U.class])
1188
1218
  }, [
1189
- F(i.$slots, "schedule-heading", {
1190
- schedule: G,
1219
+ L(i.$slots, "schedule-heading", {
1220
+ schedule: U,
1191
1221
  view: O(r)
1192
1222
  })
1193
1223
  ], 2)) : (E(), j("div", {
1194
1224
  key: 1,
1195
- class: _e(["vuecal__schedule vuecal__schedule--heading", G.class]),
1196
- innerHTML: G.label
1197
- }, null, 10, jt))
1225
+ class: we(["vuecal__schedule vuecal__schedule--heading", U.class]),
1226
+ innerHTML: U.label
1227
+ }, null, 10, Gt))
1198
1228
  ], 64))), 128))
1199
1229
  ], 64))), 128))
1200
- ])) : Z("", !0)
1201
- ])) : Z("", !0);
1230
+ ])) : q("", !0)
1231
+ ])) : q("", !0);
1202
1232
  }
1203
- }, Ht = { class: "vuecal__time-column" }, Lt = {
1233
+ }, qt = { class: "vuecal__time-column" }, Zt = {
1204
1234
  __name: "time-column",
1205
1235
  setup(D) {
1206
- const n = Ne("vuecal"), { config: r, texts: h } = n, p = T(() => {
1236
+ const n = Le("vuecal"), { config: r, texts: h } = n, p = T(() => {
1207
1237
  const b = [];
1208
1238
  for (let v = r.timeFrom; v < r.timeTo; v += r.timeStep) {
1209
- const C = ~~(v / 60), i = v % 60, m = h[v < 720 ? "am" : "pm"];
1239
+ const C = ~~(v / 60), i = v % 60, f = h[v < 720 ? "am" : "pm"];
1210
1240
  b.push({
1211
1241
  minutesSum: v,
1212
1242
  // The sum of hours + minutes in minutes.
1213
1243
  hours: C,
1214
1244
  minutes: i,
1215
- formatted12: `${C % 12 ? C % 12 : 12}${i ? ":" + i.toString().padStart(2, 0) : ""}${m}`,
1245
+ formatted12: `${C % 12 ? C % 12 : 12}${i ? ":" + i.toString().padStart(2, 0) : ""}${f}`,
1216
1246
  formatted24: `${C.toString().padStart(2, 0)}:${i.toString().padStart(2, 0)}`
1217
1247
  });
1218
1248
  }
1219
1249
  return b;
1220
1250
  });
1221
- return (b, L) => (E(), j("div", Ht, [
1222
- (E(!0), j(te, null, we(p.value, (v, C) => (E(), j("div", {
1251
+ return (b, H) => (E(), j("div", qt, [
1252
+ (E(!0), j(te, null, pe(p.value, (v, C) => (E(), j("div", {
1223
1253
  class: "vuecal__time-cell",
1224
1254
  key: C
1225
1255
  }, [
1226
- F(b.$slots, "time-cell", {
1256
+ L(b.$slots, "time-cell", {
1227
1257
  index: C,
1228
1258
  minutes: v.minutes,
1229
1259
  hours: v.hours,
@@ -1231,22 +1261,22 @@ const st = (D, n) => {
1231
1261
  format12: v.formatted12,
1232
1262
  format24: v.formatted24
1233
1263
  }, () => [
1234
- ge("label", null, le(O(r).twelveHour ? v.formatted12 : v.formatted24), 1)
1264
+ fe("label", null, re(O(r).twelveHour ? v.formatted12 : v.formatted24), 1)
1235
1265
  ])
1236
1266
  ]))), 128))
1237
1267
  ]));
1238
1268
  }
1239
- }, zt = ["draggable"], Ft = { class: "vuecal__event-details" }, Nt = { class: "vuecal__event-title" }, Wt = {
1269
+ }, Kt = ["draggable"], Qt = { class: "vuecal__event-details" }, xt = { class: "vuecal__event-title" }, ea = {
1240
1270
  key: 0,
1241
1271
  class: "vuecal__event-time"
1242
- }, Bt = ["innerHTML"], at = {
1272
+ }, ta = ["innerHTML"], at = {
1243
1273
  __name: "event",
1244
1274
  props: {
1245
1275
  event: { type: Object, required: !0 }
1246
1276
  },
1247
1277
  emits: ["event-drag-start", "event-drag-end", "event-resize-start", "event-resize-end"],
1248
1278
  setup(D, { emit: n }) {
1249
- const { config: r, view: h, dnd: p, touch: b, dateUtils: L } = Ne("vuecal"), v = D, C = ie(null), i = $e(v.event), m = $e({
1279
+ const { config: r, view: h, dnd: p, touch: b, dateUtils: H } = Le("vuecal"), v = D, C = ie(null), i = Te(v.event), f = Te({
1250
1280
  dragging: !1,
1251
1281
  resizing: !1,
1252
1282
  fromResizer: !1,
@@ -1280,9 +1310,9 @@ const st = (D, n) => {
1280
1310
  cellEl: null,
1281
1311
  // Store the cell DOM node for a more efficient resizing calc in mousemove/touchmove.
1282
1312
  schedule: null
1283
- }), $ = T(() => r.editableEvents.drag && i.draggable !== !1 && !i.background), W = T(() => r.time && r.editableEvents.resize && i.resizable !== !1 && !i.background);
1313
+ }), Y = T(() => r.editableEvents.drag && i.draggable !== !1 && !i.background), W = T(() => r.time && r.editableEvents.resize && i.resizable !== !1 && !i.background);
1284
1314
  T(() => r.editableEvents.delete && i.deletable !== !1 && !i.background);
1285
- const G = T(() => {
1315
+ const U = T(() => {
1286
1316
  var s, l, _;
1287
1317
  return {
1288
1318
  [`vuecal__event--${i._.id}`]: !0,
@@ -1301,7 +1331,7 @@ const st = (D, n) => {
1301
1331
  // after event deletion (event._.dragging is already false) so the event ghost does not flash in before
1302
1332
  // deletion.
1303
1333
  "vuecal__event--dragging-ghost": i._.draggingGhost,
1304
- "vuecal__event--resizing": m.resizing
1334
+ "vuecal__event--resizing": f.resizing
1305
1335
  };
1306
1336
  }), o = T(() => {
1307
1337
  const s = (h.isDay || h.isDays || h.isWeek) && r.time;
@@ -1311,15 +1341,15 @@ const st = (D, n) => {
1311
1341
  color: i.color || null
1312
1342
  };
1313
1343
  if (s) {
1314
- const _ = Math.max(r.timeFrom, i._.startMinutes), t = Math.min(r.timeTo, i._.endMinutes), V = Ve(_, r), H = Ve(t, r) - V;
1315
- l.top = `${V}%`, l.height = `${H}%`;
1344
+ const _ = Math.max(r.timeFrom, i._.startMinutes), t = Math.min(r.timeTo, i._.endMinutes), V = Ce(_, r), F = Ce(t, r) - V;
1345
+ l.top = `${V}%`, l.height = `${F}%`;
1316
1346
  }
1317
1347
  return l;
1318
1348
  }), u = T(() => {
1319
1349
  const s = { ...r.eventListeners.event };
1320
1350
  Object.entries(s).forEach(([t, V]) => {
1321
- ["resize-end"].includes(t) || (s[t] = (H) => {
1322
- H.type !== "drop" && V(H.type ? { e: H, event: i } : H);
1351
+ ["resize-end"].includes(t) || (s[t] = (F) => {
1352
+ F.type !== "drop" && V(F.type ? { e: F, event: i } : F);
1323
1353
  });
1324
1354
  });
1325
1355
  const l = { ...s };
@@ -1334,90 +1364,90 @@ const st = (D, n) => {
1334
1364
  return s.click = (t) => {
1335
1365
  var V;
1336
1366
  (V = l.click) == null || V.call(l, { e: t, event: i }), _ ? _ = clearTimeout(_) : _ = setTimeout(() => {
1337
- var H;
1338
- _ = null, (H = l["delayed-click"]) == null || H.call(l, { e: t, event: i });
1367
+ var F;
1368
+ _ = null, (F = l["delayed-click"]) == null || F.call(l, { e: t, event: i });
1339
1369
  }, 400);
1340
1370
  }, s.dblclick = (t) => {
1341
1371
  l.dblclick ? l.dblclick({ e: t, event: i }) : i.delete(1);
1342
1372
  }, s;
1343
1373
  }), e = (s) => {
1344
- var t, V, H;
1374
+ var t, V, F;
1345
1375
  const l = ((t = s.touches) == null ? void 0 : t[0]) || s;
1346
- m.fromResizer = l.target.matches(".vuecal__event-resizer, .vuecal__event-resizer *");
1376
+ f.fromResizer = l.target.matches(".vuecal__event-resizer, .vuecal__event-resizer *");
1347
1377
  const _ = C.value.getBoundingClientRect();
1348
- m.startX = (((V = s.touches) == null ? void 0 : V[0]) || s).clientX - _.left, m.startY = (((H = s.touches) == null ? void 0 : H[0]) || s).clientY - _.top, m.startPercentageX = m.startX * 100 / _.width, m.startPercentageY = m.startY * 100 / _.height, m.cellEl = C.value.closest(".vuecal__cell"), m.resizeStartDate = i.start, B(s.type === "touchstart" ? "touchmove" : "mousemove", d), B(s.type === "touchstart" ? "touchend" : "mouseup", f, { once: !0 }), m.holdTimer = setTimeout(() => {
1349
- var U, K;
1350
- m.holding = !0, (K = (U = u.value).hold) == null || K.call(U, { e: s, event: i });
1378
+ f.startX = (((V = s.touches) == null ? void 0 : V[0]) || s).clientX - _.left, f.startY = (((F = s.touches) == null ? void 0 : F[0]) || s).clientY - _.top, f.startPercentageX = f.startX * 100 / _.width, f.startPercentageY = f.startY * 100 / _.height, f.cellEl = C.value.closest(".vuecal__cell"), f.resizeStartDate = i.start, A(s.type === "touchstart" ? "touchmove" : "mousemove", d), A(s.type === "touchstart" ? "touchend" : "mouseup", g, { once: !0 }), f.holdTimer = setTimeout(() => {
1379
+ var J, K;
1380
+ f.holding = !0, (K = (J = u.value).hold) == null || K.call(J, { e: s, event: i });
1351
1381
  }, 1e3);
1352
1382
  }, d = async (s) => {
1353
- var _, t, V, H;
1383
+ var _, t, V, F;
1354
1384
  const l = ((_ = s.touches) == null ? void 0 : _[0]) || s;
1355
- if (m.fromResizer && !m.resizing && (m.resizing = !0, m.resizingOriginalEvent = { ...i, _: { ...i._ } }, b.isResizingEvent = !0, (V = (t = u.value).resizeStart) == null || V.call(t, { e: s, event: i })), m.holdTimer = clearTimeout(m.holdTimer), m.holding = !1, m.cellEl) {
1356
- const { top: U, left: K, width: ue, height: ae } = m.cellEl.getBoundingClientRect();
1357
- m.moveX = l.clientX - K, m.moveY = l.clientY - U, m.movePercentageX = m.moveX * 100 / ue, m.movePercentageY = m.moveY * 100 / ae;
1385
+ if (f.fromResizer && !f.resizing && (f.resizing = !0, f.resizingOriginalEvent = { ...i, _: { ...i._ } }, b.isResizingEvent = !0, (V = (t = u.value).resizeStart) == null || V.call(t, { e: s, event: i })), f.holdTimer = clearTimeout(f.holdTimer), f.holding = !1, f.cellEl) {
1386
+ const { top: J, left: K, width: ue, height: ae } = f.cellEl.getBoundingClientRect();
1387
+ f.moveX = l.clientX - K, f.moveY = l.clientY - J, f.movePercentageX = f.moveX * 100 / ue, f.movePercentageY = f.moveY * 100 / ae;
1358
1388
  }
1359
- if (m.fromResizer) {
1360
- const { newStart: U, newEnd: K } = M(i);
1389
+ if (f.fromResizer) {
1390
+ const { newStart: J, newEnd: K } = M(i);
1361
1391
  let ue = !0;
1362
- const { resize: ae } = (H = r.eventListeners) == null ? void 0 : H.event;
1392
+ const { resize: ae } = (F = r.eventListeners) == null ? void 0 : F.event;
1363
1393
  ae && (ue = await ae({
1364
1394
  e: s,
1365
- event: { ...i, start: U, end: K },
1366
- overlaps: i.getOverlappingEvents({ start: U, end: K })
1367
- })), ue !== !1 ? (i.start = U, i.end = K, m.resizingLastAcceptedEvent && (m.resizingLastAcceptedEvent = null)) : ae && (m.resizingLastAcceptedEvent = { ...i, _: { ...i._ } });
1395
+ event: { ...i, start: J, end: K },
1396
+ overlaps: i.getOverlappingEvents({ start: J, end: K })
1397
+ })), ue !== !1 ? (i.start = J, i.end = K, f.resizingLastAcceptedEvent && (f.resizingLastAcceptedEvent = null)) : ae && (f.resizingLastAcceptedEvent = { ...i, _: { ...i._ } });
1368
1398
  }
1369
- }, f = async (s) => {
1399
+ }, g = async (s) => {
1370
1400
  var l, _;
1371
- if (m.holdTimer = clearTimeout(m.holdTimer), m.holding = !1, m.resizing) {
1401
+ if (f.holdTimer = clearTimeout(f.holdTimer), f.holding = !1, f.resizing) {
1372
1402
  const { newStart: t, newEnd: V } = M(i);
1373
- let H = !0;
1374
- const U = u.value["resize-end"];
1375
- U && (H = await U({
1403
+ let F = !0;
1404
+ const J = u.value["resize-end"];
1405
+ J && (F = await J({
1376
1406
  e: s,
1377
1407
  event: i,
1378
- original: m.resizingOriginalEvent,
1408
+ original: f.resizingOriginalEvent,
1379
1409
  // Original event details before resizing.
1380
1410
  overlaps: i.getOverlappingEvents({ start: t, end: V })
1381
- })), i.start = H === !1 ? (m.resizingLastAcceptedEvent || m.resizingOriginalEvent).start : ((l = m.resizingLastAcceptedEvent) == null ? void 0 : l.start) || t, i.end = H === !1 ? (m.resizingLastAcceptedEvent || m.resizingOriginalEvent).end : ((_ = m.resizingLastAcceptedEvent) == null ? void 0 : _.end) || V, i._.duration < 1 && (i.start = m.resizingOriginalEvent.start, i.end = m.resizingOriginalEvent.end), b.isResizingEvent = !1;
1411
+ })), i.start = F === !1 ? (f.resizingLastAcceptedEvent || f.resizingOriginalEvent).start : ((l = f.resizingLastAcceptedEvent) == null ? void 0 : l.start) || t, i.end = F === !1 ? (f.resizingLastAcceptedEvent || f.resizingOriginalEvent).end : ((_ = f.resizingLastAcceptedEvent) == null ? void 0 : _.end) || V, i._.duration < 1 && (i.start = f.resizingOriginalEvent.start, i.end = f.resizingOriginalEvent.end), b.isResizingEvent = !1;
1382
1412
  }
1383
- document.removeEventListener(s.type === "touchend" ? "touchmove" : "mousemove", d), m.resizing = !1, m.fromResizer = !1, m.dragging = !1, m.startX = 0, m.startY = 0, m.moveX = 0, m.moveY = 0, m.startPercentageX = 0, m.startPercentageY = 0, m.movePercentageX = 0, m.movePercentageY = 0, m.cellEl = null, m.resizeStartDate = null, m.resizingOriginalEvent = null, m.resizingLastAcceptedEvent = null, m.schedule = null;
1413
+ document.removeEventListener(s.type === "touchend" ? "touchmove" : "mousemove", d), f.resizing = !1, f.fromResizer = !1, f.dragging = !1, f.startX = 0, f.startY = 0, f.moveX = 0, f.moveY = 0, f.startPercentageX = 0, f.startPercentageY = 0, f.movePercentageX = 0, f.movePercentageY = 0, f.cellEl = null, f.resizeStartDate = null, f.resizingOriginalEvent = null, f.resizingLastAcceptedEvent = null, f.schedule = null;
1384
1414
  }, M = (s) => {
1385
1415
  const l = new Date(s.start.getFullYear(), s.start.getMonth(), s.start.getDate());
1386
1416
  new Date(l).setDate(l.getDate() + 1);
1387
- let t = Pe(m.movePercentageY, r);
1417
+ let t = je(f.movePercentageY, r);
1388
1418
  if (t = Math.max(0, Math.min(t, 24 * 60)), r.snapToInterval) {
1389
- const U = t + r.snapToInterval / 2;
1390
- t = U - U % r.snapToInterval;
1419
+ const J = t + r.snapToInterval / 2;
1420
+ t = J - J % r.snapToInterval;
1391
1421
  }
1392
- let V = s.start, H = new Date(l.getTime() + t * 6e4);
1393
- return H < m.resizeStartDate && (V = H, H = m.resizeStartDate), { newStart: V, newEnd: H };
1422
+ let V = s.start, F = new Date(l.getTime() + t * 6e4);
1423
+ return F < f.resizeStartDate && (V = F, F = f.resizeStartDate), { newStart: V, newEnd: F };
1394
1424
  };
1395
- Ze(() => i._.register(C.value));
1396
- const P = [], B = (s, l, _) => {
1425
+ Je(() => i._.register(C.value));
1426
+ const P = [], A = (s, l, _) => {
1397
1427
  document.addEventListener(s, l, _), P.push({ event: s, handler: l, options: _ });
1398
1428
  };
1399
- return Xe(() => {
1429
+ return Re(() => {
1400
1430
  i._.unregister(), P.forEach(({ event: s, handler: l, options: _ }) => {
1401
1431
  document.removeEventListener(s, l, _);
1402
1432
  });
1403
- }), (s, l) => (E(), j("div", De({ class: "vuecal__event" }, Ie(u.value, !0), {
1433
+ }), (s, l) => (E(), j("div", ye({ class: "vuecal__event" }, Be(u.value, !0), {
1404
1434
  ref_key: "eventEl",
1405
1435
  ref: C,
1406
- class: G.value,
1436
+ class: U.value,
1407
1437
  style: o.value,
1408
- draggable: $.value ? "true" : void 0,
1409
- onDragstart: l[2] || (l[2] = (_) => $.value && O(p).eventDragStart(_, i)),
1410
- onDragend: l[3] || (l[3] = (_) => $.value && O(p).eventDragEnd(_, i))
1438
+ draggable: Y.value ? "true" : void 0,
1439
+ onDragstart: l[2] || (l[2] = (_) => Y.value && O(p).eventDragStart(_, i)),
1440
+ onDragend: l[3] || (l[3] = (_) => Y.value && O(p).eventDragEnd(_, i))
1411
1441
  }), [
1412
- ge("div", Ft, [
1413
- F(s.$slots, "event", { event: i }, () => [
1414
- ge("div", Nt, le(i.title), 1),
1415
- O(r).time ? (E(), j("div", Wt, le(i._[`startTimeFormatted${O(r).twelveHour ? 12 : 24}`]) + `
1416
- - ` + le(i._[`endTimeFormatted${O(r).twelveHour ? 12 : 24}`]), 1)) : Z("", !0),
1417
- ge("div", {
1442
+ fe("div", Qt, [
1443
+ L(s.$slots, "event", { event: i }, () => [
1444
+ fe("div", xt, re(i.title), 1),
1445
+ O(r).time ? (E(), j("div", ea, re(i._[`startTimeFormatted${O(r).twelveHour ? 12 : 24}`]) + `
1446
+ - ` + re(i._[`endTimeFormatted${O(r).twelveHour ? 12 : 24}`]), 1)) : q("", !0),
1447
+ fe("div", {
1418
1448
  class: "vuecal__event-content",
1419
1449
  innerHTML: i.content
1420
- }, null, 8, Bt)
1450
+ }, null, 8, ta)
1421
1451
  ])
1422
1452
  ]),
1423
1453
  W.value ? (E(), j("div", {
@@ -1425,41 +1455,41 @@ const st = (D, n) => {
1425
1455
  class: "vuecal__event-resizer",
1426
1456
  onDragstart: l[0] || (l[0] = Qe(() => {
1427
1457
  }, ["prevent", "stop"]))
1428
- }, null, 32)) : Z("", !0),
1429
- Oe(Ge, { name: "vuecal-delete-btn" }, {
1430
- default: J(() => [
1458
+ }, null, 32)) : q("", !0),
1459
+ Ve(Xe, { name: "vuecal-delete-btn" }, {
1460
+ default: Z(() => [
1431
1461
  i._.deleting ? (E(), j("div", {
1432
1462
  key: 0,
1433
1463
  class: "vuecal__event-delete",
1434
1464
  onClick: l[1] || (l[1] = Qe((_) => i.delete(3), ["stop"]))
1435
- }, "Delete")) : Z("", !0)
1465
+ }, "Delete")) : q("", !0)
1436
1466
  ]),
1437
1467
  _: 1
1438
1468
  })
1439
- ], 16, zt));
1469
+ ], 16, Kt));
1440
1470
  }
1441
- }, At = ["innerHTML"], It = ["data-schedule"], Rt = {
1471
+ }, aa = ["innerHTML"], na = ["data-schedule"], sa = {
1442
1472
  key: 1,
1443
1473
  class: "vuecal__cell-date"
1444
- }, Xt = {
1474
+ }, la = {
1445
1475
  key: 2,
1446
1476
  class: "vuecal__cell-content"
1447
- }, Gt = {
1477
+ }, ra = {
1448
1478
  key: 3,
1449
1479
  class: "vuecal__cell-events"
1450
- }, qt = {
1480
+ }, oa = {
1451
1481
  key: 1,
1452
1482
  class: "vuecal__cell-date"
1453
- }, Ut = {
1483
+ }, ia = {
1454
1484
  key: 2,
1455
1485
  class: "vuecal__cell-content"
1456
- }, Zt = {
1486
+ }, ua = {
1457
1487
  key: 3,
1458
1488
  class: "vuecal__cell-events"
1459
- }, Jt = {
1489
+ }, ca = {
1460
1490
  key: 5,
1461
1491
  class: "vuecal__cell-events-count"
1462
- }, Kt = ["title"], Qt = {
1492
+ }, da = ["title"], va = {
1463
1493
  __name: "cell",
1464
1494
  props: {
1465
1495
  // Even with time=false, the date of the cell will still be provided in order to attach
@@ -1469,9 +1499,9 @@ const st = (D, n) => {
1469
1499
  index: { type: Number, required: !0 }
1470
1500
  },
1471
1501
  setup(D) {
1472
- const n = D, r = Ne("vuecal"), { view: h, config: p, dateUtils: b, eventsManager: L, dnd: v, touch: C } = r, i = T(() => b.isToday(n.start)), m = ie(null), $ = ie([]), W = ie(!1), G = (c) => {
1473
- $.value.push(c.detail), W.value = !0;
1474
- }, o = () => setTimeout(() => W.value = !1, 300), u = $e({
1502
+ const n = D, r = Le("vuecal"), { view: h, config: p, dateUtils: b, eventsManager: H, dnd: v, touch: C } = r, i = T(() => b.isToday(n.start)), f = ie(null), Y = ie([]), W = ie(!1), U = (c) => {
1503
+ Y.value.push(c.detail), W.value = !0;
1504
+ }, o = () => setTimeout(() => W.value = !1, 300), u = Te({
1475
1505
  dragging: !1,
1476
1506
  holding: !1,
1477
1507
  // When the cell is clicked and hold for a certain amount of time.
@@ -1492,42 +1522,42 @@ const st = (D, n) => {
1492
1522
  movePercentageX: 0,
1493
1523
  movePercentageY: 0,
1494
1524
  schedule: null
1495
- }), e = ie(!1), d = ie({ cellOverlaps: {}, longestStreak: 0 }), f = T(() => {
1496
- let c = Math.min(u.startPercentageY, u.movePercentageY), w = Math.max(u.startPercentageY, u.movePercentageY), S = Pe(c, p), Y = Pe(w, p);
1497
- return p.snapToInterval && (S = b.snapToInterval(S, p.snapToInterval), Y = b.snapToInterval(Y, p.snapToInterval), c = Ve(S, p), w = Ve(Y, p)), {
1525
+ }), e = ie(!1), d = ie({ cellOverlaps: {}, longestStreak: 0 }), g = T(() => {
1526
+ let c = Math.min(u.startPercentageY, u.movePercentageY), w = Math.max(u.startPercentageY, u.movePercentageY), S = je(c, p), $ = je(w, p);
1527
+ return p.snapToInterval && (S = b.snapToInterval(S, p.snapToInterval), $ = b.snapToInterval($, p.snapToInterval), c = Ce(S, p), w = Ce($, p)), {
1498
1528
  style: {
1499
1529
  top: c + "%",
1500
1530
  height: Math.abs(w - c) + "%"
1501
1531
  },
1502
1532
  startMinutes: S,
1503
- endMinutes: Y,
1533
+ endMinutes: $,
1504
1534
  start: b.formatMinutes(S),
1505
- end: b.formatMinutes(Y),
1535
+ end: b.formatMinutes($),
1506
1536
  ...u.schedule ? { schedule: u.schedule } : {}
1507
1537
  };
1508
1538
  }), M = T(() => {
1509
1539
  const c = p.editableEvents.create && (u.dragging || e.value), w = p.eventCreateMinDrag && u.thresholdPassed || !p.eventCreateMinDrag;
1510
1540
  return c && w;
1511
1541
  }), P = T(() => {
1512
- var x;
1513
- const c = /* @__PURE__ */ new Date(), w = h.start.getFullYear(), S = h.start.getMonth(), Y = n.start.getFullYear(), N = n.start.getMonth();
1542
+ var ee;
1543
+ const c = /* @__PURE__ */ new Date(), w = h.start.getFullYear(), S = h.start.getMonth(), $ = n.start.getFullYear(), N = n.start.getMonth();
1514
1544
  return {
1515
- [`vuecal__cell--${Re[n.start.getDay()]}`]: h.isDay || h.isDays || h.isWeek || h.isMonth,
1516
- [`vuecal__cell--${dt[N]}`]: h.isYear,
1517
- [`vuecal__cell--${Y}`]: h.isYears,
1545
+ [`vuecal__cell--${Ie[n.start.getDay()]}`]: h.isDay || h.isDays || h.isWeek || h.isMonth,
1546
+ [`vuecal__cell--${Tt[N]}`]: h.isYear,
1547
+ [`vuecal__cell--${$}`]: h.isYears,
1518
1548
  "vuecal__cell--today": i.value,
1519
- "vuecal__cell--current-month": h.isYear && Y === c.getFullYear() && N === c.getMonth(),
1520
- "vuecal__cell--current-year": h.isYears && Y === c.getFullYear(),
1521
- "vuecal__cell--out-of-range": h.isMonth && (Y !== w || N !== S),
1549
+ "vuecal__cell--current-month": h.isYear && $ === c.getFullYear() && N === c.getMonth(),
1550
+ "vuecal__cell--current-year": h.isYears && $ === c.getFullYear(),
1551
+ "vuecal__cell--out-of-range": h.isMonth && ($ !== w || N !== S),
1522
1552
  "vuecal__cell--before-min": ae.value && K.value,
1523
1553
  "vuecal__cell--after-max": ae.value && ue.value,
1524
1554
  "vuecal__cell--disabled": ae.value,
1525
1555
  "vuecal__cell--selected": h.selectedDate && h.selectedDate.getTime() >= n.start.getTime() && h.selectedDate.getTime() <= n.end.getTime(),
1526
- "vuecal__cell--has-schedules": (x = p.schedules) == null ? void 0 : x.length,
1556
+ "vuecal__cell--has-schedules": (ee = p.schedules) == null ? void 0 : ee.length,
1527
1557
  "vuecal__cell--dragging": u.dragging,
1528
1558
  "vuecal__cell--has-events": l.value.length
1529
1559
  };
1530
- }), B = T(() => b.formatDate(n.start)), s = T(() => {
1560
+ }), A = T(() => b.formatDate(n.start)), s = T(() => {
1531
1561
  switch (h.id) {
1532
1562
  case "day":
1533
1563
  return "";
@@ -1542,84 +1572,84 @@ const st = (D, n) => {
1542
1572
  case "years":
1543
1573
  return b.formatDate(n.start, "YYYY");
1544
1574
  }
1545
- }), l = T(() => p.datePicker ? [] : L.getEventsByDate(B.value, !0, !0).filter((c) => !$.value.includes(c._.id))), _ = T(() => l.value.filter((c) => !c.background)), t = T(() => {
1575
+ }), l = T(() => p.datePicker ? [] : H.getEventsByDate(A.value, !0, !0).filter((c) => !Y.value.includes(c._.id))), _ = T(() => l.value.filter((c) => !c.background)), t = T(() => {
1546
1576
  var c;
1547
- return (c = p.schedules) == null ? void 0 : c.reduce((w, S) => (w[S.id] = l.value.filter((Y) => Y.schedule === S.id), w), {});
1577
+ return (c = p.schedules) == null ? void 0 : c.reduce((w, S) => (w[S.id] = l.value.filter(($) => $.schedule === S.id), w), {});
1548
1578
  }), V = T(() => {
1549
1579
  const c = {};
1550
1580
  for (const w of l.value) {
1551
- const S = w._.id, { maxConcurrent: Y = 1, position: N = 0 } = d.value.cellOverlaps[S] || {};
1581
+ const S = w._.id, { maxConcurrent: $ = 1, position: N = 0 } = d.value.cellOverlaps[S] || {};
1552
1582
  c[S] = {
1553
- width: `${100 / Y}%`,
1554
- left: `${100 / Y * N}%`
1583
+ width: `${100 / $}%`,
1584
+ left: `${100 / $ * N}%`
1555
1585
  };
1556
1586
  }
1557
1587
  return c;
1558
- }), H = T(() => h.isMonth && p.eventCount && !p.eventsOnMonthView && _.value.length), U = T(() => {
1588
+ }), F = T(() => h.isMonth && p.eventCount && !p.eventsOnMonthView && _.value.length), J = T(() => {
1559
1589
  var S;
1560
1590
  if (!p.specialHours || h.isMonth || h.isYear || h.isYears) return;
1561
- const c = Re[n.start.getDay()];
1591
+ const c = Ie[n.start.getDay()];
1562
1592
  let w = (S = p.specialHours) == null ? void 0 : S[c];
1563
1593
  if (w)
1564
- return Array.isArray(w) || (w = [w]), w.map((Y) => {
1565
- let { from: N, to: I, class: x, label: de } = Y;
1566
- if (isNaN(N) || isNaN(I) || p.timeFrom >= I || p.timeTo <= N) return;
1567
- N = Math.max(p.timeFrom, N), I = Math.min(p.timeTo, I);
1568
- const ye = Ve(N, p), g = Ve(I, p) - ye;
1594
+ return Array.isArray(w) || (w = [w]), w.map(($) => {
1595
+ let { from: N, to: B, class: ee, label: de } = $;
1596
+ if (isNaN(N) || isNaN(B) || p.timeFrom >= B || p.timeTo <= N) return;
1597
+ N = Math.max(p.timeFrom, N), B = Math.min(p.timeTo, B);
1598
+ const m = Ce(N, p), z = Ce(B, p) - m;
1569
1599
  return {
1570
- style: { top: `${ye}%`, height: `${g}%` },
1600
+ style: { top: `${m}%`, height: `${z}%` },
1571
1601
  label: de,
1572
- class: x
1602
+ class: ee
1573
1603
  };
1574
- }).filter((Y) => !!Y);
1604
+ }).filter(($) => !!$);
1575
1605
  }), K = T(() => p.minTimestamp !== null && p.minTimestamp > n.end.getTime()), ue = T(() => p.maxTimestamp && p.maxTimestamp < n.start.getTime()), ae = T(() => {
1576
1606
  const { disableDays: c } = p, w = h.isYear || h.isYears;
1577
1607
  return c.length && c.includes(b.formatDate(n.start)) && !w ? !0 : K.value || ue.value;
1578
- }), re = $e({
1608
+ }), ne = Te({
1579
1609
  show: T(() => {
1580
1610
  if (!(!h.isDay && !h.isDays && !h.isWeek) && !(!i.value || !p.time) && !(p.timeFrom > b.dateToMinutes(h.now)) && !(b.dateToMinutes(h.now) > p.timeTo))
1581
1611
  return !0;
1582
1612
  }),
1583
1613
  nowInMinutes: T(() => b.dateToMinutes(h.now)),
1584
- todaysTimePosition: T(() => Ve(re.nowInMinutes, p)),
1585
- style: T(() => `top: ${re.todaysTimePosition}%`),
1614
+ todaysTimePosition: T(() => Ce(ne.nowInMinutes, p)),
1615
+ style: T(() => `top: ${ne.todaysTimePosition}%`),
1586
1616
  currentTime: T(() => b.formatTime(h.now))
1587
- }), he = T(() => {
1617
+ }), ge = T(() => {
1588
1618
  if (ae.value) return {};
1589
1619
  const c = { ...p.eventListeners.cell };
1590
- Object.entries(c).forEach(([Y, N]) => {
1591
- c[Y] = (I) => {
1592
- var x, de, ye;
1593
- (ye = (de = I.target || ((x = I.e) == null ? void 0 : x.target)).closest) != null && ye.call(de, ".vuecal__event") || N(I.type ? { e: I, cell: q.value, cursor: ce.value } : I);
1620
+ Object.entries(c).forEach(([$, N]) => {
1621
+ c[$] = (B) => {
1622
+ var ee, de, m;
1623
+ (m = (de = B.target || ((ee = B.e) == null ? void 0 : ee.target)).closest) != null && m.call(de, ".vuecal__event") || N(B.type ? { e: B, cell: G.value, cursor: ce.value } : B);
1594
1624
  };
1595
1625
  });
1596
1626
  const w = { ...c };
1597
1627
  let S = null;
1598
- return c.click = (Y) => {
1628
+ return c.click = ($) => {
1599
1629
  var N;
1600
- ee(), (N = w.click) == null || N.call(w, { e: Y, cell: q.value, cursor: ce.value }), S ? S = clearTimeout(S) : S = setTimeout(() => {
1601
- var I;
1602
- S = null, (I = w["delayed-click"]) == null || I.call(w, { e: Y, cell: q.value, cursor: ce.value });
1630
+ x(), (N = w.click) == null || N.call(w, { e: $, cell: G.value, cursor: ce.value }), S ? S = clearTimeout(S) : S = setTimeout(() => {
1631
+ var B;
1632
+ S = null, (B = w["delayed-click"]) == null || B.call(w, { e: $, cell: G.value, cursor: ce.value });
1603
1633
  }, 400);
1604
- }, (p.time && h.isDay || h.isDays || h.isWeek) && (c.touchstart = (Y) => {
1634
+ }, (p.time && h.isDay || h.isDays || h.isWeek) && (c.touchstart = ($) => {
1605
1635
  var N;
1606
- oe(Y.e || Y), (N = w.touchstart) == null || N.call(w, { e: Y, cell: q.value, cursor: ce.value });
1607
- }, c.mousedown = (Y) => {
1636
+ oe($.e || $), (N = w.touchstart) == null || N.call(w, { e: $, cell: G.value, cursor: ce.value });
1637
+ }, c.mousedown = ($) => {
1608
1638
  var N;
1609
- oe(Y.e || Y), (N = w.mousedown) == null || N.call(w, { e: Y, cell: q.value, cursor: ce.value });
1610
- }), w.dblclick && (c.dblclick = (Y) => {
1611
- var z, R;
1612
- const N = (((z = Y.touches) == null ? void 0 : z[0]) || Y).clientY, { top: I } = m.value.getBoundingClientRect(), x = Je(N - I, m.value), de = Pe(x, p), ye = new Date(n.start);
1613
- ye.setMinutes(de);
1614
- const g = {
1615
- y: x,
1616
- date: ye
1639
+ oe($.e || $), (N = w.mousedown) == null || N.call(w, { e: $, cell: G.value, cursor: ce.value });
1640
+ }), w.dblclick && (c.dblclick = ($) => {
1641
+ var X, I;
1642
+ const N = (((X = $.touches) == null ? void 0 : X[0]) || $).clientY, { top: B } = f.value.getBoundingClientRect(), ee = qe(N - B, f.value), de = je(ee, p), m = new Date(n.start);
1643
+ m.setMinutes(de);
1644
+ const z = {
1645
+ y: ee,
1646
+ date: m
1617
1647
  };
1618
- (R = w.dblclick) == null || R.call(w, { e: Y, cell: q.value, cursor: g });
1619
- }), p.editableEvents.drag && (c.dragenter = (Y) => v.cellDragEnter(Y, q.value), c.dragover = (Y) => {
1620
- Y.preventDefault(), v.cellDragOver(Y, q.value);
1621
- }, c.dragleave = (Y) => v.cellDragLeave(Y, q.value), c.drop = (Y) => v.cellDragDrop(Y, q.value)), c;
1622
- }), q = T(() => ({
1648
+ (I = w.dblclick) == null || I.call(w, { e: $, cell: G.value, cursor: z });
1649
+ }), p.editableEvents.drag && (c.dragenter = ($) => v.cellDragEnter($, G.value), c.dragover = ($) => {
1650
+ $.preventDefault(), v.cellDragOver($, G.value);
1651
+ }, c.dragleave = ($) => v.cellDragLeave($, G.value), c.drop = ($) => v.cellDragDrop($, G.value)), c;
1652
+ }), G = T(() => ({
1623
1653
  start: n.start,
1624
1654
  end: n.end,
1625
1655
  events: l,
@@ -1629,140 +1659,140 @@ const st = (D, n) => {
1629
1659
  broader: h.broaderView,
1630
1660
  narrower: h.narrowerView
1631
1661
  })), ce = T(() => {
1632
- const c = Pe(u.movePercentageY || u.startPercentageY, p), w = new Date(n.start);
1662
+ const c = je(u.movePercentageY || u.startPercentageY, p), w = new Date(n.start);
1633
1663
  return w.setMinutes(c), {
1634
1664
  x: u.movePercentageX || u.startPercentageX,
1635
1665
  y: u.movePercentageY || u.startPercentageY,
1636
1666
  date: w
1637
1667
  };
1638
- }), ee = () => {
1668
+ }), x = () => {
1639
1669
  h.updateSelectedDate(n.start), p.clickToNavigate && ((h.isMonth || h.isDays || h.isWeek) && p.availableViews.day ? h.switch("day") : h.isYear && p.availableViews.month ? h.switch("month") : h.isYears && p.availableViews.year && h.switch("year")), h.updateViewDate(n.start);
1640
1670
  }, oe = (c) => {
1641
- var S, Y;
1671
+ var S, $;
1642
1672
  u.schedule = ~~c.target.dataset.schedule;
1643
- const w = m.value.getBoundingClientRect();
1644
- u.startX = (((S = c.touches) == null ? void 0 : S[0]) || c).clientX - w.left, u.startY = (((Y = c.touches) == null ? void 0 : Y[0]) || c).clientY - w.top, u.startPercentageX = u.startX * 100 / w.width, u.startPercentageY = u.startY * 100 / w.height, u.thresholdPassed = !1, document.addEventListener(c.type === "touchstart" ? "touchmove" : "mousemove", a), document.addEventListener(c.type === "touchstart" ? "touchend" : "mouseup", k, { once: !0 }), u.holdTimer = setTimeout(() => {
1645
- var N, I;
1646
- u.holding = !0, (I = (N = he.value).hold) == null || I.call(N, { e: c, cell: q.value, cursor: ce.value });
1673
+ const w = f.value.getBoundingClientRect();
1674
+ u.startX = (((S = c.touches) == null ? void 0 : S[0]) || c).clientX - w.left, u.startY = ((($ = c.touches) == null ? void 0 : $[0]) || c).clientY - w.top, u.startPercentageX = u.startX * 100 / w.width, u.startPercentageY = u.startY * 100 / w.height, u.thresholdPassed = !1, document.addEventListener(c.type === "touchstart" ? "touchmove" : "mousemove", a), document.addEventListener(c.type === "touchstart" ? "touchend" : "mouseup", k, { once: !0 }), u.holdTimer = setTimeout(() => {
1675
+ var N, B;
1676
+ u.holding = !0, (B = (N = ge.value).hold) == null || B.call(N, { e: c, cell: G.value, cursor: ce.value });
1647
1677
  }, 1e3);
1648
1678
  }, a = (c) => {
1649
- var S, Y, N, I, x, de;
1650
- u.dragging || (C.isDraggingCell = !0, (Y = (S = he.value).dragStart) == null || Y.call(S, { e: c, cell: q.value, cursor: ce.value })), u.dragging = !0, u.holdTimer = clearTimeout(u.holdTimer), u.holding = !1;
1651
- const w = m.value.getBoundingClientRect();
1652
- u.moveX = (((N = c.touches) == null ? void 0 : N[0]) || c).clientX - w.left, u.moveY = (((I = c.touches) == null ? void 0 : I[0]) || c).clientY - w.top, u.movePercentageX = u.moveX * 100 / w.width, u.movePercentageY = u.moveY * 100 / w.height, p.eventCreateMinDrag && Math.abs(u.startY - u.moveY) > p.eventCreateMinDrag && (u.thresholdPassed = !0), (de = (x = he.value).drag) == null || de.call(x, { e: c, cell: q.value, cursor: ce.value });
1679
+ var S, $, N, B, ee, de;
1680
+ u.dragging || (C.isDraggingCell = !0, ($ = (S = ge.value).dragStart) == null || $.call(S, { e: c, cell: G.value, cursor: ce.value })), u.dragging = !0, u.holdTimer = clearTimeout(u.holdTimer), u.holding = !1;
1681
+ const w = f.value.getBoundingClientRect();
1682
+ u.moveX = (((N = c.touches) == null ? void 0 : N[0]) || c).clientX - w.left, u.moveY = (((B = c.touches) == null ? void 0 : B[0]) || c).clientY - w.top, u.movePercentageX = u.moveX * 100 / w.width, u.movePercentageY = u.moveY * 100 / w.height, p.eventCreateMinDrag && Math.abs(u.startY - u.moveY) > p.eventCreateMinDrag && (u.thresholdPassed = !0), (de = (ee = ge.value).drag) == null || de.call(ee, { e: c, cell: G.value, cursor: ce.value });
1653
1683
  }, k = async (c) => {
1654
1684
  var w, S;
1655
- document.removeEventListener(c.type === "touchend" ? "touchmove" : "mousemove", a, { passive: !1 }), u.dragging && ((S = (w = he.value).dragEnd) == null || S.call(w, { e: c, cell: q.value, cursor: ce.value }), C.isDraggingCell = !1, p.editableEvents.create && (e.value = !0, await y(c), e.value = !1)), u.holdTimer = clearTimeout(u.holdTimer), u.holding = !1, u.dragging = !1, u.startX = 0, u.startY = 0, u.moveX = 0, u.moveY = 0, u.startPercentageX = 0, u.startPercentageY = 0, u.movePercentageX = 0, u.movePercentageY = 0, u.thresholdPassed = !1, u.schedule = null;
1685
+ document.removeEventListener(c.type === "touchend" ? "touchmove" : "mousemove", a, { passive: !1 }), u.dragging && ((S = (w = ge.value).dragEnd) == null || S.call(w, { e: c, cell: G.value, cursor: ce.value }), C.isDraggingCell = !1, p.editableEvents.create && (e.value = !0, await y(c), e.value = !1)), u.holdTimer = clearTimeout(u.holdTimer), u.holding = !1, u.dragging = !1, u.startX = 0, u.startY = 0, u.moveX = 0, u.moveY = 0, u.startPercentageX = 0, u.startPercentageY = 0, u.movePercentageX = 0, u.movePercentageY = 0, u.thresholdPassed = !1, u.schedule = null;
1656
1686
  }, y = async (c) => {
1657
1687
  if (!M.value) return;
1658
- let { start: w, end: S, startMinutes: Y, endMinutes: N } = f.value;
1659
- w = new Date(n.start), w.setMinutes(Y), S = new Date(n.start), S.setMinutes(N);
1660
- let I = { ...f.value, start: w, end: S };
1661
- const { create: x } = p.eventListeners.event;
1662
- if (typeof x == "function") {
1663
- const de = I;
1664
- I = await new Promise((ye) => x({ e: c, event: I, cell: q.value, resolve: ye, cursor: ce.value })), I && typeof I == "object" && h.createEvent(I), I && typeof I == "boolean" && h.createEvent(de);
1665
- } else h.createEvent(I);
1666
- }, A = () => {
1667
- Object.keys(he.value).forEach((c) => {
1688
+ let { start: w, end: S, startMinutes: $, endMinutes: N } = g.value;
1689
+ w = new Date(n.start), w.setMinutes($), S = new Date(n.start), S.setMinutes(N);
1690
+ let B = { ...g.value, start: w, end: S };
1691
+ const { create: ee } = p.eventListeners.event;
1692
+ if (typeof ee == "function") {
1693
+ const de = B;
1694
+ B = await new Promise((m) => ee({ e: c, event: B, cell: G.value, resolve: m, cursor: ce.value })), B && typeof B == "object" && h.createEvent(B), B && typeof B == "boolean" && h.createEvent(de);
1695
+ } else h.createEvent(B);
1696
+ }, R = () => {
1697
+ Object.keys(ge.value).forEach((c) => {
1668
1698
  var w;
1669
- (w = m.value) == null || w.removeEventListener(c, he.value[c]);
1699
+ (w = f.value) == null || w.removeEventListener(c, ge.value[c]);
1670
1700
  });
1671
1701
  }, Q = () => {
1672
- d.value = L.getCellOverlappingEvents(B.value);
1702
+ d.value = H.getCellOverlappingEvents(A.value);
1673
1703
  };
1674
- return me(
1704
+ return he(
1675
1705
  // Watch event IDs and start/end dates (only) to detect event resizing/dnd.
1676
1706
  () => _.value.map((c) => `${c._.id}${c.start.getTime()}${c.end.getTime()}`).join(),
1677
1707
  async () => {
1678
- await Ue(), Q();
1708
+ await Ge(), Q();
1679
1709
  },
1680
1710
  { immediate: !0, flush: "post" }
1681
1711
  // Use flush: 'post' to prevent infinite updates.
1682
- ), Xe(async () => {
1683
- $.value.forEach((c) => L.deleteEvent(c, 3)), A(), await Ue();
1684
- }), (c, w) => (E(), j("div", De({
1712
+ ), Re(async () => {
1713
+ Y.value.forEach((c) => H.deleteEvent(c, 3)), R(), await Ge();
1714
+ }), (c, w) => (E(), j("div", ye({
1685
1715
  class: ["vuecal__cell", P.value],
1686
1716
  ref_key: "cellEl",
1687
- ref: m
1688
- }, Ie(he.value, !0)), [
1689
- c.$slots.cell ? F(c.$slots, "cell", {
1717
+ ref: f
1718
+ }, Be(ge.value, !0)), [
1719
+ c.$slots.cell ? L(c.$slots, "cell", {
1690
1720
  key: 0,
1691
- cell: q.value
1692
- }) : Z("", !0),
1693
- U.value ? (E(!0), j(te, { key: 1 }, we(U.value, (S, Y) => (E(), j("div", {
1694
- class: _e(["vuecal__special-hours", S.class]),
1695
- style: Te(S.style),
1721
+ cell: G.value
1722
+ }) : q("", !0),
1723
+ J.value ? (E(!0), j(te, { key: 1 }, pe(J.value, (S, $) => (E(), j("div", {
1724
+ class: we(["vuecal__special-hours", S.class]),
1725
+ style: be(S.style),
1696
1726
  innerHTML: S.label || ""
1697
- }, null, 14, At))), 256)) : Z("", !0),
1698
- !c.$slots.cell && O(p).schedules ? (E(!0), j(te, { key: 2 }, we(O(p).schedules, (S) => (E(), j("div", {
1699
- class: _e(["vuecal__schedule vuecal__schedule--cell", S.class]),
1727
+ }, null, 14, aa))), 256)) : q("", !0),
1728
+ !c.$slots.cell && O(p).schedules ? (E(!0), j(te, { key: 2 }, pe(O(p).schedules, (S) => (E(), j("div", {
1729
+ class: we(["vuecal__schedule vuecal__schedule--cell", S.class]),
1700
1730
  key: S.id,
1701
- style: Te(S.style || null),
1731
+ style: be(S.style || null),
1702
1732
  "data-schedule": S.id
1703
1733
  }, [
1704
- c.$slots["cell-events"] ? F(c.$slots, "cell-events", {
1734
+ c.$slots["cell-events"] ? L(c.$slots, "cell-events", {
1705
1735
  key: 0,
1706
- cell: q.value
1707
- }) : Z("", !0),
1708
- s.value || c.$slots["cell-date"] ? (E(), j("div", Rt, [
1709
- F(c.$slots, "cell-date", { cell: q.value }, () => [
1710
- xe(le(s.value), 1)
1736
+ cell: G.value
1737
+ }) : q("", !0),
1738
+ s.value || c.$slots["cell-date"] ? (E(), j("div", sa, [
1739
+ L(c.$slots, "cell-date", { cell: G.value }, () => [
1740
+ xe(re(s.value), 1)
1711
1741
  ])
1712
- ])) : Z("", !0),
1713
- c.$slots["cell-content"] ? (E(), j("div", Xt, [
1714
- F(c.$slots, "cell-content", { cell: q.value })
1715
- ])) : Z("", !0),
1716
- c.$slots["cell-events"] && l.value.length ? (E(), j("div", Gt, [
1717
- F(c.$slots, "cell-events", { cell: q.value })
1718
- ])) : l.value.length || W.value ? (E(), Se(et, {
1742
+ ])) : q("", !0),
1743
+ c.$slots["cell-content"] ? (E(), j("div", la, [
1744
+ L(c.$slots, "cell-content", { cell: G.value })
1745
+ ])) : q("", !0),
1746
+ c.$slots["cell-events"] && l.value.length ? (E(), j("div", ra, [
1747
+ L(c.$slots, "cell-events", { cell: G.value })
1748
+ ])) : l.value.length || W.value ? (E(), Ee(et, {
1719
1749
  key: 4,
1720
1750
  class: "vuecal__cell-events",
1721
1751
  name: "vuecal-event-delete",
1722
- onBeforeLeave: w[0] || (w[0] = (Y) => W.value = !0),
1752
+ onBeforeLeave: w[0] || (w[0] = ($) => W.value = !0),
1723
1753
  onAfterLeave: o,
1724
1754
  tag: "div"
1725
1755
  }, {
1726
- default: J(() => [
1727
- (E(!0), j(te, null, we(t.value[S.id], (Y) => (E(), Se(at, {
1728
- key: Y._.id,
1729
- event: Y,
1730
- onEventDeleted: G,
1731
- style: Te(V.value[Y._.id])
1732
- }, je({ _: 2 }, [
1756
+ default: Z(() => [
1757
+ (E(!0), j(te, null, pe(t.value[S.id], ($) => (E(), Ee(at, {
1758
+ key: $._.id,
1759
+ event: $,
1760
+ onEventDeleted: U,
1761
+ style: be(V.value[$._.id])
1762
+ }, Oe({ _: 2 }, [
1733
1763
  c.$slots.event ? {
1734
1764
  name: "event",
1735
- fn: J((N) => [
1736
- F(c.$slots, "event", De({ ref_for: !0 }, N))
1765
+ fn: Z((N) => [
1766
+ L(c.$slots, "event", ye({ ref_for: !0 }, N))
1737
1767
  ]),
1738
1768
  key: "0"
1739
1769
  } : void 0
1740
1770
  ]), 1032, ["event", "style"]))), 128))
1741
1771
  ]),
1742
1772
  _: 2
1743
- }, 1024)) : Z("", !0),
1773
+ }, 1024)) : q("", !0),
1744
1774
  M.value && u.schedule === S.id ? (E(), j("div", {
1745
1775
  key: 5,
1746
1776
  class: "vuecal__event-placeholder",
1747
- style: Te(f.value.style)
1748
- }, le(f.value.start) + " - " + le(f.value.end), 5)) : Z("", !0)
1749
- ], 14, It))), 128)) : Z("", !0),
1777
+ style: be(g.value.style)
1778
+ }, re(g.value.start) + " - " + re(g.value.end), 5)) : q("", !0)
1779
+ ], 14, na))), 128)) : q("", !0),
1750
1780
  !c.$slots.cell && !O(p).schedules ? (E(), j(te, { key: 3 }, [
1751
- c.$slots["cell-events"] ? F(c.$slots, "cell-events", {
1781
+ c.$slots["cell-events"] ? L(c.$slots, "cell-events", {
1752
1782
  key: 0,
1753
- cell: q.value
1754
- }) : Z("", !0),
1755
- s.value || c.$slots["cell-date"] ? (E(), j("div", qt, [
1756
- F(c.$slots, "cell-date", { cell: q.value }, () => [
1757
- xe(le(s.value), 1)
1783
+ cell: G.value
1784
+ }) : q("", !0),
1785
+ s.value || c.$slots["cell-date"] ? (E(), j("div", oa, [
1786
+ L(c.$slots, "cell-date", { cell: G.value }, () => [
1787
+ xe(re(s.value), 1)
1758
1788
  ])
1759
- ])) : Z("", !0),
1760
- c.$slots["cell-content"] ? (E(), j("div", Ut, [
1761
- F(c.$slots, "cell-content", { cell: q.value })
1762
- ])) : Z("", !0),
1763
- c.$slots["cell-events"] && l.value.length ? (E(), j("div", Zt, [
1764
- F(c.$slots, "cell-events", { cell: q.value })
1765
- ])) : (l.value.length || W.value) && !(O(h).isMonth && !O(p).eventsOnMonthView) ? (E(), Se(et, {
1789
+ ])) : q("", !0),
1790
+ c.$slots["cell-content"] ? (E(), j("div", ia, [
1791
+ L(c.$slots, "cell-content", { cell: G.value })
1792
+ ])) : q("", !0),
1793
+ c.$slots["cell-events"] && l.value.length ? (E(), j("div", ua, [
1794
+ L(c.$slots, "cell-events", { cell: G.value })
1795
+ ])) : (l.value.length || W.value) && !(O(h).isMonth && !O(p).eventsOnMonthView) ? (E(), Ee(et, {
1766
1796
  key: 4,
1767
1797
  class: "vuecal__cell-events",
1768
1798
  name: "vuecal-event-delete",
@@ -1770,141 +1800,141 @@ const st = (D, n) => {
1770
1800
  onAfterLeave: o,
1771
1801
  tag: "div"
1772
1802
  }, {
1773
- default: J(() => [
1774
- (E(!0), j(te, null, we(l.value, (S) => (E(), Se(at, {
1803
+ default: Z(() => [
1804
+ (E(!0), j(te, null, pe(l.value, (S) => (E(), Ee(at, {
1775
1805
  key: S._.id,
1776
1806
  event: S,
1777
- onEventDeleted: G,
1778
- style: Te(V.value[S._.id])
1779
- }, je({ _: 2 }, [
1807
+ onEventDeleted: U,
1808
+ style: be(V.value[S._.id])
1809
+ }, Oe({ _: 2 }, [
1780
1810
  c.$slots.event ? {
1781
1811
  name: "event",
1782
- fn: J((Y) => [
1783
- F(c.$slots, "event", De({ ref_for: !0 }, Y))
1812
+ fn: Z(($) => [
1813
+ L(c.$slots, "event", ye({ ref_for: !0 }, $))
1784
1814
  ]),
1785
1815
  key: "0"
1786
1816
  } : void 0
1787
1817
  ]), 1032, ["event", "style"]))), 128))
1788
1818
  ]),
1789
1819
  _: 3
1790
- })) : Z("", !0),
1820
+ })) : q("", !0),
1791
1821
  M.value ? (E(), j("div", {
1792
1822
  key: 5,
1793
1823
  class: "vuecal__event-placeholder",
1794
- style: Te(f.value.style)
1795
- }, le(f.value.start) + " - " + le(f.value.end), 5)) : Z("", !0)
1796
- ], 64)) : Z("", !0),
1797
- c.$slots["event-count"] ? F(c.$slots, "event-count", {
1824
+ style: be(g.value.style)
1825
+ }, re(g.value.start) + " - " + re(g.value.end), 5)) : q("", !0)
1826
+ ], 64)) : q("", !0),
1827
+ c.$slots["event-count"] ? L(c.$slots, "event-count", {
1798
1828
  key: 4,
1799
1829
  events: _.value
1800
- }) : H.value ? (E(), j("div", Jt, le(_.value.length), 1)) : Z("", !0),
1801
- re.show ? (E(), j("div", {
1830
+ }) : F.value ? (E(), j("div", ca, re(_.value.length), 1)) : q("", !0),
1831
+ ne.show ? (E(), j("div", {
1802
1832
  key: 6,
1803
1833
  class: "vuecal__now-line",
1804
- style: Te(re.style),
1805
- title: re.currentTime
1834
+ style: be(ne.style),
1835
+ title: ne.currentTime
1806
1836
  }, [
1807
- ge("span", null, le(re.currentTime), 1)
1808
- ], 12, Kt)) : Z("", !0)
1837
+ fe("span", null, re(ne.currentTime), 1)
1838
+ ], 12, da)) : q("", !0)
1809
1839
  ], 16));
1810
1840
  }
1811
- }, xt = {
1841
+ }, ma = {
1812
1842
  __name: "body",
1813
1843
  setup(D) {
1814
- const n = Ne("vuecal"), { view: r, config: h, dateUtils: p } = n, b = ie(null), L = ie(null), v = T(() => ({
1844
+ const n = Le("vuecal"), { view: r, config: h, dateUtils: p } = n, b = ie(null), H = ie(null), v = T(() => ({
1815
1845
  "--vuecal-grid-columns": r.cols,
1816
1846
  "--vuecal-grid-rows": r.rows
1817
1847
  })), C = T(() => {
1818
- const $ = p.formatTime(Pe(L.value, h));
1848
+ const Y = p.formatTime(je(H.value, h));
1819
1849
  return {
1820
- style: { top: `${L.value}%` },
1821
- time: $
1850
+ style: { top: `${H.value}%` },
1851
+ time: Y
1822
1852
  };
1823
- }), i = ($) => {
1853
+ }), i = (Y) => {
1824
1854
  var o;
1825
1855
  if (r.isMonth || r.isYear || r.isYears) return;
1826
- const W = (((o = $.touches) == null ? void 0 : o[0]) || $).clientY, { top: G } = b.value.getBoundingClientRect();
1827
- L.value = Je(W - G, b.value);
1828
- }, m = () => {
1829
- L.value = null;
1856
+ const W = (((o = Y.touches) == null ? void 0 : o[0]) || Y).clientY, { top: U } = b.value.getBoundingClientRect();
1857
+ H.value = qe(W - U, b.value);
1858
+ }, f = () => {
1859
+ H.value = null;
1830
1860
  };
1831
- return Ze(() => {
1832
- b.value.addEventListener("mousemove", i), b.value.addEventListener("touchmove", i), b.value.addEventListener("mouseleave", m), b.value.addEventListener("touchend", m);
1833
- }), Xe(() => {
1834
- b.value && (b.value.removeEventListener("mousemove", i), b.value.removeEventListener("touchmove", i), b.value.removeEventListener("mouseleave", m), b.value.removeEventListener("touchend", m));
1835
- }), ($, W) => (E(), j("div", {
1861
+ return Je(() => {
1862
+ b.value.addEventListener("mousemove", i), b.value.addEventListener("touchmove", i), b.value.addEventListener("mouseleave", f), b.value.addEventListener("touchend", f);
1863
+ }), Re(() => {
1864
+ b.value && (b.value.removeEventListener("mousemove", i), b.value.removeEventListener("touchmove", i), b.value.removeEventListener("mouseleave", f), b.value.removeEventListener("touchend", f));
1865
+ }), (Y, W) => (E(), j("div", {
1836
1866
  class: "vuecal__body",
1837
1867
  ref_key: "bodyEl",
1838
1868
  ref: b,
1839
- style: Te(v.value)
1869
+ style: be(v.value)
1840
1870
  }, [
1841
- Oe(Ge, { name: "vuecal-shrink" }, {
1842
- default: J(() => [
1843
- O(h).timeAtCursor && L.value !== null ? (E(), j("div", {
1871
+ Ve(Xe, { name: "vuecal-shrink" }, {
1872
+ default: Z(() => [
1873
+ O(h).timeAtCursor && H.value !== null ? (E(), j("div", {
1844
1874
  key: 0,
1845
1875
  class: "vuecal__time-at-cursor",
1846
- style: Te(C.value.style)
1876
+ style: be(C.value.style)
1847
1877
  }, [
1848
- ge("label", null, le(C.value.time), 1)
1849
- ], 4)) : Z("", !0)
1878
+ fe("label", null, re(C.value.time), 1)
1879
+ ], 4)) : q("", !0)
1850
1880
  ]),
1851
1881
  _: 1
1852
1882
  }),
1853
- (E(!0), j(te, null, we(O(r).cellDates, (G, o) => (E(), Se(Qt, {
1883
+ (E(!0), j(te, null, pe(O(r).cellDates, (U, o) => (E(), Ee(va, {
1854
1884
  key: o,
1855
- start: G.start,
1856
- end: G.end,
1885
+ start: U.start,
1886
+ end: U.end,
1857
1887
  index: o
1858
- }, je({ _: 2 }, [
1859
- $.$slots.cell ? {
1888
+ }, Oe({ _: 2 }, [
1889
+ Y.$slots.cell ? {
1860
1890
  name: "cell",
1861
- fn: J((u) => [
1862
- F($.$slots, "cell", De({ ref_for: !0 }, u))
1891
+ fn: Z((u) => [
1892
+ L(Y.$slots, "cell", ye({ ref_for: !0 }, u))
1863
1893
  ]),
1864
1894
  key: "0"
1865
1895
  } : void 0,
1866
- $.$slots["cell-date"] ? {
1896
+ Y.$slots["cell-date"] ? {
1867
1897
  name: "cell-date",
1868
- fn: J((u) => [
1869
- F($.$slots, "cell-date", De({ ref_for: !0 }, u))
1898
+ fn: Z((u) => [
1899
+ L(Y.$slots, "cell-date", ye({ ref_for: !0 }, u))
1870
1900
  ]),
1871
1901
  key: "1"
1872
1902
  } : void 0,
1873
- $.$slots["cell-content"] ? {
1903
+ Y.$slots["cell-content"] ? {
1874
1904
  name: "cell-content",
1875
- fn: J((u) => [
1876
- F($.$slots, "cell-content", De({ ref_for: !0 }, u))
1905
+ fn: Z((u) => [
1906
+ L(Y.$slots, "cell-content", ye({ ref_for: !0 }, u))
1877
1907
  ]),
1878
1908
  key: "2"
1879
1909
  } : void 0,
1880
- $.$slots["cell-events"] ? {
1910
+ Y.$slots["cell-events"] ? {
1881
1911
  name: "cell-events",
1882
- fn: J((u) => [
1883
- F($.$slots, "cell-events", De({ ref_for: !0 }, u))
1912
+ fn: Z((u) => [
1913
+ L(Y.$slots, "cell-events", ye({ ref_for: !0 }, u))
1884
1914
  ]),
1885
1915
  key: "3"
1886
- } : $.$slots.event ? {
1916
+ } : Y.$slots.event ? {
1887
1917
  name: "event",
1888
- fn: J((u) => [
1889
- F($.$slots, "event", De({ ref_for: !0 }, u))
1918
+ fn: Z((u) => [
1919
+ L(Y.$slots, "event", ye({ ref_for: !0 }, u))
1890
1920
  ]),
1891
1921
  key: "4"
1892
- } : $.$slots["event-count"] ? {
1922
+ } : Y.$slots["event-count"] ? {
1893
1923
  name: "event-count",
1894
- fn: J((u) => [
1895
- F($.$slots, "event-count", De({ ref_for: !0 }, u))
1924
+ fn: Z((u) => [
1925
+ L(Y.$slots, "event-count", ye({ ref_for: !0 }, u))
1896
1926
  ]),
1897
1927
  key: "5"
1898
1928
  } : void 0
1899
1929
  ]), 1032, ["start", "end", "index"]))), 128))
1900
1930
  ], 4));
1901
1931
  }
1902
- }, ea = ["data-locale"], ta = { class: "vuecal__scrollable-wrap" }, aa = {
1932
+ }, fa = ["data-locale"], ga = { class: "vuecal__scrollable-wrap" }, ha = {
1903
1933
  key: 1,
1904
1934
  class: "vuecal__week-numbers"
1905
- }, na = { class: "vuecal__week-number" }, sa = { class: "vuecal__body-wrap" }, oa = {
1935
+ }, ya = { class: "vuecal__week-number" }, Da = { class: "vuecal__body-wrap" }, wa = {
1906
1936
  __name: "index",
1907
- props: pt,
1937
+ props: jt,
1908
1938
  emits: [
1909
1939
  "ready",
1910
1940
  "view-change",
@@ -1917,7 +1947,7 @@ const st = (D, n) => {
1917
1947
  "event-dropped"
1918
1948
  ],
1919
1949
  setup(D, { expose: n, emit: r }) {
1920
- const h = D, p = r, b = ot("vuecal-el"), L = yt({ props: h, emit: p, attrs: ut(), vuecalEl: b, uid: it() }), { config: v, view: C, dateUtils: i, touch: m } = L, $ = T(() => v.time && (C.isDay || C.isDays || C.isWeek)), W = T(() => Array(C.rows).fill().map((e, d) => i.getWeek(i.addDays(C.firstCellDate, 7 * d)))), G = T(() => {
1950
+ const h = D, p = r, b = wt("vuecal-el"), H = Vt({ props: h, emit: p, attrs: kt(), vuecalEl: b, uid: _t() }), { config: v, view: C, dateUtils: i, touch: f } = H, Y = T(() => v.time && (C.isDay || C.isDays || C.isWeek)), W = T(() => Array(C.rows).fill().map((e, d) => i.getWeek(i.addDays(C.firstCellDate, 7 * d)))), U = T(() => {
1921
1951
  var e;
1922
1952
  return {
1923
1953
  "vuecal--ready": v.ready,
@@ -1927,11 +1957,11 @@ const st = (D, n) => {
1927
1957
  "vuecal--dark": v.dark,
1928
1958
  "vuecal--light": !v.dark,
1929
1959
  [`vuecal--${C.id}-view`]: !0,
1930
- "vuecal--view-has-time": $.value,
1960
+ "vuecal--view-has-time": Y.value,
1931
1961
  "vuecal--timeless": !v.time,
1932
- "vuecal--dragging-cell": m.isDraggingCell,
1933
- "vuecal--dragging-event": m.isDraggingEvent,
1934
- "vuecal--resizing-event": m.isResizingEvent,
1962
+ "vuecal--dragging-cell": f.isDraggingCell,
1963
+ "vuecal--dragging-event": f.isDraggingEvent,
1964
+ "vuecal--resizing-event": f.isResizingEvent,
1935
1965
  "vuecal--has-schedules": (e = v.schedules) == null ? void 0 : e.length
1936
1966
  };
1937
1967
  }), o = T(() => ({
@@ -1939,151 +1969,151 @@ const st = (D, n) => {
1939
1969
  })), u = T(() => {
1940
1970
  var e, d;
1941
1971
  return {
1942
- "vuecal__scrollable--row": $.value || v.weekNumbers && C.isMonth,
1972
+ "vuecal__scrollable--row": Y.value || v.weekNumbers && C.isMonth,
1943
1973
  // Keep the states inside the Vue transition wrapper for smooth CSS transitions.
1944
1974
  [`vuecal__scrollable--${C.id}-view`]: !0,
1945
1975
  "vuecal__scrollable--has-schedules": (e = v.schedules) == null ? void 0 : e.length,
1946
1976
  "vuecal__scrollable--no-schedules": !((d = v.schedules) != null && d.length)
1947
1977
  };
1948
1978
  });
1949
- return Ze(async () => {
1950
- await Ue(), v.ready = !0, p("ready", { config: v, view: C });
1951
- }), ct("vuecal", L), n({ view: L.view }), (e, d) => (E(), j("div", {
1952
- class: _e(["vuecal", G.value]),
1979
+ return Je(async () => {
1980
+ await Ge(), v.ready = !0, p("ready", { config: v, view: C });
1981
+ }), bt("vuecal", H), n({ view: H.view }), (e, d) => (E(), j("div", {
1982
+ class: we(["vuecal", U.value]),
1953
1983
  ref: "vuecal-el",
1954
1984
  "data-locale": e.locale,
1955
- style: Te(o.value)
1985
+ style: be(o.value)
1956
1986
  }, [
1957
- e.$slots.diy ? F(e.$slots, "diy", {
1987
+ e.$slots.diy ? L(e.$slots, "diy", {
1958
1988
  key: 0,
1959
- vuecal: O(L)
1989
+ vuecal: O(H)
1960
1990
  }) : (E(), j(te, { key: 1 }, [
1961
- Oe(Mt, null, je({ _: 2 }, [
1991
+ Ve(Wt, null, Oe({ _: 2 }, [
1962
1992
  e.$slots.header ? {
1963
1993
  name: "header",
1964
- fn: J((f) => [
1965
- F(e.$slots, "header", ne(se(f)))
1994
+ fn: Z((g) => [
1995
+ L(e.$slots, "header", se(le(g)))
1966
1996
  ]),
1967
1997
  key: "0"
1968
1998
  } : void 0,
1969
1999
  !e.$slots.header && e.$slots["previous-button"] ? {
1970
2000
  name: "previous-button",
1971
- fn: J((f) => [
1972
- F(e.$slots, "previous-button", ne(se(f)))
2001
+ fn: Z((g) => [
2002
+ L(e.$slots, "previous-button", se(le(g)))
1973
2003
  ]),
1974
2004
  key: "1"
1975
2005
  } : void 0,
1976
2006
  !e.$slots.header && e.$slots["next-button"] ? {
1977
2007
  name: "next-button",
1978
- fn: J((f) => [
1979
- F(e.$slots, "next-button", ne(se(f)))
2008
+ fn: Z((g) => [
2009
+ L(e.$slots, "next-button", se(le(g)))
1980
2010
  ]),
1981
2011
  key: "2"
1982
2012
  } : void 0,
1983
2013
  !e.$slots.header && e.$slots["today-button"] ? {
1984
2014
  name: "today-button",
1985
- fn: J((f) => [
1986
- F(e.$slots, "today-button", ne(se(f)))
2015
+ fn: Z((g) => [
2016
+ L(e.$slots, "today-button", se(le(g)))
1987
2017
  ]),
1988
2018
  key: "3"
1989
2019
  } : void 0,
1990
2020
  !e.$slots.header && e.$slots.title ? {
1991
2021
  name: "title",
1992
- fn: J((f) => [
1993
- F(e.$slots, "title", ne(se(f)))
2022
+ fn: Z((g) => [
2023
+ L(e.$slots, "title", se(le(g)))
1994
2024
  ]),
1995
2025
  key: "4"
1996
2026
  } : void 0,
1997
2027
  !e.$slots.header && e.$slots["schedule-heading"] ? {
1998
2028
  name: "schedule-heading",
1999
- fn: J((f) => [
2000
- F(e.$slots, "schedule-heading", ne(se(f)))
2029
+ fn: Z((g) => [
2030
+ L(e.$slots, "schedule-heading", se(le(g)))
2001
2031
  ]),
2002
2032
  key: "5"
2003
2033
  } : void 0
2004
2034
  ]), 1024),
2005
- ge("div", ta, [
2006
- Oe(Ge, {
2035
+ fe("div", ga, [
2036
+ Ve(Xe, {
2007
2037
  name: `vuecal-slide-fade--${O(C).transitionDirection}`
2008
2038
  }, {
2009
- default: J(() => [
2039
+ default: Z(() => [
2010
2040
  (E(), j("div", {
2011
- class: _e(["vuecal__scrollable", u.value]),
2041
+ class: we(["vuecal__scrollable", u.value]),
2012
2042
  key: O(C).id + O(C).start.getTime()
2013
2043
  }, [
2014
- $.value ? (E(), Se(Lt, { key: 0 }, je({ _: 2 }, [
2044
+ Y.value ? (E(), Ee(Zt, { key: 0 }, Oe({ _: 2 }, [
2015
2045
  e.$slots["time-cell"] ? {
2016
2046
  name: "time-cell",
2017
- fn: J((f) => [
2018
- F(e.$slots, "time-cell", ne(se(f)))
2047
+ fn: Z((g) => [
2048
+ L(e.$slots, "time-cell", se(le(g)))
2019
2049
  ]),
2020
2050
  key: "0"
2021
2051
  } : void 0
2022
- ]), 1024)) : Z("", !0),
2023
- O(v).weekNumbers && O(C).isMonth ? (E(), j("div", aa, [
2024
- (E(!0), j(te, null, we(W.value, (f) => (E(), j("div", na, [
2025
- F(e.$slots, "week-number", {}, () => [
2026
- ge("small", null, le(f), 1)
2052
+ ]), 1024)) : q("", !0),
2053
+ O(v).weekNumbers && O(C).isMonth ? (E(), j("div", ha, [
2054
+ (E(!0), j(te, null, pe(W.value, (g) => (E(), j("div", ya, [
2055
+ L(e.$slots, "week-number", {}, () => [
2056
+ fe("small", null, re(g), 1)
2027
2057
  ])
2028
2058
  ]))), 256))
2029
- ])) : Z("", !0),
2030
- ge("div", sa, [
2031
- Oe(Pt, null, je({ _: 2 }, [
2059
+ ])) : q("", !0),
2060
+ fe("div", Da, [
2061
+ Ve(Jt, null, Oe({ _: 2 }, [
2032
2062
  e.$slots["weekday-heading"] ? {
2033
2063
  name: "weekday-heading",
2034
- fn: J((f) => [
2035
- F(e.$slots, "weekday-heading", ne(se(f)))
2064
+ fn: Z((g) => [
2065
+ L(e.$slots, "weekday-heading", se(le(g)))
2036
2066
  ]),
2037
2067
  key: "0"
2038
2068
  } : void 0,
2039
2069
  e.$slots["schedule-heading"] ? {
2040
2070
  name: "schedule-heading",
2041
- fn: J((f) => [
2042
- F(e.$slots, "schedule-heading", ne(se(f)))
2071
+ fn: Z((g) => [
2072
+ L(e.$slots, "schedule-heading", se(le(g)))
2043
2073
  ]),
2044
2074
  key: "1"
2045
2075
  } : void 0
2046
2076
  ]), 1024),
2047
- Oe(xt, null, je({ _: 2 }, [
2077
+ Ve(ma, null, Oe({ _: 2 }, [
2048
2078
  e.$slots.cell ? {
2049
2079
  name: "cell",
2050
- fn: J((f) => [
2051
- F(e.$slots, "cell", ne(se(f)))
2080
+ fn: Z((g) => [
2081
+ L(e.$slots, "cell", se(le(g)))
2052
2082
  ]),
2053
2083
  key: "0"
2054
2084
  } : void 0,
2055
2085
  !e.$slots.cell && e.$slots["cell-date"] ? {
2056
2086
  name: "cell-date",
2057
- fn: J((f) => [
2058
- F(e.$slots, "cell-date", ne(se(f)))
2087
+ fn: Z((g) => [
2088
+ L(e.$slots, "cell-date", se(le(g)))
2059
2089
  ]),
2060
2090
  key: "1"
2061
2091
  } : void 0,
2062
2092
  !e.$slots.cell && e.$slots["cell-content"] ? {
2063
2093
  name: "cell-content",
2064
- fn: J((f) => [
2065
- F(e.$slots, "cell-content", ne(se(f)))
2094
+ fn: Z((g) => [
2095
+ L(e.$slots, "cell-content", se(le(g)))
2066
2096
  ]),
2067
2097
  key: "2"
2068
2098
  } : void 0,
2069
2099
  !e.$slots.cell && e.$slots["cell-events"] ? {
2070
2100
  name: "cell-events",
2071
- fn: J((f) => [
2072
- F(e.$slots, "cell-events", ne(se(f)))
2101
+ fn: Z((g) => [
2102
+ L(e.$slots, "cell-events", se(le(g)))
2073
2103
  ]),
2074
2104
  key: "3"
2075
2105
  } : void 0,
2076
2106
  !e.$slots.cell && e.$slots.event ? {
2077
2107
  name: "event",
2078
- fn: J((f) => [
2079
- F(e.$slots, "event", ne(se(f)))
2108
+ fn: Z((g) => [
2109
+ L(e.$slots, "event", se(le(g)))
2080
2110
  ]),
2081
2111
  key: "4"
2082
2112
  } : void 0,
2083
2113
  !e.$slots.cell && e.$slots["event-count"] ? {
2084
2114
  name: "event-count",
2085
- fn: J((f) => [
2086
- F(e.$slots, "event-count", ne(se(f)))
2115
+ fn: Z((g) => [
2116
+ L(e.$slots, "event-count", se(le(g)))
2087
2117
  ]),
2088
2118
  key: "5"
2089
2119
  } : void 0
@@ -2095,63 +2125,63 @@ const st = (D, n) => {
2095
2125
  }, 8, ["name"])
2096
2126
  ])
2097
2127
  ], 64))
2098
- ], 14, ea));
2128
+ ], 14, fa));
2099
2129
  }
2100
- }, ia = (D) => {
2101
- Fe.texts = { ...fe.texts, ...D }, Fe.dateUtils.updateTexts(Fe.texts);
2130
+ }, _a = (D) => {
2131
+ He.texts = { ...me.texts, ...D }, He.dateUtils.updateTexts(He.texts);
2102
2132
  }, {
2103
- addDatePrototypes: ua,
2104
- removeDatePrototypes: ca,
2105
- updateTexts: da,
2106
- addDays: va,
2107
- subtractDays: ma,
2108
- addHours: fa,
2109
- subtractHours: ga,
2110
- addMinutes: ha,
2111
- subtractMinutes: ya,
2112
- getWeek: Da,
2113
- isToday: pa,
2114
- isSameDate: wa,
2115
- isInRange: _a,
2116
- isLeapYear: ka,
2117
- getPreviousFirstDayOfWeek: ba,
2118
- stringToDate: Ta,
2119
- dateToMinutes: $a,
2120
- countDays: Ma,
2121
- datesInSameTimeStep: Ya,
2122
- isValid: Ea,
2123
- formatDate: Sa,
2124
- formatDateLite: Ca,
2125
- formatTime: Va,
2126
- formatTimeLite: Oa,
2127
- formatMinutes: ja
2128
- } = Fe.dateUtils;
2133
+ addDatePrototypes: ka,
2134
+ removeDatePrototypes: ba,
2135
+ updateTexts: Ta,
2136
+ addDays: Ma,
2137
+ subtractDays: $a,
2138
+ addHours: Ya,
2139
+ subtractHours: Ea,
2140
+ addMinutes: Sa,
2141
+ subtractMinutes: Ca,
2142
+ getWeek: Va,
2143
+ isToday: Oa,
2144
+ isSameDate: ja,
2145
+ isInRange: Pa,
2146
+ isLeapYear: Fa,
2147
+ getPreviousFirstDayOfWeek: za,
2148
+ stringToDate: Ha,
2149
+ dateToMinutes: La,
2150
+ countDays: Na,
2151
+ datesInSameTimeStep: Wa,
2152
+ isValid: Aa,
2153
+ formatDate: Ba,
2154
+ formatDateLite: Ia,
2155
+ formatTime: Ra,
2156
+ formatTimeLite: Xa,
2157
+ formatMinutes: Ua
2158
+ } = He.dateUtils;
2129
2159
  export {
2130
- oa as VueCal,
2131
- ua as addDatePrototypes,
2132
- va as addDays,
2133
- fa as addHours,
2134
- ha as addMinutes,
2135
- Ma as countDays,
2136
- $a as dateToMinutes,
2137
- Ya as datesInSameTimeStep,
2138
- Sa as formatDate,
2139
- Ca as formatDateLite,
2140
- ja as formatMinutes,
2141
- Va as formatTime,
2142
- Oa as formatTimeLite,
2143
- ba as getPreviousFirstDayOfWeek,
2144
- Da as getWeek,
2145
- _a as isInRange,
2146
- ka as isLeapYear,
2147
- wa as isSameDate,
2148
- pa as isToday,
2149
- Ea as isValidDate,
2150
- ca as removeDatePrototypes,
2151
- Ta as stringToDate,
2152
- ma as subtractDays,
2153
- ga as subtractHours,
2154
- ya as subtractMinutes,
2155
- da as updateTexts,
2156
- ia as useLocale
2160
+ wa as VueCal,
2161
+ ka as addDatePrototypes,
2162
+ Ma as addDays,
2163
+ Ya as addHours,
2164
+ Sa as addMinutes,
2165
+ Na as countDays,
2166
+ La as dateToMinutes,
2167
+ Wa as datesInSameTimeStep,
2168
+ Ba as formatDate,
2169
+ Ia as formatDateLite,
2170
+ Ua as formatMinutes,
2171
+ Ra as formatTime,
2172
+ Xa as formatTimeLite,
2173
+ za as getPreviousFirstDayOfWeek,
2174
+ Va as getWeek,
2175
+ Pa as isInRange,
2176
+ Fa as isLeapYear,
2177
+ ja as isSameDate,
2178
+ Oa as isToday,
2179
+ Aa as isValidDate,
2180
+ ba as removeDatePrototypes,
2181
+ Ha as stringToDate,
2182
+ $a as subtractDays,
2183
+ Ea as subtractHours,
2184
+ Ca as subtractMinutes,
2185
+ Ta as updateTexts,
2186
+ _a as useLocale
2157
2187
  };