@cocoar/vue-calendar 1.17.0 → 2.0.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.
Files changed (62) hide show
  1. package/dist/builders/calendar-builder.d.ts +179 -2
  2. package/dist/builders/calendar-builder.d.ts.map +1 -1
  3. package/dist/builders/types.d.ts +41 -0
  4. package/dist/builders/types.d.ts.map +1 -1
  5. package/dist/components/CoarAgendaView.vue.d.ts.map +1 -1
  6. package/dist/components/CoarCalendar.vue.d.ts.map +1 -1
  7. package/dist/components/CoarMonthView.vue.d.ts.map +1 -1
  8. package/dist/components/CoarTimeGrid.vue.d.ts.map +1 -1
  9. package/dist/components/CoarTimelineView.vue.d.ts +68 -0
  10. package/dist/components/CoarTimelineView.vue.d.ts.map +1 -0
  11. package/dist/components/CoarWorkWeekView.vue.d.ts +53 -0
  12. package/dist/components/CoarWorkWeekView.vue.d.ts.map +1 -0
  13. package/dist/components/internal/CoarEventDecorations.vue.d.ts +1 -1
  14. package/dist/components/internal/CoarEventDecorations.vue.d.ts.map +1 -1
  15. package/dist/composables/useViewWindow.d.ts.map +1 -1
  16. package/dist/core/dnd/move-math.d.ts +23 -0
  17. package/dist/core/dnd/move-math.d.ts.map +1 -1
  18. package/dist/core/index.d.ts +8 -15
  19. package/dist/core/index.d.ts.map +1 -1
  20. package/dist/core/temporal.d.ts +13 -0
  21. package/dist/core/temporal.d.ts.map +1 -1
  22. package/dist/core/timelineLayout.d.ts +77 -0
  23. package/dist/core/timelineLayout.d.ts.map +1 -0
  24. package/dist/core/types.d.ts +1 -1
  25. package/dist/core/types.d.ts.map +1 -1
  26. package/dist/core/viewWindow.d.ts +8 -1
  27. package/dist/core/viewWindow.d.ts.map +1 -1
  28. package/dist/{core-DK63eHat.js → core-D-gBBiQ5.js} +276 -400
  29. package/dist/core.js +3 -2
  30. package/dist/index.d.ts +5 -1
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +1739 -1232
  33. package/dist/move-math-vYSpEW-r.js +215 -0
  34. package/dist/recurrence/index.d.ts +70 -0
  35. package/dist/recurrence/index.d.ts.map +1 -0
  36. package/dist/recurrence/internal/default-engine.d.ts +20 -0
  37. package/dist/recurrence/internal/default-engine.d.ts.map +1 -0
  38. package/dist/recurrence/internal/dst-resolve.d.ts +12 -0
  39. package/dist/recurrence/internal/dst-resolve.d.ts.map +1 -0
  40. package/dist/recurrence/internal/engine-to-events.d.ts +38 -0
  41. package/dist/recurrence/internal/engine-to-events.d.ts.map +1 -0
  42. package/dist/recurrence/internal/series-to-engine.d.ts +4 -0
  43. package/dist/recurrence/internal/series-to-engine.d.ts.map +1 -0
  44. package/dist/recurrence/types.d.ts +252 -0
  45. package/dist/recurrence/types.d.ts.map +1 -0
  46. package/dist/recurrence-rrule-temporal/index.d.ts +12 -0
  47. package/dist/recurrence-rrule-temporal/index.d.ts.map +1 -0
  48. package/dist/recurrence-rrule-temporal.js +158 -0
  49. package/dist/recurrence.js +225 -0
  50. package/dist/types-fzCER_SC.js +4 -0
  51. package/dist/useTimelineView.d.ts +6 -0
  52. package/dist/useTimelineView.d.ts.map +1 -0
  53. package/dist/useWorkWeekView.d.ts +6 -0
  54. package/dist/useWorkWeekView.d.ts.map +1 -0
  55. package/dist/vue-calendar.css +1 -1
  56. package/package.json +12 -7
  57. package/dist/core/recurrence-public.d.ts +0 -59
  58. package/dist/core/recurrence-public.d.ts.map +0 -1
  59. package/dist/core/recurrence.d.ts +0 -112
  60. package/dist/core/recurrence.d.ts.map +0 -1
  61. package/dist/core/recurrenceWorker.d.ts +0 -62
  62. package/dist/core/recurrenceWorker.d.ts.map +0 -1
@@ -1,100 +1,73 @@
1
- import { Temporal as e, Temporal as t } from "@js-temporal/polyfill";
2
- //#region src/core/types.ts
3
- function n(e) {
4
- return "timeZoneId" in e.start;
5
- }
6
- function r(e) {
7
- return !("timeZoneId" in e.start);
8
- }
9
- function i(t) {
10
- let { id: n, start: r, end: i } = t, o = r instanceof e.ZonedDateTime, s = r instanceof e.PlainDate;
11
- if (!o && !s) throw TypeError(`[CalendarEvent ${n}] start must be Temporal.ZonedDateTime or Temporal.PlainDate. Got ${r?.constructor?.name ?? typeof r}.`);
12
- if (o) try {
13
- r.toInstant();
14
- } catch (e) {
15
- let t = r.timeZoneId;
16
- throw TypeError(`[CalendarEvent ${n}] start.timeZoneId='${t}' is not a recognised IANA zone (Temporal threw '${e.message}'). Use a real IANA name like 'Europe/Vienna' / 'America/Los_Angeles'.`, { cause: e });
17
- }
18
- if (i !== void 0) {
19
- let t = i instanceof e.ZonedDateTime, a = i instanceof e.PlainDate;
20
- if (!t && !a) throw TypeError(`[CalendarEvent ${n}] end must be Temporal.ZonedDateTime or Temporal.PlainDate. Got ${i?.constructor?.name ?? typeof i}.`);
21
- if (o !== t) throw TypeError(`[CalendarEvent ${n}] start and end must be the same shape. Got start=${o ? "ZonedDateTime" : "PlainDate"}, end=${t ? "ZonedDateTime" : "PlainDate"}.`);
22
- if (o) {
23
- if (e.Instant.compare(r.toInstant(), i.toInstant()) >= 0) throw RangeError(`[CalendarEvent ${n}] end must be strictly after start.`);
24
- } else if (e.PlainDate.compare(r, i) >= 0) throw RangeError(`[CalendarEvent ${n}] end must be strictly after start.`);
25
- }
26
- let c = t.meta;
27
- if ((c?.rrule !== void 0 || c?.rdate !== void 0 || c?.exdate !== void 0 || c?.recurrenceId !== void 0) && !a.has(n)) {
28
- a.add(n);
29
- let e = `[@cocoar/vue-calendar] [CalendarEvent ${n}] meta.rrule / .rdate / .exdate / .recurrenceId is set, but recurrence is not yet wired (Phase 4). The event will render only as a single occurrence at \`start\`. Construct a \`RecurringSeries\` and use \`expandSeries()\` (when available) instead of stuffing rrule into meta.`;
30
- typeof console < "u" && console.warn(e);
31
- }
32
- }
33
- var a = /* @__PURE__ */ new Set();
34
- //#endregion
1
+ import { o as e, s as t } from "./move-math-vYSpEW-r.js";
2
+ import { Temporal as n, Temporal as r } from "@js-temporal/polyfill";
35
3
  //#region src/core/temporal.ts
36
- function o(e) {
4
+ function i(e) {
37
5
  return e % 7;
38
6
  }
39
- var s = !1;
40
- function c(e) {
7
+ var a = !1;
8
+ function o(e) {
41
9
  try {
42
10
  let t = new Intl.Locale(e), n = t.getWeekInfo?.() ?? t.weekInfo;
43
- if (n && typeof n.firstDay == "number") return o(n.firstDay);
11
+ if (n && typeof n.firstDay == "number") return i(n.firstDay);
44
12
  } catch {}
45
- return !s && typeof console < "u" && (s = !0, console.warn(`[@cocoar/vue-calendar] Intl.Locale.weekInfo is not available on this runtime — falling back to Monday for locale '${e}'. Article 9: defaults are not decisions. Pass \`.firstDayOfWeek(0)\` (Sunday) / \`.firstDayOfWeek(6)\` (Saturday) etc. explicitly so the week-start is deterministic across browsers.`)), 1;
13
+ return !a && typeof console < "u" && (a = !0, console.warn(`[@cocoar/vue-calendar] Intl.Locale.weekInfo is not available on this runtime — falling back to Monday for locale '${e}'. Article 9: defaults are not decisions. Pass \`.firstDayOfWeek(0)\` (Sunday) / \`.firstDayOfWeek(6)\` (Saturday) etc. explicitly so the week-start is deterministic across browsers.`)), 1;
46
14
  }
47
- function l(e) {
15
+ function s(e) {
48
16
  try {
49
17
  return new Intl.DateTimeFormat(e, { hour: "numeric" }).resolvedOptions().hour12 ?? !1;
50
18
  } catch {
51
19
  return !1;
52
20
  }
53
21
  }
54
- var u = !1;
55
- function d() {
22
+ var c = !1;
23
+ function l() {
56
24
  try {
57
25
  let e = Intl.DateTimeFormat().resolvedOptions().timeZone;
58
26
  if (e) return e;
59
27
  } catch {}
60
- return !u && typeof console < "u" && (u = !0, console.warn("[@cocoar/vue-calendar] detectBrowserTimezone() couldn't read Intl.DateTimeFormat — falling back to 'UTC'. This is the Article-4 anti-pattern: human-meaningful times will render at the wrong wall-clock for users not in UTC. Pass an explicit IANA zone to `builder.timezone(...)` (e.g. 'Europe/Vienna'). If your app really does run in UTC, pass 'UTC' explicitly to silence this warning.")), "UTC";
28
+ return !c && typeof console < "u" && (c = !0, console.warn("[@cocoar/vue-calendar] detectBrowserTimezone() couldn't read Intl.DateTimeFormat — falling back to 'UTC'. This is the Article-4 anti-pattern: human-meaningful times will render at the wrong wall-clock for users not in UTC. Pass an explicit IANA zone to `builder.timezone(...)` (e.g. 'Europe/Vienna'). If your app really does run in UTC, pass 'UTC' explicitly to silence this warning.")), "UTC";
61
29
  }
62
- function f(e, t) {
30
+ function u(e, t) {
63
31
  if (!t) return e;
64
32
  let n = { ...e };
65
33
  return t.hour12 !== void 0 && (n.hour12 = t.hour12), (t.dateStyle !== void 0 || t.timeStyle !== void 0) && (delete n.weekday, delete n.era, delete n.year, delete n.month, delete n.day, delete n.dayPeriod, delete n.hour, delete n.minute, delete n.second, delete n.fractionalSecondDigits, delete n.timeZoneName), t.dateStyle !== void 0 && (n.dateStyle = t.dateStyle), t.timeStyle !== void 0 && (n.timeStyle = t.timeStyle), n;
66
34
  }
67
- function p(e, t) {
68
- let n = (o(e.dayOfWeek) - t + 7) % 7;
35
+ function d(e, t) {
36
+ let n = (i(e.dayOfWeek) - t + 7) % 7;
69
37
  return n === 0 ? e : e.subtract({ days: n });
70
38
  }
71
- function m(e, t) {
72
- return p(e, t).add({ days: 6 });
39
+ function f(e, t) {
40
+ return d(e, t).add({ days: 6 });
73
41
  }
74
- function h(e) {
42
+ function p(e) {
75
43
  return e.with({ day: 1 });
76
44
  }
77
- function g(e) {
45
+ function m(e) {
78
46
  return e.with({ day: e.daysInMonth });
79
47
  }
80
- function _(e) {
48
+ function h(e) {
81
49
  let t = e.dayOfWeek, n = e.add({ days: 4 - t }), r = n.with({
82
50
  month: 1,
83
51
  day: 1
84
52
  }), i = (4 - r.dayOfWeek + 7) % 7, a = r.add({ days: i }), o = n.since(a, { largestUnit: "days" }).days;
85
53
  return Math.floor(o / 7) + 1;
86
54
  }
87
- function v(e, t) {
88
- let n = p(e, t), r = Array(7);
55
+ function g(e, t) {
56
+ let n = d(e, t), r = Array(7);
89
57
  for (let e = 0; e < 7; e++) r[e] = n.add({ days: e });
90
58
  return r;
91
59
  }
92
- function y(e, t) {
93
- let n = p(e.toPlainDate({ day: 1 }), t), r = Array(42);
60
+ function _(e, t, n) {
61
+ if (n.length === 0) return [];
62
+ let r = new Set(n);
63
+ return g(e, t).filter((e) => r.has(i(e.dayOfWeek)));
64
+ }
65
+ function v(e, t) {
66
+ let n = d(e.toPlainDate({ day: 1 }), t), r = Array(42);
94
67
  for (let e = 0; e < 42; e++) r[e] = n.add({ days: e });
95
68
  return r;
96
69
  }
97
- function b(e, t, n = "short") {
70
+ function y(e, t, n = "short") {
98
71
  let r = new Intl.DateTimeFormat(e, { weekday: n }), i = new Date(Date.UTC(2024, 0, 7)), a = Array(7);
99
72
  for (let e = 0; e < 7; e++) {
100
73
  let n = (t + e) % 7, o = new Date(i.getTime());
@@ -102,126 +75,144 @@ function b(e, t, n = "short") {
102
75
  }
103
76
  return a;
104
77
  }
105
- function x(e) {
78
+ function b(e) {
106
79
  return e.toString();
107
80
  }
108
- function S(e, n) {
109
- return e instanceof t.PlainDate ? e : e.withTimeZone(n).toPlainDate();
81
+ function x(e, t) {
82
+ return e instanceof r.PlainDate ? e : e.withTimeZone(t).toPlainDate();
83
+ }
84
+ function S(e) {
85
+ return r.Now.plainDateISO(e);
110
86
  }
111
87
  function C(e) {
112
- return t.Now.plainDateISO(e);
88
+ return r.Now.zonedDateTimeISO(e);
113
89
  }
114
90
  function w(e) {
115
- return t.Now.zonedDateTimeISO(e);
116
- }
117
- function ee(e) {
118
- let { local: n, timeZoneId: r, dstPolicy: i = "compatible" } = e, a;
91
+ let { local: t, timeZoneId: n, dstPolicy: i = "compatible" } = e, a;
119
92
  try {
120
- a = t.PlainDateTime.from(n);
93
+ a = r.PlainDateTime.from(t);
121
94
  } catch (e) {
122
- throw RangeError(`[parseScheduledTime] local='${n}' is not a parseable ISO-8601 datetime (${e.message}). Expected format: 'YYYY-MM-DDTHH:MM[:SS]'.`, { cause: e });
95
+ throw RangeError(`[parseScheduledTime] local='${t}' is not a parseable ISO-8601 datetime (${e.message}). Expected format: 'YYYY-MM-DDTHH:MM[:SS]'.`, { cause: e });
123
96
  }
124
97
  let o;
125
98
  try {
126
- o = a.toZonedDateTime(r, { disambiguation: i });
99
+ o = a.toZonedDateTime(n, { disambiguation: i });
127
100
  } catch (e) {
128
- let t = e.message;
129
- throw TypeError(i === "reject" ? `[parseScheduledTime] local='${n}' in '${r}' could not be resolved (${t}). Likely cause: dstPolicy='reject' on a DST gap (e.g. 02:30 on the spring-forward day). Use 'earlier' / 'later' / 'compatible' if you want the engine to resolve, or pick a different time.` : `[parseScheduledTime] timeZoneId='${r}' is not a recognised IANA zone (${t}). Use a real name like 'Europe/Vienna' / 'America/Los_Angeles' — abbreviations like 'CET' / 'EST' are ambiguous and intentionally rejected.`, { cause: e });
101
+ let r = e.message;
102
+ throw TypeError(i === "reject" ? `[parseScheduledTime] local='${t}' in '${n}' could not be resolved (${r}). Likely cause: dstPolicy='reject' on a DST gap (e.g. 02:30 on the spring-forward day). Use 'earlier' / 'later' / 'compatible' if you want the engine to resolve, or pick a different time.` : `[parseScheduledTime] timeZoneId='${n}' is not a recognised IANA zone (${r}). Use a real name like 'Europe/Vienna' / 'America/Los_Angeles' — abbreviations like 'CET' / 'EST' are ambiguous and intentionally rejected.`, { cause: e });
130
103
  }
131
104
  return o;
132
105
  }
133
- function te(e) {
106
+ function T(e) {
134
107
  try {
135
- return t.PlainDate.from(e);
108
+ return r.PlainDate.from(e);
136
109
  } catch (t) {
137
110
  throw RangeError(`[parsePlainDate] iso='${e}' is not a parseable ISO-8601 date (${t.message}). Expected format: 'YYYY-MM-DD'.`, { cause: t });
138
111
  }
139
112
  }
140
- function T(e) {
113
+ function E(e) {
141
114
  return {
142
115
  local: e.toPlainDateTime().toString(),
143
116
  timeZoneId: e.timeZoneId
144
117
  };
145
118
  }
146
119
  //#endregion
147
- //#region src/core/recurrence-public.ts
148
- var E = "[@cocoar/vue-calendar] expandSeries() is not implemented yet — the recurrence engine integration is Phase 4. The TYPE contract for RecurringSeries is enforced from Session 2 so your data layer can build against it now; expansion will become available without API changes.";
149
- function D(e, t, n) {
150
- throw TypeError(E);
151
- }
152
- var ne = E;
153
- //#endregion
154
120
  //#region src/core/viewWindow.ts
155
- function O(t) {
156
- let { view: n, cursor: r, firstDayOfWeek: i, timezone: a } = t;
157
- switch (n) {
121
+ var D = [
122
+ 1,
123
+ 2,
124
+ 3,
125
+ 4,
126
+ 5
127
+ ];
128
+ function O(e) {
129
+ let { view: t, cursor: r, firstDayOfWeek: i, timezone: a } = e;
130
+ switch (t) {
158
131
  case "day": return {
159
- view: n,
132
+ view: t,
160
133
  start: r.toString(),
161
134
  end: r.add({ days: 1 }).toString(),
162
135
  timezone: a
163
136
  };
164
137
  case "week": {
165
- let e = p(r, i);
138
+ let e = d(r, i);
139
+ return {
140
+ view: t,
141
+ start: e.toString(),
142
+ end: e.add({ days: 7 }).toString(),
143
+ timezone: a
144
+ };
145
+ }
146
+ case "workWeek": {
147
+ let e = d(r, i);
166
148
  return {
167
- view: n,
149
+ view: t,
168
150
  start: e.toString(),
169
151
  end: e.add({ days: 7 }).toString(),
170
152
  timezone: a
171
153
  };
172
154
  }
173
155
  case "month": {
174
- let t = y(e.PlainYearMonth.from({
156
+ let e = v(n.PlainYearMonth.from({
175
157
  year: r.year,
176
158
  month: r.month
177
159
  }), i);
178
160
  return {
179
- view: n,
180
- start: t[0].toString(),
181
- end: t[41].add({ days: 1 }).toString(),
161
+ view: t,
162
+ start: e[0].toString(),
163
+ end: e[41].add({ days: 1 }).toString(),
182
164
  timezone: a
183
165
  };
184
166
  }
185
167
  case "agenda": {
186
- let e = t.agendaLengthDays ?? 30;
168
+ let n = e.agendaLengthDays ?? 30;
187
169
  return {
188
- view: n,
170
+ view: t,
189
171
  start: r.toString(),
190
- end: r.add({ days: e }).toString(),
172
+ end: r.add({ days: n }).toString(),
173
+ timezone: a
174
+ };
175
+ }
176
+ case "timeline": {
177
+ let n = e.timelineRangeDays ?? 60;
178
+ return {
179
+ view: t,
180
+ start: r.toString(),
181
+ end: r.add({ days: n }).toString(),
191
182
  timezone: a
192
183
  };
193
184
  }
194
- case "timeline":
195
185
  case "year": return {
196
- view: n,
186
+ view: t,
197
187
  start: r.toString(),
198
188
  end: r.add({ days: 1 }).toString(),
199
189
  timezone: a
200
190
  };
201
- default: throw Error(`Unsupported view: ${String(n)}`);
191
+ default: throw Error(`Unsupported view: ${String(t)}`);
202
192
  }
203
193
  }
204
- function* k(t) {
205
- let n = e.PlainDate.from(t.start), r = e.PlainDate.from(t.end);
206
- for (; e.PlainDate.compare(n, r) < 0;) yield n, n = n.add({ days: 1 });
194
+ function* k(e) {
195
+ let t = n.PlainDate.from(e.start), r = n.PlainDate.from(e.end);
196
+ for (; n.PlainDate.compare(t, r) < 0;) yield t, t = t.add({ days: 1 });
207
197
  }
208
- function A(t) {
209
- let n = e.PlainDate.from(t.start);
210
- return e.PlainDate.from(t.end).since(n, { largestUnit: "days" }).days;
198
+ function A(e) {
199
+ let t = n.PlainDate.from(e.start);
200
+ return n.PlainDate.from(e.end).since(t, { largestUnit: "days" }).days;
211
201
  }
212
- function j(t, n) {
213
- let r = e.PlainDate.from(t.start), i = e.PlainDate.from(t.end);
214
- return e.PlainDate.compare(n, r) >= 0 && e.PlainDate.compare(n, i) < 0;
202
+ function j(e, t) {
203
+ let r = n.PlainDate.from(e.start), i = n.PlainDate.from(e.end);
204
+ return n.PlainDate.compare(t, r) >= 0 && n.PlainDate.compare(t, i) < 0;
215
205
  }
216
- function M(e, t, n, r = 30) {
217
- let i = n === "next" ? 1 : -1;
206
+ function M(e, t, n, r = 30, i = 60) {
207
+ let a = n === "next" ? 1 : -1;
218
208
  switch (e) {
219
- case "day": return t.add({ days: 1 * i });
220
- case "week": return t.add({ days: 7 * i });
221
- case "month": return t.add({ months: 1 * i });
222
- case "agenda": return t.add({ days: r * i });
223
- case "timeline":
224
- case "year": return e === "year" ? t.add({ months: 1 * i }) : t.add({ days: 1 * i });
209
+ case "day": return t.add({ days: 1 * a });
210
+ case "week":
211
+ case "workWeek": return t.add({ days: 7 * a });
212
+ case "month": return t.add({ months: 1 * a });
213
+ case "agenda": return t.add({ days: r * a });
214
+ case "timeline": return t.add({ days: i * a });
215
+ case "year": return t.add({ months: 1 * a });
225
216
  default: throw Error(`Unsupported view: ${String(e)}`);
226
217
  }
227
218
  }
@@ -312,15 +303,15 @@ function R(e) {
312
303
  }
313
304
  //#endregion
314
305
  //#region src/core/timeGridLayout.ts
315
- function z(e, t) {
316
- let { day: r, timeRange: i, timezone: a } = t, [o, s] = i, c = o * 60, l = s * 60;
306
+ function z(e, n) {
307
+ let { day: r, timeRange: i, timezone: a } = n, [o, s] = i, c = o * 60, l = s * 60;
317
308
  if (l - c <= 0) return [];
318
309
  let u = [], d = /* @__PURE__ */ new Set();
319
- for (let t of e) {
320
- if (d.has(t.id) || (d.add(t.id), !n(t))) continue;
321
- let e = V(t.start, r, a), i = t.end ? V(t.end, r, a) : e + 30, o = e, s = i, f = Math.max(o, c), p = Math.min(s, l);
310
+ for (let n of e) {
311
+ if (d.has(n.id) || (d.add(n.id), !t(n))) continue;
312
+ let e = V(n.start, r, a), i = n.end ? V(n.end, r, a) : e + 30, o = e, s = i, f = Math.max(o, c), p = Math.min(s, l);
322
313
  p > 1440 && (p = Math.min(p, 1440)), f < 0 && (f = 0), !(p <= f) && (p <= c || f >= l || u.push({
323
- event: t,
314
+ event: n,
324
315
  startMinutes: f - c,
325
316
  endMinutes: p - c,
326
317
  clippedTop: o < c,
@@ -336,23 +327,23 @@ function z(e, t) {
336
327
  m.length > 0 && p.push(m);
337
328
  let g = /* @__PURE__ */ new Map();
338
329
  for (let e of p) {
339
- let n = R(e.map((e) => ({
330
+ let t = R(e.map((e) => ({
340
331
  id: e.event.id,
341
332
  start: e.startMinutes,
342
333
  end: Math.max(e.startMinutes, e.endMinutes - 1)
343
334
  }))), r = -1;
344
- if (t.priorityId !== void 0) {
345
- for (let e of n.bars) if (e.id === t.priorityId) {
335
+ if (n.priorityId !== void 0) {
336
+ for (let e of t.bars) if (e.id === n.priorityId) {
346
337
  r = e.lane;
347
338
  break;
348
339
  }
349
340
  }
350
- let i = n.laneCount - 1;
351
- for (let e of n.bars) {
352
- let t = e.lane;
353
- r >= 0 && r < i && (t === r ? t = i : t > r && --t), g.set(e.id, {
354
- lane: t,
355
- laneCount: n.laneCount
341
+ let i = t.laneCount - 1;
342
+ for (let e of t.bars) {
343
+ let n = e.lane;
344
+ r >= 0 && r < i && (n === r ? n = i : n > r && --n), g.set(e.id, {
345
+ lane: n,
346
+ laneCount: t.laneCount
356
347
  });
357
348
  }
358
349
  }
@@ -372,26 +363,26 @@ function z(e, t) {
372
363
  };
373
364
  });
374
365
  }
375
- function B(e, n) {
366
+ function B(t, n) {
376
367
  let { days: i } = n;
377
368
  if (n.timezone, i.length === 0) return [];
378
369
  let a = /* @__PURE__ */ new Map();
379
- for (let e = 0; e < i.length; e++) a.set(x(i[e]), e);
380
- x(i[i.length - 1]);
370
+ for (let e = 0; e < i.length; e++) a.set(b(i[e]), e);
371
+ b(i[i.length - 1]);
381
372
  let o = [], s = /* @__PURE__ */ new Set();
382
- for (let n of e) {
383
- if (s.has(n.id) || (s.add(n.id), !r(n))) continue;
384
- let e = n.start, c;
385
- n.end ? (c = n.end.subtract({ days: 1 }), t.PlainDate.compare(c, e) < 0 && (c = e)) : c = e;
373
+ for (let n of t) {
374
+ if (s.has(n.id) || (s.add(n.id), !e(n))) continue;
375
+ let t = n.start, c;
376
+ n.end ? (c = n.end.subtract({ days: 1 }), r.PlainDate.compare(c, t) < 0 && (c = t)) : c = t;
386
377
  let l = i[0], u = i[i.length - 1];
387
- if (t.PlainDate.compare(c, l) < 0 || t.PlainDate.compare(e, u) > 0) continue;
388
- let d = t.PlainDate.compare(e, l) < 0 ? l : e, f = t.PlainDate.compare(c, u) > 0 ? u : c, p = a.get(x(d)), m = a.get(x(f));
378
+ if (r.PlainDate.compare(c, l) < 0 || r.PlainDate.compare(t, u) > 0) continue;
379
+ let d = r.PlainDate.compare(t, l) < 0 ? l : t, f = r.PlainDate.compare(c, u) > 0 ? u : c, p = a.get(b(d)), m = a.get(b(f));
389
380
  p === void 0 || m === void 0 || o.push({
390
381
  event: n,
391
382
  startCol: p,
392
383
  endCol: m,
393
- clippedStart: t.PlainDate.compare(e, l) < 0,
394
- clippedEnd: t.PlainDate.compare(c, u) > 0
384
+ clippedStart: r.PlainDate.compare(t, l) < 0,
385
+ clippedEnd: r.PlainDate.compare(c, u) > 0
395
386
  });
396
387
  }
397
388
  if (o.length === 0) return [];
@@ -411,29 +402,29 @@ function B(e, n) {
411
402
  clippedEnd: e.clippedEnd
412
403
  }));
413
404
  }
414
- function V(e, n, r) {
415
- let i = e.withTimeZone(r), a = t.PlainDateTime.from({
416
- year: n.year,
417
- month: n.month,
418
- day: n.day,
405
+ function V(e, t, n) {
406
+ let i = e.withTimeZone(n), a = r.PlainDateTime.from({
407
+ year: t.year,
408
+ month: t.month,
409
+ day: t.day,
419
410
  hour: 0,
420
411
  minute: 0
421
- }).toZonedDateTime(r, { disambiguation: "compatible" }), o = a.add({ days: 1 });
422
- return t.ZonedDateTime.compare(i, a) < 0 ? -1 : t.ZonedDateTime.compare(i, o) >= 0 ? 1441 : i.hour * 60 + i.minute + i.second / 60;
412
+ }).toZonedDateTime(n, { disambiguation: "compatible" }), o = a.add({ days: 1 });
413
+ return r.ZonedDateTime.compare(i, a) < 0 ? -1 : r.ZonedDateTime.compare(i, o) >= 0 ? 1441 : i.hour * 60 + i.minute + i.second / 60;
423
414
  }
424
415
  //#endregion
425
416
  //#region src/core/monthGridLayout.ts
426
- function H(e, n) {
427
- let { gridDates: r, timezone: i } = n;
428
- if (r.length !== 42) throw RangeError(`gridDates must have exactly 42 entries (got ${r.length})`);
417
+ function H(e, t) {
418
+ let { gridDates: n, timezone: i } = t;
419
+ if (n.length !== 42) throw RangeError(`gridDates must have exactly 42 entries (got ${n.length})`);
429
420
  let a = [];
430
421
  for (let e = 0; e < 6; e++) {
431
- let t = r.slice(e * 7, e * 7 + 7), n = /* @__PURE__ */ new Map();
432
- for (let e = 0; e < 7; e++) n.set(x(t[e]), e);
422
+ let t = n.slice(e * 7, e * 7 + 7), r = /* @__PURE__ */ new Map();
423
+ for (let e = 0; e < 7; e++) r.set(b(t[e]), e);
433
424
  a.push({
434
425
  rowIndex: e,
435
426
  days: t,
436
- dayKeyToCol: n,
427
+ dayKeyToCol: r,
437
428
  weekStart: t[0],
438
429
  weekEnd: t[6]
439
430
  });
@@ -449,7 +440,7 @@ function H(e, n) {
449
440
  lastDayInclusive: n
450
441
  });
451
442
  else {
452
- let n = x(e), r = c.get(n), i = {
443
+ let n = b(e), r = c.get(n), i = {
453
444
  event: t,
454
445
  order: r ? r.length : 0
455
446
  };
@@ -457,60 +448,60 @@ function H(e, n) {
457
448
  }
458
449
  }
459
450
  return { weekRows: a.map((e) => {
460
- let n = [];
461
- for (let r of s) {
462
- if (t.PlainDate.compare(r.lastDayInclusive, e.weekStart) < 0 || t.PlainDate.compare(r.firstDay, e.weekEnd) > 0) continue;
463
- let i = t.PlainDate.compare(r.firstDay, e.weekStart) < 0 ? e.weekStart : r.firstDay, a = t.PlainDate.compare(r.lastDayInclusive, e.weekEnd) > 0 ? e.weekEnd : r.lastDayInclusive, o = e.dayKeyToCol.get(x(i)), s = e.dayKeyToCol.get(x(a));
464
- o === void 0 || s === void 0 || n.push({
465
- ...r,
451
+ let t = [];
452
+ for (let n of s) {
453
+ if (r.PlainDate.compare(n.lastDayInclusive, e.weekStart) < 0 || r.PlainDate.compare(n.firstDay, e.weekEnd) > 0) continue;
454
+ let i = r.PlainDate.compare(n.firstDay, e.weekStart) < 0 ? e.weekStart : n.firstDay, a = r.PlainDate.compare(n.lastDayInclusive, e.weekEnd) > 0 ? e.weekEnd : n.lastDayInclusive, o = e.dayKeyToCol.get(b(i)), s = e.dayKeyToCol.get(b(a));
455
+ o === void 0 || s === void 0 || t.push({
456
+ ...n,
466
457
  startCol: o,
467
458
  endCol: s,
468
- clippedStart: t.PlainDate.compare(r.firstDay, e.weekStart) < 0,
469
- clippedEnd: t.PlainDate.compare(r.lastDayInclusive, e.weekEnd) > 0
459
+ clippedStart: r.PlainDate.compare(n.firstDay, e.weekStart) < 0,
460
+ clippedEnd: r.PlainDate.compare(n.lastDayInclusive, e.weekEnd) > 0
470
461
  });
471
462
  }
472
- let r = [];
473
- if (n.length > 0) {
474
- let e = R(n.map((e) => ({
463
+ let n = [];
464
+ if (t.length > 0) {
465
+ let e = R(t.map((e) => ({
475
466
  id: e.event.id,
476
467
  start: e.startCol,
477
468
  end: e.endCol
478
- }))), t = /* @__PURE__ */ new Map();
479
- for (let n of e.bars) t.set(n.id, n.lane);
480
- r = n.map((n) => ({
481
- event: n.event,
482
- lane: t.get(n.event.id) ?? 0,
469
+ }))), r = /* @__PURE__ */ new Map();
470
+ for (let t of e.bars) r.set(t.id, t.lane);
471
+ n = t.map((t) => ({
472
+ event: t.event,
473
+ lane: r.get(t.event.id) ?? 0,
483
474
  laneCount: e.laneCount,
484
- startCol: n.startCol,
485
- endCol: n.endCol,
486
- clippedStart: n.clippedStart,
487
- clippedEnd: n.clippedEnd
475
+ startCol: t.startCol,
476
+ endCol: t.endCol,
477
+ clippedStart: t.clippedStart,
478
+ clippedEnd: t.clippedEnd
488
479
  }));
489
480
  }
490
481
  let i = /* @__PURE__ */ new Map();
491
482
  for (let t of e.days) {
492
- let e = x(t), n = c.get(e);
483
+ let e = b(t), n = c.get(e);
493
484
  n && i.set(e, n);
494
485
  }
495
486
  return {
496
487
  rowIndex: e.rowIndex,
497
488
  weekStart: e.weekStart,
498
489
  days: e.days,
499
- multiDayBars: r,
490
+ multiDayBars: n,
500
491
  cellPills: i
501
492
  };
502
493
  }) };
503
494
  }
504
- function U(e, n) {
505
- if (r(e)) {
506
- let n = e.start, r;
507
- return e.end ? (r = e.end.subtract({ days: 1 }), t.PlainDate.compare(r, n) < 0 && (r = n)) : r = n, {
508
- firstDay: n,
509
- lastDayInclusive: r,
510
- isMultiDay: t.PlainDate.compare(r, n) > 0
495
+ function U(t, n) {
496
+ if (e(t)) {
497
+ let e = t.start, n;
498
+ return t.end ? (n = t.end.subtract({ days: 1 }), r.PlainDate.compare(n, e) < 0 && (n = e)) : n = e, {
499
+ firstDay: e,
500
+ lastDayInclusive: n,
501
+ isMultiDay: r.PlainDate.compare(n, e) > 0
511
502
  };
512
503
  }
513
- let i = S(e.start, n);
504
+ let i = x(t.start, n);
514
505
  return {
515
506
  firstDay: i,
516
507
  lastDayInclusive: i,
@@ -519,9 +510,9 @@ function U(e, n) {
519
510
  }
520
511
  //#endregion
521
512
  //#region src/core/agendaLayout.ts
522
- function W(e, n) {
523
- let { rangeStart: i, rangeEnd: a, timezone: o, showEmptyDays: s = !1 } = n, c = t.PlainDate.from(i), l = t.PlainDate.from(a);
524
- if (t.PlainDate.compare(l, c) <= 0) return [];
513
+ function W(t, n) {
514
+ let { rangeStart: i, rangeEnd: a, timezone: o, showEmptyDays: s = !1 } = n, c = r.PlainDate.from(i), l = r.PlainDate.from(a);
515
+ if (r.PlainDate.compare(l, c) <= 0) return [];
525
516
  let u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Set();
526
517
  function f(e) {
527
518
  let t = u.get(e);
@@ -530,23 +521,23 @@ function W(e, n) {
530
521
  timed: []
531
522
  }, u.set(e, t)), t;
532
523
  }
533
- for (let n of e) {
524
+ for (let n of t) {
534
525
  if (d.has(n.id)) continue;
535
526
  d.add(n.id);
536
- let e = r(n), { firstDay: i, lastDayInclusive: a } = G(n, o), s = t.PlainDate.compare(i, c) < 0 ? c : i, u = l.subtract({ days: 1 }), p = t.PlainDate.compare(a, u) > 0 ? u : a;
537
- if (t.PlainDate.compare(p, s) < 0) continue;
527
+ let t = e(n), { firstDay: i, lastDayInclusive: a } = G(n, o), s = r.PlainDate.compare(i, c) < 0 ? c : i, u = l.subtract({ days: 1 }), p = r.PlainDate.compare(a, u) > 0 ? u : a;
528
+ if (r.PlainDate.compare(p, s) < 0) continue;
538
529
  let m = s, h = !0;
539
- for (; t.PlainDate.compare(m, p) <= 0;) {
540
- let r = f(x(m)), a = t.PlainDate.compare(m, i) > 0 || !h;
541
- if (e) r.allDay.push({
530
+ for (; r.PlainDate.compare(m, p) <= 0;) {
531
+ let e = f(b(m)), a = r.PlainDate.compare(m, i) > 0 || !h;
532
+ if (t) e.allDay.push({
542
533
  event: n,
543
534
  isContinuation: a
544
535
  });
545
536
  else {
546
- let e = a ? -Infinity : K(n, o);
547
- r.timed.push({
537
+ let t = a ? -Infinity : K(n, o);
538
+ e.timed.push({
548
539
  event: n,
549
- startMs: e,
540
+ startMs: t,
550
541
  isContinuation: a
551
542
  });
552
543
  }
@@ -554,8 +545,8 @@ function W(e, n) {
554
545
  }
555
546
  }
556
547
  let p = [], m = c;
557
- for (; t.PlainDate.compare(m, l) < 0;) {
558
- let e = x(m), t = u.get(e), n = !!t && (t.allDay.length > 0 || t.timed.length > 0);
548
+ for (; r.PlainDate.compare(m, l) < 0;) {
549
+ let e = b(m), t = u.get(e), n = !!t && (t.allDay.length > 0 || t.timed.length > 0);
559
550
  if ((n || s) && (p.push({
560
551
  kind: "header",
561
552
  date: e,
@@ -583,30 +574,98 @@ function W(e, n) {
583
574
  }
584
575
  return p;
585
576
  }
586
- function G(e, n) {
587
- if (r(e)) {
588
- let n = e.start, r;
589
- return e.end ? (r = e.end.subtract({ days: 1 }), t.PlainDate.compare(r, n) < 0 && (r = n)) : r = n, {
590
- firstDay: n,
591
- lastDayInclusive: r
577
+ function G(t, n) {
578
+ if (e(t)) {
579
+ let e = t.start, n;
580
+ return t.end ? (n = t.end.subtract({ days: 1 }), r.PlainDate.compare(n, e) < 0 && (n = e)) : n = e, {
581
+ firstDay: e,
582
+ lastDayInclusive: n
592
583
  };
593
584
  }
594
- let i = S(e.start, n), a = i;
595
- if (e.end) {
596
- let r = e.end.withTimeZone(n), o = r.toPlainDate();
597
- r.hour === 0 && r.minute === 0 && r.second === 0 && r.millisecond === 0 && r.microsecond === 0 && r.nanosecond === 0 ? (a = o.subtract({ days: 1 }), t.PlainDate.compare(a, i) < 0 && (a = i)) : a = o;
585
+ let i = x(t.start, n), a = i;
586
+ if (t.end) {
587
+ let e = t.end.withTimeZone(n), o = e.toPlainDate();
588
+ e.hour === 0 && e.minute === 0 && e.second === 0 && e.millisecond === 0 && e.microsecond === 0 && e.nanosecond === 0 ? (a = o.subtract({ days: 1 }), r.PlainDate.compare(a, i) < 0 && (a = i)) : a = o;
598
589
  }
599
590
  return {
600
591
  firstDay: i,
601
592
  lastDayInclusive: a
602
593
  };
603
594
  }
604
- function K(e, t) {
605
- return r(e) ? e.start.toZonedDateTime({ timeZone: t }).epochMilliseconds : e.start.epochMilliseconds;
595
+ function K(t, n) {
596
+ return e(t) ? t.start.toZonedDateTime({ timeZone: n }).epochMilliseconds : t.start.epochMilliseconds;
597
+ }
598
+ //#endregion
599
+ //#region src/core/timelineLayout.ts
600
+ function q(e, t) {
601
+ let { windowStart: r, windowEnd: i, pixelsPerDay: a, rowHeight: o, displayZone: s } = t, c = r.until(i, { largestUnit: "days" }).days * a, l = /* @__PURE__ */ new Map();
602
+ for (let t of e) {
603
+ let e = Y(t), n = J(t) !== null, r = l.get(e);
604
+ r || (r = {
605
+ events: [],
606
+ isRecurring: n
607
+ }, l.set(e, r)), r.events.push(t);
608
+ }
609
+ let u = [];
610
+ for (let [e, t] of l) {
611
+ let o = [];
612
+ for (let e of t.events) {
613
+ let { startDate: t, endDate: c } = X(e, s);
614
+ if (n.PlainDate.compare(c, r) <= 0 || n.PlainDate.compare(t, i) >= 0) continue;
615
+ let l = n.PlainDate.compare(t, r) < 0, u = n.PlainDate.compare(c, i) > 0, d = l ? r : t, f = u ? i : c, p = r.until(d, { largestUnit: "days" }).days, m = d.until(f, { largestUnit: "days" }).days;
616
+ o.push({
617
+ event: e,
618
+ left: p * a,
619
+ width: Math.max(1, m) * a,
620
+ clippedStart: l,
621
+ clippedEnd: u
622
+ });
623
+ }
624
+ o.length !== 0 && (o.sort((e, t) => e.left - t.left), u.push({
625
+ id: e,
626
+ isRecurring: t.isRecurring,
627
+ bars: o,
628
+ firstLeft: o[0].left
629
+ }));
630
+ }
631
+ u.sort((e, t) => e.firstLeft === t.firstLeft ? e.id < t.id ? -1 : +(e.id > t.id) : e.firstLeft - t.firstLeft);
632
+ let d = u.map((e, t) => ({
633
+ id: e.id,
634
+ top: t * o,
635
+ height: o,
636
+ isRecurring: e.isRecurring,
637
+ bars: e.bars
638
+ }));
639
+ return {
640
+ rows: d,
641
+ totalWidth: c,
642
+ totalHeight: d.length * o
643
+ };
644
+ }
645
+ function J(e) {
646
+ let t = e.meta?.__recurrence?.seriesId;
647
+ return typeof t == "string" ? t : null;
648
+ }
649
+ function Y(e) {
650
+ return J(e) ?? e.id;
651
+ }
652
+ function X(e, t) {
653
+ if (e.start instanceof n.PlainDate) {
654
+ let t = e.start;
655
+ return {
656
+ startDate: t,
657
+ endDate: e.end instanceof n.PlainDate ? e.end : t.add({ days: 1 })
658
+ };
659
+ }
660
+ let r = e.start.withTimeZone(t), i = e.end instanceof n.ZonedDateTime ? e.end.withTimeZone(t) : r.add({ minutes: 30 });
661
+ return {
662
+ startDate: r.toPlainDate(),
663
+ endDate: i.toPlainDate().add({ days: 1 })
664
+ };
606
665
  }
607
666
  //#endregion
608
667
  //#region src/core/measurementCache.ts
609
- var q = class {
668
+ var Z = class {
610
669
  _itemCount;
611
670
  _estimatedSize;
612
671
  _measured;
@@ -688,7 +747,7 @@ var q = class {
688
747
  };
689
748
  //#endregion
690
749
  //#region src/core/virtualScroll.ts
691
- function J(e, t, n, r = 3) {
750
+ function Q(e, t, n, r = 3) {
692
751
  if (e.itemCount === 0) return {
693
752
  startIndex: 0,
694
753
  endIndex: 0,
@@ -705,20 +764,20 @@ function J(e, t, n, r = 3) {
705
764
  totalSize: i
706
765
  };
707
766
  }
708
- function Y(e, t, n, r, i, a, o = 3, s = 3) {
767
+ function $(e, t, n, r, i, a, o = 3, s = 3) {
709
768
  return {
710
- x: J(e, n, i, o),
711
- y: J(t, r, a, s)
769
+ x: Q(e, n, i, o),
770
+ y: Q(t, r, a, s)
712
771
  };
713
772
  }
714
- function X(e, t, n) {
773
+ function ee(e, t, n) {
715
774
  if (n < 0) throw RangeError(`anchorIndex must be non-negative, got ${n}`);
716
775
  let r = e.prefixSum(n);
717
776
  return t.prefixSum(n) - r;
718
777
  }
719
778
  //#endregion
720
779
  //#region src/core/dragHitTest.ts
721
- function re(e, t, n, r, i) {
780
+ function te(e, t, n, r, i) {
722
781
  if (r.itemCount === 0) return {
723
782
  itemIndex: -1,
724
783
  ratio: NaN,
@@ -749,7 +808,7 @@ function re(e, t, n, r, i) {
749
808
  pixelInItem: u
750
809
  };
751
810
  }
752
- function ie(e, t, n, r = {}) {
811
+ function ne(e, t, n, r = {}) {
753
812
  let i = r.hotZone ?? 30, a = r.maxVelocity ?? 24, o = r.curve ?? "linear";
754
813
  if (i <= 0 || a <= 0) return {
755
814
  velocityX: 0,
@@ -773,187 +832,4 @@ function ie(e, t, n, r = {}) {
773
832
  };
774
833
  }
775
834
  //#endregion
776
- //#region src/core/dnd/move-math.ts
777
- var ae = 15, Z = class extends Error {
778
- disambiguation;
779
- constructor(e, t) {
780
- super(t), this.name = "DstResolutionError", this.disambiguation = e;
781
- }
782
- };
783
- function Q(t, n) {
784
- let r;
785
- try {
786
- r = e.PlainDateTime.from({
787
- year: n.year,
788
- month: n.month,
789
- day: n.day,
790
- hour: n.hour,
791
- minute: n.minute,
792
- second: n.second ?? 0
793
- });
794
- } catch {
795
- return null;
796
- }
797
- try {
798
- return r.toZonedDateTime(t, { disambiguation: "reject" }), null;
799
- } catch {}
800
- let i;
801
- try {
802
- i = r.toZonedDateTime(t, { disambiguation: "earlier" });
803
- } catch {
804
- return null;
805
- }
806
- let a = i.toPlainDateTime();
807
- return e.PlainDateTime.compare(a, r) === 0 ? "overlap" : "gap";
808
- }
809
- function oe(e, t, n, r, i, a) {
810
- let o = $(t, r, i, e);
811
- return {
812
- event: t,
813
- original: {
814
- start: n.start,
815
- ...n.end === void 0 ? {} : { end: n.end },
816
- displayZone: n.displayZone
817
- },
818
- next: o,
819
- target: {
820
- ...r,
821
- date: r.date,
822
- minutes: r.minutes,
823
- displayZone: r.displayZone,
824
- disambiguation: o.disambiguation ?? null
825
- },
826
- native: a
827
- };
828
- }
829
- function $(t, i, a, o = "compatible") {
830
- if (r(t)) {
831
- let n = t.start, r = t.end ?? n.add({ days: 1 }), o = e.PlainDate.from(i.date);
832
- if (a === "allDay-resize-start" || a === "month-resize-start") {
833
- let t = r.subtract({ days: 1 });
834
- return {
835
- start: e.PlainDate.compare(o, t) > 0 ? t : o,
836
- end: r
837
- };
838
- }
839
- if (a === "allDay-resize-end" || a === "month-resize-end") {
840
- let t = n.add({ days: 1 }), r = o.add({ days: 1 });
841
- return {
842
- start: n,
843
- end: e.PlainDate.compare(r, t) < 0 ? t : r
844
- };
845
- }
846
- let s = n.until(r).total({ unit: "days" }), c = o, l = c.add({ days: s });
847
- return t.end ? {
848
- start: c,
849
- end: l
850
- } : { start: c };
851
- }
852
- if (!n(t)) throw TypeError(`[applyMoveToEvent] event ${t.id} has unrecognised start shape`);
853
- let s = t.start.timeZoneId, c = t.end?.timeZoneId ?? s, l = t.start, u = t.end ?? null, d = e.PlainDate.from(i.date);
854
- if (i.minutes === null && (a === "timed" || a === "timed-resize-start" || a === "timed-resize-end")) throw TypeError(`[applyMoveToEvent] timed event ${t.id} cannot be dropped onto an all-day target (target.minutes === null). To convert a timed event to all-day, change the event's start to a Temporal.PlainDate explicitly in your event-source — the drop API does not auto-convert.`);
855
- let f = e.PlainTime.from({
856
- hour: Math.floor(i.minutes / 60),
857
- minute: i.minutes % 60
858
- }), p = Q(i.displayZone, {
859
- year: d.year,
860
- month: d.month,
861
- day: d.day,
862
- hour: f.hour,
863
- minute: f.minute
864
- });
865
- if (p && o === "reject") throw new Z(p, `[applyMoveToEvent] target ${i.date}T${String(f.hour).padStart(2, "0")}:${String(f.minute).padStart(2, "0")} is a DST ${p} in ${i.displayZone}; policy='reject'.`);
866
- let m = o === "reject" ? "compatible" : o, h = e.PlainDateTime.from({
867
- year: d.year,
868
- month: d.month,
869
- day: d.day,
870
- hour: f.hour,
871
- minute: f.minute
872
- }).toZonedDateTime(i.displayZone, { disambiguation: m }), g = h.withTimeZone(s), _ = h.withTimeZone(c), v = p;
873
- if (a === "timed-resize-start") {
874
- let t = g;
875
- if (u) {
876
- let n = u.subtract({ minutes: 15 }).withTimeZone(s);
877
- e.Instant.compare(t.toInstant(), n.toInstant()) > 0 && (t = n);
878
- }
879
- return {
880
- start: t,
881
- ...u ? { end: u } : {},
882
- disambiguation: v
883
- };
884
- }
885
- if (a === "timed-resize-end") {
886
- let t = l.add({ minutes: 15 }).withTimeZone(c), n = _;
887
- return e.Instant.compare(n.toInstant(), t.toInstant()) < 0 && (n = t), {
888
- start: l,
889
- end: n,
890
- disambiguation: v
891
- };
892
- }
893
- if (a === "month-resize-start") {
894
- let t = l.withTimeZone(i.displayZone), n = Q(i.displayZone, {
895
- year: d.year,
896
- month: d.month,
897
- day: d.day,
898
- hour: t.hour,
899
- minute: t.minute,
900
- second: t.second
901
- });
902
- if (n && o === "reject") throw new Z(n, `[applyMoveToEvent] month-resize-start lands in a DST ${n} in ${i.displayZone}; policy='reject'.`);
903
- let r = o === "reject" ? "compatible" : o, a = e.PlainDateTime.from({
904
- year: d.year,
905
- month: d.month,
906
- day: d.day,
907
- hour: t.hour,
908
- minute: t.minute,
909
- second: t.second
910
- }).toZonedDateTime(i.displayZone, { disambiguation: r }).withTimeZone(s);
911
- if (u) {
912
- let t = u.subtract({ minutes: 15 }).withTimeZone(s);
913
- e.Instant.compare(a.toInstant(), t.toInstant()) > 0 && (a = t);
914
- }
915
- return {
916
- start: a,
917
- ...u ? { end: u } : {},
918
- disambiguation: n
919
- };
920
- }
921
- if (a === "month-resize-end") {
922
- let t = u ?? l, n = u ? c : s, r = t.withTimeZone(i.displayZone), a = Q(i.displayZone, {
923
- year: d.year,
924
- month: d.month,
925
- day: d.day,
926
- hour: r.hour,
927
- minute: r.minute,
928
- second: r.second
929
- });
930
- if (a && o === "reject") throw new Z(a, `[applyMoveToEvent] month-resize-end lands in a DST ${a} in ${i.displayZone}; policy='reject'.`);
931
- let f = o === "reject" ? "compatible" : o, p = e.PlainDateTime.from({
932
- year: d.year,
933
- month: d.month,
934
- day: d.day,
935
- hour: r.hour,
936
- minute: r.minute,
937
- second: r.second
938
- }).toZonedDateTime(i.displayZone, { disambiguation: f }).withTimeZone(n), m = l.add({ minutes: 15 }).withTimeZone(n);
939
- return e.Instant.compare(p.toInstant(), m.toInstant()) < 0 && (p = m), {
940
- start: l,
941
- end: p,
942
- disambiguation: a
943
- };
944
- }
945
- if (u) {
946
- let e = u.epochMilliseconds - l.epochMilliseconds;
947
- return {
948
- start: g,
949
- end: g.add({ milliseconds: e }).withTimeZone(c),
950
- disambiguation: v
951
- };
952
- }
953
- return {
954
- start: g,
955
- disambiguation: v
956
- };
957
- }
958
- //#endregion
959
- export { m as A, p as B, t as C, c as D, d as E, y as F, i as G, v as H, w as I, te as L, T as M, _ as N, l as O, b as P, ee as R, D as S, x as T, r as U, C as V, n as W, k as _, ie as a, A as b, J as c, W as d, H as f, O as g, R as h, oe as i, S as j, g as k, Y as l, z as m, ae as n, re as o, B as p, $ as r, X as s, Z as t, q as u, M as v, f as w, ne as x, j as y, h as z };
835
+ export { y as A, o as C, x as D, f as E, p as F, d as I, S as L, C as M, T as N, E as O, w as P, g as R, l as S, m as T, j as _, $ as a, u as b, W as c, z as d, R as f, M as g, k as h, Q as i, v as j, h as k, H as l, O as m, te as n, Z as o, D as p, ee as r, q as s, ne as t, B as u, A as v, s as w, b as x, r as y, _ as z };