@getmicdrop/venue-calendar 4.0.95 → 4.0.96

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 (63) hide show
  1. package/dist/{CartView-Cq0DU1Cy.js → CartView-DC-YjxhJ.js} +721 -726
  2. package/dist/CartView-DC-YjxhJ.js.map +1 -0
  3. package/dist/{Checkout-BV5f49vY.js → Checkout-DFEzsNwm.js} +8 -4
  4. package/dist/Checkout-DFEzsNwm.js.map +1 -0
  5. package/dist/{Checkout-BA43iGDc.js → Checkout-SGb68I5A.js} +271 -259
  6. package/dist/Checkout-SGb68I5A.js.map +1 -0
  7. package/dist/{CheckoutTimer-KyKyInco.js → CheckoutTimer-BUlr4C7O.js} +5 -5
  8. package/dist/{CheckoutTimer-KyKyInco.js.map → CheckoutTimer-BUlr4C7O.js.map} +1 -1
  9. package/dist/{ClockIcon-BD24dBol.js → ClockIcon-CI96OiJj.js} +2 -2
  10. package/dist/{ClockIcon-BD24dBol.js.map → ClockIcon-CI96OiJj.js.map} +1 -1
  11. package/dist/{CollectionView-CKIxku9-.js → CollectionView-kDS8R_bu.js} +35 -35
  12. package/dist/CollectionView-kDS8R_bu.js.map +1 -0
  13. package/dist/{Event-BPdt1Io5.js → Event-DUViqNEG.js} +497 -497
  14. package/dist/{Event-BPdt1Io5.js.map → Event-DUViqNEG.js.map} +1 -1
  15. package/dist/{EventPage-DRnTMGTK.js → EventPage-CbYWOehC.js} +6 -6
  16. package/dist/{EventPage-DRnTMGTK.js.map → EventPage-CbYWOehC.js.map} +1 -1
  17. package/dist/{Heading-pQuVpBrL.js → Heading-DtOhaDMn.js} +10 -10
  18. package/dist/{Heading-pQuVpBrL.js.map → Heading-DtOhaDMn.js.map} +1 -1
  19. package/dist/{ScarcityBadge-DoYdujCs.js → ScarcityBadge-CBKc57di.js} +16 -16
  20. package/dist/{ScarcityBadge-DoYdujCs.js.map → ScarcityBadge-CBKc57di.js.map} +1 -1
  21. package/dist/{SeriesPage-vw7Hva9F.js → SeriesPage-BPDSiLWH.js} +5 -5
  22. package/dist/{SeriesPage-vw7Hva9F.js.map → SeriesPage-BPDSiLWH.js.map} +1 -1
  23. package/dist/{Spinner-BfFZMaDP.js → Spinner-BUWcjtbI.js} +2 -2
  24. package/dist/{Spinner-BfFZMaDP.js.map → Spinner-BUWcjtbI.js.map} +1 -1
  25. package/dist/{Success-Cjj6CC4w.js → Success-6kCesfnC.js} +15 -9
  26. package/dist/Success-6kCesfnC.js.map +1 -0
  27. package/dist/{Text-CT79Zi5n.js → Text-B5MZ6L1O.js} +2 -2
  28. package/dist/{Text-CT79Zi5n.js.map → Text-B5MZ6L1O.js.map} +1 -1
  29. package/dist/{VenueCalendar-Cz7_VBC6.js → VenueCalendar-BRTDpyWV.js} +1504 -1498
  30. package/dist/VenueCalendar-BRTDpyWV.js.map +1 -0
  31. package/dist/{ViewTicketsEmbed-BvCfoKY3.js → ViewTicketsEmbed-BgIXGtz6.js} +5 -5
  32. package/dist/ViewTicketsEmbed-BgIXGtz6.js.map +1 -0
  33. package/dist/api/api/transformers/event.d.ts +6 -4
  34. package/dist/api/api.cjs +1 -1
  35. package/dist/api/api.cjs.map +1 -1
  36. package/dist/api/api.mjs +204 -207
  37. package/dist/api/api.mjs.map +1 -1
  38. package/dist/{data-toggle-store.svelte-BHwbM34q.js → data-toggle-store.svelte-D3w7V3t9.js} +2 -2
  39. package/dist/data-toggle-store.svelte-D3w7V3t9.js.map +1 -0
  40. package/dist/{labels-_x9WkVuZ.js → labels-wyDolzF_.js} +8 -8
  41. package/dist/labels-wyDolzF_.js.map +1 -0
  42. package/dist/{modalManager.svelte-Csm1WlvP.js → modalManager.svelte-DBBSS3Zi.js} +2 -2
  43. package/dist/{modalManager.svelte-Csm1WlvP.js.map → modalManager.svelte-DBBSS3Zi.js.map} +1 -1
  44. package/dist/seo/seo.cjs.map +1 -1
  45. package/dist/seo/seo.mjs.map +1 -1
  46. package/dist/{transform-WRPgSKLN.js → transform-Bcl3riJb.js} +2 -2
  47. package/dist/{transform-WRPgSKLN.js.map → transform-Bcl3riJb.js.map} +1 -1
  48. package/dist/venue-calendar.css +1 -1
  49. package/dist/venue-calendar.es.js +4 -4
  50. package/dist/venue-calendar.iife.js +33 -33
  51. package/dist/venue-calendar.iife.js.map +1 -1
  52. package/dist/venue-calendar.umd.js +33 -33
  53. package/dist/venue-calendar.umd.js.map +1 -1
  54. package/package.json +5 -2
  55. package/dist/CartView-Cq0DU1Cy.js.map +0 -1
  56. package/dist/Checkout-BA43iGDc.js.map +0 -1
  57. package/dist/Checkout-BV5f49vY.js.map +0 -1
  58. package/dist/CollectionView-CKIxku9-.js.map +0 -1
  59. package/dist/Success-Cjj6CC4w.js.map +0 -1
  60. package/dist/VenueCalendar-Cz7_VBC6.js.map +0 -1
  61. package/dist/ViewTicketsEmbed-BvCfoKY3.js.map +0 -1
  62. package/dist/data-toggle-store.svelte-BHwbM34q.js.map +0 -1
  63. package/dist/labels-_x9WkVuZ.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"labels-_x9WkVuZ.js","sources":["../node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/CalendarIcon.svelte","../node_modules/@getmicdrop/svelte-components/dist/datetime/local.js","../src/lib/api/cta.ts","../src/lib/public-calendar-flow/defaults.ts","../src/lib/public-calendar-flow/OrderSummary.svelte","../src/lib/public-calendar-flow/i18n/labels.js"],"sourcesContent":["<script lang=\"ts\">\n /**\n * Calendar — Phosphor icon (canonical Micdrop icon family).\n * Outline by default; pass `weight=\"fill\"` for solid, or let a stateful parent\n * (NavItem / Tabs / BottomNav / status badge) drive it via icon-weight context.\n */\n import { useIconWeight, type IconWeight } from './iconWeight.js';\n\n interface Props {\n /** Pixel size (width + height). */\n size?: string;\n /** Icon color; defaults to `currentColor` (inherits text color). */\n color?: string;\n /** Extra classes. */\n class?: string;\n /** `regular` (outline) or `fill` (solid). Overrides ambient state weight. */\n weight?: IconWeight;\n }\n\n let { size = '24', color = 'currentColor', class: className = '', weight }: Props = $props();\n\n const ctx = useIconWeight();\n let resolved: IconWeight = $derived(weight ?? ctx?.weight ?? 'regular');\n</script>\n\n<svg\n class={className}\n aria-hidden=\"true\"\n width={size}\n height={size}\n viewBox=\"0 0 256 256\"\n fill=\"currentColor\"\n style:color={color}\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n {#if resolved === 'fill'}<path d=\"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM112,184a8,8,0,0,1-16,0V132.94l-4.42,2.22a8,8,0,0,1-7.16-14.32l16-8A8,8,0,0,1,112,120Zm56-8a8,8,0,0,1,0,16H136a8,8,0,0,1-6.4-12.8l28.78-38.37A8,8,0,1,0,145.07,132a8,8,0,1,1-13.85-8A24,24,0,0,1,176,136a23.76,23.76,0,0,1-4.84,14.45L152,176ZM48,80V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80Z\"/>{:else}<rect x=\"40\" y=\"40\" width=\"176\" height=\"176\" rx=\"8\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><line x1=\"176\" y1=\"24\" x2=\"176\" y2=\"56\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><line x1=\"80\" y1=\"24\" x2=\"80\" y2=\"56\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><line x1=\"40\" y1=\"88\" x2=\"216\" y2=\"88\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><polyline points=\"88 128 104 120 104 184\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><path d=\"M138.14,128a16,16,0,1,1,26.64,17.63L136,184h32\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/>{/if}\n</svg>\n","/**\n * Browser-local date helpers — calendar chrome & `<input type=\"datetime-local\">`.\n *\n * These are the ONE exception to the module's golden rule (\"timezone is always\n * required\"). They operate on a JavaScript `Date` in the **browser's own local\n * timezone**, with NO IANA timezone argument and NO UTC conversion. They exist\n * for the cases where browser-local IS the correct semantic:\n *\n * - Scheduling / calendar-grid chrome that reflects the operator's own clock.\n * - Producing the `YYYY-MM-DD` / `YYYY-MM-DDTHH:mm` strings that native\n * `<input type=\"date\">` / `<input type=\"datetime-local\">` require (those\n * inputs are defined to read/write **local** wall-clock time, never UTC).\n *\n * The distinction from the venue-timezone formatters in `./format.ts` is\n * deliberate and load-bearing — keep it unmistakable:\n *\n * | Concern | Use | From |\n * |---------------------------------|-----------------------------------|---------------|\n * | Venue/event display time | `formatDayOfWeek(utcIso, tz)` | `./format.ts` |\n * | Operator's own clock / inputs | `formatLocalDayOfWeek(date)` | this file |\n *\n * Name-collision resolution (Atlas AUDIT #17): the venue-tz `formatDayOfWeek`\n * (UTC ISO + IANA tz) keeps the canonical name in `format.ts`; the browser-local\n * variant (a `Date`, no tz) is named `formatLocalDayOfWeek` here so the two can\n * never be confused at a call site.\n *\n * @module datetime/local\n */\nimport { getUserLocale } from './timezone.js';\n/**\n * Pads a number to two digits (e.g. `5` -> `\"05\"`).\n */\nfunction pad2(n) {\n return n < 10 ? `0${n}` : String(n);\n}\n/**\n * Current local date+time as an HTML `<input type=\"datetime-local\">` value.\n *\n * Format: `YYYY-MM-DDTHH:mm` (no seconds, no timezone) — exactly the value\n * format the native control reads and writes. Uses the browser's local clock;\n * does NOT convert to/from UTC.\n *\n * @returns Local-time string in `YYYY-MM-DDTHH:mm` form.\n *\n * @example\n * getCurrentDateTimeLocalFormat() // \"2026-06-09T14:30\" (in the viewer's tz)\n */\nexport function getCurrentDateTimeLocalFormat() {\n const now = new Date();\n return (`${now.getFullYear()}-${pad2(now.getMonth() + 1)}-${pad2(now.getDate())}` +\n `T${pad2(now.getHours())}:${pad2(now.getMinutes())}`);\n}\n/**\n * Formats a `Date` as a `YYYY-MM-DD` string in the **browser's local timezone**.\n *\n * This is the value format for `<input type=\"date\">`. It reads the local\n * wall-clock parts (`getFullYear`/`getMonth`/`getDate`) — it does NOT use\n * `toISOString()` (which would shift to UTC and can roll the date across\n * midnight). Use this when \"the day on the operator's calendar\" is what matters.\n *\n * @param date - The date to format (interpreted in browser-local time).\n * @returns Local date string in `YYYY-MM-DD` form.\n *\n * @example\n * formatLocalDate(new Date(2026, 5, 9)) // \"2026-06-09\"\n */\nexport function formatLocalDate(date) {\n return (`${date.getFullYear()}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())}`);\n}\n/**\n * Formats a `Date`'s weekday in the **browser's local timezone**.\n *\n * The browser-local sibling of the venue-timezone {@link import('./format.js').formatDayOfWeek}\n * (which takes a UTC ISO string + IANA timezone). This one takes a plain `Date`\n * and renders its weekday in local time — for calendar chrome where the\n * operator's own clock is the reference.\n *\n * @param date - The date whose weekday to format (browser-local).\n * @param full - If `true` (default), returns the full name (\"Monday\");\n * if `false`, the short name (\"Mon\").\n * @param locale - BCP-47 locale tag. Defaults to the viewer's resolved locale\n * via {@link import('./timezone.js').getUserLocale}. An app with its own i18n\n * locale should pass it explicitly.\n * @returns Localized weekday name in browser-local time.\n *\n * @example\n * formatLocalDayOfWeek(new Date(2026, 5, 8)) // \"Monday\"\n * formatLocalDayOfWeek(new Date(2026, 5, 8), false) // \"Mon\"\n */\nexport function formatLocalDayOfWeek(date, full = true, locale = getUserLocale()) {\n return new Intl.DateTimeFormat(locale, {\n weekday: full ? 'long' : 'short',\n }).format(date);\n}\n/**\n * Formats a `Date` in the **browser's local timezone** with caller-supplied\n * Intl options — the generic display-label formatter for viewer-local picker\n * chrome (single/range date pickers, month-year headers, day cells).\n *\n * Browser-local sibling of the venue-timezone formatters in `./format.ts`: it\n * renders the Date's local wall-clock parts (NO IANA timezone argument, NO UTC\n * conversion) via `Intl.DateTimeFormat`. This is the honest canonical home for\n * the labels the deprecated `formatDate` in `utils/formatters` used to produce\n * for viewer-local pickers — but it injects NO default field set: the caller's\n * `options` are authoritative (the pickers already pass fully-specified option\n * objects). The `'en-US'` locale default preserves the historical picker output.\n *\n * @param date - The date to format (interpreted in browser-local time).\n * @param options - Intl formatting options (authoritative; no defaults merged).\n * @param locale - BCP-47 locale tag. Defaults to `'en-US'` to match the\n * historical picker label output.\n * @returns The localized label in browser-local time.\n *\n * @example\n * formatLocal(new Date(2026, 5, 9), { weekday: 'long', month: 'long', day: 'numeric', year: 'numeric' })\n * // \"Tuesday, June 9, 2026\"\n */\nexport function formatLocal(date, options, locale = 'en-US') {\n return new Intl.DateTimeFormat(locale, options).format(date);\n}\n","/**\n * CTA state computation.\n *\n * Pure function (no I/O) — derives the buy-button state from an event and\n * its ticket list. Lives in `api/` because it is the canonical, single\n * source of truth that replaces the duplicate implementations previously\n * scattered across utils/api.js, core/api-client.js, and a few components.\n */\n\n// Import from the specific subpath (not the bare entry) so the api/\n// bundle doesn't pull in the entire SC component graph (Accordion etc.)\n// and break `npm run build:api`. `formatLocal` is the sanctioned browser-local\n// (no-timezone) Intl label home — these \"On sale …\" countdown labels render in\n// the viewer's own clock, so no venue timezone applies. The datetime subpath is\n// leaf/component-free; only `formatLocal` (→ Intl) is pulled, no date-fns.\nimport { formatLocal } from '@getmicdrop/svelte-components/datetime';\n// Hidden-ticket predicate from the `/transforms` leaf subpath (no component\n// graph, so `npm run build:api` stays clean). SC's copy was pinned FROM this\n// body (dedup #392) and additionally honours the backend-resolved\n// `effectiveSales*` window for relative-offset tickets (#388). Imported (not\n// just re-exported) so it stays in local scope for `computeCtaState` below.\nimport { isHiddenTicketPurchasable } from '@getmicdrop/svelte-components/transforms';\n\nexport interface CtaStateOptions {\n cancelled?: boolean;\n isRegistration?: boolean;\n waitlistEnabled?: boolean;\n}\n\nexport interface CtaState {\n text: string;\n disabled: boolean;\n reason:\n | 'cancelled'\n | 'event_past'\n | 'no_tickets'\n | 'available'\n | 'coming_soon'\n | 'sold_out_waitlist'\n | 'sold_out'\n | 'sales_ended'\n | 'hidden_only';\n}\n\ninterface CtaEvent {\n startDateTime?: string | null;\n endDateTime?: string | null;\n hasPurchasableHiddenTickets?: boolean;\n}\n\ninterface CtaTicket {\n salesChannel?: number;\n salesBegin?: string | null;\n salesStart?: string | null;\n saleBegin?: string | null;\n onSaleStart?: string | null;\n salesEnd?: string | null;\n saleEnd?: string | null;\n onSaleEnd?: string | null;\n remainingCapacity?: number | null;\n quantityRemaining?: number | null;\n quantity?: number | null;\n soldOut?: boolean;\n isHidden?: boolean;\n visibility?: number;\n}\n\n// A hidden ticket (visibility>=2 or isHidden) that's still on sale drives the\n// \"Sales ended\" / \"Sold out\" / \"No tickets\" → \"Get tickets\" override. The user\n// just needs the promo code to see it. Re-exported from the SC canonical so\n// existing consumers (cta.test.ts, computeCtaState) keep their import path while\n// the single-source body lives in SC (dedup #392).\nexport { isHiddenTicketPurchasable };\n\nexport function computeCtaState(\n event: CtaEvent,\n tickets: CtaTicket[] | undefined,\n options: CtaStateOptions = {}\n): CtaState {\n const {\n cancelled = false,\n isRegistration = false,\n waitlistEnabled = false,\n } = options;\n const now = new Date();\n\n if (cancelled)\n return { text: 'Cancelled', disabled: true, reason: 'cancelled' };\n\n const eventEnd = event.endDateTime || event.startDateTime;\n if (eventEnd && new Date(eventEnd) < now) {\n return { text: 'Sales ended', disabled: true, reason: 'event_past' };\n }\n\n const hiddenAvailable =\n event?.hasPurchasableHiddenTickets === true ||\n (Array.isArray(tickets) && tickets.some(isHiddenTicketPurchasable));\n\n const publicTickets = (tickets || []).filter(\n t =>\n t.salesChannel !== 2 &&\n !t.isHidden &&\n !(typeof t.visibility === 'number' && t.visibility >= 2)\n );\n if (publicTickets.length === 0) {\n if (hiddenAvailable) {\n return {\n text: isRegistration ? 'Reserve a spot' : 'Get tickets',\n disabled: false,\n reason: 'hidden_only',\n };\n }\n return {\n text: 'No tickets available',\n disabled: true,\n reason: 'no_tickets',\n };\n }\n\n let hasPurchasable = false;\n let allSoldOut = true;\n let allComingSoon = true;\n let earliestSalesStart: Date | null = null;\n\n for (const ticket of publicTickets) {\n const salesBegin =\n ticket.salesBegin ||\n ticket.salesStart ||\n ticket.saleBegin ||\n ticket.onSaleStart;\n const salesEnd = ticket.salesEnd || ticket.saleEnd || ticket.onSaleEnd;\n const remaining =\n ticket.remainingCapacity ?? ticket.quantityRemaining ?? ticket.quantity;\n const isSoldOut =\n ticket.soldOut ||\n (remaining !== null && remaining !== undefined && remaining <= 0);\n\n const isScheduled = salesBegin ? new Date(salesBegin) > now : false;\n const hasSalesEnded = salesEnd ? new Date(salesEnd) < now : false;\n const isPurchasable = !isSoldOut && !isScheduled && !hasSalesEnded;\n\n if (isPurchasable) hasPurchasable = true;\n if (!isSoldOut) allSoldOut = false;\n if (!isScheduled) allComingSoon = false;\n\n if (isScheduled && salesBegin && !isSoldOut && !hasSalesEnded) {\n const startDate = new Date(salesBegin);\n if (!earliestSalesStart || startDate < earliestSalesStart) {\n earliestSalesStart = startDate;\n }\n }\n }\n\n if (hasPurchasable) {\n return {\n text: isRegistration ? 'Reserve a spot' : 'Get tickets',\n disabled: false,\n reason: 'available',\n };\n }\n\n if (allComingSoon && earliestSalesStart) {\n if (hiddenAvailable) {\n return {\n text: isRegistration ? 'Reserve a spot' : 'Get tickets',\n disabled: false,\n reason: 'hidden_only',\n };\n }\n const diffMs = earliestSalesStart.getTime() - now.getTime();\n const diffHours = diffMs / (1000 * 60 * 60);\n const diffDays = diffMs / (1000 * 60 * 60 * 24);\n // Viewer-local time label (\"8:00 PM\") — the shape shared by the <24h branch\n // and the >7d composite. Matches the deprecated `formatTime(d,{hour12:true})`\n // defaults-merge exactly.\n const timeLabel = (d: Date) =>\n formatLocal(\n d,\n { hour: 'numeric', minute: '2-digit', hour12: true },\n 'en-US'\n );\n let dateText: string;\n if (diffHours < 24) {\n dateText = timeLabel(earliestSalesStart);\n } else if (diffDays <= 7) {\n dateText = formatLocal(\n earliestSalesStart,\n { weekday: 'short', hour: 'numeric', minute: '2-digit', hour12: true },\n 'en-US'\n );\n } else {\n const d = formatLocal(\n earliestSalesStart,\n { month: 'short', day: 'numeric' },\n 'en-US'\n );\n dateText = `${d} ${timeLabel(earliestSalesStart)}`;\n }\n return {\n text: `On sale ${dateText}`,\n disabled: true,\n reason: 'coming_soon',\n };\n }\n\n if (allSoldOut) {\n if (hiddenAvailable) {\n return {\n text: isRegistration ? 'Reserve a spot' : 'Get tickets',\n disabled: false,\n reason: 'hidden_only',\n };\n }\n if (waitlistEnabled) {\n return {\n text: 'Join Waitlist',\n disabled: false,\n reason: 'sold_out_waitlist',\n };\n }\n return { text: 'Sold out', disabled: true, reason: 'sold_out' };\n }\n\n if (hiddenAvailable) {\n return {\n text: isRegistration ? 'Reserve a spot' : 'Get tickets',\n disabled: false,\n reason: 'hidden_only',\n };\n }\n\n return { text: 'Sales ended', disabled: true, reason: 'sales_ended' };\n}\n","// @currency-escape: feeCents / 100 in calculateServiceFee is arithmetic,\n// not display. Produces a dollar-magnitude number used in the fee formula\n// `price * (feePercentage / 100) + feeCents / 100`. Per Atlas\n// utility-currency convergence record; the no-handrolled-currency\n// ESLint rule's divideByHundred detector treats variable-name `Cents`\n// as drift but here it's real math.\n\n// Premium Ticket Experience — Constants & Defaults\n// Used by all design variants. DO NOT MODIFY per-variant.\n\n// This file is the canonical formatter module for public-calendar-flow: it\n// wraps + re-exports the timezone-aware production date/time formatters, plus\n// the shared sales-countdown formatter (formatSmartSalesDate) hoisted into\n// svelte-components (SC #471). No raw Intl date formatting lives here anymore.\n\nimport type {\n EventData,\n TicketTypeData,\n ScarcityLevel,\n CtaConfig,\n PromoCodeState,\n} from './types';\nimport { computeCtaState } from '$lib/api';\nimport type { Cents } from '@getmicdrop/svelte-components';\nimport { roundCurrency } from '@getmicdrop/svelte-components';\nimport { formatSmartSalesDate } from '@getmicdrop/svelte-components/utils/formatters';\nimport {\n formatFullDate,\n formatFullDateCompact,\n formatEventTime,\n formatTimeRange,\n formatDoorsTime,\n formatSalesDate,\n formatBrowseDate,\n formatEventDate,\n formatCleanTimeRange,\n getDateParts,\n} from '$lib/utils/datetime.js';\n\n// --- Re-export production date/time formatters (timezone-aware) ---\nexport {\n formatFullDate,\n formatFullDateCompact,\n formatEventTime,\n formatTimeRange,\n formatDoorsTime,\n formatSalesDate,\n formatBrowseDate,\n formatEventDate,\n formatCleanTimeRange,\n getDateParts,\n};\n\n// Shared sales-countdown formatter, adopted from svelte-components (SC #471).\n// Kept as a re-export so public-calendar-flow consumers import it from this\n// module unchanged. English defaults match VC's prior copy; the clock time\n// renders in UTC (matching the production TicketBlock origin) rather than the\n// old copy's viewer-local time.\nexport { formatSmartSalesDate };\n\n// --- Scarcity Badge Rules ---\nexport const SCARCITY_THRESHOLDS = {\n SOLD_OUT: 0,\n URGENT: 0.1, // ≤10% remaining → urgent (\"Only X left\")\n LOW: 0.2, // ≤20% remaining (80%+ sold) → \"Selling fast\"\n MAX_EXACT_COUNT: 20, // Don't show exact count above 20\n} as const;\n\nexport function getScarcityLevel(\n remaining: number,\n total: number\n): ScarcityLevel {\n if (total === 0) return 'none';\n if (remaining <= 0) return 'sold_out';\n const pct = remaining / total;\n if (pct <= SCARCITY_THRESHOLDS.URGENT) return 'urgent';\n if (pct <= SCARCITY_THRESHOLDS.LOW) return 'low';\n return 'none';\n}\n\nexport function getScarcityText(\n level: ScarcityLevel,\n remaining: number,\n context: 'browse' | 'event' | 'ticket',\n options?: { isFree?: boolean }\n): string | null {\n if (level === 'none') return null;\n if (level === 'sold_out') return 'Sold out';\n // No scarcity badges on free events/tickets — nothing to lose = no urgency\n if (options?.isFree) return null;\n if (\n level === 'urgent' &&\n context !== 'browse' &&\n remaining <= SCARCITY_THRESHOLDS.MAX_EXACT_COUNT\n ) {\n return `Only ${remaining} left`;\n }\n if (level === 'low' || level === 'urgent') return 'Selling fast';\n return null;\n}\n\n// --- CTA Rules ---\n// Delegates to production computeCtaState() but adapts our EventData shape.\n// Components keep calling getCtaConfig(event) — internal logic is production-aligned.\nexport function getCtaConfig(event: EventData): CtaConfig {\n // Map our EventData tickets to the shape computeCtaState expects.\n // `isHidden` flows through so computeCtaState can apply the hidden-only\n // \"Sales ended\" → \"Get tickets\" override (MIC-1039).\n const apiTickets = event.tickets.map(t => ({\n salesBegin: t.salesStartDate,\n salesEnd: t.salesEndDate,\n remainingCapacity: t.quantityAvailable,\n totalCapacity: t.quantityTotal,\n soldOut: t.status === 'sold_out',\n salesChannel: 1, // All our tickets are online (not \"at the door only\")\n isHidden: t.isHidden,\n }));\n\n // Handle statuses that computeCtaState doesn't compute from tickets\n if (event.status === 'cancelled') {\n return {\n text: 'Cancelled',\n disabled: true,\n reason: 'This event has been cancelled',\n };\n }\n if (event.status === 'past') {\n return {\n text: 'Event ended',\n disabled: true,\n reason: 'This event has ended',\n };\n }\n\n const result = computeCtaState(\n { startDateTime: event.startDateTime, endDateTime: event.endDateTime },\n apiTickets,\n {\n cancelled: false,\n isRegistration: event.isRegistrationEvent,\n waitlistEnabled: false,\n }\n );\n\n return {\n text: result.text,\n disabled: result.disabled,\n reason: result.disabled ? toFriendlyReason(result.reason) : undefined,\n };\n}\n\n/**\n * computeCtaState() returns machine-enum reasons ('event_past', 'sold_out',\n * 'coming_soon', etc) intended for branching, not display. The BookingWidget\n * and MobileCta render `reason` directly as supplementary copy below the\n * button text — which leaks raw enum strings to users.\n *\n * Map each enum to a friendly sentence, OR return undefined when the button\n * `text` already says everything (\"Sales ended\" / \"Sold out\" — no need for\n * a second line repeating it).\n */\nfunction toFriendlyReason(reason: string | undefined): string | undefined {\n if (!reason) return undefined;\n switch (reason) {\n case 'cancelled':\n return 'This event has been cancelled.';\n case 'event_past':\n return 'This event has already happened.';\n case 'no_tickets':\n return 'There are no tickets configured for this event.';\n case 'coming_soon':\n return undefined; // text already shows \"On sale <date>\"\n case 'sold_out':\n return undefined; // text already shows \"Sold out\"\n case 'sold_out_waitlist':\n return 'All tickets are claimed. Join the waitlist to be notified.';\n case 'sales_ended':\n return undefined; // text already shows \"Sales ended\"\n default:\n return undefined; // unknown enum — never leak it\n }\n}\n\n// --- Price Display Rules (from DECISIONS.md #1) ---\nexport function getPriceDisplay(event: EventData): string | null {\n const visibleTickets = event.tickets.filter(\n t => t.status === 'on_sale' && !t.isHidden\n );\n if (visibleTickets.length === 0) return null;\n\n const hasDonation = visibleTickets.some(\n t => t.isDonation || t.ticketType === 2\n );\n const paidTickets = visibleTickets.filter(\n t => !t.isDonation && t.ticketType !== 2\n );\n const hasFree = paidTickets.some(t => t.price === 0);\n const pricedTickets = paidTickets.filter(t => t.price > 0);\n\n // Only donation tickets → \"Donation\"\n if (pricedTickets.length === 0 && !hasFree && hasDonation) return 'Donation';\n\n // Only free tickets (no paid, no donation) → null (BookingWidget shows \"Free\" via isFreeEvent)\n if (pricedTickets.length === 0 && hasFree) return null;\n\n const minPrice = Math.min(...pricedTickets.map(t => t.price));\n\n // Free + paid → \"Free\" (free dominates the display). Non-donation free tickets\n // outrank the paid options in the headline, matching the shared \"Free\" label\n // every other price surface uses. Returning null here left the widget blank.\n if (hasFree) return 'Free';\n\n // Donation + paid → \"From $X\" (donation is an alternative option)\n if (hasDonation) return `From $${minPrice}`;\n\n // Single paid ticket type → \"$X\"\n if (pricedTickets.length === 1) return `$${minPrice}`;\n\n // Multiple paid ticket types → \"From $X\"\n return `From $${minPrice}`;\n}\n\n// --- Fee Calculation ---\nexport function calculateFee(\n price: number,\n feePercentage: number,\n feeCents: Cents\n): number {\n return roundCurrency(price * (feePercentage / 100) + feeCents / 100);\n}\n\nexport function calculateTax(amount: number, taxPercentage: number): number {\n return roundCurrency(amount * (taxPercentage / 100));\n}\n\n// --- Date Formatting ---\n// PREFERRED: Use the timezone-aware production formatters re-exported above:\n// formatBrowseDate(iso, tz) → \"Fri, Feb 20\"\n// formatFullDateCompact(iso, tz) → \"Friday, February 20\"\n// formatEventTime(iso, tz) → \"8:00 PM\"\n// formatTimeRange(start, end, tz) → \"8:00 PM - 10:00 PM\"\n// formatDoorsTime(doors, tz) → \"7:00 PM\"\n\n// --- Animation Durations ---\nexport const DURATION = {\n instant: 100,\n micro: 150,\n fast: 200,\n normal: 300,\n slow: 400,\n elaborate: 600,\n} as const;\n\n// --- Promo Code State Factory ---\nexport function createDefaultPromoState(): PromoCodeState {\n return {\n code: '',\n isApplied: false,\n isValidating: false,\n error: '',\n hint: '',\n discountAmount: 0,\n discountType: '',\n discountTicketIds: [],\n revealHiddenTickets: false,\n revealTicketIds: [],\n };\n}\n\n// --- Ticket helpers ---\nexport function getAvailableTickets(\n tickets: TicketTypeData[]\n): TicketTypeData[] {\n return tickets.filter(t => !t.isHidden && t.status === 'on_sale');\n}\n","<!-- @style-escape: widget-intentional. -->\n<script lang=\"ts\">\n import type { USD } from '@getmicdrop/svelte-components';\n import { Text, formatCurrency } from '@getmicdrop/svelte-components';\n import type { OrderTotals } from '$lib/public-calendar-flow/types';\n import { formatPriceOrFree } from '$lib/core';\n import { DURATION } from '$lib/public-calendar-flow/defaults';\n\n interface Props {\n orderTotals: OrderTotals;\n labels?: Record<string, string>;\n /**\n * Which section to render.\n * - `full` (default): ticket lines + totals stacked together.\n * - `lines` : ticket-line items only. Use when the parent scrolls\n * this section in a flex column.\n * - `totals` : subtotal/fees/taxes/promo/total only. Use in a fixed\n * footer alongside the action button.\n *\n * Splitting via `lines` / `totals` lets the sticky sidebars scroll\n * just the variable-length ticket list while keeping the summary\n * block and CTA always visible.\n */\n mode?: 'full' | 'lines' | 'totals';\n }\n\n let { orderTotals, labels = {}, mode = 'full' }: Props = $props();\n</script>\n\n<div class=\"space-y-2\" style=\"transition-duration: {DURATION.normal}ms;\">\n {#if mode !== 'totals'}\n <!-- Line items -->\n {#each orderTotals.lines as line (line.ticketId)}\n <div class=\"flex justify-between\">\n <Text size=\"sm\">{line.quantity}x {line.ticketName}</Text>\n <Text size=\"sm\"\n >{line.isDonation\n ? formatCurrency(line.subtotal as USD)\n : formatPriceOrFree(line.subtotal, labels)}</Text\n >\n </div>\n {/each}\n {/if}\n\n {#if mode !== 'lines'}\n <!-- Subtotal. In `totals` mode the parent supplies the separator above\n\t\t this block (BookingWidget wraps the totals block in border-t); a\n\t\t second internal border would render as a double line. Only show\n\t\t the internal border-t in `full` mode where lines + totals stack\n\t\t in one container with no external separator. -->\n {#if mode === 'full' && orderTotals.lines.length > 1}\n <div class=\"flex justify-between pt-1 border-t border-default\">\n <Text size=\"sm\" color=\"muted\">{labels.subtotal || 'Subtotal'}</Text>\n <Text size=\"sm\" color=\"muted\"\n >{formatCurrency(orderTotals.subtotal as USD)}</Text\n >\n </div>\n {:else if orderTotals.lines.length > 1}\n <div class=\"flex justify-between\">\n <Text size=\"sm\" color=\"muted\">{labels.subtotal || 'Subtotal'}</Text>\n <Text size=\"sm\" color=\"muted\"\n >{formatCurrency(orderTotals.subtotal as USD)}</Text\n >\n </div>\n {/if}\n\n <!-- Fees -->\n {#if orderTotals.fees > 0}\n <div class=\"flex justify-between\">\n <Text size=\"sm\" color=\"muted\"\n >{labels.serviceFees || 'Service fees'}</Text\n >\n <Text size=\"sm\" color=\"muted\"\n >{formatCurrency(orderTotals.fees as USD)}</Text\n >\n </div>\n {/if}\n\n <!-- Taxes -->\n {#if orderTotals.taxes > 0}\n <div class=\"flex justify-between\">\n <Text size=\"sm\" color=\"muted\">{labels.taxes || 'Taxes'}</Text>\n <Text size=\"sm\" color=\"muted\"\n >{formatCurrency(orderTotals.taxes as USD)}</Text\n >\n </div>\n {/if}\n\n <!-- Promo discount -->\n {#if orderTotals.promoDiscount > 0}\n <div class=\"flex justify-between\">\n <Text size=\"sm\" color=\"success\"\n >{labels.promoDiscount || 'Promo discount'}</Text\n >\n <Text size=\"sm\" color=\"success\"\n >-{formatCurrency(orderTotals.promoDiscount as USD)}</Text\n >\n </div>\n {/if}\n\n <!-- Gift card — deduction from the amount due; `total` already reflects it -->\n {#if orderTotals.giftCardAmount > 0}\n <div class=\"flex justify-between\">\n <Text size=\"sm\" color=\"success\">{labels.giftCard || 'Gift card'}</Text>\n <Text size=\"sm\" color=\"success\"\n >-{formatCurrency(orderTotals.giftCardAmount as USD)}</Text\n >\n </div>\n {/if}\n\n <!-- Total -->\n <div class=\"flex justify-between pt-2 border-t border-default\">\n <Text size=\"base\" weight=\"semibold\">{labels.total || 'Total'}</Text>\n <Text size=\"base\" weight=\"semibold\"\n >{formatCurrency(orderTotals.total as USD)}</Text\n >\n </div>\n {/if}\n</div>\n","/**\n * Default English labels for public-calendar-flow components.\n * Consumers override via the `labels` prop on any *Main component.\n *\n * Label keys use flat camelCase. For composed strings (e.g. aria-labels),\n * components build them from atomic label parts.\n */\nexport const defaultLabels = {\n // ── Ticket quantity controls ──────────────────────────────────────\n decrease: 'Decrease',\n increase: 'Increase',\n quantity: 'quantity',\n\n // ── Ticket states ─────────────────────────────────────────────────\n soldOut: 'Sold out',\n free: 'Free',\n unavailable: 'Unavailable',\n eventSoldOut: 'This event is sold out',\n\n // ── Price display ─────────────────────────────────────────────────\n includesFees: 'Includes',\n fees: 'fees',\n fee: 'fee',\n\n // ── Checkout CTAs ─────────────────────────────────────────────────\n checkout: 'Checkout',\n getTickets: 'Get tickets',\n selectTickets: 'Select tickets',\n selectTicketsBelow: 'Select tickets below',\n selectTicketsToContinue: 'Select tickets to continue',\n reserveASpot: 'Reserve a spot',\n\n // ── Password modal / gate ─────────────────────────────────────────\n enterPassword: 'Enter Password',\n enterEventPassword: 'Enter event password',\n passwordRequired: 'Password Required',\n passwordRequiredShort: 'Password required',\n eventRequiresPassword: 'This event requires a password to purchase tickets.',\n eventRequiresPasswordAccess: 'This event requires a password to access tickets.',\n enterEventPasswordToView: 'Enter the event password to view tickets.',\n enterEventPasswordToViewAvailable: 'Enter the event password to view available tickets.',\n eventPassword: 'Event password',\n password: 'Password',\n pleaseEnterPassword: 'Please enter the event password',\n pleaseEnterAPassword: 'Please enter a password',\n eventRequiresPasswordShort: 'This event requires a password',\n unlockTickets: 'Unlock tickets',\n cancel: 'Cancel',\n continue: 'Continue',\n submit: 'Submit',\n\n // ── Order summary ─────────────────────────────────────────────────\n subtotal: 'Subtotal',\n serviceFees: 'Service fees',\n taxes: 'Taxes',\n tax: 'Tax',\n promoDiscount: 'Promo discount',\n giftCard: 'Gift card',\n total: 'Total',\n orderSummary: 'Order summary',\n yourOrder: 'Your Order',\n\n // ── Ticket counts (used in CTA buttons) ───────────────────────────\n ticket: 'ticket',\n tickets: 'tickets',\n\n // ── Checkout form (public-calendar-flow) ───────────────────────────────\n yourDetails: 'Your details',\n attendeeDetails: 'Attendee details',\n attendee: 'Attendee',\n sameAsPurchaser: 'Same as purchaser',\n payment: 'Payment',\n noPaymentRequired: 'No payment required',\n freeEventMessage: 'This is a free event. Complete the form above to reserve your spot.',\n firstName: 'First name',\n lastName: 'Last name',\n emailAddress: 'Email address',\n email: 'Email',\n emailPlaceholder: 'you@example.com',\n attendeeEmailPlaceholder: 'attendee@example.com',\n cardNumber: 'Card number',\n cardPlaceholder: '4242 4242 4242 4242',\n expiryDate: 'Expiry date',\n expiryPlaceholder: 'MM / YY',\n cvc: 'CVC',\n cvcPlaceholder: '123',\n keepMeUpdated: 'Keep me updated about this event and similar events',\n agreeToTerms: 'I agree to the terms and conditions',\n goBack: 'Go back',\n loadingPaymentForm: 'Loading secure payment form...',\n\n // ── Checkout form validation ──────────────────────────────────────\n firstNameRequired: 'First name is required',\n lastNameRequired: 'Last name is required',\n emailRequired: 'Email is required',\n emailInvalid: 'Enter a valid email address',\n emailInvalidShort: 'Enter a valid email',\n cardNumberRequired: 'Card number is required',\n expiryRequired: 'Expiry date is required',\n cvcRequired: 'CVC is required',\n mustAgreeTerms: 'You must agree to the terms',\n\n // ── Place order CTAs ──────────────────────────────────────────────\n placeOrder: 'Place order',\n completeOrder: 'Complete order',\n placingOrder: 'Placing order...',\n\n // ── Promo code ────────────────────────────────────────────────────\n havePromoCode: 'Have a promo code?',\n promoCode: 'Promo code',\n enterCode: 'Enter code',\n apply: 'Apply',\n remove: 'Remove',\n removePromoCode: 'Remove promo code',\n applyPromoCode: 'Apply promo code',\n checkingPromoCode: 'Checking promo code',\n checking: 'Checking...',\n promoApplied: 'Promo applied',\n\n // ── Navigation tabs (app-segments) ────────────────────────────────\n about: 'About',\n ticketsTab: 'Tickets',\n eventSections: 'Event sections',\n\n // ── Event details ─────────────────────────────────────────────────\n eventDetails: 'Event details',\n performers: 'Performers',\n faq: 'FAQ',\n frequentlyAskedQuestions: 'Frequently asked questions',\n doors: 'Doors',\n doorsOpenAt: 'Doors open at',\n\n // ── Series occurrences ────────────────────────────────────────────\n upcomingDates: 'Upcoming Dates',\n\n // ── Close / dismiss ───────────────────────────────────────────────\n closeTicketSelection: 'Close ticket selection',\n closeTicketSelector: 'Close ticket selector',\n\n // ── Accessibility ─────────────────────────────────────────────────\n ticketSelection: 'ticket selection',\n ticketsSelected: 'tickets selected',\n view: 'View',\n\n // ── Success page (public-calendar-flow) ────────────────────────────────\n youreIn: \"You're in!\",\n youreRegistered: \"You're registered!\",\n confirmed: 'confirmed',\n viewTickets: 'View tickets',\n order: 'Order',\n confirmationSentTo: 'Confirmation sent to',\n addToCalendar: 'Add to Calendar',\n googleCalendar: 'Google Calendar',\n appleCalendar: 'Apple Calendar (.ics)',\n share: 'Share',\n map: 'Map',\n backToEvent: 'Back to event',\n needHelp: 'Need help?',\n linkCopied: 'Link copied to clipboard!',\n copyLink: 'Copy this link:',\n addToAppleWallet: 'Add to Apple Wallet',\n saveToGoogleWallet: 'Save to Google Wallet',\n\n // ── Session timer / expiration modals ─────────────────────────────\n sessionExpiringSoon: 'Session expiring soon',\n sessionExpiringSoonMessage: 'Your checkout session will expire in {time}. Your selected tickets will be released back to inventory.',\n extensionsRemaining: '{count} extension{plural} remaining',\n continueCheckout: 'Continue checkout',\n okIllHurry: \"OK, I'll hurry\",\n maxExtensionsReached: 'Maximum extensions reached',\n wantToKeepTickets: 'Want to keep your tickets?',\n sessionExpiredMessage: 'Your checkout session has expired and your selected tickets have been released.',\n sessionExpired: 'Session expired',\n reservationTimedOut: 'Your reservation has timed out. Please select your tickets again to continue.',\n keepMyTickets: 'Keep my tickets',\n selectTicketsAgain: 'Select tickets again',\n extendingSession: 'Extending...',\n\n // ── MobileCta ─────────────────────────────────────────────────────\n selectTicketsLabel: 'Select Tickets',\n};\n\n/**\n * Merge user-provided label overrides with the defaults.\n * Shallow merge — any key provided by the consumer wins.\n *\n * @param {Record<string, string>} [userLabels] - Partial label overrides\n * @returns {Record<string, string>} Merged labels object\n */\nexport function mergeLabels(userLabels = {}) {\n return { ...defaultLabels, ...userLabels };\n}\n"],"names":["size","$","$$props","color","className","ctx","useIconWeight","resolved","svg","root_2","path","root","$$render","consequent","alternate","styles","formatLocal","date","options","locale","computeCtaState","event","tickets","cancelled","isRegistration","waitlistEnabled","now","eventEnd","hiddenAvailable","isHiddenTicketPurchasable","publicTickets","t","hasPurchasable","allSoldOut","allComingSoon","earliestSalesStart","ticket","salesBegin","salesEnd","remaining","isSoldOut","isScheduled","hasSalesEnded","startDate","diffMs","diffHours","diffDays","timeLabel","d","dateText","SCARCITY_THRESHOLDS","getScarcityLevel","total","pct","getScarcityText","level","context","getCtaConfig","apiTickets","result","toFriendlyReason","reason","getPriceDisplay","visibleTickets","hasDonation","paidTickets","hasFree","pricedTickets","minPrice","calculateTax","amount","taxPercentage","roundCurrency","DURATION","createDefaultPromoState","labels","mode","div","root_3","node_1","line","div_1","Text","node_2","text","node_3","formatCurrency","formatPriceOrFree","div_2","root_1","node_6","node_7","$0","text_3","div_3","node_8","node_9","text_5","consequent_1","consequent_2","div_4","node_11","node_12","text_7","consequent_3","div_5","node_14","node_15","text_9","consequent_4","div_6","node_17","node_18","text_11","consequent_5","div_7","node_20","node_21","text_13","consequent_6","div_8","node_19","node_22","node_23","text_15","consequent_7","defaultLabels","mergeL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