@reservi/preact 1.5.0 → 1.7.0

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.
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
- import { render as At, h as Ce } from "preact";
2
- import { getLocaleText as V, dl as m, timeStringToMinutes as X, computeDrop as ht, pxToSnappedMinutes as It, computeResize as $t, THEME_TOKEN_VARS as xe, themeToStyle as Pe, CalendarApi as Ae, eventsToICS as Ie } from "@reservi/core";
3
- import { dayGridPlugin as Sn, definePlugin as On, defineTheme as Tn, eventsToICS as En, listPlugin as Mn, multiMonthPlugin as kn, parseICS as Cn, resourcePlugin as xn, themeToStyle as Pn, timeGridPlugin as An, timelinePlugin as In } from "@reservi/core";
4
- import { jsx as u, jsxs as k, Fragment as $e } from "preact/jsx-runtime";
1
+ import { render as At, h as ke } from "preact";
2
+ import { getLocaleText as W, dl as f, timeStringToMinutes as X, computeDrop as ht, pxToSnappedMinutes as It, computeResize as $t, resolveBusinessHours as xe, isWithinBusinessHours as Pe, THEME_TOKEN_VARS as Ae, themeToStyle as Ie, CalendarApi as $e, eventsToICS as je } from "@reservi/core";
3
+ import { dayGridPlugin as On, definePlugin as Tn, defineTheme as En, eventsToICS as Mn, listPlugin as Cn, multiMonthPlugin as kn, parseICS as xn, resourcePlugin as Pn, themeToStyle as An, timeGridPlugin as In, timelinePlugin as $n } from "@reservi/core";
4
+ import { jsx as u, jsxs as C } from "preact/jsx-runtime";
5
5
  import "@preact/signals";
6
- import { useRef as F, useLayoutEffect as jt, useState as K, useEffect as R } from "preact/hooks";
7
- function pn(t) {
6
+ import { useRef as F, useLayoutEffect as jt, useState as V, useEffect as R } from "preact/hooks";
7
+ function hn(t) {
8
8
  return { __rsvHost: !0, node: t };
9
9
  }
10
- function je(t) {
10
+ function He(t) {
11
11
  return typeof t == "object" && t !== null && t.__rsvHost === !0;
12
12
  }
13
- function L(t, e, r, n) {
13
+ function B(t, e, r, n) {
14
14
  if (!t) return r;
15
15
  const a = t(e);
16
- return a === void 0 ? r : je(a) ? n ? /* @__PURE__ */ u(Re, { bridge: n, node: a.node }) : r : a;
16
+ return a === void 0 ? r : He(a) ? n ? /* @__PURE__ */ u(Re, { bridge: n, node: a.node }) : r : a;
17
17
  }
18
18
  let Fe = 0;
19
19
  function Re({ bridge: t, node: e }) {
@@ -23,26 +23,26 @@ function Re({ bridge: t, node: e }) {
23
23
  a.current = e;
24
24
  const o = F(!1);
25
25
  return jt(() => {
26
- const s = n.current;
27
- if (!s) return;
26
+ const d = n.current;
27
+ if (!d) return;
28
28
  const i = r.current;
29
- return o.current = !0, t.mount(i, s, a.current), () => {
29
+ return o.current = !0, t.mount(i, d, a.current), () => {
30
30
  o.current = !1, t.unmount(i);
31
31
  };
32
32
  }, []), jt(() => {
33
33
  o.current && t.update(r.current, e);
34
34
  }), /* @__PURE__ */ u("div", { "data-rsv": "host", ref: n });
35
35
  }
36
- function N(...t) {
36
+ function K(...t) {
37
37
  return t.filter(Boolean).join(" ");
38
38
  }
39
- const Ft = /* @__PURE__ */ new WeakSet();
40
- function W(t, e, r) {
39
+ const Ht = /* @__PURE__ */ new WeakSet();
40
+ function U(t, e, r) {
41
41
  if (!t || !e) return;
42
42
  const n = t;
43
- Ft.has(n) || (Ft.add(n), e(Object.assign(r(), { el: n })));
43
+ Ht.has(n) || (Ht.add(n), e(Object.assign(r(), { el: n })));
44
44
  }
45
- function He(t, e) {
45
+ function Le(t, e) {
46
46
  if (!t.length) return null;
47
47
  const r = [...t].sort((a, o) => a.breakpoint - o.breakpoint);
48
48
  let n = r[0].view;
@@ -50,9 +50,9 @@ function He(t, e) {
50
50
  e >= a.breakpoint && (n = a.view);
51
51
  return n;
52
52
  }
53
- const rt = { prev: "‹", next: "›" }, Le = /* @__PURE__ */ new Set(["", "title", "today", "prev", "next"]), Ne = /month|year/i, nt = (t) => String(t).padStart(2, "0");
54
- function Be() {
55
- return /* @__PURE__ */ k(
53
+ const rt = { prev: "‹", next: "›" }, Ne = /* @__PURE__ */ new Set(["", "title", "today", "prev", "next"]), Be = /month|year/i, nt = (t) => String(t).padStart(2, "0");
54
+ function Ke() {
55
+ return /* @__PURE__ */ C(
56
56
  "svg",
57
57
  {
58
58
  "data-rsv": "title-icon",
@@ -74,45 +74,45 @@ function Be() {
74
74
  }
75
75
  );
76
76
  }
77
- function Ke(t) {
77
+ function Ye(t) {
78
78
  var r;
79
79
  if ((r = t.views) != null && r.length) return t.views;
80
80
  const e = t.headerToolbar;
81
- return e ? [e.start, e.center, e.end].filter((n) => !!n).flatMap((n) => n.split(/\s+/)).flatMap((n) => n.split(",")).filter((n) => !Le.has(n)) : [];
81
+ return e ? [e.start, e.center, e.end].filter((n) => !!n).flatMap((n) => n.split(/\s+/)).flatMap((n) => n.split(",")).filter((n) => !Ne.has(n)) : [];
82
82
  }
83
83
  function Ve({ api: t, title: e, activeView: r, options: n }) {
84
- var I, $, j, U, _;
85
- const a = V(n.locale), o = ($ = (I = n.slots) == null ? void 0 : I.toolbarStart) == null ? void 0 : $.call(I), s = (U = (j = n.slots) == null ? void 0 : j.toolbarEnd) == null ? void 0 : U.call(j), i = Ke(n), d = Ne.test(r), l = n.firstDay ?? a.firstDay, c = F(null), [p, D] = K(!1), v = m.toDate(t.getDate()), g = m.toDate(n.now ? m.from(n.now) : m.now()), [h, b] = K(v.getFullYear()), [w, S] = K(v.getMonth()), M = new Intl.DateTimeFormat(n.locale, { month: "short" }), x = new Intl.DateTimeFormat(n.locale, { month: "long" }), y = new Intl.DateTimeFormat(n.locale, { weekday: "short" }), f = Array.from(
84
+ var P, O, A, H, L;
85
+ const a = W(n.locale), o = (O = (P = n.slots) == null ? void 0 : P.toolbarStart) == null ? void 0 : O.call(P), d = (H = (A = n.slots) == null ? void 0 : A.toolbarEnd) == null ? void 0 : H.call(A), i = Ye(n), s = Be.test(r), l = n.firstDay ?? a.firstDay, c = F(null), [y, T] = V(!1), v = f.toDate(t.getDate()), p = f.toDate(n.now ? f.from(n.now) : f.now()), [D, m] = V(v.getFullYear()), [b, w] = V(v.getMonth()), M = new Intl.DateTimeFormat(n.locale, { month: "short" }), x = new Intl.DateTimeFormat(n.locale, { month: "long" }), g = new Intl.DateTimeFormat(n.locale, { weekday: "short" }), k = Array.from(
86
86
  { length: 12 },
87
- (O, A) => M.format(new Date(2020, A, 1))
88
- ), T = () => {
89
- const O = m.toDate(t.getDate());
90
- b(O.getFullYear()), S(O.getMonth()), D(!0);
91
- }, C = (O) => {
92
- const A = h * 12 + w + O;
93
- b(Math.floor(A / 12)), S((A % 12 + 12) % 12);
94
- }, E = (O) => {
95
- t.gotoDate(O), D(!1);
87
+ (S, I) => M.format(new Date(2020, I, 1))
88
+ ), j = () => {
89
+ const S = f.toDate(t.getDate());
90
+ m(S.getFullYear()), w(S.getMonth()), T(!0);
91
+ }, $ = (S) => {
92
+ const I = D * 12 + b + S;
93
+ m(Math.floor(I / 12)), w((I % 12 + 12) % 12);
94
+ }, h = (S) => {
95
+ t.gotoDate(S), T(!1);
96
96
  };
97
97
  R(() => {
98
- const O = (H) => {
99
- (H.ctrlKey || H.metaKey) && (H.key === "m" || H.key === "M") ? (H.preventDefault(), T()) : H.key === "Escape" && D(!1);
100
- }, A = (H) => {
101
- c.current && !c.current.contains(H.target) && D(!1);
98
+ const S = (N) => {
99
+ (N.ctrlKey || N.metaKey) && (N.key === "m" || N.key === "M") ? (N.preventDefault(), j()) : N.key === "Escape" && T(!1);
100
+ }, I = (N) => {
101
+ c.current && !c.current.contains(N.target) && T(!1);
102
102
  };
103
- return document.addEventListener("keydown", O), document.addEventListener("mousedown", A), () => {
104
- document.removeEventListener("keydown", O), document.removeEventListener("mousedown", A);
103
+ return document.addEventListener("keydown", S), document.addEventListener("mousedown", I), () => {
104
+ document.removeEventListener("keydown", S), document.removeEventListener("mousedown", I);
105
105
  };
106
106
  }, []);
107
- const P = (() => {
108
- if (d) return { cells: [], dows: [] };
109
- const O = m.from(`${h}-${nt(w + 1)}-01`), A = (m.dayOfWeek(O) - l + 7) % 7, H = m.subtract(O, { days: A }), xt = Array.from({ length: 42 }, (Pt, ke) => m.toDate(m.add(H, { days: ke }))), Me = xt.slice(0, 7).map((Pt) => y.format(Pt));
107
+ const E = (() => {
108
+ if (s) return { cells: [], dows: [] };
109
+ const S = f.from(`${D}-${nt(b + 1)}-01`), I = (f.dayOfWeek(S) - l + 7) % 7, N = f.subtract(S, { days: I }), xt = Array.from({ length: 42 }, (Pt, Ce) => f.toDate(f.add(N, { days: Ce }))), Me = xt.slice(0, 7).map((Pt) => g.format(Pt));
110
110
  return { cells: xt, dows: Me };
111
111
  })();
112
- return /* @__PURE__ */ k("div", { "data-rsv": "toolbar-wrap", class: N((_ = n.classNames) == null ? void 0 : _.toolbar), ref: c, children: [
113
- /* @__PURE__ */ k("div", { "data-rsv": "toolbar", children: [
112
+ return /* @__PURE__ */ C("div", { "data-rsv": "toolbar-wrap", class: K((L = n.classNames) == null ? void 0 : L.toolbar), ref: c, children: [
113
+ /* @__PURE__ */ C("div", { "data-rsv": "toolbar", children: [
114
114
  /* @__PURE__ */ u("div", { "data-rsv": "toolbar-section", "data-rsv-area": "start", children: o }),
115
- /* @__PURE__ */ k("div", { "data-rsv": "toolbar-section", "data-rsv-area": "nav", children: [
115
+ /* @__PURE__ */ C("div", { "data-rsv": "toolbar-section", "data-rsv-area": "nav", children: [
116
116
  /* @__PURE__ */ u(
117
117
  "button",
118
118
  {
@@ -136,88 +136,88 @@ function Ve({ api: t, title: e, activeView: r, options: n }) {
136
136
  children: rt.prev
137
137
  }
138
138
  ),
139
- /* @__PURE__ */ k("div", { "data-rsv": "datepicker-anchor", children: [
140
- /* @__PURE__ */ k(
139
+ /* @__PURE__ */ C("div", { "data-rsv": "datepicker-anchor", children: [
140
+ /* @__PURE__ */ C(
141
141
  "button",
142
142
  {
143
143
  type: "button",
144
144
  "data-rsv": "title",
145
145
  "aria-haspopup": "dialog",
146
- "aria-expanded": p,
146
+ "aria-expanded": y,
147
147
  title: `${e} · Ctrl+M`,
148
- onClick: () => p ? D(!1) : T(),
148
+ onClick: () => y ? T(!1) : j(),
149
149
  children: [
150
- /* @__PURE__ */ u(Be, {}),
150
+ /* @__PURE__ */ u(Ke, {}),
151
151
  e
152
152
  ]
153
153
  }
154
154
  ),
155
- p && /* @__PURE__ */ k(
155
+ y && /* @__PURE__ */ C(
156
156
  "div",
157
157
  {
158
158
  "data-rsv": "datepicker",
159
- "data-rsv-mode": d ? "month" : "day",
159
+ "data-rsv-mode": s ? "month" : "day",
160
160
  role: "dialog",
161
161
  "aria-label": e,
162
162
  children: [
163
- /* @__PURE__ */ k("div", { "data-rsv": "dp-head", children: [
163
+ /* @__PURE__ */ C("div", { "data-rsv": "dp-head", children: [
164
164
  /* @__PURE__ */ u(
165
165
  "button",
166
166
  {
167
167
  type: "button",
168
168
  "data-rsv": "dp-nav",
169
169
  "aria-label": a.prev,
170
- onClick: () => d ? b((O) => O - 1) : C(-1),
170
+ onClick: () => s ? m((S) => S - 1) : $(-1),
171
171
  children: rt.prev
172
172
  }
173
173
  ),
174
- /* @__PURE__ */ u("span", { "data-rsv": "dp-label", children: d ? h : `${x.format(new Date(h, w, 1))} ${h}` }),
174
+ /* @__PURE__ */ u("span", { "data-rsv": "dp-label", children: s ? D : `${x.format(new Date(D, b, 1))} ${D}` }),
175
175
  /* @__PURE__ */ u(
176
176
  "button",
177
177
  {
178
178
  type: "button",
179
179
  "data-rsv": "dp-nav",
180
180
  "aria-label": a.next,
181
- onClick: () => d ? b((O) => O + 1) : C(1),
181
+ onClick: () => s ? m((S) => S + 1) : $(1),
182
182
  children: rt.next
183
183
  }
184
184
  )
185
185
  ] }),
186
- d ? /* @__PURE__ */ u("div", { "data-rsv": "dp-grid", children: f.map((O, A) => /* @__PURE__ */ u(
186
+ s ? /* @__PURE__ */ u("div", { "data-rsv": "dp-grid", children: k.map((S, I) => /* @__PURE__ */ u(
187
187
  "button",
188
188
  {
189
189
  type: "button",
190
190
  "data-rsv": "dp-month",
191
191
  "data-active": String(
192
- h === v.getFullYear() && A === v.getMonth()
192
+ D === v.getFullYear() && I === v.getMonth()
193
193
  ),
194
194
  "data-today": String(
195
- h === g.getFullYear() && A === g.getMonth()
195
+ D === p.getFullYear() && I === p.getMonth()
196
196
  ),
197
- onClick: () => E(`${h}-${nt(A + 1)}-01`),
198
- children: O
197
+ onClick: () => h(`${D}-${nt(I + 1)}-01`),
198
+ children: S
199
199
  },
200
- O
201
- )) }) : /* @__PURE__ */ k("div", { "data-rsv": "dp-days", children: [
202
- P.dows.map((O, A) => /* @__PURE__ */ u("div", { "data-rsv": "dp-dow", children: O }, `dow-${A}`)),
203
- P.cells.map((O) => {
204
- const A = `${O.getFullYear()}-${nt(O.getMonth() + 1)}-${nt(O.getDate())}`;
200
+ S
201
+ )) }) : /* @__PURE__ */ C("div", { "data-rsv": "dp-days", children: [
202
+ E.dows.map((S, I) => /* @__PURE__ */ u("div", { "data-rsv": "dp-dow", children: S }, `dow-${I}`)),
203
+ E.cells.map((S) => {
204
+ const I = `${S.getFullYear()}-${nt(S.getMonth() + 1)}-${nt(S.getDate())}`;
205
205
  return /* @__PURE__ */ u(
206
206
  "button",
207
207
  {
208
208
  type: "button",
209
209
  "data-rsv": "dp-day",
210
- "data-other": String(O.getMonth() !== w),
210
+ "data-other": String(S.getMonth() !== b),
211
211
  "data-active": String(
212
- O.getFullYear() === v.getFullYear() && O.getMonth() === v.getMonth() && O.getDate() === v.getDate()
212
+ S.getFullYear() === v.getFullYear() && S.getMonth() === v.getMonth() && S.getDate() === v.getDate()
213
213
  ),
214
214
  "data-today": String(
215
- O.getFullYear() === g.getFullYear() && O.getMonth() === g.getMonth() && O.getDate() === g.getDate()
215
+ S.getFullYear() === p.getFullYear() && S.getMonth() === p.getMonth() && S.getDate() === p.getDate()
216
216
  ),
217
- onClick: () => E(A),
218
- children: O.getDate()
217
+ onClick: () => h(I),
218
+ children: S.getDate()
219
219
  },
220
- A
220
+ I
221
221
  );
222
222
  })
223
223
  ] })
@@ -238,9 +238,9 @@ function Ve({ api: t, title: e, activeView: r, options: n }) {
238
238
  }
239
239
  )
240
240
  ] }),
241
- /* @__PURE__ */ k("div", { "data-rsv": "toolbar-section", "data-rsv-area": "end", children: [
242
- s,
243
- n.onAddClick && /* @__PURE__ */ k(
241
+ /* @__PURE__ */ C("div", { "data-rsv": "toolbar-section", "data-rsv-area": "end", children: [
242
+ d,
243
+ n.onAddClick && /* @__PURE__ */ C(
244
244
  "button",
245
245
  {
246
246
  type: "button",
@@ -255,39 +255,39 @@ function Ve({ api: t, title: e, activeView: r, options: n }) {
255
255
  )
256
256
  ] })
257
257
  ] }),
258
- i.length > 0 && /* @__PURE__ */ u("div", { "data-rsv": "toolbar-views", role: "tablist", children: i.map((O) => /* @__PURE__ */ u(
258
+ i.length > 0 && /* @__PURE__ */ u("div", { "data-rsv": "toolbar-views", role: "tablist", children: i.map((S) => /* @__PURE__ */ u(
259
259
  "button",
260
260
  {
261
261
  type: "button",
262
262
  "data-rsv": "view-tab",
263
263
  role: "tab",
264
- "aria-selected": O === r,
265
- "data-active": String(O === r),
266
- title: a.viewHint(a.views[O] ?? O),
267
- onClick: () => t.changeView(O),
268
- children: a.views[O] ?? O
264
+ "aria-selected": S === r,
265
+ "data-active": String(S === r),
266
+ title: a.viewHint(a.views[S] ?? S),
267
+ onClick: () => t.changeView(S),
268
+ children: a.views[S] ?? S
269
269
  },
270
- O
270
+ S
271
271
  )) })
272
272
  ] });
273
273
  }
274
- function dt(t) {
274
+ function st(t) {
275
275
  return t < 10 ? `0${t}` : String(t);
276
276
  }
277
- function Ye(t) {
277
+ function We(t) {
278
278
  const e = (Math.round(t) % 1440 + 1440) % 1440;
279
- return `${dt(Math.floor(e / 60))}:${dt(e % 60)}`;
279
+ return `${st(Math.floor(e / 60))}:${st(e % 60)}`;
280
280
  }
281
- function We(t) {
281
+ function Ge(t) {
282
282
  const e = Math.max(0, Math.round(t));
283
- return `${dt(Math.floor(e / 60))}:${dt(e % 60)}:00`;
283
+ return `${st(Math.floor(e / 60))}:${st(e % 60)}:00`;
284
284
  }
285
285
  function ct(t, e) {
286
286
  if (!e) return null;
287
287
  const r = new Intl.DateTimeFormat(t, e);
288
288
  return (n) => r.format(n);
289
289
  }
290
- function st(t, e, r) {
290
+ function dt(t, e, r) {
291
291
  if (e === !1) return null;
292
292
  const n = new Intl.DateTimeFormat(t, e ?? r);
293
293
  return (a) => n.format(a);
@@ -295,30 +295,30 @@ function st(t, e, r) {
295
295
  function ee(t, e) {
296
296
  t.trigger("navLinkDay", { date: e });
297
297
  const r = t.hasView("timeGridDay") ? "timeGridDay" : t.hasView("dayGridDay") ? "dayGridDay" : null;
298
- r && (t.gotoDate(m.toISOString(e)), t.changeView(r));
298
+ r && (t.gotoDate(f.toISOString(e)), t.changeView(r));
299
299
  }
300
- const at = 1440, Ge = {
300
+ const at = 1440, Ue = {
301
301
  moveLeft: ["ArrowLeft"],
302
302
  moveRight: ["ArrowRight"],
303
303
  moveUp: ["ArrowUp"],
304
304
  moveDown: ["ArrowDown"],
305
305
  activate: ["Enter", " "]
306
306
  };
307
- function Ue(t, e) {
308
- const r = Object.entries(Ge);
307
+ function ze(t, e) {
308
+ const r = Object.entries(Ue);
309
309
  for (const [n, a] of r)
310
310
  if (((e == null ? void 0 : e[n]) ?? a).includes(t)) return n;
311
311
  return null;
312
312
  }
313
313
  function re(t, e) {
314
- const { api: r, event: n, kind: a } = e, o = X(e.snap ?? "00:30"), s = Ue(t.key, e.shortcuts);
315
- if (!s) return;
316
- if (s === "activate") {
314
+ const { api: r, event: n, kind: a } = e, o = X(e.snap ?? "00:30"), d = ze(t.key, e.shortcuts);
315
+ if (!d) return;
316
+ if (d === "activate") {
317
317
  t.preventDefault(), r.trigger("eventClick", { event: n });
318
318
  return;
319
319
  }
320
320
  let i = 0;
321
- switch (s) {
321
+ switch (d) {
322
322
  case "moveLeft":
323
323
  i = -at;
324
324
  break;
@@ -333,13 +333,13 @@ function re(t, e) {
333
333
  break;
334
334
  }
335
335
  t.preventDefault();
336
- const d = ht(n.start, n.end, i, m);
337
- if (r.moveEvent(n.id, d.start, d.end)) {
336
+ const s = ht(n.start, n.end, i, f);
337
+ if (r.moveEvent(n.id, s.start, s.end)) {
338
338
  const l = r.getEventById(n.id);
339
339
  l && r.trigger("eventDrop", { event: l });
340
340
  }
341
341
  }
342
- function ze(t, e) {
342
+ function qe(t, e) {
343
343
  var n;
344
344
  const r = document.elementFromPoint(t, e);
345
345
  return ((n = r == null ? void 0 : r.closest('[data-rsv="day"]')) == null ? void 0 : n.dataset.date) ?? null;
@@ -349,32 +349,32 @@ function Xe(t, e) {
349
349
  return;
350
350
  const { api: n } = e;
351
351
  let a = e.startDate, o = !1;
352
- const s = (d) => {
353
- const l = ze(d.clientX, d.clientY);
352
+ const d = (s) => {
353
+ const l = qe(s.clientX, s.clientY);
354
354
  l && l !== e.startDate && (o = !0), l && (a = l);
355
355
  }, i = () => {
356
- var D;
357
- if (document.removeEventListener("pointermove", s), document.removeEventListener("pointerup", i), !o) return;
358
- (D = e.onRangeSelect) == null || D.call(e);
359
- const d = m.from(e.startDate), l = m.from(a), [c, p] = m.isBefore(d, l) ? [d, l] : [l, d];
360
- n.select(m.toISOString(c), m.toISOString(m.add(p, { days: 1 })));
356
+ var T;
357
+ if (document.removeEventListener("pointermove", d), document.removeEventListener("pointerup", i), !o) return;
358
+ (T = e.onRangeSelect) == null || T.call(e);
359
+ const s = f.from(e.startDate), l = f.from(a), [c, y] = f.isBefore(s, l) ? [s, l] : [l, s];
360
+ n.select(f.toISOString(c), f.toISOString(f.add(y, { days: 1 })));
361
361
  };
362
- document.addEventListener("pointermove", s), document.addEventListener("pointerup", i);
362
+ document.addEventListener("pointermove", d), document.addEventListener("pointerup", i);
363
363
  }
364
- function qe(t) {
364
+ function _e(t) {
365
365
  if (Array.isArray(t)) return t;
366
366
  }
367
- function _e(t, e) {
367
+ function Ze(t, e) {
368
368
  var r = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
369
369
  if (r != null) {
370
- var n, a, o, s, i = [], d = !0, l = !1;
370
+ var n, a, o, d, i = [], s = !0, l = !1;
371
371
  try {
372
- if (o = (r = r.call(t)).next, e !== 0) for (; !(d = (n = o.call(r)).done) && (i.push(n.value), i.length !== e); d = !0) ;
372
+ if (o = (r = r.call(t)).next, e !== 0) for (; !(s = (n = o.call(r)).done) && (i.push(n.value), i.length !== e); s = !0) ;
373
373
  } catch (c) {
374
374
  l = !0, a = c;
375
375
  } finally {
376
376
  try {
377
- if (!d && r.return != null && (s = r.return(), Object(s) !== s)) return;
377
+ if (!s && r.return != null && (d = r.return(), Object(d) !== d)) return;
378
378
  } finally {
379
379
  if (l) throw a;
380
380
  }
@@ -394,17 +394,17 @@ function ne(t, e) {
394
394
  return r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set" ? Array.from(t) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? bt(t, e) : void 0;
395
395
  }
396
396
  }
397
- function Ze() {
397
+ function Je() {
398
398
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
399
399
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
400
400
  }
401
401
  function ae(t, e) {
402
- return qe(t) || _e(t, e) || ne(t, e) || Ze();
402
+ return _e(t) || Ze(t, e) || ne(t, e) || Je();
403
403
  }
404
- var ft = {}, Z = {}, Rt;
404
+ var ft = {}, Z = {}, Ft;
405
405
  function oe() {
406
- if (Rt) return Z;
407
- Rt = 1, Object.defineProperty(Z, "__esModule", { value: !0 }), Z.bind = void 0;
406
+ if (Ft) return Z;
407
+ Ft = 1, Object.defineProperty(Z, "__esModule", { value: !0 }), Z.bind = void 0;
408
408
  function t(e, r) {
409
409
  var n = r.type, a = r.listener, o = r.options;
410
410
  return e.addEventListener(n, a, o), function() {
@@ -413,20 +413,20 @@ function oe() {
413
413
  }
414
414
  return Z.bind = t, Z;
415
415
  }
416
- var Y = {}, Ht;
417
- function Je() {
418
- if (Ht) return Y;
419
- Ht = 1;
420
- var t = Y && Y.__assign || function() {
416
+ var G = {}, Rt;
417
+ function Qe() {
418
+ if (Rt) return G;
419
+ Rt = 1;
420
+ var t = G && G.__assign || function() {
421
421
  return t = Object.assign || function(o) {
422
- for (var s, i = 1, d = arguments.length; i < d; i++) {
423
- s = arguments[i];
424
- for (var l in s) Object.prototype.hasOwnProperty.call(s, l) && (o[l] = s[l]);
422
+ for (var d, i = 1, s = arguments.length; i < s; i++) {
423
+ d = arguments[i];
424
+ for (var l in d) Object.prototype.hasOwnProperty.call(d, l) && (o[l] = d[l]);
425
425
  }
426
426
  return o;
427
427
  }, t.apply(this, arguments);
428
428
  };
429
- Object.defineProperty(Y, "__esModule", { value: !0 }), Y.bindAll = void 0;
429
+ Object.defineProperty(G, "__esModule", { value: !0 }), G.bindAll = void 0;
430
430
  var e = /* @__PURE__ */ oe();
431
431
  function r(o) {
432
432
  if (!(typeof o > "u"))
@@ -434,46 +434,46 @@ function Je() {
434
434
  capture: o
435
435
  } : o;
436
436
  }
437
- function n(o, s) {
438
- if (s == null)
437
+ function n(o, d) {
438
+ if (d == null)
439
439
  return o;
440
- var i = t(t({}, o), { options: t(t({}, r(s)), r(o.options)) });
440
+ var i = t(t({}, o), { options: t(t({}, r(d)), r(o.options)) });
441
441
  return i;
442
442
  }
443
- function a(o, s, i) {
444
- var d = s.map(function(l) {
443
+ function a(o, d, i) {
444
+ var s = d.map(function(l) {
445
445
  var c = n(l, i);
446
446
  return (0, e.bind)(o, c);
447
447
  });
448
448
  return function() {
449
- d.forEach(function(c) {
449
+ s.forEach(function(c) {
450
450
  return c();
451
451
  });
452
452
  };
453
453
  }
454
- return Y.bindAll = a, Y;
454
+ return G.bindAll = a, G;
455
455
  }
456
456
  var Lt;
457
- function Qe() {
457
+ function tr() {
458
458
  return Lt || (Lt = 1, (function(t) {
459
459
  Object.defineProperty(t, "__esModule", { value: !0 }), t.bindAll = t.bind = void 0;
460
460
  var e = /* @__PURE__ */ oe();
461
461
  Object.defineProperty(t, "bind", { enumerable: !0, get: function() {
462
462
  return e.bind;
463
463
  } });
464
- var r = /* @__PURE__ */ Je();
464
+ var r = /* @__PURE__ */ Qe();
465
465
  Object.defineProperty(t, "bindAll", { enumerable: !0, get: function() {
466
466
  return r.bindAll;
467
467
  } });
468
468
  })(ft)), ft;
469
469
  }
470
- var q = /* @__PURE__ */ Qe(), ie = "data-pdnd-honey-pot";
471
- function de(t) {
470
+ var _ = /* @__PURE__ */ tr(), ie = "data-pdnd-honey-pot";
471
+ function se(t) {
472
472
  return t instanceof Element && t.hasAttribute(ie);
473
473
  }
474
- function se(t) {
474
+ function de(t) {
475
475
  var e = document.elementsFromPoint(t.x, t.y), r = ae(e, 2), n = r[0], a = r[1];
476
- return n ? de(n) ? a ?? null : n : null;
476
+ return n ? se(n) ? a ?? null : n : null;
477
477
  }
478
478
  function Q(t) {
479
479
  "@babel/helpers - typeof";
@@ -483,7 +483,7 @@ function Q(t) {
483
483
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
484
484
  }, Q(t);
485
485
  }
486
- function tr(t, e) {
486
+ function er(t, e) {
487
487
  if (Q(t) != "object" || !t) return t;
488
488
  var r = t[Symbol.toPrimitive];
489
489
  if (r !== void 0) {
@@ -493,12 +493,12 @@ function tr(t, e) {
493
493
  }
494
494
  return (e === "string" ? String : Number)(t);
495
495
  }
496
- function er(t) {
497
- var e = tr(t, "string");
496
+ function rr(t) {
497
+ var e = er(t, "string");
498
498
  return Q(e) == "symbol" ? e : e + "";
499
499
  }
500
500
  function ut(t, e, r) {
501
- return (e = er(e)) in t ? Object.defineProperty(t, e, {
501
+ return (e = rr(e)) in t ? Object.defineProperty(t, e, {
502
502
  value: r,
503
503
  enumerable: !0,
504
504
  configurable: !0,
@@ -516,21 +516,21 @@ var le = 2147483647, ce = {
516
516
  width: "auto",
517
517
  height: "auto"
518
518
  };
519
- function G(t) {
519
+ function z(t) {
520
520
  var e = null;
521
521
  return function() {
522
522
  if (!e) {
523
523
  for (var n = arguments.length, a = new Array(n), o = 0; o < n; o++)
524
524
  a[o] = arguments[o];
525
- var s = t.apply(this, a);
525
+ var d = t.apply(this, a);
526
526
  e = {
527
- result: s
527
+ result: d
528
528
  };
529
529
  }
530
530
  return e.result;
531
531
  };
532
532
  }
533
- var z = G(function() {
533
+ var q = z(function() {
534
534
  return typeof HTMLElement < "u" && typeof HTMLElement.prototype.showPopover == "function";
535
535
  });
536
536
  function Nt(t, e) {
@@ -555,32 +555,32 @@ function Bt(t) {
555
555
  return t;
556
556
  }
557
557
  var tt = 2, Kt = tt / 2;
558
- function rr(t) {
558
+ function nr(t) {
559
559
  return {
560
560
  x: Math.floor(t.x),
561
561
  y: Math.floor(t.y)
562
562
  };
563
563
  }
564
- function nr(t) {
564
+ function ar(t) {
565
565
  return {
566
566
  x: t.x - Kt,
567
567
  y: t.y - Kt
568
568
  };
569
569
  }
570
- function ar(t) {
570
+ function or(t) {
571
571
  return {
572
572
  x: Math.max(t.x, 0),
573
573
  y: Math.max(t.y, 0)
574
574
  };
575
575
  }
576
- function or(t) {
576
+ function ir(t) {
577
577
  return {
578
578
  x: Math.min(t.x, window.innerWidth - tt),
579
579
  y: Math.min(t.y, window.innerHeight - tt)
580
580
  };
581
581
  }
582
- function Vt(t) {
583
- var e = t.client, r = or(ar(nr(rr(e))));
582
+ function Yt(t) {
583
+ var e = t.client, r = ir(or(ar(nr(e))));
584
584
  return DOMRect.fromRect({
585
585
  x: r.x,
586
586
  y: r.y,
@@ -588,7 +588,7 @@ function Vt(t) {
588
588
  height: tt
589
589
  });
590
590
  }
591
- function Yt(t) {
591
+ function Vt(t) {
592
592
  var e = t.clientRect;
593
593
  return {
594
594
  left: "".concat(e.left, "px"),
@@ -597,7 +597,7 @@ function Yt(t) {
597
597
  height: "".concat(e.height, "px")
598
598
  };
599
599
  }
600
- function ir(t) {
600
+ function sr(t) {
601
601
  var e = t.client, r = t.clientRect;
602
602
  return (
603
603
  // is within horizontal bounds
@@ -607,13 +607,13 @@ function ir(t) {
607
607
  }
608
608
  function dr(t) {
609
609
  var e = t.initial, r = document.createElement("div");
610
- r.setAttribute(ie, "true"), z() && r.setAttribute("popover", "manual");
611
- var n = Vt({
610
+ r.setAttribute(ie, "true"), q() && r.setAttribute("popover", "manual");
611
+ var n = Yt({
612
612
  client: e
613
613
  });
614
614
  Object.assign(r.style, Bt(Bt({
615
615
  position: "fixed"
616
- }, z() ? (
616
+ }, q() ? (
617
617
  // needs to come first as it has 'inset: unset' which
618
618
  // needs to be overridden by our top / left values
619
619
  ce
@@ -634,19 +634,19 @@ function dr(t) {
634
634
  // We want this element to absorb pointer events,
635
635
  // it's kind of the whole point 😉
636
636
  pointerEvents: "auto"
637
- }, Yt({
637
+ }, Vt({
638
638
  clientRect: n
639
- }))), document.body.appendChild(r), z() && r.showPopover();
640
- var a = q.bind(window, {
639
+ }))), document.body.appendChild(r), q() && r.showPopover();
640
+ var a = _.bind(window, {
641
641
  type: "pointermove",
642
- listener: function(s) {
642
+ listener: function(d) {
643
643
  var i = {
644
- x: s.clientX,
645
- y: s.clientY
644
+ x: d.clientX,
645
+ y: d.clientY
646
646
  };
647
- n = Vt({
647
+ n = Yt({
648
648
  client: i
649
- }), Object.assign(r.style, Yt({
649
+ }), Object.assign(r.style, Vt({
650
650
  clientRect: n
651
651
  }));
652
652
  },
@@ -655,39 +655,39 @@ function dr(t) {
655
655
  capture: !0
656
656
  }
657
657
  });
658
- return function(s) {
659
- var i = s.current;
660
- if (a(), ir({
658
+ return function(d) {
659
+ var i = d.current;
660
+ if (a(), sr({
661
661
  client: i,
662
662
  clientRect: n
663
663
  })) {
664
664
  r.remove();
665
665
  return;
666
666
  }
667
- function d() {
667
+ function s() {
668
668
  l(), r.remove();
669
669
  }
670
- var l = q.bindAll(window, [
670
+ var l = _.bindAll(window, [
671
671
  {
672
672
  type: "pointerdown",
673
- listener: d
673
+ listener: s
674
674
  },
675
675
  {
676
676
  type: "pointermove",
677
- listener: d
677
+ listener: s
678
678
  },
679
679
  {
680
680
  type: "focusin",
681
- listener: d
681
+ listener: s
682
682
  },
683
683
  {
684
684
  type: "focusout",
685
- listener: d
685
+ listener: s
686
686
  },
687
687
  // a 'pointerdown' should happen before 'dragstart', but just being super safe
688
688
  {
689
689
  type: "dragstart",
690
- listener: d
690
+ listener: s
691
691
  },
692
692
  // if the user has dragged something out of the window
693
693
  // and then is dragging something back into the window
@@ -695,11 +695,11 @@ function dr(t) {
695
695
  // So if we see any of these we need to clear the post drag fix.
696
696
  {
697
697
  type: "dragenter",
698
- listener: d
698
+ listener: s
699
699
  },
700
700
  {
701
701
  type: "dragover",
702
- listener: d
702
+ listener: s
703
703
  }
704
704
  // Not adding a "wheel" event listener, as "wheel" by itself does not
705
705
  // resolve the bug.
@@ -709,10 +709,10 @@ function dr(t) {
709
709
  });
710
710
  };
711
711
  }
712
- function sr() {
712
+ function lr() {
713
713
  var t = null;
714
714
  function e() {
715
- return t = null, q.bind(window, {
715
+ return t = null, _.bind(window, {
716
716
  type: "pointermove",
717
717
  listener: function(a) {
718
718
  t = {
@@ -730,22 +730,22 @@ function sr() {
730
730
  function r() {
731
731
  var n = null;
732
732
  return function(o) {
733
- var s = o.eventName, i = o.payload;
734
- if (s === "onDragStart") {
735
- var d = i.location.initial.input, l = t ?? {
736
- x: d.clientX,
737
- y: d.clientY
733
+ var d = o.eventName, i = o.payload;
734
+ if (d === "onDragStart") {
735
+ var s = i.location.initial.input, l = t ?? {
736
+ x: s.clientX,
737
+ y: s.clientY
738
738
  };
739
739
  n = dr({
740
740
  initial: l
741
741
  });
742
742
  }
743
- if (s === "onDrop") {
744
- var c, p = i.location.current.input;
743
+ if (d === "onDrop") {
744
+ var c, y = i.location.current.input;
745
745
  (c = n) === null || c === void 0 || c({
746
746
  current: {
747
- x: p.clientX,
748
- y: p.clientY
747
+ x: y.clientX,
748
+ y: y.clientY
749
749
  }
750
750
  }), n = null, t = null;
751
751
  }
@@ -756,32 +756,32 @@ function sr() {
756
756
  getOnPostDispatch: r
757
757
  };
758
758
  }
759
- function lr(t) {
759
+ function cr(t) {
760
760
  if (Array.isArray(t)) return bt(t);
761
761
  }
762
- function cr(t) {
762
+ function ur(t) {
763
763
  if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null) return Array.from(t);
764
764
  }
765
- function ur() {
765
+ function vr() {
766
766
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
767
767
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
768
768
  }
769
769
  function ue(t) {
770
- return lr(t) || cr(t) || ne(t) || ur();
770
+ return cr(t) || ur(t) || ne(t) || vr();
771
771
  }
772
- var vr = G(function() {
772
+ var fr = z(function() {
773
773
  return process.env.NODE_ENV === "test" ? !1 : navigator.userAgent.includes("Firefox");
774
- }), vt = G(function() {
774
+ }), vt = z(function() {
775
775
  if (process.env.NODE_ENV === "test")
776
776
  return !1;
777
777
  var e = navigator, r = e.userAgent;
778
778
  return r.includes("AppleWebKit") && !r.includes("Chrome");
779
779
  });
780
- function fr(t) {
780
+ function gr(t) {
781
781
  return "nodeName" in t;
782
782
  }
783
- function gr(t) {
784
- return fr(t) && t.ownerDocument !== document;
783
+ function mr(t) {
784
+ return gr(t) && t.ownerDocument !== document;
785
785
  }
786
786
  var wt = {
787
787
  isLeavingWindow: Symbol("leaving"),
@@ -800,7 +800,7 @@ var wt = {
800
800
  function n() {
801
801
  r = e();
802
802
  }
803
- q.bindAll(
803
+ _.bindAll(
804
804
  window,
805
805
  [{
806
806
  type: "dragstart",
@@ -831,17 +831,17 @@ var wt = {
831
831
  }
832
832
  );
833
833
  })();
834
- function mr(t) {
834
+ function yr(t) {
835
835
  var e = t.dragLeave;
836
836
  return vt() ? e.hasOwnProperty(wt.isLeavingWindow) : !1;
837
837
  }
838
- function yr(t) {
838
+ function pr(t) {
839
839
  var e = t.dragLeave, r = e.type, n = e.relatedTarget;
840
- return r !== "dragleave" ? !1 : vt() ? mr({
840
+ return r !== "dragleave" ? !1 : vt() ? yr({
841
841
  dragLeave: e
842
- }) : n == null ? !0 : vr() ? gr(n) : n instanceof HTMLIFrameElement;
842
+ }) : n == null ? !0 : fr() ? mr(n) : n instanceof HTMLIFrameElement;
843
843
  }
844
- function pr(t) {
844
+ function hr(t) {
845
845
  var e = t.onDragEnd;
846
846
  return [
847
847
  // ## Detecting drag ending for removed draggables
@@ -899,10 +899,10 @@ function J(t) {
899
899
  pageY: t.pageY
900
900
  };
901
901
  }
902
- var hr = function(e) {
902
+ var br = function(e) {
903
903
  var r = [], n = null, a = function() {
904
- for (var s = arguments.length, i = new Array(s), d = 0; d < s; d++)
905
- i[d] = arguments[d];
904
+ for (var d = arguments.length, i = new Array(d), s = 0; s < d; s++)
905
+ i[s] = arguments[s];
906
906
  r = i, !n && (n = requestAnimationFrame(function() {
907
907
  n = null, e.apply(void 0, r);
908
908
  }));
@@ -910,7 +910,7 @@ var hr = function(e) {
910
910
  return a.cancel = function() {
911
911
  n && (cancelAnimationFrame(n), n = null);
912
912
  }, a;
913
- }, gt = hr(function(t) {
913
+ }, gt = br(function(t) {
914
914
  return t();
915
915
  }), ot = /* @__PURE__ */ (function() {
916
916
  var t = null;
@@ -931,7 +931,7 @@ var hr = function(e) {
931
931
  flush: r
932
932
  };
933
933
  })();
934
- function br(t) {
934
+ function wr(t) {
935
935
  var e = t.source, r = t.initial, n = t.dispatchEvent, a = {
936
936
  dropTargets: []
937
937
  };
@@ -940,9 +940,9 @@ function br(t) {
940
940
  dropTargets: i.payload.location.current.dropTargets
941
941
  };
942
942
  }
943
- var s = {
944
- start: function(d) {
945
- var l = d.nativeSetDragImage, c = {
943
+ var d = {
944
+ start: function(s) {
945
+ var l = s.nativeSetDragImage, c = {
946
946
  current: r,
947
947
  previous: a,
948
948
  initial: r
@@ -964,8 +964,8 @@ function br(t) {
964
964
  });
965
965
  });
966
966
  },
967
- dragUpdate: function(d) {
968
- var l = d.current;
967
+ dragUpdate: function(s) {
968
+ var l = s.current;
969
969
  ot.flush(), gt.cancel(), o({
970
970
  eventName: "onDropTargetChange",
971
971
  payload: {
@@ -978,8 +978,8 @@ function br(t) {
978
978
  }
979
979
  });
980
980
  },
981
- drag: function(d) {
982
- var l = d.current;
981
+ drag: function(s) {
982
+ var l = s.current;
983
983
  gt(function() {
984
984
  ot.flush();
985
985
  var c = {
@@ -996,8 +996,8 @@ function br(t) {
996
996
  });
997
997
  });
998
998
  },
999
- drop: function(d) {
1000
- var l = d.current, c = d.updatedSourcePayload;
999
+ drop: function(s) {
1000
+ var l = s.current, c = s.updatedSourcePayload;
1001
1001
  ot.flush(), gt.cancel(), o({
1002
1002
  eventName: "onDrop",
1003
1003
  payload: {
@@ -1011,7 +1011,7 @@ function br(t) {
1011
1011
  });
1012
1012
  }
1013
1013
  };
1014
- return s;
1014
+ return d;
1015
1015
  }
1016
1016
  var Dt = {
1017
1017
  isActive: !1
@@ -1019,10 +1019,10 @@ var Dt = {
1019
1019
  function ve() {
1020
1020
  return !Dt.isActive;
1021
1021
  }
1022
- function wr(t) {
1022
+ function Dr(t) {
1023
1023
  return t.dataTransfer ? t.dataTransfer.setDragImage.bind(t.dataTransfer) : null;
1024
1024
  }
1025
- function Dr(t) {
1025
+ function Sr(t) {
1026
1026
  var e = t.current, r = t.next;
1027
1027
  if (e.length !== r.length)
1028
1028
  return !0;
@@ -1031,68 +1031,68 @@ function Dr(t) {
1031
1031
  return !0;
1032
1032
  return !1;
1033
1033
  }
1034
- function Sr(t) {
1034
+ function Or(t) {
1035
1035
  var e = t.event, r = t.dragType, n = t.getDropTargetsOver, a = t.dispatchEvent;
1036
1036
  if (!ve())
1037
1037
  return;
1038
- var o = Or({
1038
+ var o = Tr({
1039
1039
  event: e,
1040
1040
  dragType: r,
1041
1041
  getDropTargetsOver: n
1042
1042
  });
1043
1043
  Dt.isActive = !0;
1044
- var s = {
1044
+ var d = {
1045
1045
  current: o
1046
1046
  };
1047
1047
  mt({
1048
1048
  event: e,
1049
1049
  current: o.dropTargets
1050
1050
  });
1051
- var i = br({
1051
+ var i = wr({
1052
1052
  source: r.payload,
1053
1053
  dispatchEvent: a,
1054
1054
  initial: o
1055
1055
  });
1056
- function d(v) {
1057
- var g = Dr({
1058
- current: s.current.dropTargets,
1056
+ function s(v) {
1057
+ var p = Sr({
1058
+ current: d.current.dropTargets,
1059
1059
  next: v.dropTargets
1060
1060
  });
1061
- s.current = v, g && i.dragUpdate({
1062
- current: s.current
1061
+ d.current = v, p && i.dragUpdate({
1062
+ current: d.current
1063
1063
  });
1064
1064
  }
1065
1065
  function l(v) {
1066
- var g = J(v), h = de(v.target) ? se({
1067
- x: g.clientX,
1068
- y: g.clientY
1069
- }) : v.target, b = n({
1070
- target: h,
1071
- input: g,
1066
+ var p = J(v), D = se(v.target) ? de({
1067
+ x: p.clientX,
1068
+ y: p.clientY
1069
+ }) : v.target, m = n({
1070
+ target: D,
1071
+ input: p,
1072
1072
  source: r.payload,
1073
- current: s.current.dropTargets
1073
+ current: d.current.dropTargets
1074
1074
  });
1075
- b.length && (v.preventDefault(), mt({
1075
+ m.length && (v.preventDefault(), mt({
1076
1076
  event: v,
1077
- current: b
1078
- })), d({
1079
- dropTargets: b,
1080
- input: g
1077
+ current: m
1078
+ })), s({
1079
+ dropTargets: m,
1080
+ input: p
1081
1081
  });
1082
1082
  }
1083
1083
  function c() {
1084
- s.current.dropTargets.length && d({
1084
+ d.current.dropTargets.length && s({
1085
1085
  dropTargets: [],
1086
- input: s.current.input
1086
+ input: d.current.input
1087
1087
  }), i.drop({
1088
- current: s.current,
1088
+ current: d.current,
1089
1089
  updatedSourcePayload: null
1090
- }), p();
1090
+ }), y();
1091
1091
  }
1092
- function p() {
1093
- Dt.isActive = !1, D();
1092
+ function y() {
1093
+ Dt.isActive = !1, T();
1094
1094
  }
1095
- var D = q.bindAll(
1095
+ var T = _.bindAll(
1096
1096
  window,
1097
1097
  [{
1098
1098
  // 👋 Note: we are repurposing the `dragover` event as our `drag` event
@@ -1102,9 +1102,9 @@ function Sr(t) {
1102
1102
  // Because we are binding to `window` - our `dragover` is effectively the same as a `drag`
1103
1103
  // 🦊😤
1104
1104
  type: "dragover",
1105
- listener: function(g) {
1106
- l(g), i.drag({
1107
- current: s.current
1105
+ listener: function(p) {
1106
+ l(p), i.drag({
1107
+ current: d.current
1108
1108
  });
1109
1109
  }
1110
1110
  }, {
@@ -1112,34 +1112,34 @@ function Sr(t) {
1112
1112
  listener: l
1113
1113
  }, {
1114
1114
  type: "dragleave",
1115
- listener: function(g) {
1116
- yr({
1117
- dragLeave: g
1118
- }) && (d({
1119
- input: s.current.input,
1115
+ listener: function(p) {
1116
+ pr({
1117
+ dragLeave: p
1118
+ }) && (s({
1119
+ input: d.current.input,
1120
1120
  dropTargets: []
1121
1121
  }), r.startedFrom === "external" && c());
1122
1122
  }
1123
1123
  }, {
1124
1124
  // A "drop" can only happen if the browser allowed the drop
1125
1125
  type: "drop",
1126
- listener: function(g) {
1127
- if (s.current = {
1128
- dropTargets: s.current.dropTargets,
1129
- input: J(g)
1130
- }, !s.current.dropTargets.length) {
1126
+ listener: function(p) {
1127
+ if (d.current = {
1128
+ dropTargets: d.current.dropTargets,
1129
+ input: J(p)
1130
+ }, !d.current.dropTargets.length) {
1131
1131
  c();
1132
1132
  return;
1133
1133
  }
1134
- g.preventDefault(), mt({
1135
- event: g,
1136
- current: s.current.dropTargets
1134
+ p.preventDefault(), mt({
1135
+ event: p,
1136
+ current: d.current.dropTargets
1137
1137
  }), i.drop({
1138
- current: s.current,
1138
+ current: d.current,
1139
1139
  // When dropping something native, we need to extract the latest
1140
1140
  // `.items` from the "drop" event as it is now accessible
1141
- updatedSourcePayload: r.type === "external" ? r.getDropPayload(g) : null
1142
- }), p();
1141
+ updatedSourcePayload: r.type === "external" ? r.getDropPayload(p) : null
1142
+ }), y();
1143
1143
  }
1144
1144
  }, {
1145
1145
  // "dragend" fires when on the drag source (eg a draggable element)
@@ -1150,13 +1150,13 @@ function Sr(t) {
1150
1150
  // This "dragend" listener will not fire if there was a successful drop
1151
1151
  // as we will have already removed the event listener
1152
1152
  type: "dragend",
1153
- listener: function(g) {
1154
- s.current = {
1155
- dropTargets: s.current.dropTargets,
1156
- input: J(g)
1153
+ listener: function(p) {
1154
+ d.current = {
1155
+ dropTargets: d.current.dropTargets,
1156
+ input: J(p)
1157
1157
  }, c();
1158
1158
  }
1159
- }].concat(ue(pr({
1159
+ }].concat(ue(hr({
1160
1160
  onDragEnd: c
1161
1161
  }))),
1162
1162
  // Once we have started a managed drag operation it is important that we see / own all drag events
@@ -1168,14 +1168,14 @@ function Sr(t) {
1168
1168
  }
1169
1169
  );
1170
1170
  i.start({
1171
- nativeSetDragImage: wr(e)
1171
+ nativeSetDragImage: Dr(e)
1172
1172
  });
1173
1173
  }
1174
1174
  function mt(t) {
1175
1175
  var e, r = t.event, n = t.current, a = (e = n[0]) === null || e === void 0 ? void 0 : e.dropEffect;
1176
1176
  a != null && r.dataTransfer && (r.dataTransfer.dropEffect = a);
1177
1177
  }
1178
- function Or(t) {
1178
+ function Tr(t) {
1179
1179
  var e = t.event, r = t.dragType, n = t.getDropTargetsOver, a = J(e);
1180
1180
  if (r.startedFrom === "external")
1181
1181
  return {
@@ -1195,9 +1195,9 @@ function Or(t) {
1195
1195
  }
1196
1196
  var Wt = {
1197
1197
  canStart: ve,
1198
- start: Sr
1198
+ start: Or
1199
1199
  }, St = /* @__PURE__ */ new Map();
1200
- function Tr(t) {
1200
+ function Er(t) {
1201
1201
  var e = t.typeKey, r = t.mount, n = St.get(e);
1202
1202
  if (n)
1203
1203
  return n.usageCount++, n;
@@ -1208,8 +1208,8 @@ function Tr(t) {
1208
1208
  };
1209
1209
  return St.set(e, a), a;
1210
1210
  }
1211
- function Er(t) {
1212
- var e = Tr(t);
1211
+ function Mr(t) {
1212
+ var e = Er(t);
1213
1213
  return function() {
1214
1214
  e.usageCount--, !(e.usageCount > 0) && (e.unmount(), St.delete(t.typeKey));
1215
1215
  };
@@ -1239,7 +1239,7 @@ function Gt(t, e) {
1239
1239
  }
1240
1240
  return r;
1241
1241
  }
1242
- function B(t) {
1242
+ function Y(t) {
1243
1243
  for (var e = 1; e < arguments.length; e++) {
1244
1244
  var r = arguments[e] != null ? arguments[e] : {};
1245
1245
  e % 2 ? Gt(Object(r), !0).forEach(function(n) {
@@ -1253,7 +1253,7 @@ function B(t) {
1253
1253
  function yt(t, e) {
1254
1254
  var r = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
1255
1255
  if (!r) {
1256
- if (Array.isArray(t) || (r = Mr(t)) || e) {
1256
+ if (Array.isArray(t) || (r = Cr(t)) || e) {
1257
1257
  r && (t = r);
1258
1258
  var n = 0, a = function() {
1259
1259
  };
@@ -1266,23 +1266,23 @@ function yt(t, e) {
1266
1266
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1267
1267
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1268
1268
  }
1269
- var o, s = !0, i = !1;
1269
+ var o, d = !0, i = !1;
1270
1270
  return { s: function() {
1271
1271
  r = r.call(t);
1272
1272
  }, n: function() {
1273
1273
  var l = r.next();
1274
- return s = l.done, l;
1274
+ return d = l.done, l;
1275
1275
  }, e: function(l) {
1276
1276
  i = !0, o = l;
1277
1277
  }, f: function() {
1278
1278
  try {
1279
- s || r.return == null || r.return();
1279
+ d || r.return == null || r.return();
1280
1280
  } finally {
1281
1281
  if (i) throw o;
1282
1282
  }
1283
1283
  } };
1284
1284
  }
1285
- function Mr(t, e) {
1285
+ function Cr(t, e) {
1286
1286
  if (t) {
1287
1287
  if (typeof t == "string") return Ut(t, e);
1288
1288
  var r = {}.toString.call(t).slice(8, -1);
@@ -1299,92 +1299,92 @@ function pt(t) {
1299
1299
  }
1300
1300
  function kr(t) {
1301
1301
  var e = t.typeKey, r = t.defaultDropEffect, n = /* @__PURE__ */ new WeakMap(), a = "data-drop-target-for-".concat(e), o = "[".concat(a, "]");
1302
- function s(v) {
1302
+ function d(v) {
1303
1303
  return n.set(v.element, v), function() {
1304
1304
  return n.delete(v.element);
1305
1305
  };
1306
1306
  }
1307
1307
  function i(v) {
1308
1308
  if (process.env.NODE_ENV !== "production") {
1309
- var g = n.get(v.element);
1310
- g && console.warn("You have already registered a [".concat(e, "] dropTarget on the same element"), {
1311
- existing: g,
1309
+ var p = n.get(v.element);
1310
+ p && console.warn("You have already registered a [".concat(e, "] dropTarget on the same element"), {
1311
+ existing: p,
1312
1312
  proposed: v
1313
1313
  }), v.element instanceof HTMLIFrameElement && console.warn(`
1314
1314
  We recommend not registering <iframe> elements as drop targets
1315
1315
  as it can result in some strange browser event ordering.
1316
1316
  `.replace(/\s{2,}/g, " ").trim());
1317
1317
  }
1318
- var h = Et(fe(v.element, {
1318
+ var D = Et(fe(v.element, {
1319
1319
  attribute: a,
1320
1320
  value: "true"
1321
- }), s(v));
1322
- return G(h);
1321
+ }), d(v));
1322
+ return z(D);
1323
1323
  }
1324
- function d(v) {
1325
- var g, h, b, w, S = v.source, M = v.target, x = v.input, y = v.result, f = y === void 0 ? [] : y;
1324
+ function s(v) {
1325
+ var p, D, m, b, w = v.source, M = v.target, x = v.input, g = v.result, k = g === void 0 ? [] : g;
1326
1326
  if (M == null)
1327
- return f;
1327
+ return k;
1328
1328
  if (!(M instanceof Element))
1329
- return M instanceof Node ? d({
1330
- source: S,
1329
+ return M instanceof Node ? s({
1330
+ source: w,
1331
1331
  target: M.parentElement,
1332
1332
  input: x,
1333
- result: f
1334
- }) : f;
1335
- var T = M.closest(o);
1336
- if (T == null)
1337
- return f;
1338
- var C = n.get(T);
1339
- if (C == null)
1340
- return f;
1341
- var E = {
1333
+ result: k
1334
+ }) : k;
1335
+ var j = M.closest(o);
1336
+ if (j == null)
1337
+ return k;
1338
+ var $ = n.get(j);
1339
+ if ($ == null)
1340
+ return k;
1341
+ var h = {
1342
1342
  input: x,
1343
- source: S,
1344
- element: C.element
1343
+ source: w,
1344
+ element: $.element
1345
1345
  };
1346
- if (C.canDrop && !C.canDrop(E))
1347
- return d({
1348
- source: S,
1349
- target: C.element.parentElement,
1346
+ if ($.canDrop && !$.canDrop(h))
1347
+ return s({
1348
+ source: w,
1349
+ target: $.element.parentElement,
1350
1350
  input: x,
1351
- result: f
1351
+ result: k
1352
1352
  });
1353
- var P = (g = (h = C.getData) === null || h === void 0 ? void 0 : h.call(C, E)) !== null && g !== void 0 ? g : {}, I = (b = (w = C.getDropEffect) === null || w === void 0 ? void 0 : w.call(C, E)) !== null && b !== void 0 ? b : r, $ = {
1354
- data: P,
1355
- element: C.element,
1356
- dropEffect: I,
1353
+ var E = (p = (D = $.getData) === null || D === void 0 ? void 0 : D.call($, h)) !== null && p !== void 0 ? p : {}, P = (m = (b = $.getDropEffect) === null || b === void 0 ? void 0 : b.call($, h)) !== null && m !== void 0 ? m : r, O = {
1354
+ data: E,
1355
+ element: $.element,
1356
+ dropEffect: P,
1357
1357
  // we are collecting _actual_ drop targets, so these are
1358
1358
  // being applied _not_ due to stickiness
1359
1359
  isActiveDueToStickiness: !1
1360
1360
  };
1361
- return d({
1362
- source: S,
1363
- target: C.element.parentElement,
1361
+ return s({
1362
+ source: w,
1363
+ target: $.element.parentElement,
1364
1364
  input: x,
1365
1365
  // Using bubble ordering. Same ordering as `event.getPath()`
1366
- result: [].concat(ue(f), [$])
1366
+ result: [].concat(ue(k), [O])
1367
1367
  });
1368
1368
  }
1369
1369
  function l(v) {
1370
- var g = v.eventName, h = v.payload, b = yt(h.location.current.dropTargets), w;
1370
+ var p = v.eventName, D = v.payload, m = yt(D.location.current.dropTargets), b;
1371
1371
  try {
1372
- for (b.s(); !(w = b.n()).done; ) {
1373
- var S, M = w.value, x = n.get(M.element), y = B(B({}, h), {}, {
1372
+ for (m.s(); !(b = m.n()).done; ) {
1373
+ var w, M = b.value, x = n.get(M.element), g = Y(Y({}, D), {}, {
1374
1374
  self: M
1375
1375
  });
1376
- x == null || (S = x[g]) === null || S === void 0 || S.call(
1376
+ x == null || (w = x[p]) === null || w === void 0 || w.call(
1377
1377
  x,
1378
1378
  // I cannot seem to get the types right here.
1379
1379
  // TS doesn't seem to like that one event can need `nativeSetDragImage`
1380
1380
  // @ts-expect-error
1381
- y
1381
+ g
1382
1382
  );
1383
1383
  }
1384
- } catch (f) {
1385
- b.e(f);
1384
+ } catch (k) {
1385
+ m.e(k);
1386
1386
  } finally {
1387
- b.f();
1387
+ m.f();
1388
1388
  }
1389
1389
  }
1390
1390
  var c = {
@@ -1392,92 +1392,92 @@ function kr(t) {
1392
1392
  onDrag: l,
1393
1393
  onDragStart: l,
1394
1394
  onDrop: l,
1395
- onDropTargetChange: function(g) {
1396
- var h = g.payload, b = new Set(h.location.current.dropTargets.map(function(A) {
1397
- return A.element;
1398
- })), w = /* @__PURE__ */ new Set(), S = yt(h.location.previous.dropTargets), M;
1395
+ onDropTargetChange: function(p) {
1396
+ var D = p.payload, m = new Set(D.location.current.dropTargets.map(function(I) {
1397
+ return I.element;
1398
+ })), b = /* @__PURE__ */ new Set(), w = yt(D.location.previous.dropTargets), M;
1399
1399
  try {
1400
- for (S.s(); !(M = S.n()).done; ) {
1401
- var x, y = M.value;
1402
- w.add(y.element);
1403
- var f = n.get(y.element), T = b.has(y.element), C = B(B({}, h), {}, {
1404
- self: y
1400
+ for (w.s(); !(M = w.n()).done; ) {
1401
+ var x, g = M.value;
1402
+ b.add(g.element);
1403
+ var k = n.get(g.element), j = m.has(g.element), $ = Y(Y({}, D), {}, {
1404
+ self: g
1405
1405
  });
1406
- if (f == null || (x = f.onDropTargetChange) === null || x === void 0 || x.call(f, C), !T) {
1407
- var E;
1408
- f == null || (E = f.onDragLeave) === null || E === void 0 || E.call(f, C);
1406
+ if (k == null || (x = k.onDropTargetChange) === null || x === void 0 || x.call(k, $), !j) {
1407
+ var h;
1408
+ k == null || (h = k.onDragLeave) === null || h === void 0 || h.call(k, $);
1409
1409
  }
1410
1410
  }
1411
- } catch (A) {
1412
- S.e(A);
1411
+ } catch (I) {
1412
+ w.e(I);
1413
1413
  } finally {
1414
- S.f();
1414
+ w.f();
1415
1415
  }
1416
- var P = yt(h.location.current.dropTargets), I;
1416
+ var E = yt(D.location.current.dropTargets), P;
1417
1417
  try {
1418
- for (P.s(); !(I = P.n()).done; ) {
1419
- var $, j, U = I.value;
1420
- if (!w.has(U.element)) {
1421
- var _ = B(B({}, h), {}, {
1422
- self: U
1423
- }), O = n.get(U.element);
1424
- O == null || ($ = O.onDropTargetChange) === null || $ === void 0 || $.call(O, _), O == null || (j = O.onDragEnter) === null || j === void 0 || j.call(O, _);
1418
+ for (E.s(); !(P = E.n()).done; ) {
1419
+ var O, A, H = P.value;
1420
+ if (!b.has(H.element)) {
1421
+ var L = Y(Y({}, D), {}, {
1422
+ self: H
1423
+ }), S = n.get(H.element);
1424
+ S == null || (O = S.onDropTargetChange) === null || O === void 0 || O.call(S, L), S == null || (A = S.onDragEnter) === null || A === void 0 || A.call(S, L);
1425
1425
  }
1426
1426
  }
1427
- } catch (A) {
1428
- P.e(A);
1427
+ } catch (I) {
1428
+ E.e(I);
1429
1429
  } finally {
1430
- P.f();
1430
+ E.f();
1431
1431
  }
1432
1432
  }
1433
1433
  };
1434
- function p(v) {
1434
+ function y(v) {
1435
1435
  c[v.eventName](v);
1436
1436
  }
1437
- function D(v) {
1438
- var g = v.source, h = v.target, b = v.input, w = v.current, S = d({
1439
- source: g,
1440
- target: h,
1441
- input: b
1437
+ function T(v) {
1438
+ var p = v.source, D = v.target, m = v.input, b = v.current, w = s({
1439
+ source: p,
1440
+ target: D,
1441
+ input: m
1442
1442
  });
1443
- if (S.length >= w.length)
1444
- return S;
1445
- for (var M = pt(w), x = pt(S), y = [], f = 0; f < M.length; f++) {
1446
- var T, C = M[f], E = x[f];
1447
- if (E != null) {
1448
- y.push(E);
1443
+ if (w.length >= b.length)
1444
+ return w;
1445
+ for (var M = pt(b), x = pt(w), g = [], k = 0; k < M.length; k++) {
1446
+ var j, $ = M[k], h = x[k];
1447
+ if (h != null) {
1448
+ g.push(h);
1449
1449
  continue;
1450
1450
  }
1451
- var P = y[f - 1], I = M[f - 1];
1452
- if ((P == null ? void 0 : P.element) !== (I == null ? void 0 : I.element))
1451
+ var E = g[k - 1], P = M[k - 1];
1452
+ if ((E == null ? void 0 : E.element) !== (P == null ? void 0 : P.element))
1453
1453
  break;
1454
- var $ = n.get(C.element);
1455
- if (!$)
1454
+ var O = n.get($.element);
1455
+ if (!O)
1456
1456
  break;
1457
- var j = {
1458
- input: b,
1459
- source: g,
1460
- element: $.element
1457
+ var A = {
1458
+ input: m,
1459
+ source: p,
1460
+ element: O.element
1461
1461
  };
1462
- if ($.canDrop && !$.canDrop(j) || !((T = $.getIsSticky) !== null && T !== void 0 && T.call($, j)))
1462
+ if (O.canDrop && !O.canDrop(A) || !((j = O.getIsSticky) !== null && j !== void 0 && j.call(O, A)))
1463
1463
  break;
1464
- y.push(B(B({}, C), {}, {
1464
+ g.push(Y(Y({}, $), {}, {
1465
1465
  // making it clear to consumers this drop target is active due to stickiness
1466
1466
  isActiveDueToStickiness: !0
1467
1467
  }));
1468
1468
  }
1469
- return pt(y);
1469
+ return pt(g);
1470
1470
  }
1471
1471
  return {
1472
1472
  dropTargetForConsumers: i,
1473
- getIsOver: D,
1474
- dispatchEvent: p
1473
+ getIsOver: T,
1474
+ dispatchEvent: y
1475
1475
  };
1476
1476
  }
1477
- function Cr(t, e) {
1477
+ function xr(t, e) {
1478
1478
  var r = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
1479
1479
  if (!r) {
1480
- if (Array.isArray(t) || (r = xr(t)) || e) {
1480
+ if (Array.isArray(t) || (r = Pr(t)) || e) {
1481
1481
  r && (t = r);
1482
1482
  var n = 0, a = function() {
1483
1483
  };
@@ -1490,23 +1490,23 @@ function Cr(t, e) {
1490
1490
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1491
1491
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1492
1492
  }
1493
- var o, s = !0, i = !1;
1493
+ var o, d = !0, i = !1;
1494
1494
  return { s: function() {
1495
1495
  r = r.call(t);
1496
1496
  }, n: function() {
1497
1497
  var l = r.next();
1498
- return s = l.done, l;
1498
+ return d = l.done, l;
1499
1499
  }, e: function(l) {
1500
1500
  i = !0, o = l;
1501
1501
  }, f: function() {
1502
1502
  try {
1503
- s || r.return == null || r.return();
1503
+ d || r.return == null || r.return();
1504
1504
  } finally {
1505
1505
  if (i) throw o;
1506
1506
  }
1507
1507
  } };
1508
1508
  }
1509
- function xr(t, e) {
1509
+ function Pr(t, e) {
1510
1510
  if (t) {
1511
1511
  if (typeof t == "string") return zt(t, e);
1512
1512
  var r = {}.toString.call(t).slice(8, -1);
@@ -1518,7 +1518,7 @@ function zt(t, e) {
1518
1518
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
1519
1519
  return n;
1520
1520
  }
1521
- function Xt(t, e) {
1521
+ function qt(t, e) {
1522
1522
  var r = Object.keys(t);
1523
1523
  if (Object.getOwnPropertySymbols) {
1524
1524
  var n = Object.getOwnPropertySymbols(t);
@@ -1528,33 +1528,33 @@ function Xt(t, e) {
1528
1528
  }
1529
1529
  return r;
1530
1530
  }
1531
- function Pr(t) {
1531
+ function Ar(t) {
1532
1532
  for (var e = 1; e < arguments.length; e++) {
1533
1533
  var r = arguments[e] != null ? arguments[e] : {};
1534
- e % 2 ? Xt(Object(r), !0).forEach(function(n) {
1534
+ e % 2 ? qt(Object(r), !0).forEach(function(n) {
1535
1535
  ut(t, n, r[n]);
1536
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Xt(Object(r)).forEach(function(n) {
1536
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : qt(Object(r)).forEach(function(n) {
1537
1537
  Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
1538
1538
  });
1539
1539
  }
1540
1540
  return t;
1541
1541
  }
1542
- function Ar() {
1542
+ function Ir() {
1543
1543
  var t = /* @__PURE__ */ new Set(), e = null;
1544
1544
  function r(o) {
1545
1545
  e && (!o.canMonitor || o.canMonitor(e.canMonitorArgs)) && e.active.add(o);
1546
1546
  }
1547
1547
  function n(o) {
1548
- var s = Pr({}, o);
1549
- t.add(s), r(s);
1548
+ var d = Ar({}, o);
1549
+ t.add(d), r(d);
1550
1550
  function i() {
1551
- t.delete(s), e && e.active.delete(s);
1551
+ t.delete(d), e && e.active.delete(d);
1552
1552
  }
1553
- return G(i);
1553
+ return z(i);
1554
1554
  }
1555
1555
  function a(o) {
1556
- var s = o.eventName, i = o.payload;
1557
- if (s === "onGenerateDragPreview") {
1556
+ var d = o.eventName, i = o.payload;
1557
+ if (d === "onGenerateDragPreview") {
1558
1558
  e = {
1559
1559
  canMonitorArgs: {
1560
1560
  initial: i.location.initial,
@@ -1562,27 +1562,27 @@ function Ar() {
1562
1562
  },
1563
1563
  active: /* @__PURE__ */ new Set()
1564
1564
  };
1565
- var d = Cr(t), l;
1565
+ var s = xr(t), l;
1566
1566
  try {
1567
- for (d.s(); !(l = d.n()).done; ) {
1567
+ for (s.s(); !(l = s.n()).done; ) {
1568
1568
  var c = l.value;
1569
1569
  r(c);
1570
1570
  }
1571
- } catch (b) {
1572
- d.e(b);
1571
+ } catch (m) {
1572
+ s.e(m);
1573
1573
  } finally {
1574
- d.f();
1574
+ s.f();
1575
1575
  }
1576
1576
  }
1577
1577
  if (e) {
1578
- for (var p = Array.from(e.active), D = 0, v = p; D < v.length; D++) {
1579
- var g = v[D];
1580
- if (e.active.has(g)) {
1581
- var h;
1582
- (h = g[s]) === null || h === void 0 || h.call(g, i);
1578
+ for (var y = Array.from(e.active), T = 0, v = y; T < v.length; T++) {
1579
+ var p = v[T];
1580
+ if (e.active.has(p)) {
1581
+ var D;
1582
+ (D = p[d]) === null || D === void 0 || D.call(p, i);
1583
1583
  }
1584
1584
  }
1585
- s === "onDrop" && (e.active.clear(), e = null);
1585
+ d === "onDrop" && (e.active.clear(), e = null);
1586
1586
  }
1587
1587
  }
1588
1588
  return {
@@ -1590,58 +1590,58 @@ function Ar() {
1590
1590
  monitorForConsumers: n
1591
1591
  };
1592
1592
  }
1593
- function Ir(t) {
1594
- var e = t.typeKey, r = t.mount, n = t.dispatchEventToSource, a = t.onPostDispatch, o = t.defaultDropEffect, s = Ar(), i = kr({
1593
+ function $r(t) {
1594
+ var e = t.typeKey, r = t.mount, n = t.dispatchEventToSource, a = t.onPostDispatch, o = t.defaultDropEffect, d = Ir(), i = kr({
1595
1595
  typeKey: e,
1596
1596
  defaultDropEffect: o
1597
1597
  });
1598
- function d(p) {
1599
- n == null || n(p), i.dispatchEvent(p), s.dispatchEvent(p), a == null || a(p);
1598
+ function s(y) {
1599
+ n == null || n(y), i.dispatchEvent(y), d.dispatchEvent(y), a == null || a(y);
1600
1600
  }
1601
- function l(p) {
1602
- var D = p.event, v = p.dragType;
1601
+ function l(y) {
1602
+ var T = y.event, v = y.dragType;
1603
1603
  Wt.start({
1604
- event: D,
1604
+ event: T,
1605
1605
  dragType: v,
1606
1606
  getDropTargetsOver: i.getIsOver,
1607
- dispatchEvent: d
1607
+ dispatchEvent: s
1608
1608
  });
1609
1609
  }
1610
1610
  function c() {
1611
- function p() {
1612
- var D = {
1611
+ function y() {
1612
+ var T = {
1613
1613
  canStart: Wt.canStart,
1614
1614
  start: l
1615
1615
  };
1616
- return r(D);
1616
+ return r(T);
1617
1617
  }
1618
- return Er({
1618
+ return Mr({
1619
1619
  typeKey: e,
1620
- mount: p
1620
+ mount: y
1621
1621
  });
1622
1622
  }
1623
1623
  return {
1624
1624
  registerUsage: c,
1625
1625
  dropTarget: i.dropTargetForConsumers,
1626
- monitor: s.monitorForConsumers
1626
+ monitor: d.monitorForConsumers
1627
1627
  };
1628
1628
  }
1629
- var $r = G(function() {
1629
+ var jr = z(function() {
1630
1630
  return navigator.userAgent.toLocaleLowerCase().includes("android");
1631
- }), jr = "pdnd:android-fallback", qt = "text/plain", Fr = "text/uri-list", Rr = "application/vnd.pdnd", et = /* @__PURE__ */ new WeakMap();
1632
- function Hr(t) {
1631
+ }), Hr = "pdnd:android-fallback", Xt = "text/plain", Fr = "text/uri-list", Rr = "application/vnd.pdnd", et = /* @__PURE__ */ new WeakMap();
1632
+ function Lr(t) {
1633
1633
  return et.set(t.element, t), function() {
1634
1634
  et.delete(t.element);
1635
1635
  };
1636
1636
  }
1637
- var _t = sr(), Mt = Ir({
1637
+ var _t = lr(), Mt = $r({
1638
1638
  typeKey: "element",
1639
1639
  defaultDropEffect: "move",
1640
1640
  mount: function(e) {
1641
- return Et(_t.bindEvents(), q.bind(document, {
1641
+ return Et(_t.bindEvents(), _.bind(document, {
1642
1642
  type: "dragstart",
1643
1643
  listener: function(n) {
1644
- var a, o, s, i, d, l;
1644
+ var a, o, d, i, s, l;
1645
1645
  if (e.canStart(n) && !n.defaultPrevented) {
1646
1646
  if (!n.dataTransfer) {
1647
1647
  process.env.NODE_ENV !== "production" && console.warn(`
@@ -1657,46 +1657,46 @@ var _t = sr(), Mt = Ir({
1657
1657
  }
1658
1658
  var c = n.target;
1659
1659
  if (c instanceof HTMLElement) {
1660
- var p = et.get(c);
1661
- if (p) {
1662
- var D = J(n), v = {
1663
- element: p.element,
1664
- dragHandle: (a = p.dragHandle) !== null && a !== void 0 ? a : null,
1665
- input: D
1660
+ var y = et.get(c);
1661
+ if (y) {
1662
+ var T = J(n), v = {
1663
+ element: y.element,
1664
+ dragHandle: (a = y.dragHandle) !== null && a !== void 0 ? a : null,
1665
+ input: T
1666
1666
  };
1667
- if (p.canDrag && !p.canDrag(v)) {
1667
+ if (y.canDrag && !y.canDrag(v)) {
1668
1668
  n.preventDefault();
1669
1669
  return;
1670
1670
  }
1671
- if (p.dragHandle) {
1672
- var g = se({
1673
- x: D.clientX,
1674
- y: D.clientY
1671
+ if (y.dragHandle) {
1672
+ var p = de({
1673
+ x: T.clientX,
1674
+ y: T.clientY
1675
1675
  });
1676
- if (!p.dragHandle.contains(g)) {
1676
+ if (!y.dragHandle.contains(p)) {
1677
1677
  n.preventDefault();
1678
1678
  return;
1679
1679
  }
1680
1680
  }
1681
- var h = (o = (s = p.getInitialDataForExternal) === null || s === void 0 ? void 0 : s.call(p, v)) !== null && o !== void 0 ? o : null;
1682
- if (h)
1683
- for (var b = 0, w = Object.entries(h); b < w.length; b++) {
1684
- var S = ae(w[b], 2), M = S[0], x = S[1];
1681
+ var D = (o = (d = y.getInitialDataForExternal) === null || d === void 0 ? void 0 : d.call(y, v)) !== null && o !== void 0 ? o : null;
1682
+ if (D)
1683
+ for (var m = 0, b = Object.entries(D); m < b.length; m++) {
1684
+ var w = ae(b[m], 2), M = w[0], x = w[1];
1685
1685
  n.dataTransfer.setData(M, x ?? "");
1686
1686
  }
1687
- $r() && !n.dataTransfer.types.includes(qt) && !n.dataTransfer.types.includes(Fr) && n.dataTransfer.setData(qt, jr), n.dataTransfer.setData(Rr, "");
1688
- var y = {
1689
- element: p.element,
1690
- dragHandle: (i = p.dragHandle) !== null && i !== void 0 ? i : null,
1691
- data: (d = (l = p.getInitialData) === null || l === void 0 ? void 0 : l.call(p, v)) !== null && d !== void 0 ? d : {}
1692
- }, f = {
1687
+ jr() && !n.dataTransfer.types.includes(Xt) && !n.dataTransfer.types.includes(Fr) && n.dataTransfer.setData(Xt, Hr), n.dataTransfer.setData(Rr, "");
1688
+ var g = {
1689
+ element: y.element,
1690
+ dragHandle: (i = y.dragHandle) !== null && i !== void 0 ? i : null,
1691
+ data: (s = (l = y.getInitialData) === null || l === void 0 ? void 0 : l.call(y, v)) !== null && s !== void 0 ? s : {}
1692
+ }, k = {
1693
1693
  type: "element",
1694
- payload: y,
1694
+ payload: g,
1695
1695
  startedFrom: "internal"
1696
1696
  };
1697
1697
  e.start({
1698
1698
  event: n,
1699
- dragType: f
1699
+ dragType: k
1700
1700
  });
1701
1701
  }
1702
1702
  }
@@ -1715,8 +1715,8 @@ var _t = sr(), Mt = Ir({
1715
1715
  );
1716
1716
  },
1717
1717
  onPostDispatch: _t.getOnPostDispatch()
1718
- }), ge = Mt.dropTarget, kt = Mt.monitor;
1719
- function Lr(t) {
1718
+ }), ge = Mt.dropTarget, Ct = Mt.monitor;
1719
+ function Nr(t) {
1720
1720
  if (process.env.NODE_ENV !== "production" && t.dragHandle && !t.element.contains(t.dragHandle) && console.warn("Drag handle element must be contained in draggable element", {
1721
1721
  element: t.element,
1722
1722
  dragHandle: t.dragHandle
@@ -1733,13 +1733,13 @@ function Lr(t) {
1733
1733
  // but you _might_ not have any drop targets immediately
1734
1734
  // (You might create drop targets async)
1735
1735
  Mt.registerUsage(),
1736
- Hr(t),
1736
+ Lr(t),
1737
1737
  fe(t.element, {
1738
1738
  attribute: "draggable",
1739
1739
  value: "true"
1740
1740
  })
1741
1741
  );
1742
- return G(r);
1742
+ return z(r);
1743
1743
  }
1744
1744
  function Zt(t, e) {
1745
1745
  var r = Object.keys(t);
@@ -1762,21 +1762,21 @@ function Jt(t) {
1762
1762
  }
1763
1763
  return t;
1764
1764
  }
1765
- function Nr() {
1765
+ function Br() {
1766
1766
  return {
1767
1767
  x: 0,
1768
1768
  y: 0
1769
1769
  };
1770
1770
  }
1771
- function Br(t) {
1772
- var e = t.render, r = t.nativeSetDragImage, n = t.getOffset, a = n === void 0 ? Nr : n, o = document.createElement("div");
1773
- z() && o.setAttribute("popover", "manual"), Object.assign(o.style, Jt(Jt({
1771
+ function Kr(t) {
1772
+ var e = t.render, r = t.nativeSetDragImage, n = t.getOffset, a = n === void 0 ? Br : n, o = document.createElement("div");
1773
+ q() && o.setAttribute("popover", "manual"), Object.assign(o.style, Jt(Jt({
1774
1774
  // Ensuring we don't cause reflow when adding the element to the page
1775
1775
  // Using `position:fixed` rather than `position:absolute` so we are
1776
1776
  // positioned on the current viewport.
1777
1777
  // `position:fixed` also creates a new stacking context, so we don't need to do that here
1778
1778
  position: "fixed"
1779
- }, z() ? (
1779
+ }, q() ? (
1780
1780
  // needs to come first as it has 'inset: unset' which
1781
1781
  // needs to be overridden by our top / left values
1782
1782
  ce
@@ -1796,8 +1796,8 @@ function Br(t) {
1796
1796
  left: 0,
1797
1797
  // Avoiding any additional events caused by the new element (being super safe)
1798
1798
  pointerEvents: "none"
1799
- })), document.body.append(o), z() && o.showPopover();
1800
- var s = e({
1799
+ })), document.body.append(o), q() && o.showPopover();
1800
+ var d = e({
1801
1801
  container: o
1802
1802
  });
1803
1803
  queueMicrotask(function() {
@@ -1813,33 +1813,33 @@ function Br(t) {
1813
1813
  r == null || r(o, l.x, l.y);
1814
1814
  });
1815
1815
  function i() {
1816
- d(), s == null || s(), document.body.removeChild(o);
1816
+ s(), d == null || d(), document.body.removeChild(o);
1817
1817
  }
1818
- var d = kt({
1818
+ var s = Ct({
1819
1819
  // Remove portal in the dragstart event so that the user will never see it
1820
1820
  onDragStart: i,
1821
1821
  // Backup: remove portal when the drop finishes (this would be an error case)
1822
1822
  onDrop: i
1823
1823
  });
1824
1824
  }
1825
- function Kr(t) {
1825
+ function Yr(t) {
1826
1826
  var e = t.element, r = t.input;
1827
1827
  return function(a) {
1828
- var o = a.container, s = e.getBoundingClientRect(), i = o.getBoundingClientRect(), d = Math.min(
1828
+ var o = a.container, d = e.getBoundingClientRect(), i = o.getBoundingClientRect(), s = Math.min(
1829
1829
  // difference
1830
- r.clientX - s.x,
1830
+ r.clientX - d.x,
1831
1831
  // don't let the difference be more than the width of the container,
1832
1832
  // otherwise the pointer will be off the preview
1833
1833
  i.width
1834
1834
  ), l = Math.min(
1835
1835
  // difference
1836
- r.clientY - s.y,
1836
+ r.clientY - d.y,
1837
1837
  // don't let the difference be more than the height of the container,
1838
1838
  // otherwise the pointer will be off the preview
1839
1839
  i.height
1840
1840
  );
1841
1841
  return {
1842
- x: d,
1842
+ x: s,
1843
1843
  y: l
1844
1844
  };
1845
1845
  };
@@ -1851,18 +1851,18 @@ function lt() {
1851
1851
  function ye(t = 300) {
1852
1852
  return Date.now() - me < t;
1853
1853
  }
1854
- const Ct = "rsv-timegrid-event", pe = "rsv-timegrid-col";
1854
+ const kt = "rsv-timegrid-event", pe = "rsv-timegrid-col";
1855
1855
  function he(t, e, r) {
1856
- return r ? Lr({
1856
+ return r ? Nr({
1857
1857
  element: t,
1858
- getInitialData: () => ({ [Ct]: !0, id: e.id }),
1858
+ getInitialData: () => ({ [kt]: !0, id: e.id }),
1859
1859
  onGenerateDragPreview({ location: n, nativeSetDragImage: a }) {
1860
- Br({
1860
+ Kr({
1861
1861
  nativeSetDragImage: a,
1862
- getOffset: Kr({ element: t, input: n.current.input }),
1862
+ getOffset: Yr({ element: t, input: n.current.input }),
1863
1863
  render({ container: o }) {
1864
- const s = t.cloneNode(!0);
1865
- s.setAttribute("data-rsv-drag-preview", "true"), s.style.width = `${t.offsetWidth}px`, s.style.height = `${t.offsetHeight}px`, o.appendChild(s);
1864
+ const d = t.cloneNode(!0);
1865
+ d.setAttribute("data-rsv-drag-preview", "true"), d.style.width = `${t.offsetWidth}px`, d.style.height = `${t.offsetHeight}px`, o.appendChild(d);
1866
1866
  }
1867
1867
  });
1868
1868
  }
@@ -1872,92 +1872,92 @@ function he(t, e, r) {
1872
1872
  function Vr(t) {
1873
1873
  return ge({
1874
1874
  element: t,
1875
- canDrop: ({ source: e }) => e.data[Ct] === !0,
1875
+ canDrop: ({ source: e }) => e.data[kt] === !0,
1876
1876
  getData: ({ element: e }) => ({
1877
1877
  [pe]: !0,
1878
1878
  dayIndex: Number(e.dataset.rsvDayIndex ?? 0)
1879
1879
  })
1880
1880
  });
1881
1881
  }
1882
- function Yr(t, e, r, n) {
1882
+ function Wr(t, e, r, n) {
1883
1883
  const a = t.getBoundingClientRect(), o = r.maxMinutes - r.minMinutes;
1884
1884
  if (a.height === 0 || o <= 0) return r.minMinutes;
1885
- const s = r.minMinutes + (e - a.top) / a.height * o, i = Math.max(r.minMinutes, Math.min(r.maxMinutes, s));
1885
+ const d = r.minMinutes + (e - a.top) / a.height * o, i = Math.max(r.minMinutes, Math.min(r.maxMinutes, d));
1886
1886
  return Math.round(i / n) * n;
1887
1887
  }
1888
1888
  function Ot(t, e) {
1889
- return m.diff(t, e, "minute");
1889
+ return f.diff(t, e, "minute");
1890
1890
  }
1891
- function Wr(t, e, r) {
1892
- const n = m.add(m.startOf(t, "day"), { minutes: e });
1891
+ function Gr(t, e, r) {
1892
+ const n = f.add(f.startOf(t, "day"), { minutes: e });
1893
1893
  if (Ot(n, r.start) === 0) return null;
1894
1894
  const a = r.end ? Ot(r.start, r.end) : 0;
1895
1895
  return {
1896
1896
  start: n,
1897
- end: r.end ? m.add(n, { minutes: a }) : null
1897
+ end: r.end ? f.add(n, { minutes: a }) : null
1898
1898
  };
1899
1899
  }
1900
- function Gr({
1900
+ function Ur({
1901
1901
  api: t,
1902
1902
  getModel: e,
1903
1903
  snap: r,
1904
1904
  onPreview: n,
1905
1905
  onDragging: a
1906
1906
  }) {
1907
- const o = X(r ?? "00:15") || 15, s = (i) => {
1908
- const d = i.current.dropTargets.find((c) => c.data[pe] === !0);
1909
- if (!d) return null;
1910
- const l = Yr(
1911
- d.element,
1907
+ const o = X(r ?? "00:15") || 15, d = (i) => {
1908
+ const s = i.current.dropTargets.find((c) => c.data[pe] === !0);
1909
+ if (!s) return null;
1910
+ const l = Wr(
1911
+ s.element,
1912
1912
  i.current.input.clientY,
1913
1913
  e(),
1914
1914
  o
1915
1915
  );
1916
- return { target: d, inicio: l };
1916
+ return { target: s, inicio: l };
1917
1917
  };
1918
- return kt({
1919
- canMonitor: ({ source: i }) => i.data[Ct] === !0,
1918
+ return Ct({
1919
+ canMonitor: ({ source: i }) => i.data[kt] === !0,
1920
1920
  onDragStart: ({ source: i }) => {
1921
1921
  lt(), a(String(i.data.id));
1922
1922
  },
1923
- onDrag: ({ source: i, location: d }) => {
1924
- const l = s(d);
1923
+ onDrag: ({ source: i, location: s }) => {
1924
+ const l = d(s);
1925
1925
  if (!l) return;
1926
1926
  const c = t.getEventById(String(i.data.id));
1927
1927
  if (!c) return;
1928
- const p = c.end ? Math.max(o, Ot(c.start, c.end)) : o;
1928
+ const y = c.end ? Math.max(o, Ot(c.start, c.end)) : o;
1929
1929
  n({
1930
1930
  dayIndex: Number(l.target.data.dayIndex),
1931
1931
  startMin: l.inicio,
1932
- endMin: l.inicio + p
1932
+ endMin: l.inicio + y
1933
1933
  });
1934
1934
  },
1935
- onDrop: ({ source: i, location: d }) => {
1935
+ onDrop: ({ source: i, location: s }) => {
1936
1936
  var v;
1937
1937
  lt(), n(null), a(null);
1938
- const l = s(d);
1938
+ const l = d(s);
1939
1939
  if (!l) return;
1940
1940
  const c = t.getEventById(String(i.data.id));
1941
1941
  if (!c) return;
1942
- const p = (v = e().days[Number(l.target.data.dayIndex)]) == null ? void 0 : v.date;
1943
- if (!p) return;
1944
- const D = Wr(p, l.inicio, c);
1945
- if (D && t.moveEvent(c.id, D.start, D.end)) {
1946
- const g = t.getEventById(c.id);
1947
- g && t.trigger("eventDrop", { event: g });
1942
+ const y = (v = e().days[Number(l.target.data.dayIndex)]) == null ? void 0 : v.date;
1943
+ if (!y) return;
1944
+ const T = Gr(y, l.inicio, c);
1945
+ if (T && t.moveEvent(c.id, T.start, T.end)) {
1946
+ const p = t.getEventById(c.id);
1947
+ p && t.trigger("eventDrop", { event: p });
1948
1948
  }
1949
1949
  }
1950
1950
  });
1951
1951
  }
1952
1952
  const be = "rsv-timegrid-event", we = "rsv-daygrid-day";
1953
- function Ur(t, e) {
1954
- const r = m.diff(m.startOf(e.start, "day"), m.startOf(t, "day"), "day");
1953
+ function zr(t, e) {
1954
+ const r = f.diff(f.startOf(e.start, "day"), f.startOf(t, "day"), "day");
1955
1955
  return r === 0 ? null : {
1956
- start: m.add(e.start, { days: r }),
1957
- end: e.end ? m.add(e.end, { days: r }) : null
1956
+ start: f.add(e.start, { days: r }),
1957
+ end: e.end ? f.add(e.end, { days: r }) : null
1958
1958
  };
1959
1959
  }
1960
- function zr(t) {
1960
+ function qr(t) {
1961
1961
  return ge({
1962
1962
  element: t,
1963
1963
  canDrop: ({ source: e }) => e.data[be] === !0,
@@ -1975,7 +1975,7 @@ function Xr({
1975
1975
  onDragging: r
1976
1976
  }) {
1977
1977
  const n = (a) => a.current.dropTargets.find((o) => o.data[we] === !0) ?? null;
1978
- return kt({
1978
+ return Ct({
1979
1979
  canMonitor: ({ source: a }) => a.data[be] === !0,
1980
1980
  onDragStart: ({ source: a }) => {
1981
1981
  lt(), r(String(a.data.id));
@@ -1986,12 +1986,12 @@ function Xr({
1986
1986
  },
1987
1987
  onDrop: ({ source: a, location: o }) => {
1988
1988
  lt(), e(null), r(null);
1989
- const s = n(o);
1990
- if (!s) return;
1989
+ const d = n(o);
1990
+ if (!d) return;
1991
1991
  const i = t.getEventById(String(a.data.id));
1992
1992
  if (!i) return;
1993
- const d = Ur(m.from(String(s.data.fechaISO)), i);
1994
- if (d && t.moveEvent(i.id, d.start, d.end)) {
1993
+ const s = zr(f.from(String(d.data.fechaISO)), i);
1994
+ if (s && t.moveEvent(i.id, s.start, s.end)) {
1995
1995
  const l = t.getEventById(i.id);
1996
1996
  l && t.trigger("eventDrop", { event: l });
1997
1997
  }
@@ -1999,34 +1999,35 @@ function Xr({
1999
1999
  });
2000
2000
  }
2001
2001
  function De({ api: t, model: e, options: r }) {
2002
- var v;
2003
- const n = r.locale ?? "en", a = { type: t.getView().type }, o = st(n, r.dayHeaderFormat, { weekday: "short" }), s = ((v = e.weeks[0]) == null ? void 0 : v.days) ?? [], i = r.weekNumbers === !0, [d, l] = K(null), [c, p] = K(null), D = F(/* @__PURE__ */ new Map());
2002
+ var D;
2003
+ const n = r.locale ?? "en", a = { type: t.getView().type }, o = dt(n, r.dayHeaderFormat, { weekday: "short" }), d = ((D = e.weeks[0]) == null ? void 0 : D.days) ?? [], i = r.weekNumbers === !0, s = r.dayHeaders !== !1, l = r.dayNumberAlign ?? "end", [c, y] = V(null), [T, v] = V(null), p = F(/* @__PURE__ */ new Map());
2004
2004
  return R(
2005
- () => Xr({ api: t, onPreview: l, onDragging: p }),
2005
+ () => Xr({ api: t, onPreview: y, onDragging: v }),
2006
2006
  [t]
2007
2007
  ), R(() => {
2008
- const g = D.current;
2008
+ const m = p.current;
2009
2009
  return () => {
2010
- for (const h of g.values()) h();
2011
- g.clear();
2010
+ for (const b of m.values()) b();
2011
+ m.clear();
2012
2012
  };
2013
- }, []), /* @__PURE__ */ k(
2013
+ }, []), /* @__PURE__ */ C(
2014
2014
  "div",
2015
2015
  {
2016
2016
  "data-rsv": "daygrid",
2017
2017
  "data-weeknumbers": String(i),
2018
+ "data-daynumber-align": l,
2018
2019
  style: `--rsv-cols:${e.columnCount}`,
2019
2020
  children: [
2020
- /* @__PURE__ */ k("div", { "data-rsv": "daygrid-header", role: "row", children: [
2021
+ s && /* @__PURE__ */ C("div", { "data-rsv": "daygrid-header", role: "row", children: [
2021
2022
  i && /* @__PURE__ */ u("div", { "data-rsv": "daygrid-weeknum-header", role: "columnheader" }),
2022
- s.map((g) => {
2023
- var S, M;
2024
- const h = m.toDate(g.date), b = o ? o(h) : "", w = {
2025
- date: h,
2026
- text: b,
2027
- dayOfWeek: g.dayOfWeek,
2028
- dayNumber: m.dayOfMonth(g.date),
2029
- isToday: g.isToday,
2023
+ d.map((m) => {
2024
+ var x, g;
2025
+ const b = f.toDate(m.date), w = o ? o(b) : "", M = {
2026
+ date: b,
2027
+ text: w,
2028
+ dayOfWeek: m.dayOfWeek,
2029
+ dayNumber: f.dayOfMonth(m.date),
2030
+ isToday: m.isToday,
2030
2031
  view: a
2031
2032
  };
2032
2033
  return /* @__PURE__ */ u(
@@ -2034,121 +2035,121 @@ function De({ api: t, model: e, options: r }) {
2034
2035
  {
2035
2036
  "data-rsv": "daygrid-dow",
2036
2037
  role: "columnheader",
2037
- "data-dow": String(g.dayOfWeek),
2038
- class: N((S = r.classNames) == null ? void 0 : S.dayHeader),
2039
- ref: (x) => {
2040
- var y;
2041
- return W(x, (y = r.hooks) == null ? void 0 : y.dayHeaderDidMount, () => w);
2038
+ "data-dow": String(m.dayOfWeek),
2039
+ class: K((x = r.classNames) == null ? void 0 : x.dayHeader),
2040
+ ref: (k) => {
2041
+ var j;
2042
+ return U(k, (j = r.hooks) == null ? void 0 : j.dayHeaderDidMount, () => M);
2042
2043
  },
2043
- children: L((M = r.slots) == null ? void 0 : M.dayHeaderContent, w, b, r.hostBridge)
2044
+ children: B((g = r.slots) == null ? void 0 : g.dayHeaderContent, M, w, r.hostBridge)
2044
2045
  },
2045
- g.dayOfWeek
2046
+ m.dayOfWeek
2046
2047
  );
2047
2048
  })
2048
2049
  ] }),
2049
- e.weeks.map((g, h) => /* @__PURE__ */ k("div", { "data-rsv": "daygrid-week", role: "row", children: [
2050
- i && /* @__PURE__ */ u("div", { "data-rsv": "daygrid-weeknum", role: "rowheader", children: g.weekNumber }),
2051
- g.days.map((b) => /* @__PURE__ */ u(
2052
- qr,
2050
+ e.weeks.map((m, b) => /* @__PURE__ */ C("div", { "data-rsv": "daygrid-week", role: "row", children: [
2051
+ i && /* @__PURE__ */ u("div", { "data-rsv": "daygrid-weeknum", role: "rowheader", children: m.weekNumber }),
2052
+ m.days.map((w) => /* @__PURE__ */ u(
2053
+ _r,
2053
2054
  {
2054
2055
  api: t,
2055
- cell: b,
2056
+ cell: w,
2056
2057
  options: r,
2057
2058
  view: a,
2058
- dropActivo: d === m.toISOString(b.date),
2059
- limpiezaDias: D,
2060
- idArrastrado: c
2059
+ dropActivo: c === f.toISOString(w.date),
2060
+ limpiezaDias: p,
2061
+ idArrastrado: T
2061
2062
  },
2062
- m.toISOString(b.date)
2063
+ f.toISOString(w.date)
2063
2064
  ))
2064
- ] }, h))
2065
+ ] }, b))
2065
2066
  ]
2066
2067
  }
2067
2068
  );
2068
2069
  }
2069
- function qr({
2070
+ function _r({
2070
2071
  api: t,
2071
2072
  cell: e,
2072
2073
  options: r,
2073
2074
  view: n,
2074
2075
  dropActivo: a,
2075
2076
  limpiezaDias: o,
2076
- idArrastrado: s
2077
+ idArrastrado: d
2077
2078
  }) {
2078
- var S, M, x;
2079
- const i = m.toDate(e.date), d = m.dayOfMonth(e.date), l = r.navLinks ? /* @__PURE__ */ u(
2079
+ var w, M, x;
2080
+ const i = f.toDate(e.date), s = f.dayOfMonth(e.date), l = r.navLinks ? /* @__PURE__ */ u(
2080
2081
  "a",
2081
2082
  {
2082
2083
  "data-rsv": "day-number",
2083
2084
  "data-nav-link": "true",
2084
2085
  role: "link",
2085
2086
  tabIndex: 0,
2086
- title: V(r.locale).navLinkHint(
2087
+ title: W(r.locale).navLinkHint(
2087
2088
  new Intl.DateTimeFormat(r.locale, { dateStyle: "long" }).format(i)
2088
2089
  ),
2089
- onClick: (y) => {
2090
- y.stopPropagation(), ee(t, e.date);
2090
+ onClick: (g) => {
2091
+ g.stopPropagation(), ee(t, e.date);
2091
2092
  },
2092
- children: d
2093
+ children: s
2093
2094
  }
2094
- ) : /* @__PURE__ */ u("span", { "data-rsv": "day-number", children: d }), c = { date: i, dayNumber: d, isToday: e.isToday, isOther: e.isOther, view: n }, p = L(
2095
- (S = r.slots) == null ? void 0 : S.dayCellContent,
2095
+ ) : /* @__PURE__ */ u("span", { "data-rsv": "day-number", children: s }), c = { date: i, dayNumber: s, isToday: e.isToday, isOther: e.isOther, view: n }, y = B(
2096
+ (w = r.slots) == null ? void 0 : w.dayCellContent,
2096
2097
  c,
2097
2098
  l,
2098
2099
  r.hostBridge
2099
- ), [D, v] = K(!1), g = m.toISOString(e.date), h = F(!1), b = () => {
2100
- if (h.current) {
2101
- h.current = !1;
2100
+ ), [T, v] = V(!1), p = f.toISOString(e.date), D = F(!1), m = () => {
2101
+ if (D.current) {
2102
+ D.current = !1;
2102
2103
  return;
2103
2104
  }
2104
- t.trigger("dateClick", { date: e.date }), r.selectable && t.select(g, m.toISOString(m.add(e.date, { days: 1 })));
2105
- }, w = (y) => {
2106
- y.stopPropagation(), v(!0), t.trigger("moreLinkClick", {
2105
+ r.selectConstraint === "businessHours" && !e.isBusiness || (t.trigger("dateClick", { date: e.date }), r.selectable && t.select(p, f.toISOString(f.add(e.date, { days: 1 }))));
2106
+ }, b = (g) => {
2107
+ g.stopPropagation(), r.moreLinkPopover !== !1 && v(!0), t.trigger("moreLinkClick", {
2107
2108
  date: e.date,
2108
2109
  allEvents: [...e.events, ...e.hiddenEvents],
2109
2110
  hiddenEvents: e.hiddenEvents
2110
2111
  });
2111
2112
  };
2112
- return /* @__PURE__ */ k(
2113
+ return /* @__PURE__ */ C(
2113
2114
  "div",
2114
2115
  {
2115
2116
  "data-rsv": "day",
2116
2117
  role: "gridcell",
2117
- "data-date": g,
2118
+ "data-date": p,
2118
2119
  "data-rsv-drop": a ? "true" : void 0,
2119
2120
  "data-today": String(e.isToday),
2120
2121
  "data-other": String(e.isOther),
2121
2122
  "data-weekend": String(e.isWeekend),
2122
2123
  "data-business": String(e.isBusiness),
2123
2124
  "data-selected": String(e.isSelected),
2124
- class: N((M = r.classNames) == null ? void 0 : M.day),
2125
- ref: (y) => {
2126
- var f;
2127
- W(y, (f = r.hooks) == null ? void 0 : f.dayCellDidMount, () => c), !(!y || o.current.has(y)) && o.current.set(y, zr(y));
2125
+ class: K((M = r.classNames) == null ? void 0 : M.day),
2126
+ ref: (g) => {
2127
+ var k;
2128
+ U(g, (k = r.hooks) == null ? void 0 : k.dayCellDidMount, () => c), !(!g || o.current.has(g)) && o.current.set(g, qr(g));
2128
2129
  },
2129
- onClick: b,
2130
- onPointerDown: r.selectable ? (y) => Xe(y, {
2130
+ onClick: m,
2131
+ onPointerDown: r.selectable ? (g) => Xe(g, {
2131
2132
  api: t,
2132
- startDate: g,
2133
+ startDate: p,
2133
2134
  onRangeSelect: () => {
2134
- h.current = !0;
2135
+ D.current = !0;
2135
2136
  }
2136
2137
  }) : void 0,
2137
2138
  children: [
2138
- p,
2139
- e.events.filter((y) => y.display !== "none").map((y) => /* @__PURE__ */ u(
2139
+ y,
2140
+ e.events.filter((g) => g.display !== "none").map((g) => /* @__PURE__ */ u(
2140
2141
  Se,
2141
2142
  {
2142
2143
  api: t,
2143
- event: y,
2144
+ event: g,
2144
2145
  options: r,
2145
2146
  view: n,
2146
- arrastrandose: s === y.id
2147
+ arrastrandose: d === g.id
2147
2148
  },
2148
- y.id
2149
+ g.id
2149
2150
  )),
2150
- e.moreCount > 0 && /* @__PURE__ */ k("div", { "data-rsv": "more-anchor", children: [
2151
- /* @__PURE__ */ u("button", { type: "button", "data-rsv": "more-link", onClick: w, children: L(
2151
+ e.moreCount > 0 && /* @__PURE__ */ C("div", { "data-rsv": "more-anchor", children: [
2152
+ /* @__PURE__ */ u("button", { type: "button", "data-rsv": "more-link", onClick: b, children: B(
2152
2153
  (x = r.slots) == null ? void 0 : x.moreLinkContent,
2153
2154
  {
2154
2155
  date: i,
@@ -2157,11 +2158,11 @@ function qr({
2157
2158
  hiddenEvents: e.hiddenEvents,
2158
2159
  view: n
2159
2160
  },
2160
- V(r.locale).more(e.moreCount),
2161
+ W(r.locale).more(e.moreCount),
2161
2162
  r.hostBridge
2162
2163
  ) }),
2163
- D && /* @__PURE__ */ u(
2164
- _r,
2164
+ T && /* @__PURE__ */ u(
2165
+ Zr,
2165
2166
  {
2166
2167
  api: t,
2167
2168
  cell: e,
@@ -2175,42 +2176,42 @@ function qr({
2175
2176
  }
2176
2177
  );
2177
2178
  }
2178
- function _r({
2179
+ function Zr({
2179
2180
  api: t,
2180
2181
  cell: e,
2181
2182
  options: r,
2182
2183
  view: n,
2183
2184
  onClose: a
2184
2185
  }) {
2185
- const o = F(null), s = new Intl.DateTimeFormat(r.locale ?? "en", {
2186
+ const o = F(null), d = new Intl.DateTimeFormat(r.locale ?? "en", {
2186
2187
  weekday: "long",
2187
2188
  day: "numeric",
2188
2189
  month: "long"
2189
- }), i = [...e.events, ...e.hiddenEvents].filter((d) => d.display !== "none");
2190
+ }), i = [...e.events, ...e.hiddenEvents].filter((s) => s.display !== "none");
2190
2191
  return R(() => {
2191
- const d = (c) => {
2192
+ const s = (c) => {
2192
2193
  o.current && !o.current.contains(c.target) && a();
2193
2194
  }, l = (c) => {
2194
2195
  c.key === "Escape" && a();
2195
2196
  };
2196
- return document.addEventListener("mousedown", d), document.addEventListener("keydown", l), () => {
2197
- document.removeEventListener("mousedown", d), document.removeEventListener("keydown", l);
2197
+ return document.addEventListener("mousedown", s), document.addEventListener("keydown", l), () => {
2198
+ document.removeEventListener("mousedown", s), document.removeEventListener("keydown", l);
2198
2199
  };
2199
- }, [a]), /* @__PURE__ */ k("div", { "data-rsv": "more-popover", role: "dialog", ref: o, onClick: (d) => d.stopPropagation(), children: [
2200
- /* @__PURE__ */ k("div", { "data-rsv": "more-popover-header", children: [
2201
- /* @__PURE__ */ u("span", { "data-rsv": "more-popover-title", children: s.format(m.toDate(e.date)) }),
2200
+ }, [a]), /* @__PURE__ */ C("div", { "data-rsv": "more-popover", role: "dialog", ref: o, onClick: (s) => s.stopPropagation(), children: [
2201
+ /* @__PURE__ */ C("div", { "data-rsv": "more-popover-header", children: [
2202
+ /* @__PURE__ */ u("span", { "data-rsv": "more-popover-title", children: d.format(f.toDate(e.date)) }),
2202
2203
  /* @__PURE__ */ u("button", { type: "button", "data-rsv": "more-popover-close", "aria-label": "✕", onClick: a, children: "✕" })
2203
2204
  ] }),
2204
- /* @__PURE__ */ u("div", { "data-rsv": "more-popover-body", children: i.map((d) => /* @__PURE__ */ u(
2205
+ /* @__PURE__ */ u("div", { "data-rsv": "more-popover-body", children: i.map((s) => /* @__PURE__ */ u(
2205
2206
  Se,
2206
2207
  {
2207
2208
  api: t,
2208
- event: d,
2209
+ event: s,
2209
2210
  options: r,
2210
2211
  view: n,
2211
2212
  arrastrandose: !1
2212
2213
  },
2213
- d.id
2214
+ s.id
2214
2215
  )) })
2215
2216
  ] });
2216
2217
  }
@@ -2221,17 +2222,17 @@ function Se({
2221
2222
  view: n,
2222
2223
  arrastrandose: a
2223
2224
  }) {
2224
- var h, b;
2225
- const o = r.editable === !0 && e.editable !== !1, s = o && r.eventDraggable === !0, i = F(null), d = F(null);
2225
+ var D, m;
2226
+ const o = r.editable === !0 && e.editable !== !1, d = o && r.eventDraggable === !0, i = F(null), s = F(null);
2226
2227
  R(() => () => {
2227
- var w;
2228
- return (w = i.current) == null ? void 0 : w.call(i);
2228
+ var b;
2229
+ return (b = i.current) == null ? void 0 : b.call(i);
2229
2230
  }, []);
2230
- const l = t.selectedEventIds.value.has(e.id), c = F(!1), p = ct(r.locale ?? "en", r.eventTimeFormat), D = e.allDay ? "" : p ? p(m.toDate(e.start)) : m.format(e.start, "HH:mm"), v = { event: e, isAllDay: e.allDay, timeText: D, view: n }, g = L(
2231
- (h = r.slots) == null ? void 0 : h.eventContent,
2231
+ const l = t.selectedEventIds.value.has(e.id), c = F(!1), y = ct(r.locale ?? "en", r.eventTimeFormat), T = e.allDay ? "" : y ? y(f.toDate(e.start)) : f.format(e.start, "HH:mm"), v = { event: e, isAllDay: e.allDay, timeText: T, view: n }, p = B(
2232
+ (D = r.slots) == null ? void 0 : D.eventContent,
2232
2233
  v,
2233
- /* @__PURE__ */ k("span", { "data-rsv": "event-title", children: [
2234
- D ? `${D} ` : "",
2234
+ /* @__PURE__ */ C("span", { "data-rsv": "event-title", children: [
2235
+ T ? `${T} ` : "",
2235
2236
  e.title
2236
2237
  ] }),
2237
2238
  r.hostBridge
@@ -2242,40 +2243,40 @@ function Se({
2242
2243
  "data-rsv": "event",
2243
2244
  role: "button",
2244
2245
  tabIndex: 0,
2245
- class: N((b = r.classNames) == null ? void 0 : b.event, ...e.classNames),
2246
+ class: K((m = r.classNames) == null ? void 0 : m.event, ...e.classNames),
2246
2247
  "data-all-day": String(e.allDay),
2247
2248
  "data-display": e.display,
2248
2249
  "data-event-id": e.id,
2249
2250
  "data-editable": String(o),
2250
2251
  "data-rsv-selected": String(l),
2251
2252
  "data-rsv-dragging": a ? "true" : void 0,
2252
- ref: (w) => {
2253
- var S, M;
2254
- W(w, (S = r.hooks) == null ? void 0 : S.eventDidMount, () => v), w !== d.current && ((M = i.current) == null || M.call(i), d.current = w, i.current = w ? he(w, e, s) : null);
2253
+ ref: (b) => {
2254
+ var w, M;
2255
+ U(b, (w = r.hooks) == null ? void 0 : w.eventDidMount, () => v), b !== s.current && ((M = i.current) == null || M.call(i), s.current = b, i.current = b ? he(b, e, d) : null);
2255
2256
  },
2256
2257
  style: `--rsv-event-bg:${e.backgroundColor};--rsv-event-fg:${e.textColor};--rsv-event-border:${e.borderColor}`,
2257
- onClick: (w) => {
2258
- if (w.stopPropagation(), c.current) {
2258
+ onClick: (b) => {
2259
+ if (b.stopPropagation(), c.current) {
2259
2260
  c.current = !1;
2260
2261
  return;
2261
2262
  }
2262
- if (w.ctrlKey || w.metaKey) {
2263
+ if (b.ctrlKey || b.metaKey) {
2263
2264
  t.toggleEventSelection(e.id);
2264
2265
  return;
2265
2266
  }
2266
- t.trigger("eventClick", { event: e, el: w.currentTarget }), e.url && window.open(e.url, "_self");
2267
+ t.trigger("eventClick", { event: e, el: b.currentTarget }), e.url && window.open(e.url, "_self");
2267
2268
  },
2268
- onKeyDown: o ? (w) => re(w, {
2269
+ onKeyDown: o ? (b) => re(b, {
2269
2270
  api: t,
2270
2271
  event: e,
2271
2272
  kind: "dayGrid",
2272
2273
  shortcuts: r.keyboardShortcuts
2273
2274
  }) : void 0,
2274
- children: g
2275
+ children: p
2275
2276
  }
2276
2277
  );
2277
2278
  }
2278
- const it = 40, Qt = 16, Zr = {
2279
+ const it = 40, Qt = 16, Jr = {
2279
2280
  update() {
2280
2281
  },
2281
2282
  getScrolled: () => 0,
@@ -2283,14 +2284,14 @@ const it = 40, Qt = 16, Zr = {
2283
2284
  }
2284
2285
  };
2285
2286
  function Oe(t) {
2286
- if (!t) return Zr;
2287
+ if (!t) return Jr;
2287
2288
  let e = 0, r = 0, n = 0;
2288
2289
  const a = () => {
2289
2290
  const o = t.getBoundingClientRect();
2290
- let s = 0;
2291
- if (e < o.top + it ? s = -Qt * (1 - Math.max(0, e - o.top) / it) : e > o.bottom - it && (s = Qt * (1 - Math.max(0, o.bottom - e) / it)), s !== 0) {
2291
+ let d = 0;
2292
+ if (e < o.top + it ? d = -Qt * (1 - Math.max(0, e - o.top) / it) : e > o.bottom - it && (d = Qt * (1 - Math.max(0, o.bottom - e) / it)), d !== 0) {
2292
2293
  const i = t.scrollTop;
2293
- t.scrollTop += s, r += t.scrollTop - i;
2294
+ t.scrollTop += d, r += t.scrollTop - i;
2294
2295
  }
2295
2296
  n = requestAnimationFrame(a);
2296
2297
  };
@@ -2309,124 +2310,128 @@ function Te(t) {
2309
2310
  }
2310
2311
  function te(t, e) {
2311
2312
  t.preventDefault(), t.stopPropagation();
2312
- const { api: r, event: n, model: a, columnEl: o, snap: s = "00:15", edge: i, onPreview: d } = e, l = o.getBoundingClientRect(), c = a.maxMinutes - a.minMinutes, p = l.height === 0 ? 0 : l.height / c, D = t.clientY, v = Oe(Te(o));
2313
+ const { api: r, event: n, model: a, columnEl: o, snap: d = "00:15", edge: i, onPreview: s } = e, l = o.getBoundingClientRect(), c = a.maxMinutes - a.minMinutes, y = l.height === 0 ? 0 : l.height / c, T = t.clientY, v = Oe(Te(o));
2313
2314
  v.update(t.clientY);
2314
- const g = X(s) || 15, h = (S) => {
2315
- const M = m.toDate(S);
2315
+ const p = X(d) || 15, D = (w) => {
2316
+ const M = f.toDate(w);
2316
2317
  return M.getHours() * 60 + M.getMinutes();
2317
- }, b = (S) => {
2318
- if (v.update(S.clientY), !d) return;
2319
- const M = It(S.clientY - D + v.getScrolled(), p, s), x = i ? $t(n.start, n.end, i, M, m) : ht(n.start, n.end, M, m), y = h(x.start), f = x.end ? h(x.end) : y + g;
2320
- d({ startMin: Math.min(y, f), endMin: Math.max(y, f) });
2321
- }, w = (S) => {
2322
- document.removeEventListener("pointermove", b), document.removeEventListener("pointerup", w), v.stop(), d == null || d(null);
2323
- const M = It(S.clientY - D + v.getScrolled(), p, s);
2318
+ }, m = (w) => {
2319
+ if (v.update(w.clientY), !s) return;
2320
+ const M = It(w.clientY - T + v.getScrolled(), y, d), x = i ? $t(n.start, n.end, i, M, f) : ht(n.start, n.end, M, f), g = D(x.start), k = x.end ? D(x.end) : g + p;
2321
+ s({ startMin: Math.min(g, k), endMin: Math.max(g, k) });
2322
+ }, b = (w) => {
2323
+ document.removeEventListener("pointermove", m), document.removeEventListener("pointerup", b), v.stop(), s == null || s(null);
2324
+ const M = It(w.clientY - T + v.getScrolled(), y, d);
2324
2325
  if (M === 0) return;
2325
- const x = i ? $t(n.start, n.end, i, M, m) : ht(n.start, n.end, M, m);
2326
+ const x = i ? $t(n.start, n.end, i, M, f) : ht(n.start, n.end, M, f);
2326
2327
  if (r.moveEvent(n.id, x.start, x.end)) {
2327
- const y = r.getEventById(n.id);
2328
- y && r.trigger(i ? "eventResize" : "eventDrop", { event: y });
2328
+ const g = r.getEventById(n.id);
2329
+ g && r.trigger(i ? "eventResize" : "eventDrop", { event: g });
2329
2330
  }
2330
2331
  };
2331
- document.addEventListener("pointermove", b), document.addEventListener("pointerup", w);
2332
+ document.addEventListener("pointermove", m), document.addEventListener("pointerup", b);
2332
2333
  }
2333
- function Jr(t, e) {
2334
+ function Qr(t, e) {
2334
2335
  if (t.target.closest('[data-rsv="event"]')) return;
2335
- const { api: r, date: n, model: a, columnEl: o, snap: s = "00:15" } = e, i = a.maxMinutes - a.minMinutes, d = X(s) || 15, l = (b) => {
2336
- const w = o.getBoundingClientRect(), S = w.height === 0 ? 0 : w.height / i, M = a.minMinutes + (S === 0 ? 0 : (b - w.top) / S), x = Math.max(a.minMinutes, Math.min(a.maxMinutes, M));
2337
- return Math.round(x / d) * d;
2336
+ const { api: r, date: n, model: a, columnEl: o, snap: d = "00:15" } = e, i = a.maxMinutes - a.minMinutes, s = X(d) || 15, l = (m) => {
2337
+ const b = o.getBoundingClientRect(), w = b.height === 0 ? 0 : b.height / i, M = a.minMinutes + (w === 0 ? 0 : (m - b.top) / w), x = Math.max(a.minMinutes, Math.min(a.maxMinutes, M));
2338
+ return Math.round(x / s) * s;
2338
2339
  }, c = l(t.clientY);
2339
- let p = c, D = !1;
2340
+ let y = c, T = !1;
2340
2341
  const v = Oe(Te(o));
2341
2342
  v.update(t.clientY);
2342
- const g = (b) => {
2343
- var S;
2344
- v.update(b.clientY);
2345
- const w = l(b.clientY);
2346
- w !== c && (D = !0), p = w, D && ((S = e.onPreview) == null || S.call(e, {
2347
- startMin: Math.min(c, p),
2348
- endMin: Math.max(c, p)
2343
+ const p = (m) => {
2344
+ var w;
2345
+ v.update(m.clientY);
2346
+ const b = l(m.clientY);
2347
+ b !== c && (T = !0), y = b, T && ((w = e.onPreview) == null || w.call(e, {
2348
+ startMin: Math.min(c, y),
2349
+ endMin: Math.max(c, y)
2349
2350
  }));
2350
- }, h = () => {
2351
+ }, D = () => {
2351
2352
  var M;
2352
- if (document.removeEventListener("pointermove", g), document.removeEventListener("pointerup", h), v.stop(), (M = e.onPreview) == null || M.call(e, null), !D) return;
2353
- const b = Math.min(c, p), w = Math.max(c, p), S = m.startOf(n, "day");
2353
+ if (document.removeEventListener("pointermove", p), document.removeEventListener("pointerup", D), v.stop(), (M = e.onPreview) == null || M.call(e, null), !T) return;
2354
+ const m = Math.min(c, y), b = Math.max(c, y), w = f.startOf(n, "day");
2354
2355
  r.select(
2355
- m.toISOString(m.add(S, { minutes: b })),
2356
- m.toISOString(m.add(S, { minutes: w }))
2356
+ f.toISOString(f.add(w, { minutes: m })),
2357
+ f.toISOString(f.add(w, { minutes: b }))
2357
2358
  );
2358
2359
  };
2359
- document.addEventListener("pointermove", g), document.addEventListener("pointerup", h);
2360
+ document.addEventListener("pointermove", p), document.addEventListener("pointerup", D);
2360
2361
  }
2361
- function Qr({ api: t, model: e, options: r }) {
2362
- const n = r.locale ?? "en", a = { type: t.getView().type }, o = st(n, r.dayHeaderFormat, {
2362
+ function tn({ api: t, model: e, options: r }) {
2363
+ const n = r.locale ?? "en", a = { type: t.getView().type }, o = dt(n, r.dayHeaderFormat, {
2363
2364
  weekday: "short",
2364
2365
  day: "numeric"
2365
- }), s = ct(n, r.slotLabelFormat), i = r.allDaySlot !== !1, d = `calc(var(--spacing-rsv-slot, 2.5rem) * ${e.slots.length})`, l = e.maxMinutes - e.minMinutes, c = X(r.snapDuration ?? r.slotDuration ?? "00:15") || 15, p = F(null), D = F(e);
2366
+ }), d = ct(n, r.slotLabelFormat), i = r.allDaySlot !== !1, s = `calc(var(--spacing-rsv-slot, 2.5rem) * ${e.slots.length})`, l = e.maxMinutes - e.minMinutes, c = X(r.snapDuration ?? r.slotDuration ?? "00:15") || 15, y = xe(r.businessHours), T = r.selectConstraint === "businessHours" && y !== null, v = (h, E) => {
2367
+ if (!T) return !0;
2368
+ const P = f.add(f.startOf(h, "day"), { minutes: E });
2369
+ return Pe(P, null, y, f);
2370
+ }, p = F(null), D = F(e);
2366
2371
  D.current = e;
2367
- const [v, g] = K(null), [h, b] = K(null), w = F(null), S = F(/* @__PURE__ */ new Map());
2372
+ const [m, b] = V(null), [w, M] = V(null), x = F(null), g = F(/* @__PURE__ */ new Map());
2368
2373
  R(() => {
2369
- const f = S.current;
2374
+ const h = g.current;
2370
2375
  return () => {
2371
- for (const T of f.values()) T();
2372
- f.clear();
2376
+ for (const E of h.values()) E();
2377
+ h.clear();
2373
2378
  };
2374
2379
  }, []), R(
2375
- () => Gr({
2380
+ () => Ur({
2376
2381
  api: t,
2377
2382
  getModel: () => D.current,
2378
2383
  snap: r.snapDuration ?? r.slotDuration,
2379
- onPreview: (f) => b(f ? { id: w.current ?? "", preview: f } : null),
2380
- onDragging: (f) => {
2381
- w.current = f, f === null && b(null);
2384
+ onPreview: (h) => M(h ? { id: x.current ?? "", preview: h } : null),
2385
+ onDragging: (h) => {
2386
+ x.current = h, h === null && M(null);
2382
2387
  }
2383
2388
  }),
2384
2389
  [t, r.snapDuration, r.slotDuration]
2385
2390
  ), R(() => {
2386
- const f = p.current;
2387
- if (!f) return;
2388
- const T = {
2389
- scrollToTime(C) {
2390
- const E = D.current, P = E.maxMinutes - E.minMinutes, I = f.scrollHeight;
2391
- if (P <= 0 || I <= 0) return;
2392
- const j = (Math.max(E.minMinutes, Math.min(E.maxMinutes, X(C))) - E.minMinutes) / P * I;
2393
- f.scrollTop = Math.max(0, Math.min(j, I - f.clientHeight));
2391
+ const h = p.current;
2392
+ if (!h) return;
2393
+ const E = {
2394
+ scrollToTime(P) {
2395
+ const O = D.current, A = O.maxMinutes - O.minMinutes, H = h.scrollHeight;
2396
+ if (A <= 0 || H <= 0) return;
2397
+ const S = (Math.max(O.minMinutes, Math.min(O.maxMinutes, X(P))) - O.minMinutes) / A * H;
2398
+ h.scrollTop = Math.max(0, Math.min(S, H - h.clientHeight));
2394
2399
  },
2395
2400
  getScrollTime() {
2396
- const C = D.current, E = C.maxMinutes - C.minMinutes, P = f.scrollHeight;
2397
- return E <= 0 || P <= 0 ? null : We(C.minMinutes + f.scrollTop / P * E);
2401
+ const P = D.current, O = P.maxMinutes - P.minMinutes, A = h.scrollHeight;
2402
+ return O <= 0 || A <= 0 ? null : Ge(P.minMinutes + h.scrollTop / A * O);
2398
2403
  }
2399
2404
  };
2400
- return t.setViewAdapter(T), () => t.setViewAdapter(null);
2405
+ return t.setViewAdapter(E), () => t.setViewAdapter(null);
2401
2406
  }, [t]);
2402
- const M = r.scrollTime;
2407
+ const k = r.scrollTime;
2403
2408
  R(() => {
2404
- if (!M) return;
2405
- let f = 0;
2406
- const T = requestAnimationFrame(() => {
2407
- f = requestAnimationFrame(() => t.scrollToTime(M));
2409
+ if (!k) return;
2410
+ let h = 0;
2411
+ const E = requestAnimationFrame(() => {
2412
+ h = requestAnimationFrame(() => t.scrollToTime(k));
2408
2413
  });
2409
2414
  return () => {
2410
- cancelAnimationFrame(T), cancelAnimationFrame(f);
2415
+ cancelAnimationFrame(E), cancelAnimationFrame(h);
2411
2416
  };
2412
2417
  }, [t]);
2413
- const x = (f, T) => {
2414
- const C = f.getBoundingClientRect();
2415
- if (C.height === 0 || l <= 0) return e.minMinutes;
2416
- const E = (T - C.top) / C.height * l, P = Math.floor(Math.max(0, Math.min(l, E)) / c) * c;
2417
- return e.minMinutes + P;
2418
- }, y = e.days[0];
2419
- return /* @__PURE__ */ k("div", { "data-rsv": "timegrid", style: `--rsv-tg-days:${e.days.length}`, children: [
2420
- /* @__PURE__ */ k("div", { "data-rsv": "tg-header", role: "row", children: [
2418
+ const j = (h, E) => {
2419
+ const P = h.getBoundingClientRect();
2420
+ if (P.height === 0 || l <= 0) return e.minMinutes;
2421
+ const O = (E - P.top) / P.height * l, A = Math.floor(Math.max(0, Math.min(l, O)) / c) * c;
2422
+ return e.minMinutes + A;
2423
+ }, $ = e.days[0];
2424
+ return /* @__PURE__ */ C("div", { "data-rsv": "timegrid", style: `--rsv-tg-days:${e.days.length}`, children: [
2425
+ /* @__PURE__ */ C("div", { "data-rsv": "tg-header", role: "row", children: [
2421
2426
  /* @__PURE__ */ u("div", { "data-rsv": "tg-axis-corner" }),
2422
- e.days.map((f) => {
2423
- var P, I;
2424
- const T = m.toDate(f.date), C = o ? o(T) : "", E = {
2425
- date: T,
2426
- text: C,
2427
- dayOfWeek: m.dayOfWeek(f.date),
2428
- dayNumber: m.dayOfMonth(f.date),
2429
- isToday: f.isToday,
2427
+ e.days.map((h) => {
2428
+ var A, H;
2429
+ const E = f.toDate(h.date), P = o ? o(E) : "", O = {
2430
+ date: E,
2431
+ text: P,
2432
+ dayOfWeek: f.dayOfWeek(h.date),
2433
+ dayNumber: f.dayOfMonth(h.date),
2434
+ isToday: h.isToday,
2430
2435
  view: a
2431
2436
  };
2432
2437
  return /* @__PURE__ */ u(
@@ -2434,207 +2439,208 @@ function Qr({ api: t, model: e, options: r }) {
2434
2439
  {
2435
2440
  "data-rsv": "tg-col-header",
2436
2441
  role: "columnheader",
2437
- "data-today": String(f.isToday),
2438
- "data-date": m.toISOString(f.date),
2442
+ "data-today": String(h.isToday),
2443
+ "data-date": f.toISOString(h.date),
2439
2444
  "data-nav-link": r.navLinks ? "true" : void 0,
2440
- class: N((P = r.classNames) == null ? void 0 : P.dayHeader),
2441
- ref: ($) => {
2442
- var j;
2443
- return W($, (j = r.hooks) == null ? void 0 : j.dayHeaderDidMount, () => E);
2445
+ class: K((A = r.classNames) == null ? void 0 : A.dayHeader),
2446
+ ref: (L) => {
2447
+ var S;
2448
+ return U(L, (S = r.hooks) == null ? void 0 : S.dayHeaderDidMount, () => O);
2444
2449
  },
2445
- onClick: r.navLinks ? () => ee(t, f.date) : void 0,
2446
- children: L((I = r.slots) == null ? void 0 : I.dayHeaderContent, E, C, r.hostBridge)
2450
+ onClick: r.navLinks ? () => ee(t, h.date) : void 0,
2451
+ children: B((H = r.slots) == null ? void 0 : H.dayHeaderContent, O, P, r.hostBridge)
2447
2452
  },
2448
- m.toISOString(f.date)
2453
+ f.toISOString(h.date)
2449
2454
  );
2450
2455
  })
2451
2456
  ] }),
2452
- i && /* @__PURE__ */ k("div", { "data-rsv": "tg-allday", role: "row", children: [
2453
- /* @__PURE__ */ u("div", { "data-rsv": "tg-axis-label", children: V(r.locale).allDay }),
2454
- e.days.map((f) => /* @__PURE__ */ u(
2457
+ i && /* @__PURE__ */ C("div", { "data-rsv": "tg-allday", role: "row", children: [
2458
+ /* @__PURE__ */ u("div", { "data-rsv": "tg-axis-label", children: W(r.locale).allDay }),
2459
+ e.days.map((h) => /* @__PURE__ */ u(
2455
2460
  "div",
2456
2461
  {
2457
2462
  "data-rsv": "tg-allday-cell",
2458
- onClick: () => t.trigger("dateClick", { date: f.date, allDay: !0 }),
2459
- children: f.allDayEvents.filter((T) => T.display !== "none").map((T) => {
2460
- var C, E;
2463
+ onClick: () => t.trigger("dateClick", { date: h.date, allDay: !0 }),
2464
+ children: h.allDayEvents.filter((E) => E.display !== "none").map((E) => {
2465
+ var P, O;
2461
2466
  return /* @__PURE__ */ u(
2462
2467
  "div",
2463
2468
  {
2464
2469
  "data-rsv": "event",
2465
2470
  "data-all-day": "true",
2466
- "data-event-id": T.id,
2467
- class: N((C = r.classNames) == null ? void 0 : C.event, ...T.classNames),
2468
- "data-display": T.display,
2469
- style: `--rsv-event-bg:${T.backgroundColor};--rsv-event-fg:${T.textColor};--rsv-event-border:${T.borderColor}`,
2470
- onClick: (P) => {
2471
- P.stopPropagation(), t.trigger("eventClick", { event: T, el: P.currentTarget }), T.url && window.open(T.url, "_self");
2471
+ "data-event-id": E.id,
2472
+ class: K((P = r.classNames) == null ? void 0 : P.event, ...E.classNames),
2473
+ "data-display": E.display,
2474
+ style: `--rsv-event-bg:${E.backgroundColor};--rsv-event-fg:${E.textColor};--rsv-event-border:${E.borderColor}`,
2475
+ onClick: (A) => {
2476
+ A.stopPropagation(), t.trigger("eventClick", { event: E, el: A.currentTarget }), E.url && window.open(E.url, "_self");
2472
2477
  },
2473
- children: L(
2474
- (E = r.slots) == null ? void 0 : E.eventContent,
2475
- { event: T, isAllDay: !0, timeText: "", view: a },
2476
- T.title,
2478
+ children: B(
2479
+ (O = r.slots) == null ? void 0 : O.eventContent,
2480
+ { event: E, isAllDay: !0, timeText: "", view: a },
2481
+ E.title,
2477
2482
  r.hostBridge
2478
2483
  )
2479
2484
  },
2480
- T.id
2485
+ E.id
2481
2486
  );
2482
2487
  })
2483
2488
  },
2484
- m.toISOString(f.date)
2489
+ f.toISOString(h.date)
2485
2490
  ))
2486
2491
  ] }),
2487
- /* @__PURE__ */ k("div", { "data-rsv": "tg-body", ref: p, children: [
2488
- /* @__PURE__ */ u("div", { "data-rsv": "tg-axis", style: `height:${d}`, children: e.slots.map((f) => {
2489
- var P, I;
2490
- const T = e.minMinutes + f.offsetMin;
2491
- let C = "";
2492
- f.isMajor && (C = s && y ? s(m.toDate(m.add(m.startOf(y.date, "day"), { minutes: T }))) : f.label || Ye(T));
2493
- const E = { text: C, minutes: T, isMajor: f.isMajor, view: a };
2494
- return /* @__PURE__ */ u("div", { "data-rsv": "tg-slot", "data-major": String(f.isMajor), children: /* @__PURE__ */ u(
2492
+ /* @__PURE__ */ C("div", { "data-rsv": "tg-body", ref: p, children: [
2493
+ /* @__PURE__ */ u("div", { "data-rsv": "tg-axis", style: `height:${s}`, children: e.slots.map((h) => {
2494
+ var A, H;
2495
+ const E = e.minMinutes + h.offsetMin;
2496
+ let P = "";
2497
+ h.isMajor && (P = d && $ ? d(f.toDate(f.add(f.startOf($.date, "day"), { minutes: E }))) : h.label || We(E));
2498
+ const O = { text: P, minutes: E, isMajor: h.isMajor, view: a };
2499
+ return /* @__PURE__ */ u("div", { "data-rsv": "tg-slot", "data-major": String(h.isMajor), children: /* @__PURE__ */ u(
2495
2500
  "span",
2496
2501
  {
2497
2502
  "data-rsv": "tg-slot-label",
2498
- class: N((P = r.classNames) == null ? void 0 : P.slotLabel),
2499
- ref: ($) => {
2500
- var j;
2501
- return W($, (j = r.hooks) == null ? void 0 : j.slotLabelDidMount, () => E);
2503
+ class: K((A = r.classNames) == null ? void 0 : A.slotLabel),
2504
+ ref: (L) => {
2505
+ var S;
2506
+ return U(L, (S = r.hooks) == null ? void 0 : S.slotLabelDidMount, () => O);
2502
2507
  },
2503
- children: L((I = r.slots) == null ? void 0 : I.slotLabelContent, E, C, r.hostBridge)
2508
+ children: B((H = r.slots) == null ? void 0 : H.slotLabelContent, O, P, r.hostBridge)
2504
2509
  }
2505
- ) }, f.offsetMin);
2510
+ ) }, h.offsetMin);
2506
2511
  }) }),
2507
- e.days.map((f, T) => {
2508
- var C;
2509
- return /* @__PURE__ */ k(
2512
+ e.days.map((h, E) => {
2513
+ var P;
2514
+ return /* @__PURE__ */ C(
2510
2515
  "div",
2511
2516
  {
2512
2517
  "data-rsv": "tg-col",
2513
- "data-today": String(f.isToday),
2514
- "data-date": m.toISOString(f.date),
2515
- "data-rsv-day-index": String(T),
2516
- ref: (E) => {
2517
- !E || S.current.has(E) || S.current.set(E, Vr(E));
2518
+ "data-today": String(h.isToday),
2519
+ "data-business": String(h.isBusiness),
2520
+ "data-date": f.toISOString(h.date),
2521
+ "data-rsv-day-index": String(E),
2522
+ ref: (O) => {
2523
+ !O || g.current.has(O) || g.current.set(O, Vr(O));
2518
2524
  },
2519
- style: `height:${d}`,
2520
- onClick: (E) => {
2525
+ style: `height:${s}`,
2526
+ onClick: (O) => {
2521
2527
  if (ye()) return;
2522
- const P = x(E.currentTarget, E.clientY);
2523
- t.trigger("dateClick", {
2524
- date: m.add(m.startOf(f.date, "day"), { minutes: P }),
2528
+ const A = j(O.currentTarget, O.clientY);
2529
+ v(h.date, A) && t.trigger("dateClick", {
2530
+ date: f.add(f.startOf(h.date, "day"), { minutes: A }),
2525
2531
  allDay: !1
2526
2532
  });
2527
2533
  },
2528
- onPointerDown: r.selectable ? (E) => Jr(E, {
2529
- api: t,
2530
- date: f.date,
2531
- model: e,
2532
- columnEl: E.currentTarget,
2533
- snap: r.snapDuration ?? r.slotDuration,
2534
- onPreview: r.selectMirror ? (P) => g(
2535
- P ? { dayIndex: T, startMin: P.startMin, endMin: P.endMin } : null
2536
- ) : void 0
2537
- }) : void 0,
2534
+ onPointerDown: r.selectable ? (O) => {
2535
+ const A = j(O.currentTarget, O.clientY);
2536
+ v(h.date, A) && Qr(O, {
2537
+ api: t,
2538
+ date: h.date,
2539
+ model: e,
2540
+ columnEl: O.currentTarget,
2541
+ snap: r.snapDuration ?? r.slotDuration,
2542
+ onPreview: r.selectMirror ? (H) => b(
2543
+ H ? { dayIndex: E, startMin: H.startMin, endMin: H.endMin } : null
2544
+ ) : void 0
2545
+ });
2546
+ } : void 0,
2538
2547
  children: [
2539
- r.businessHours && !f.businessPct && /* @__PURE__ */ u("div", { "data-rsv": "tg-nonbusiness", style: "top:0;height:100%" }),
2540
- f.businessPct && /* @__PURE__ */ k($e, { children: [
2541
- /* @__PURE__ */ u("div", { "data-rsv": "tg-nonbusiness", style: `top:0;height:${f.businessPct.topPct}%` }),
2542
- /* @__PURE__ */ u(
2543
- "div",
2544
- {
2545
- "data-rsv": "tg-nonbusiness",
2546
- style: `top:${f.businessPct.bottomPct}%;height:${100 - f.businessPct.bottomPct}%`
2547
- }
2548
- )
2549
- ] }),
2550
- (v == null ? void 0 : v.dayIndex) === T && l > 0 && /* @__PURE__ */ u(
2548
+ h.nonBusinessPct.map((O) => /* @__PURE__ */ u(
2549
+ "div",
2550
+ {
2551
+ "data-rsv": "tg-nonbusiness",
2552
+ style: `top:${O.topPct}%;height:${O.heightPct}%`
2553
+ },
2554
+ O.topPct
2555
+ )),
2556
+ (m == null ? void 0 : m.dayIndex) === E && l > 0 && /* @__PURE__ */ u(
2551
2557
  "div",
2552
2558
  {
2553
2559
  "data-rsv": "select-mirror",
2554
- style: `top:${(v.startMin - e.minMinutes) / l * 100}%;height:${(v.endMin - v.startMin) / l * 100}%`
2560
+ style: `top:${(m.startMin - e.minMinutes) / l * 100}%;height:${(m.endMin - m.startMin) / l * 100}%`
2555
2561
  }
2556
2562
  ),
2557
- f.timedSegs.filter((E) => E.event.display !== "none").map((E) => /* @__PURE__ */ u(
2558
- tn,
2563
+ h.timedSegs.filter((O) => O.event.display !== "none").map((O) => /* @__PURE__ */ u(
2564
+ en,
2559
2565
  {
2560
2566
  api: t,
2561
- seg: E,
2567
+ seg: O,
2562
2568
  model: e,
2563
2569
  options: r,
2564
2570
  view: a,
2565
- dragging: (h == null ? void 0 : h.id) === E.event.id,
2566
- onDragPreview: (P) => b(P ? { id: E.event.id, preview: { dayIndex: T, ...P } } : null)
2571
+ dragging: (w == null ? void 0 : w.id) === O.event.id,
2572
+ onDragPreview: (A) => M(A ? { id: O.event.id, preview: { dayIndex: E, ...A } } : null)
2567
2573
  },
2568
- E.event.id
2574
+ O.event.id
2569
2575
  )),
2570
- (h == null ? void 0 : h.preview.dayIndex) === T && l > 0 && /* @__PURE__ */ u(
2576
+ (w == null ? void 0 : w.preview.dayIndex) === E && l > 0 && /* @__PURE__ */ u(
2571
2577
  "div",
2572
2578
  {
2573
2579
  "data-rsv": "drag-mirror",
2574
- style: `top:${(h.preview.startMin - e.minMinutes) / l * 100}%;height:${(h.preview.endMin - h.preview.startMin) / l * 100}%`
2580
+ style: `top:${(w.preview.startMin - e.minMinutes) / l * 100}%;height:${(w.preview.endMin - w.preview.startMin) / l * 100}%`
2575
2581
  }
2576
2582
  ),
2577
- ((C = e.nowIndicator) == null ? void 0 : C.dayIndex) === T && /* @__PURE__ */ u("div", { "data-rsv": "now-indicator", style: `top:${e.nowIndicator.topPct}%` })
2583
+ ((P = e.nowIndicator) == null ? void 0 : P.dayIndex) === E && /* @__PURE__ */ u("div", { "data-rsv": "now-indicator", style: `top:${e.nowIndicator.topPct}%` })
2578
2584
  ]
2579
2585
  },
2580
- m.toISOString(f.date)
2586
+ f.toISOString(h.date)
2581
2587
  );
2582
2588
  })
2583
2589
  ] })
2584
2590
  ] });
2585
2591
  }
2586
- function tn({
2592
+ function en({
2587
2593
  api: t,
2588
2594
  seg: e,
2589
2595
  model: r,
2590
2596
  options: n,
2591
2597
  view: a,
2592
2598
  dragging: o,
2593
- onDragPreview: s
2599
+ onDragPreview: d
2594
2600
  }) {
2595
2601
  var M, x;
2596
- const { event: i } = e, d = n.editable === !0 && i.editable !== !1, l = d && n.eventDraggable === !0, c = F(null), p = F(null);
2602
+ const { event: i } = e, s = n.editable === !0 && i.editable !== !1, l = s && n.eventDraggable === !0, c = F(null), y = F(null);
2597
2603
  R(() => () => {
2598
- var y;
2599
- return (y = c.current) == null ? void 0 : y.call(c);
2604
+ var g;
2605
+ return (g = c.current) == null ? void 0 : g.call(c);
2600
2606
  }, []);
2601
- const D = t.selectedEventIds.value.has(i.id), v = 100 / e.colCount, g = ct(n.locale ?? "en", n.eventTimeFormat), h = g ? g(m.toDate(i.start)) : m.format(i.start, "HH:mm"), b = { event: i, isAllDay: !1, timeText: h, view: a }, w = L(
2607
+ const T = t.selectedEventIds.value.has(i.id), v = 100 / e.colCount, p = ct(n.locale ?? "en", n.eventTimeFormat), D = p ? p(f.toDate(i.start)) : f.format(i.start, "HH:mm"), m = { event: i, isAllDay: !1, timeText: D, view: a }, b = B(
2602
2608
  (M = n.slots) == null ? void 0 : M.eventContent,
2603
- b,
2604
- /* @__PURE__ */ k("span", { "data-rsv": "event-title", children: [
2605
- h,
2609
+ m,
2610
+ /* @__PURE__ */ C("span", { "data-rsv": "event-title", children: [
2611
+ D,
2606
2612
  " ",
2607
2613
  i.title
2608
2614
  ] }),
2609
2615
  n.hostBridge
2610
- ), S = (y) => y.closest('[data-rsv="tg-col"]') ?? y;
2611
- return /* @__PURE__ */ k(
2616
+ ), w = (g) => g.closest('[data-rsv="tg-col"]') ?? g;
2617
+ return /* @__PURE__ */ C(
2612
2618
  "div",
2613
2619
  {
2614
2620
  "data-rsv": "event",
2615
2621
  "data-all-day": "false",
2616
2622
  "data-display": i.display,
2617
2623
  "data-event-id": i.id,
2618
- "data-rsv-selected": String(D),
2624
+ "data-rsv-selected": String(T),
2619
2625
  "data-rsv-dragging": o ? "true" : void 0,
2620
- class: N((x = n.classNames) == null ? void 0 : x.event, ...i.classNames),
2626
+ class: K((x = n.classNames) == null ? void 0 : x.event, ...i.classNames),
2621
2627
  role: "button",
2622
2628
  tabIndex: 0,
2623
- ref: (y) => {
2624
- var f, T;
2625
- W(y, (f = n.hooks) == null ? void 0 : f.eventDidMount, () => b), y !== p.current && ((T = c.current) == null || T.call(c), p.current = y, c.current = y ? he(y, i, l) : null);
2629
+ ref: (g) => {
2630
+ var k, j;
2631
+ U(g, (k = n.hooks) == null ? void 0 : k.eventDidMount, () => m), g !== y.current && ((j = c.current) == null || j.call(c), y.current = g, c.current = g ? he(g, i, l) : null);
2626
2632
  },
2627
2633
  style: `position:absolute;top:${e.topPct}%;height:${e.heightPct}%;left:${e.col * v}%;width:${v}%;--rsv-event-bg:${i.backgroundColor};--rsv-event-fg:${i.textColor};--rsv-event-border:${i.borderColor}`,
2628
- onClick: (y) => {
2629
- if (y.stopPropagation(), !ye()) {
2630
- if (y.ctrlKey || y.metaKey) {
2634
+ onClick: (g) => {
2635
+ if (g.stopPropagation(), !ye()) {
2636
+ if (g.ctrlKey || g.metaKey) {
2631
2637
  t.toggleEventSelection(i.id);
2632
2638
  return;
2633
2639
  }
2634
- t.trigger("eventClick", { event: i, el: y.currentTarget }), i.url && window.open(i.url, "_self");
2640
+ t.trigger("eventClick", { event: i, el: g.currentTarget }), i.url && window.open(i.url, "_self");
2635
2641
  }
2636
2642
  },
2637
- onKeyDown: d ? (y) => re(y, {
2643
+ onKeyDown: s ? (g) => re(g, {
2638
2644
  api: t,
2639
2645
  event: i,
2640
2646
  kind: "timeGrid",
@@ -2642,35 +2648,35 @@ function tn({
2642
2648
  shortcuts: n.keyboardShortcuts
2643
2649
  }) : void 0,
2644
2650
  children: [
2645
- d && /* @__PURE__ */ u(
2651
+ s && /* @__PURE__ */ u(
2646
2652
  "span",
2647
2653
  {
2648
2654
  "data-rsv": "resize-handle",
2649
2655
  "data-edge": "start",
2650
- onPointerDown: (y) => te(y, {
2656
+ onPointerDown: (g) => te(g, {
2651
2657
  api: t,
2652
2658
  event: i,
2653
2659
  model: r,
2654
- columnEl: S(y.currentTarget),
2660
+ columnEl: w(g.currentTarget),
2655
2661
  snap: n.snapDuration,
2656
- onPreview: s,
2662
+ onPreview: d,
2657
2663
  edge: "start"
2658
2664
  })
2659
2665
  }
2660
2666
  ),
2661
- w,
2662
- d && /* @__PURE__ */ u(
2667
+ b,
2668
+ s && /* @__PURE__ */ u(
2663
2669
  "span",
2664
2670
  {
2665
2671
  "data-rsv": "resize-handle",
2666
2672
  "data-edge": "end",
2667
- onPointerDown: (y) => te(y, {
2673
+ onPointerDown: (g) => te(g, {
2668
2674
  api: t,
2669
2675
  event: i,
2670
2676
  model: r,
2671
- columnEl: S(y.currentTarget),
2677
+ columnEl: w(g.currentTarget),
2672
2678
  snap: n.snapDuration,
2673
- onPreview: s,
2679
+ onPreview: d,
2674
2680
  edge: "end"
2675
2681
  })
2676
2682
  }
@@ -2679,39 +2685,39 @@ function tn({
2679
2685
  }
2680
2686
  );
2681
2687
  }
2682
- function en({ api: t, model: e, options: r }) {
2683
- const n = r.locale ?? "en", a = { type: t.getView().type }, o = V(r.locale), s = st(n, r.listDayFormat, {
2688
+ function rn({ api: t, model: e, options: r }) {
2689
+ const n = r.locale ?? "en", a = { type: t.getView().type }, o = W(r.locale), d = dt(n, r.listDayFormat, {
2684
2690
  weekday: "long",
2685
2691
  day: "numeric",
2686
2692
  month: "long"
2687
- }), i = r.listDaySideFormat ? st(n, r.listDaySideFormat, { month: "short", day: "2-digit" }) : null, d = ct(n, r.eventTimeFormat);
2688
- return e.isEmpty ? /* @__PURE__ */ u("div", { "data-rsv": "list", children: /* @__PURE__ */ u("div", { "data-rsv": "list-empty", children: o.noEvents }) }) : /* @__PURE__ */ u("div", { "data-rsv": "list", role: "list", children: e.days.map((l) => /* @__PURE__ */ k("div", { "data-rsv": "list-day", "data-today": String(l.isToday), children: [
2689
- /* @__PURE__ */ k("div", { "data-rsv": "list-day-header", role: "heading", "aria-level": 3, children: [
2690
- /* @__PURE__ */ u("span", { "data-rsv": "list-day-text", children: s ? s(m.toDate(l.date)) : "" }),
2691
- i && /* @__PURE__ */ u("span", { "data-rsv": "list-day-side-text", children: i(m.toDate(l.date)) })
2693
+ }), i = r.listDaySideFormat ? dt(n, r.listDaySideFormat, { month: "short", day: "2-digit" }) : null, s = ct(n, r.eventTimeFormat);
2694
+ return e.isEmpty ? /* @__PURE__ */ u("div", { "data-rsv": "list", children: /* @__PURE__ */ u("div", { "data-rsv": "list-empty", children: o.noEvents }) }) : /* @__PURE__ */ u("div", { "data-rsv": "list", role: "list", children: e.days.map((l) => /* @__PURE__ */ C("div", { "data-rsv": "list-day", "data-today": String(l.isToday), children: [
2695
+ /* @__PURE__ */ C("div", { "data-rsv": "list-day-header", role: "heading", "aria-level": 3, children: [
2696
+ /* @__PURE__ */ u("span", { "data-rsv": "list-day-text", children: d ? d(f.toDate(l.date)) : "" }),
2697
+ i && /* @__PURE__ */ u("span", { "data-rsv": "list-day-side-text", children: i(f.toDate(l.date)) })
2692
2698
  ] }),
2693
2699
  l.events.filter((c) => c.display !== "none").map((c) => {
2694
- var v, g;
2695
- const p = c.allDay ? o.allDay : d ? d(m.toDate(c.start)) : m.format(c.start, "HH:mm"), D = { event: c, isAllDay: c.allDay, timeText: p, view: a };
2696
- return /* @__PURE__ */ k(
2700
+ var v, p;
2701
+ const y = c.allDay ? o.allDay : s ? s(f.toDate(c.start)) : f.format(c.start, "HH:mm"), T = { event: c, isAllDay: c.allDay, timeText: y, view: a };
2702
+ return /* @__PURE__ */ C(
2697
2703
  "div",
2698
2704
  {
2699
2705
  "data-rsv": "list-item",
2700
2706
  role: "listitem",
2701
2707
  tabIndex: 0,
2702
2708
  "data-event-id": c.id,
2703
- class: N((v = r.classNames) == null ? void 0 : v.event, ...c.classNames),
2709
+ class: K((v = r.classNames) == null ? void 0 : v.event, ...c.classNames),
2704
2710
  "data-display": c.display,
2705
- ref: (h) => {
2706
- var b;
2707
- return W(h, (b = r.hooks) == null ? void 0 : b.eventDidMount, () => D);
2711
+ ref: (D) => {
2712
+ var m;
2713
+ return U(D, (m = r.hooks) == null ? void 0 : m.eventDidMount, () => T);
2708
2714
  },
2709
2715
  style: `--rsv-event-bg:${c.backgroundColor};--rsv-event-fg:${c.textColor};--rsv-event-border:${c.borderColor}`,
2710
- onClick: (h) => {
2711
- t.trigger("eventClick", { event: c, el: h.currentTarget }), c.url && window.open(c.url, "_self");
2716
+ onClick: (D) => {
2717
+ t.trigger("eventClick", { event: c, el: D.currentTarget }), c.url && window.open(c.url, "_self");
2712
2718
  },
2713
2719
  children: [
2714
- /* @__PURE__ */ u("span", { "data-rsv": "list-item-time", children: p }),
2720
+ /* @__PURE__ */ u("span", { "data-rsv": "list-item-time", children: y }),
2715
2721
  /* @__PURE__ */ u(
2716
2722
  "span",
2717
2723
  {
@@ -2719,9 +2725,9 @@ function en({ api: t, model: e, options: r }) {
2719
2725
  style: `--rsv-event-bg:${c.backgroundColor}`
2720
2726
  }
2721
2727
  ),
2722
- /* @__PURE__ */ u("div", { "data-rsv": "list-item-title", children: L(
2723
- (g = r.slots) == null ? void 0 : g.eventContent,
2724
- D,
2728
+ /* @__PURE__ */ u("div", { "data-rsv": "list-item-title", children: B(
2729
+ (p = r.slots) == null ? void 0 : p.eventContent,
2730
+ T,
2725
2731
  c.title,
2726
2732
  r.hostBridge
2727
2733
  ) })
@@ -2730,18 +2736,18 @@ function en({ api: t, model: e, options: r }) {
2730
2736
  c.id
2731
2737
  );
2732
2738
  })
2733
- ] }, m.toISOString(l.date))) });
2739
+ ] }, f.toISOString(l.date))) });
2734
2740
  }
2735
- function rn({ api: t, model: e, options: r }) {
2741
+ function nn({ api: t, model: e, options: r }) {
2736
2742
  const n = r.locale ?? "en", a = new Intl.DateTimeFormat(n, { month: "long" });
2737
- return /* @__PURE__ */ u("div", { "data-rsv": "multimonth", children: e.months.map((o) => /* @__PURE__ */ k("section", { "data-rsv": "mm-month", children: [
2738
- /* @__PURE__ */ u("header", { "data-rsv": "mm-title", children: a.format(m.toDate(o.date)) }),
2743
+ return /* @__PURE__ */ u("div", { "data-rsv": "multimonth", children: e.months.map((o) => /* @__PURE__ */ C("section", { "data-rsv": "mm-month", children: [
2744
+ /* @__PURE__ */ u("header", { "data-rsv": "mm-title", children: a.format(f.toDate(o.date)) }),
2739
2745
  /* @__PURE__ */ u(De, { api: t, model: o.dayGrid, options: r })
2740
- ] }, m.toISOString(o.date))) });
2746
+ ] }, f.toISOString(o.date))) });
2741
2747
  }
2742
2748
  const Tt = 1.6;
2743
- function nn({ api: t, model: e, options: r }) {
2744
- return /* @__PURE__ */ k("div", { "data-rsv": "timeline", children: [
2749
+ function an({ api: t, model: e, options: r }) {
2750
+ return /* @__PURE__ */ C("div", { "data-rsv": "timeline", children: [
2745
2751
  /* @__PURE__ */ u("div", { "data-rsv": "tl-axis", role: "row", children: e.slots.map((n) => /* @__PURE__ */ u("div", { "data-rsv": "tl-slot", style: `left:${n.leftPct}%`, children: n.label }, n.leftPct)) }),
2746
2752
  /* @__PURE__ */ u("div", { "data-rsv": "tl-body", style: `height:${e.laneCount * Tt + 0.5}rem`, children: e.segs.map((n) => /* @__PURE__ */ u(Ee, { api: t, seg: n, options: r }, n.event.id)) })
2747
2753
  ] });
@@ -2762,7 +2768,7 @@ function Ee({
2762
2768
  tabIndex: 0,
2763
2769
  style: `position:absolute;left:${e.leftPct}%;width:${e.widthPct}%;top:${e.lane * Tt}rem;height:${Tt - 0.2}rem;--rsv-event-bg:${n.backgroundColor};--rsv-event-fg:${n.textColor};--rsv-event-border:${n.borderColor}`,
2764
2770
  onClick: (o) => t.trigger("eventClick", { event: n, el: o.currentTarget }),
2765
- children: L(
2771
+ children: B(
2766
2772
  (a = r.slots) == null ? void 0 : a.eventContent,
2767
2773
  { event: n, isAllDay: n.allDay, timeText: "", view: { type: t.getView().type } },
2768
2774
  n.title,
@@ -2771,17 +2777,17 @@ function Ee({
2771
2777
  }
2772
2778
  );
2773
2779
  }
2774
- const an = 1.6;
2775
- function on({ api: t, model: e, options: r }) {
2776
- return /* @__PURE__ */ k("div", { "data-rsv": "resource-timeline", children: [
2777
- /* @__PURE__ */ k("div", { "data-rsv": "rt-header", role: "row", children: [
2780
+ const on = 1.6;
2781
+ function sn({ api: t, model: e, options: r }) {
2782
+ return /* @__PURE__ */ C("div", { "data-rsv": "resource-timeline", children: [
2783
+ /* @__PURE__ */ C("div", { "data-rsv": "rt-header", role: "row", children: [
2778
2784
  /* @__PURE__ */ u("div", { "data-rsv": "resource-area-header", children: r.locale === "es" ? "Recursos" : "Resources" }),
2779
2785
  /* @__PURE__ */ u("div", { "data-rsv": "tl-axis", children: e.slots.map((n) => /* @__PURE__ */ u("div", { "data-rsv": "tl-slot", style: `left:${n.leftPct}%`, children: n.label }, n.leftPct)) })
2780
2786
  ] }),
2781
2787
  e.lanes.map((n) => {
2782
- const a = n.laneCount * an + 0.4;
2783
- return /* @__PURE__ */ k("div", { "data-rsv": "resource-row", role: "row", children: [
2784
- /* @__PURE__ */ k(
2788
+ const a = n.laneCount * on + 0.4;
2789
+ return /* @__PURE__ */ C("div", { "data-rsv": "resource-row", role: "row", children: [
2790
+ /* @__PURE__ */ C(
2785
2791
  "div",
2786
2792
  {
2787
2793
  "data-rsv": "resource-label",
@@ -2808,28 +2814,28 @@ function on({ api: t, model: e, options: r }) {
2808
2814
  }
2809
2815
  function dn({ api: t, model: e, options: r }) {
2810
2816
  const n = `calc(var(--spacing-rsv-slot, 2.5rem) * ${e.slots.length})`;
2811
- return /* @__PURE__ */ k("div", { "data-rsv": "timegrid", style: `--rsv-tg-days:${e.columns.length}`, children: [
2812
- /* @__PURE__ */ k("div", { "data-rsv": "tg-header", role: "row", children: [
2817
+ return /* @__PURE__ */ C("div", { "data-rsv": "timegrid", style: `--rsv-tg-days:${e.columns.length}`, children: [
2818
+ /* @__PURE__ */ C("div", { "data-rsv": "tg-header", role: "row", children: [
2813
2819
  /* @__PURE__ */ u("div", { "data-rsv": "tg-axis-corner" }),
2814
2820
  e.columns.map((a) => /* @__PURE__ */ u("div", { "data-rsv": "tg-col-header", role: "columnheader", children: a.row.resource.title }, a.row.resource.id))
2815
2821
  ] }),
2816
- /* @__PURE__ */ k("div", { "data-rsv": "tg-allday", role: "row", children: [
2817
- /* @__PURE__ */ u("div", { "data-rsv": "tg-axis-label", children: V(r.locale).allDay }),
2822
+ /* @__PURE__ */ C("div", { "data-rsv": "tg-allday", role: "row", children: [
2823
+ /* @__PURE__ */ u("div", { "data-rsv": "tg-axis-label", children: W(r.locale).allDay }),
2818
2824
  e.columns.map((a) => /* @__PURE__ */ u("div", { "data-rsv": "tg-allday-cell", children: a.allDayEvents.map((o) => /* @__PURE__ */ u(
2819
2825
  "div",
2820
2826
  {
2821
2827
  "data-rsv": "event",
2822
2828
  "data-all-day": "true",
2823
2829
  style: `--rsv-event-bg:${o.backgroundColor}`,
2824
- onClick: (s) => t.trigger("eventClick", { event: o, el: s.currentTarget }),
2830
+ onClick: (d) => t.trigger("eventClick", { event: o, el: d.currentTarget }),
2825
2831
  children: o.title
2826
2832
  },
2827
2833
  o.id
2828
2834
  )) }, a.row.resource.id))
2829
2835
  ] }),
2830
- /* @__PURE__ */ k("div", { "data-rsv": "tg-body", children: [
2836
+ /* @__PURE__ */ C("div", { "data-rsv": "tg-body", children: [
2831
2837
  /* @__PURE__ */ u("div", { "data-rsv": "tg-axis", style: `height:${n}`, children: e.slots.map((a) => /* @__PURE__ */ u("div", { "data-rsv": "tg-slot", "data-major": String(a.isMajor), children: /* @__PURE__ */ u("span", { "data-rsv": "tg-slot-label", children: a.label }) }, a.offsetMin)) }),
2832
- e.columns.map((a) => /* @__PURE__ */ k(
2838
+ e.columns.map((a) => /* @__PURE__ */ C(
2833
2839
  "div",
2834
2840
  {
2835
2841
  "data-rsv": "tg-col",
@@ -2837,8 +2843,8 @@ function dn({ api: t, model: e, options: r }) {
2837
2843
  style: `height:${n}`,
2838
2844
  children: [
2839
2845
  a.timedSegs.map((o) => {
2840
- const s = 100 / o.colCount;
2841
- return /* @__PURE__ */ k(
2846
+ const d = 100 / o.colCount;
2847
+ return /* @__PURE__ */ C(
2842
2848
  "div",
2843
2849
  {
2844
2850
  "data-rsv": "event",
@@ -2846,12 +2852,12 @@ function dn({ api: t, model: e, options: r }) {
2846
2852
  "data-event-id": o.event.id,
2847
2853
  role: "button",
2848
2854
  tabIndex: 0,
2849
- style: `position:absolute;top:${o.topPct}%;height:${o.heightPct}%;left:${o.col * s}%;width:${s}%;--rsv-event-bg:${o.event.backgroundColor};--rsv-event-fg:${o.event.textColor}`,
2855
+ style: `position:absolute;top:${o.topPct}%;height:${o.heightPct}%;left:${o.col * d}%;width:${d}%;--rsv-event-bg:${o.event.backgroundColor};--rsv-event-fg:${o.event.textColor}`,
2850
2856
  onClick: (i) => {
2851
2857
  i.stopPropagation(), t.trigger("eventClick", { event: o.event });
2852
2858
  },
2853
2859
  children: [
2854
- m.format(o.event.start, "HH:mm"),
2860
+ f.format(o.event.start, "HH:mm"),
2855
2861
  " ",
2856
2862
  o.event.title
2857
2863
  ]
@@ -2867,15 +2873,15 @@ function dn({ api: t, model: e, options: r }) {
2867
2873
  ] })
2868
2874
  ] });
2869
2875
  }
2870
- function sn({ api: t, model: e }) {
2871
- return /* @__PURE__ */ k("div", { "data-rsv": "resource-daygrid", style: `--rsv-rdg-cols:${e.columns.length}`, children: [
2876
+ function ln({ api: t, model: e }) {
2877
+ return /* @__PURE__ */ C("div", { "data-rsv": "resource-daygrid", style: `--rsv-rdg-cols:${e.columns.length}`, children: [
2872
2878
  /* @__PURE__ */ u("div", { "data-rsv": "rdg-header", role: "row", children: e.columns.map((r) => /* @__PURE__ */ u("div", { "data-rsv": "rdg-col-header", role: "columnheader", children: r.row.resource.title }, r.row.resource.id)) }),
2873
2879
  /* @__PURE__ */ u("div", { "data-rsv": "rdg-body", role: "row", children: e.columns.map((r) => /* @__PURE__ */ u(
2874
2880
  "div",
2875
2881
  {
2876
2882
  "data-rsv": "rdg-col",
2877
2883
  "data-rsv-resource-id": r.row.resource.id,
2878
- children: r.events.map((n) => /* @__PURE__ */ k(
2884
+ children: r.events.map((n) => /* @__PURE__ */ C(
2879
2885
  "div",
2880
2886
  {
2881
2887
  "data-rsv": "event",
@@ -2886,7 +2892,7 @@ function sn({ api: t, model: e }) {
2886
2892
  style: `--rsv-event-bg:${n.backgroundColor};--rsv-event-fg:${n.textColor};--rsv-event-border:${n.borderColor}`,
2887
2893
  onClick: (a) => t.trigger("eventClick", { event: n, el: a.currentTarget }),
2888
2894
  children: [
2889
- n.allDay ? "" : m.format(n.start, "HH:mm") + " ",
2895
+ n.allDay ? "" : f.format(n.start, "HH:mm") + " ",
2890
2896
  n.title
2891
2897
  ]
2892
2898
  },
@@ -2897,44 +2903,44 @@ function sn({ api: t, model: e }) {
2897
2903
  )) })
2898
2904
  ] });
2899
2905
  }
2900
- function ln({ api: t, model: e, options: r }) {
2906
+ function cn({ api: t, model: e, options: r }) {
2901
2907
  return /* @__PURE__ */ u("div", { "data-rsv": "resource-daygrid-month", style: `--rsv-rdgm-cols:${e.columnCount}`, children: e.weeks.map((n, a) => /* @__PURE__ */ u("div", { "data-rsv": "rdgm-week", role: "row", children: n.days.map((o) => /* @__PURE__ */ u(
2902
- cn,
2908
+ un,
2903
2909
  {
2904
2910
  api: t,
2905
2911
  cell: o,
2906
2912
  options: r
2907
2913
  },
2908
- m.toISOString(o.date)
2914
+ f.toISOString(o.date)
2909
2915
  )) }, `week-${a}`)) });
2910
2916
  }
2911
- function cn({
2917
+ function un({
2912
2918
  api: t,
2913
2919
  cell: e,
2914
2920
  options: r
2915
2921
  }) {
2916
- const n = m.dayOfMonth(e.date);
2917
- return /* @__PURE__ */ k(
2922
+ const n = f.dayOfMonth(e.date);
2923
+ return /* @__PURE__ */ C(
2918
2924
  "div",
2919
2925
  {
2920
2926
  "data-rsv": "day",
2921
2927
  role: "gridcell",
2922
- "data-date": m.toISOString(e.date),
2928
+ "data-date": f.toISOString(e.date),
2923
2929
  "data-today": String(e.isToday),
2924
2930
  "data-other": String(e.isOther),
2925
2931
  children: [
2926
2932
  /* @__PURE__ */ u("span", { "data-rsv": "day-number", children: n }),
2927
- /* @__PURE__ */ u("div", { "data-rsv": "rdgm-columns", children: e.columns.map((a) => /* @__PURE__ */ k("div", { "data-rsv": "rdgm-col", "data-rsv-resource-id": a.row.resource.id, children: [
2933
+ /* @__PURE__ */ u("div", { "data-rsv": "rdgm-columns", children: e.columns.map((a) => /* @__PURE__ */ C("div", { "data-rsv": "rdgm-col", "data-rsv-resource-id": a.row.resource.id, children: [
2928
2934
  /* @__PURE__ */ u("span", { "data-rsv": "rdgm-col-label", children: a.row.resource.title }),
2929
2935
  a.events.map((o) => {
2930
- const s = t.selectedEventIds.value.has(o.id);
2931
- return /* @__PURE__ */ k(
2936
+ const d = t.selectedEventIds.value.has(o.id);
2937
+ return /* @__PURE__ */ C(
2932
2938
  "div",
2933
2939
  {
2934
2940
  "data-rsv": "event",
2935
2941
  "data-all-day": String(o.allDay),
2936
2942
  "data-event-id": o.id,
2937
- "data-rsv-selected": String(s),
2943
+ "data-rsv-selected": String(d),
2938
2944
  role: "button",
2939
2945
  tabIndex: 0,
2940
2946
  style: `--rsv-event-bg:${o.backgroundColor};--rsv-event-fg:${o.textColor};--rsv-event-border:${o.borderColor}`,
@@ -2946,7 +2952,7 @@ function cn({
2946
2952
  t.trigger("eventClick", { event: o, el: i.currentTarget }), o.url && window.open(o.url, "_self");
2947
2953
  },
2948
2954
  children: [
2949
- o.allDay ? "" : `${m.format(o.start, "HH:mm")} `,
2955
+ o.allDay ? "" : `${f.format(o.start, "HH:mm")} `,
2950
2956
  o.title
2951
2957
  ]
2952
2958
  },
@@ -2964,7 +2970,7 @@ function cn({
2964
2970
  hiddenEvents: a.hiddenEvents
2965
2971
  });
2966
2972
  },
2967
- children: V(r.locale).more(a.moreCount)
2973
+ children: W(r.locale).more(a.moreCount)
2968
2974
  }
2969
2975
  )
2970
2976
  ] }, a.row.resource.id)) })
@@ -2972,32 +2978,32 @@ function cn({
2972
2978
  }
2973
2979
  );
2974
2980
  }
2975
- function un({ api: t, options: e }) {
2981
+ function vn({ api: t, options: e }) {
2976
2982
  var l;
2977
- const r = t.viewModel.value, n = e.direction ?? V(e.locale).direction, a = t.getEffectiveOption("hourHeight", r.type), o = t.getEffectiveOption("height", r.type), s = [
2978
- e.themeTokens ? Pe(e.themeTokens) : "",
2979
- a ? `${xe.slotHeight}:${a}px` : "",
2983
+ const r = t.viewModel.value, n = e.direction ?? W(e.locale).direction, a = t.getEffectiveOption("hourHeight", r.type), o = t.getEffectiveOption("height", r.type), d = [
2984
+ e.themeTokens ? Ie(e.themeTokens) : "",
2985
+ a ? `${Ae.slotHeight}:${a}px` : "",
2980
2986
  o != null && o !== "auto" ? `height:${typeof o == "number" ? `${o}px` : o}` : ""
2981
2987
  ].filter(Boolean).join(";") || void 0, i = F(null);
2982
2988
  R(() => (t.setRootEl(i.current), () => t.setRootEl(null)), [t]);
2983
- const d = F(e.responsiveViews);
2984
- return d.current = e.responsiveViews, R(() => {
2989
+ const s = F(e.responsiveViews);
2990
+ return s.current = e.responsiveViews, R(() => {
2985
2991
  const c = i.current;
2986
2992
  if (!c || typeof ResizeObserver > "u") return;
2987
- let p = 0;
2988
- const D = new ResizeObserver((v) => {
2989
- const g = v[0], h = (g == null ? void 0 : g.contentRect.width) ?? c.clientWidth;
2990
- cancelAnimationFrame(p), p = requestAnimationFrame(() => {
2991
- const b = d.current;
2992
- if (!(b != null && b.length)) return;
2993
- const w = He(b, h);
2994
- w && w !== t.getView().type && t.hasView(w) && t.changeView(w);
2993
+ let y = 0;
2994
+ const T = new ResizeObserver((v) => {
2995
+ const p = v[0], D = (p == null ? void 0 : p.contentRect.width) ?? c.clientWidth;
2996
+ cancelAnimationFrame(y), y = requestAnimationFrame(() => {
2997
+ const m = s.current;
2998
+ if (!(m != null && m.length)) return;
2999
+ const b = Le(m, D);
3000
+ b && b !== t.getView().type && t.hasView(b) && t.changeView(b);
2995
3001
  });
2996
3002
  });
2997
- return D.observe(c), () => {
2998
- cancelAnimationFrame(p), D.disconnect();
3003
+ return T.observe(c), () => {
3004
+ cancelAnimationFrame(y), T.disconnect();
2999
3005
  };
3000
- }, [t]), /* @__PURE__ */ k(
3006
+ }, [t]), /* @__PURE__ */ C(
3001
3007
  "div",
3002
3008
  {
3003
3009
  ref: i,
@@ -3005,11 +3011,11 @@ function un({ api: t, options: e }) {
3005
3011
  dir: n,
3006
3012
  "data-rsv-theme": e.theme,
3007
3013
  "data-rsv-autoheight": o === "auto" ? "true" : void 0,
3008
- style: s,
3009
- class: N((l = e.classNames) == null ? void 0 : l.root),
3014
+ style: d,
3015
+ class: K((l = e.classNames) == null ? void 0 : l.root),
3010
3016
  children: [
3011
3017
  e.headerToolbar !== !1 && /* @__PURE__ */ u(Ve, { api: t, title: r.title, activeView: r.type, options: e }),
3012
- /* @__PURE__ */ u("div", { "data-rsv": "view", "data-view": r.type, children: r.dayGrid ? /* @__PURE__ */ u(De, { api: t, model: r.dayGrid, options: e }) : r.timeGrid ? /* @__PURE__ */ u(Qr, { api: t, model: r.timeGrid, options: e }) : r.list ? /* @__PURE__ */ u(en, { api: t, model: r.list, options: e }) : r.multiMonth ? /* @__PURE__ */ u(rn, { api: t, model: r.multiMonth, options: e }) : r.resourceTimeGrid ? /* @__PURE__ */ u(dn, { api: t, model: r.resourceTimeGrid, options: e }) : r.resourceDayGrid ? /* @__PURE__ */ u(sn, { api: t, model: r.resourceDayGrid, options: e }) : r.resourceDayGridMonth ? /* @__PURE__ */ u(ln, { api: t, model: r.resourceDayGridMonth, options: e }) : r.resourceTimeline ? /* @__PURE__ */ u(on, { api: t, model: r.resourceTimeline, options: e }) : r.timeline ? /* @__PURE__ */ u(nn, { api: t, model: r.timeline, options: e }) : /* @__PURE__ */ k("div", { "data-rsv": "unsupported", children: [
3018
+ /* @__PURE__ */ u("div", { "data-rsv": "view", "data-view": r.type, children: r.dayGrid ? /* @__PURE__ */ u(De, { api: t, model: r.dayGrid, options: e }) : r.timeGrid ? /* @__PURE__ */ u(tn, { api: t, model: r.timeGrid, options: e }) : r.list ? /* @__PURE__ */ u(rn, { api: t, model: r.list, options: e }) : r.multiMonth ? /* @__PURE__ */ u(nn, { api: t, model: r.multiMonth, options: e }) : r.resourceTimeGrid ? /* @__PURE__ */ u(dn, { api: t, model: r.resourceTimeGrid, options: e }) : r.resourceDayGrid ? /* @__PURE__ */ u(ln, { api: t, model: r.resourceDayGrid, options: e }) : r.resourceDayGridMonth ? /* @__PURE__ */ u(cn, { api: t, model: r.resourceDayGridMonth, options: e }) : r.resourceTimeline ? /* @__PURE__ */ u(sn, { api: t, model: r.resourceTimeline, options: e }) : r.timeline ? /* @__PURE__ */ u(an, { api: t, model: r.timeline, options: e }) : /* @__PURE__ */ C("div", { "data-rsv": "unsupported", children: [
3013
3019
  'La vista "',
3014
3020
  r.type,
3015
3021
  '" se implementa en una fase posterior.'
@@ -3018,54 +3024,54 @@ function un({ api: t, options: e }) {
3018
3024
  }
3019
3025
  );
3020
3026
  }
3021
- function hn(t, e) {
3022
- const r = new Ae(e);
3023
- return At(Ce(un, { api: r, options: e }), t), {
3027
+ function bn(t, e) {
3028
+ const r = new $e(e);
3029
+ return At(ke(vn, { api: r, options: e }), t), {
3024
3030
  api: r,
3025
3031
  destroy() {
3026
3032
  At(null, t), r.destroy();
3027
3033
  }
3028
3034
  };
3029
3035
  }
3030
- function bn(t, e = "calendar.ics") {
3036
+ function wn(t, e = "calendar.ics") {
3031
3037
  if (typeof document > "u") return;
3032
- const r = Ie(t), n = new Blob([r], { type: "text/calendar;charset=utf-8" }), a = URL.createObjectURL(n), o = document.createElement("a");
3038
+ const r = je(t), n = new Blob([r], { type: "text/calendar;charset=utf-8" }), a = URL.createObjectURL(n), o = document.createElement("a");
3033
3039
  o.href = a, o.download = e, document.body.appendChild(o), o.click(), o.remove(), URL.revokeObjectURL(a);
3034
3040
  }
3035
3041
  export {
3036
- un as Calendar,
3042
+ vn as Calendar,
3037
3043
  De as DayGridView,
3038
- en as ListView,
3039
- rn as MultiMonthView,
3040
- sn as ResourceDayGridView,
3044
+ rn as ListView,
3045
+ nn as MultiMonthView,
3046
+ ln as ResourceDayGridView,
3041
3047
  dn as ResourceTimeGridView,
3042
- on as ResourceTimelineView,
3043
- Qr as TimeGridView,
3044
- nn as TimelineView,
3048
+ sn as ResourceTimelineView,
3049
+ tn as TimeGridView,
3050
+ an as TimelineView,
3045
3051
  Ve as Toolbar,
3046
- W as callDidMount,
3047
- N as cx,
3048
- st as dateFormatter,
3049
- Sn as dayGridPlugin,
3050
- On as definePlugin,
3051
- Tn as defineTheme,
3052
- bn as downloadICS,
3053
- En as eventsToICS,
3052
+ U as callDidMount,
3053
+ K as cx,
3054
+ dt as dateFormatter,
3055
+ On as dayGridPlugin,
3056
+ Tn as definePlugin,
3057
+ En as defineTheme,
3058
+ wn as downloadICS,
3059
+ Mn as eventsToICS,
3054
3060
  re as handleEventKeydown,
3055
- pn as hostSlot,
3056
- je as isHostSlot,
3057
- Mn as listPlugin,
3058
- Ye as minutesToLabel,
3059
- We as minutesToTimeString,
3060
- hn as mount,
3061
+ hn as hostSlot,
3062
+ He as isHostSlot,
3063
+ Cn as listPlugin,
3064
+ We as minutesToLabel,
3065
+ Ge as minutesToTimeString,
3066
+ bn as mount,
3061
3067
  kn as multiMonthPlugin,
3062
- Cn as parseICS,
3063
- L as renderSlot,
3064
- xn as resourcePlugin,
3068
+ xn as parseICS,
3069
+ B as renderSlot,
3070
+ Pn as resourcePlugin,
3065
3071
  te as startEventDrag,
3066
- Pn as themeToStyle,
3072
+ An as themeToStyle,
3067
3073
  ct as timeFormatter,
3068
- An as timeGridPlugin,
3069
- In as timelinePlugin
3074
+ In as timeGridPlugin,
3075
+ $n as timelinePlugin
3070
3076
  };
3071
3077
  //# sourceMappingURL=index.js.map