@getmicdrop/venue-calendar 4.3.73 → 4.3.75

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 (53) hide show
  1. package/dist/{AddOnCard-B4a8u09b.js → AddOnCard-BBCcY_e0.js} +2 -2
  2. package/dist/{CalendarFoundryView-f11EZ_p7.js → CalendarFoundryView-wE9hH-9r.js} +74 -61
  3. package/dist/CartView-aUQ6j-W8.js +2293 -0
  4. package/dist/{Checkout-B-CBtsR_.js → Checkout-C70GBKMD.js} +4 -4
  5. package/dist/{Checkout-DTZb9iDK.js → Checkout-CepFrHrZ.js} +10 -10
  6. package/dist/{CollectionView-D5YuX3BE.js → CollectionView-CxZ75bdk.js} +4 -4
  7. package/dist/{Event-DXRrCUe0.js → Event-DkJsuswT.js} +10 -10
  8. package/dist/{EventPage-EaRdi8oG.js → EventPage-3MeGAFET.js} +71 -71
  9. package/dist/Input-1RrhLDEl.js +313 -0
  10. package/dist/{PasswordInput-D-vqwd1R.js → PasswordInput-D_QnFlHJ.js} +20 -17
  11. package/dist/{PhoneInput-CHMAaBfv.js → PhoneInput-MqTljyak.js} +65 -65
  12. package/dist/{RecommendationsRail-DZiYj4KP.js → RecommendationsRail-CE-CKTEs.js} +1 -1
  13. package/dist/{ScarcityBadge-DI3e8o-w.js → ScarcityBadge-C3aryt_E.js} +1 -1
  14. package/dist/{SeriesPage-Bzp_rl25.js → SeriesPage-i3fdk4f9.js} +2 -2
  15. package/dist/{Success-C7vl_A39.js → Success-DIr704Wp.js} +4 -4
  16. package/dist/{api-DOG9kmjP.js → api-DpAf4w7Q.js} +150 -144
  17. package/dist/{event-transform-CL4pk66Q.js → event-transform-DfsYkBnu.js} +12 -12
  18. package/dist/{i18n-D9WV_ljM.js → i18n-B1RZttz7.js} +3 -3
  19. package/dist/seo/HostSeoController.d.ts +18 -0
  20. package/dist/seo/seo.cjs +1 -1
  21. package/dist/seo/seo.mjs +22 -15
  22. package/dist/{utils-skxxaoOa.js → utils-Bqh66dCa.js} +1 -1
  23. package/dist/venue-calendar.css +1 -1
  24. package/dist/venue-calendar.es.js +775 -739
  25. package/dist/venue-calendar.iife.js +33 -33
  26. package/dist/venue-calendar.umd.js +23 -23
  27. package/package.json +2 -2
  28. package/dist/CartView-dsyre6R-.js +0 -2293
  29. package/dist/Input-CIMsqGtu.js +0 -313
  30. /package/dist/locales/{4.3.73 → 4.3.75}/flow/de.js +0 -0
  31. /package/dist/locales/{4.3.73 → 4.3.75}/flow/es.js +0 -0
  32. /package/dist/locales/{4.3.73 → 4.3.75}/flow/fr.js +0 -0
  33. /package/dist/locales/{4.3.73 → 4.3.75}/flow/id.js +0 -0
  34. /package/dist/locales/{4.3.73 → 4.3.75}/flow/it.js +0 -0
  35. /package/dist/locales/{4.3.73 → 4.3.75}/flow/ja.js +0 -0
  36. /package/dist/locales/{4.3.73 → 4.3.75}/flow/ko.js +0 -0
  37. /package/dist/locales/{4.3.73 → 4.3.75}/flow/nl.js +0 -0
  38. /package/dist/locales/{4.3.73 → 4.3.75}/flow/pl.js +0 -0
  39. /package/dist/locales/{4.3.73 → 4.3.75}/flow/pt-br.js +0 -0
  40. /package/dist/locales/{4.3.73 → 4.3.75}/flow/tr.js +0 -0
  41. /package/dist/locales/{4.3.73 → 4.3.75}/flow/zh.js +0 -0
  42. /package/dist/locales/{4.3.73 → 4.3.75}/main/de.js +0 -0
  43. /package/dist/locales/{4.3.73 → 4.3.75}/main/es.js +0 -0
  44. /package/dist/locales/{4.3.73 → 4.3.75}/main/fr.js +0 -0
  45. /package/dist/locales/{4.3.73 → 4.3.75}/main/id.js +0 -0
  46. /package/dist/locales/{4.3.73 → 4.3.75}/main/it.js +0 -0
  47. /package/dist/locales/{4.3.73 → 4.3.75}/main/ja.js +0 -0
  48. /package/dist/locales/{4.3.73 → 4.3.75}/main/ko.js +0 -0
  49. /package/dist/locales/{4.3.73 → 4.3.75}/main/nl.js +0 -0
  50. /package/dist/locales/{4.3.73 → 4.3.75}/main/pl.js +0 -0
  51. /package/dist/locales/{4.3.73 → 4.3.75}/main/pt-br.js +0 -0
  52. /package/dist/locales/{4.3.73 → 4.3.75}/main/tr.js +0 -0
  53. /package/dist/locales/{4.3.73 → 4.3.75}/main/zh.js +0 -0
@@ -1,6 +1,6 @@
1
1
  import { a as e, c as t, l as n, n as r, o as i } from "./datetime-BYlsFaDk.js";
2
2
  import { C as a } from "./defaultLabels-CnrhTu2u.js";
3
- import { I as o, L as s, N as c, R as l, z as u } from "./api-DOG9kmjP.js";
3
+ import { B as o, L as s, P as c, R as l, z as u } from "./api-DpAf4w7Q.js";
4
4
  import { t as d } from "./imageUrl-Bata3II2.js";
5
5
  import { t as f } from "./event-CY1jHKvR.js";
6
6
  //#region src/lib/constants/colors.ts
@@ -188,20 +188,20 @@ function E(e, t = { mode: T.DETAIL }) {
188
188
  return n === T.BROWSE ? D(e, r, s, i) : O(e, r, s, i, o);
189
189
  }
190
190
  function D(e, t, n, i) {
191
- let a = t.startDateTime ? r(t.startDateTime, i) : "", s;
191
+ let a = t.startDateTime ? r(t.startDateTime, i) : "", o;
192
192
  if (typeof t.ticketsRemaining == "number" && typeof t.ticketsTotal == "number") {
193
193
  let e = t.ticketsRemaining, n = t.ticketsTotal;
194
- s = {
194
+ o = {
195
195
  totalRemaining: e,
196
196
  totalCapacity: n,
197
197
  isSoldOut: n > 0 && e <= 0
198
198
  };
199
199
  } else {
200
- let t = l(e.availableTickets || [], {
200
+ let t = u(e.availableTickets || [], {
201
201
  excludeDoorOnly: !0,
202
202
  publicOnly: !0
203
203
  });
204
- s = o(t);
204
+ o = s(t);
205
205
  }
206
206
  return {
207
207
  ...n,
@@ -213,9 +213,9 @@ function D(e, t, n, i) {
213
213
  description: t.description || t.eventSummary || "",
214
214
  venueId: t.venueId,
215
215
  eventSeriesId: t.eventSeriesId || null,
216
- ticketsRemaining: s.totalRemaining,
217
- ticketsTotal: s.totalCapacity,
218
- isSoldOut: s.isSoldOut,
216
+ ticketsRemaining: o.totalRemaining,
217
+ ticketsTotal: o.totalCapacity,
218
+ isSoldOut: o.isSoldOut,
219
219
  hasPurchasableHiddenTickets: c(e),
220
220
  stageId: t.stageId ?? null,
221
221
  eventCategoryTypes: t.eventCategoryTypes ?? null,
@@ -232,8 +232,8 @@ function D(e, t, n, i) {
232
232
  function O(e, t, n, r, i) {
233
233
  let a = (e.availableTickets || []).map((e) => ({
234
234
  ...e,
235
- status: s(e)
236
- })), o = l(a, {
235
+ status: l(e)
236
+ })), s = u(a, {
237
237
  excludeDoorOnly: !1,
238
238
  publicOnly: !0
239
239
  }), d = w(t.startDateTime, r);
@@ -250,12 +250,12 @@ function O(e, t, n, r, i) {
250
250
  location: t.venue?.googleLocationNameCache || t.venue?.address || "",
251
251
  ...d,
252
252
  coverImage: i,
253
- price: u(e.availableTickets),
253
+ price: o(e.availableTickets),
254
254
  status: t.status || "On Sale",
255
255
  eventSummary: t.eventSummary,
256
256
  password: t.password,
257
257
  availableTickets: a,
258
- publicTickets: o,
258
+ publicTickets: s,
259
259
  ...e.addOns ? { addOns: e.addOns } : {},
260
260
  hasPurchasableHiddenTickets: c(e),
261
261
  doorsOpenTime: t.doorsOpenTime,
@@ -2,7 +2,7 @@ import { E as e, W as t, d as n, f as r, g as i, h as a, m as o, x as s } from "
2
2
  import { B as c, S as l, d as u, f as d, g as f, u as p, w as m, x as h } from "./defaultLabels-CnrhTu2u.js";
3
3
  import { r as g } from "./Button-BmS_sz0q.js";
4
4
  import { u as _ } from "./orders-B-c1HnI7.js";
5
- import { F as v, P as y } from "./api-DOG9kmjP.js";
5
+ import { F as v, I as y } from "./api-DpAf4w7Q.js";
6
6
  import { t as b } from "./Text-CqjLjIF8.js";
7
7
  import { n as x } from "./constants-DWS8C09a.js";
8
8
  import "svelte/internal/disclose-version";
@@ -37,7 +37,7 @@ function C(e, t, n = {}) {
37
37
  disabled: !0,
38
38
  reason: "sales_ended"
39
39
  };
40
- let u = e?.hasPurchasableHiddenTickets === !0 || Array.isArray(t) && t.some(y), d = () => u ? {
40
+ let u = e?.hasPurchasableHiddenTickets === !0 || Array.isArray(t) && t.some(v), d = () => u ? {
41
41
  text: i ? "Reserve a spot" : "Get tickets",
42
42
  disabled: !1,
43
43
  reason: "hidden_only"
@@ -51,7 +51,7 @@ function C(e, t, n = {}) {
51
51
  reason: "sold_out"
52
52
  };
53
53
  if (c === "sold_out") return d();
54
- let p = (t || []).filter((e) => e.salesChannel !== 2 && !e.isHidden && !(typeof e.visibility == "number" && e.visibility >= v.HIDDEN));
54
+ let p = (t || []).filter((e) => e.salesChannel !== 2 && !e.isHidden && !(typeof e.visibility == "number" && e.visibility >= y.HIDDEN));
55
55
  if (p.length === 0) return u ? {
56
56
  text: i ? "Reserve a spot" : "Get tickets",
57
57
  disabled: !1,
@@ -22,6 +22,19 @@ interface ListingEvent {
22
22
  availableTickets?: EventTicketInput[];
23
23
  /** The show's own zone, when it differs from the venue's. */
24
24
  timeZone?: string;
25
+ /** The show's own venue, on a calendar that spans several. */
26
+ showVenue?: ShowVenue;
27
+ }
28
+ /**
29
+ * The venue one show plays at. A multi-venue calendar has no controller-wide
30
+ * venue, so each show brings its own; it is read per show and never written
31
+ * back to the controller, which every calendar on the page shares.
32
+ */
33
+ interface ShowVenue {
34
+ name: string;
35
+ /** One-line address. Empty publishes the venue name alone. */
36
+ address?: string;
37
+ timeZone?: string;
25
38
  }
26
39
  interface VenueData {
27
40
  name: string;
@@ -125,6 +138,11 @@ export declare class HostSeoController {
125
138
  * unadorned ListItem is merely quiet.
126
139
  */
127
140
  private _buildItemList;
141
+ /**
142
+ * The venue and zone one show is published with: its own when it carries
143
+ * one, the controller-wide venue otherwise.
144
+ */
145
+ private _venueFor;
128
146
  /**
129
147
  * The URL for the entity the visitor has open: the canonical Micdrop show
130
148
  * page when one exists, so `og:url` and `<link rel="canonical">` name a page
package/dist/seo/seo.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(){return`America/Los_Angeles`}var t=/<\/(?:p|div|h[1-6]|li|ul|ol|blockquote|tr)>/gi,n=/<br\s*\/?>/gi,r=/<[^>]*>/g,i={"&amp;":`&`,"&lt;":`<`,"&gt;":`>`,"&quot;":`"`,"&#39;":`'`,"&apos;":`'`,"&nbsp;":` `};function a(e){return e.replace(/&#x([0-9a-f]+);/gi,(e,t)=>o(parseInt(t,16))).replace(/&#(\d+);/g,(e,t)=>o(Number(t))).replace(/&[a-z0-9]+;/gi,e=>i[e.toLowerCase()]??e)}function o(e){return Number.isFinite(e)&&e>0&&e<=1114111?String.fromCodePoint(e):``}function s(e,i){if(!e)return``;let o=String(e).replace(n,` `).replace(t,` `).replace(r,``);if(o=a(o).replace(/\s+/g,` `).trim(),i&&i>0&&o.length>i){let e=o.slice(0,i),t=e.lastIndexOf(` `);o=(t>40?e.slice(0,t):e).trimEnd()+`…`}return o}function c(){return new Date}var l=class extends Error{constructor(e,t,n={}){super(e),this.name=`AppError`,this.code=t,this.status=n.status??500,this.details=n.details,this.timestamp=c(),this.recoverable=n.recoverable??!0,this.cause=n.cause,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toJSON(){return{name:this.name,code:this.code,message:this.message,status:this.status,details:this.details,timestamp:this.timestamp.toISOString(),recoverable:this.recoverable,stack:this.stack,cause:this.cause?.message}}getUserMessage(e){return this.message}isRetryable(){return this.recoverable}},u=class extends l{constructor(e,t,n={}){super(e,t,{status:422,recoverable:!1,...n}),this.name=`ValueGuardError`}},d=class extends u{constructor(e,t,n){super(e,t,{details:n}),this.name=`DateTimeError`}},f;(function(e){e.INVALID_TIMEZONE=`INVALID_TIMEZONE`,e.INVALID_ISO_STRING=`INVALID_ISO_STRING`,e.INVALID_DATE=`INVALID_DATE`,e.INVALID_TIME=`INVALID_TIME`,e.MISSING_TIMEZONE=`MISSING_TIMEZONE`,e.PARSE_ERROR=`PARSE_ERROR`})(f||={});function p(e,t,n,r=0,i=0,a=0){let o=new Date(Date.UTC(e,t-1,n,r,i,a));return e>=0&&e<=99&&o.setUTCFullYear(e),o}var m=/^(\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})?)?$/;function g(e,t,n){let r=p(e,t,n);return r.getUTCFullYear()===e&&r.getUTCMonth()===t-1&&r.getUTCDate()===n}var _=/^(\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.]+)?$/,v=p(1,1,1).getTime();function y(e){let t=m.exec(e);if(t){let[,n,r,i]=t;return{iso:e,year:+n,month:+r,day:+i}}let n=_.exec(e);if(n){let[,e,t,r,i,a,o,s,c,l,u]=n;return{iso:`${e}-${t}-${r}T${i}:${a}:${o}${s?`.${s.slice(0,3).padEnd(3,`0`)}`:``}${c}${l}:${u}`,year:+e,month:+t,day:+r}}return null}function b(e){if(typeof e==`number`){if(!Number.isFinite(e))return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t}if(typeof e!=`string`)return null;let t=y(e.trim());if(!t||!g(t.year,t.month,t.day))return null;let n=new Date(t.iso);return Number.isNaN(n.getTime())?null:n}function x(e){let t=b(e);return t!==null&&t.getTime()===v}function S(e,t){if(e.getTime()===v)throw new d(`toInstant: ${JSON.stringify(t)} 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.`,f.INVALID_ISO_STRING,{value:t})}function C(e,t){if(!(e instanceof Date)||Number.isNaN(e.getTime()))throw new d(`${t} must be a valid Date`,f.INVALID_DATE,{value:e})}function w(e,t){return C(e,`compareInstants(a)`),C(t,`compareInstants(b)`),e.getTime()-t.getTime()}function T(e){if(typeof e==`number`){if(!Number.isFinite(e))throw new d(`toInstant: epoch milliseconds must be a finite number, got ${e}`,f.INVALID_DATE,{value:e});let t=new Date(e);return C(t,`toInstant(value)`),S(t,e),t}if(typeof e!=`string`||e.trim()===``)throw new d(`toInstant: a UTC ISO timestamp or epoch ms is required, got ${JSON.stringify(e)}`,typeof e==`string`?f.INVALID_ISO_STRING:f.INVALID_DATE,{value:e});let t=y(e);if(!t)throw h.test(e)?new d(`toInstant: ${JSON.stringify(e)} 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.`,f.MISSING_TIMEZONE,{value:e}):new d(`toInstant: not an ISO-8601 timestamp: ${JSON.stringify(e)}`,f.INVALID_ISO_STRING,{value:e});let{year:n,month:r,day:i}=t;if(!g(n,r,i))throw new d(`toInstant: ${n}-${r}-${i} is not a real calendar date: ${JSON.stringify(e)}`,f.INVALID_ISO_STRING,{value:e});let a=new Date(t.iso);if(Number.isNaN(a.getTime()))throw new d(`toInstant: ISO-8601 shaped but not a real instant: ${JSON.stringify(e)}`,f.INVALID_ISO_STRING,{value:e});return S(a,e),a}function E(e){if(e==null||typeof e==`string`&&e.trim()===``||x(e))return null;try{return T(e)}catch{return null}}function D(e){return Math.round((e+2**-52)*100)/100}function O(e){if(e==null)return null;let t=Number(e);return Number.isFinite(t)?t:null}function k(e){let t=O(e?.price);return t===null?null:t===0?0:D(t+(O(e?.fee)??0))}var A={VISIBLE:0,HIDDEN:1,PROMO_ONLY:2};function j(e){return e.replace(/</g,`\\u003c`).replace(/>/g,`\\u003e`).replace(/&/g,`\\u0026`)}function M(t,n){if(!t)return null;let r=new Date(t);if(isNaN(r.getTime()))return null;let i={year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1,timeZoneName:`shortOffset`},a;try{a=new Intl.DateTimeFormat(`en-US`,{...i,timeZone:n})}catch{a=new Intl.DateTimeFormat(`en-US`,{...i,timeZone:e()})}let o=a.formatToParts(r),s=e=>o.find(t=>t.type===e)?.value||``,c=s(`year`),l=s(`month`),u=s(`day`),d=s(`hour`),f=s(`minute`),p=s(`second`),m=s(`timeZoneName`),h=`+00:00`;if(m){let e=m.match(/GMT([+-])(\d+)(?::(\d+))?/);e&&(h=`${e[1]}${e[2].padStart(2,`0`)}:${e[3]||`00`}`)}return`${c}-${l}-${u}T${d}:${f}:${p}${h}`}function N(e){if(!e)return null;let t=e.split(`,`).map(e=>e.trim());if(t.length<2)return{"@type":`PostalAddress`,streetAddress:e,addressCountry:`US`};let n=t[t.length-1].match(/^([A-Z]{2})\s+(\d{5}(?:-\d{4})?)$/);return n&&t.length>=3?{"@type":`PostalAddress`,streetAddress:t.slice(0,-2).join(`, `),addressLocality:t[t.length-2],addressRegion:n[1],postalCode:n[2],addressCountry:`US`}:{"@type":`PostalAddress`,streetAddress:t[0],addressLocality:t.slice(1).join(`, `),addressCountry:`US`}}function P(e,t){if(e&&(e.city||e.state||e.postalCode)){let t={"@type":`PostalAddress`};return e.address&&(t.streetAddress=e.address),e.city&&(t.addressLocality=e.city),e.state&&(t.addressRegion=e.state),e.postalCode&&(t.postalCode=e.postalCode),t.addressCountry=e.country||`US`,t}return N(e&&e.address||t||null)}function F(e){if(!e)return`https://schema.org/EventScheduled`;let t=e.toLowerCase();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`}function I(e){if((e.remainingCapacity??e.quantityRemaining??e.quantity)===0||e.soldOut)return`https://schema.org/SoldOut`;let t=c(),n=E(e.salesBegin||e.salesStart||e.saleBegin||e.onSaleStart),r=E(e.salesEnd||e.saleEnd||e.onSaleEnd);return n&&w(n,t)>0?`https://schema.org/PreOrder`:r&&w(r,t)<0?`https://schema.org/SoldOut`:`https://schema.org/InStock`}function L(e,t,n,r={}){return e===t?{"@type":`Offer`,price:e,priceCurrency:`USD`,availability:n,...r}:{"@type":`AggregateOffer`,lowPrice:e,highPrice:t,priceCurrency:`USD`,availability:n,...r}}function R(e,t){if(!e||e.length===0)return null;let n=e.filter(e=>{let t=(e.visibility??0)<A.HIDDEN,n=e.salesChannel!==2;return t&&n});if(n.length===0)return null;let r=n.map(e=>k({price:e.price,fee:e.fee})).filter(e=>e!=null);if(r.length===0)return null;let i=Math.min(...r),a=Math.max(...r),o=n[0];return L(i,a,I(o),{url:t||void 0,validFrom:o?.salesBegin||o?.salesStart||void 0})}function z(e){if(!e||e.length===0)return null;let t=e.filter(e=>{let t=e.acceptedState===2,n=!e.shouldBeHidden,r=e.RosterPerformer?.User?.performerProfile,i=r?.firstName||r?.lastName||r?.displayName;return t&&n&&i});return t.length===0?null:t.map(e=>{let t=e.RosterPerformer?.User?.performerProfile;return{"@type":`PerformingGroup`,name:t?.displayName||[t?.firstName,t?.lastName].filter(Boolean).join(` `)}})}function B(t){let{event:n,venue:r,venueTimeZone:i=e(),eventUrl:a,organizer:o}=t;if(!n)return null;let c=M(n.startDateTime,i);if(!n.name||!c||!r?.name)return null;let l=P(r,r?.googleLocationNameCache),u={"@type":`Place`,name:r.name};l&&(u.address=l);let d={"@context":`https://schema.org`,"@type":`Event`,name:n.name,startDate:c,eventStatus:F(n.status),eventAttendanceMode:`https://schema.org/OfflineEventAttendanceMode`,location:u},f=M(n.endDateTime,i);f&&(d.endDate=f);let p=s(n.description)||n.eventSummary;p&&(d.description=p);let m=n.image||n.coverImage||n.ShowImage;m&&(d.image=[m]);let h=R(n.availableTickets,a);h&&(d.offers=h);let g=z(n.performers);if(g&&g.length>0&&(d.performer=g),o?.name){let e={"@type":`Organization`,name:o.name};o.url&&(e.url=o.url),d.organizer=e}return a&&(d.url=a),d}function V(e){switch(e){case`available`:return`https://schema.org/InStock`;case`sold_out`:return`https://schema.org/SoldOut`;case`coming_soon`:return`https://schema.org/PreOrder`;case`ended`:return`https://schema.org/SoldOut`;default:return`https://schema.org/InStock`}}function H(e,t){if(!e||e.length===0)return null;let n=e.filter(e=>e.status!==`sold_out`&&e.status!==`ended`);if(n.length===0){let t=e.map(e=>e.price).filter(e=>!isNaN(e));return t.length===0?null:L(Math.min(...t),Math.max(...t),`https://schema.org/SoldOut`)}let r=n.map(e=>e.price).filter(e=>!isNaN(e));return r.length===0?null:L(Math.min(...r),Math.max(...r),V(n[0].status))}function U(e){let{series:t,baseEventUrl:n}=e;if(!t.title||!t.occurrences||t.occurrences.length===0||!t.venue?.name)return null;let r=P(t.venue,t.venue.googleLocationNameCache),i={"@type":`Place`,name:t.venue.name};r&&(i.address=r);let a={"@context":`https://schema.org`,"@type":`EventSeries`,name:t.title,location:i},o=s(t.description)||t.eventSummary;o&&(a.description=o),t.image&&(a.image=[t.image]);let c=t.performers?.filter(e=>e.displayName);c&&c.length>0&&(a.performer=c.map(e=>({"@type":`PerformingGroup`,name:e.displayName})));let l=[];for(let e of t.occurrences){let r=M(e.startDateTime,t.timeZone);if(!r)continue;let a={"@type":`Event`,name:e.title,startDate:r,eventStatus:F(e.status),location:i};n&&(a[`@id`]=`${n}/${e.id}-${e.slug}`);let o=M(e.endDateTime,t.timeZone);o&&(a.endDate=o);let s=H(e.tickets,e.status);s&&(a.offers=s),l.push(a)}return l.length===0?null:(a.subEvent=l,a)}function W(e){let{collection:t,baseEventUrl:n}=e;if(!t.collectionTitle||!t.events||t.events.length===0)return null;let r=[];for(let e of t.events){if(!e.title)continue;let t={"@type":`ListItem`,position:r.length+1,name:e.title};n&&(t.url=e.slug?`${n}/${e.id}-${e.slug}`:`${n}/${e.id}`),r.push(t)}if(r.length===0)return null;let i={"@context":`https://schema.org`,"@type":`CollectionPage`,name:t.collectionTitle},a=s(t.description)||t.summary;return a&&(i.description=a),t.coverImage&&(i.image=[t.coverImage]),i.mainEntity={"@type":`ItemList`,numberOfItems:r.length,itemListElement:r},i}var G=70;function K(e){return e.normalize(`NFKD`).replace(/[\u0300-\u036f]/g,``).toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,G).replace(/-+$/g,``)}var q=class t{static _activeInstance=null;static shared(e){let n=t._activeInstance;return n?(n._holders+=1,n):new t(e)}_state=`idle`;_holders=1;_venueName;_venueAddress;_venueTimeZone;_baseUrl;_publicSiteOrigin;_originals=null;_originalsSaved=!1;_events=[];constructor(n){typeof document>`u`||(t._activeInstance&&t._activeInstance!==this&&t._activeInstance._teardown(),this._venueName=n.venueName,this._venueAddress=n.venueAddress,this._venueTimeZone=n.venueTimeZone||e(),this._baseUrl=n.baseUrl||window.location.origin+window.location.pathname,this._publicSiteOrigin=(n.publicSiteOrigin||``).replace(/\/+$/,``),this._saveOriginals(),t._activeInstance=this)}_saveOriginals(){if(this._originalsSaved)return;let 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"]`),i=document.querySelector(`meta[property="og:url"]`),a=document.querySelector(`meta[property="og:type"]`),o=document.querySelector(`meta[name="description"]`);this._originals={title:document.title,canonicalHref:e?.getAttribute(`href`)??null,ogTitle:t?.getAttribute(`content`)??null,ogDescription:n?.getAttribute(`content`)??null,ogImage:r?.getAttribute(`content`)??null,ogUrl:i?.getAttribute(`content`)??null,ogType:a?.getAttribute(`content`)??null,metaDescription:o?.getAttribute(`content`)??null},this._originalsSaved=!0}_injectJsonLd(e){if(typeof document>`u`)return;document.querySelectorAll(`script[data-micdrop="jsonld"]`).forEach(e=>e.remove());let t=document.createElement(`script`);t.setAttribute(`type`,`application/ld+json`),t.setAttribute(`data-micdrop`,`jsonld`),t.textContent=JSON.stringify(e),document.head.appendChild(t)}_setMeta(e,t){if(!(typeof document>`u`)){if(e.startsWith(`og:`)){let n=document.querySelector(`meta[property="${e}"]`);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))}else{let n=document.querySelector(`meta[name="${e}"]`);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))}}}_setCanonical(e){if(typeof document>`u`)return;let t=document.querySelector(`link[rel="canonical"]`);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))}_setEntityCanonical(){this._originals?.canonicalHref||this._setCanonical(this._baseUrl)}_removeAllInjected(){typeof document>`u`||document.querySelectorAll(`[data-micdrop]`).forEach(e=>e.remove())}_restoreOriginals(){if(!(typeof document>`u`||!this._originals)){if(document.title=this._originals.title,this._originals.canonicalHref!==null){let e=document.querySelector(`link[rel="canonical"]`);e&&e.setAttribute(`href`,this._originals.canonicalHref)}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}}_restoreMetaProperty(e,t){let n=document.querySelector(`meta[property="${e}"]`);t!==null&&n?n.setAttribute(`content`,t):t===null&&n?.hasAttribute(`data-micdrop`)&&n.remove()}_restoreMetaName(e,t){let n=document.querySelector(`meta[name="${e}"]`);t!==null&&n?n.setAttribute(`content`,t):t===null&&n?.hasAttribute(`data-micdrop`)&&n.remove()}_showPageUrl(e,t){return this._publicSiteOrigin?t?`${this._publicSiteOrigin}/e/${e}-${t}`:`${this._publicSiteOrigin}/e/${e}`:this._entityDeepLink(e,t)}_entityDeepLink(e,t){return`${this._baseUrl}#${e}${t?`-${t}`:``}`}_buildItemList(e){return{"@context":`https://schema.org`,"@type":`ItemList`,itemListElement:e.map((e,t)=>{let n=e.slug||K(e.name||``),r=this._showPageUrl(e.id,n),i=B({event:{name:e.name,startDateTime:e.startDateTime||``,endDateTime:e.endDateTime,status:e.status,description:e.description,eventSummary:e.eventSummary,image:e.image,availableTickets:e.availableTickets},venue:{name:this._venueName,googleLocationNameCache:this._venueAddress},venueTimeZone:e.timeZone||this._venueTimeZone,eventUrl:r});if(!i)return{"@type":`ListItem`,position:t+1,url:r};let{"@context":a,...o}=i;return{"@type":`ListItem`,position:t+1,url:r,item:o}})}}_buildEntityUrl(e,t,n){return e===`event`?this._showPageUrl(t,n):this._entityDeepLink(t,n)}onEventsLoaded(e,t){if(typeof document>`u`||this._state===`destroyed`)return;if(t){this._venueName=t.name||this._venueName,this._venueAddress=t.address||t.googleLocationNameCache||this._venueAddress;let e=t.timeZone||t.timezone;e&&(this._venueTimeZone=e)}this._events=e;let n=this._buildItemList(e);this._injectJsonLd(n),this._state=`listing`}onEntitySelected(e,t,n){if(typeof document>`u`||this._state===`destroyed`)return;if(this._saveOriginals(),n){this._venueName=n.name||this._venueName,this._venueAddress=n.address||n.googleLocationNameCache||this._venueAddress;let e=n.timeZone||n.timezone;e&&(this._venueTimeZone=e)}let r=null,i=``,a=``,o=``,c=``,l=``;if(e===`event`){let e=t.slug||K(t.name||``);l=this._buildEntityUrl(`event`,t.id||t.eventID||``,e),r=B({event:t,venue:{name:this._venueName,googleLocationNameCache:this._venueAddress},venueTimeZone:this._venueTimeZone,eventUrl:l}),i=t.name||``,a=t.description||``,o=t.eventSummary||``,c=t.image||t.coverImage||t.ShowImage||``}else if(e===`series`){let e=t.slug||K(t.title||``);l=this._buildEntityUrl(`series`,t.id||``,e),r=U({series:{...t,venue:{name:this._venueName,googleLocationNameCache:this._venueAddress},timeZone:this._venueTimeZone},baseEventUrl:l}),i=t.title||``,a=t.description||``,o=t.eventSummary||``,c=t.image||``}else if(e===`collection`){let e=t.slug||K(t.collectionTitle||``);l=this._buildEntityUrl(`collection`,t.id||``,e),r=W({collection:t,baseEventUrl:l,defaultTimeZone:this._venueTimeZone}),i=t.collectionTitle||``,a=t.description||``,o=t.summary||``,c=t.coverImage||``}r&&this._injectJsonLd(r),this._setEntityCanonical(),i&&this._setMeta(`og:title`,i);let u=s(a,160)||s(o,160);u?this._setMeta(`og:description`,u):this._restoreMetaProperty(`og:description`,this._originals?.ogDescription??null),c&&this._setMeta(`og:image`,c),l&&this._setMeta(`og:url`,l),this._setMeta(`og:type`,`website`),this._setMeta(`twitter:card`,`summary_large_image`),u?this._setMeta(`description`,u):this._restoreMetaName(`description`,this._originals?.metaDescription??null),i&&(document.title=`${i} | ${this._venueName}`),this._state=`entity`}onBackToListing(){if(!(typeof document>`u`)&&this._state!==`destroyed`){if(this._restoreOriginals(),this._removeAllInjected(),this._events.length>0){let e=this._buildItemList(this._events);this._injectJsonLd(e)}this._saveOriginals(),this._state=`listing`}}destroy(){if(this._holders>1){--this._holders;return}this._teardown()}_teardown(){typeof document>`u`||this._state!==`destroyed`&&(this._removeAllInjected(),this._restoreOriginals(),t._activeInstance===this&&(t._activeInstance=null),this._state=`destroyed`)}};exports.HostSeoController=q,exports.buildCollectionJsonLd=W,exports.buildEventJsonLd=B,exports.buildOffers=R,exports.buildPerformers=z,exports.buildPostalAddress=P,exports.buildSeriesJsonLd=U,exports.escapeJsonLdForScript=j,exports.formatDateTimeWithOffset=M,exports.getEventStatus=F,exports.getTicketAvailability=I,exports.parseAddressToPostal=N;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(){return`America/Los_Angeles`}var t=/<\/(?:p|div|h[1-6]|li|ul|ol|blockquote|tr)>/gi,n=/<br\s*\/?>/gi,r=/<[^>]*>/g,i={"&amp;":`&`,"&lt;":`<`,"&gt;":`>`,"&quot;":`"`,"&#39;":`'`,"&apos;":`'`,"&nbsp;":` `};function a(e){return e.replace(/&#x([0-9a-f]+);/gi,(e,t)=>o(parseInt(t,16))).replace(/&#(\d+);/g,(e,t)=>o(Number(t))).replace(/&[a-z0-9]+;/gi,e=>i[e.toLowerCase()]??e)}function o(e){return Number.isFinite(e)&&e>0&&e<=1114111?String.fromCodePoint(e):``}function s(e,i){if(!e)return``;let o=String(e).replace(n,` `).replace(t,` `).replace(r,``);if(o=a(o).replace(/\s+/g,` `).trim(),i&&i>0&&o.length>i){let e=o.slice(0,i),t=e.lastIndexOf(` `);o=(t>40?e.slice(0,t):e).trimEnd()+`…`}return o}function c(){return new Date}var l=class extends Error{constructor(e,t,n={}){super(e),this.name=`AppError`,this.code=t,this.status=n.status??500,this.details=n.details,this.timestamp=c(),this.recoverable=n.recoverable??!0,this.cause=n.cause,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toJSON(){return{name:this.name,code:this.code,message:this.message,status:this.status,details:this.details,timestamp:this.timestamp.toISOString(),recoverable:this.recoverable,stack:this.stack,cause:this.cause?.message}}getUserMessage(e){return this.message}isRetryable(){return this.recoverable}},u=class extends l{constructor(e,t,n={}){super(e,t,{status:422,recoverable:!1,...n}),this.name=`ValueGuardError`}},d=class extends u{constructor(e,t,n){super(e,t,{details:n}),this.name=`DateTimeError`}},f;(function(e){e.INVALID_TIMEZONE=`INVALID_TIMEZONE`,e.INVALID_ISO_STRING=`INVALID_ISO_STRING`,e.INVALID_DATE=`INVALID_DATE`,e.INVALID_TIME=`INVALID_TIME`,e.MISSING_TIMEZONE=`MISSING_TIMEZONE`,e.PARSE_ERROR=`PARSE_ERROR`})(f||={});function p(e,t,n,r=0,i=0,a=0){let o=new Date(Date.UTC(e,t-1,n,r,i,a));return e>=0&&e<=99&&o.setUTCFullYear(e),o}var m=/^(\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})?)?$/;function g(e,t,n){let r=p(e,t,n);return r.getUTCFullYear()===e&&r.getUTCMonth()===t-1&&r.getUTCDate()===n}var _=/^(\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.]+)?$/,v=p(1,1,1).getTime();function y(e){let t=m.exec(e);if(t){let[,n,r,i]=t;return{iso:e,year:+n,month:+r,day:+i}}let n=_.exec(e);if(n){let[,e,t,r,i,a,o,s,c,l,u]=n;return{iso:`${e}-${t}-${r}T${i}:${a}:${o}${s?`.${s.slice(0,3).padEnd(3,`0`)}`:``}${c}${l}:${u}`,year:+e,month:+t,day:+r}}return null}function b(e){if(typeof e==`number`){if(!Number.isFinite(e))return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t}if(typeof e!=`string`)return null;let t=y(e.trim());if(!t||!g(t.year,t.month,t.day))return null;let n=new Date(t.iso);return Number.isNaN(n.getTime())?null:n}function x(e){let t=b(e);return t!==null&&t.getTime()===v}function S(e,t){if(e.getTime()===v)throw new d(`toInstant: ${JSON.stringify(t)} 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.`,f.INVALID_ISO_STRING,{value:t})}function C(e,t){if(!(e instanceof Date)||Number.isNaN(e.getTime()))throw new d(`${t} must be a valid Date`,f.INVALID_DATE,{value:e})}function w(e,t){return C(e,`compareInstants(a)`),C(t,`compareInstants(b)`),e.getTime()-t.getTime()}function T(e){if(typeof e==`number`){if(!Number.isFinite(e))throw new d(`toInstant: epoch milliseconds must be a finite number, got ${e}`,f.INVALID_DATE,{value:e});let t=new Date(e);return C(t,`toInstant(value)`),S(t,e),t}if(typeof e!=`string`||e.trim()===``)throw new d(`toInstant: a UTC ISO timestamp or epoch ms is required, got ${JSON.stringify(e)}`,typeof e==`string`?f.INVALID_ISO_STRING:f.INVALID_DATE,{value:e});let t=y(e);if(!t)throw h.test(e)?new d(`toInstant: ${JSON.stringify(e)} 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.`,f.MISSING_TIMEZONE,{value:e}):new d(`toInstant: not an ISO-8601 timestamp: ${JSON.stringify(e)}`,f.INVALID_ISO_STRING,{value:e});let{year:n,month:r,day:i}=t;if(!g(n,r,i))throw new d(`toInstant: ${n}-${r}-${i} is not a real calendar date: ${JSON.stringify(e)}`,f.INVALID_ISO_STRING,{value:e});let a=new Date(t.iso);if(Number.isNaN(a.getTime()))throw new d(`toInstant: ISO-8601 shaped but not a real instant: ${JSON.stringify(e)}`,f.INVALID_ISO_STRING,{value:e});return S(a,e),a}function E(e){if(e==null||typeof e==`string`&&e.trim()===``||x(e))return null;try{return T(e)}catch{return null}}function D(e){return Math.round((e+2**-52)*100)/100}function O(e){if(e==null)return null;let t=Number(e);return Number.isFinite(t)?t:null}function k(e){let t=O(e?.price);return t===null?null:t===0?0:D(t+(O(e?.fee)??0))}var A={VISIBLE:0,HIDDEN:1,PROMO_ONLY:2};function j(e){return e.replace(/</g,`\\u003c`).replace(/>/g,`\\u003e`).replace(/&/g,`\\u0026`)}function M(t,n){if(!t)return null;let r=new Date(t);if(isNaN(r.getTime()))return null;let i={year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1,timeZoneName:`shortOffset`},a;try{a=new Intl.DateTimeFormat(`en-US`,{...i,timeZone:n})}catch{a=new Intl.DateTimeFormat(`en-US`,{...i,timeZone:e()})}let o=a.formatToParts(r),s=e=>o.find(t=>t.type===e)?.value||``,c=s(`year`),l=s(`month`),u=s(`day`),d=s(`hour`),f=s(`minute`),p=s(`second`),m=s(`timeZoneName`),h=`+00:00`;if(m){let e=m.match(/GMT([+-])(\d+)(?::(\d+))?/);e&&(h=`${e[1]}${e[2].padStart(2,`0`)}:${e[3]||`00`}`)}return`${c}-${l}-${u}T${d}:${f}:${p}${h}`}function N(e){if(!e)return null;let t=e.split(`,`).map(e=>e.trim());if(t.length<2)return{"@type":`PostalAddress`,streetAddress:e,addressCountry:`US`};let n=t[t.length-1].match(/^([A-Z]{2})\s+(\d{5}(?:-\d{4})?)$/);return n&&t.length>=3?{"@type":`PostalAddress`,streetAddress:t.slice(0,-2).join(`, `),addressLocality:t[t.length-2],addressRegion:n[1],postalCode:n[2],addressCountry:`US`}:{"@type":`PostalAddress`,streetAddress:t[0],addressLocality:t.slice(1).join(`, `),addressCountry:`US`}}function P(e,t){if(e&&(e.city||e.state||e.postalCode)){let t={"@type":`PostalAddress`};return e.address&&(t.streetAddress=e.address),e.city&&(t.addressLocality=e.city),e.state&&(t.addressRegion=e.state),e.postalCode&&(t.postalCode=e.postalCode),t.addressCountry=e.country||`US`,t}return N(e&&e.address||t||null)}function F(e){if(!e)return`https://schema.org/EventScheduled`;let t=e.toLowerCase();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`}function I(e){if((e.remainingCapacity??e.quantityRemaining??e.quantity)===0||e.soldOut)return`https://schema.org/SoldOut`;let t=c(),n=E(e.salesBegin||e.salesStart||e.saleBegin||e.onSaleStart),r=E(e.salesEnd||e.saleEnd||e.onSaleEnd);return n&&w(n,t)>0?`https://schema.org/PreOrder`:r&&w(r,t)<0?`https://schema.org/SoldOut`:`https://schema.org/InStock`}function L(e,t,n,r={}){return e===t?{"@type":`Offer`,price:e,priceCurrency:`USD`,availability:n,...r}:{"@type":`AggregateOffer`,lowPrice:e,highPrice:t,priceCurrency:`USD`,availability:n,...r}}function R(e,t){if(!e||e.length===0)return null;let n=e.filter(e=>{let t=(e.visibility??0)<A.HIDDEN,n=e.salesChannel!==2;return t&&n});if(n.length===0)return null;let r=n.map(e=>k({price:e.price,fee:e.fee})).filter(e=>e!=null);if(r.length===0)return null;let i=Math.min(...r),a=Math.max(...r),o=n[0];return L(i,a,I(o),{url:t||void 0,validFrom:o?.salesBegin||o?.salesStart||void 0})}function z(e){if(!e||e.length===0)return null;let t=e.filter(e=>{let t=e.acceptedState===2,n=!e.shouldBeHidden,r=e.RosterPerformer?.User?.performerProfile,i=r?.firstName||r?.lastName||r?.displayName;return t&&n&&i});return t.length===0?null:t.map(e=>{let t=e.RosterPerformer?.User?.performerProfile;return{"@type":`PerformingGroup`,name:t?.displayName||[t?.firstName,t?.lastName].filter(Boolean).join(` `)}})}function B(t){let{event:n,venue:r,venueTimeZone:i=e(),eventUrl:a,organizer:o}=t;if(!n)return null;let c=M(n.startDateTime,i);if(!n.name||!c||!r?.name)return null;let l=P(r,r?.googleLocationNameCache),u={"@type":`Place`,name:r.name};l&&(u.address=l);let d={"@context":`https://schema.org`,"@type":`Event`,name:n.name,startDate:c,eventStatus:F(n.status),eventAttendanceMode:`https://schema.org/OfflineEventAttendanceMode`,location:u},f=M(n.endDateTime,i);f&&(d.endDate=f);let p=s(n.description)||n.eventSummary;p&&(d.description=p);let m=n.image||n.coverImage||n.ShowImage;m&&(d.image=[m]);let h=R(n.availableTickets,a);h&&(d.offers=h);let g=z(n.performers);if(g&&g.length>0&&(d.performer=g),o?.name){let e={"@type":`Organization`,name:o.name};o.url&&(e.url=o.url),d.organizer=e}return a&&(d.url=a),d}function V(e){switch(e){case`available`:return`https://schema.org/InStock`;case`sold_out`:return`https://schema.org/SoldOut`;case`coming_soon`:return`https://schema.org/PreOrder`;case`ended`:return`https://schema.org/SoldOut`;default:return`https://schema.org/InStock`}}function H(e,t){if(!e||e.length===0)return null;let n=e.filter(e=>e.status!==`sold_out`&&e.status!==`ended`);if(n.length===0){let t=e.map(e=>e.price).filter(e=>!isNaN(e));return t.length===0?null:L(Math.min(...t),Math.max(...t),`https://schema.org/SoldOut`)}let r=n.map(e=>e.price).filter(e=>!isNaN(e));return r.length===0?null:L(Math.min(...r),Math.max(...r),V(n[0].status))}function U(e){let{series:t,baseEventUrl:n}=e;if(!t.title||!t.occurrences||t.occurrences.length===0||!t.venue?.name)return null;let r=P(t.venue,t.venue.googleLocationNameCache),i={"@type":`Place`,name:t.venue.name};r&&(i.address=r);let a={"@context":`https://schema.org`,"@type":`EventSeries`,name:t.title,location:i},o=s(t.description)||t.eventSummary;o&&(a.description=o),t.image&&(a.image=[t.image]);let c=t.performers?.filter(e=>e.displayName);c&&c.length>0&&(a.performer=c.map(e=>({"@type":`PerformingGroup`,name:e.displayName})));let l=[];for(let e of t.occurrences){let r=M(e.startDateTime,t.timeZone);if(!r)continue;let a={"@type":`Event`,name:e.title,startDate:r,eventStatus:F(e.status),location:i};n&&(a[`@id`]=`${n}/${e.id}-${e.slug}`);let o=M(e.endDateTime,t.timeZone);o&&(a.endDate=o);let s=H(e.tickets,e.status);s&&(a.offers=s),l.push(a)}return l.length===0?null:(a.subEvent=l,a)}function W(e){let{collection:t,baseEventUrl:n}=e;if(!t.collectionTitle||!t.events||t.events.length===0)return null;let r=[];for(let e of t.events){if(!e.title)continue;let t={"@type":`ListItem`,position:r.length+1,name:e.title};n&&(t.url=e.slug?`${n}/${e.id}-${e.slug}`:`${n}/${e.id}`),r.push(t)}if(r.length===0)return null;let i={"@context":`https://schema.org`,"@type":`CollectionPage`,name:t.collectionTitle},a=s(t.description)||t.summary;return a&&(i.description=a),t.coverImage&&(i.image=[t.coverImage]),i.mainEntity={"@type":`ItemList`,numberOfItems:r.length,itemListElement:r},i}var G=70;function K(e){return e.normalize(`NFKD`).replace(/[\u0300-\u036f]/g,``).toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,G).replace(/-+$/g,``)}var q=class t{static _activeInstance=null;static shared(e){let n=t._activeInstance;return n?(n._holders+=1,n):new t(e)}_state=`idle`;_holders=1;_venueName;_venueAddress;_venueTimeZone;_baseUrl;_publicSiteOrigin;_originals=null;_originalsSaved=!1;_events=[];constructor(n){typeof document>`u`||(t._activeInstance&&t._activeInstance!==this&&t._activeInstance._teardown(),this._venueName=n.venueName,this._venueAddress=n.venueAddress,this._venueTimeZone=n.venueTimeZone||e(),this._baseUrl=n.baseUrl||window.location.origin+window.location.pathname,this._publicSiteOrigin=(n.publicSiteOrigin||``).replace(/\/+$/,``),this._saveOriginals(),t._activeInstance=this)}_saveOriginals(){if(this._originalsSaved)return;let 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"]`),i=document.querySelector(`meta[property="og:url"]`),a=document.querySelector(`meta[property="og:type"]`),o=document.querySelector(`meta[name="description"]`);this._originals={title:document.title,canonicalHref:e?.getAttribute(`href`)??null,ogTitle:t?.getAttribute(`content`)??null,ogDescription:n?.getAttribute(`content`)??null,ogImage:r?.getAttribute(`content`)??null,ogUrl:i?.getAttribute(`content`)??null,ogType:a?.getAttribute(`content`)??null,metaDescription:o?.getAttribute(`content`)??null},this._originalsSaved=!0}_injectJsonLd(e){if(typeof document>`u`)return;document.querySelectorAll(`script[data-micdrop="jsonld"]`).forEach(e=>e.remove());let t=document.createElement(`script`);t.setAttribute(`type`,`application/ld+json`),t.setAttribute(`data-micdrop`,`jsonld`),t.textContent=JSON.stringify(e),document.head.appendChild(t)}_setMeta(e,t){if(!(typeof document>`u`)){if(e.startsWith(`og:`)){let n=document.querySelector(`meta[property="${e}"]`);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))}else{let n=document.querySelector(`meta[name="${e}"]`);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))}}}_setCanonical(e){if(typeof document>`u`)return;let t=document.querySelector(`link[rel="canonical"]`);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))}_setEntityCanonical(){this._originals?.canonicalHref||this._setCanonical(this._baseUrl)}_removeAllInjected(){typeof document>`u`||document.querySelectorAll(`[data-micdrop]`).forEach(e=>e.remove())}_restoreOriginals(){if(!(typeof document>`u`||!this._originals)){if(document.title=this._originals.title,this._originals.canonicalHref!==null){let e=document.querySelector(`link[rel="canonical"]`);e&&e.setAttribute(`href`,this._originals.canonicalHref)}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}}_restoreMetaProperty(e,t){let n=document.querySelector(`meta[property="${e}"]`);t!==null&&n?n.setAttribute(`content`,t):t===null&&n?.hasAttribute(`data-micdrop`)&&n.remove()}_restoreMetaName(e,t){let n=document.querySelector(`meta[name="${e}"]`);t!==null&&n?n.setAttribute(`content`,t):t===null&&n?.hasAttribute(`data-micdrop`)&&n.remove()}_showPageUrl(e,t){return this._publicSiteOrigin?t?`${this._publicSiteOrigin}/e/${e}-${t}`:`${this._publicSiteOrigin}/e/${e}`:this._entityDeepLink(e,t)}_entityDeepLink(e,t){return`${this._baseUrl}#${e}${t?`-${t}`:``}`}_buildItemList(e){return{"@context":`https://schema.org`,"@type":`ItemList`,itemListElement:e.map((e,t)=>{let n=e.slug||K(e.name||``),r=this._showPageUrl(e.id,n),i=B({event:{name:e.name,startDateTime:e.startDateTime||``,endDateTime:e.endDateTime,status:e.status,description:e.description,eventSummary:e.eventSummary,image:e.image,availableTickets:e.availableTickets},...this._venueFor(e,e.timeZone),eventUrl:r});if(!i)return{"@type":`ListItem`,position:t+1,url:r};let{"@context":a,...o}=i;return{"@type":`ListItem`,position:t+1,url:r,item:o}})}}_venueFor(e,t){let n=e.showVenue?.name?e.showVenue:void 0;return{venue:n?{name:n.name,googleLocationNameCache:n.address||void 0}:{name:this._venueName,googleLocationNameCache:this._venueAddress},venueTimeZone:t||n?.timeZone||this._venueTimeZone}}_buildEntityUrl(e,t,n){return e===`event`?this._showPageUrl(t,n):this._entityDeepLink(t,n)}onEventsLoaded(e,t){if(typeof document>`u`||this._state===`destroyed`)return;if(t){this._venueName=t.name||this._venueName,this._venueAddress=t.address||t.googleLocationNameCache||this._venueAddress;let e=t.timeZone||t.timezone;e&&(this._venueTimeZone=e)}this._events=e;let n=this._buildItemList(e);this._injectJsonLd(n),this._state=`listing`}onEntitySelected(e,t,n){if(typeof document>`u`||this._state===`destroyed`)return;if(this._saveOriginals(),n){this._venueName=n.name||this._venueName,this._venueAddress=n.address||n.googleLocationNameCache||this._venueAddress;let e=n.timeZone||n.timezone;e&&(this._venueTimeZone=e)}let r=null,i=``,a=``,o=``,c=``,l=``,u=this._venueName;if(e===`event`){let e=t.slug||K(t.name||``);l=this._buildEntityUrl(`event`,t.id||t.eventID||``,e);let n=this._venueFor(t);r=B({event:t,...n,eventUrl:l}),u=n.venue.name,i=t.name||``,a=t.description||``,o=t.eventSummary||``,c=t.image||t.coverImage||t.ShowImage||``}else if(e===`series`){let e=t.slug||K(t.title||``);l=this._buildEntityUrl(`series`,t.id||``,e),r=U({series:{...t,venue:{name:this._venueName,googleLocationNameCache:this._venueAddress},timeZone:this._venueTimeZone},baseEventUrl:l}),i=t.title||``,a=t.description||``,o=t.eventSummary||``,c=t.image||``}else if(e===`collection`){let e=t.slug||K(t.collectionTitle||``);l=this._buildEntityUrl(`collection`,t.id||``,e),r=W({collection:t,baseEventUrl:l,defaultTimeZone:this._venueTimeZone}),i=t.collectionTitle||``,a=t.description||``,o=t.summary||``,c=t.coverImage||``}r&&this._injectJsonLd(r),this._setEntityCanonical(),i&&this._setMeta(`og:title`,i);let d=s(a,160)||s(o,160);d?this._setMeta(`og:description`,d):this._restoreMetaProperty(`og:description`,this._originals?.ogDescription??null),c&&this._setMeta(`og:image`,c),l&&this._setMeta(`og:url`,l),this._setMeta(`og:type`,`website`),this._setMeta(`twitter:card`,`summary_large_image`),d?this._setMeta(`description`,d):this._restoreMetaName(`description`,this._originals?.metaDescription??null),i&&(document.title=`${i} | ${u}`),this._state=`entity`}onBackToListing(){if(!(typeof document>`u`)&&this._state!==`destroyed`){if(this._restoreOriginals(),this._removeAllInjected(),this._events.length>0){let e=this._buildItemList(this._events);this._injectJsonLd(e)}this._saveOriginals(),this._state=`listing`}}destroy(){if(this._holders>1){--this._holders;return}this._teardown()}_teardown(){typeof document>`u`||this._state!==`destroyed`&&(this._removeAllInjected(),this._restoreOriginals(),t._activeInstance===this&&(t._activeInstance=null),this._state=`destroyed`)}};exports.HostSeoController=q,exports.buildCollectionJsonLd=W,exports.buildEventJsonLd=B,exports.buildOffers=R,exports.buildPerformers=z,exports.buildPostalAddress=P,exports.buildSeriesJsonLd=U,exports.escapeJsonLdForScript=j,exports.formatDateTimeWithOffset=M,exports.getEventStatus=F,exports.getTicketAvailability=I,exports.parseAddressToPostal=N;
package/dist/seo/seo.mjs CHANGED
@@ -540,11 +540,7 @@ var q = class t {
540
540
  image: e.image,
541
541
  availableTickets: e.availableTickets
542
542
  },
543
- venue: {
544
- name: this._venueName,
545
- googleLocationNameCache: this._venueAddress
546
- },
547
- venueTimeZone: e.timeZone || this._venueTimeZone,
543
+ ...this._venueFor(e, e.timeZone),
548
544
  eventUrl: r
549
545
  });
550
546
  if (!i) return {
@@ -562,6 +558,19 @@ var q = class t {
562
558
  })
563
559
  };
564
560
  }
561
+ _venueFor(e, t) {
562
+ let n = e.showVenue?.name ? e.showVenue : void 0;
563
+ return {
564
+ venue: n ? {
565
+ name: n.name,
566
+ googleLocationNameCache: n.address || void 0
567
+ } : {
568
+ name: this._venueName,
569
+ googleLocationNameCache: this._venueAddress
570
+ },
571
+ venueTimeZone: t || n?.timeZone || this._venueTimeZone
572
+ };
573
+ }
565
574
  _buildEntityUrl(e, t, n) {
566
575
  return e === "event" ? this._showPageUrl(t, n) : this._entityDeepLink(t, n);
567
576
  }
@@ -583,18 +592,16 @@ var q = class t {
583
592
  let e = n.timeZone || n.timezone;
584
593
  e && (this._venueTimeZone = e);
585
594
  }
586
- let r = null, i = "", a = "", o = "", c = "", l = "";
595
+ let r = null, i = "", a = "", o = "", c = "", l = "", u = this._venueName;
587
596
  if (e === "event") {
588
597
  let e = t.slug || K(t.name || "");
589
- l = this._buildEntityUrl("event", t.id || t.eventID || "", e), r = B({
598
+ l = this._buildEntityUrl("event", t.id || t.eventID || "", e);
599
+ let n = this._venueFor(t);
600
+ r = B({
590
601
  event: t,
591
- venue: {
592
- name: this._venueName,
593
- googleLocationNameCache: this._venueAddress
594
- },
595
- venueTimeZone: this._venueTimeZone,
602
+ ...n,
596
603
  eventUrl: l
597
- }), i = t.name || "", a = t.description || "", o = t.eventSummary || "", c = t.image || t.coverImage || t.ShowImage || "";
604
+ }), u = n.venue.name, i = t.name || "", a = t.description || "", o = t.eventSummary || "", c = t.image || t.coverImage || t.ShowImage || "";
598
605
  } else if (e === "series") {
599
606
  let e = t.slug || K(t.title || "");
600
607
  l = this._buildEntityUrl("series", t.id || "", e), r = U({
@@ -617,8 +624,8 @@ var q = class t {
617
624
  }), i = t.collectionTitle || "", a = t.description || "", o = t.summary || "", c = t.coverImage || "";
618
625
  }
619
626
  r && this._injectJsonLd(r), this._setEntityCanonical(), i && this._setMeta("og:title", i);
620
- let u = s(a, 160) || s(o, 160);
621
- u ? this._setMeta("og:description", u) : this._restoreMetaProperty("og:description", this._originals?.ogDescription ?? null), c && this._setMeta("og:image", c), l && this._setMeta("og:url", l), this._setMeta("og:type", "website"), this._setMeta("twitter:card", "summary_large_image"), u ? this._setMeta("description", u) : this._restoreMetaName("description", this._originals?.metaDescription ?? null), i && (document.title = `${i} | ${this._venueName}`), this._state = "entity";
627
+ let d = s(a, 160) || s(o, 160);
628
+ d ? this._setMeta("og:description", d) : this._restoreMetaProperty("og:description", this._originals?.ogDescription ?? null), c && this._setMeta("og:image", c), l && this._setMeta("og:url", l), this._setMeta("og:type", "website"), this._setMeta("twitter:card", "summary_large_image"), d ? this._setMeta("description", d) : this._restoreMetaName("description", this._originals?.metaDescription ?? null), i && (document.title = `${i} | ${u}`), this._state = "entity";
622
629
  }
623
630
  onBackToListing() {
624
631
  if (!(typeof document > "u") && this._state !== "destroyed") {
@@ -1,6 +1,6 @@
1
1
  import { g as e } from "./sizing-B7ixYndz.js";
2
2
  import { F as t, M as n, P as r, Q as i, X as a, et as o, nt as s, z as c } from "./orders-B-c1HnI7.js";
3
- import "./event-transform-CL4pk66Q.js";
3
+ import "./event-transform-DfsYkBnu.js";
4
4
  //#region node_modules/js-cookie/dist/js.cookie.mjs
5
5
  function l(e) {
6
6
  for (var t = 1; t < arguments.length; t++) {