@getmicdrop/venue-calendar 4.0.99 → 4.0.100
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/{CartView-tv4und9V.js → CartView-DStWE1lq.js} +7 -7
- package/dist/{CartView-tv4und9V.js.map → CartView-DStWE1lq.js.map} +1 -1
- package/dist/{Checkout-DUJ7VdA-.js → Checkout-DPOWt5x1.js} +335 -335
- package/dist/Checkout-DPOWt5x1.js.map +1 -0
- package/dist/{Checkout-CrQVcvtD.js → Checkout-l0YGs6nV.js} +417 -413
- package/dist/Checkout-l0YGs6nV.js.map +1 -0
- package/dist/{CheckoutTimer-BfnQg93S.js → CheckoutTimer-D6zIi_G4.js} +5 -5
- package/dist/{CheckoutTimer-BfnQg93S.js.map → CheckoutTimer-D6zIi_G4.js.map} +1 -1
- package/dist/{ClockIcon-DjCISuIf.js → ClockIcon-_HuqcvzI.js} +2 -2
- package/dist/{ClockIcon-DjCISuIf.js.map → ClockIcon-_HuqcvzI.js.map} +1 -1
- package/dist/{CollectionView-Biiix8cT.js → CollectionView-By1_5J4j.js} +24 -24
- package/dist/{CollectionView-Biiix8cT.js.map → CollectionView-By1_5J4j.js.map} +1 -1
- package/dist/{Event-BWseA69F.js → Event-D2o_kd8V.js} +740 -722
- package/dist/{Event-BWseA69F.js.map → Event-D2o_kd8V.js.map} +1 -1
- package/dist/EventPage-BE0YWX1v.js +934 -0
- package/dist/{EventPage-O62RxjBR.js.map → EventPage-BE0YWX1v.js.map} +1 -1
- package/dist/{Heading-FnTNhRjb.js → Heading-DhkQ4Qnb.js} +2 -2
- package/dist/{Heading-FnTNhRjb.js.map → Heading-DhkQ4Qnb.js.map} +1 -1
- package/dist/{ScarcityBadge-Bp9nPCkW.js → ScarcityBadge-CZ2uAGGI.js} +8 -8
- package/dist/{ScarcityBadge-Bp9nPCkW.js.map → ScarcityBadge-CZ2uAGGI.js.map} +1 -1
- package/dist/{SeriesPage-DV_Hl3f3.js → SeriesPage-BbHc0DuF.js} +5 -5
- package/dist/{SeriesPage-DV_Hl3f3.js.map → SeriesPage-BbHc0DuF.js.map} +1 -1
- package/dist/{Spinner-DbxCS7ox.js → Spinner-BuwOrGuR.js} +5 -5
- package/dist/{Spinner-DbxCS7ox.js.map → Spinner-BuwOrGuR.js.map} +1 -1
- package/dist/Success-C7LshhQI.js +903 -0
- package/dist/Success-C7LshhQI.js.map +1 -0
- package/dist/{Text-CfTsoCGL.js → Text-hqMlFKvQ.js} +13 -13
- package/dist/{Text-CfTsoCGL.js.map → Text-hqMlFKvQ.js.map} +1 -1
- package/dist/{VenueCalendar-DFh-Rx1y.js → VenueCalendar-J_3XaIuX.js} +2577 -2518
- package/dist/VenueCalendar-J_3XaIuX.js.map +1 -0
- package/dist/{ViewTicketsEmbed-CW03gjAW.js → ViewTicketsEmbed-DAtnIly2.js} +6 -5
- package/dist/ViewTicketsEmbed-DAtnIly2.js.map +1 -0
- package/dist/{data-toggle-store.svelte-Z_v3PDQs.js → data-toggle-store.svelte-Bo1GKai0.js} +2 -2
- package/dist/{data-toggle-store.svelte-Z_v3PDQs.js.map → data-toggle-store.svelte-Bo1GKai0.js.map} +1 -1
- package/dist/{labels-S2uvwo7v.js → labels-iNxEkw4i.js} +29 -29
- package/dist/{labels-S2uvwo7v.js.map → labels-iNxEkw4i.js.map} +1 -1
- package/dist/{modalManager.svelte-CjWoFGCr.js → modalManager.svelte-C81ymMPd.js} +2 -2
- package/dist/{modalManager.svelte-CjWoFGCr.js.map → modalManager.svelte-C81ymMPd.js.map} +1 -1
- package/dist/seo/seo.cjs +1 -1
- package/dist/seo/seo.cjs.map +1 -1
- package/dist/seo/seo.mjs +162 -120
- package/dist/seo/seo.mjs.map +1 -1
- package/dist/{transform-DoUBgKbP.js → transform-CibGPcNT.js} +2 -2
- package/dist/{transform-DoUBgKbP.js.map → transform-CibGPcNT.js.map} +1 -1
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +3 -3
- package/dist/venue-calendar.iife.js +48 -48
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +42 -42
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +3 -2
- package/dist/Checkout-CrQVcvtD.js.map +0 -1
- package/dist/Checkout-DUJ7VdA-.js.map +0 -1
- package/dist/EventPage-O62RxjBR.js +0 -932
- package/dist/Success-BtO9Bx_h.js +0 -872
- package/dist/Success-BtO9Bx_h.js.map +0 -1
- package/dist/VenueCalendar-DFh-Rx1y.js.map +0 -1
- package/dist/ViewTicketsEmbed-CW03gjAW.js.map +0 -1
package/dist/seo/seo.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
function
|
|
1
|
+
function S() {
|
|
2
2
|
return "America/Los_Angeles";
|
|
3
3
|
}
|
|
4
|
-
const
|
|
4
|
+
const O = /<\/(?:p|div|h[1-6]|li|ul|ol|blockquote|tr)>/gi, C = /<br\s*\/?>/gi, U = /<[^>]*>/g, $ = {
|
|
5
5
|
"&": "&",
|
|
6
6
|
"<": "<",
|
|
7
7
|
">": ">",
|
|
@@ -16,16 +16,20 @@ function M(i) {
|
|
|
16
16
|
function A(i) {
|
|
17
17
|
return Number.isFinite(i) && i > 0 && i <= 1114111 ? String.fromCodePoint(i) : "";
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function y(i, t) {
|
|
20
20
|
if (!i)
|
|
21
21
|
return "";
|
|
22
|
-
let e = String(i).replace(C, " ").replace(
|
|
23
|
-
|
|
22
|
+
let e = String(i).replace(C, " ").replace(O, " ").replace(U, "");
|
|
23
|
+
if (e = M(e).replace(/\s+/g, " ").trim(), t && t > 0 && e.length > t) {
|
|
24
|
+
const n = e.slice(0, t), s = n.lastIndexOf(" ");
|
|
25
|
+
e = (s > 40 ? n.slice(0, s) : n).trimEnd() + "…";
|
|
26
|
+
}
|
|
27
|
+
return e;
|
|
24
28
|
}
|
|
25
29
|
function R(i) {
|
|
26
30
|
return i.replace(/</g, "\\u003c").replace(/>/g, "\\u003e").replace(/&/g, "\\u0026");
|
|
27
31
|
}
|
|
28
|
-
function
|
|
32
|
+
function _(i, t) {
|
|
29
33
|
if (!i) return null;
|
|
30
34
|
const e = new Date(i);
|
|
31
35
|
if (isNaN(e.getTime())) return null;
|
|
@@ -39,29 +43,29 @@ function v(i, t) {
|
|
|
39
43
|
hour12: !1,
|
|
40
44
|
timeZoneName: "shortOffset"
|
|
41
45
|
};
|
|
42
|
-
let
|
|
46
|
+
let s;
|
|
43
47
|
try {
|
|
44
|
-
|
|
48
|
+
s = new Intl.DateTimeFormat("en-US", { ...n, timeZone: t });
|
|
45
49
|
} catch {
|
|
46
|
-
|
|
50
|
+
s = new Intl.DateTimeFormat("en-US", {
|
|
47
51
|
...n,
|
|
48
|
-
timeZone:
|
|
52
|
+
timeZone: S()
|
|
49
53
|
});
|
|
50
54
|
}
|
|
51
|
-
const a =
|
|
55
|
+
const a = s.formatToParts(e), r = (m) => a.find((b) => b.type === m)?.value || "", l = r("year"), c = r("month"), o = r("day"), d = r("hour"), u = r("minute"), h = r("second"), g = r("timeZoneName");
|
|
52
56
|
let p = "+00:00";
|
|
53
57
|
if (g) {
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
const
|
|
57
|
-
p = `${
|
|
58
|
+
const m = g.match(/GMT([+-])(\d+)(?::(\d+))?/);
|
|
59
|
+
if (m) {
|
|
60
|
+
const b = m[1], D = m[2].padStart(2, "0"), L = m[3] || "00";
|
|
61
|
+
p = `${b}${D}:${L}`;
|
|
58
62
|
}
|
|
59
63
|
}
|
|
60
|
-
return `${l}-${c}-${o}T${
|
|
64
|
+
return `${l}-${c}-${o}T${d}:${u}:${h}${p}`;
|
|
61
65
|
}
|
|
62
66
|
function w(i) {
|
|
63
67
|
if (!i) return null;
|
|
64
|
-
const t = i.split(",").map((
|
|
68
|
+
const t = i.split(",").map((s) => s.trim());
|
|
65
69
|
if (t.length < 2)
|
|
66
70
|
return {
|
|
67
71
|
"@type": "PostalAddress",
|
|
@@ -83,14 +87,14 @@ function w(i) {
|
|
|
83
87
|
addressCountry: "US"
|
|
84
88
|
};
|
|
85
89
|
}
|
|
86
|
-
function
|
|
90
|
+
function I(i, t) {
|
|
87
91
|
if (i && (i.city || i.state || i.postalCode)) {
|
|
88
92
|
const e = { "@type": "PostalAddress" };
|
|
89
93
|
return i.address && (e.streetAddress = i.address), i.city && (e.addressLocality = i.city), i.state && (e.addressRegion = i.state), i.postalCode && (e.postalCode = i.postalCode), e.addressCountry = i.country || "US", e;
|
|
90
94
|
}
|
|
91
95
|
return w(i && i.address || t || null);
|
|
92
96
|
}
|
|
93
|
-
function
|
|
97
|
+
function P(i) {
|
|
94
98
|
if (!i) return "https://schema.org/EventScheduled";
|
|
95
99
|
const t = i.toLowerCase();
|
|
96
100
|
return t === "cancelled" || t === "canceled" ? "https://schema.org/EventCancelled" : t === "postponed" ? "https://schema.org/EventPostponed" : t === "rescheduled" ? "https://schema.org/EventRescheduled" : "https://schema.org/EventScheduled";
|
|
@@ -98,44 +102,44 @@ function I(i) {
|
|
|
98
102
|
function E(i) {
|
|
99
103
|
if ((i.remainingCapacity ?? i.quantityRemaining ?? i.quantity) === 0 || i.soldOut)
|
|
100
104
|
return "https://schema.org/SoldOut";
|
|
101
|
-
const e = /* @__PURE__ */ new Date(), n = i.salesBegin || i.salesStart || i.saleBegin || i.onSaleStart,
|
|
102
|
-
return n && new Date(n) > e ? "https://schema.org/PreOrder" :
|
|
105
|
+
const e = /* @__PURE__ */ new Date(), n = i.salesBegin || i.salesStart || i.saleBegin || i.onSaleStart, s = i.salesEnd || i.saleEnd || i.onSaleEnd;
|
|
106
|
+
return n && new Date(n) > e ? "https://schema.org/PreOrder" : s && new Date(s) < e ? "https://schema.org/SoldOut" : "https://schema.org/InStock";
|
|
103
107
|
}
|
|
104
108
|
function Z(i, t) {
|
|
105
109
|
if (!i || i.length === 0) return null;
|
|
106
110
|
const e = i.filter((l) => {
|
|
107
|
-
const c = l.visibility ?? 0, o = c === 0 || c === 1,
|
|
108
|
-
return o &&
|
|
111
|
+
const c = l.visibility ?? 0, o = c === 0 || c === 1, d = l.salesChannel !== 2;
|
|
112
|
+
return o && d;
|
|
109
113
|
});
|
|
110
114
|
if (e.length === 0) return null;
|
|
111
115
|
const n = e.map((l) => parseFloat(String(l.price ?? 0))).filter((l) => !isNaN(l));
|
|
112
116
|
if (n.length === 0) return null;
|
|
113
|
-
const
|
|
114
|
-
if (
|
|
117
|
+
const s = Math.min(...n), a = Math.max(...n);
|
|
118
|
+
if (s !== a)
|
|
115
119
|
return {
|
|
116
120
|
"@type": "AggregateOffer",
|
|
117
|
-
lowPrice:
|
|
121
|
+
lowPrice: s,
|
|
118
122
|
highPrice: a,
|
|
119
123
|
priceCurrency: "USD",
|
|
120
124
|
availability: E(e[0]),
|
|
121
125
|
url: t || void 0,
|
|
122
126
|
validFrom: e[0]?.salesBegin || e[0]?.salesStart || void 0
|
|
123
127
|
};
|
|
124
|
-
const
|
|
128
|
+
const r = e[0];
|
|
125
129
|
return {
|
|
126
130
|
"@type": "Offer",
|
|
127
|
-
price:
|
|
131
|
+
price: s,
|
|
128
132
|
priceCurrency: "USD",
|
|
129
|
-
availability: E(
|
|
133
|
+
availability: E(r),
|
|
130
134
|
url: t || void 0,
|
|
131
|
-
validFrom:
|
|
135
|
+
validFrom: r?.salesBegin || r?.salesStart || void 0
|
|
132
136
|
};
|
|
133
137
|
}
|
|
134
138
|
function q(i) {
|
|
135
139
|
if (!i || i.length === 0) return null;
|
|
136
140
|
const t = i.filter((e) => {
|
|
137
|
-
const n = e.acceptedState === 2,
|
|
138
|
-
return n &&
|
|
141
|
+
const n = e.acceptedState === 2, s = !e.shouldBeHidden, a = e.RosterPerformer?.User?.performerProfile, r = a?.firstName || a?.lastName || a?.displayName;
|
|
142
|
+
return n && s && r;
|
|
139
143
|
});
|
|
140
144
|
return t.length === 0 ? null : t.map((e) => {
|
|
141
145
|
const n = e.RosterPerformer?.User?.performerProfile;
|
|
@@ -149,18 +153,18 @@ function j(i) {
|
|
|
149
153
|
const {
|
|
150
154
|
event: t,
|
|
151
155
|
venue: e,
|
|
152
|
-
venueTimeZone: n =
|
|
153
|
-
eventUrl:
|
|
156
|
+
venueTimeZone: n = S(),
|
|
157
|
+
eventUrl: s,
|
|
154
158
|
organizer: a
|
|
155
159
|
} = i;
|
|
156
160
|
if (!t) return null;
|
|
157
|
-
const
|
|
161
|
+
const r = _(
|
|
158
162
|
t.startDateTime,
|
|
159
163
|
n
|
|
160
164
|
);
|
|
161
|
-
if (!t.name || !
|
|
165
|
+
if (!t.name || !r || !e?.name)
|
|
162
166
|
return null;
|
|
163
|
-
const l =
|
|
167
|
+
const l = I(
|
|
164
168
|
e,
|
|
165
169
|
e?.googleLocationNameCache
|
|
166
170
|
), c = {
|
|
@@ -172,27 +176,27 @@ function j(i) {
|
|
|
172
176
|
"@context": "https://schema.org",
|
|
173
177
|
"@type": "Event",
|
|
174
178
|
name: t.name,
|
|
175
|
-
startDate:
|
|
176
|
-
eventStatus:
|
|
179
|
+
startDate: r,
|
|
180
|
+
eventStatus: P(t.status),
|
|
177
181
|
eventAttendanceMode: "https://schema.org/OfflineEventAttendanceMode",
|
|
178
182
|
location: c
|
|
179
|
-
},
|
|
180
|
-
|
|
181
|
-
const
|
|
182
|
-
|
|
183
|
+
}, d = _(t.endDateTime, n);
|
|
184
|
+
d && (o.endDate = d);
|
|
185
|
+
const u = y(t.description) || t.eventSummary;
|
|
186
|
+
u && (o.description = u);
|
|
183
187
|
const h = t.image || t.coverImage || t.ShowImage;
|
|
184
188
|
h && (o.image = [h]);
|
|
185
|
-
const g = Z(t.availableTickets,
|
|
189
|
+
const g = Z(t.availableTickets, s);
|
|
186
190
|
g && (o.offers = g);
|
|
187
191
|
const p = q(t.performers);
|
|
188
192
|
if (p && p.length > 0 && (o.performer = p), a?.name) {
|
|
189
|
-
const
|
|
193
|
+
const m = {
|
|
190
194
|
"@type": "Organization",
|
|
191
195
|
name: a.name
|
|
192
196
|
};
|
|
193
|
-
a.url && (
|
|
197
|
+
a.url && (m.url = a.url), o.organizer = m;
|
|
194
198
|
}
|
|
195
|
-
return
|
|
199
|
+
return s && (o.url = s), o;
|
|
196
200
|
}
|
|
197
201
|
function N(i) {
|
|
198
202
|
switch (i) {
|
|
@@ -208,15 +212,15 @@ function N(i) {
|
|
|
208
212
|
return "https://schema.org/InStock";
|
|
209
213
|
}
|
|
210
214
|
}
|
|
211
|
-
function
|
|
215
|
+
function z(i, t) {
|
|
212
216
|
if (!i || i.length === 0) return null;
|
|
213
217
|
const e = i.filter(
|
|
214
|
-
(
|
|
218
|
+
(r) => r.status !== "sold_out" && r.status !== "ended"
|
|
215
219
|
);
|
|
216
220
|
if (e.length === 0) {
|
|
217
|
-
const
|
|
218
|
-
if (
|
|
219
|
-
const l = Math.min(...
|
|
221
|
+
const r = i.map((o) => o.price).filter((o) => !isNaN(o));
|
|
222
|
+
if (r.length === 0) return null;
|
|
223
|
+
const l = Math.min(...r), c = Math.max(...r);
|
|
220
224
|
return l !== c ? {
|
|
221
225
|
"@type": "AggregateOffer",
|
|
222
226
|
lowPrice: l,
|
|
@@ -230,40 +234,40 @@ function x(i, t) {
|
|
|
230
234
|
availability: "https://schema.org/SoldOut"
|
|
231
235
|
};
|
|
232
236
|
}
|
|
233
|
-
const n = e.map((
|
|
237
|
+
const n = e.map((r) => r.price).filter((r) => !isNaN(r));
|
|
234
238
|
if (n.length === 0) return null;
|
|
235
|
-
const
|
|
236
|
-
return
|
|
239
|
+
const s = Math.min(...n), a = Math.max(...n);
|
|
240
|
+
return s !== a ? {
|
|
237
241
|
"@type": "AggregateOffer",
|
|
238
|
-
lowPrice:
|
|
242
|
+
lowPrice: s,
|
|
239
243
|
highPrice: a,
|
|
240
244
|
priceCurrency: "USD",
|
|
241
245
|
availability: N(e[0].status)
|
|
242
246
|
} : {
|
|
243
247
|
"@type": "Offer",
|
|
244
|
-
price:
|
|
248
|
+
price: s,
|
|
245
249
|
priceCurrency: "USD",
|
|
246
250
|
availability: N(e[0].status)
|
|
247
251
|
};
|
|
248
252
|
}
|
|
249
|
-
function
|
|
253
|
+
function x(i) {
|
|
250
254
|
const { series: t, baseEventUrl: e } = i;
|
|
251
255
|
if (!t.title || !t.occurrences || t.occurrences.length === 0 || !t.venue?.name) return null;
|
|
252
|
-
const n =
|
|
256
|
+
const n = I(
|
|
253
257
|
t.venue,
|
|
254
258
|
t.venue.googleLocationNameCache
|
|
255
|
-
),
|
|
259
|
+
), s = {
|
|
256
260
|
"@type": "Place",
|
|
257
261
|
name: t.venue.name
|
|
258
262
|
};
|
|
259
|
-
n && (
|
|
263
|
+
n && (s.address = n);
|
|
260
264
|
const a = {
|
|
261
265
|
"@context": "https://schema.org",
|
|
262
266
|
"@type": "EventSeries",
|
|
263
267
|
name: t.title,
|
|
264
|
-
location:
|
|
265
|
-
},
|
|
266
|
-
|
|
268
|
+
location: s
|
|
269
|
+
}, r = y(t.description) || t.eventSummary;
|
|
270
|
+
r && (a.description = r), t.image && (a.image = [t.image]);
|
|
267
271
|
const l = t.performers?.filter((o) => o.displayName);
|
|
268
272
|
l && l.length > 0 && (a.performer = l.map((o) => ({
|
|
269
273
|
"@type": "PerformingGroup",
|
|
@@ -271,23 +275,23 @@ function z(i) {
|
|
|
271
275
|
})));
|
|
272
276
|
const c = [];
|
|
273
277
|
for (const o of t.occurrences) {
|
|
274
|
-
const
|
|
278
|
+
const d = _(
|
|
275
279
|
o.startDateTime,
|
|
276
280
|
t.timeZone
|
|
277
281
|
);
|
|
278
|
-
if (!
|
|
279
|
-
const
|
|
282
|
+
if (!d) continue;
|
|
283
|
+
const u = {
|
|
280
284
|
"@type": "Event",
|
|
281
285
|
name: o.title,
|
|
282
|
-
startDate:
|
|
283
|
-
eventStatus:
|
|
284
|
-
location:
|
|
286
|
+
startDate: d,
|
|
287
|
+
eventStatus: P(o.status),
|
|
288
|
+
location: s
|
|
285
289
|
};
|
|
286
|
-
e && (
|
|
287
|
-
const h =
|
|
288
|
-
h && (
|
|
289
|
-
const g =
|
|
290
|
-
g && (
|
|
290
|
+
e && (u["@id"] = `${e}/${o.id}-${o.slug}`);
|
|
291
|
+
const h = _(o.endDateTime, t.timeZone);
|
|
292
|
+
h && (u.endDate = h);
|
|
293
|
+
const g = z(o.tickets, o.status);
|
|
294
|
+
g && (u.offers = g), c.push(u);
|
|
291
295
|
}
|
|
292
296
|
return c.length === 0 ? null : (a.subEvent = c, a);
|
|
293
297
|
}
|
|
@@ -295,52 +299,66 @@ function B(i) {
|
|
|
295
299
|
const { collection: t, baseEventUrl: e } = i;
|
|
296
300
|
if (!t.collectionTitle || !t.events || t.events.length === 0) return null;
|
|
297
301
|
const n = [];
|
|
298
|
-
for (const
|
|
299
|
-
if (!
|
|
302
|
+
for (const r of t.events) {
|
|
303
|
+
if (!r.title) continue;
|
|
300
304
|
const l = {
|
|
301
305
|
"@type": "ListItem",
|
|
302
306
|
position: n.length + 1,
|
|
303
|
-
name:
|
|
307
|
+
name: r.title
|
|
304
308
|
};
|
|
305
|
-
e && (l.url =
|
|
309
|
+
e && (l.url = r.slug ? `${e}/${r.id}-${r.slug}` : `${e}/${r.id}`), n.push(l);
|
|
306
310
|
}
|
|
307
311
|
if (n.length === 0) return null;
|
|
308
|
-
const
|
|
312
|
+
const s = {
|
|
309
313
|
"@context": "https://schema.org",
|
|
310
314
|
"@type": "CollectionPage",
|
|
311
315
|
name: t.collectionTitle
|
|
312
|
-
}, a =
|
|
313
|
-
return a && (
|
|
316
|
+
}, a = y(t.description) || t.summary;
|
|
317
|
+
return a && (s.description = a), t.coverImage && (s.image = [t.coverImage]), s.mainEntity = {
|
|
314
318
|
"@type": "ItemList",
|
|
315
319
|
numberOfItems: n.length,
|
|
316
320
|
itemListElement: n
|
|
317
|
-
},
|
|
321
|
+
}, s;
|
|
318
322
|
}
|
|
319
323
|
const F = 70;
|
|
320
324
|
function J(i) {
|
|
321
325
|
return i.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, F).replace(/-+$/g, "");
|
|
322
326
|
}
|
|
323
|
-
function
|
|
327
|
+
function v(i) {
|
|
324
328
|
return i ? J(i) : "";
|
|
325
329
|
}
|
|
326
330
|
const f = class f {
|
|
327
331
|
constructor(t) {
|
|
328
|
-
this._state = "idle", this._originals = null, this._originalsSaved = !1, this._events = [], !(typeof document > "u") && (f._activeInstance && f._activeInstance !== this && f._activeInstance.destroy(), this._venueName = t.venueName, this._venueAddress = t.venueAddress, this._venueTimeZone = t.venueTimeZone ||
|
|
332
|
+
this._state = "idle", this._originals = null, this._originalsSaved = !1, this._events = [], !(typeof document > "u") && (f._activeInstance && f._activeInstance !== this && f._activeInstance.destroy(), this._venueName = t.venueName, this._venueAddress = t.venueAddress, this._venueTimeZone = t.venueTimeZone || S(), this._baseUrl = t.baseUrl || window.location.origin + window.location.pathname, this._saveOriginals(), f._activeInstance = this);
|
|
329
333
|
}
|
|
330
334
|
// ---------------------------------------------------------------------------
|
|
331
335
|
// Private helpers
|
|
332
336
|
// ---------------------------------------------------------------------------
|
|
333
337
|
_saveOriginals() {
|
|
334
338
|
if (this._originalsSaved) return;
|
|
335
|
-
const t = document.querySelector(
|
|
339
|
+
const t = document.querySelector(
|
|
340
|
+
'link[rel="canonical"]'
|
|
341
|
+
), e = document.querySelector(
|
|
342
|
+
'meta[property="og:title"]'
|
|
343
|
+
), n = document.querySelector(
|
|
344
|
+
'meta[property="og:description"]'
|
|
345
|
+
), s = document.querySelector(
|
|
346
|
+
'meta[property="og:image"]'
|
|
347
|
+
), a = document.querySelector(
|
|
348
|
+
'meta[property="og:url"]'
|
|
349
|
+
), r = document.querySelector(
|
|
350
|
+
'meta[property="og:type"]'
|
|
351
|
+
), l = document.querySelector(
|
|
352
|
+
'meta[name="description"]'
|
|
353
|
+
);
|
|
336
354
|
this._originals = {
|
|
337
355
|
title: document.title,
|
|
338
356
|
canonicalHref: t?.getAttribute("href") ?? null,
|
|
339
357
|
ogTitle: e?.getAttribute("content") ?? null,
|
|
340
358
|
ogDescription: n?.getAttribute("content") ?? null,
|
|
341
|
-
ogImage:
|
|
359
|
+
ogImage: s?.getAttribute("content") ?? null,
|
|
342
360
|
ogUrl: a?.getAttribute("content") ?? null,
|
|
343
|
-
ogType:
|
|
361
|
+
ogType: r?.getAttribute("content") ?? null,
|
|
344
362
|
metaDescription: l?.getAttribute("content") ?? null
|
|
345
363
|
}, this._originalsSaved = !0;
|
|
346
364
|
}
|
|
@@ -353,16 +371,22 @@ const f = class f {
|
|
|
353
371
|
_setMeta(t, e) {
|
|
354
372
|
if (!(typeof document > "u"))
|
|
355
373
|
if (t.startsWith("og:")) {
|
|
356
|
-
let n = document.querySelector(
|
|
374
|
+
let n = document.querySelector(
|
|
375
|
+
`meta[property="${t}"]`
|
|
376
|
+
);
|
|
357
377
|
n ? n.setAttribute("content", e) : (n = document.createElement("meta"), n.setAttribute("property", t), n.setAttribute("content", e), n.setAttribute("data-micdrop", "og"), document.head.appendChild(n));
|
|
358
378
|
} else {
|
|
359
|
-
let n = document.querySelector(
|
|
379
|
+
let n = document.querySelector(
|
|
380
|
+
`meta[name="${t}"]`
|
|
381
|
+
);
|
|
360
382
|
n ? n.setAttribute("content", e) : (n = document.createElement("meta"), n.setAttribute("name", t), n.setAttribute("content", e), n.setAttribute("data-micdrop", "meta"), document.head.appendChild(n));
|
|
361
383
|
}
|
|
362
384
|
}
|
|
363
385
|
_setCanonical(t) {
|
|
364
386
|
if (typeof document > "u") return;
|
|
365
|
-
let e = document.querySelector(
|
|
387
|
+
let e = document.querySelector(
|
|
388
|
+
'link[rel="canonical"]'
|
|
389
|
+
);
|
|
366
390
|
e ? e.setAttribute("href", t) : (e = document.createElement("link"), e.setAttribute("rel", "canonical"), e.setAttribute("href", t), e.setAttribute("data-micdrop", "canonical"), document.head.appendChild(e));
|
|
367
391
|
}
|
|
368
392
|
_removeAllInjected() {
|
|
@@ -371,18 +395,24 @@ const f = class f {
|
|
|
371
395
|
_restoreOriginals() {
|
|
372
396
|
if (!(typeof document > "u" || !this._originals)) {
|
|
373
397
|
if (document.title = this._originals.title, this._originals.canonicalHref !== null) {
|
|
374
|
-
const t = document.querySelector(
|
|
398
|
+
const t = document.querySelector(
|
|
399
|
+
'link[rel="canonical"]'
|
|
400
|
+
);
|
|
375
401
|
t && t.setAttribute("href", this._originals.canonicalHref);
|
|
376
402
|
}
|
|
377
403
|
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;
|
|
378
404
|
}
|
|
379
405
|
}
|
|
380
406
|
_restoreMetaProperty(t, e) {
|
|
381
|
-
const n = document.querySelector(
|
|
407
|
+
const n = document.querySelector(
|
|
408
|
+
`meta[property="${t}"]`
|
|
409
|
+
);
|
|
382
410
|
e !== null && n ? n.setAttribute("content", e) : e === null && n?.hasAttribute("data-micdrop") && n.remove();
|
|
383
411
|
}
|
|
384
412
|
_restoreMetaName(t, e) {
|
|
385
|
-
const n = document.querySelector(
|
|
413
|
+
const n = document.querySelector(
|
|
414
|
+
`meta[name="${t}"]`
|
|
415
|
+
);
|
|
386
416
|
e !== null && n ? n.setAttribute("content", e) : e === null && n?.hasAttribute("data-micdrop") && n.remove();
|
|
387
417
|
}
|
|
388
418
|
_buildItemList(t) {
|
|
@@ -390,18 +420,18 @@ const f = class f {
|
|
|
390
420
|
"@context": "https://schema.org",
|
|
391
421
|
"@type": "ItemList",
|
|
392
422
|
itemListElement: t.map((e, n) => {
|
|
393
|
-
const
|
|
423
|
+
const s = e.slug || v(e.name);
|
|
394
424
|
return {
|
|
395
425
|
"@type": "ListItem",
|
|
396
426
|
position: n + 1,
|
|
397
|
-
url: `${this._baseUrl}?e=${e.id}-${
|
|
427
|
+
url: `${this._baseUrl}?e=${e.id}-${s}`
|
|
398
428
|
};
|
|
399
429
|
})
|
|
400
430
|
};
|
|
401
431
|
}
|
|
402
432
|
_buildEntityUrl(t, e, n) {
|
|
403
|
-
const
|
|
404
|
-
return `${this._baseUrl}?${
|
|
433
|
+
const s = t === "event" ? "e" : t === "series" ? "s" : "c";
|
|
434
|
+
return `${this._baseUrl}?${s}=${e}-${n}`;
|
|
405
435
|
}
|
|
406
436
|
// ---------------------------------------------------------------------------
|
|
407
437
|
// Public API
|
|
@@ -414,8 +444,8 @@ const f = class f {
|
|
|
414
444
|
if (typeof document > "u" || this._state === "destroyed") return;
|
|
415
445
|
if (e) {
|
|
416
446
|
this._venueName = e.name || this._venueName, this._venueAddress = e.address || e.googleLocationNameCache || this._venueAddress;
|
|
417
|
-
const
|
|
418
|
-
|
|
447
|
+
const s = e.timeZone || e.timezone;
|
|
448
|
+
s && (this._venueTimeZone = s);
|
|
419
449
|
}
|
|
420
450
|
this._events = t;
|
|
421
451
|
const n = this._buildItemList(t);
|
|
@@ -430,24 +460,28 @@ const f = class f {
|
|
|
430
460
|
if (typeof document > "u" || this._state === "destroyed") return;
|
|
431
461
|
if (this._saveOriginals(), n) {
|
|
432
462
|
this._venueName = n.name || this._venueName, this._venueAddress = n.address || n.googleLocationNameCache || this._venueAddress;
|
|
433
|
-
const
|
|
434
|
-
|
|
463
|
+
const u = n.timeZone || n.timezone;
|
|
464
|
+
u && (this._venueTimeZone = u);
|
|
435
465
|
}
|
|
436
|
-
let
|
|
466
|
+
let s = null, a = "", r = "", l = "", c = "", o = "";
|
|
437
467
|
if (t === "event") {
|
|
438
|
-
const
|
|
439
|
-
|
|
468
|
+
const u = e.slug || v(e.name || "");
|
|
469
|
+
o = this._buildEntityUrl(
|
|
470
|
+
"event",
|
|
471
|
+
e.id || e.eventID || "",
|
|
472
|
+
u
|
|
473
|
+
), s = j({
|
|
440
474
|
event: e,
|
|
441
475
|
venue: {
|
|
442
476
|
name: this._venueName,
|
|
443
477
|
googleLocationNameCache: this._venueAddress
|
|
444
478
|
},
|
|
445
479
|
venueTimeZone: this._venueTimeZone,
|
|
446
|
-
eventUrl:
|
|
447
|
-
}), a = e.name || "",
|
|
480
|
+
eventUrl: o
|
|
481
|
+
}), a = e.name || "", r = e.description || "", l = e.eventSummary || "", c = e.image || e.coverImage || e.ShowImage || "";
|
|
448
482
|
} else if (t === "series") {
|
|
449
|
-
const
|
|
450
|
-
|
|
483
|
+
const u = e.slug || v(e.title || "");
|
|
484
|
+
o = this._buildEntityUrl("series", e.id || "", u), s = x({
|
|
451
485
|
series: {
|
|
452
486
|
...e,
|
|
453
487
|
venue: {
|
|
@@ -456,17 +490,25 @@ const f = class f {
|
|
|
456
490
|
},
|
|
457
491
|
timeZone: this._venueTimeZone
|
|
458
492
|
},
|
|
459
|
-
baseEventUrl:
|
|
460
|
-
}), a = e.title || "",
|
|
493
|
+
baseEventUrl: o
|
|
494
|
+
}), a = e.title || "", r = e.description || "", l = e.eventSummary || "", c = e.image || "";
|
|
461
495
|
} else if (t === "collection") {
|
|
462
|
-
const
|
|
463
|
-
|
|
496
|
+
const u = e.slug || v(e.collectionTitle || "");
|
|
497
|
+
o = this._buildEntityUrl("collection", e.id || "", u), s = B({
|
|
464
498
|
collection: e,
|
|
465
|
-
baseEventUrl:
|
|
499
|
+
baseEventUrl: o,
|
|
466
500
|
defaultTimeZone: this._venueTimeZone
|
|
467
|
-
}), a = e.collectionTitle || "",
|
|
501
|
+
}), a = e.collectionTitle || "", r = e.description || "", l = e.summary || "", c = e.coverImage || "";
|
|
468
502
|
}
|
|
469
|
-
|
|
503
|
+
s && this._injectJsonLd(s), o && this._setCanonical(o), a && this._setMeta("og:title", a);
|
|
504
|
+
const d = y(r, 160) || y(l, 160);
|
|
505
|
+
d ? this._setMeta("og:description", d) : this._restoreMetaProperty(
|
|
506
|
+
"og:description",
|
|
507
|
+
this._originals?.ogDescription ?? null
|
|
508
|
+
), c && this._setMeta("og:image", c), o && this._setMeta("og:url", o), this._setMeta("og:type", "website"), this._setMeta("twitter:card", "summary_large_image"), d ? this._setMeta("description", d) : this._restoreMetaName(
|
|
509
|
+
"description",
|
|
510
|
+
this._originals?.metaDescription ?? null
|
|
511
|
+
), a && (document.title = `${a} | ${this._venueName}`), this._state = "entity";
|
|
470
512
|
}
|
|
471
513
|
/**
|
|
472
514
|
* Called when the user navigates back to the event listing.
|
|
@@ -497,11 +539,11 @@ export {
|
|
|
497
539
|
j as buildEventJsonLd,
|
|
498
540
|
Z as buildOffers,
|
|
499
541
|
q as buildPerformers,
|
|
500
|
-
|
|
501
|
-
|
|
542
|
+
I as buildPostalAddress,
|
|
543
|
+
x as buildSeriesJsonLd,
|
|
502
544
|
R as escapeJsonLdForScript,
|
|
503
|
-
|
|
504
|
-
|
|
545
|
+
_ as formatDateTimeWithOffset,
|
|
546
|
+
P as getEventStatus,
|
|
505
547
|
E as getTicketAvailability,
|
|
506
548
|
w as parseAddressToPostal
|
|
507
549
|
};
|