@cocoar/vue-calendar 3.1.0 → 3.2.0-beta.11

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 (113) hide show
  1. package/README.md +35 -8
  2. package/dist/builders/calendar-builder-config.d.ts +181 -0
  3. package/dist/builders/calendar-builder-config.d.ts.map +1 -0
  4. package/dist/builders/calendar-builder-handlers.d.ts +50 -0
  5. package/dist/builders/calendar-builder-handlers.d.ts.map +1 -0
  6. package/dist/builders/calendar-builder-internals.d.ts +18 -2
  7. package/dist/builders/calendar-builder-internals.d.ts.map +1 -1
  8. package/dist/builders/calendar-builder-state.d.ts +234 -0
  9. package/dist/builders/calendar-builder-state.d.ts.map +1 -0
  10. package/dist/builders/calendar-builder.d.ts +41 -452
  11. package/dist/builders/calendar-builder.d.ts.map +1 -1
  12. package/dist/builders/internal/event-validation.d.ts +13 -0
  13. package/dist/builders/internal/event-validation.d.ts.map +1 -0
  14. package/dist/builders/internal/events-for-window.d.ts +6 -0
  15. package/dist/builders/internal/events-for-window.d.ts.map +1 -0
  16. package/dist/builders/internal/loader-pipeline.d.ts +50 -0
  17. package/dist/builders/internal/loader-pipeline.d.ts.map +1 -0
  18. package/dist/builders/internal/loading-tracker.d.ts +12 -0
  19. package/dist/builders/internal/loading-tracker.d.ts.map +1 -0
  20. package/dist/builders/internal/navigation.d.ts +28 -0
  21. package/dist/builders/internal/navigation.d.ts.map +1 -0
  22. package/dist/builders/internal/range-label.d.ts +7 -0
  23. package/dist/builders/internal/range-label.d.ts.map +1 -0
  24. package/dist/builders/internal/series-pipeline.d.ts +67 -0
  25. package/dist/builders/internal/series-pipeline.d.ts.map +1 -0
  26. package/dist/builders/internal/window-utils.d.ts +44 -0
  27. package/dist/builders/internal/window-utils.d.ts.map +1 -0
  28. package/dist/builders/types.d.ts +30 -3
  29. package/dist/builders/types.d.ts.map +1 -1
  30. package/dist/components/CoarAgendaView.vue.d.ts +35 -0
  31. package/dist/components/CoarAgendaView.vue.d.ts.map +1 -1
  32. package/dist/components/CoarCalendar.vue.d.ts +46 -1
  33. package/dist/components/CoarCalendar.vue.d.ts.map +1 -1
  34. package/dist/components/CoarContinuousMonthView.vue.d.ts +7 -0
  35. package/dist/components/CoarContinuousMonthView.vue.d.ts.map +1 -1
  36. package/dist/components/CoarDayView.vue.d.ts +16 -2
  37. package/dist/components/CoarDayView.vue.d.ts.map +1 -1
  38. package/dist/components/CoarMonthListView.vue.d.ts.map +1 -1
  39. package/dist/components/CoarMonthView.vue.d.ts.map +1 -1
  40. package/dist/components/CoarTimeGrid.vue.d.ts +33 -7
  41. package/dist/components/CoarTimeGrid.vue.d.ts.map +1 -1
  42. package/dist/components/CoarTimelineView.vue.d.ts.map +1 -1
  43. package/dist/components/CoarWeekView.vue.d.ts.map +1 -1
  44. package/dist/components/CoarWorkWeekView.vue.d.ts +1 -2
  45. package/dist/components/CoarWorkWeekView.vue.d.ts.map +1 -1
  46. package/dist/components/CoarYearView.vue.d.ts.map +1 -1
  47. package/dist/components/VirtualizedSurface1DY.vue.d.ts.map +1 -1
  48. package/dist/components/internal/CoarEventDecorations.vue.d.ts.map +1 -1
  49. package/dist/components/internal/agenda/agendaTimeLabel.d.ts +4 -0
  50. package/dist/components/internal/agenda/agendaTimeLabel.d.ts.map +1 -0
  51. package/dist/components/internal/month/CoarMonthBar.vue.d.ts +2 -0
  52. package/dist/components/internal/month/CoarMonthBar.vue.d.ts.map +1 -1
  53. package/dist/components/internal/month/CoarMonthCell.vue.d.ts +20 -13
  54. package/dist/components/internal/month/CoarMonthCell.vue.d.ts.map +1 -1
  55. package/dist/components/internal/month/CoarMonthDayOverlay.vue.d.ts +51 -0
  56. package/dist/components/internal/month/CoarMonthDayOverlay.vue.d.ts.map +1 -0
  57. package/dist/components/internal/month/CoarMonthPill.vue.d.ts +2 -0
  58. package/dist/components/internal/month/CoarMonthPill.vue.d.ts.map +1 -1
  59. package/dist/components/internal/month/CoarMonthRow.vue.d.ts +4 -4
  60. package/dist/components/internal/month/CoarMonthRow.vue.d.ts.map +1 -1
  61. package/dist/components/internal/originatesFromEvent.d.ts +18 -0
  62. package/dist/components/internal/originatesFromEvent.d.ts.map +1 -0
  63. package/dist/components/internal/time-grid/CoarTimeGridAllDayBand.vue.d.ts +15 -1
  64. package/dist/components/internal/time-grid/CoarTimeGridAllDayBand.vue.d.ts.map +1 -1
  65. package/dist/components/internal/time-grid/CoarTimeGridAllDayBar.vue.d.ts +2 -0
  66. package/dist/components/internal/time-grid/CoarTimeGridAllDayBar.vue.d.ts.map +1 -1
  67. package/dist/components/internal/time-grid/CoarTimeGridAllDayOverflow.vue.d.ts +27 -0
  68. package/dist/components/internal/time-grid/CoarTimeGridAllDayOverflow.vue.d.ts.map +1 -0
  69. package/dist/components/internal/time-grid/CoarTimeGridColumn.vue.d.ts +2 -0
  70. package/dist/components/internal/time-grid/CoarTimeGridColumn.vue.d.ts.map +1 -1
  71. package/dist/components/internal/time-grid/CoarTimeGridEvent.vue.d.ts +12 -1
  72. package/dist/components/internal/time-grid/CoarTimeGridEvent.vue.d.ts.map +1 -1
  73. package/dist/components/internal/time-grid/CoarTimeGridHeader.vue.d.ts +12 -1
  74. package/dist/components/internal/time-grid/CoarTimeGridHeader.vue.d.ts.map +1 -1
  75. package/dist/components/internal/time-grid/CoarTimeGridSurface.vue.d.ts +53 -0
  76. package/dist/components/internal/time-grid/CoarTimeGridSurface.vue.d.ts.map +1 -0
  77. package/dist/composables/useMonthDayOverlay.d.ts +34 -0
  78. package/dist/composables/useMonthDayOverlay.d.ts.map +1 -0
  79. package/dist/composables/useMonthGeometry.d.ts +39 -0
  80. package/dist/composables/useMonthGeometry.d.ts.map +1 -0
  81. package/dist/composables/useMonthMetrics.d.ts +32 -0
  82. package/dist/composables/useMonthMetrics.d.ts.map +1 -0
  83. package/dist/composables/useTimeGridSwipe.d.ts +47 -0
  84. package/dist/composables/useTimeGridSwipe.d.ts.map +1 -0
  85. package/dist/composables/useViewWindow.d.ts +4 -2
  86. package/dist/composables/useViewWindow.d.ts.map +1 -1
  87. package/dist/core/allDayBandCap.d.ts +41 -0
  88. package/dist/core/allDayBandCap.d.ts.map +1 -0
  89. package/dist/core/eventTextContrast.d.ts +53 -2
  90. package/dist/core/eventTextContrast.d.ts.map +1 -1
  91. package/dist/core/index.d.ts +6 -2
  92. package/dist/core/index.d.ts.map +1 -1
  93. package/dist/core/monthGridLayout.d.ts +43 -1
  94. package/dist/core/monthGridLayout.d.ts.map +1 -1
  95. package/dist/core/rangeLabel.d.ts +14 -0
  96. package/dist/core/rangeLabel.d.ts.map +1 -0
  97. package/dist/core/timeGridRange.d.ts +50 -0
  98. package/dist/core/timeGridRange.d.ts.map +1 -0
  99. package/dist/core/timedCardAnatomy.d.ts +47 -0
  100. package/dist/core/timedCardAnatomy.d.ts.map +1 -0
  101. package/dist/core/viewWindow.d.ts +17 -4
  102. package/dist/core/viewWindow.d.ts.map +1 -1
  103. package/dist/{core-CiKX2hZM.js → core-DNwsMOSU.js} +329 -80
  104. package/dist/core.js +2 -2
  105. package/dist/i18n/messages.d.ts +16 -0
  106. package/dist/i18n/messages.d.ts.map +1 -0
  107. package/dist/index.d.ts +3 -1
  108. package/dist/index.d.ts.map +1 -1
  109. package/dist/index.js +2927 -1873
  110. package/dist/vue-calendar.css +1 -1
  111. package/package.json +4 -3
  112. package/dist/composables/useMonthExpansion.d.ts +0 -37
  113. package/dist/composables/useMonthExpansion.d.ts.map +0 -1
@@ -81,13 +81,13 @@ function b(e) {
81
81
  function x(e, t) {
82
82
  return e instanceof r.PlainDate ? e : e.withTimeZone(t).toPlainDate();
83
83
  }
84
- function S(e) {
84
+ function ee(e) {
85
85
  return r.Now.plainDateISO(e);
86
86
  }
87
- function C(e) {
87
+ function S(e) {
88
88
  return r.Now.zonedDateTimeISO(e);
89
89
  }
90
- function w(e) {
90
+ function C(e) {
91
91
  let { local: t, timeZoneId: n, dstPolicy: i = "compatible" } = e, a;
92
92
  try {
93
93
  a = r.PlainDateTime.from(t);
@@ -103,51 +103,98 @@ function w(e) {
103
103
  }
104
104
  return o;
105
105
  }
106
- function T(e) {
106
+ function w(e) {
107
107
  try {
108
108
  return r.PlainDate.from(e);
109
109
  } catch (t) {
110
110
  throw RangeError(`[parsePlainDate] iso='${e}' is not a parseable ISO-8601 date (${t.message}). Expected format: 'YYYY-MM-DD'.`, { cause: t });
111
111
  }
112
112
  }
113
- function E(e) {
113
+ function T(e) {
114
114
  return {
115
115
  local: e.toPlainDateTime().toString(),
116
116
  timeZoneId: e.timeZoneId
117
117
  };
118
118
  }
119
119
  //#endregion
120
+ //#region src/core/timeGridRange.ts
121
+ var E = {
122
+ daySingle: {
123
+ anchor: "cursor",
124
+ span: 1,
125
+ filter: "all",
126
+ step: "span"
127
+ },
128
+ dayMulti: {
129
+ anchor: "cursor",
130
+ span: "responsive",
131
+ filter: "all",
132
+ step: "span"
133
+ },
134
+ week: {
135
+ anchor: "weekStart",
136
+ span: 7,
137
+ filter: "all",
138
+ step: 7
139
+ },
140
+ workWeek: {
141
+ anchor: "weekStart",
142
+ span: 7,
143
+ filter: "workDays",
144
+ step: 7
145
+ }
146
+ };
147
+ function D(e, t = {}) {
148
+ return e === "week" ? E.week : e === "workWeek" ? E.workWeek : t.explicit ? t.explicit : t.dayMode === "multiDay" ? E.dayMulti : E.daySingle;
149
+ }
150
+ function O(e) {
151
+ let { spec: t, cursor: n, firstDayOfWeek: r, workDays: a } = e, o = t.anchor === "weekStart" ? d(n, r) : n, s = k(t, e.responsiveColumns), c = Array.from({ length: s }, (e, t) => o.add({ days: t }));
152
+ return {
153
+ start: o,
154
+ spanDays: s,
155
+ days: t.filter === "workDays" ? c.filter((e) => a.includes(i(e.dayOfWeek))) : c,
156
+ stepDays: A(t, s)
157
+ };
158
+ }
159
+ function k(e, t) {
160
+ return e.span === "responsive" ? Math.max(1, Math.floor(t)) : Math.max(1, Math.floor(e.span));
161
+ }
162
+ function A(e, t) {
163
+ return e.step === "span" ? Math.max(1, t) : Math.max(1, Math.floor(e.step));
164
+ }
165
+ //#endregion
120
166
  //#region src/core/viewWindow.ts
121
- var ee = [
167
+ var te = [
122
168
  1,
123
169
  2,
124
170
  3,
125
171
  4,
126
172
  5
127
173
  ];
128
- function D(e) {
174
+ function ne(e) {
129
175
  let { view: t, cursor: r, firstDayOfWeek: i, timezone: a } = e;
130
176
  switch (t) {
131
- case "day": {
132
- let n = Math.max(1, e.dayColumnCount ?? 1);
133
- return {
134
- view: t,
135
- start: r.toString(),
136
- end: r.add({ days: n }).toString(),
137
- timezone: a
138
- };
139
- }
140
- case "dayAgenda":
141
- case "week": {
142
- let e = d(r, i);
177
+ case "day":
178
+ case "week":
179
+ case "workWeek": {
180
+ let n = O({
181
+ spec: D(t, {
182
+ dayMode: "multiDay",
183
+ explicit: t === "day" ? e.timeGridRange ?? null : null
184
+ }),
185
+ cursor: r,
186
+ firstDayOfWeek: i,
187
+ workDays: [],
188
+ responsiveColumns: e.dayColumnCount ?? 1
189
+ });
143
190
  return {
144
191
  view: t,
145
- start: e.toString(),
146
- end: e.add({ days: 7 }).toString(),
192
+ start: n.start.toString(),
193
+ end: n.start.add({ days: n.spanDays }).toString(),
147
194
  timezone: a
148
195
  };
149
196
  }
150
- case "workWeek": {
197
+ case "dayAgenda": {
151
198
  let e = d(r, i);
152
199
  return {
153
200
  view: t,
@@ -214,19 +261,19 @@ function D(e) {
214
261
  default: throw Error(`Unsupported view: ${String(t)}`);
215
262
  }
216
263
  }
217
- function* O(e) {
264
+ function* re(e) {
218
265
  let t = n.PlainDate.from(e.start), r = n.PlainDate.from(e.end);
219
266
  for (; n.PlainDate.compare(t, r) < 0;) yield t, t = t.add({ days: 1 });
220
267
  }
221
- function k(e) {
268
+ function ie(e) {
222
269
  let t = n.PlainDate.from(e.start);
223
270
  return n.PlainDate.from(e.end).since(t, { largestUnit: "days" }).days;
224
271
  }
225
- function A(e, t) {
272
+ function ae(e, t) {
226
273
  let r = n.PlainDate.from(e.start), i = n.PlainDate.from(e.end);
227
274
  return n.PlainDate.compare(t, r) >= 0 && n.PlainDate.compare(t, i) < 0;
228
275
  }
229
- function j(e, t, n, r = 30, i = 60, a = 1) {
276
+ function oe(e, t, n, r = 30, i = 60, a = 1) {
230
277
  let o = n === "next" ? 1 : -1;
231
278
  switch (e) {
232
279
  case "day": return t.add({ days: Math.max(1, a) * o });
@@ -243,15 +290,111 @@ function j(e, t, n, r = 30, i = 60, a = 1) {
243
290
  }
244
291
  //#endregion
245
292
  //#region src/core/dayColumns.ts
246
- function M(e, t = 1, n = 220, r = 64, i = 7) {
293
+ function se(e, t = 1, n = 220, r = 64, i = 7) {
247
294
  let a = Math.max(1, Math.round(t));
248
295
  if (!Number.isFinite(e) || e <= 0) return a;
249
296
  let o = Math.max(120, Number.isFinite(n) ? n : 220), s = Math.floor(Math.max(0, e - Math.max(0, r)) / o);
250
297
  return Math.min(Math.max(a, i), Math.max(a, s));
251
298
  }
252
299
  //#endregion
300
+ //#region src/core/rangeLabel.ts
301
+ var ce = {
302
+ month: "short",
303
+ day: "numeric",
304
+ year: "numeric",
305
+ timeZone: "UTC"
306
+ }, j = {
307
+ weekday: "long",
308
+ day: "numeric",
309
+ month: "long",
310
+ year: "numeric",
311
+ timeZone: "UTC"
312
+ }, le = {
313
+ year: "numeric",
314
+ month: "long",
315
+ timeZone: "UTC"
316
+ };
317
+ function M(e) {
318
+ return new Date(Date.UTC(e.year, e.month - 1, e.day));
319
+ }
320
+ function N(e) {
321
+ let { view: t, window: r, cursor: i, locale: a } = e, o = {
322
+ dateStyle: e.dateStyle,
323
+ timeStyle: e.timeStyle,
324
+ hour12: e.hour12
325
+ }, s = n.PlainDate.from(r.start), c = n.PlainDate.from(r.end).subtract({ days: 1 }), l = () => new Intl.DateTimeFormat(a, u(ce, o)).formatRange(M(s), M(c)), d = (e) => new Intl.DateTimeFormat(a, u(e, o)).format(M(i));
326
+ switch (t) {
327
+ case "day": return s.until(c, { largestUnit: "day" }).days > 0 ? l() : d(j);
328
+ case "dayAgenda": return d(j);
329
+ case "week":
330
+ case "workWeek": return l();
331
+ case "month":
332
+ case "monthList": return d(le);
333
+ case "agenda":
334
+ case "timeline": return l();
335
+ case "year": return String(i.year);
336
+ default: return "";
337
+ }
338
+ }
339
+ //#endregion
340
+ //#region src/core/timedCardAnatomy.ts
341
+ var P = 112, F = Object.freeze({
342
+ compact: !0,
343
+ titleLines: 1,
344
+ showLocation: !1,
345
+ showTime: !1
346
+ });
347
+ function I(e) {
348
+ let { durationMinutes: t, visibleWidthPx: n, detailMinWidth: r, overlapped: i, hasLocation: a } = e;
349
+ return i && r > 0 && n !== null && n < r ? F : {
350
+ compact: !1,
351
+ titleLines: t >= 70 ? 2 : 1,
352
+ showLocation: a && t >= 34,
353
+ showTime: t >= 52
354
+ };
355
+ }
356
+ //#endregion
357
+ //#region src/core/allDayBandCap.ts
358
+ var L = 3;
359
+ function R(e, { maxVisibleLanes: t, expanded: n, columnCount: r }) {
360
+ let i = e.length === 0 ? 0 : e[0].laneCount, a = t === null ? null : Math.max(1, Math.floor(t)), o = a !== null && i > a;
361
+ if (!o || n) return {
362
+ bars: [...e],
363
+ overflow: [],
364
+ visibleLanes: i,
365
+ capped: !1,
366
+ exceedsCap: o
367
+ };
368
+ let s = a - 1, c = e.filter((e) => e.lane < s), l = Array(r).fill(0);
369
+ for (let t of e) {
370
+ if (t.lane < s) continue;
371
+ let e = Math.max(0, t.startCol), n = Math.min(r - 1, t.endCol);
372
+ for (let t = e; t <= n; t++) l[t] += 1;
373
+ }
374
+ let u = [];
375
+ return l.forEach((e, t) => {
376
+ e > 0 && u.push({
377
+ col: t,
378
+ hidden: e
379
+ });
380
+ }), {
381
+ bars: c,
382
+ overflow: u,
383
+ visibleLanes: a,
384
+ capped: !0,
385
+ exceedsCap: o
386
+ };
387
+ }
388
+ function z(e, t, n) {
389
+ switch (t) {
390
+ case "alwaysOneLane": return Math.max(1, e);
391
+ case "reservesCap": return Math.max(n ?? 0, e);
392
+ default: return e;
393
+ }
394
+ }
395
+ //#endregion
253
396
  //#region src/core/cascadeLayout.ts
254
- function N(e, t = 100, n = 1.5, r = 18) {
397
+ function B(e, t = 100, n = 1.5, r = 18) {
255
398
  let i = /* @__PURE__ */ new Map();
256
399
  if (!Number.isFinite(t) || t <= 0 || e.length === 0) return i;
257
400
  let a = Number.isFinite(n) ? Math.min(t / 2, Math.max(0, n)) : 0, o = Math.max(0, t - 2 * a), s = Number.isFinite(r) ? Math.max(0, r) : 0, c = e.map((e, t) => ({
@@ -290,15 +433,62 @@ function N(e, t = 100, n = 1.5, r = 18) {
290
433
  }
291
434
  return i;
292
435
  }
293
- //#endregion
294
- //#region src/core/eventTextContrast.ts
295
- function P(e, t = "var(--coar-text-base, #1a1c1f)") {
296
- let n = F(e);
297
- if (!n) return t;
298
- let r = .2126 * I(n[0]) + .7152 * I(n[1]) + .0722 * I(n[2]);
299
- return 1.05 / (r + .05) >= (r + .05) / .05 ? "#ffffff" : "#000000";
300
- }
301
- function F(e) {
436
+ var V = "#ffffff", H = "#000000", U = "var(--coar-text-base, #1a1c1f)";
437
+ function W(e, t = {}) {
438
+ let n = typeof t == "string" ? { fallback: t } : t, r = pe(e);
439
+ return r ? (n.policy ?? "wcag") === "apca" ? fe(r) : de(r) : n.fallback ?? U;
440
+ }
441
+ function ue({ background: e, textColor: t, policy: n, fallback: r }) {
442
+ return typeof t == "string" && t.trim() !== "" ? t : W(e, {
443
+ policy: n,
444
+ fallback: r
445
+ });
446
+ }
447
+ function de(e) {
448
+ let t = .2126 * G(e[0]) + .7152 * G(e[1]) + .0722 * G(e[2]);
449
+ return 1.05 / (t + .05) >= (t + .05) / .05 ? V : H;
450
+ }
451
+ function G(e) {
452
+ let t = e / 255;
453
+ return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
454
+ }
455
+ var K = {
456
+ exponent: 2.4,
457
+ blackThreshold: .022,
458
+ blackClamp: 1.414,
459
+ normBg: .56,
460
+ normText: .57,
461
+ revBg: .65,
462
+ revText: .62,
463
+ scale: 1.14,
464
+ loClip: .1,
465
+ loOffset: .027
466
+ };
467
+ function q(e) {
468
+ let t = (e) => (e / 255) ** K.exponent, n = .2126729 * t(e[0]) + .7151522 * t(e[1]) + .072175 * t(e[2]);
469
+ return n < K.blackThreshold ? n + (K.blackThreshold - n) ** K.blackClamp : n;
470
+ }
471
+ function J(e, t) {
472
+ let n = q(e), r = q(t);
473
+ if (r > n) {
474
+ let e = (r ** K.normBg - n ** K.normText) * K.scale;
475
+ return e < K.loClip ? 0 : (e - K.loOffset) * 100;
476
+ }
477
+ let i = (r ** K.revBg - n ** K.revText) * K.scale;
478
+ return i > -K.loClip ? 0 : (i + K.loOffset) * 100;
479
+ }
480
+ function fe(e) {
481
+ return Math.abs(J([
482
+ 255,
483
+ 255,
484
+ 255
485
+ ], e)) >= Math.abs(J([
486
+ 0,
487
+ 0,
488
+ 0
489
+ ], e)) ? V : H;
490
+ }
491
+ function pe(e) {
302
492
  let t = e.trim().match(/^#([\da-f]{3}|[\da-f]{6})$/i);
303
493
  if (!t) return null;
304
494
  let n = t[1].length === 3 ? [...t[1]].map((e) => e + e).join("") : t[1];
@@ -308,13 +498,9 @@ function F(e) {
308
498
  4
309
499
  ].map((e) => Number.parseInt(n.slice(e, e + 2), 16));
310
500
  }
311
- function I(e) {
312
- let t = e / 255;
313
- return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
314
- }
315
501
  //#endregion
316
502
  //#region src/core/overlapLayout.ts
317
- function L(e, t) {
503
+ function me(e, t) {
318
504
  e.push(t);
319
505
  let n = e.length - 1;
320
506
  for (; n > 0;) {
@@ -323,7 +509,7 @@ function L(e, t) {
323
509
  [e[t], e[n]] = [e[n], e[t]], n = t;
324
510
  }
325
511
  }
326
- function R(e) {
512
+ function he(e) {
327
513
  let t = e[0], n = e.pop();
328
514
  if (e.length > 0) {
329
515
  e[0] = n;
@@ -336,7 +522,7 @@ function R(e) {
336
522
  }
337
523
  return t;
338
524
  }
339
- function z(e, t, n, r) {
525
+ function ge(e, t, n, r) {
340
526
  e.push(n), t.push(r);
341
527
  let i = e.length - 1;
342
528
  for (; i > 0;) {
@@ -345,10 +531,10 @@ function z(e, t, n, r) {
345
531
  [e[n], e[i]] = [e[i], e[n]], [t[n], t[i]] = [t[i], t[n]], i = n;
346
532
  }
347
533
  }
348
- function B(e) {
534
+ function _e(e) {
349
535
  return e.length > 0 ? e[0] : Infinity;
350
536
  }
351
- function V(e, t) {
537
+ function ve(e, t) {
352
538
  let n = {
353
539
  end: e[0],
354
540
  lane: t[0]
@@ -364,7 +550,7 @@ function V(e, t) {
364
550
  }
365
551
  return n;
366
552
  }
367
- function H(e) {
553
+ function Y(e) {
368
554
  let t = e.length;
369
555
  if (t === 0) return {
370
556
  bars: [],
@@ -380,12 +566,12 @@ function H(e) {
380
566
  let r = [], i = [], a = [], o = 0, s = Array(t);
381
567
  for (let e = 0; e < t; e++) {
382
568
  let t = n[e];
383
- for (; B(r) < t.start;) {
384
- let { lane: e } = V(r, i);
385
- L(a, e);
569
+ for (; _e(r) < t.start;) {
570
+ let { lane: e } = ve(r, i);
571
+ me(a, e);
386
572
  }
387
573
  let c;
388
- c = a.length > 0 ? R(a) : o++, z(r, i, t.end, c), s[e] = {
574
+ c = a.length > 0 ? he(a) : o++, ge(r, i, t.end, c), s[e] = {
389
575
  id: t.id,
390
576
  lane: c,
391
577
  start: t.start,
@@ -399,14 +585,14 @@ function H(e) {
399
585
  }
400
586
  //#endregion
401
587
  //#region src/core/timeGridLayout.ts
402
- function te(e, n) {
588
+ function ye(e, n) {
403
589
  let { day: r, timeRange: i, timezone: a } = n, [o, s] = i, c = o * 60, l = s * 60;
404
590
  if (l - c <= 0) return [];
405
591
  let u = [], d = /* @__PURE__ */ new Set();
406
592
  for (let n of e) {
407
593
  if (d.has(n.id) || (d.add(n.id), !t(n))) continue;
408
- let e = W(n.start, r, a), i;
409
- if (n.end) i = W(n.end, r, a);
594
+ let e = X(n.start, r, a), i;
595
+ if (n.end) i = X(n.end, r, a);
410
596
  else {
411
597
  if (e < 0) continue;
412
598
  i = e + 30;
@@ -429,7 +615,7 @@ function te(e, n) {
429
615
  m.length > 0 && p.push(m);
430
616
  let g = /* @__PURE__ */ new Map();
431
617
  for (let e of p) {
432
- let t = H(e.map((e) => ({
618
+ let t = Y(e.map((e) => ({
433
619
  id: e.event.id,
434
620
  start: e.startMinutes,
435
621
  end: Math.max(e.startMinutes, e.endMinutes - 1)
@@ -465,7 +651,7 @@ function te(e, n) {
465
651
  };
466
652
  });
467
653
  }
468
- function U(t, n) {
654
+ function be(t, n) {
469
655
  let { days: i } = n;
470
656
  if (n.timezone, i.length === 0) return [];
471
657
  let a = /* @__PURE__ */ new Map();
@@ -488,7 +674,7 @@ function U(t, n) {
488
674
  });
489
675
  }
490
676
  if (o.length === 0) return [];
491
- let c = H(o.map((e) => ({
677
+ let c = Y(o.map((e) => ({
492
678
  id: e.event.id,
493
679
  start: e.startCol,
494
680
  end: e.endCol
@@ -504,7 +690,7 @@ function U(t, n) {
504
690
  clippedEnd: e.clippedEnd
505
691
  }));
506
692
  }
507
- function W(e, t, n) {
693
+ function X(e, t, n) {
508
694
  let i = e.withTimeZone(n), a = r.PlainDateTime.from({
509
695
  year: t.year,
510
696
  month: t.month,
@@ -516,7 +702,70 @@ function W(e, t, n) {
516
702
  }
517
703
  //#endregion
518
704
  //#region src/core/monthGridLayout.ts
519
- function G(e, t) {
705
+ var xe = 2, Se = 6;
706
+ function Ce(e, t) {
707
+ switch (e) {
708
+ case "compact": return 6;
709
+ case "stacked": return 2;
710
+ default: return t;
711
+ }
712
+ }
713
+ function we(e, t) {
714
+ if (!Number.isFinite(t) || t < 0) return {
715
+ visible: e,
716
+ hidden: 0
717
+ };
718
+ let n = Math.floor(t);
719
+ return e.length <= n ? {
720
+ visible: e,
721
+ hidden: 0
722
+ } : {
723
+ visible: e.slice(0, n),
724
+ hidden: e.length - n
725
+ };
726
+ }
727
+ var Te = 2;
728
+ function Ee(e, t) {
729
+ let n = e.length ? e[0].laneCount : 0, r = t === null || !Number.isFinite(t) || t < 0 ? n : Math.floor(t);
730
+ if (n <= r) return {
731
+ visible: e,
732
+ hidden: [],
733
+ hiddenPerColumn: [
734
+ 0,
735
+ 0,
736
+ 0,
737
+ 0,
738
+ 0,
739
+ 0,
740
+ 0
741
+ ],
742
+ laneCount: n
743
+ };
744
+ let i = [], a = [], o = [
745
+ 0,
746
+ 0,
747
+ 0,
748
+ 0,
749
+ 0,
750
+ 0,
751
+ 0
752
+ ];
753
+ for (let t of e) {
754
+ if (t.lane < r) {
755
+ i.push(t);
756
+ continue;
757
+ }
758
+ a.push(t);
759
+ for (let e = t.startCol; e <= t.endCol; e++) o[e]++;
760
+ }
761
+ return {
762
+ visible: i,
763
+ hidden: a,
764
+ hiddenPerColumn: o,
765
+ laneCount: r
766
+ };
767
+ }
768
+ function De(e, t) {
520
769
  let { gridDates: n, timezone: i } = t;
521
770
  if (n.length < 7 || n.length % 7 != 0) throw RangeError(`gridDates must contain complete seven-day rows (got ${n.length})`);
522
771
  let a = [];
@@ -535,7 +784,7 @@ function G(e, t) {
535
784
  for (let n of e) {
536
785
  if (o.has(n.id)) continue;
537
786
  o.add(n.id);
538
- let { firstDay: e, lastDayInclusive: a, isMultiDay: l } = K(n, i), u = (e) => (!t.visibleStart || r.PlainDate.compare(e, t.visibleStart) >= 0) && (!t.visibleEnd || r.PlainDate.compare(e, t.visibleEnd) <= 0);
787
+ let { firstDay: e, lastDayInclusive: a, isMultiDay: l } = Oe(n, i), u = (e) => (!t.visibleStart || r.PlainDate.compare(e, t.visibleStart) >= 0) && (!t.visibleEnd || r.PlainDate.compare(e, t.visibleEnd) <= 0);
539
788
  if (l) s.push({
540
789
  event: n,
541
790
  firstDay: e,
@@ -574,7 +823,7 @@ function G(e, t) {
574
823
  }
575
824
  let i = [];
576
825
  if (n.length > 0) {
577
- let e = H(n.map((e) => ({
826
+ let e = Y(n.map((e) => ({
578
827
  id: e.event.id,
579
828
  start: e.startCol,
580
829
  end: e.endCol
@@ -605,7 +854,7 @@ function G(e, t) {
605
854
  };
606
855
  }) };
607
856
  }
608
- function K(t, n) {
857
+ function Oe(t, n) {
609
858
  if (e(t)) {
610
859
  let e = t.start, n;
611
860
  return t.end ? (n = t.end.subtract({ days: 1 }), r.PlainDate.compare(n, e) < 0 && (n = e)) : n = e, {
@@ -623,7 +872,7 @@ function K(t, n) {
623
872
  }
624
873
  //#endregion
625
874
  //#region src/core/agendaLayout.ts
626
- function q(t, n) {
875
+ function ke(t, n) {
627
876
  let { rangeStart: i, rangeEnd: a, timezone: o, showEmptyDays: s = !1 } = n, c = r.PlainDate.from(i), l = r.PlainDate.from(a);
628
877
  if (r.PlainDate.compare(l, c) <= 0) return [];
629
878
  let u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Set();
@@ -637,7 +886,7 @@ function q(t, n) {
637
886
  for (let n of t) {
638
887
  if (d.has(n.id)) continue;
639
888
  d.add(n.id);
640
- let t = e(n), { firstDay: i, lastDayInclusive: a } = J(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;
889
+ let t = e(n), { firstDay: i, lastDayInclusive: a } = Z(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;
641
890
  if (r.PlainDate.compare(p, s) < 0) continue;
642
891
  let m = s, h = !0;
643
892
  for (; r.PlainDate.compare(m, p) <= 0;) {
@@ -647,7 +896,7 @@ function q(t, n) {
647
896
  isContinuation: a
648
897
  });
649
898
  else {
650
- let t = a ? -Infinity : Y(n, o);
899
+ let t = a ? -Infinity : Ae(n, o);
651
900
  e.timed.push({
652
901
  event: n,
653
902
  startMs: t,
@@ -687,7 +936,7 @@ function q(t, n) {
687
936
  }
688
937
  return p;
689
938
  }
690
- function J(t, n) {
939
+ function Z(t, n) {
691
940
  if (e(t)) {
692
941
  let e = t.start, n;
693
942
  return t.end ? (n = t.end.subtract({ days: 1 }), r.PlainDate.compare(n, e) < 0 && (n = e)) : n = e, {
@@ -705,15 +954,15 @@ function J(t, n) {
705
954
  lastDayInclusive: a
706
955
  };
707
956
  }
708
- function Y(t, n) {
957
+ function Ae(t, n) {
709
958
  return e(t) ? t.start.toZonedDateTime({ timeZone: n }).epochMilliseconds : t.start.epochMilliseconds;
710
959
  }
711
960
  //#endregion
712
961
  //#region src/core/timelineLayout.ts
713
- function X(e, t) {
962
+ function je(e, t) {
714
963
  let { windowStart: r, windowEnd: i, pixelsPerDay: a, rowHeight: o, displayZone: s } = t, c = r.until(i, { largestUnit: "days" }).days * a, l = /* @__PURE__ */ new Map();
715
964
  for (let t of e) {
716
- let e = Q(t), n = Z(t) !== null, r = l.get(e);
965
+ let e = Me(t), n = Q(t) !== null, r = l.get(e);
717
966
  r || (r = {
718
967
  events: [],
719
968
  isRecurring: n
@@ -723,7 +972,7 @@ function X(e, t) {
723
972
  for (let [e, t] of l) {
724
973
  let o = [];
725
974
  for (let e of t.events) {
726
- let { startDate: t, endDate: c } = ne(e, s);
975
+ let { startDate: t, endDate: c } = Ne(e, s);
727
976
  if (n.PlainDate.compare(c, r) <= 0 || n.PlainDate.compare(t, i) >= 0) continue;
728
977
  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;
729
978
  o.push({
@@ -755,14 +1004,14 @@ function X(e, t) {
755
1004
  totalHeight: d.length * o
756
1005
  };
757
1006
  }
758
- function Z(e) {
1007
+ function Q(e) {
759
1008
  let t = e.meta?.__recurrence?.seriesId;
760
1009
  return typeof t == "string" ? t : null;
761
1010
  }
762
- function Q(e) {
763
- return Z(e) ?? e.id;
1011
+ function Me(e) {
1012
+ return Q(e) ?? e.id;
764
1013
  }
765
- function ne(e, t) {
1014
+ function Ne(e, t) {
766
1015
  if (e.start instanceof n.PlainDate) {
767
1016
  let t = e.start;
768
1017
  return {
@@ -778,7 +1027,7 @@ function ne(e, t) {
778
1027
  }
779
1028
  //#endregion
780
1029
  //#region src/core/measurementCache.ts
781
- var re = class {
1030
+ var Pe = class {
782
1031
  _itemCount;
783
1032
  _estimatedSize;
784
1033
  _measured;
@@ -877,20 +1126,20 @@ function $(e, t, n, r = 3) {
877
1126
  totalSize: i
878
1127
  };
879
1128
  }
880
- function ie(e, t, n, r, i, a, o = 3, s = 3) {
1129
+ function Fe(e, t, n, r, i, a, o = 3, s = 3) {
881
1130
  return {
882
1131
  x: $(e, n, i, o),
883
1132
  y: $(t, r, a, s)
884
1133
  };
885
1134
  }
886
- function ae(e, t, n) {
1135
+ function Ie(e, t, n) {
887
1136
  if (n < 0) throw RangeError(`anchorIndex must be non-negative, got ${n}`);
888
1137
  let r = e.prefixSum(n);
889
1138
  return t.prefixSum(n) - r;
890
1139
  }
891
1140
  //#endregion
892
1141
  //#region src/core/dragHitTest.ts
893
- function oe(e, t, n, r, i) {
1142
+ function Le(e, t, n, r, i) {
894
1143
  if (r.itemCount === 0) return {
895
1144
  itemIndex: -1,
896
1145
  ratio: NaN,
@@ -921,7 +1170,7 @@ function oe(e, t, n, r, i) {
921
1170
  pixelInItem: u
922
1171
  };
923
1172
  }
924
- function se(e, t, n, r = {}) {
1173
+ function Re(e, t, n, r = {}) {
925
1174
  let i = r.hotZone ?? 30, a = r.maxVelocity ?? 24, o = r.curve ?? "linear";
926
1175
  if (i <= 0 || a <= 0) return {
927
1176
  velocityX: 0,
@@ -945,4 +1194,4 @@ function se(e, t, n, r = {}) {
945
1194
  };
946
1195
  }
947
1196
  //#endregion
948
- export { x as A, S as B, u as C, s as D, o as E, C as F, _ as H, T as I, w as L, h as M, y as N, m as O, v as P, p as R, r as S, l as T, g as V, D as _, ie as a, A as b, q as c, te as d, H as f, ee as g, M as h, $ as i, E as j, f as k, G as l, N as m, oe as n, re as o, P as p, ae as r, X as s, se as t, U as u, O as v, b as w, k as x, j as y, d as z };
1197
+ export { S as $, ne as A, r as B, z as C, N as D, I as E, E as F, s as G, b as H, k as I, x as J, m as K, O as L, oe as M, ae as N, se as O, ie as P, v as Q, D as R, L as S, P as T, l as U, u as V, o as W, h as X, T as Y, y as Z, ye as _, Fe as a, g as at, W as b, ke as c, xe as d, w as et, we as f, be as g, Ce as h, $ as i, ee as it, re as j, te as k, Se as l, De as m, Le as n, p as nt, Pe as o, _ as ot, Ee as p, f as q, Ie as r, d as rt, je as s, Re as t, C as tt, Te as u, Y as v, R as w, B as x, ue as y, A as z };