@getmicdrop/venue-calendar 4.0.108 → 4.0.110

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/README.md +740 -740
  2. package/dist/CartView-bMHSoj75.js +2475 -0
  3. package/dist/CartView-bMHSoj75.js.map +1 -0
  4. package/dist/{Checkout-C4zUFYYG.js → Checkout-DDXZc-yj.js} +266 -276
  5. package/dist/Checkout-DDXZc-yj.js.map +1 -0
  6. package/dist/{Checkout-CACB_Qvi.js → Checkout-DG2iHmHC.js} +215 -214
  7. package/dist/Checkout-DG2iHmHC.js.map +1 -0
  8. package/dist/{CheckoutTimer-D5llSBPs.js → CheckoutTimer-Bwq6a_Hl.js} +5 -5
  9. package/dist/CheckoutTimer-Bwq6a_Hl.js.map +1 -0
  10. package/dist/{ClockIcon-BJnxLZ4f.js → ClockIcon-ZgeMNNI1.js} +2 -2
  11. package/dist/ClockIcon-ZgeMNNI1.js.map +1 -0
  12. package/dist/{CollectionView-BLpwWRcN.js → CollectionView-1pf2C4kX.js} +85 -84
  13. package/dist/CollectionView-1pf2C4kX.js.map +1 -0
  14. package/dist/{Event-DXp4Ypv4.js → Event-D3o0fguY.js} +1693 -1611
  15. package/dist/Event-D3o0fguY.js.map +1 -0
  16. package/dist/EventPage-DqO-AV8i.js +995 -0
  17. package/dist/EventPage-DqO-AV8i.js.map +1 -0
  18. package/dist/{Heading-C_Pc_j8f.js → Heading-pURRwiIC.js} +5 -5
  19. package/dist/Heading-pURRwiIC.js.map +1 -0
  20. package/dist/{ScarcityBadge-CSi-i0-w.js → ScarcityBadge-ykz32KS9.js} +25 -25
  21. package/dist/ScarcityBadge-ykz32KS9.js.map +1 -0
  22. package/dist/SeriesPage-BmNk80cF.js +34 -0
  23. package/dist/SeriesPage-BmNk80cF.js.map +1 -0
  24. package/dist/{Spinner-BFIjCOTb.js → Spinner-OGA1hrc5.js} +2 -2
  25. package/dist/Spinner-OGA1hrc5.js.map +1 -0
  26. package/dist/Success-DLlQ54_-.js +896 -0
  27. package/dist/Success-DLlQ54_-.js.map +1 -0
  28. package/dist/{Text-tWGKQJab.js → Text-DMpMLgcU.js} +27 -27
  29. package/dist/Text-DMpMLgcU.js.map +1 -0
  30. package/dist/{VenueCalendar-Dhoi9hF5.js → VenueCalendar-ClSRsS6u.js} +8133 -8270
  31. package/dist/VenueCalendar-ClSRsS6u.js.map +1 -0
  32. package/dist/{ViewTicketsEmbed-BrXae6cK.js → ViewTicketsEmbed-5LMG2xwn.js} +151 -150
  33. package/dist/ViewTicketsEmbed-5LMG2xwn.js.map +1 -0
  34. package/dist/__SKIP_PATHS__-BtJ0tS93.js +10 -0
  35. package/dist/__SKIP_PATHS__-BtJ0tS93.js.map +1 -0
  36. package/dist/api/api/events.d.ts +28 -12
  37. package/dist/api/api/index.d.ts +1 -1
  38. package/dist/api/api/route-manifest.d.ts +179 -0
  39. package/dist/api/api.cjs +1 -1
  40. package/dist/api/api.cjs.map +1 -1
  41. package/dist/api/api.mjs +388 -385
  42. package/dist/api/api.mjs.map +1 -1
  43. package/dist/api/types.d.ts +483 -483
  44. package/dist/{labels-CGndTgO9.js → labels-Ws4MJjH5.js} +141 -136
  45. package/dist/labels-Ws4MJjH5.js.map +1 -0
  46. package/dist/{modalManager.svelte-BgW5Xd6y.js → modalManager.svelte-BPA2JF6c.js} +2 -2
  47. package/dist/modalManager.svelte-BPA2JF6c.js.map +1 -0
  48. package/dist/navigation--gZASiSa.js +19 -0
  49. package/dist/navigation--gZASiSa.js.map +1 -0
  50. package/dist/promo-vXx1bxQm.js +29 -0
  51. package/dist/promo-vXx1bxQm.js.map +1 -0
  52. package/dist/seo/helpers.d.ts +11 -0
  53. package/dist/seo/seo.cjs +1 -1
  54. package/dist/seo/seo.cjs.map +1 -1
  55. package/dist/seo/seo.mjs +463 -325
  56. package/dist/seo/seo.mjs.map +1 -1
  57. package/dist/seo/types.d.ts +0 -1
  58. package/dist/{showcase-state-options-BxLP2R1L.js → showcase-state-options-9SoS5WuT.js} +21 -21
  59. package/dist/showcase-state-options-9SoS5WuT.js.map +1 -0
  60. package/dist/{transform-CVOgA-Ky.js → transform-BD9xXAq7.js} +83 -79
  61. package/dist/transform-BD9xXAq7.js.map +1 -0
  62. package/dist/types/index.d.ts +459 -455
  63. package/dist/utm-rT0TPh8G.js +288 -0
  64. package/dist/utm-rT0TPh8G.js.map +1 -0
  65. package/dist/venue-calendar.css +1 -1
  66. package/dist/venue-calendar.es.js +4 -4
  67. package/dist/venue-calendar.iife.js +49 -49
  68. package/dist/venue-calendar.iife.js.map +1 -1
  69. package/dist/venue-calendar.umd.js +44 -44
  70. package/dist/venue-calendar.umd.js.map +1 -1
  71. package/package.json +199 -195
  72. package/src/lib/theme.js +222 -222
  73. package/dist/CartView-eQNOdQSz.js +0 -2354
  74. package/dist/CartView-eQNOdQSz.js.map +0 -1
  75. package/dist/Checkout-C4zUFYYG.js.map +0 -1
  76. package/dist/Checkout-CACB_Qvi.js.map +0 -1
  77. package/dist/CheckoutTimer-D5llSBPs.js.map +0 -1
  78. package/dist/ClockIcon-BJnxLZ4f.js.map +0 -1
  79. package/dist/CollectionView-BLpwWRcN.js.map +0 -1
  80. package/dist/Event-DXp4Ypv4.js.map +0 -1
  81. package/dist/EventPage-Dfxyzfg2.js +0 -949
  82. package/dist/EventPage-Dfxyzfg2.js.map +0 -1
  83. package/dist/Heading-C_Pc_j8f.js.map +0 -1
  84. package/dist/ScarcityBadge-CSi-i0-w.js.map +0 -1
  85. package/dist/SeriesPage-bPZlyzQ6.js +0 -33
  86. package/dist/SeriesPage-bPZlyzQ6.js.map +0 -1
  87. package/dist/Spinner-BFIjCOTb.js.map +0 -1
  88. package/dist/Success-Cv8d2syu.js +0 -886
  89. package/dist/Success-Cv8d2syu.js.map +0 -1
  90. package/dist/Text-tWGKQJab.js.map +0 -1
  91. package/dist/VenueCalendar-Dhoi9hF5.js.map +0 -1
  92. package/dist/ViewTicketsEmbed-BrXae6cK.js.map +0 -1
  93. package/dist/labels-CGndTgO9.js.map +0 -1
  94. package/dist/modalManager.svelte-BgW5Xd6y.js.map +0 -1
  95. package/dist/promo-WWbp2OWI.js +0 -12
  96. package/dist/promo-WWbp2OWI.js.map +0 -1
  97. package/dist/showcase-state-options-BxLP2R1L.js.map +0 -1
  98. package/dist/transform-CVOgA-Ky.js.map +0 -1
package/dist/seo/seo.mjs CHANGED
@@ -1,7 +1,7 @@
1
- function S() {
1
+ function E() {
2
2
  return "America/Los_Angeles";
3
3
  }
4
- const O = /<\/(?:p|div|h[1-6]|li|ul|ol|blockquote|tr)>/gi, C = /<br\s*\/?>/gi, U = /<[^>]*>/g, $ = {
4
+ const V = /<\/(?:p|div|h[1-6]|li|ul|ol|blockquote|tr)>/gi, x = /<br\s*\/?>/gi, z = /<[^>]*>/g, J = {
5
5
  "&amp;": "&",
6
6
  "&lt;": "<",
7
7
  "&gt;": ">",
@@ -10,30 +10,179 @@ const O = /<\/(?:p|div|h[1-6]|li|ul|ol|blockquote|tr)>/gi, C = /<br\s*\/?>/gi, U
10
10
  "&apos;": "'",
11
11
  "&nbsp;": " "
12
12
  };
13
- function M(i) {
14
- return i.replace(/&#x([0-9a-f]+);/gi, (t, e) => A(parseInt(e, 16))).replace(/&#(\d+);/g, (t, e) => A(Number(e))).replace(/&[a-z0-9]+;/gi, (t) => $[t.toLowerCase()] ?? t);
13
+ function j(t) {
14
+ return t.replace(/&#x([0-9a-f]+);/gi, (e, n) => v(parseInt(n, 16))).replace(/&#(\d+);/g, (e, n) => v(Number(n))).replace(/&[a-z0-9]+;/gi, (e) => J[e.toLowerCase()] ?? e);
15
15
  }
16
- function A(i) {
17
- return Number.isFinite(i) && i > 0 && i <= 1114111 ? String.fromCodePoint(i) : "";
16
+ function v(t) {
17
+ return Number.isFinite(t) && t > 0 && t <= 1114111 ? String.fromCodePoint(t) : "";
18
18
  }
19
- function y(i, t) {
20
- if (!i)
19
+ function I(t, e) {
20
+ if (!t)
21
21
  return "";
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() + "…";
22
+ let n = String(t).replace(x, " ").replace(V, " ").replace(z, "");
23
+ if (n = j(n).replace(/\s+/g, " ").trim(), e && e > 0 && n.length > e) {
24
+ const i = n.slice(0, e), s = i.lastIndexOf(" ");
25
+ n = (s > 40 ? i.slice(0, s) : i).trimEnd() + "…";
26
26
  }
27
- return e;
27
+ return n;
28
28
  }
29
- function R(i) {
30
- return i.replace(/</g, "\\u003c").replace(/>/g, "\\u003e").replace(/&/g, "\\u0026");
29
+ function w() {
30
+ return /* @__PURE__ */ new Date();
31
31
  }
32
- function _(i, t) {
33
- if (!i) return null;
34
- const e = new Date(i);
35
- if (isNaN(e.getTime())) return null;
36
- const n = {
32
+ class F extends Error {
33
+ constructor(e, n, i = {}) {
34
+ super(e), this.name = "AppError", this.code = n, this.status = i.status ?? 500, this.details = i.details, this.timestamp = w(), this.recoverable = i.recoverable ?? !0, this.cause = i.cause, Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);
35
+ }
36
+ /**
37
+ * Serialize error for logging/reporting
38
+ */
39
+ toJSON() {
40
+ return {
41
+ name: this.name,
42
+ code: this.code,
43
+ message: this.message,
44
+ status: this.status,
45
+ details: this.details,
46
+ timestamp: this.timestamp.toISOString(),
47
+ recoverable: this.recoverable,
48
+ stack: this.stack,
49
+ cause: this.cause?.message
50
+ };
51
+ }
52
+ /**
53
+ * Get user-friendly message.
54
+ *
55
+ * Subclasses override this and may consult an optional `ErrorMessageResolver`
56
+ * to localize. The base class returns the raw message and ignores any
57
+ * resolver (the parameter exists only so the signature is uniform across the
58
+ * hierarchy).
59
+ */
60
+ getUserMessage(e) {
61
+ return this.message;
62
+ }
63
+ /**
64
+ * Check if this error type is retryable
65
+ */
66
+ isRetryable() {
67
+ return this.recoverable;
68
+ }
69
+ }
70
+ class k extends F {
71
+ constructor(e, n, i = {}) {
72
+ super(e, n, {
73
+ // 422 Unprocessable — the value itself failed an invariant. Not a 500
74
+ // (nothing crashed server-side) and not retryable (re-running the same
75
+ // bad value fails identically), so recoverable defaults to false.
76
+ status: 422,
77
+ recoverable: !1,
78
+ ...i
79
+ }), this.name = "ValueGuardError";
80
+ }
81
+ }
82
+ class _ extends k {
83
+ constructor(e, n, i) {
84
+ super(e, n, { details: i }), this.name = "DateTimeError";
85
+ }
86
+ }
87
+ var d;
88
+ (function(t) {
89
+ t.INVALID_TIMEZONE = "INVALID_TIMEZONE", t.INVALID_ISO_STRING = "INVALID_ISO_STRING", t.INVALID_DATE = "INVALID_DATE", t.INVALID_TIME = "INVALID_TIME", t.MISSING_TIMEZONE = "MISSING_TIMEZONE", t.PARSE_ERROR = "PARSE_ERROR";
90
+ })(d || (d = {}));
91
+ function M(t, e, n, i = 0, s = 0, r = 0) {
92
+ const o = new Date(Date.UTC(t, e - 1, n, i, s, r));
93
+ return t >= 0 && t <= 99 && o.setUTCFullYear(t), o;
94
+ }
95
+ const B = /^(\d{4})-(\d{2})-(\d{2})(?:T\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:Z|[+-]\d{2}:\d{2}))?$/, H = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?$/;
96
+ function U(t, e, n) {
97
+ const i = M(t, e, n);
98
+ return i.getUTCFullYear() === t && i.getUTCMonth() === e - 1 && i.getUTCDate() === n;
99
+ }
100
+ const W = /^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,9}))? ?([+-])(\d{2}):?(\d{2})(?: [A-Za-z][A-Za-z0-9_/+-]*)?(?: m=[+-][\d.]+)?$/, P = M(1, 1, 1).getTime();
101
+ function C(t) {
102
+ const e = B.exec(t);
103
+ if (e) {
104
+ const [, i, s, r] = e;
105
+ return { iso: t, year: +i, month: +s, day: +r };
106
+ }
107
+ const n = W.exec(t);
108
+ if (n) {
109
+ const [, i, s, r, o, c, u, a, m, l, h] = n, f = a ? `.${a.slice(0, 3).padEnd(3, "0")}` : "";
110
+ return {
111
+ iso: `${i}-${s}-${r}T${o}:${c}:${u}${f}${m}${l}:${h}`,
112
+ year: +i,
113
+ month: +s,
114
+ day: +r
115
+ };
116
+ }
117
+ return null;
118
+ }
119
+ function K(t) {
120
+ if (typeof t == "number") {
121
+ if (!Number.isFinite(t))
122
+ return null;
123
+ const i = new Date(t);
124
+ return Number.isNaN(i.getTime()) ? null : i;
125
+ }
126
+ if (typeof t != "string")
127
+ return null;
128
+ const e = C(t.trim());
129
+ if (!e || !U(e.year, e.month, e.day))
130
+ return null;
131
+ const n = new Date(e.iso);
132
+ return Number.isNaN(n.getTime()) ? null : n;
133
+ }
134
+ function Y(t) {
135
+ const e = K(t);
136
+ return e !== null && e.getTime() === P;
137
+ }
138
+ function O(t, e) {
139
+ if (t.getTime() === P)
140
+ throw new _(`toInstant: ${JSON.stringify(e)} is the backend's UNSET marker (Go's zero time.Time), not a moment — the field was never filled in. toInstant is the REQUIRED-timestamp door, so an unset value here is a bug: returning the year-1 instant it names would sort this row ahead of every real date and answer "yes" to "has this started?". If the field is allowed to be unset, read it with toInstantOrNull (null), ask isAbsentTimestamp why it is missing, and order it with compareWireInstants.`, d.INVALID_ISO_STRING, { value: e });
141
+ }
142
+ function A(t, e) {
143
+ if (!(t instanceof Date) || Number.isNaN(t.getTime()))
144
+ throw new _(`${e} must be a valid Date`, d.INVALID_DATE, { value: t });
145
+ }
146
+ function D(t, e) {
147
+ return A(t, "compareInstants(a)"), A(e, "compareInstants(b)"), t.getTime() - e.getTime();
148
+ }
149
+ function Q(t) {
150
+ if (typeof t == "number") {
151
+ if (!Number.isFinite(t))
152
+ throw new _(`toInstant: epoch milliseconds must be a finite number, got ${t}`, d.INVALID_DATE, { value: t });
153
+ const o = new Date(t);
154
+ return A(o, "toInstant(value)"), O(o, t), o;
155
+ }
156
+ if (typeof t != "string" || t.trim() === "")
157
+ throw new _(`toInstant: a UTC ISO timestamp or epoch ms is required, got ${JSON.stringify(t)}`, typeof t == "string" ? d.INVALID_ISO_STRING : d.INVALID_DATE, { value: t });
158
+ const e = C(t);
159
+ if (!e)
160
+ throw H.test(t) ? new _(`toInstant: ${JSON.stringify(t)} carries a time but no timezone, so it is not an instant — it would resolve on the viewer's clock and land on a different calendar day for a viewer in Los Angeles than one in London. Send a UTC wire timestamp (2026-06-09T20:00:00Z) or an explicit offset (2026-06-09T13:00:00-07:00). If this is a local wall-clock value, it belongs in datetime/local or parseLocalToUTC(value, timezone), not here.`, d.MISSING_TIMEZONE, { value: t }) : new _(`toInstant: not an ISO-8601 timestamp: ${JSON.stringify(t)}`, d.INVALID_ISO_STRING, { value: t });
161
+ const { year: n, month: i, day: s } = e;
162
+ if (!U(n, i, s))
163
+ throw new _(`toInstant: ${n}-${i}-${s} is not a real calendar date: ${JSON.stringify(t)}`, d.INVALID_ISO_STRING, { value: t });
164
+ const r = new Date(e.iso);
165
+ if (Number.isNaN(r.getTime()))
166
+ throw new _(`toInstant: ISO-8601 shaped but not a real instant: ${JSON.stringify(t)}`, d.INVALID_ISO_STRING, { value: t });
167
+ return O(r, t), r;
168
+ }
169
+ function $(t) {
170
+ if (t == null || typeof t == "string" && t.trim() === "" || Y(t))
171
+ return null;
172
+ try {
173
+ return Q(t);
174
+ } catch {
175
+ return null;
176
+ }
177
+ }
178
+ function le(t) {
179
+ return t.replace(/</g, "\\u003c").replace(/>/g, "\\u003e").replace(/&/g, "\\u0026");
180
+ }
181
+ function S(t, e) {
182
+ if (!t) return null;
183
+ const n = new Date(t);
184
+ if (isNaN(n.getTime())) return null;
185
+ const i = {
37
186
  year: "numeric",
38
187
  month: "2-digit",
39
188
  day: "2-digit",
@@ -45,161 +194,171 @@ function _(i, t) {
45
194
  };
46
195
  let s;
47
196
  try {
48
- s = new Intl.DateTimeFormat("en-US", { ...n, timeZone: t });
197
+ s = new Intl.DateTimeFormat("en-US", { ...i, timeZone: e });
49
198
  } catch {
50
199
  s = new Intl.DateTimeFormat("en-US", {
51
- ...n,
52
- timeZone: S()
200
+ ...i,
201
+ timeZone: E()
53
202
  });
54
203
  }
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");
56
- let p = "+00:00";
57
- if (g) {
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}`;
204
+ const r = s.formatToParts(n), o = (g) => r.find((T) => T.type === g)?.value || "", c = o("year"), u = o("month"), a = o("day"), m = o("hour"), l = o("minute"), h = o("second"), f = o("timeZoneName");
205
+ let y = "+00:00";
206
+ if (f) {
207
+ const g = f.match(/GMT([+-])(\d+)(?::(\d+))?/);
208
+ if (g) {
209
+ const T = g[1], G = g[2].padStart(2, "0"), q = g[3] || "00";
210
+ y = `${T}${G}:${q}`;
62
211
  }
63
212
  }
64
- return `${l}-${c}-${o}T${d}:${u}:${h}${p}`;
213
+ return `${c}-${u}-${a}T${m}:${l}:${h}${y}`;
65
214
  }
66
- function w(i) {
67
- if (!i) return null;
68
- const t = i.split(",").map((s) => s.trim());
69
- if (t.length < 2)
215
+ function X(t) {
216
+ if (!t) return null;
217
+ const e = t.split(",").map((s) => s.trim());
218
+ if (e.length < 2)
70
219
  return {
71
220
  "@type": "PostalAddress",
72
- streetAddress: i,
221
+ streetAddress: t,
73
222
  addressCountry: "US"
74
223
  };
75
- const n = t[t.length - 1].match(/^([A-Z]{2})\s+(\d{5}(?:-\d{4})?)$/);
76
- return n && t.length >= 3 ? {
224
+ const i = e[e.length - 1].match(/^([A-Z]{2})\s+(\d{5}(?:-\d{4})?)$/);
225
+ return i && e.length >= 3 ? {
77
226
  "@type": "PostalAddress",
78
- streetAddress: t.slice(0, -2).join(", "),
79
- addressLocality: t[t.length - 2],
80
- addressRegion: n[1],
81
- postalCode: n[2],
227
+ streetAddress: e.slice(0, -2).join(", "),
228
+ addressLocality: e[e.length - 2],
229
+ addressRegion: i[1],
230
+ postalCode: i[2],
82
231
  addressCountry: "US"
83
232
  } : {
84
233
  "@type": "PostalAddress",
85
- streetAddress: t[0],
86
- addressLocality: t.slice(1).join(", "),
234
+ streetAddress: e[0],
235
+ addressLocality: e.slice(1).join(", "),
87
236
  addressCountry: "US"
88
237
  };
89
238
  }
90
- function I(i, t) {
91
- if (i && (i.city || i.state || i.postalCode)) {
92
- const e = { "@type": "PostalAddress" };
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;
239
+ function Z(t, e) {
240
+ if (t && (t.city || t.state || t.postalCode)) {
241
+ const n = { "@type": "PostalAddress" };
242
+ return t.address && (n.streetAddress = t.address), t.city && (n.addressLocality = t.city), t.state && (n.addressRegion = t.state), t.postalCode && (n.postalCode = t.postalCode), n.addressCountry = t.country || "US", n;
94
243
  }
95
- return w(i && i.address || t || null);
244
+ return X(t && t.address || e || null);
96
245
  }
97
- function P(i) {
98
- if (!i) return "https://schema.org/EventScheduled";
99
- const t = i.toLowerCase();
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";
246
+ function R(t) {
247
+ if (!t) return "https://schema.org/EventScheduled";
248
+ const e = t.toLowerCase();
249
+ 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";
101
250
  }
102
- function E(i) {
103
- if ((i.remainingCapacity ?? i.quantityRemaining ?? i.quantity) === 0 || i.soldOut)
251
+ function ee(t) {
252
+ if ((t.remainingCapacity ?? t.quantityRemaining ?? t.quantity) === 0 || t.soldOut)
104
253
  return "https://schema.org/SoldOut";
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";
107
- }
108
- function Z(i, t) {
109
- if (!i || i.length === 0) return null;
110
- const e = i.filter((l) => {
111
- const c = l.visibility ?? 0, o = c === 0 || c === 1, d = l.salesChannel !== 2;
112
- return o && d;
113
- });
114
- if (e.length === 0) return null;
115
- const n = e.map((l) => parseFloat(String(l.price ?? 0))).filter((l) => !isNaN(l));
116
- if (n.length === 0) return null;
117
- const s = Math.min(...n), a = Math.max(...n);
118
- if (s !== a)
119
- return {
120
- "@type": "AggregateOffer",
121
- lowPrice: s,
122
- highPrice: a,
123
- priceCurrency: "USD",
124
- availability: E(e[0]),
125
- url: t || void 0,
126
- validFrom: e[0]?.salesBegin || e[0]?.salesStart || void 0
127
- };
128
- const r = e[0];
129
- return {
254
+ const n = w(), i = $(
255
+ t.salesBegin || t.salesStart || t.saleBegin || t.onSaleStart
256
+ ), s = $(
257
+ t.salesEnd || t.saleEnd || t.onSaleEnd
258
+ );
259
+ return i && D(i, n) > 0 ? "https://schema.org/PreOrder" : s && D(s, n) < 0 ? "https://schema.org/SoldOut" : "https://schema.org/InStock";
260
+ }
261
+ function b(t, e, n, i = {}) {
262
+ return t !== e ? {
263
+ "@type": "AggregateOffer",
264
+ lowPrice: t,
265
+ highPrice: e,
266
+ priceCurrency: "USD",
267
+ availability: n,
268
+ ...i
269
+ } : {
130
270
  "@type": "Offer",
131
- price: s,
271
+ price: t,
132
272
  priceCurrency: "USD",
133
- availability: E(r),
134
- url: t || void 0,
135
- validFrom: r?.salesBegin || r?.salesStart || void 0
273
+ availability: n,
274
+ ...i
136
275
  };
137
276
  }
138
- function q(i) {
139
- if (!i || i.length === 0) return null;
140
- const t = i.filter((e) => {
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;
277
+ function te(t, e) {
278
+ if (!t || t.length === 0) return null;
279
+ const n = t.filter((c) => {
280
+ const u = c.visibility ?? 0, a = u === 0 || u === 1, m = c.salesChannel !== 2;
281
+ return a && m;
143
282
  });
144
- return t.length === 0 ? null : t.map((e) => {
145
- const n = e.RosterPerformer?.User?.performerProfile;
283
+ if (n.length === 0) return null;
284
+ const i = n.map((c) => parseFloat(String(c.price ?? 0))).filter((c) => !isNaN(c));
285
+ if (i.length === 0) return null;
286
+ const s = Math.min(...i), r = Math.max(...i), o = n[0];
287
+ return b(
288
+ s,
289
+ r,
290
+ ee(o),
291
+ {
292
+ url: e || void 0,
293
+ validFrom: o?.salesBegin || o?.salesStart || void 0
294
+ }
295
+ );
296
+ }
297
+ function ne(t) {
298
+ if (!t || t.length === 0) return null;
299
+ const e = t.filter((n) => {
300
+ const i = n.acceptedState === 2, s = !n.shouldBeHidden, r = n.RosterPerformer?.User?.performerProfile, o = r?.firstName || r?.lastName || r?.displayName;
301
+ return i && s && o;
302
+ });
303
+ return e.length === 0 ? null : e.map((n) => {
304
+ const i = n.RosterPerformer?.User?.performerProfile;
146
305
  return {
147
306
  "@type": "PerformingGroup",
148
- name: n?.displayName || [n?.firstName, n?.lastName].filter(Boolean).join(" ")
307
+ name: i?.displayName || [i?.firstName, i?.lastName].filter(Boolean).join(" ")
149
308
  };
150
309
  });
151
310
  }
152
- function j(i) {
311
+ function ie(t) {
153
312
  const {
154
- event: t,
155
- venue: e,
156
- venueTimeZone: n = S(),
313
+ event: e,
314
+ venue: n,
315
+ venueTimeZone: i = E(),
157
316
  eventUrl: s,
158
- organizer: a
159
- } = i;
160
- if (!t) return null;
161
- const r = _(
162
- t.startDateTime,
163
- n
317
+ organizer: r
318
+ } = t;
319
+ if (!e) return null;
320
+ const o = S(
321
+ e.startDateTime,
322
+ i
164
323
  );
165
- if (!t.name || !r || !e?.name)
324
+ if (!e.name || !o || !n?.name)
166
325
  return null;
167
- const l = I(
168
- e,
169
- e?.googleLocationNameCache
170
- ), c = {
326
+ const c = Z(
327
+ n,
328
+ n?.googleLocationNameCache
329
+ ), u = {
171
330
  "@type": "Place",
172
- name: e.name
331
+ name: n.name
173
332
  };
174
- l && (c.address = l);
175
- const o = {
333
+ c && (u.address = c);
334
+ const a = {
176
335
  "@context": "https://schema.org",
177
336
  "@type": "Event",
178
- name: t.name,
179
- startDate: r,
180
- eventStatus: P(t.status),
337
+ name: e.name,
338
+ startDate: o,
339
+ eventStatus: R(e.status),
181
340
  eventAttendanceMode: "https://schema.org/OfflineEventAttendanceMode",
182
- location: c
183
- }, d = _(t.endDateTime, n);
184
- d && (o.endDate = d);
185
- const u = y(t.description) || t.eventSummary;
186
- u && (o.description = u);
187
- const h = t.image || t.coverImage || t.ShowImage;
188
- h && (o.image = [h]);
189
- const g = Z(t.availableTickets, s);
190
- g && (o.offers = g);
191
- const p = q(t.performers);
192
- if (p && p.length > 0 && (o.performer = p), a?.name) {
193
- const m = {
341
+ location: u
342
+ }, m = S(e.endDateTime, i);
343
+ m && (a.endDate = m);
344
+ const l = I(e.description) || e.eventSummary;
345
+ l && (a.description = l);
346
+ const h = e.image || e.coverImage || e.ShowImage;
347
+ h && (a.image = [h]);
348
+ const f = te(e.availableTickets, s);
349
+ f && (a.offers = f);
350
+ const y = ne(e.performers);
351
+ if (y && y.length > 0 && (a.performer = y), r?.name) {
352
+ const g = {
194
353
  "@type": "Organization",
195
- name: a.name
354
+ name: r.name
196
355
  };
197
- a.url && (m.url = a.url), o.organizer = m;
356
+ r.url && (g.url = r.url), a.organizer = g;
198
357
  }
199
- return s && (o.url = s), o;
358
+ return s && (a.url = s), a;
200
359
  }
201
- function N(i) {
202
- switch (i) {
360
+ function se(t) {
361
+ switch (t) {
203
362
  case "available":
204
363
  return "https://schema.org/InStock";
205
364
  case "sold_out":
@@ -212,226 +371,205 @@ function N(i) {
212
371
  return "https://schema.org/InStock";
213
372
  }
214
373
  }
215
- function z(i, t) {
216
- if (!i || i.length === 0) return null;
217
- const e = i.filter(
218
- (r) => r.status !== "sold_out" && r.status !== "ended"
374
+ function re(t, e) {
375
+ if (!t || t.length === 0) return null;
376
+ const n = t.filter(
377
+ (s) => s.status !== "sold_out" && s.status !== "ended"
219
378
  );
220
- if (e.length === 0) {
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);
224
- return l !== c ? {
225
- "@type": "AggregateOffer",
226
- lowPrice: l,
227
- highPrice: c,
228
- priceCurrency: "USD",
229
- availability: "https://schema.org/SoldOut"
230
- } : {
231
- "@type": "Offer",
232
- price: l,
233
- priceCurrency: "USD",
234
- availability: "https://schema.org/SoldOut"
235
- };
379
+ if (n.length === 0) {
380
+ const s = t.map((r) => r.price).filter((r) => !isNaN(r));
381
+ return s.length === 0 ? null : b(
382
+ Math.min(...s),
383
+ Math.max(...s),
384
+ "https://schema.org/SoldOut"
385
+ );
236
386
  }
237
- const n = e.map((r) => r.price).filter((r) => !isNaN(r));
238
- if (n.length === 0) return null;
239
- const s = Math.min(...n), a = Math.max(...n);
240
- return s !== a ? {
241
- "@type": "AggregateOffer",
242
- lowPrice: s,
243
- highPrice: a,
244
- priceCurrency: "USD",
245
- availability: N(e[0].status)
246
- } : {
247
- "@type": "Offer",
248
- price: s,
249
- priceCurrency: "USD",
250
- availability: N(e[0].status)
251
- };
387
+ const i = n.map((s) => s.price).filter((s) => !isNaN(s));
388
+ return i.length === 0 ? null : b(
389
+ Math.min(...i),
390
+ Math.max(...i),
391
+ se(n[0].status)
392
+ );
252
393
  }
253
- function x(i) {
254
- const { series: t, baseEventUrl: e } = i;
255
- if (!t.title || !t.occurrences || t.occurrences.length === 0 || !t.venue?.name) return null;
256
- const n = I(
257
- t.venue,
258
- t.venue.googleLocationNameCache
394
+ function oe(t) {
395
+ const { series: e, baseEventUrl: n } = t;
396
+ if (!e.title || !e.occurrences || e.occurrences.length === 0 || !e.venue?.name) return null;
397
+ const i = Z(
398
+ e.venue,
399
+ e.venue.googleLocationNameCache
259
400
  ), s = {
260
401
  "@type": "Place",
261
- name: t.venue.name
402
+ name: e.venue.name
262
403
  };
263
- n && (s.address = n);
264
- const a = {
404
+ i && (s.address = i);
405
+ const r = {
265
406
  "@context": "https://schema.org",
266
407
  "@type": "EventSeries",
267
- name: t.title,
408
+ name: e.title,
268
409
  location: s
269
- }, r = y(t.description) || t.eventSummary;
270
- r && (a.description = r), t.image && (a.image = [t.image]);
271
- const l = t.performers?.filter((o) => o.displayName);
272
- l && l.length > 0 && (a.performer = l.map((o) => ({
410
+ }, o = I(e.description) || e.eventSummary;
411
+ o && (r.description = o), e.image && (r.image = [e.image]);
412
+ const c = e.performers?.filter((a) => a.displayName);
413
+ c && c.length > 0 && (r.performer = c.map((a) => ({
273
414
  "@type": "PerformingGroup",
274
- name: o.displayName
415
+ name: a.displayName
275
416
  })));
276
- const c = [];
277
- for (const o of t.occurrences) {
278
- const d = _(
279
- o.startDateTime,
280
- t.timeZone
417
+ const u = [];
418
+ for (const a of e.occurrences) {
419
+ const m = S(
420
+ a.startDateTime,
421
+ e.timeZone
281
422
  );
282
- if (!d) continue;
283
- const u = {
423
+ if (!m) continue;
424
+ const l = {
284
425
  "@type": "Event",
285
- name: o.title,
286
- startDate: d,
287
- eventStatus: P(o.status),
426
+ name: a.title,
427
+ startDate: m,
428
+ eventStatus: R(a.status),
288
429
  location: s
289
430
  };
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);
295
- }
296
- return c.length === 0 ? null : (a.subEvent = c, a);
297
- }
298
- function B(i) {
299
- const { collection: t, baseEventUrl: e } = i;
300
- if (!t.collectionTitle || !t.events || t.events.length === 0) return null;
301
- const n = [];
302
- for (const r of t.events) {
303
- if (!r.title) continue;
304
- const l = {
431
+ n && (l["@id"] = `${n}/${a.id}-${a.slug}`);
432
+ const h = S(a.endDateTime, e.timeZone);
433
+ h && (l.endDate = h);
434
+ const f = re(a.tickets, a.status);
435
+ f && (l.offers = f), u.push(l);
436
+ }
437
+ return u.length === 0 ? null : (r.subEvent = u, r);
438
+ }
439
+ function ae(t) {
440
+ const { collection: e, baseEventUrl: n } = t;
441
+ if (!e.collectionTitle || !e.events || e.events.length === 0) return null;
442
+ const i = [];
443
+ for (const o of e.events) {
444
+ if (!o.title) continue;
445
+ const c = {
305
446
  "@type": "ListItem",
306
- position: n.length + 1,
307
- name: r.title
447
+ position: i.length + 1,
448
+ name: o.title
308
449
  };
309
- e && (l.url = r.slug ? `${e}/${r.id}-${r.slug}` : `${e}/${r.id}`), n.push(l);
450
+ n && (c.url = o.slug ? `${n}/${o.id}-${o.slug}` : `${n}/${o.id}`), i.push(c);
310
451
  }
311
- if (n.length === 0) return null;
452
+ if (i.length === 0) return null;
312
453
  const s = {
313
454
  "@context": "https://schema.org",
314
455
  "@type": "CollectionPage",
315
- name: t.collectionTitle
316
- }, a = y(t.description) || t.summary;
317
- return a && (s.description = a), t.coverImage && (s.image = [t.coverImage]), s.mainEntity = {
456
+ name: e.collectionTitle
457
+ }, r = I(e.description) || e.summary;
458
+ return r && (s.description = r), e.coverImage && (s.image = [e.coverImage]), s.mainEntity = {
318
459
  "@type": "ItemList",
319
- numberOfItems: n.length,
320
- itemListElement: n
460
+ numberOfItems: i.length,
461
+ itemListElement: i
321
462
  }, s;
322
463
  }
323
- const F = 70;
324
- function J(i) {
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, "");
464
+ const ce = 70;
465
+ function N(t) {
466
+ return t.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, ce).replace(/-+$/g, "");
326
467
  }
327
- function v(i) {
328
- return i ? J(i) : "";
329
- }
330
- const f = class f {
331
- constructor(t) {
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);
468
+ const p = class p {
469
+ constructor(e) {
470
+ this._state = "idle", this._originals = null, this._originalsSaved = !1, this._events = [], !(typeof document > "u") && (p._activeInstance && p._activeInstance !== this && p._activeInstance.destroy(), this._venueName = e.venueName, this._venueAddress = e.venueAddress, this._venueTimeZone = e.venueTimeZone || E(), this._baseUrl = e.baseUrl || window.location.origin + window.location.pathname, this._saveOriginals(), p._activeInstance = this);
333
471
  }
334
472
  // ---------------------------------------------------------------------------
335
473
  // Private helpers
336
474
  // ---------------------------------------------------------------------------
337
475
  _saveOriginals() {
338
476
  if (this._originalsSaved) return;
339
- const t = document.querySelector(
477
+ const e = document.querySelector(
340
478
  'link[rel="canonical"]'
341
- ), e = document.querySelector(
342
- 'meta[property="og:title"]'
343
479
  ), n = document.querySelector(
480
+ 'meta[property="og:title"]'
481
+ ), i = document.querySelector(
344
482
  'meta[property="og:description"]'
345
483
  ), s = document.querySelector(
346
484
  'meta[property="og:image"]'
347
- ), a = document.querySelector(
348
- 'meta[property="og:url"]'
349
485
  ), r = document.querySelector(
486
+ 'meta[property="og:url"]'
487
+ ), o = document.querySelector(
350
488
  'meta[property="og:type"]'
351
- ), l = document.querySelector(
489
+ ), c = document.querySelector(
352
490
  'meta[name="description"]'
353
491
  );
354
492
  this._originals = {
355
493
  title: document.title,
356
- canonicalHref: t?.getAttribute("href") ?? null,
357
- ogTitle: e?.getAttribute("content") ?? null,
358
- ogDescription: n?.getAttribute("content") ?? null,
494
+ canonicalHref: e?.getAttribute("href") ?? null,
495
+ ogTitle: n?.getAttribute("content") ?? null,
496
+ ogDescription: i?.getAttribute("content") ?? null,
359
497
  ogImage: s?.getAttribute("content") ?? null,
360
- ogUrl: a?.getAttribute("content") ?? null,
361
- ogType: r?.getAttribute("content") ?? null,
362
- metaDescription: l?.getAttribute("content") ?? null
498
+ ogUrl: r?.getAttribute("content") ?? null,
499
+ ogType: o?.getAttribute("content") ?? null,
500
+ metaDescription: c?.getAttribute("content") ?? null
363
501
  }, this._originalsSaved = !0;
364
502
  }
365
- _injectJsonLd(t) {
503
+ _injectJsonLd(e) {
366
504
  if (typeof document > "u") return;
367
- document.querySelectorAll('script[data-micdrop="jsonld"]').forEach((n) => n.remove());
368
- const e = document.createElement("script");
369
- e.setAttribute("type", "application/ld+json"), e.setAttribute("data-micdrop", "jsonld"), e.textContent = JSON.stringify(t), document.head.appendChild(e);
505
+ document.querySelectorAll('script[data-micdrop="jsonld"]').forEach((i) => i.remove());
506
+ const n = document.createElement("script");
507
+ n.setAttribute("type", "application/ld+json"), n.setAttribute("data-micdrop", "jsonld"), n.textContent = JSON.stringify(e), document.head.appendChild(n);
370
508
  }
371
- _setMeta(t, e) {
509
+ _setMeta(e, n) {
372
510
  if (!(typeof document > "u"))
373
- if (t.startsWith("og:")) {
374
- let n = document.querySelector(
375
- `meta[property="${t}"]`
511
+ if (e.startsWith("og:")) {
512
+ let i = document.querySelector(
513
+ `meta[property="${e}"]`
376
514
  );
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));
515
+ i ? i.setAttribute("content", n) : (i = document.createElement("meta"), i.setAttribute("property", e), i.setAttribute("content", n), i.setAttribute("data-micdrop", "og"), document.head.appendChild(i));
378
516
  } else {
379
- let n = document.querySelector(
380
- `meta[name="${t}"]`
517
+ let i = document.querySelector(
518
+ `meta[name="${e}"]`
381
519
  );
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));
520
+ i ? i.setAttribute("content", n) : (i = document.createElement("meta"), i.setAttribute("name", e), i.setAttribute("content", n), i.setAttribute("data-micdrop", "meta"), document.head.appendChild(i));
383
521
  }
384
522
  }
385
- _setCanonical(t) {
523
+ _setCanonical(e) {
386
524
  if (typeof document > "u") return;
387
- let e = document.querySelector(
525
+ let n = document.querySelector(
388
526
  'link[rel="canonical"]'
389
527
  );
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));
528
+ n ? n.setAttribute("href", e) : (n = document.createElement("link"), n.setAttribute("rel", "canonical"), n.setAttribute("href", e), n.setAttribute("data-micdrop", "canonical"), document.head.appendChild(n));
391
529
  }
392
530
  _removeAllInjected() {
393
- typeof document > "u" || document.querySelectorAll("[data-micdrop]").forEach((t) => t.remove());
531
+ typeof document > "u" || document.querySelectorAll("[data-micdrop]").forEach((e) => e.remove());
394
532
  }
395
533
  _restoreOriginals() {
396
534
  if (!(typeof document > "u" || !this._originals)) {
397
535
  if (document.title = this._originals.title, this._originals.canonicalHref !== null) {
398
- const t = document.querySelector(
536
+ const e = document.querySelector(
399
537
  'link[rel="canonical"]'
400
538
  );
401
- t && t.setAttribute("href", this._originals.canonicalHref);
539
+ e && e.setAttribute("href", this._originals.canonicalHref);
402
540
  }
403
541
  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;
404
542
  }
405
543
  }
406
- _restoreMetaProperty(t, e) {
407
- const n = document.querySelector(
408
- `meta[property="${t}"]`
544
+ _restoreMetaProperty(e, n) {
545
+ const i = document.querySelector(
546
+ `meta[property="${e}"]`
409
547
  );
410
- e !== null && n ? n.setAttribute("content", e) : e === null && n?.hasAttribute("data-micdrop") && n.remove();
548
+ n !== null && i ? i.setAttribute("content", n) : n === null && i?.hasAttribute("data-micdrop") && i.remove();
411
549
  }
412
- _restoreMetaName(t, e) {
413
- const n = document.querySelector(
414
- `meta[name="${t}"]`
550
+ _restoreMetaName(e, n) {
551
+ const i = document.querySelector(
552
+ `meta[name="${e}"]`
415
553
  );
416
- e !== null && n ? n.setAttribute("content", e) : e === null && n?.hasAttribute("data-micdrop") && n.remove();
554
+ n !== null && i ? i.setAttribute("content", n) : n === null && i?.hasAttribute("data-micdrop") && i.remove();
417
555
  }
418
- _buildItemList(t) {
556
+ _buildItemList(e) {
419
557
  return {
420
558
  "@context": "https://schema.org",
421
559
  "@type": "ItemList",
422
- itemListElement: t.map((e, n) => {
423
- const s = e.slug || v(e.name);
560
+ itemListElement: e.map((n, i) => {
561
+ const s = n.slug || N(n.name || "");
424
562
  return {
425
563
  "@type": "ListItem",
426
- position: n + 1,
427
- url: `${this._baseUrl}?e=${e.id}-${s}`
564
+ position: i + 1,
565
+ url: `${this._baseUrl}?e=${n.id}-${s}`
428
566
  };
429
567
  })
430
568
  };
431
569
  }
432
- _buildEntityUrl(t, e, n) {
433
- const s = t === "event" ? "e" : t === "series" ? "s" : "c";
434
- return `${this._baseUrl}?${s}=${e}-${n}`;
570
+ _buildEntityUrl(e, n, i) {
571
+ const s = e === "event" ? "e" : e === "series" ? "s" : "c";
572
+ return `${this._baseUrl}?${s}=${n}-${i}`;
435
573
  }
436
574
  // ---------------------------------------------------------------------------
437
575
  // Public API
@@ -440,75 +578,75 @@ const f = class f {
440
578
  * Called when events finish loading from the API.
441
579
  * Injects an ItemList JSON-LD for the listing. Does not modify OG/canonical/title.
442
580
  */
443
- onEventsLoaded(t, e) {
581
+ onEventsLoaded(e, n) {
444
582
  if (typeof document > "u" || this._state === "destroyed") return;
445
- if (e) {
446
- this._venueName = e.name || this._venueName, this._venueAddress = e.address || e.googleLocationNameCache || this._venueAddress;
447
- const s = e.timeZone || e.timezone;
583
+ if (n) {
584
+ this._venueName = n.name || this._venueName, this._venueAddress = n.address || n.googleLocationNameCache || this._venueAddress;
585
+ const s = n.timeZone || n.timezone;
448
586
  s && (this._venueTimeZone = s);
449
587
  }
450
- this._events = t;
451
- const n = this._buildItemList(t);
452
- this._injectJsonLd(n), this._state = "listing";
588
+ this._events = e;
589
+ const i = this._buildItemList(e);
590
+ this._injectJsonLd(i), this._state = "listing";
453
591
  }
454
592
  /**
455
593
  * Called when the user selects an event, series, or collection.
456
594
  * Replaces ItemList JSON-LD with entity-specific JSON-LD and updates
457
595
  * all head tags (canonical, OG, meta description, title).
458
596
  */
459
- onEntitySelected(t, e, n) {
597
+ onEntitySelected(e, n, i) {
460
598
  if (typeof document > "u" || this._state === "destroyed") return;
461
- if (this._saveOriginals(), n) {
462
- this._venueName = n.name || this._venueName, this._venueAddress = n.address || n.googleLocationNameCache || this._venueAddress;
463
- const u = n.timeZone || n.timezone;
464
- u && (this._venueTimeZone = u);
599
+ if (this._saveOriginals(), i) {
600
+ this._venueName = i.name || this._venueName, this._venueAddress = i.address || i.googleLocationNameCache || this._venueAddress;
601
+ const l = i.timeZone || i.timezone;
602
+ l && (this._venueTimeZone = l);
465
603
  }
466
- let s = null, a = "", r = "", l = "", c = "", o = "";
467
- if (t === "event") {
468
- const u = e.slug || v(e.name || "");
469
- o = this._buildEntityUrl(
604
+ let s = null, r = "", o = "", c = "", u = "", a = "";
605
+ if (e === "event") {
606
+ const l = n.slug || N(n.name || "");
607
+ a = this._buildEntityUrl(
470
608
  "event",
471
- e.id || e.eventID || "",
472
- u
473
- ), s = j({
474
- event: e,
609
+ n.id || n.eventID || "",
610
+ l
611
+ ), s = ie({
612
+ event: n,
475
613
  venue: {
476
614
  name: this._venueName,
477
615
  googleLocationNameCache: this._venueAddress
478
616
  },
479
617
  venueTimeZone: this._venueTimeZone,
480
- eventUrl: o
481
- }), a = e.name || "", r = e.description || "", l = e.eventSummary || "", c = e.image || e.coverImage || e.ShowImage || "";
482
- } else if (t === "series") {
483
- const u = e.slug || v(e.title || "");
484
- o = this._buildEntityUrl("series", e.id || "", u), s = x({
618
+ eventUrl: a
619
+ }), r = n.name || "", o = n.description || "", c = n.eventSummary || "", u = n.image || n.coverImage || n.ShowImage || "";
620
+ } else if (e === "series") {
621
+ const l = n.slug || N(n.title || "");
622
+ a = this._buildEntityUrl("series", n.id || "", l), s = oe({
485
623
  series: {
486
- ...e,
624
+ ...n,
487
625
  venue: {
488
626
  name: this._venueName,
489
627
  googleLocationNameCache: this._venueAddress
490
628
  },
491
629
  timeZone: this._venueTimeZone
492
630
  },
493
- baseEventUrl: o
494
- }), a = e.title || "", r = e.description || "", l = e.eventSummary || "", c = e.image || "";
495
- } else if (t === "collection") {
496
- const u = e.slug || v(e.collectionTitle || "");
497
- o = this._buildEntityUrl("collection", e.id || "", u), s = B({
498
- collection: e,
499
- baseEventUrl: o,
631
+ baseEventUrl: a
632
+ }), r = n.title || "", o = n.description || "", c = n.eventSummary || "", u = n.image || "";
633
+ } else if (e === "collection") {
634
+ const l = n.slug || N(n.collectionTitle || "");
635
+ a = this._buildEntityUrl("collection", n.id || "", l), s = ae({
636
+ collection: n,
637
+ baseEventUrl: a,
500
638
  defaultTimeZone: this._venueTimeZone
501
- }), a = e.collectionTitle || "", r = e.description || "", l = e.summary || "", c = e.coverImage || "";
639
+ }), r = n.collectionTitle || "", o = n.description || "", c = n.summary || "", u = n.coverImage || "";
502
640
  }
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(
641
+ s && this._injectJsonLd(s), a && this._setCanonical(a), r && this._setMeta("og:title", r);
642
+ const m = I(o, 160) || I(c, 160);
643
+ m ? this._setMeta("og:description", m) : this._restoreMetaProperty(
506
644
  "og:description",
507
645
  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(
646
+ ), u && this._setMeta("og:image", u), a && this._setMeta("og:url", a), this._setMeta("og:type", "website"), this._setMeta("twitter:card", "summary_large_image"), m ? this._setMeta("description", m) : this._restoreMetaName(
509
647
  "description",
510
648
  this._originals?.metaDescription ?? null
511
- ), a && (document.title = `${a} | ${this._venueName}`), this._state = "entity";
649
+ ), r && (document.title = `${r} | ${this._venueName}`), this._state = "entity";
512
650
  }
513
651
  /**
514
652
  * Called when the user navigates back to the event listing.
@@ -517,8 +655,8 @@ const f = class f {
517
655
  onBackToListing() {
518
656
  if (!(typeof document > "u") && this._state !== "destroyed") {
519
657
  if (this._restoreOriginals(), this._removeAllInjected(), this._events.length > 0) {
520
- const t = this._buildItemList(this._events);
521
- this._injectJsonLd(t);
658
+ const e = this._buildItemList(this._events);
659
+ this._injectJsonLd(e);
522
660
  }
523
661
  this._saveOriginals(), this._state = "listing";
524
662
  }
@@ -528,23 +666,23 @@ const f = class f {
528
666
  * and restores originals. Clears the static active instance.
529
667
  */
530
668
  destroy() {
531
- typeof document > "u" || this._state !== "destroyed" && (this._removeAllInjected(), this._restoreOriginals(), f._activeInstance === this && (f._activeInstance = null), this._state = "destroyed");
669
+ typeof document > "u" || this._state !== "destroyed" && (this._removeAllInjected(), this._restoreOriginals(), p._activeInstance === this && (p._activeInstance = null), this._state = "destroyed");
532
670
  }
533
671
  };
534
- f._activeInstance = null;
535
- let T = f;
672
+ p._activeInstance = null;
673
+ let L = p;
536
674
  export {
537
- T as HostSeoController,
538
- B as buildCollectionJsonLd,
539
- j as buildEventJsonLd,
540
- Z as buildOffers,
541
- q as buildPerformers,
542
- I as buildPostalAddress,
543
- x as buildSeriesJsonLd,
544
- R as escapeJsonLdForScript,
545
- _ as formatDateTimeWithOffset,
546
- P as getEventStatus,
547
- E as getTicketAvailability,
548
- w as parseAddressToPostal
675
+ L as HostSeoController,
676
+ ae as buildCollectionJsonLd,
677
+ ie as buildEventJsonLd,
678
+ te as buildOffers,
679
+ ne as buildPerformers,
680
+ Z as buildPostalAddress,
681
+ oe as buildSeriesJsonLd,
682
+ le as escapeJsonLdForScript,
683
+ S as formatDateTimeWithOffset,
684
+ R as getEventStatus,
685
+ ee as getTicketAvailability,
686
+ X as parseAddressToPostal
549
687
  };
550
688
  //# sourceMappingURL=seo.mjs.map