@getmicdrop/venue-calendar 3.4.7 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CarouselView.legacy-CQlC6l1Y.js → CarouselView.legacy-fAmsAKLi.js} +3 -3
- package/dist/{CarouselView.legacy-CQlC6l1Y.js.map → CarouselView.legacy-fAmsAKLi.js.map} +1 -1
- package/dist/{Checkout.legacy-CtMZcw12.js → Checkout.legacy-DqNypQ8O.js} +2 -2
- package/dist/{Checkout.legacy-CtMZcw12.js.map → Checkout.legacy-DqNypQ8O.js.map} +1 -1
- package/dist/{FeaturedView.legacy-CZsfv_H6.js → FeaturedView.legacy-BNysXCtk.js} +2 -2
- package/dist/{FeaturedView.legacy-CZsfv_H6.js.map → FeaturedView.legacy-BNysXCtk.js.map} +1 -1
- package/dist/GalleryCard-RBMkn3Va.js +92 -0
- package/dist/GalleryCard-RBMkn3Va.js.map +1 -0
- package/dist/{GalleryView.legacy-CWRwmSUM.js → GalleryView.legacy-BDKpD6lT.js} +3 -3
- package/dist/{GalleryView.legacy-CWRwmSUM.js.map → GalleryView.legacy-BDKpD6lT.js.map} +1 -1
- package/dist/{GroupedListView.legacy-CvSu64U2.js → GroupedListView.legacy-fL2kRm35.js} +2 -2
- package/dist/{GroupedListView.legacy-CvSu64U2.js.map → GroupedListView.legacy-fL2kRm35.js.map} +1 -1
- package/dist/{Success.legacy-BLqztss5.js → Success.legacy-D9MZwTCk.js} +2 -2
- package/dist/{Success.legacy-BLqztss5.js.map → Success.legacy-D9MZwTCk.js.map} +1 -1
- package/dist/{VenueCalendar-DoZ7VM4G.js → VenueCalendar-DsXtZNAR.js} +12032 -11343
- package/dist/VenueCalendar-DsXtZNAR.js.map +1 -0
- package/dist/seo/HostSeoController.d.ts +59 -0
- package/dist/seo/buildCollectionJsonLd.d.ts +7 -0
- package/dist/seo/buildEventJsonLd.d.ts +9 -0
- package/dist/seo/buildSeriesJsonLd.d.ts +6 -0
- package/dist/seo/helpers.d.ts +40 -0
- package/dist/seo/index.d.ts +9 -0
- package/dist/seo/seo.cjs +2 -0
- package/dist/seo/seo.cjs.map +1 -0
- package/dist/seo/seo.mjs +460 -0
- package/dist/seo/seo.mjs.map +1 -0
- package/dist/seo/types.d.ts +135 -0
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +2 -2
- package/dist/venue-calendar.iife.js +33 -33
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +33 -33
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +10 -3
- package/dist/GalleryCard-BGMUX0Hm.js +0 -87
- package/dist/GalleryCard-BGMUX0Hm.js.map +0 -1
- package/dist/VenueCalendar-DoZ7VM4G.js.map +0 -1
package/dist/seo/seo.mjs
ADDED
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
function p(s, e) {
|
|
2
|
+
if (!s) return null;
|
|
3
|
+
const t = new Date(s);
|
|
4
|
+
if (isNaN(t.getTime())) return null;
|
|
5
|
+
const r = new Intl.DateTimeFormat("en-US", {
|
|
6
|
+
timeZone: e,
|
|
7
|
+
year: "numeric",
|
|
8
|
+
month: "2-digit",
|
|
9
|
+
day: "2-digit",
|
|
10
|
+
hour: "2-digit",
|
|
11
|
+
minute: "2-digit",
|
|
12
|
+
second: "2-digit",
|
|
13
|
+
hour12: !1,
|
|
14
|
+
timeZoneName: "shortOffset"
|
|
15
|
+
}).formatToParts(t), o = (f) => r.find((y) => y.type === f)?.value || "", c = o("year"), l = o("month"), i = o("day"), a = o("hour"), u = o("minute"), m = o("second"), g = o("timeZoneName");
|
|
16
|
+
let d = "+00:00";
|
|
17
|
+
if (g) {
|
|
18
|
+
const f = g.match(/GMT([+-])(\d+)(?::(\d+))?/);
|
|
19
|
+
if (f) {
|
|
20
|
+
const y = f[1], D = f[2].padStart(2, "0"), T = f[3] || "00";
|
|
21
|
+
d = `${y}${D}:${T}`;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return `${c}-${l}-${i}T${a}:${u}:${m}${d}`;
|
|
25
|
+
}
|
|
26
|
+
function N(s) {
|
|
27
|
+
if (!s) return null;
|
|
28
|
+
const e = s.split(",").map((r) => r.trim());
|
|
29
|
+
if (e.length < 2)
|
|
30
|
+
return {
|
|
31
|
+
"@type": "PostalAddress",
|
|
32
|
+
streetAddress: s,
|
|
33
|
+
addressCountry: "US"
|
|
34
|
+
};
|
|
35
|
+
const n = e[e.length - 1].match(/^([A-Z]{2})\s+(\d{5}(?:-\d{4})?)$/);
|
|
36
|
+
return n && e.length >= 3 ? {
|
|
37
|
+
"@type": "PostalAddress",
|
|
38
|
+
streetAddress: e.slice(0, -2).join(", "),
|
|
39
|
+
addressLocality: e[e.length - 2],
|
|
40
|
+
addressRegion: n[1],
|
|
41
|
+
postalCode: n[2],
|
|
42
|
+
addressCountry: "US"
|
|
43
|
+
} : {
|
|
44
|
+
"@type": "PostalAddress",
|
|
45
|
+
streetAddress: e[0],
|
|
46
|
+
addressLocality: e.slice(1).join(", "),
|
|
47
|
+
addressCountry: "US"
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function _(s) {
|
|
51
|
+
if (!s) return "https://schema.org/EventScheduled";
|
|
52
|
+
const e = s.toLowerCase();
|
|
53
|
+
return e === "cancelled" || e === "canceled" ? "https://schema.org/EventCancelled" : e === "postponed" ? "https://schema.org/EventPostponed" : e === "rescheduled" ? "https://schema.org/EventRescheduled" : "https://schema.org/EventScheduled";
|
|
54
|
+
}
|
|
55
|
+
function b(s) {
|
|
56
|
+
if ((s.remainingCapacity ?? s.quantityRemaining ?? s.quantity) === 0 || s.soldOut)
|
|
57
|
+
return "https://schema.org/SoldOut";
|
|
58
|
+
const t = /* @__PURE__ */ new Date(), n = s.salesBegin || s.salesStart || s.saleBegin || s.onSaleStart, r = s.salesEnd || s.saleEnd || s.onSaleEnd;
|
|
59
|
+
return n && new Date(n) > t ? "https://schema.org/PreOrder" : r && new Date(r) < t ? "https://schema.org/SoldOut" : "https://schema.org/InStock";
|
|
60
|
+
}
|
|
61
|
+
function E(s, e) {
|
|
62
|
+
if (!s || s.length === 0) return null;
|
|
63
|
+
const t = s.filter((l) => {
|
|
64
|
+
const i = l.visibility ?? 0, a = i === 0 || i === 1, u = l.salesChannel !== 2;
|
|
65
|
+
return a && u;
|
|
66
|
+
});
|
|
67
|
+
if (t.length === 0) return null;
|
|
68
|
+
const n = t.map((l) => parseFloat(String(l.price ?? 0))).filter((l) => !isNaN(l));
|
|
69
|
+
if (n.length === 0) return null;
|
|
70
|
+
const r = Math.min(...n), o = Math.max(...n);
|
|
71
|
+
if (r !== o)
|
|
72
|
+
return {
|
|
73
|
+
"@type": "AggregateOffer",
|
|
74
|
+
lowPrice: r,
|
|
75
|
+
highPrice: o,
|
|
76
|
+
priceCurrency: "USD",
|
|
77
|
+
availability: b(t[0]),
|
|
78
|
+
url: e || void 0,
|
|
79
|
+
validFrom: t[0]?.salesBegin || t[0]?.salesStart || void 0
|
|
80
|
+
};
|
|
81
|
+
const c = t[0];
|
|
82
|
+
return {
|
|
83
|
+
"@type": "Offer",
|
|
84
|
+
price: r,
|
|
85
|
+
priceCurrency: "USD",
|
|
86
|
+
availability: b(c),
|
|
87
|
+
url: e || void 0,
|
|
88
|
+
validFrom: c?.salesBegin || c?.salesStart || void 0
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function I(s) {
|
|
92
|
+
if (!s || s.length === 0) return null;
|
|
93
|
+
const e = s.filter((t) => {
|
|
94
|
+
const n = t.acceptedState === 2, r = !t.shouldBeHidden, o = t.RosterPerformer?.User?.performerProfile, c = o?.firstName || o?.lastName || o?.displayName;
|
|
95
|
+
return n && r && c;
|
|
96
|
+
});
|
|
97
|
+
return e.length === 0 ? null : e.map((t) => {
|
|
98
|
+
const n = t.RosterPerformer?.User?.performerProfile;
|
|
99
|
+
return {
|
|
100
|
+
"@type": "PerformingGroup",
|
|
101
|
+
name: n?.displayName || [n?.firstName, n?.lastName].filter(Boolean).join(" ")
|
|
102
|
+
};
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
function P(s) {
|
|
106
|
+
const {
|
|
107
|
+
event: e,
|
|
108
|
+
venue: t,
|
|
109
|
+
venueTimeZone: n = "America/Los_Angeles",
|
|
110
|
+
eventUrl: r,
|
|
111
|
+
organizer: o
|
|
112
|
+
} = s;
|
|
113
|
+
if (!e) return null;
|
|
114
|
+
const c = t?.address || t?.googleLocationNameCache || "", l = p(e.startDateTime, n);
|
|
115
|
+
if (!e.name || !l || !t?.name)
|
|
116
|
+
return null;
|
|
117
|
+
const i = {
|
|
118
|
+
"@context": "https://schema.org",
|
|
119
|
+
"@type": "Event",
|
|
120
|
+
name: e.name,
|
|
121
|
+
startDate: l,
|
|
122
|
+
eventStatus: _(e.status),
|
|
123
|
+
location: {
|
|
124
|
+
"@type": "Place",
|
|
125
|
+
name: t.name,
|
|
126
|
+
address: N(c)
|
|
127
|
+
}
|
|
128
|
+
}, a = p(e.endDateTime, n);
|
|
129
|
+
a && (i.endDate = a);
|
|
130
|
+
const u = e.description || e.eventSummary;
|
|
131
|
+
u && (i.description = u);
|
|
132
|
+
const m = e.image || e.coverImage || e.ShowImage;
|
|
133
|
+
m && (i.image = [m]);
|
|
134
|
+
const g = E(e.availableTickets, r);
|
|
135
|
+
g && (i.offers = g);
|
|
136
|
+
const d = I(e.performers);
|
|
137
|
+
if (d && d.length > 0 && (i.performer = d), o?.name) {
|
|
138
|
+
const f = {
|
|
139
|
+
"@type": "Organization",
|
|
140
|
+
name: o.name
|
|
141
|
+
};
|
|
142
|
+
o.url && (f.url = o.url), i.organizer = f;
|
|
143
|
+
}
|
|
144
|
+
return r && (i.url = r), i;
|
|
145
|
+
}
|
|
146
|
+
function S(s) {
|
|
147
|
+
switch (s) {
|
|
148
|
+
case "available":
|
|
149
|
+
return "https://schema.org/InStock";
|
|
150
|
+
case "sold_out":
|
|
151
|
+
return "https://schema.org/SoldOut";
|
|
152
|
+
case "coming_soon":
|
|
153
|
+
return "https://schema.org/PreOrder";
|
|
154
|
+
case "ended":
|
|
155
|
+
return "https://schema.org/SoldOut";
|
|
156
|
+
default:
|
|
157
|
+
return "https://schema.org/InStock";
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
function L(s, e) {
|
|
161
|
+
if (!s || s.length === 0) return null;
|
|
162
|
+
const t = s.filter(
|
|
163
|
+
(c) => c.status !== "sold_out" && c.status !== "ended"
|
|
164
|
+
);
|
|
165
|
+
if (t.length === 0) {
|
|
166
|
+
const c = s.map((a) => a.price).filter((a) => !isNaN(a));
|
|
167
|
+
if (c.length === 0) return null;
|
|
168
|
+
const l = Math.min(...c), i = Math.max(...c);
|
|
169
|
+
return l !== i ? {
|
|
170
|
+
"@type": "AggregateOffer",
|
|
171
|
+
lowPrice: l,
|
|
172
|
+
highPrice: i,
|
|
173
|
+
priceCurrency: "USD",
|
|
174
|
+
availability: "https://schema.org/SoldOut"
|
|
175
|
+
} : {
|
|
176
|
+
"@type": "Offer",
|
|
177
|
+
price: l,
|
|
178
|
+
priceCurrency: "USD",
|
|
179
|
+
availability: "https://schema.org/SoldOut"
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
const n = t.map((c) => c.price).filter((c) => !isNaN(c));
|
|
183
|
+
if (n.length === 0) return null;
|
|
184
|
+
const r = Math.min(...n), o = Math.max(...n);
|
|
185
|
+
return r !== o ? {
|
|
186
|
+
"@type": "AggregateOffer",
|
|
187
|
+
lowPrice: r,
|
|
188
|
+
highPrice: o,
|
|
189
|
+
priceCurrency: "USD",
|
|
190
|
+
availability: S(t[0].status)
|
|
191
|
+
} : {
|
|
192
|
+
"@type": "Offer",
|
|
193
|
+
price: r,
|
|
194
|
+
priceCurrency: "USD",
|
|
195
|
+
availability: S(t[0].status)
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
function U(s) {
|
|
199
|
+
const { series: e, baseEventUrl: t } = s;
|
|
200
|
+
if (!e.title || !e.occurrences || e.occurrences.length === 0 || !e.venue?.name) return null;
|
|
201
|
+
const n = N(e.venue.googleLocationNameCache || ""), r = {
|
|
202
|
+
"@type": "Place",
|
|
203
|
+
name: e.venue.name
|
|
204
|
+
};
|
|
205
|
+
n && (r.address = n);
|
|
206
|
+
const o = {
|
|
207
|
+
"@context": "https://schema.org",
|
|
208
|
+
"@type": "EventSeries",
|
|
209
|
+
name: e.title,
|
|
210
|
+
location: r
|
|
211
|
+
}, c = e.description || e.eventSummary;
|
|
212
|
+
c && (o.description = c), e.image && (o.image = [e.image]);
|
|
213
|
+
const l = e.performers?.filter((a) => a.displayName);
|
|
214
|
+
l && l.length > 0 && (o.performer = l.map((a) => ({
|
|
215
|
+
"@type": "PerformingGroup",
|
|
216
|
+
name: a.displayName
|
|
217
|
+
})));
|
|
218
|
+
const i = [];
|
|
219
|
+
for (const a of e.occurrences) {
|
|
220
|
+
const u = p(a.startDateTime, e.timeZone);
|
|
221
|
+
if (!u) continue;
|
|
222
|
+
const m = {
|
|
223
|
+
"@type": "Event",
|
|
224
|
+
name: a.title,
|
|
225
|
+
startDate: u,
|
|
226
|
+
eventStatus: _(a.status),
|
|
227
|
+
location: r
|
|
228
|
+
};
|
|
229
|
+
t && (m["@id"] = `${t}/${a.id}-${a.slug}`);
|
|
230
|
+
const g = p(a.endDateTime, e.timeZone);
|
|
231
|
+
g && (m.endDate = g);
|
|
232
|
+
const d = L(a.tickets, a.status);
|
|
233
|
+
d && (m.offers = d), i.push(m);
|
|
234
|
+
}
|
|
235
|
+
return i.length === 0 ? null : (o.subEvent = i, o);
|
|
236
|
+
}
|
|
237
|
+
function $(s) {
|
|
238
|
+
const {
|
|
239
|
+
collection: e,
|
|
240
|
+
baseEventUrl: t,
|
|
241
|
+
defaultTimeZone: n = "America/Los_Angeles"
|
|
242
|
+
} = s;
|
|
243
|
+
if (!e.collectionTitle || !e.events || e.events.length === 0) return null;
|
|
244
|
+
const r = {
|
|
245
|
+
"@context": "https://schema.org",
|
|
246
|
+
"@type": "Festival",
|
|
247
|
+
name: e.collectionTitle
|
|
248
|
+
}, o = e.description || e.summary;
|
|
249
|
+
if (o && (r.description = o), e.coverImage && (r.image = [e.coverImage]), e.dateRange) {
|
|
250
|
+
const i = p(
|
|
251
|
+
e.dateRange.startDate,
|
|
252
|
+
n
|
|
253
|
+
), a = p(
|
|
254
|
+
e.dateRange.endDate,
|
|
255
|
+
n
|
|
256
|
+
);
|
|
257
|
+
i && (r.startDate = i), a && (r.endDate = a);
|
|
258
|
+
}
|
|
259
|
+
if (new Set(
|
|
260
|
+
e.events.map((i) => i.venueId).filter((i) => i !== void 0 && i !== 0)
|
|
261
|
+
).size === 1) {
|
|
262
|
+
const i = e.events.find(
|
|
263
|
+
(a) => a.venueId && a.venueId !== 0 && a.venueName
|
|
264
|
+
);
|
|
265
|
+
i?.venueName && (r.location = {
|
|
266
|
+
"@type": "Place",
|
|
267
|
+
name: i.venueName
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
const l = [];
|
|
271
|
+
for (const i of e.events) {
|
|
272
|
+
const a = p(i.startDateTime, n);
|
|
273
|
+
if (!a) continue;
|
|
274
|
+
const u = {
|
|
275
|
+
"@type": "Event",
|
|
276
|
+
name: i.title,
|
|
277
|
+
startDate: a,
|
|
278
|
+
eventStatus: _(i.status)
|
|
279
|
+
};
|
|
280
|
+
t && i.slug && (u["@id"] = `${t}/${i.id}-${i.slug}`);
|
|
281
|
+
const m = p(i.endDateTime, n);
|
|
282
|
+
m && (u.endDate = m), i.image && (u.image = [i.image]), l.push(u);
|
|
283
|
+
}
|
|
284
|
+
return l.length === 0 ? null : (r.subEvent = l, r);
|
|
285
|
+
}
|
|
286
|
+
function v(s) {
|
|
287
|
+
return s ? s.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/--+/g, "-").replace(/^-+|-+$/g, "") : "";
|
|
288
|
+
}
|
|
289
|
+
const h = class h {
|
|
290
|
+
constructor(e) {
|
|
291
|
+
this._state = "idle", this._originals = null, this._originalsSaved = !1, this._events = [], !(typeof document > "u") && (h._activeInstance && h._activeInstance !== this && h._activeInstance.destroy(), this._venueName = e.venueName, this._venueAddress = e.venueAddress, this._venueTimeZone = e.venueTimeZone || "America/Los_Angeles", this._baseUrl = e.baseUrl || window.location.origin + window.location.pathname, this._saveOriginals(), h._activeInstance = this);
|
|
292
|
+
}
|
|
293
|
+
// ---------------------------------------------------------------------------
|
|
294
|
+
// Private helpers
|
|
295
|
+
// ---------------------------------------------------------------------------
|
|
296
|
+
_saveOriginals() {
|
|
297
|
+
if (this._originalsSaved) return;
|
|
298
|
+
const e = document.querySelector('link[rel="canonical"]'), t = document.querySelector('meta[property="og:title"]'), n = document.querySelector('meta[property="og:description"]'), r = document.querySelector('meta[property="og:image"]'), o = document.querySelector('meta[property="og:url"]'), c = document.querySelector('meta[property="og:type"]'), l = document.querySelector('meta[name="description"]');
|
|
299
|
+
this._originals = {
|
|
300
|
+
title: document.title,
|
|
301
|
+
canonicalHref: e?.getAttribute("href") ?? null,
|
|
302
|
+
ogTitle: t?.getAttribute("content") ?? null,
|
|
303
|
+
ogDescription: n?.getAttribute("content") ?? null,
|
|
304
|
+
ogImage: r?.getAttribute("content") ?? null,
|
|
305
|
+
ogUrl: o?.getAttribute("content") ?? null,
|
|
306
|
+
ogType: c?.getAttribute("content") ?? null,
|
|
307
|
+
metaDescription: l?.getAttribute("content") ?? null
|
|
308
|
+
}, this._originalsSaved = !0;
|
|
309
|
+
}
|
|
310
|
+
_injectJsonLd(e) {
|
|
311
|
+
if (typeof document > "u") return;
|
|
312
|
+
document.querySelectorAll('script[data-micdrop="jsonld"]').forEach((n) => n.remove());
|
|
313
|
+
const t = document.createElement("script");
|
|
314
|
+
t.setAttribute("type", "application/ld+json"), t.setAttribute("data-micdrop", "jsonld"), t.textContent = JSON.stringify(e), document.head.appendChild(t);
|
|
315
|
+
}
|
|
316
|
+
_setMeta(e, t) {
|
|
317
|
+
if (!(typeof document > "u"))
|
|
318
|
+
if (e.startsWith("og:")) {
|
|
319
|
+
let n = document.querySelector(`meta[property="${e}"]`);
|
|
320
|
+
n ? n.setAttribute("content", t) : (n = document.createElement("meta"), n.setAttribute("property", e), n.setAttribute("content", t), n.setAttribute("data-micdrop", "og"), document.head.appendChild(n));
|
|
321
|
+
} else {
|
|
322
|
+
let n = document.querySelector(`meta[name="${e}"]`);
|
|
323
|
+
n ? n.setAttribute("content", t) : (n = document.createElement("meta"), n.setAttribute("name", e), n.setAttribute("content", t), n.setAttribute("data-micdrop", "meta"), document.head.appendChild(n));
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
_setCanonical(e) {
|
|
327
|
+
if (typeof document > "u") return;
|
|
328
|
+
let t = document.querySelector('link[rel="canonical"]');
|
|
329
|
+
t ? t.setAttribute("href", e) : (t = document.createElement("link"), t.setAttribute("rel", "canonical"), t.setAttribute("href", e), t.setAttribute("data-micdrop", "canonical"), document.head.appendChild(t));
|
|
330
|
+
}
|
|
331
|
+
_removeAllInjected() {
|
|
332
|
+
typeof document > "u" || document.querySelectorAll("[data-micdrop]").forEach((e) => e.remove());
|
|
333
|
+
}
|
|
334
|
+
_restoreOriginals() {
|
|
335
|
+
if (!(typeof document > "u" || !this._originals)) {
|
|
336
|
+
if (document.title = this._originals.title, this._originals.canonicalHref !== null) {
|
|
337
|
+
const e = document.querySelector('link[rel="canonical"]');
|
|
338
|
+
e && e.setAttribute("href", this._originals.canonicalHref);
|
|
339
|
+
}
|
|
340
|
+
this._restoreMetaProperty("og:title", this._originals.ogTitle), this._restoreMetaProperty("og:description", this._originals.ogDescription), this._restoreMetaProperty("og:image", this._originals.ogImage), this._restoreMetaProperty("og:url", this._originals.ogUrl), this._restoreMetaProperty("og:type", this._originals.ogType), this._restoreMetaName("description", this._originals.metaDescription), this._originalsSaved = !1;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
_restoreMetaProperty(e, t) {
|
|
344
|
+
const n = document.querySelector(`meta[property="${e}"]`);
|
|
345
|
+
t !== null && n ? n.setAttribute("content", t) : t === null && n?.hasAttribute("data-micdrop") && n.remove();
|
|
346
|
+
}
|
|
347
|
+
_restoreMetaName(e, t) {
|
|
348
|
+
const n = document.querySelector(`meta[name="${e}"]`);
|
|
349
|
+
t !== null && n ? n.setAttribute("content", t) : t === null && n?.hasAttribute("data-micdrop") && n.remove();
|
|
350
|
+
}
|
|
351
|
+
_buildItemList(e) {
|
|
352
|
+
return {
|
|
353
|
+
"@context": "https://schema.org",
|
|
354
|
+
"@type": "ItemList",
|
|
355
|
+
itemListElement: e.map((t, n) => {
|
|
356
|
+
const r = t.slug || v(t.name);
|
|
357
|
+
return {
|
|
358
|
+
"@type": "ListItem",
|
|
359
|
+
position: n + 1,
|
|
360
|
+
url: `${this._baseUrl}?e=${t.id}-${r}`
|
|
361
|
+
};
|
|
362
|
+
})
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
_buildEntityUrl(e, t, n) {
|
|
366
|
+
const r = e === "event" ? "e" : e === "series" ? "s" : "c";
|
|
367
|
+
return `${this._baseUrl}?${r}=${t}-${n}`;
|
|
368
|
+
}
|
|
369
|
+
// ---------------------------------------------------------------------------
|
|
370
|
+
// Public API
|
|
371
|
+
// ---------------------------------------------------------------------------
|
|
372
|
+
/**
|
|
373
|
+
* Called when events finish loading from the API.
|
|
374
|
+
* Injects an ItemList JSON-LD for the listing. Does not modify OG/canonical/title.
|
|
375
|
+
*/
|
|
376
|
+
onEventsLoaded(e, t) {
|
|
377
|
+
if (typeof document > "u" || this._state === "destroyed") return;
|
|
378
|
+
t && (this._venueName = t.name || this._venueName, this._venueAddress = t.address || t.googleLocationNameCache || this._venueAddress, t.timeZone && (this._venueTimeZone = t.timeZone)), this._events = e;
|
|
379
|
+
const n = this._buildItemList(e);
|
|
380
|
+
this._injectJsonLd(n), this._state = "listing";
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Called when the user selects an event, series, or collection.
|
|
384
|
+
* Replaces ItemList JSON-LD with entity-specific JSON-LD and updates
|
|
385
|
+
* all head tags (canonical, OG, meta description, title).
|
|
386
|
+
*/
|
|
387
|
+
onEntitySelected(e, t, n) {
|
|
388
|
+
if (typeof document > "u" || this._state === "destroyed") return;
|
|
389
|
+
this._saveOriginals(), n && (this._venueName = n.name || this._venueName, this._venueAddress = n.address || n.googleLocationNameCache || this._venueAddress, n.timeZone && (this._venueTimeZone = n.timeZone));
|
|
390
|
+
let r = null, o = "", c = "", l = "", i = "";
|
|
391
|
+
if (e === "event") {
|
|
392
|
+
const a = t.slug || v(t.name || "");
|
|
393
|
+
i = this._buildEntityUrl("event", t.id || t.eventID || "", a), r = P({
|
|
394
|
+
event: t,
|
|
395
|
+
venue: {
|
|
396
|
+
name: this._venueName,
|
|
397
|
+
googleLocationNameCache: this._venueAddress
|
|
398
|
+
},
|
|
399
|
+
venueTimeZone: this._venueTimeZone,
|
|
400
|
+
eventUrl: i
|
|
401
|
+
}), o = t.name || "", c = t.description || t.eventSummary || "", l = t.image || t.coverImage || t.ShowImage || "";
|
|
402
|
+
} else if (e === "series") {
|
|
403
|
+
const a = t.slug || v(t.title || "");
|
|
404
|
+
i = this._buildEntityUrl("series", t.id || "", a), r = U({
|
|
405
|
+
series: {
|
|
406
|
+
...t,
|
|
407
|
+
venue: {
|
|
408
|
+
name: this._venueName,
|
|
409
|
+
googleLocationNameCache: this._venueAddress
|
|
410
|
+
},
|
|
411
|
+
timeZone: this._venueTimeZone
|
|
412
|
+
},
|
|
413
|
+
baseEventUrl: i
|
|
414
|
+
}), o = t.title || "", c = t.description || t.eventSummary || "", l = t.image || "";
|
|
415
|
+
} else if (e === "collection") {
|
|
416
|
+
const a = t.slug || v(t.collectionTitle || "");
|
|
417
|
+
i = this._buildEntityUrl("collection", t.id || "", a), r = $({
|
|
418
|
+
collection: t,
|
|
419
|
+
baseEventUrl: i,
|
|
420
|
+
defaultTimeZone: this._venueTimeZone
|
|
421
|
+
}), o = t.collectionTitle || "", c = t.description || t.summary || "", l = t.coverImage || "";
|
|
422
|
+
}
|
|
423
|
+
r && this._injectJsonLd(r), i && this._setCanonical(i), o && this._setMeta("og:title", o), c && this._setMeta("og:description", c), l && this._setMeta("og:image", l), i && this._setMeta("og:url", i), this._setMeta("og:type", "website"), c && this._setMeta("description", c), o && (document.title = `${o} | ${this._venueName}`), this._state = "entity";
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* Called when the user navigates back to the event listing.
|
|
427
|
+
* Restores original head elements and re-injects ItemList JSON-LD.
|
|
428
|
+
*/
|
|
429
|
+
onBackToListing() {
|
|
430
|
+
if (!(typeof document > "u") && this._state !== "destroyed") {
|
|
431
|
+
if (this._restoreOriginals(), this._removeAllInjected(), this._events.length > 0) {
|
|
432
|
+
const e = this._buildItemList(this._events);
|
|
433
|
+
this._injectJsonLd(e);
|
|
434
|
+
}
|
|
435
|
+
this._saveOriginals(), this._state = "listing";
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* Called when the widget is destroyed. Removes all injected elements
|
|
440
|
+
* and restores originals. Clears the static active instance.
|
|
441
|
+
*/
|
|
442
|
+
destroy() {
|
|
443
|
+
typeof document > "u" || this._state !== "destroyed" && (this._removeAllInjected(), this._restoreOriginals(), h._activeInstance === this && (h._activeInstance = null), this._state = "destroyed");
|
|
444
|
+
}
|
|
445
|
+
};
|
|
446
|
+
h._activeInstance = null;
|
|
447
|
+
let A = h;
|
|
448
|
+
export {
|
|
449
|
+
A as HostSeoController,
|
|
450
|
+
$ as buildCollectionJsonLd,
|
|
451
|
+
P as buildEventJsonLd,
|
|
452
|
+
E as buildOffers,
|
|
453
|
+
I as buildPerformers,
|
|
454
|
+
U as buildSeriesJsonLd,
|
|
455
|
+
p as formatDateTimeWithOffset,
|
|
456
|
+
_ as getEventStatus,
|
|
457
|
+
b as getTicketAvailability,
|
|
458
|
+
N as parseAddressToPostal
|
|
459
|
+
};
|
|
460
|
+
//# sourceMappingURL=seo.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seo.mjs","sources":["../../src/lib/seo/helpers.ts","../../src/lib/seo/buildEventJsonLd.ts","../../src/lib/seo/buildSeriesJsonLd.ts","../../src/lib/seo/buildCollectionJsonLd.ts","../../src/lib/utils/textUtils.ts","../../src/lib/seo/HostSeoController.ts"],"sourcesContent":["/**\n * Shared helper utilities for JSON-LD builders.\n *\n * All functions are pure (no DOM, no Svelte, no side effects).\n * Extracted verbatim from EventStructuredData.svelte.\n */\n\nimport type { EventTicketInput, EventPerformerInput } from './types';\n\n/**\n * Format datetime to ISO-8601 with timezone offset.\n * Google requires: \"2025-07-21T19:00:00-05:00\"\n *\n * Extracted from EventStructuredData.svelte lines 25-68.\n */\nexport function formatDateTimeWithOffset(\n isoString: string | null | undefined,\n tz: string,\n): string | null {\n if (!isoString) return null;\n\n const date = new Date(isoString);\n if (isNaN(date.getTime())) return null;\n\n // Get the offset in the target timezone\n const formatter = new Intl.DateTimeFormat('en-US', {\n timeZone: tz,\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n hour12: false,\n timeZoneName: 'shortOffset',\n });\n\n const parts = formatter.formatToParts(date);\n const get = (type: string) => parts.find((p) => p.type === type)?.value || '';\n\n const year = get('year');\n const month = get('month');\n const day = get('day');\n const hour = get('hour');\n const minute = get('minute');\n const second = get('second');\n const tzOffset = get('timeZoneName'); // e.g., \"GMT-5\" or \"GMT+2\"\n\n // Convert \"GMT-5\" to \"-05:00\" format\n let offset = '+00:00';\n if (tzOffset) {\n const match = tzOffset.match(/GMT([+-])(\\d+)(?::(\\d+))?/);\n if (match) {\n const sign = match[1];\n const hours = match[2].padStart(2, '0');\n const mins = match[3] || '00';\n offset = `${sign}${hours}:${mins}`;\n }\n }\n\n return `${year}-${month}-${day}T${hour}:${minute}:${second}${offset}`;\n}\n\n/**\n * Parse address string into PostalAddress components.\n * Input: \"7702 Santa Monica Blvd, West Hollywood, CA 90046\"\n * Output: { @type, streetAddress, addressLocality, addressRegion, postalCode, addressCountry }\n *\n * Extracted from EventStructuredData.svelte lines 75-111.\n */\nexport function parseAddressToPostal(\n addressStr: string | null | undefined,\n): Record<string, string> | null {\n if (!addressStr) return null;\n\n const parts = addressStr.split(',').map((p) => p.trim());\n\n if (parts.length < 2) {\n return {\n '@type': 'PostalAddress',\n streetAddress: addressStr,\n addressCountry: 'US',\n };\n }\n\n // Check if last part is \"State ZIP\" (e.g., \"CA 90046\")\n const lastPart = parts[parts.length - 1];\n const stateZipMatch = lastPart.match(/^([A-Z]{2})\\s+(\\d{5}(?:-\\d{4})?)$/);\n\n if (stateZipMatch && parts.length >= 3) {\n // Standard US address format\n return {\n '@type': 'PostalAddress',\n streetAddress: parts.slice(0, -2).join(', '),\n addressLocality: parts[parts.length - 2],\n addressRegion: stateZipMatch[1],\n postalCode: stateZipMatch[2],\n addressCountry: 'US',\n };\n }\n\n // Fallback for non-standard formats\n return {\n '@type': 'PostalAddress',\n streetAddress: parts[0],\n addressLocality: parts.slice(1).join(', '),\n addressCountry: 'US',\n };\n}\n\n/**\n * Map event status to schema.org EventStatusType.\n *\n * Extracted from EventStructuredData.svelte lines 116-132.\n */\nexport function getEventStatus(rawStatus: string | null | undefined): string {\n if (!rawStatus) return 'https://schema.org/EventScheduled';\n\n const status = rawStatus.toLowerCase();\n\n if (status === 'cancelled' || status === 'canceled') {\n return 'https://schema.org/EventCancelled';\n }\n if (status === 'postponed') {\n return 'https://schema.org/EventPostponed';\n }\n if (status === 'rescheduled') {\n return 'https://schema.org/EventRescheduled';\n }\n\n return 'https://schema.org/EventScheduled';\n}\n\n/**\n * Map ticket availability to schema.org ItemAvailability.\n *\n * Extracted from EventStructuredData.svelte lines 137-157.\n */\nexport function getTicketAvailability(ticket: EventTicketInput): string {\n const remaining =\n ticket.remainingCapacity ?? ticket.quantityRemaining ?? ticket.quantity;\n\n if (remaining === 0 || ticket.soldOut) {\n return 'https://schema.org/SoldOut';\n }\n\n const now = new Date();\n const salesBegin =\n ticket.salesBegin || ticket.salesStart || ticket.saleBegin || ticket.onSaleStart;\n const salesEnd = ticket.salesEnd || ticket.saleEnd || ticket.onSaleEnd;\n\n if (salesBegin && new Date(salesBegin) > now) {\n return 'https://schema.org/PreOrder';\n }\n\n if (salesEnd && new Date(salesEnd) < now) {\n return 'https://schema.org/SoldOut';\n }\n\n return 'https://schema.org/InStock';\n}\n\n/**\n * Build offers from available tickets.\n *\n * Extracted from EventStructuredData.svelte lines 162-208.\n */\nexport function buildOffers(\n tickets: EventTicketInput[] | null | undefined,\n url?: string,\n): Record<string, unknown> | null {\n if (!tickets || tickets.length === 0) return null;\n\n // Filter to public tickets only (exclude door-only and hidden)\n const publicTickets = tickets.filter((t) => {\n const visibility = t.visibility ?? 0;\n const isVisible = visibility === 0 || visibility === 1;\n const isPublic = t.salesChannel !== 2;\n return isVisible && isPublic;\n });\n\n if (publicTickets.length === 0) return null;\n\n // Find lowest and highest price\n const prices = publicTickets\n .map((t) => parseFloat(String(t.price ?? 0)))\n .filter((p) => !isNaN(p));\n\n if (prices.length === 0) return null;\n\n const lowPrice = Math.min(...prices);\n const highPrice = Math.max(...prices);\n\n // Use AggregateOffer when there are multiple price points\n if (lowPrice !== highPrice) {\n return {\n '@type': 'AggregateOffer',\n lowPrice: lowPrice,\n highPrice: highPrice,\n priceCurrency: 'USD',\n availability: getTicketAvailability(publicTickets[0]),\n url: url || undefined,\n validFrom:\n publicTickets[0]?.salesBegin || publicTickets[0]?.salesStart || undefined,\n };\n }\n\n // Single price point - use Offer\n const ticket = publicTickets[0];\n return {\n '@type': 'Offer',\n price: lowPrice,\n priceCurrency: 'USD',\n availability: getTicketAvailability(ticket),\n url: url || undefined,\n validFrom: ticket?.salesBegin || ticket?.salesStart || undefined,\n };\n}\n\n/**\n * Build performer array from event performers.\n *\n * Extracted from EventStructuredData.svelte lines 213-237.\n */\nexport function buildPerformers(\n performers: EventPerformerInput[] | null | undefined,\n): Array<Record<string, string>> | null {\n if (!performers || performers.length === 0) return null;\n\n // Filter to confirmed, visible performers\n const confirmed = performers.filter((p) => {\n const isConfirmed = p.acceptedState === 2;\n const isNotHidden = !p.shouldBeHidden;\n const profile = p.RosterPerformer?.User?.performerProfile;\n const hasName = profile?.firstName || profile?.lastName || profile?.displayName;\n return isConfirmed && isNotHidden && hasName;\n });\n\n if (confirmed.length === 0) return null;\n\n return confirmed.map((p) => {\n const profile = p.RosterPerformer?.User?.performerProfile;\n const name =\n profile?.displayName ||\n [profile?.firstName, profile?.lastName].filter(Boolean).join(' ');\n\n return {\n '@type': 'PerformingGroup',\n name: name,\n };\n });\n}\n","/**\n * Pure function that builds Event JSON-LD structured data for Google Events rich results.\n *\n * Extracted from EventStructuredData.svelte (lines 242-313).\n * Produces identical output to the original $derived.by block.\n */\n\nimport type { EventJsonLdInput, VenueInput, OrganizerInput } from './types';\nimport {\n formatDateTimeWithOffset,\n parseAddressToPostal,\n getEventStatus,\n buildOffers,\n buildPerformers,\n} from './helpers';\n\nexport interface BuildEventJsonLdOptions {\n event: EventJsonLdInput;\n venue: VenueInput;\n venueTimeZone?: string;\n eventUrl?: string;\n organizer?: OrganizerInput;\n}\n\nexport function buildEventJsonLd(\n options: BuildEventJsonLdOptions,\n): Record<string, unknown> | null {\n const {\n event,\n venue,\n venueTimeZone = 'America/Los_Angeles',\n eventUrl,\n organizer,\n } = options;\n\n if (!event) return null;\n\n const address = venue?.address || venue?.googleLocationNameCache || '';\n const startDate = formatDateTimeWithOffset(event.startDateTime, venueTimeZone);\n\n // Skip if we don't have required fields\n if (!event.name || !startDate || !venue?.name) {\n return null;\n }\n\n const data: Record<string, unknown> = {\n '@context': 'https://schema.org',\n '@type': 'Event',\n name: event.name,\n startDate: startDate,\n eventStatus: getEventStatus(event.status),\n location: {\n '@type': 'Place',\n name: venue.name,\n address: parseAddressToPostal(address),\n },\n };\n\n // Add endDate if available\n const endDate = formatDateTimeWithOffset(event.endDateTime, venueTimeZone);\n if (endDate) {\n data.endDate = endDate;\n }\n\n // Add description\n const description = event.description || event.eventSummary;\n if (description) {\n data.description = description;\n }\n\n // Add image - Google recommends multiple aspect ratios\n const imageUrl = event.image || event.coverImage || event.ShowImage;\n if (imageUrl) {\n data.image = [imageUrl];\n }\n\n // Add offers from tickets\n const offers = buildOffers(event.availableTickets, eventUrl);\n if (offers) {\n data.offers = offers;\n }\n\n // Add performers\n const performers = buildPerformers(event.performers);\n if (performers && performers.length > 0) {\n data.performer = performers;\n }\n\n // Add organizer if provided\n if (organizer?.name) {\n const org: Record<string, string> = {\n '@type': 'Organization',\n name: organizer.name,\n };\n if (organizer.url) {\n org.url = organizer.url;\n }\n data.organizer = org;\n }\n\n // Add event URL if provided\n if (eventUrl) {\n data.url = eventUrl;\n }\n\n return data;\n}\n","/**\n * Pure function that builds EventSeries JSON-LD structured data.\n *\n * Series use schema.org EventSeries type with subEvent array containing\n * individual Event blocks for each occurrence. Each subEvent has its own\n * offers built from the simplified series ticket DTOs (different shape\n * from the event builder's tickets).\n *\n * Google Rich Results Test does NOT support EventSeries directly, but\n * the individual subEvent Event blocks can qualify for rich results.\n */\n\nimport type { SeriesJsonLdInput } from './types';\nimport { formatDateTimeWithOffset, parseAddressToPostal, getEventStatus } from './helpers';\n\nexport interface BuildSeriesJsonLdOptions {\n series: SeriesJsonLdInput;\n baseEventUrl?: string; // e.g., \"https://get-micdrop.com/e\" -- used to build subEvent @id URLs\n}\n\n/**\n * Map a series ticket status string to schema.org ItemAvailability.\n *\n * Series tickets use a simplified { name, price, status } shape from the\n * backend (SeriesTicketDTO), unlike event tickets which have visibility,\n * salesChannel, remainingCapacity, etc.\n */\nfunction mapSeriesTicketAvailability(status: string): string {\n switch (status) {\n case 'available':\n return 'https://schema.org/InStock';\n case 'sold_out':\n return 'https://schema.org/SoldOut';\n case 'coming_soon':\n return 'https://schema.org/PreOrder';\n case 'ended':\n return 'https://schema.org/SoldOut';\n default:\n return 'https://schema.org/InStock';\n }\n}\n\n/**\n * Build offers from series occurrence tickets.\n *\n * Series tickets have a simpler shape than event tickets: { name, price, status }.\n * Uses AggregateOffer for multiple price points, Offer for single price.\n */\nfunction buildSeriesOccurrenceOffers(\n tickets: Array<{ name: string; price: number; status: string }> | undefined,\n occurrenceStatus: string | undefined,\n): Record<string, unknown> | null {\n if (!tickets || tickets.length === 0) return null;\n\n // Filter out sold_out and ended tickets for offer building\n const activeTickets = tickets.filter(\n (t) => t.status !== 'sold_out' && t.status !== 'ended',\n );\n\n // If all tickets are sold out / ended, report SoldOut with the price range\n if (activeTickets.length === 0) {\n const prices = tickets.map((t) => t.price).filter((p) => !isNaN(p));\n if (prices.length === 0) return null;\n\n const lowPrice = Math.min(...prices);\n const highPrice = Math.max(...prices);\n\n if (lowPrice !== highPrice) {\n return {\n '@type': 'AggregateOffer',\n lowPrice,\n highPrice,\n priceCurrency: 'USD',\n availability: 'https://schema.org/SoldOut',\n };\n }\n\n return {\n '@type': 'Offer',\n price: lowPrice,\n priceCurrency: 'USD',\n availability: 'https://schema.org/SoldOut',\n };\n }\n\n const prices = activeTickets.map((t) => t.price).filter((p) => !isNaN(p));\n if (prices.length === 0) return null;\n\n const lowPrice = Math.min(...prices);\n const highPrice = Math.max(...prices);\n\n if (lowPrice !== highPrice) {\n return {\n '@type': 'AggregateOffer',\n lowPrice,\n highPrice,\n priceCurrency: 'USD',\n availability: mapSeriesTicketAvailability(activeTickets[0].status),\n };\n }\n\n return {\n '@type': 'Offer',\n price: lowPrice,\n priceCurrency: 'USD',\n availability: mapSeriesTicketAvailability(activeTickets[0].status),\n };\n}\n\nexport function buildSeriesJsonLd(\n options: BuildSeriesJsonLdOptions,\n): Record<string, unknown> | null {\n const { series, baseEventUrl } = options;\n\n // Required fields\n if (!series.title) return null;\n if (!series.occurrences || series.occurrences.length === 0) return null;\n if (!series.venue?.name) return null;\n\n // Build location\n const address = parseAddressToPostal(series.venue.googleLocationNameCache || '');\n const location: Record<string, unknown> = {\n '@type': 'Place',\n name: series.venue.name,\n };\n if (address) {\n location.address = address;\n }\n\n // Build parent EventSeries\n const data: Record<string, unknown> = {\n '@context': 'https://schema.org',\n '@type': 'EventSeries',\n name: series.title,\n location,\n };\n\n // Description: prefer description, fall back to eventSummary\n const description = series.description || series.eventSummary;\n if (description) {\n data.description = description;\n }\n\n // Image\n if (series.image) {\n data.image = [series.image];\n }\n\n // Performers: flat displayName array (different from event builder's nested shape)\n const performers = series.performers?.filter((p) => p.displayName);\n if (performers && performers.length > 0) {\n data.performer = performers.map((p) => ({\n '@type': 'PerformingGroup',\n name: p.displayName,\n }));\n }\n\n // SubEvents: build Event blocks for each occurrence\n const subEvents: Record<string, unknown>[] = [];\n\n for (const occ of series.occurrences) {\n const startDate = formatDateTimeWithOffset(occ.startDateTime, series.timeZone);\n if (!startDate) continue; // Skip occurrences without valid startDate\n\n const subEvent: Record<string, unknown> = {\n '@type': 'Event',\n name: occ.title,\n startDate,\n eventStatus: getEventStatus(occ.status),\n location,\n };\n\n // @id from baseEventUrl\n if (baseEventUrl) {\n subEvent['@id'] = `${baseEventUrl}/${occ.id}-${occ.slug}`;\n }\n\n // endDate\n const endDate = formatDateTimeWithOffset(occ.endDateTime, series.timeZone);\n if (endDate) {\n subEvent.endDate = endDate;\n }\n\n // Offers from simplified ticket DTOs\n const offers = buildSeriesOccurrenceOffers(occ.tickets, occ.status);\n if (offers) {\n subEvent.offers = offers;\n }\n\n subEvents.push(subEvent);\n }\n\n // If all occurrences were skipped, return null\n if (subEvents.length === 0) return null;\n\n data.subEvent = subEvents;\n\n return data;\n}\n","/**\n * Pure function that builds Festival JSON-LD structured data for event collections.\n *\n * Collections use schema.org Festival type with subEvent array containing\n * individual Event blocks. Location is included only when all events share\n * the same venue. Date range is included only when dateRange is not null.\n *\n * Google Rich Results Test does NOT support Festival directly, but\n * the individual subEvent Event blocks can qualify for rich results.\n */\n\nimport type { CollectionJsonLdInput } from './types';\nimport { formatDateTimeWithOffset, getEventStatus } from './helpers';\n\nexport interface BuildCollectionJsonLdOptions {\n collection: CollectionJsonLdInput;\n baseEventUrl?: string; // e.g., \"https://get-micdrop.com/e\"\n defaultTimeZone?: string; // fallback timezone, defaults to 'America/Los_Angeles'\n}\n\nexport function buildCollectionJsonLd(\n options: BuildCollectionJsonLdOptions,\n): Record<string, unknown> | null {\n const {\n collection,\n baseEventUrl,\n defaultTimeZone = 'America/Los_Angeles',\n } = options;\n\n // Required fields\n if (!collection.collectionTitle) return null;\n if (!collection.events || collection.events.length === 0) return null;\n\n // Build parent Festival\n const data: Record<string, unknown> = {\n '@context': 'https://schema.org',\n '@type': 'Festival',\n name: collection.collectionTitle,\n };\n\n // Description: prefer description, fall back to summary\n const description = collection.description || collection.summary;\n if (description) {\n data.description = description;\n }\n\n // Cover image\n if (collection.coverImage) {\n data.image = [collection.coverImage];\n }\n\n // Date range: include only when dateRange is not null and has values\n if (collection.dateRange) {\n const startDate = formatDateTimeWithOffset(\n collection.dateRange.startDate,\n defaultTimeZone,\n );\n const endDate = formatDateTimeWithOffset(\n collection.dateRange.endDate,\n defaultTimeZone,\n );\n if (startDate) {\n data.startDate = startDate;\n }\n if (endDate) {\n data.endDate = endDate;\n }\n }\n\n // Location: include only when all events share the same venue\n const uniqueVenueIds = new Set(\n collection.events\n .map((e) => e.venueId)\n .filter((id): id is number => id !== undefined && id !== 0),\n );\n\n if (uniqueVenueIds.size === 1) {\n // All events share the same venue; use the first event's venueName\n const venueEvent = collection.events.find(\n (e) => e.venueId && e.venueId !== 0 && e.venueName,\n );\n if (venueEvent?.venueName) {\n data.location = {\n '@type': 'Place',\n name: venueEvent.venueName,\n };\n }\n }\n // If multiple venueIds or zero venueIds: OMIT location entirely\n\n // SubEvents: build Event blocks for each collection event\n const subEvents: Record<string, unknown>[] = [];\n\n for (const event of collection.events) {\n const startDate = formatDateTimeWithOffset(event.startDateTime, defaultTimeZone);\n if (!startDate) continue; // Skip events without valid startDate\n\n const subEvent: Record<string, unknown> = {\n '@type': 'Event',\n name: event.title,\n startDate,\n eventStatus: getEventStatus(event.status),\n };\n\n // @id from baseEventUrl\n if (baseEventUrl && event.slug) {\n subEvent['@id'] = `${baseEventUrl}/${event.id}-${event.slug}`;\n }\n\n // endDate\n const endDate = formatDateTimeWithOffset(event.endDateTime, defaultTimeZone);\n if (endDate) {\n subEvent.endDate = endDate;\n }\n\n // Image\n if (event.image) {\n subEvent.image = [event.image];\n }\n\n subEvents.push(subEvent);\n }\n\n // If all events were skipped, return null\n if (subEvents.length === 0) return null;\n\n data.subEvent = subEvents;\n\n return data;\n}\n","/**\n * Text utility functions: classNames, truncateTitle, generateSlug, validateNegativeNumber\n */\n\n/**\n * Combine class names, filtering out falsy values\n */\nexport function classNames(...classes: (string | false | null | undefined)[]): string {\n return classes.filter(Boolean).join(\" \");\n}\n\n/**\n * Truncate a title to a maximum length, appending \"...\" if truncated\n */\nexport function truncateTitle(title: string, maxLength: number): string {\n if (title.length > maxLength) {\n return title.slice(0, maxLength) + \"...\";\n }\n return title;\n}\n\n/**\n * Generate a URL-friendly slug from a string\n */\nexport function generateSlug(text: string): string {\n if (!text) return \"\";\n\n return text\n .toLowerCase()\n .trim()\n .replace(/[^\\w\\s-]/g, \"\")\n .replace(/\\s+/g, \"-\")\n .replace(/--+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n}\n\n/**\n * Validate that a value is a positive number\n * Returns an error message string, or empty string if valid\n */\nexport function validateNegativeNumber(value: string | number | null | undefined): string {\n if (value === null || value === undefined || value === \"\") {\n return \"Must be greater than zero.\";\n }\n\n const stringValue = String(value).trim();\n\n if (\n stringValue.includes(\"--\") ||\n stringValue.includes(\"++\") ||\n stringValue.match(/^-+$/) ||\n stringValue.match(/^\\++$/)\n ) {\n return \"Please enter a valid number\";\n }\n\n if (stringValue.match(/^-?\\d+-$/)) {\n return \"Please enter a valid number\";\n }\n\n if ((stringValue.match(/\\./g) || []).length > 1) {\n return \"Please enter a valid number\";\n }\n\n const numValue = Number(value);\n if (isNaN(numValue)) {\n return \"Please enter a valid number\";\n }\n\n if (numValue < 0 || numValue === 0) {\n return \"Price must be greater than zero.\";\n }\n\n return \"\";\n}\n","/**\n * HostSeoController -- manages JSON-LD structured data, canonical URLs,\n * OG tags, meta descriptions, and page title injection into venue pages'\n * <head> when the Micdrop calendar widget is embedded.\n *\n * Follows a save-replace-restore pattern to be a \"good citizen\" on venue pages:\n * idle -> listing -> entity -> listing -> ... -> destroyed\n *\n * Uses textContent (never innerHTML) for JSON-LD script tags to prevent XSS.\n */\n\nimport type { HostSeoControllerOptions } from './types';\nimport { buildEventJsonLd } from './buildEventJsonLd';\nimport { buildSeriesJsonLd } from './buildSeriesJsonLd';\nimport { buildCollectionJsonLd } from './buildCollectionJsonLd';\nimport { generateSlug } from '$lib/utils/textUtils';\n\ntype ControllerState = 'idle' | 'listing' | 'entity' | 'destroyed';\n\ninterface SavedOriginals {\n title: string;\n canonicalHref: string | null;\n ogTitle: string | null;\n ogDescription: string | null;\n ogImage: string | null;\n ogUrl: string | null;\n ogType: string | null;\n metaDescription: string | null;\n}\n\n// Minimal event shape for listing mode\ninterface ListingEvent {\n id: number | string;\n name: string;\n slug?: string;\n startDateTime?: string;\n image?: string;\n}\n\n// Venue data passed at runtime\ninterface VenueData {\n name: string;\n address?: string;\n googleLocationNameCache?: string;\n timeZone?: string;\n}\n\nexport class HostSeoController {\n /** Static guard: only one instance active at a time */\n static _activeInstance: HostSeoController | null = null;\n\n private _state: ControllerState = 'idle';\n private _venueName: string;\n private _venueAddress: string | undefined;\n private _venueTimeZone: string;\n private _baseUrl: string;\n private _originals: SavedOriginals | null = null;\n private _originalsSaved = false;\n private _events: ListingEvent[] = [];\n\n constructor(options: HostSeoControllerOptions) {\n // SSR guard\n if (typeof document === 'undefined') return;\n\n // If another instance exists, destroy it first\n if (HostSeoController._activeInstance && HostSeoController._activeInstance !== this) {\n HostSeoController._activeInstance.destroy();\n }\n\n this._venueName = options.venueName;\n this._venueAddress = options.venueAddress;\n this._venueTimeZone = options.venueTimeZone || 'America/Los_Angeles';\n this._baseUrl = options.baseUrl || (window.location.origin + window.location.pathname);\n\n // Save originals immediately\n this._saveOriginals();\n\n HostSeoController._activeInstance = this;\n }\n\n // ---------------------------------------------------------------------------\n // Private helpers\n // ---------------------------------------------------------------------------\n\n private _saveOriginals(): void {\n if (this._originalsSaved) return;\n\n const canonical = document.querySelector('link[rel=\"canonical\"]') as HTMLLinkElement | null;\n const ogTitle = document.querySelector('meta[property=\"og:title\"]') as HTMLMetaElement | null;\n const ogDescription = document.querySelector('meta[property=\"og:description\"]') as HTMLMetaElement | null;\n const ogImage = document.querySelector('meta[property=\"og:image\"]') as HTMLMetaElement | null;\n const ogUrl = document.querySelector('meta[property=\"og:url\"]') as HTMLMetaElement | null;\n const ogType = document.querySelector('meta[property=\"og:type\"]') as HTMLMetaElement | null;\n const metaDescription = document.querySelector('meta[name=\"description\"]') as HTMLMetaElement | null;\n\n this._originals = {\n title: document.title,\n canonicalHref: canonical?.getAttribute('href') ?? null,\n ogTitle: ogTitle?.getAttribute('content') ?? null,\n ogDescription: ogDescription?.getAttribute('content') ?? null,\n ogImage: ogImage?.getAttribute('content') ?? null,\n ogUrl: ogUrl?.getAttribute('content') ?? null,\n ogType: ogType?.getAttribute('content') ?? null,\n metaDescription: metaDescription?.getAttribute('content') ?? null,\n };\n\n this._originalsSaved = true;\n }\n\n private _injectJsonLd(data: Record<string, unknown>): void {\n if (typeof document === 'undefined') return;\n\n // Remove any existing micdrop JSON-LD\n document.querySelectorAll('script[data-micdrop=\"jsonld\"]').forEach((el) => el.remove());\n\n const script = document.createElement('script');\n script.setAttribute('type', 'application/ld+json');\n script.setAttribute('data-micdrop', 'jsonld');\n // Use textContent (NOT innerHTML) to prevent XSS\n script.textContent = JSON.stringify(data);\n document.head.appendChild(script);\n }\n\n private _setMeta(property: string, content: string): void {\n if (typeof document === 'undefined') return;\n\n if (property.startsWith('og:')) {\n // OG tags use property attribute\n let el = document.querySelector(`meta[property=\"${property}\"]`) as HTMLMetaElement | null;\n if (el) {\n el.setAttribute('content', content);\n } else {\n el = document.createElement('meta');\n el.setAttribute('property', property);\n el.setAttribute('content', content);\n el.setAttribute('data-micdrop', 'og');\n document.head.appendChild(el);\n }\n } else {\n // Standard meta tags use name attribute (e.g., description)\n let el = document.querySelector(`meta[name=\"${property}\"]`) as HTMLMetaElement | null;\n if (el) {\n el.setAttribute('content', content);\n } else {\n el = document.createElement('meta');\n el.setAttribute('name', property);\n el.setAttribute('content', content);\n el.setAttribute('data-micdrop', 'meta');\n document.head.appendChild(el);\n }\n }\n }\n\n private _setCanonical(url: string): void {\n if (typeof document === 'undefined') return;\n\n let el = document.querySelector('link[rel=\"canonical\"]') as HTMLLinkElement | null;\n if (el) {\n el.setAttribute('href', url);\n } else {\n el = document.createElement('link');\n el.setAttribute('rel', 'canonical');\n el.setAttribute('href', url);\n el.setAttribute('data-micdrop', 'canonical');\n document.head.appendChild(el);\n }\n }\n\n private _removeAllInjected(): void {\n if (typeof document === 'undefined') return;\n document.querySelectorAll('[data-micdrop]').forEach((el) => el.remove());\n }\n\n private _restoreOriginals(): void {\n if (typeof document === 'undefined' || !this._originals) return;\n\n // Restore title\n document.title = this._originals.title;\n\n // Restore canonical\n if (this._originals.canonicalHref !== null) {\n const canonical = document.querySelector('link[rel=\"canonical\"]') as HTMLLinkElement | null;\n if (canonical) {\n canonical.setAttribute('href', this._originals.canonicalHref);\n }\n }\n\n // Restore OG tags\n this._restoreMetaProperty('og:title', this._originals.ogTitle);\n this._restoreMetaProperty('og:description', this._originals.ogDescription);\n this._restoreMetaProperty('og:image', this._originals.ogImage);\n this._restoreMetaProperty('og:url', this._originals.ogUrl);\n this._restoreMetaProperty('og:type', this._originals.ogType);\n\n // Restore meta description\n this._restoreMetaName('description', this._originals.metaDescription);\n\n this._originalsSaved = false;\n }\n\n private _restoreMetaProperty(property: string, originalContent: string | null): void {\n const el = document.querySelector(`meta[property=\"${property}\"]`) as HTMLMetaElement | null;\n if (originalContent !== null && el) {\n // Had original value -- restore it\n el.setAttribute('content', originalContent);\n } else if (originalContent === null && el?.hasAttribute('data-micdrop')) {\n // We created it -- remove it\n el.remove();\n }\n }\n\n private _restoreMetaName(name: string, originalContent: string | null): void {\n const el = document.querySelector(`meta[name=\"${name}\"]`) as HTMLMetaElement | null;\n if (originalContent !== null && el) {\n el.setAttribute('content', originalContent);\n } else if (originalContent === null && el?.hasAttribute('data-micdrop')) {\n el.remove();\n }\n }\n\n private _buildItemList(events: ListingEvent[]): Record<string, unknown> {\n return {\n '@context': 'https://schema.org',\n '@type': 'ItemList',\n itemListElement: events.map((event, i) => {\n const slug = event.slug || generateSlug(event.name);\n return {\n '@type': 'ListItem',\n position: i + 1,\n url: `${this._baseUrl}?e=${event.id}-${slug}`,\n };\n }),\n };\n }\n\n private _buildEntityUrl(type: string, id: string | number, slug: string): string {\n const prefix = type === 'event' ? 'e' : type === 'series' ? 's' : 'c';\n return `${this._baseUrl}?${prefix}=${id}-${slug}`;\n }\n\n // ---------------------------------------------------------------------------\n // Public API\n // ---------------------------------------------------------------------------\n\n /**\n * Called when events finish loading from the API.\n * Injects an ItemList JSON-LD for the listing. Does not modify OG/canonical/title.\n */\n onEventsLoaded(\n events: ListingEvent[],\n venue?: VenueData,\n ): void {\n if (typeof document === 'undefined') return;\n if (this._state === 'destroyed') return;\n\n // Update venue info from parameter if provided\n if (venue) {\n this._venueName = venue.name || this._venueName;\n this._venueAddress = venue.address || venue.googleLocationNameCache || this._venueAddress;\n if (venue.timeZone) {\n this._venueTimeZone = venue.timeZone;\n }\n }\n\n // Store events for later use (re-injection on back to listing)\n this._events = events;\n\n // Build and inject ItemList JSON-LD\n const itemList = this._buildItemList(events);\n this._injectJsonLd(itemList);\n\n this._state = 'listing';\n }\n\n /**\n * Called when the user selects an event, series, or collection.\n * Replaces ItemList JSON-LD with entity-specific JSON-LD and updates\n * all head tags (canonical, OG, meta description, title).\n */\n onEntitySelected(\n type: 'event' | 'series' | 'collection',\n data: any,\n venue?: VenueData,\n ): void {\n if (typeof document === 'undefined') return;\n if (this._state === 'destroyed') return;\n\n // Save originals if not already saved\n this._saveOriginals();\n\n // Update venue info from parameter if provided\n if (venue) {\n this._venueName = venue.name || this._venueName;\n this._venueAddress = venue.address || venue.googleLocationNameCache || this._venueAddress;\n if (venue.timeZone) {\n this._venueTimeZone = venue.timeZone;\n }\n }\n\n let jsonLd: Record<string, unknown> | null = null;\n let entityName = '';\n let entityDescription = '';\n let entityImage = '';\n let entityUrl = '';\n\n if (type === 'event') {\n const slug = data.slug || generateSlug(data.name || '');\n entityUrl = this._buildEntityUrl('event', data.id || data.eventID || '', slug);\n\n jsonLd = buildEventJsonLd({\n event: data,\n venue: {\n name: this._venueName,\n googleLocationNameCache: this._venueAddress,\n },\n venueTimeZone: this._venueTimeZone,\n eventUrl: entityUrl,\n });\n\n entityName = data.name || '';\n entityDescription = data.description || data.eventSummary || '';\n entityImage = data.image || data.coverImage || data.ShowImage || '';\n } else if (type === 'series') {\n const slug = data.slug || generateSlug(data.title || '');\n entityUrl = this._buildEntityUrl('series', data.id || '', slug);\n\n jsonLd = buildSeriesJsonLd({\n series: {\n ...data,\n venue: {\n name: this._venueName,\n googleLocationNameCache: this._venueAddress,\n },\n timeZone: this._venueTimeZone,\n },\n baseEventUrl: entityUrl,\n });\n\n entityName = data.title || '';\n entityDescription = data.description || data.eventSummary || '';\n entityImage = data.image || '';\n } else if (type === 'collection') {\n const slug = data.slug || generateSlug(data.collectionTitle || '');\n entityUrl = this._buildEntityUrl('collection', data.id || '', slug);\n\n jsonLd = buildCollectionJsonLd({\n collection: data,\n baseEventUrl: entityUrl,\n defaultTimeZone: this._venueTimeZone,\n });\n\n entityName = data.collectionTitle || '';\n entityDescription = data.description || data.summary || '';\n entityImage = data.coverImage || '';\n }\n\n // Inject JSON-LD (replaces existing micdrop JSON-LD)\n if (jsonLd) {\n this._injectJsonLd(jsonLd);\n }\n\n // Update canonical URL\n if (entityUrl) {\n this._setCanonical(entityUrl);\n }\n\n // Update OG tags\n if (entityName) {\n this._setMeta('og:title', entityName);\n }\n if (entityDescription) {\n this._setMeta('og:description', entityDescription);\n }\n if (entityImage) {\n this._setMeta('og:image', entityImage);\n }\n if (entityUrl) {\n this._setMeta('og:url', entityUrl);\n }\n this._setMeta('og:type', 'website');\n\n // Update meta description\n if (entityDescription) {\n this._setMeta('description', entityDescription);\n }\n\n // Update page title\n if (entityName) {\n document.title = `${entityName} | ${this._venueName}`;\n }\n\n this._state = 'entity';\n }\n\n /**\n * Called when the user navigates back to the event listing.\n * Restores original head elements and re-injects ItemList JSON-LD.\n */\n onBackToListing(): void {\n if (typeof document === 'undefined') return;\n if (this._state === 'destroyed') return;\n\n // Restore all originals\n this._restoreOriginals();\n\n // Remove any remaining injected elements\n this._removeAllInjected();\n\n // Re-inject ItemList JSON-LD if events are available\n if (this._events.length > 0) {\n const itemList = this._buildItemList(this._events);\n this._injectJsonLd(itemList);\n }\n\n // Re-save originals since we just restored them\n this._saveOriginals();\n\n this._state = 'listing';\n }\n\n /**\n * Called when the widget is destroyed. Removes all injected elements\n * and restores originals. Clears the static active instance.\n */\n destroy(): void {\n if (typeof document === 'undefined') return;\n if (this._state === 'destroyed') return;\n\n this._removeAllInjected();\n this._restoreOriginals();\n\n if (HostSeoController._activeInstance === this) {\n HostSeoController._activeInstance = null;\n }\n\n this._state = 'destroyed';\n }\n}\n"],"names":["formatDateTimeWithOffset","isoString","tz","date","parts","get","type","p","year","month","day","hour","minute","second","tzOffset","offset","match","sign","hours","mins","parseAddressToPostal","addressStr","stateZipMatch","getEventStatus","rawStatus","status","getTicketAvailability","ticket","now","salesBegin","salesEnd","buildOffers","tickets","url","publicTickets","t","visibility","isVisible","isPublic","prices","lowPrice","highPrice","buildPerformers","performers","confirmed","isConfirmed","isNotHidden","profile","hasName","buildEventJsonLd","options","event","venue","venueTimeZone","eventUrl","organizer","address","startDate","data","endDate","description","imageUrl","offers","org","mapSeriesTicketAvailability","buildSeriesOccurrenceOffers","occurrenceStatus","activeTickets","buildSeriesJsonLd","series","baseEventUrl","location","subEvents","occ","subEvent","buildCollectionJsonLd","collection","defaultTimeZone","e","id","venueEvent","generateSlug","text","_HostSeoController","canonical","ogTitle","ogDescription","ogImage","ogUrl","ogType","metaDescription","el","script","property","content","originalContent","name","events","i","slug","prefix","itemList","jsonLd","entityName","entityDescription","entityImage","entityUrl","HostSeoController"],"mappings":"AAeO,SAASA,EACdC,GACAC,GACe;AACf,MAAI,CAACD,EAAW,QAAO;AAEvB,QAAME,IAAO,IAAI,KAAKF,CAAS;AAC/B,MAAI,MAAME,EAAK,QAAA,CAAS,EAAG,QAAO;AAelC,QAAMC,IAZY,IAAI,KAAK,eAAe,SAAS;AAAA,IACjD,UAAUF;AAAA,IACV,MAAM;AAAA,IACN,OAAO;AAAA,IACP,KAAK;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,cAAc;AAAA,EAAA,CACf,EAEuB,cAAcC,CAAI,GACpCE,IAAM,CAACC,MAAiBF,EAAM,KAAK,CAACG,MAAMA,EAAE,SAASD,CAAI,GAAG,SAAS,IAErEE,IAAOH,EAAI,MAAM,GACjBI,IAAQJ,EAAI,OAAO,GACnBK,IAAML,EAAI,KAAK,GACfM,IAAON,EAAI,MAAM,GACjBO,IAASP,EAAI,QAAQ,GACrBQ,IAASR,EAAI,QAAQ,GACrBS,IAAWT,EAAI,cAAc;AAGnC,MAAIU,IAAS;AACb,MAAID,GAAU;AACZ,UAAME,IAAQF,EAAS,MAAM,2BAA2B;AACxD,QAAIE,GAAO;AACT,YAAMC,IAAOD,EAAM,CAAC,GACdE,IAAQF,EAAM,CAAC,EAAE,SAAS,GAAG,GAAG,GAChCG,IAAOH,EAAM,CAAC,KAAK;AACzB,MAAAD,IAAS,GAAGE,CAAI,GAAGC,CAAK,IAAIC,CAAI;AAAA,IAClC;AAAA,EACF;AAEA,SAAO,GAAGX,CAAI,IAAIC,CAAK,IAAIC,CAAG,IAAIC,CAAI,IAAIC,CAAM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