@getmicdrop/venue-calendar 4.3.119 → 4.3.120
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/README.md +818 -818
- package/dist/Calendar-DFPyzgRC.js +463 -0
- package/dist/{CalendarFoundryView-CZ36wO24.js → CalendarFoundryView-BI_LlpB6.js} +1 -1
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +4 -4
- package/dist/venue-calendar.iife.js +30 -30
- package/dist/venue-calendar.umd.js +54 -54
- package/package.json +1 -1
- package/src/lib/theme.js +222 -222
- package/dist/Calendar-S2Es6EKK.js +0 -486
- /package/dist/locales/{4.3.119 → 4.3.120}/flow/de.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/flow/es.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/flow/fr.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/flow/id.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/flow/it.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/flow/ja.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/flow/ko.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/flow/nl.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/flow/pl.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/flow/pt-br.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/flow/tr.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/flow/zh.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/main/de.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/main/es.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/main/fr.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/main/id.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/main/it.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/main/ja.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/main/ko.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/main/nl.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/main/pl.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/main/pt-br.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/main/tr.js +0 -0
- /package/dist/locales/{4.3.119 → 4.3.120}/main/zh.js +0 -0
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
import { i as e } from "./Button-B58iYo_t.js";
|
|
2
|
+
import { r as t, s as n } from "./keyboard-DhCcdIyh.js";
|
|
3
|
+
import { d as r, m as i, p as a } from "./sizing-B7ixYndz.js";
|
|
4
|
+
import { B as o, H as s, J as c, K as l, M as u, N as d, P as ee, X as f } from "./datetime-YTw6PkGP.js";
|
|
5
|
+
import { c as te, h as ne } from "./portalContainment-CeAVqIb-.js";
|
|
6
|
+
import { t as re } from "./defaultLabels-CsRGNP7f.js";
|
|
7
|
+
import { t as ie } from "./portal-D-oaEWsY.js";
|
|
8
|
+
import { n as p, t as m } from "./floatingPosition-XIv5DYuP.js";
|
|
9
|
+
import { t as ae } from "./Grid-kuP6V0GW.js";
|
|
10
|
+
import { t as h } from "./EmptyState-CMFePII9.js";
|
|
11
|
+
import { a as g, o as _, r as v, t as y } from "./to-event-card-props-Dn1eDOiJ.js";
|
|
12
|
+
import "svelte/internal/disclose-version";
|
|
13
|
+
import * as b from "svelte/internal/client";
|
|
14
|
+
import { SvelteMap as oe } from "svelte/reactivity";
|
|
15
|
+
import { onDestroy as x, onMount as S } from "svelte";
|
|
16
|
+
//#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/ChevronLeftOutline.svelte
|
|
17
|
+
var C = b.from_svg("<svg aria-hidden=\"true\" fill=\"none\" stroke-width=\"2\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M15.75 19.5L8.25 12l7.5-7.5\"></path></svg>");
|
|
18
|
+
function w(e, t) {
|
|
19
|
+
let n = b.prop(t, "size", 3, "24"), r = b.prop(t, "color", 3, "currentColor"), i = b.prop(t, "class", 3, "");
|
|
20
|
+
var a = C();
|
|
21
|
+
b.template_effect(() => {
|
|
22
|
+
b.set_class(a, 0, b.clsx(i())), b.set_attribute(a, "width", n()), b.set_attribute(a, "height", n()), b.set_attribute(a, "stroke", r());
|
|
23
|
+
}), b.append(e, a);
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/ChevronRightOutline.svelte
|
|
27
|
+
var se = b.from_svg("<svg aria-hidden=\"true\" fill=\"none\" stroke-width=\"2\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M8.25 4.5l7.5 7.5-7.5 7.5\"></path></svg>");
|
|
28
|
+
function ce(e, t) {
|
|
29
|
+
let n = b.prop(t, "size", 3, "24"), r = b.prop(t, "color", 3, "currentColor"), i = b.prop(t, "class", 3, "");
|
|
30
|
+
var a = se();
|
|
31
|
+
b.template_effect(() => {
|
|
32
|
+
b.set_class(a, 0, b.clsx(i())), b.set_attribute(a, "width", n()), b.set_attribute(a, "height", n()), b.set_attribute(a, "stroke", r());
|
|
33
|
+
}), b.append(e, a);
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/SearchIcon.svelte
|
|
37
|
+
var T = b.from_svg("<path d=\"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z\"></path>"), E = b.from_svg("<circle cx=\"112\" cy=\"112\" r=\"80\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"></circle><line x1=\"168.57\" y1=\"168.57\" x2=\"224\" y2=\"224\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"></line>", 1), le = b.from_svg("<svg aria-hidden=\"true\" viewBox=\"0 0 256 256\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><!></svg>");
|
|
38
|
+
function ue(e, t) {
|
|
39
|
+
b.push(t, !0);
|
|
40
|
+
let n = b.prop(t, "size", 3, "24"), r = b.prop(t, "color", 3, "currentColor"), i = b.prop(t, "class", 3, ""), a = f(), o = b.derived(() => t.weight ?? a?.weight ?? "regular");
|
|
41
|
+
var s = le();
|
|
42
|
+
let c;
|
|
43
|
+
var l = b.child(s), u = (e) => {
|
|
44
|
+
var t = T();
|
|
45
|
+
b.append(e, t);
|
|
46
|
+
}, d = (e) => {
|
|
47
|
+
var t = E();
|
|
48
|
+
b.next(), b.append(e, t);
|
|
49
|
+
};
|
|
50
|
+
b.if(l, (e) => {
|
|
51
|
+
b.get(o) === "fill" ? e(u) : e(d, -1);
|
|
52
|
+
}), b.reset(s), b.template_effect(() => {
|
|
53
|
+
b.set_class(s, 0, b.clsx(i())), b.set_attribute(s, "width", n()), b.set_attribute(s, "height", n()), c = b.set_style(s, "", c, { color: r() === "currentColor" ? void 0 : r() });
|
|
54
|
+
}), b.append(e, s), b.pop();
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region node_modules/@getmicdrop/svelte-components/dist/utils/clickOutside.js
|
|
58
|
+
function D(e, t) {
|
|
59
|
+
let n = (t) => {
|
|
60
|
+
if (e.contains(t)) return !0;
|
|
61
|
+
let n = /* @__PURE__ */ new Set();
|
|
62
|
+
for (let r = t; r;) {
|
|
63
|
+
let t = p(r);
|
|
64
|
+
if (t && !n.has(t)) {
|
|
65
|
+
if (e.contains(t)) return !0;
|
|
66
|
+
n.add(t), r = t;
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
r = r.parentElement;
|
|
70
|
+
}
|
|
71
|
+
return !1;
|
|
72
|
+
}, r = (e) => {
|
|
73
|
+
n(e.target) || t();
|
|
74
|
+
};
|
|
75
|
+
return document.addEventListener("mousedown", r, !0), { destroy() {
|
|
76
|
+
document.removeEventListener("mousedown", r, !0);
|
|
77
|
+
} };
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region node_modules/@getmicdrop/svelte-components/dist/primitives/Popover/Popover.svelte
|
|
81
|
+
var de = b.from_html("<div role=\"dialog\" data-popover-panel=\"\"><!></div>"), fe = b.from_html("<div class=\"relative inline-block\"><!> <!></div>");
|
|
82
|
+
function O(e, t) {
|
|
83
|
+
b.push(t, !0);
|
|
84
|
+
let r = b.prop(t, "open", 15, !1), i = b.prop(t, "placement", 3, "bottom-end"), a = b.prop(t, "class", 3, ""), o = b.state(void 0), s = b.state(void 0), c = b.derived(() => /(?:^|[\s:!])-?z-/.test(a())), l = b.derived(() => b.get(c) ? void 0 : te.modalContent);
|
|
85
|
+
function u() {
|
|
86
|
+
b.get(c) && b.get(s) && (b.get(s).style.zIndex = "");
|
|
87
|
+
}
|
|
88
|
+
let d = {
|
|
89
|
+
bottom: "top",
|
|
90
|
+
top: "bottom",
|
|
91
|
+
left: "right",
|
|
92
|
+
right: "left"
|
|
93
|
+
}, ee = {
|
|
94
|
+
start: "left",
|
|
95
|
+
end: "right"
|
|
96
|
+
}, f = b.state(void 0), re = b.derived(() => {
|
|
97
|
+
let [e, t = "start"] = (b.get(f) ?? i()).split("-"), n = d[e] ?? "top";
|
|
98
|
+
return e === "top" || e === "bottom" ? `${n} ${ee[t] ?? "left"}` : `${n} ${t === "end" ? "bottom" : "top"}`;
|
|
99
|
+
});
|
|
100
|
+
function p() {
|
|
101
|
+
r() && (r(!1), t.onclose?.());
|
|
102
|
+
}
|
|
103
|
+
function ae() {
|
|
104
|
+
r(!r()), r() || t.onclose?.();
|
|
105
|
+
}
|
|
106
|
+
function h(e) {
|
|
107
|
+
!r() || e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(), p());
|
|
108
|
+
}
|
|
109
|
+
S(() => {
|
|
110
|
+
document.addEventListener("keydown", h);
|
|
111
|
+
}), x(() => {
|
|
112
|
+
typeof document < "u" && document.removeEventListener("keydown", h);
|
|
113
|
+
});
|
|
114
|
+
var g = fe(), _ = b.child(g);
|
|
115
|
+
b.snippet(_, () => t.trigger, () => ({
|
|
116
|
+
toggle: ae,
|
|
117
|
+
open: r()
|
|
118
|
+
}));
|
|
119
|
+
var v = b.sibling(_, 2), y = (e) => {
|
|
120
|
+
var r = de();
|
|
121
|
+
let c;
|
|
122
|
+
var d = b.child(r);
|
|
123
|
+
b.snippet(d, () => t.children), b.reset(r), b.bind_this(r, (e) => b.set(s, e), () => b.get(s)), b.action(r, (e, t) => m?.(e, t), () => ({
|
|
124
|
+
reference: b.get(o),
|
|
125
|
+
placement: i(),
|
|
126
|
+
offset: 4,
|
|
127
|
+
layer: "modalContent",
|
|
128
|
+
onComputed: ({ placement: e }) => {
|
|
129
|
+
b.set(f, e, !0), u();
|
|
130
|
+
}
|
|
131
|
+
})), b.action(r, (e) => ie?.(e)), b.template_effect((e) => {
|
|
132
|
+
b.set_class(r, 1, e), b.set_attribute(r, "aria-label", t.ariaLabel), c = b.set_style(r, "", c, { "z-index": b.get(l) });
|
|
133
|
+
}, [() => b.clsx(n("rounded-lg border border-border bg-popover text-popover-foreground shadow-lg", a()))]), b.transition(3, r, () => ne, () => ({ origin: b.get(re) })), b.append(e, r);
|
|
134
|
+
};
|
|
135
|
+
b.if(v, (e) => {
|
|
136
|
+
r() && e(y);
|
|
137
|
+
}), b.reset(g), b.bind_this(g, (e) => b.set(o, e), () => b.get(o)), b.action(g, (e, t) => D?.(e, t), () => p), b.append(e, g), b.pop();
|
|
138
|
+
}
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region src/components/Calendar/Calendar.svelte
|
|
141
|
+
var pe = b.from_html("<div style=\"display:contents\" data-testid=\"calendar-event\"><!></div>"), me = b.from_html("<div role=\"gridcell\"><div> </div> <!></div>"), he = b.from_html("<div class=\"month-grid svelte-1twddf5\" role=\"grid\"></div>"), ge = b.from_html("<div> </div>"), _e = b.from_html("<button type=\"button\" data-testid=\"calendar-day\"><span> </span></button>"), ve = b.from_html("<div class=\"mini-grid svelte-1twddf5\" role=\"grid\"></div>"), ye = b.from_html("<li class=\"list-none\"><!></li>"), be = b.from_html("<div class=\"hidden lg:block calendar-swipe-host svelte-1twddf5\"><div class=\"dow-row svelte-1twddf5\" aria-hidden=\"true\"></div> <div class=\"swipe-viewport svelte-1twddf5\"><div><!> <!> <!></div></div></div> <div class=\"lg:hidden calendar-swipe-host svelte-1twddf5\"><div class=\"dow-row svelte-1twddf5\" aria-hidden=\"true\"></div> <div class=\"swipe-viewport svelte-1twddf5\"><div><!> <!> <!></div></div> <div class=\"mt-4\" data-testid=\"calendar-month-list\"><!></div></div>", 1);
|
|
142
|
+
function k(n, f) {
|
|
143
|
+
b.push(f, !0), b.prop(f, "isScheduledBtn", 3, !1), b.prop(f, "eventCalendar", 3, !1), b.prop(f, "embedCalendar", 3, !1);
|
|
144
|
+
let te = b.prop(f, "currentYear", 19, () => l().getFullYear()), ne = b.prop(f, "currentMonth", 19, () => l().getMonth()), ie = b.prop(f, "currentevents", 19, () => []);
|
|
145
|
+
b.prop(f, "showPartialPreview", 3, !0);
|
|
146
|
+
let p = b.prop(f, "labels", 3, re), m = b.prop(f, "locale", 3, "en-US"), x = b.prop(f, "eventDetails", 3, null), S = b.prop(f, "size", 3, "M"), C = b.prop(f, "posterFit", 3, "fit"), w = b.prop(f, "posterBackdrop", 3, "blur"), se = b.derived(te), ce = b.derived(ne), T = s(l()), E = b.derived(() => o(b.get(se), b.get(ce), 1)), le = b.derived(() => c(b.get(E), {
|
|
147
|
+
month: "long",
|
|
148
|
+
year: "numeric"
|
|
149
|
+
}, m())), ue = b.derived(() => {
|
|
150
|
+
let e = new Intl.DateTimeFormat(m(), { weekday: "short" }), t = new Intl.DateTimeFormat(m(), { weekday: "narrow" });
|
|
151
|
+
return ee(l()).map((n) => ({
|
|
152
|
+
short: e.format(n),
|
|
153
|
+
narrow: t.format(n)
|
|
154
|
+
}));
|
|
155
|
+
});
|
|
156
|
+
function D(e, t) {
|
|
157
|
+
return d(e.getFullYear(), e.getMonth()).map(({ day: e, inMonth: n, isToday: r }) => {
|
|
158
|
+
let i = s(e);
|
|
159
|
+
return {
|
|
160
|
+
localDay: e,
|
|
161
|
+
day: e.getDate(),
|
|
162
|
+
date: i,
|
|
163
|
+
groupedEvents: n ? g(t.get(i) ?? []) : [],
|
|
164
|
+
isOutsideMonth: !n,
|
|
165
|
+
isPast: i < T,
|
|
166
|
+
isToday: n && r
|
|
167
|
+
};
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
function de(e) {
|
|
171
|
+
return e.instances.every((e) => v(e)?.type === "past");
|
|
172
|
+
}
|
|
173
|
+
function fe(e) {
|
|
174
|
+
return e.groupedEvents.some((e) => !de(e));
|
|
175
|
+
}
|
|
176
|
+
let O = b.derived(() => {
|
|
177
|
+
let e = new oe();
|
|
178
|
+
for (let t of ie()) v(t)?.type !== "cancelled" && (e.has(t.date) || e.set(t.date, []), e.get(t.date).push(t));
|
|
179
|
+
return e;
|
|
180
|
+
}), k = b.derived(() => D(b.get(E), b.get(O))), xe = b.derived(() => D(u(b.get(E), -1), b.get(O))), Se = b.derived(() => D(u(b.get(E), 1), b.get(O))), A = b.state(0), j = b.state(0), M = 0, Ce = 0, N = 0, P = 0, F = 0, I = b.state(!1), L = b.state(0), R = b.state(!1), z = b.state(!1), B = null, V = b.state(!1), H = b.state(null), U = b.state(null);
|
|
181
|
+
function we() {
|
|
182
|
+
return b.get(H)?.offsetWidth || b.get(U)?.offsetWidth || 320;
|
|
183
|
+
}
|
|
184
|
+
b.user_effect(() => {
|
|
185
|
+
if (typeof window > "u") return;
|
|
186
|
+
let e = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
187
|
+
b.set(V, e.matches, !0);
|
|
188
|
+
let t = (e) => b.set(V, e.matches, !0);
|
|
189
|
+
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
190
|
+
});
|
|
191
|
+
function Te(e, t, n) {
|
|
192
|
+
if (b.get(z)) {
|
|
193
|
+
t?.();
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
if (b.get(V)) {
|
|
197
|
+
t?.();
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
b.set(z, !0);
|
|
201
|
+
let r = n || we();
|
|
202
|
+
b.set(L, e === 1 ? -r : r, !0), B = window.setTimeout(() => {
|
|
203
|
+
B = null, b.set(R, !0), requestAnimationFrame(() => {
|
|
204
|
+
t?.(), b.set(L, 0), b.set(z, !1), requestAnimationFrame(() => {
|
|
205
|
+
b.set(R, !1);
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
}, 320);
|
|
209
|
+
}
|
|
210
|
+
async function Ee(e, t) {
|
|
211
|
+
Te(e, t);
|
|
212
|
+
}
|
|
213
|
+
function De(e) {
|
|
214
|
+
b.get(z) && (B !== null && (clearTimeout(B), B = null), b.set(z, !1), b.set(R, !1)), M = e.touches[0].clientX, Ce = e.touches[0].clientY, N = M, P = e.timeStamp, F = 0, b.set(I, !1), b.set(L, 0);
|
|
215
|
+
}
|
|
216
|
+
function Oe(e) {
|
|
217
|
+
if (!M || b.get(z)) return;
|
|
218
|
+
let t = e.touches[0].clientX, n = e.touches[0].clientY, r = M - t, i = Ce - n, a = e.timeStamp;
|
|
219
|
+
if (!b.get(I) && Math.abs(r) > 10) {
|
|
220
|
+
if (Math.abs(r) > Math.abs(i)) b.set(I, !0);
|
|
221
|
+
else {
|
|
222
|
+
M = 0;
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
if (b.get(I)) {
|
|
227
|
+
e.preventDefault();
|
|
228
|
+
let n = a - P;
|
|
229
|
+
n > 0 && (F = (N - t) / n), N = t, P = a, b.set(L, -r * .95);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
function W(t) {
|
|
233
|
+
if (!M || !b.get(I) || b.get(z)) {
|
|
234
|
+
M = 0, b.set(I, !1);
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
let n = t.currentTarget?.offsetWidth || we(), r = Math.abs(b.get(L)) / n > .08, i = Math.abs(F) > .2, a = b.get(L) > 0 ? -1 : 1;
|
|
238
|
+
r || i ? (e("medium"), Te(a, () => a === 1 ? f.onswipeNext?.() : f.onswipePrev?.(), n)) : b.set(L, 0), M = 0, b.set(I, !1), F = 0;
|
|
239
|
+
}
|
|
240
|
+
let G = b.state(""), K = b.state("");
|
|
241
|
+
function ke(e) {
|
|
242
|
+
let n = [
|
|
243
|
+
"ArrowLeft",
|
|
244
|
+
"ArrowRight",
|
|
245
|
+
"ArrowUp",
|
|
246
|
+
"ArrowDown"
|
|
247
|
+
].includes(e.key), r = t(e);
|
|
248
|
+
if (!n && !r || !b.get(K)) return;
|
|
249
|
+
let i = b.get(k).findIndex((e) => e.date === b.get(K));
|
|
250
|
+
if (i === -1) return;
|
|
251
|
+
if (r) {
|
|
252
|
+
e.preventDefault();
|
|
253
|
+
let t = b.get(k)[i];
|
|
254
|
+
fe(t) && (b.set(G, t.date, !0), f.ondaySelect?.({
|
|
255
|
+
date: t.date,
|
|
256
|
+
events: t.groupedEvents
|
|
257
|
+
}));
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
let a = i;
|
|
261
|
+
e.key === "ArrowLeft" ? a = i - 1 : e.key === "ArrowRight" ? a = i + 1 : e.key === "ArrowUp" ? a = i - 7 : e.key === "ArrowDown" && (a = i + 7), !(a < 0 || a >= b.get(k).length) && (e.preventDefault(), b.set(K, b.get(k)[a].date, !0), queueMicrotask(() => {
|
|
262
|
+
document.querySelector(`[data-current-page] [data-cell-date="${b.get(k)[a].date}"]`)?.focus();
|
|
263
|
+
}));
|
|
264
|
+
}
|
|
265
|
+
b.user_effect(() => {
|
|
266
|
+
if (b.get(K) && b.get(k).some((e) => e.date === b.get(K))) return;
|
|
267
|
+
if (b.get(q) && b.get(k).some((e) => e.date === b.get(q))) {
|
|
268
|
+
b.set(K, b.get(q), !0);
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
let e = b.get(k).find((e) => e.isToday);
|
|
272
|
+
if (e) {
|
|
273
|
+
b.set(K, e.date, !0);
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
let t = b.get(k).find((e) => !e.isOutsideMonth && e.groupedEvents.length > 0);
|
|
277
|
+
if (t) {
|
|
278
|
+
b.set(K, t.date, !0);
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
let n = b.get(k).find((e) => !e.isOutsideMonth);
|
|
282
|
+
n && b.set(K, n.date, !0);
|
|
283
|
+
});
|
|
284
|
+
function Ae(e) {
|
|
285
|
+
return !!e && b.get(k).some((t) => t.date === e && !t.isOutsideMonth);
|
|
286
|
+
}
|
|
287
|
+
let q = b.derived(() => Ae(b.get(G)) ? b.get(G) : Ae(T) ? T : ""), je = b.derived(() => !!b.get(G) && b.get(q) === b.get(G)), Me = b.derived(() => b.get(je) ? g(b.get(O).get(b.get(G)) ?? []) : b.get(k).filter((e) => !e.isOutsideMonth && e.date >= T).flatMap((e) => e.groupedEvents));
|
|
288
|
+
var Ne = { animateMonthTransition: Ee }, Pe = be(), J = b.first_child(Pe);
|
|
289
|
+
{
|
|
290
|
+
let e = (e, t = b.noop, n = b.noop, r = b.noop) => {
|
|
291
|
+
var a = he();
|
|
292
|
+
b.each(a, 21, t, (e) => `${e.date}|${e.isOutsideMonth ? "O" : "I"}`, (e, t) => {
|
|
293
|
+
var n = me();
|
|
294
|
+
let r;
|
|
295
|
+
var a = b.child(n), o = b.child(a, !0);
|
|
296
|
+
b.reset(a);
|
|
297
|
+
var s = b.sibling(a, 2);
|
|
298
|
+
b.each(s, 17, () => b.get(t).groupedEvents, (e) => e.event.eventID, (e, t) => {
|
|
299
|
+
let n = b.derived(() => {
|
|
300
|
+
let { pillEvents: e, ...n } = y(b.get(t), p(), m(), x(), {
|
|
301
|
+
posterFit: C(),
|
|
302
|
+
posterBackdrop: w()
|
|
303
|
+
});
|
|
304
|
+
return {
|
|
305
|
+
pillEvents: e,
|
|
306
|
+
card: n
|
|
307
|
+
};
|
|
308
|
+
}), r = b.derived(() => de(b.get(t)));
|
|
309
|
+
var i = pe(), a = b.child(i);
|
|
310
|
+
{
|
|
311
|
+
let e = b.derived(() => b.get(r) ? [] : b.get(n).card.pills);
|
|
312
|
+
_(a, b.spread_props({ pillVariant: "primary" }, () => b.get(n).card, {
|
|
313
|
+
get pills() {
|
|
314
|
+
return b.get(e);
|
|
315
|
+
},
|
|
316
|
+
layout: "micro",
|
|
317
|
+
density: "micro",
|
|
318
|
+
hideDate: !0,
|
|
319
|
+
onclick: () => f.oneventClick?.(b.get(t).event),
|
|
320
|
+
onpillclick: (e) => f.oneventClick?.(b.get(n).pillEvents[e] ?? b.get(t).event)
|
|
321
|
+
}));
|
|
322
|
+
}
|
|
323
|
+
b.reset(i), b.template_effect(() => i.inert = b.get(r)), b.append(e, i);
|
|
324
|
+
}), b.reset(n), b.template_effect(() => {
|
|
325
|
+
r = b.set_class(n, 1, "day-cell svelte-1twddf5", null, r, {
|
|
326
|
+
"day-cell--outside": b.get(t).isOutsideMonth,
|
|
327
|
+
"day-cell--past": b.get(t).isPast,
|
|
328
|
+
"day-cell--today": b.get(t).isToday
|
|
329
|
+
}), b.set_class(a, 1, `day-num ${i.eyebrow ?? ""}`, "svelte-1twddf5"), b.set_text(o, b.get(t).day);
|
|
330
|
+
}), b.append(e, n);
|
|
331
|
+
}), b.reset(a), b.template_effect(() => b.set_attribute(a, "aria-label", n())), b.bind_element_size(a, "offsetHeight", (e) => {
|
|
332
|
+
r() && b.set(A, e, !0);
|
|
333
|
+
}), b.append(e, a);
|
|
334
|
+
};
|
|
335
|
+
var Y = b.child(J);
|
|
336
|
+
b.each(Y, 21, () => b.get(ue), b.index, (e, t) => {
|
|
337
|
+
var n = ge(), r = b.child(n, !0);
|
|
338
|
+
b.reset(n), b.template_effect(() => {
|
|
339
|
+
b.set_class(n, 1, `dow-cell ${i.eyebrow ?? ""}`, "svelte-1twddf5"), b.set_text(r, b.get(t).short);
|
|
340
|
+
}), b.append(e, n);
|
|
341
|
+
}), b.reset(Y);
|
|
342
|
+
var Fe = b.sibling(Y, 2);
|
|
343
|
+
let t;
|
|
344
|
+
var X = b.child(Fe);
|
|
345
|
+
let n, r;
|
|
346
|
+
var Ie = b.child(X);
|
|
347
|
+
e(Ie, () => b.get(xe), () => "prev", () => !1);
|
|
348
|
+
var Le = b.sibling(Ie, 2);
|
|
349
|
+
e(Le, () => b.get(k), () => b.get(le), () => !0), e(b.sibling(Le, 2), () => b.get(Se), () => "next", () => !1), b.reset(X), b.reset(Fe), b.reset(J), b.bind_this(J, (e) => b.set(H, e), () => b.get(H)), b.template_effect(() => {
|
|
350
|
+
t = b.set_style(Fe, "", t, { height: b.get(A) ? `${b.get(A)}px` : void 0 }), n = b.set_class(X, 1, "swipe-track svelte-1twddf5", null, n, {
|
|
351
|
+
"swipe-track--swiping": b.get(I),
|
|
352
|
+
"swipe-track--snapping": b.get(R)
|
|
353
|
+
}), r = b.set_style(X, "", r, { transform: `translate3d(calc(-100% / 3 + ${b.get(L) ?? ""}px), 0, 0)` });
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
var Z = b.sibling(J, 2);
|
|
357
|
+
{
|
|
358
|
+
let e = (e, t = b.noop, n = b.noop, o = b.noop) => {
|
|
359
|
+
var s = ve();
|
|
360
|
+
b.each(s, 21, t, (e) => `${e.date}|${e.isOutsideMonth ? "O" : "I"}`, (e, t) => {
|
|
361
|
+
let n = b.derived(() => fe(b.get(t))), s = b.derived(() => b.get(t).date === b.get(q));
|
|
362
|
+
var c = _e();
|
|
363
|
+
let l;
|
|
364
|
+
var u = b.child(c), d = b.child(u, !0);
|
|
365
|
+
b.reset(u), b.reset(c), b.template_effect(() => {
|
|
366
|
+
l = b.set_class(c, 1, `mini-cell ${i.label ?? ""} ${(b.get(s) ? a.heavy : b.get(n) ? a.strong : "") ?? ""}`, "svelte-1twddf5", l, {
|
|
367
|
+
"mini-cell--outside": b.get(t).isOutsideMonth,
|
|
368
|
+
"mini-cell--past": b.get(t).isPast,
|
|
369
|
+
"mini-cell--today": b.get(t).isToday,
|
|
370
|
+
"mini-cell--selected": b.get(s) && b.get(je),
|
|
371
|
+
"mini-cell--has-events": b.get(n)
|
|
372
|
+
}), b.set_attribute(c, "aria-disabled", !b.get(n)), b.set_attribute(c, "tabindex", o() && b.get(K) === b.get(t).date ? 0 : -1), b.set_attribute(c, "data-cell-date", b.get(t).date), b.set_attribute(c, "aria-label", `${b.get(t).day ?? ""} ${b.get(n) ? `· ${b.get(t).groupedEvents.length} event${b.get(t).groupedEvents.length === 1 ? "" : "s"}` : ""}`), b.set_attribute(c, "aria-pressed", b.get(s)), b.set_class(u, 1, `mini-day ${r.none ?? ""}`, "svelte-1twddf5"), b.set_text(d, b.get(t).day);
|
|
373
|
+
}), b.delegated("click", c, function(...e) {
|
|
374
|
+
(b.get(n) ? () => {
|
|
375
|
+
b.set(G, b.get(t).date, !0), b.set(K, b.get(t).date, !0), f.ondaySelect?.({
|
|
376
|
+
date: b.get(t).date,
|
|
377
|
+
events: b.get(t).groupedEvents
|
|
378
|
+
});
|
|
379
|
+
} : void 0)?.apply(this, e);
|
|
380
|
+
}), b.append(e, c);
|
|
381
|
+
}), b.reset(s), b.template_effect(() => {
|
|
382
|
+
b.set_attribute(s, "aria-label", n()), b.set_attribute(s, "data-current-page", o() ? "" : void 0);
|
|
383
|
+
}), b.bind_element_size(s, "offsetHeight", (e) => {
|
|
384
|
+
o() && b.set(j, e, !0);
|
|
385
|
+
}), b.append(e, s);
|
|
386
|
+
};
|
|
387
|
+
var Re = b.child(Z);
|
|
388
|
+
b.each(Re, 21, () => b.get(ue), b.index, (e, t) => {
|
|
389
|
+
var n = ge(), r = b.child(n, !0);
|
|
390
|
+
b.reset(n), b.template_effect(() => {
|
|
391
|
+
b.set_class(n, 1, `dow-cell ${i.eyebrow ?? ""}`, "svelte-1twddf5"), b.set_text(r, b.get(t).narrow);
|
|
392
|
+
}), b.append(e, n);
|
|
393
|
+
}), b.reset(Re);
|
|
394
|
+
var Q = b.sibling(Re, 2);
|
|
395
|
+
let t;
|
|
396
|
+
var $ = b.child(Q);
|
|
397
|
+
let n, o;
|
|
398
|
+
var ze = b.child($);
|
|
399
|
+
e(ze, () => b.get(xe), () => "prev", () => !1);
|
|
400
|
+
var Be = b.sibling(ze, 2);
|
|
401
|
+
e(Be, () => b.get(k), () => b.get(le), () => !0), e(b.sibling(Be, 2), () => b.get(Se), () => "next", () => !1), b.reset($), b.reset(Q);
|
|
402
|
+
var Ve = b.sibling(Q, 2), He = b.child(Ve), Ue = (e) => {
|
|
403
|
+
ae(e, {
|
|
404
|
+
cols: "1",
|
|
405
|
+
gap: "2",
|
|
406
|
+
as: "ul",
|
|
407
|
+
children: (e, t) => {
|
|
408
|
+
var n = b.comment(), r = b.first_child(n);
|
|
409
|
+
b.each(r, 17, () => b.get(Me), (e) => e.event.eventID, (e, t) => {
|
|
410
|
+
let n = b.derived(() => {
|
|
411
|
+
let { pillEvents: e, ...n } = y(b.get(t), p(), m(), x(), {
|
|
412
|
+
posterFit: C(),
|
|
413
|
+
posterBackdrop: w()
|
|
414
|
+
});
|
|
415
|
+
return {
|
|
416
|
+
pillEvents: e,
|
|
417
|
+
card: n
|
|
418
|
+
};
|
|
419
|
+
});
|
|
420
|
+
var r = ye(), i = b.child(r);
|
|
421
|
+
_(i, b.spread_props({ pillVariant: "primary" }, () => b.get(n).card, {
|
|
422
|
+
layout: "horizontal",
|
|
423
|
+
density: "compact",
|
|
424
|
+
get hideDate() {
|
|
425
|
+
return b.get(je);
|
|
426
|
+
},
|
|
427
|
+
onclick: () => f.oneventClick?.(b.get(t).event),
|
|
428
|
+
onpillclick: (e) => f.oneventClick?.(b.get(n).pillEvents[e] ?? b.get(t).event)
|
|
429
|
+
})), b.reset(r), b.append(e, r);
|
|
430
|
+
}), b.append(e, n);
|
|
431
|
+
},
|
|
432
|
+
$$slots: { default: !0 }
|
|
433
|
+
});
|
|
434
|
+
}, We = (e) => {
|
|
435
|
+
{
|
|
436
|
+
let t = b.derived(() => p().noUpcomingEvents || "No upcoming events");
|
|
437
|
+
h(e, { get message() {
|
|
438
|
+
return b.get(t);
|
|
439
|
+
} });
|
|
440
|
+
}
|
|
441
|
+
};
|
|
442
|
+
b.if(He, (e) => {
|
|
443
|
+
b.get(Me).length > 0 ? e(Ue) : e(We, -1);
|
|
444
|
+
}), b.reset(Ve), b.reset(Z), b.bind_this(Z, (e) => b.set(U, e), () => b.get(U)), b.template_effect(() => {
|
|
445
|
+
t = b.set_style(Q, "", t, { height: b.get(j) ? `${b.get(j)}px` : void 0 }), n = b.set_class($, 1, "swipe-track svelte-1twddf5", null, n, {
|
|
446
|
+
"swipe-track--swiping": b.get(I),
|
|
447
|
+
"swipe-track--snapping": b.get(R)
|
|
448
|
+
}), o = b.set_style($, "", o, { transform: `translate3d(calc(-100% / 3 + ${b.get(L) ?? ""}px), 0, 0)` });
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
return b.template_effect(() => {
|
|
452
|
+
b.set_attribute(J, "data-size", S()), b.set_attribute(Z, "data-size", S());
|
|
453
|
+
}), b.delegated("touchstart", J, De, void 0, !0), b.delegated("touchmove", J, Oe, void 0, !0), b.delegated("touchend", J, W), b.event("touchcancel", J, W), b.delegated("touchstart", Z, De, void 0, !0), b.delegated("touchmove", Z, Oe, void 0, !0), b.delegated("touchend", Z, W), b.event("touchcancel", Z, W), b.delegated("keydown", Z, ke), b.append(n, Pe), b.pop(Ne);
|
|
454
|
+
}
|
|
455
|
+
b.delegate([
|
|
456
|
+
"touchstart",
|
|
457
|
+
"touchmove",
|
|
458
|
+
"touchend",
|
|
459
|
+
"keydown",
|
|
460
|
+
"click"
|
|
461
|
+
]);
|
|
462
|
+
//#endregion
|
|
463
|
+
export { ce as a, ue as i, O as n, w as o, D as r, k as t };
|
|
@@ -2,7 +2,7 @@ import { n as e } from "./rolldown-runtime-DtPi1Y-2.js";
|
|
|
2
2
|
import { a as t, i as n, o as r, t as i } from "./Button-B58iYo_t.js";
|
|
3
3
|
import { a, n as o, o as s, r as c, s as l } from "./keyboard-DhCcdIyh.js";
|
|
4
4
|
import { a as u, d, f, g as p, h as m, m as h, n as g, p as _, r as v, s as y, u as b, v as x } from "./sizing-B7ixYndz.js";
|
|
5
|
-
import { a as S, i as C, n as w, o as T, r as E, t as D } from "./Calendar-
|
|
5
|
+
import { a as S, i as C, n as w, o as T, r as E, t as D } from "./Calendar-DFPyzgRC.js";
|
|
6
6
|
import { t as O } from "./ChevronDownOutline-D7YDiKBF.js";
|
|
7
7
|
import { n as k, t as A } from "./CloseIcon-DpRE5O8y.js";
|
|
8
8
|
import { t as j } from "./CloseOutline-qpVa62mu.js";
|