@getmicdrop/venue-calendar 3.8.3 → 4.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +700 -661
- package/dist/AirbnbSplitMain-BfddFqOQ.js +2201 -0
- package/dist/AirbnbSplitMain-BfddFqOQ.js.map +1 -0
- package/dist/{CarouselView.legacy-BED9P-az.js → CarouselView.legacy-BKXwmB2P.js} +11 -10
- package/dist/CarouselView.legacy-BKXwmB2P.js.map +1 -0
- package/dist/CartView-iIEjDwFN.js +1667 -0
- package/dist/CartView-iIEjDwFN.js.map +1 -0
- package/dist/Checkout-Cu0D8mFn.js +743 -0
- package/dist/Checkout-Cu0D8mFn.js.map +1 -0
- package/dist/{Checkout.legacy-B1Ui4zZN.js → Checkout.legacy-C6V9HmUZ.js} +374 -359
- package/dist/Checkout.legacy-C6V9HmUZ.js.map +1 -0
- package/dist/CheckoutMain-B17znLe0.js +1403 -0
- package/dist/CheckoutMain-B17znLe0.js.map +1 -0
- package/dist/CheckoutTimer-BsI1r6lY.js +34 -0
- package/dist/CheckoutTimer-BsI1r6lY.js.map +1 -0
- package/dist/CollectionView-CQgKWQHT.js +142 -0
- package/dist/CollectionView-CQgKWQHT.js.map +1 -0
- package/dist/{CollectionView.legacy-CXv5mTUk.js → CollectionView.legacy-B8SDspBL.js} +25 -24
- package/dist/CollectionView.legacy-B8SDspBL.js.map +1 -0
- package/dist/EventDetailsView-XXl8aQJ9.js +1187 -0
- package/dist/EventDetailsView-XXl8aQJ9.js.map +1 -0
- package/dist/{FeaturedView.legacy-C5yztREl.js → FeaturedView.legacy-Dse2jnrt.js} +15 -15
- package/dist/FeaturedView.legacy-Dse2jnrt.js.map +1 -0
- package/dist/GalleryCard-CDaYD8XI.js +92 -0
- package/dist/GalleryCard-CDaYD8XI.js.map +1 -0
- package/dist/{GalleryView.legacy-DoM4NcPc.js → GalleryView.legacy-U_ripo22.js} +18 -17
- package/dist/GalleryView.legacy-U_ripo22.js.map +1 -0
- package/dist/{GroupedListView.legacy-Dmm_z1rM.js → GroupedListView.legacy-BrickaeB.js} +25 -25
- package/dist/GroupedListView.legacy-BrickaeB.js.map +1 -0
- package/dist/Heading-AFd3o0xt.js +44 -0
- package/dist/Heading-AFd3o0xt.js.map +1 -0
- package/dist/OrderSummarySkeleton-dDKUH741.js +16 -0
- package/dist/OrderSummarySkeleton-dDKUH741.js.map +1 -0
- package/dist/SeriesPage-CNoI4R4M.js +56 -0
- package/dist/SeriesPage-CNoI4R4M.js.map +1 -0
- package/dist/SeriesPage.legacy-Cugebbf0.js +195 -0
- package/dist/SeriesPage.legacy-Cugebbf0.js.map +1 -0
- package/dist/Success-BQAu7uZn.js +715 -0
- package/dist/Success-BQAu7uZn.js.map +1 -0
- package/dist/Success.legacy-DSmTsdB_.js +195 -0
- package/dist/Success.legacy-DSmTsdB_.js.map +1 -0
- package/dist/Text-CXR2fhx6.js +54 -0
- package/dist/Text-CXR2fhx6.js.map +1 -0
- package/dist/{VenueCalendar-DIQ8H0q7.js → VenueCalendar-DzTrcN8J.js} +11242 -21624
- package/dist/VenueCalendar-DzTrcN8J.js.map +1 -0
- package/dist/ViewTicketsEmbed-DOTq6kSz.js +2038 -0
- package/dist/ViewTicketsEmbed-DOTq6kSz.js.map +1 -0
- package/dist/__SKIP_NAVIGATION__-CJ96TTPE.js +7 -0
- package/dist/__SKIP_NAVIGATION__-CJ96TTPE.js.map +1 -0
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.cjs.map +1 -1
- package/dist/api/api.mjs +511 -279
- package/dist/api/api.mjs.map +1 -1
- package/dist/api/client.d.ts +3 -33
- package/dist/api/cta.d.ts +38 -0
- package/dist/api/events.d.ts +3 -1
- package/dist/api/gift-cards.d.ts +88 -0
- package/dist/api/index.d.ts +6 -0
- package/dist/api/types.d.ts +353 -349
- package/dist/api/waitlist.d.ts +23 -0
- package/dist/colors-BZoMuXdh.js.map +1 -1
- package/dist/labels-BPzDu-3y.js +1351 -0
- package/dist/labels-BPzDu-3y.js.map +1 -0
- package/dist/seo/HostSeoController.d.ts +9 -1
- package/dist/seo/seo.cjs +1 -1
- package/dist/seo/seo.cjs.map +1 -1
- package/dist/seo/seo.mjs +53 -50
- package/dist/seo/seo.mjs.map +1 -1
- package/dist/seo/types.d.ts +137 -136
- package/dist/transform-CZI_M7Wk.js +218 -0
- package/dist/transform-CZI_M7Wk.js.map +1 -0
- package/dist/types/index.d.ts +387 -387
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +36 -28
- package/dist/venue-calendar.es.js.map +1 -1
- package/dist/venue-calendar.iife.js +43 -43
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +40 -40
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +44 -6
- package/src/lib/theme.js +13 -0
- package/dist/CarouselView.legacy-BED9P-az.js.map +0 -1
- package/dist/Checkout.legacy-B1Ui4zZN.js.map +0 -1
- package/dist/CollectionView.legacy-CXv5mTUk.js.map +0 -1
- package/dist/FeaturedView.legacy-C5yztREl.js.map +0 -1
- package/dist/GalleryView.legacy-DoM4NcPc.js.map +0 -1
- package/dist/GroupedListView.legacy-Dmm_z1rM.js.map +0 -1
- package/dist/SeriesPage.legacy-Cgtr6qB_.js +0 -190
- package/dist/SeriesPage.legacy-Cgtr6qB_.js.map +0 -1
- package/dist/Success.legacy-DHG9NwIq.js +0 -194
- package/dist/Success.legacy-DHG9NwIq.js.map +0 -1
- package/dist/VenueCalendar-DIQ8H0q7.js.map +0 -1
package/dist/seo/types.d.ts
CHANGED
|
@@ -1,136 +1,137 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
//
|
|
72
|
-
//
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
1
|
+
import { getDefaultTimezone } from '@getmicdrop/svelte-components/utils/timezones';
|
|
2
|
+
/**
|
|
3
|
+
* Input/output TypeScript interfaces for all JSON-LD builders.
|
|
4
|
+
*
|
|
5
|
+
* These describe the data shape each builder expects, NOT the raw API response
|
|
6
|
+
* shape (those exist in `api/types.ts`). The mapping from API types to these
|
|
7
|
+
* builder input types happens at the call site.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
// ---------------------------------------------------------------------------
|
|
11
|
+
// Event builder inputs
|
|
12
|
+
// ---------------------------------------------------------------------------
|
|
13
|
+
|
|
14
|
+
/** What buildEventJsonLd expects for an event. */
|
|
15
|
+
export interface EventJsonLdInput {
|
|
16
|
+
name: string;
|
|
17
|
+
startDateTime: string;
|
|
18
|
+
endDateTime?: string;
|
|
19
|
+
status?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
eventSummary?: string;
|
|
22
|
+
image?: string;
|
|
23
|
+
coverImage?: string;
|
|
24
|
+
ShowImage?: string;
|
|
25
|
+
availableTickets?: EventTicketInput[];
|
|
26
|
+
performers?: EventPerformerInput[];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface EventTicketInput {
|
|
30
|
+
visibility?: number;
|
|
31
|
+
salesChannel?: number;
|
|
32
|
+
price?: number | string;
|
|
33
|
+
remainingCapacity?: number;
|
|
34
|
+
quantityRemaining?: number;
|
|
35
|
+
quantity?: number;
|
|
36
|
+
soldOut?: boolean;
|
|
37
|
+
salesBegin?: string;
|
|
38
|
+
salesStart?: string;
|
|
39
|
+
saleBegin?: string;
|
|
40
|
+
onSaleStart?: string;
|
|
41
|
+
salesEnd?: string;
|
|
42
|
+
saleEnd?: string;
|
|
43
|
+
onSaleEnd?: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface EventPerformerInput {
|
|
47
|
+
acceptedState?: number;
|
|
48
|
+
shouldBeHidden?: boolean;
|
|
49
|
+
RosterPerformer?: {
|
|
50
|
+
User?: {
|
|
51
|
+
performerProfile?: {
|
|
52
|
+
firstName?: string;
|
|
53
|
+
lastName?: string;
|
|
54
|
+
displayName?: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface VenueInput {
|
|
61
|
+
name: string;
|
|
62
|
+
address?: string;
|
|
63
|
+
googleLocationNameCache?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface OrganizerInput {
|
|
67
|
+
name: string;
|
|
68
|
+
url?: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// ---------------------------------------------------------------------------
|
|
72
|
+
// Series builder inputs (Plan 02)
|
|
73
|
+
// ---------------------------------------------------------------------------
|
|
74
|
+
|
|
75
|
+
/** What buildSeriesJsonLd expects. */
|
|
76
|
+
export interface SeriesJsonLdInput {
|
|
77
|
+
title: string;
|
|
78
|
+
description?: string;
|
|
79
|
+
eventSummary?: string;
|
|
80
|
+
image?: string;
|
|
81
|
+
timeZone: string;
|
|
82
|
+
venue: {
|
|
83
|
+
name: string;
|
|
84
|
+
googleLocationNameCache?: string;
|
|
85
|
+
};
|
|
86
|
+
performers?: Array<{ displayName: string }>;
|
|
87
|
+
occurrences: Array<{
|
|
88
|
+
id: number;
|
|
89
|
+
title: string;
|
|
90
|
+
slug: string;
|
|
91
|
+
startDateTime: string;
|
|
92
|
+
endDateTime?: string;
|
|
93
|
+
status?: string;
|
|
94
|
+
tickets?: Array<{ name: string; price: number; status: string }>;
|
|
95
|
+
}>;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// ---------------------------------------------------------------------------
|
|
99
|
+
// Collection builder inputs (Plan 02)
|
|
100
|
+
// ---------------------------------------------------------------------------
|
|
101
|
+
|
|
102
|
+
// ---------------------------------------------------------------------------
|
|
103
|
+
// HostSeoController options (Phase 6)
|
|
104
|
+
// ---------------------------------------------------------------------------
|
|
105
|
+
|
|
106
|
+
/** Options for HostSeoController constructor */
|
|
107
|
+
export interface HostSeoControllerOptions {
|
|
108
|
+
/** Venue name for JSON-LD location and page title */
|
|
109
|
+
venueName: string;
|
|
110
|
+
/** Venue address string (from googleLocationNameCache or address field) */
|
|
111
|
+
venueAddress?: string;
|
|
112
|
+
/** Venue timezone (IANA), defaults to getDefaultTimezone() */
|
|
113
|
+
venueTimeZone?: string;
|
|
114
|
+
/** Base URL for canonical links, e.g., "https://comedy-club.com/shows" (defaults to current page URL without query params) */
|
|
115
|
+
baseUrl?: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** What buildCollectionJsonLd expects. */
|
|
119
|
+
export interface CollectionJsonLdInput {
|
|
120
|
+
collectionTitle: string;
|
|
121
|
+
description?: string;
|
|
122
|
+
summary?: string;
|
|
123
|
+
coverImage?: string;
|
|
124
|
+
dateRange?: { startDate: string; endDate: string } | null;
|
|
125
|
+
events: Array<{
|
|
126
|
+
id: number;
|
|
127
|
+
title: string;
|
|
128
|
+
slug?: string;
|
|
129
|
+
startDateTime?: string;
|
|
130
|
+
endDateTime?: string;
|
|
131
|
+
image?: string;
|
|
132
|
+
status?: string;
|
|
133
|
+
venueName?: string;
|
|
134
|
+
venueAddress?: string;
|
|
135
|
+
venueId?: number;
|
|
136
|
+
}>;
|
|
137
|
+
}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { e as u, aw as y, af as D } from "./VenueCalendar-DzTrcN8J.js";
|
|
2
|
+
import "svelte/internal/disclose-version";
|
|
3
|
+
import "svelte/internal/client";
|
|
4
|
+
import "svelte/internal/flags/legacy";
|
|
5
|
+
import "svelte/transition";
|
|
6
|
+
import "svelte/easing";
|
|
7
|
+
function _(e) {
|
|
8
|
+
if (!e) return [];
|
|
9
|
+
const a = e.split(",").map((i) => i.trim());
|
|
10
|
+
if (a.length < 2) return [e];
|
|
11
|
+
const o = a[a.length - 1].match(/^([A-Z]{2})\s+(\d{5}(-\d{4})?)$/);
|
|
12
|
+
if (o && a.length >= 3) {
|
|
13
|
+
const i = o[1], d = o[2], m = a[a.length - 2], l = a.slice(0, -2);
|
|
14
|
+
return l.push(`${m}, ${i} ${d}`), l;
|
|
15
|
+
}
|
|
16
|
+
return [a[0], a.slice(1).join(", ")];
|
|
17
|
+
}
|
|
18
|
+
function C(e) {
|
|
19
|
+
return e ? `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(e)}` : "";
|
|
20
|
+
}
|
|
21
|
+
function q(e) {
|
|
22
|
+
const a = /* @__PURE__ */ new Date(), s = e.remainingCapacity ?? e.quantityRemaining ?? e.quantity ?? 0, o = e.salesBegin || e.salesStart || e.saleBegin || e.onSaleStart, i = e.salesEnd || e.saleEnd || e.onSaleEnd;
|
|
23
|
+
return s <= 0 ? "sold_out" : i && new Date(i) < a ? "sales_ended" : o && new Date(o) > a ? "coming_soon" : "on_sale";
|
|
24
|
+
}
|
|
25
|
+
function I(e, a) {
|
|
26
|
+
const s = (e || "").toLowerCase().replace(/\s+/g, "_");
|
|
27
|
+
if (s === "cancelled" || s === "canceled") return "cancelled";
|
|
28
|
+
if (s === "past" || s === "ended") return "past";
|
|
29
|
+
const o = a.filter((i) => !i.isHidden);
|
|
30
|
+
if (o.length > 0) {
|
|
31
|
+
if (o.every((i) => i.status === "sold_out")) return "sold_out";
|
|
32
|
+
if (o.every((i) => i.status === "coming_soon")) return "coming_soon";
|
|
33
|
+
if (o.every((i) => i.status === "sales_ended" || i.status === "sold_out")) return "sales_ended";
|
|
34
|
+
}
|
|
35
|
+
return s === "sold_out" || s === "soldout" ? "sold_out" : s === "coming_soon" || s === "comingsoon" ? "coming_soon" : s === "sales_ended" || s === "salesended" ? "sales_ended" : "on_sale";
|
|
36
|
+
}
|
|
37
|
+
function k(e) {
|
|
38
|
+
const a = y(e.timeZone || e.timezone || "UTC"), o = (e.availableTickets || []).map((t) => ({
|
|
39
|
+
id: t.id || t.ID,
|
|
40
|
+
name: t.name || t.title || "",
|
|
41
|
+
description: t.description || void 0,
|
|
42
|
+
price: t.price ?? 0,
|
|
43
|
+
fee: t.fee ?? 0,
|
|
44
|
+
quantityAvailable: t.remainingCapacity ?? t.quantityRemaining ?? t.quantity ?? 0,
|
|
45
|
+
quantityTotal: t.totalCapacity ?? t.quantity ?? 0,
|
|
46
|
+
minPerOrder: t.minPerOrder ?? t.minQuantity ?? 1,
|
|
47
|
+
maxPerOrder: t.maxPerOrder ?? t.maxQuantity ?? 10,
|
|
48
|
+
status: q(t),
|
|
49
|
+
salesStartDate: t.salesBegin || t.salesStart || t.saleBegin || t.onSaleStart || void 0,
|
|
50
|
+
salesEndDate: t.salesEnd || t.saleEnd || t.onSaleEnd || void 0,
|
|
51
|
+
isDonation: t.type === 2 || t.ticketType === 2 || t.isDonation === !0,
|
|
52
|
+
isHidden: t.visibility === 2 || t.isHidden === !0,
|
|
53
|
+
ticketType: t.type || t.ticketType || void 0,
|
|
54
|
+
sectionName: t.sectionName || t.section || void 0
|
|
55
|
+
})), i = o.filter((t) => !t.isHidden && !t.isDonation), d = i.reduce((t, p) => t + p.quantityAvailable, 0), m = i.reduce((t, p) => t + p.quantityTotal, 0), l = I(e.status, o), c = e.image || e.imageUrl || e.image_url || "", g = c.startsWith("http") ? c : u(c), n = e.venue || {}, r = {
|
|
56
|
+
id: n.id || n.ID || 0,
|
|
57
|
+
name: n.name || n.googleLocationNameCache || "",
|
|
58
|
+
address: n.address || n.googleLocationNameCache || "",
|
|
59
|
+
timezone: a,
|
|
60
|
+
serviceFeePercentage: n.serviceFeePercentage ?? n.fee ?? 0,
|
|
61
|
+
serviceFeeCents: n.serviceFeeCents ?? 0,
|
|
62
|
+
taxPercentage: n.taxPercentage ?? n.tax ?? 0,
|
|
63
|
+
contactEmail: n.contactEmail || n.email || void 0
|
|
64
|
+
}, h = (e.performers || []).map((t) => ({
|
|
65
|
+
id: t.id || t.ID,
|
|
66
|
+
displayName: t.displayName || t.name || "",
|
|
67
|
+
profileImage: t.avatar || t.profileImage || void 0,
|
|
68
|
+
role: t.role || void 0
|
|
69
|
+
})), P = (e.faqs || []).map((t) => ({
|
|
70
|
+
question: t.question || "",
|
|
71
|
+
answer: t.answer || ""
|
|
72
|
+
}));
|
|
73
|
+
let T = "";
|
|
74
|
+
if (e.startDateTime) {
|
|
75
|
+
const t = new Date(e.startDateTime);
|
|
76
|
+
T = D(t, { timeZone: a, year: "numeric", month: "2-digit", day: "2-digit" }, "en-CA");
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
id: e.id || e.ID,
|
|
80
|
+
title: e.title || e.name || "",
|
|
81
|
+
slug: e.slug || "",
|
|
82
|
+
description: e.description || e.eventSummary || "",
|
|
83
|
+
date: T,
|
|
84
|
+
startDateTime: e.startDateTime || "",
|
|
85
|
+
endDateTime: e.endDateTime || "",
|
|
86
|
+
doorsOpenTime: e.doorsOpenTime || "",
|
|
87
|
+
timezone: a,
|
|
88
|
+
imageUrl: g,
|
|
89
|
+
venue: r,
|
|
90
|
+
performers: h,
|
|
91
|
+
tickets: o,
|
|
92
|
+
faqs: P,
|
|
93
|
+
disclaimer: e.disclaimer || void 0,
|
|
94
|
+
status: l,
|
|
95
|
+
eventSeriesId: e.eventSeriesId || void 0,
|
|
96
|
+
isPasswordProtected: !!e.password,
|
|
97
|
+
isRegistrationEvent: e.ticketType === 1 || e.eventTicketingType === 1,
|
|
98
|
+
totalTicketsRemaining: d,
|
|
99
|
+
totalTicketsCapacity: m,
|
|
100
|
+
stageName: e.stage?.name || e.stageName || void 0,
|
|
101
|
+
ageRestriction: e.ageRestriction || void 0,
|
|
102
|
+
displayAgeRestriction: e.displayAgeRestriction ?? !1,
|
|
103
|
+
displayStartTime: e.displayStartTime ?? !0,
|
|
104
|
+
displayEndTime: e.displayEndTime ?? !0,
|
|
105
|
+
displayDoorsTime: e.displayDoorsTime ?? !0,
|
|
106
|
+
collectionId: e.collectionId || e.collection_id || void 0,
|
|
107
|
+
venueAddressLines: _(n.address || n.googleLocationNameCache || ""),
|
|
108
|
+
googleMapsUrl: C(n.address || n.googleLocationNameCache || "")
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function x(e) {
|
|
112
|
+
const a = y(e.timeZone || "UTC"), s = e.image || "", o = s.startsWith("http") ? s : s ? u(s) : "", i = (e.occurrences || []).map((r) => ({
|
|
113
|
+
id: r.id,
|
|
114
|
+
slug: r.slug || "",
|
|
115
|
+
startDateTime: r.startDateTime,
|
|
116
|
+
endDateTime: r.endDateTime || "",
|
|
117
|
+
status: r.ctaState?.reason === "sold_out" ? "sold_out" : "on_sale",
|
|
118
|
+
ctaText: r.ctaState?.text || "Get Tickets",
|
|
119
|
+
ctaDisabled: r.ctaState?.disabled || !1
|
|
120
|
+
})), d = e.occurrences?.[0];
|
|
121
|
+
let m = "";
|
|
122
|
+
if (d?.startDateTime) {
|
|
123
|
+
const r = new Date(d.startDateTime);
|
|
124
|
+
m = D(r, { timeZone: a, year: "numeric", month: "2-digit", day: "2-digit" }, "en-CA");
|
|
125
|
+
}
|
|
126
|
+
const l = e.venue?.faq;
|
|
127
|
+
let c = [];
|
|
128
|
+
Array.isArray(l) ? c = l.map((r) => ({ question: r.question || "", answer: r.answer || "" })) : typeof l == "string" && l && (c = [{ question: "FAQ", answer: l }]);
|
|
129
|
+
const g = (e.performers || []).map((r, f) => ({
|
|
130
|
+
id: f + 1,
|
|
131
|
+
displayName: r.displayName || [r.firstName, r.lastName].filter(Boolean).join(" "),
|
|
132
|
+
profileImage: r.profileImage || void 0
|
|
133
|
+
})), n = e.venue?.location || e.venue?.googleLocationNameCache || "";
|
|
134
|
+
return {
|
|
135
|
+
id: e.id,
|
|
136
|
+
title: e.title || "",
|
|
137
|
+
slug: "",
|
|
138
|
+
description: e.description || e.eventSummary || "",
|
|
139
|
+
date: m,
|
|
140
|
+
startDateTime: d?.startDateTime || "",
|
|
141
|
+
endDateTime: d?.endDateTime || "",
|
|
142
|
+
doorsOpenTime: "",
|
|
143
|
+
timezone: a,
|
|
144
|
+
imageUrl: o,
|
|
145
|
+
venue: {
|
|
146
|
+
id: e.venue?.id || 0,
|
|
147
|
+
name: e.venue?.name || "",
|
|
148
|
+
address: n,
|
|
149
|
+
timezone: a,
|
|
150
|
+
serviceFeePercentage: 0,
|
|
151
|
+
serviceFeeCents: 0,
|
|
152
|
+
taxPercentage: 0
|
|
153
|
+
},
|
|
154
|
+
performers: g,
|
|
155
|
+
tickets: [],
|
|
156
|
+
faqs: c,
|
|
157
|
+
disclaimer: e.venue?.disclaimer || void 0,
|
|
158
|
+
status: "on_sale",
|
|
159
|
+
eventSeriesId: e.id,
|
|
160
|
+
seriesOccurrences: i,
|
|
161
|
+
isPasswordProtected: !1,
|
|
162
|
+
isRegistrationEvent: !1,
|
|
163
|
+
totalTicketsRemaining: 0,
|
|
164
|
+
totalTicketsCapacity: 0,
|
|
165
|
+
venueAddressLines: _(n),
|
|
166
|
+
googleMapsUrl: C(n)
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
function b(e) {
|
|
170
|
+
const a = (e.events || []).map((i) => {
|
|
171
|
+
const d = i.image || "";
|
|
172
|
+
return {
|
|
173
|
+
id: i.id,
|
|
174
|
+
name: i.title || "",
|
|
175
|
+
slug: i.slug || "",
|
|
176
|
+
image: d.startsWith("http") ? d : d ? u(d) : "",
|
|
177
|
+
startDateTime: i.startDateTime || "",
|
|
178
|
+
status: i.status || "on_sale"
|
|
179
|
+
};
|
|
180
|
+
}), s = e.coverImage || "", o = s.startsWith("http") ? s : s ? u(s) : "";
|
|
181
|
+
return {
|
|
182
|
+
id: e.id,
|
|
183
|
+
title: e.collectionTitle || "",
|
|
184
|
+
slug: "",
|
|
185
|
+
description: e.description || e.summary || "",
|
|
186
|
+
date: "",
|
|
187
|
+
startDateTime: "",
|
|
188
|
+
endDateTime: "",
|
|
189
|
+
doorsOpenTime: "",
|
|
190
|
+
timezone: "UTC",
|
|
191
|
+
imageUrl: o,
|
|
192
|
+
venue: {
|
|
193
|
+
id: 0,
|
|
194
|
+
name: "",
|
|
195
|
+
address: "",
|
|
196
|
+
timezone: "UTC",
|
|
197
|
+
serviceFeePercentage: 0,
|
|
198
|
+
serviceFeeCents: 0,
|
|
199
|
+
taxPercentage: 0
|
|
200
|
+
},
|
|
201
|
+
performers: [],
|
|
202
|
+
tickets: [],
|
|
203
|
+
faqs: [],
|
|
204
|
+
status: "on_sale",
|
|
205
|
+
collectionId: e.id,
|
|
206
|
+
collectionEvents: a,
|
|
207
|
+
isPasswordProtected: !1,
|
|
208
|
+
isRegistrationEvent: !1,
|
|
209
|
+
totalTicketsRemaining: 0,
|
|
210
|
+
totalTicketsCapacity: 0
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
export {
|
|
214
|
+
x as a,
|
|
215
|
+
b,
|
|
216
|
+
k as t
|
|
217
|
+
};
|
|
218
|
+
//# sourceMappingURL=transform-CZI_M7Wk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform-CZI_M7Wk.js","sources":["../src/lib/premium-ticket-experience/transform.ts"],"sourcesContent":["import { formatDateRaw } from '@getmicdrop/svelte-components';\n// Premium Ticket Experience — API → EventData Transformer\n// Maps raw API event responses to our clean EventData interface.\n// Used when plugging in real API data. The showcase continues using mock-data.ts directly.\n\nimport { getImageUrl } from '$lib/utils/utils.js';\nimport { getIANATimezone } from '$lib/utils/datetime.js';\nimport type {\n\tEventData,\n\tEventStatus,\n\tTicketTypeData,\n\tTicketStatus,\n\tVenueData,\n\tPerformerData,\n\tFAQItem,\n\tSeriesOccurrence,\n\tCollectionEvent\n} from './types';\nimport type { SeriesPageData, PublicCollectionData } from '$lib/api/types';\n\n/**\n * Parse a single-line address string into display lines.\n * E.g. \"123 Main St, Los Angeles, CA 90012\" → [\"123 Main St\", \"Los Angeles, CA 90012\"]\n */\nfunction parseAddress(addressStr: string): string[] {\n\tif (!addressStr) return [];\n\tconst parts = addressStr.split(',').map((p) => p.trim());\n\tif (parts.length < 2) return [addressStr];\n\tconst lastPart = parts[parts.length - 1];\n\tconst stateZipMatch = lastPart.match(/^([A-Z]{2})\\s+(\\d{5}(-\\d{4})?)$/);\n\tif (stateZipMatch && parts.length >= 3) {\n\t\tconst state = stateZipMatch[1];\n\t\tconst zip = stateZipMatch[2];\n\t\tconst city = parts[parts.length - 2];\n\t\tconst lines = parts.slice(0, -2);\n\t\tlines.push(`${city}, ${state} ${zip}`);\n\t\treturn lines;\n\t}\n\treturn [parts[0], parts.slice(1).join(', ')];\n}\n\n/**\n * Build a Google Maps search URL from an address string.\n */\nfunction buildGoogleMapsUrl(address: string): string {\n\tif (!address) return '';\n\treturn `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(address)}`;\n}\n\n/**\n * Map a raw API ticket status/state to our TicketStatus union.\n */\nfunction mapTicketStatus(ticket: any): TicketStatus {\n\tconst now = new Date();\n\tconst remaining = ticket.remainingCapacity ?? ticket.quantityRemaining ?? ticket.quantity ?? 0;\n\tconst salesBegin = ticket.salesBegin || ticket.salesStart || ticket.saleBegin || ticket.onSaleStart;\n\tconst salesEnd = ticket.salesEnd || ticket.saleEnd || ticket.onSaleEnd;\n\n\tif (remaining <= 0) return 'sold_out';\n\tif (salesEnd && new Date(salesEnd) < now) return 'sales_ended';\n\tif (salesBegin && new Date(salesBegin) > now) return 'coming_soon';\n\treturn 'on_sale';\n}\n\n/**\n * Map a raw API event status string to our EventStatus union.\n */\nfunction mapEventStatus(rawStatus: string, tickets: TicketTypeData[]): EventStatus {\n\tconst s = (rawStatus || '').toLowerCase().replace(/\\s+/g, '_');\n\n\tif (s === 'cancelled' || s === 'canceled') return 'cancelled';\n\n\t// Check if event is past based on end time (handled by caller if needed)\n\tif (s === 'past' || s === 'ended') return 'past';\n\n\t// Derive from ticket states\n\tconst publicTickets = tickets.filter((t) => !t.isHidden);\n\tif (publicTickets.length > 0) {\n\t\tif (publicTickets.every((t) => t.status === 'sold_out')) return 'sold_out';\n\t\tif (publicTickets.every((t) => t.status === 'coming_soon')) return 'coming_soon';\n\t\tif (publicTickets.every((t) => t.status === 'sales_ended' || t.status === 'sold_out')) return 'sales_ended';\n\t}\n\n\tif (s === 'sold_out' || s === 'soldout') return 'sold_out';\n\tif (s === 'coming_soon' || s === 'comingsoon') return 'coming_soon';\n\tif (s === 'sales_ended' || s === 'salesended') return 'sales_ended';\n\n\treturn 'on_sale';\n}\n\n/**\n * Transform a raw API event response into our clean EventData interface.\n * This is the bridge between the API and our premium ticket experience components.\n */\nexport function transformApiEvent(rawEvent: any): EventData {\n\tconst timezone = getIANATimezone(rawEvent.timeZone || rawEvent.timezone || 'UTC');\n\n\t// Transform tickets\n\tconst rawTickets = rawEvent.availableTickets || [];\n\tconst tickets: TicketTypeData[] = rawTickets.map((t: any) => ({\n\t\tid: t.id || t.ID,\n\t\tname: t.name || t.title || '',\n\t\tdescription: t.description || undefined,\n\t\tprice: t.price ?? 0,\n\t\tfee: t.fee ?? 0,\n\t\tquantityAvailable: t.remainingCapacity ?? t.quantityRemaining ?? t.quantity ?? 0,\n\t\tquantityTotal: t.totalCapacity ?? t.quantity ?? 0,\n\t\tminPerOrder: t.minPerOrder ?? t.minQuantity ?? 1,\n\t\tmaxPerOrder: t.maxPerOrder ?? t.maxQuantity ?? 10,\n\t\tstatus: mapTicketStatus(t),\n\t\tsalesStartDate: t.salesBegin || t.salesStart || t.saleBegin || t.onSaleStart || undefined,\n\t\tsalesEndDate: t.salesEnd || t.saleEnd || t.onSaleEnd || undefined,\n\t\tisDonation: t.type === 2 || t.ticketType === 2 || t.isDonation === true,\n\t\tisHidden: t.visibility === 2 || t.isHidden === true,\n\t\tticketType: t.type || t.ticketType || undefined,\n\t\tsectionName: t.sectionName || t.section || undefined\n\t}));\n\n\t// Calculate totals from public tickets\n\tconst publicTickets = tickets.filter((t) => !t.isHidden && !t.isDonation);\n\tconst totalRemaining = publicTickets.reduce((sum, t) => sum + t.quantityAvailable, 0);\n\tconst totalCapacity = publicTickets.reduce((sum, t) => sum + t.quantityTotal, 0);\n\n\t// Determine event status\n\tconst status = mapEventStatus(rawEvent.status, tickets);\n\n\t// Build image URL\n\tconst rawImage = rawEvent.image || rawEvent.imageUrl || rawEvent.image_url || '';\n\tconst imageUrl = rawImage.startsWith('http') ? rawImage : getImageUrl(rawImage);\n\n\t// Venue\n\tconst rawVenue = rawEvent.venue || {};\n\tconst venue: VenueData = {\n\t\tid: rawVenue.id || rawVenue.ID || 0,\n\t\tname: rawVenue.name || rawVenue.googleLocationNameCache || '',\n\t\taddress: rawVenue.address || rawVenue.googleLocationNameCache || '',\n\t\ttimezone,\n\t\tserviceFeePercentage: rawVenue.serviceFeePercentage ?? rawVenue.fee ?? 0,\n\t\tserviceFeeCents: rawVenue.serviceFeeCents ?? 0,\n\t\ttaxPercentage: rawVenue.taxPercentage ?? rawVenue.tax ?? 0,\n\t\tcontactEmail: rawVenue.contactEmail || rawVenue.email || undefined\n\t};\n\n\t// Performers\n\tconst rawPerformers = rawEvent.performers || [];\n\tconst performers: PerformerData[] = rawPerformers.map((p: any) => ({\n\t\tid: p.id || p.ID,\n\t\tdisplayName: p.displayName || p.name || '',\n\t\tprofileImage: p.avatar || p.profileImage || undefined,\n\t\trole: p.role || undefined\n\t}));\n\n\t// FAQs (may not be in API response)\n\tconst faqs: FAQItem[] = (rawEvent.faqs || []).map((f: any) => ({\n\t\tquestion: f.question || '',\n\t\tanswer: f.answer || ''\n\t}));\n\n\t// Date in venue timezone\n\tlet date = '';\n\tif (rawEvent.startDateTime) {\n\t\tconst dt = new Date(rawEvent.startDateTime);\n\t\tdate = formatDateRaw(dt, { timeZone: timezone, year: 'numeric', month: '2-digit', day: '2-digit' }, 'en-CA');\n\t}\n\n\treturn {\n\t\tid: rawEvent.id || rawEvent.ID,\n\t\ttitle: rawEvent.title || rawEvent.name || '',\n\t\tslug: rawEvent.slug || '',\n\t\tdescription: rawEvent.description || rawEvent.eventSummary || '',\n\t\tdate,\n\t\tstartDateTime: rawEvent.startDateTime || '',\n\t\tendDateTime: rawEvent.endDateTime || '',\n\t\tdoorsOpenTime: rawEvent.doorsOpenTime || '',\n\t\ttimezone,\n\t\timageUrl,\n\t\tvenue,\n\t\tperformers,\n\t\ttickets,\n\t\tfaqs,\n\t\tdisclaimer: rawEvent.disclaimer || undefined,\n\t\tstatus,\n\t\teventSeriesId: rawEvent.eventSeriesId || undefined,\n\t\tisPasswordProtected: !!rawEvent.password,\n\t\tisRegistrationEvent: rawEvent.ticketType === 1 || rawEvent.eventTicketingType === 1,\n\t\ttotalTicketsRemaining: totalRemaining,\n\t\ttotalTicketsCapacity: totalCapacity,\n\t\tstageName: rawEvent.stage?.name || rawEvent.stageName || undefined,\n\t\tageRestriction: rawEvent.ageRestriction || undefined,\n\t\tdisplayAgeRestriction: rawEvent.displayAgeRestriction ?? false,\n\t\tdisplayStartTime: rawEvent.displayStartTime ?? true,\n\t\tdisplayEndTime: rawEvent.displayEndTime ?? true,\n\t\tdisplayDoorsTime: rawEvent.displayDoorsTime ?? true,\n\t\tcollectionId: rawEvent.collectionId || rawEvent.collection_id || undefined,\n\t\tvenueAddressLines: parseAddress(rawVenue.address || rawVenue.googleLocationNameCache || ''),\n\t\tgoogleMapsUrl: buildGoogleMapsUrl(rawVenue.address || rawVenue.googleLocationNameCache || '')\n\t};\n}\n\n/**\n * Transform SeriesPageData (from the series API) into our clean EventData interface.\n * Sets eventSeriesId so AirbnbSplitMain renders in full-width series mode.\n */\nexport function transformSeriesPageData(series: SeriesPageData): EventData {\n\tconst timezone = getIANATimezone(series.timeZone || 'UTC');\n\n\t// Build image URL\n\tconst rawImage = series.image || '';\n\tconst imageUrl = rawImage.startsWith('http') ? rawImage : rawImage ? getImageUrl(rawImage) : '';\n\n\t// Map occurrences to SeriesOccurrence[]\n\tconst seriesOccurrences: SeriesOccurrence[] = (series.occurrences || []).map((occ) => ({\n\t\tid: occ.id,\n\t\tslug: occ.slug || '',\n\t\tstartDateTime: occ.startDateTime,\n\t\tendDateTime: occ.endDateTime || '',\n\t\tstatus: (occ.ctaState?.reason === 'sold_out' ? 'sold_out' : 'on_sale') as EventStatus,\n\t\tctaText: occ.ctaState?.text || 'Get Tickets',\n\t\tctaDisabled: occ.ctaState?.disabled || false\n\t}));\n\n\t// Use first occurrence for date fields\n\tconst firstOcc = series.occurrences?.[0];\n\tlet date = '';\n\tif (firstOcc?.startDateTime) {\n\t\tconst dt = new Date(firstOcc.startDateTime);\n\t\tdate = formatDateRaw(dt, { timeZone: timezone, year: 'numeric', month: '2-digit', day: '2-digit' }, 'en-CA');\n\t}\n\n\t// Map FAQs\n\tconst rawFaq = series.venue?.faq;\n\tlet faqs: FAQItem[] = [];\n\tif (Array.isArray(rawFaq)) {\n\t\tfaqs = rawFaq.map((f) => ({ question: f.question || '', answer: f.answer || '' }));\n\t} else if (typeof rawFaq === 'string' && rawFaq) {\n\t\tfaqs = [{ question: 'FAQ', answer: rawFaq }];\n\t}\n\n\t// Map performers\n\tconst performers: PerformerData[] = (series.performers || []).map((p, index) => ({\n\t\tid: index + 1,\n\t\tdisplayName: p.displayName || [p.firstName, p.lastName].filter(Boolean).join(' '),\n\t\tprofileImage: p.profileImage || undefined\n\t}));\n\n\t// Venue address\n\tconst venueAddress = series.venue?.location || series.venue?.googleLocationNameCache || '';\n\n\treturn {\n\t\tid: series.id,\n\t\ttitle: series.title || '',\n\t\tslug: '',\n\t\tdescription: series.description || series.eventSummary || '',\n\t\tdate,\n\t\tstartDateTime: firstOcc?.startDateTime || '',\n\t\tendDateTime: firstOcc?.endDateTime || '',\n\t\tdoorsOpenTime: '',\n\t\ttimezone,\n\t\timageUrl,\n\t\tvenue: {\n\t\t\tid: series.venue?.id || 0,\n\t\t\tname: series.venue?.name || '',\n\t\t\taddress: venueAddress,\n\t\t\ttimezone,\n\t\t\tserviceFeePercentage: 0,\n\t\t\tserviceFeeCents: 0,\n\t\t\ttaxPercentage: 0\n\t\t},\n\t\tperformers,\n\t\ttickets: [],\n\t\tfaqs,\n\t\tdisclaimer: series.venue?.disclaimer || undefined,\n\t\tstatus: 'on_sale',\n\t\teventSeriesId: series.id,\n\t\tseriesOccurrences,\n\t\tisPasswordProtected: false,\n\t\tisRegistrationEvent: false,\n\t\ttotalTicketsRemaining: 0,\n\t\ttotalTicketsCapacity: 0,\n\t\tvenueAddressLines: parseAddress(venueAddress),\n\t\tgoogleMapsUrl: buildGoogleMapsUrl(venueAddress)\n\t};\n}\n\n/**\n * Transform PublicCollectionData (from the collection API) into our clean EventData interface.\n * Sets collectionId so AirbnbSplitMain renders in full-width collection mode.\n */\nexport function transformCollectionData(collection: PublicCollectionData): EventData {\n\t// Map collection events to CollectionEvent[]\n\tconst collectionEvents: CollectionEvent[] = (collection.events || []).map((ev) => {\n\t\tconst rawImg = ev.image || '';\n\t\treturn {\n\t\t\tid: ev.id,\n\t\t\tname: ev.title || '',\n\t\t\tslug: ev.slug || '',\n\t\t\timage: rawImg.startsWith('http') ? rawImg : rawImg ? getImageUrl(rawImg) : '',\n\t\t\tstartDateTime: ev.startDateTime || '',\n\t\t\tstatus: ((ev.status || 'on_sale') as EventStatus)\n\t\t};\n\t});\n\n\t// Cover image\n\tconst rawCover = collection.coverImage || '';\n\tconst imageUrl = rawCover.startsWith('http') ? rawCover : rawCover ? getImageUrl(rawCover) : '';\n\n\treturn {\n\t\tid: collection.id,\n\t\ttitle: collection.collectionTitle || '',\n\t\tslug: '',\n\t\tdescription: collection.description || collection.summary || '',\n\t\tdate: '',\n\t\tstartDateTime: '',\n\t\tendDateTime: '',\n\t\tdoorsOpenTime: '',\n\t\ttimezone: 'UTC',\n\t\timageUrl,\n\t\tvenue: {\n\t\t\tid: 0,\n\t\t\tname: '',\n\t\t\taddress: '',\n\t\t\ttimezone: 'UTC',\n\t\t\tserviceFeePercentage: 0,\n\t\t\tserviceFeeCents: 0,\n\t\t\ttaxPercentage: 0\n\t\t},\n\t\tperformers: [],\n\t\ttickets: [],\n\t\tfaqs: [],\n\t\tstatus: 'on_sale',\n\t\tcollectionId: collection.id,\n\t\tcollectionEvents,\n\t\tisPasswordProtected: false,\n\t\tisRegistrationEvent: false,\n\t\ttotalTicketsRemaining: 0,\n\t\ttotalTicketsCapacity: 0\n\t};\n}\n"],"names":["parseAddress","addressStr","parts","p","stateZipMatch","state","zip","city","lines","buildGoogleMapsUrl","address","mapTicketStatus","ticket","now","remaining","salesBegin","salesEnd","mapEventStatus","rawStatus","tickets","publicTickets","t","transformApiEvent","rawEvent","timezone","getIANATimezone","totalRemaining","sum","totalCapacity","status","rawImage","imageUrl","getImageUrl","rawVenue","venue","performers","faqs","f","date","dt","formatDateRaw","transformSeriesPageData","series","seriesOccurrences","occ","firstOcc","rawFaq","index","venueAddress","transformCollectionData","collection","collectionEvents","ev","rawImg","rawCover"],"mappings":";;;;;;AAwBA,SAASA,EAAaC,GAA8B;AACnD,MAAI,CAACA,EAAY,QAAO,CAAA;AACxB,QAAMC,IAAQD,EAAW,MAAM,GAAG,EAAE,IAAI,CAACE,MAAMA,EAAE,MAAM;AACvD,MAAID,EAAM,SAAS,EAAG,QAAO,CAACD,CAAU;AAExC,QAAMG,IADWF,EAAMA,EAAM,SAAS,CAAC,EACR,MAAM,iCAAiC;AACtE,MAAIE,KAAiBF,EAAM,UAAU,GAAG;AACvC,UAAMG,IAAQD,EAAc,CAAC,GACvBE,IAAMF,EAAc,CAAC,GACrBG,IAAOL,EAAMA,EAAM,SAAS,CAAC,GAC7BM,IAAQN,EAAM,MAAM,GAAG,EAAE;AAC/B,WAAAM,EAAM,KAAK,GAAGD,CAAI,KAAKF,CAAK,IAAIC,CAAG,EAAE,GAC9BE;AAAA,EACR;AACA,SAAO,CAACN,EAAM,CAAC,GAAGA,EAAM,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC;AAC5C;AAKA,SAASO,EAAmBC,G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