@wodira/browser 0.3.0 → 1.0.0

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 (31) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/README.md +97 -48
  3. package/dist/index.cjs +5 -0
  4. package/dist/index.d.ts +60 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +5 -0
  7. package/dist/ui/boxes/cdn.js +9 -9
  8. package/dist/ui/index-tfej862z.js +3264 -0
  9. package/dist/ui/index-xdhg885t.js +997 -0
  10. package/dist/ui/index.js +26 -2277
  11. package/dist/ui/shirt-3d-renderer-jyks1h8f.js +10 -0
  12. package/dist/ui/shirt-sponsors/cdn.js +5115 -73
  13. package/dist/ui/shirt-sponsors/index.js +8 -1667
  14. package/dist/ui/shirt-sponsors/render/auction-model.d.ts +55 -0
  15. package/dist/ui/shirt-sponsors/render/auction-model.d.ts.map +1 -0
  16. package/dist/ui/shirt-sponsors/render/index.d.ts +7 -0
  17. package/dist/ui/shirt-sponsors/render/index.d.ts.map +1 -0
  18. package/dist/ui/shirt-sponsors/render/index.js +34 -0
  19. package/dist/ui/shirt-sponsors/render/shirt-3d-renderer.d.ts +109 -0
  20. package/dist/ui/shirt-sponsors/render/shirt-3d-renderer.d.ts.map +1 -0
  21. package/dist/ui/shirt-sponsors/render/shirt-artwork-projection.d.ts +13 -0
  22. package/dist/ui/shirt-sponsors/render/shirt-artwork-projection.d.ts.map +1 -0
  23. package/dist/ui/shirt-sponsors/render/shirt-artwork.d.ts +17 -0
  24. package/dist/ui/shirt-sponsors/render/shirt-artwork.d.ts.map +1 -0
  25. package/dist/ui/shirt-sponsors/render/shirt-cloth-motion.d.ts +31 -0
  26. package/dist/ui/shirt-sponsors/render/shirt-cloth-motion.d.ts.map +1 -0
  27. package/dist/ui/shirt-sponsors/render/shirt-silhouette.d.ts +9 -0
  28. package/dist/ui/shirt-sponsors/render/shirt-silhouette.d.ts.map +1 -0
  29. package/dist/ui/shirt-sponsors/shirt-auction.d.ts +101 -15
  30. package/dist/ui/shirt-sponsors/shirt-auction.d.ts.map +1 -1
  31. package/package.json +12 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.0 — 2026-11-11
4
+
5
+ ### Changed
6
+
7
+ - `<wodira-shirt-auction>` now renders natively instead of in an iframe: the 3D shirt, slots, current leaders and outbid amount live in the page and use the shared `--wodira-*` tokens and `::part()` names, including the colours painted on the 3D shirt. Sign-in, the sponsor logo and Stripe payment open in a WODira window. **Breaking:** the element now requires `publishable-key`; `base-url` sets the API.
8
+
9
+ ### Added
10
+
11
+ - `WodiraBrowserClient.getShirtSponsorCampaign()` and the `WodiraShirtCampaign` types.
12
+ - `@wodira/browser/ui/shirt-sponsors/render`, the three.js shirt renderer shared with the WODira web app. three.js loads only when a shirt is on the page.
13
+ - `wodira:shirt:slot-selected` and `wodira:shirt:bid-started` events.
14
+
15
+ ### Fixed
16
+
17
+ - The public shirt renderer includes its Three.js declaration dependency, so strict TypeScript consumers can import the render entry without installing extra types.
18
+
3
19
  ## 0.3.0 — 2026-11-11
4
20
 
5
21
  ### Added
@@ -11,4 +27,4 @@
11
27
  ### Fixed
12
28
 
13
29
  - Published TypeScript declarations resolve correctly in strict NodeNext projects as well as frontend bundlers.
14
- - Registration components preserve API validation messages and recover when a promotional code is removed.
30
+ - Registration components preserve API validation messages and recover when a promotional code is removed.
package/README.md CHANGED
@@ -240,11 +240,11 @@ El instalador CDN sigue fijado al artefacto publicado y su SRI. Antes de distrib
240
240
 
241
241
  ## Camiseta 3D y pujas en una web de evento
242
242
 
243
- `@wodira/browser/ui/shirt-sponsors` proporciona el componente Lit
244
- `<wodira-shirt-auction>`. La camiseta y los espacios se muestran en una vista
245
- WODira aislada; el inicio de sesión y Stripe Checkout se abren en ventanas.
246
- El visitante conserva abierta la web del evento. El componente espera la
247
- confirmación del servidor antes de mostrar una puja como pagada.
243
+ `@wodira/browser/ui/shirt-sponsors` proporciona `<wodira-shirt-auction>`, un componente Lit
244
+ nativo (sin iframe) para que un patrocinador vea la camiseta del evento en 3D, elija un espacio
245
+ tocándolo en la camiseta o en la lista, vea quién lidera y por cuánto, y puje o supere la puja
246
+ actual. Funciona con ratón, teclado y pantallas táctiles: en el móvil un deslizamiento vertical
247
+ sigue desplazando la página y uno horizontal gira la camiseta.
248
248
 
249
249
  ```ts
250
250
  import { defineWodiraShirtElements } from '@wodira/browser/ui/shirt-sponsors';
@@ -252,66 +252,115 @@ defineWodiraShirtElements();
252
252
  ```
253
253
 
254
254
  ```html
255
- <wodira-shirt-auction campaign-id="ID_DE_LA_CAMPANA" locale="es"></wodira-shirt-auction>
255
+ <wodira-shirt-auction
256
+ campaign-id="ID_DE_LA_CAMPANA"
257
+ publishable-key="wpk_live_..."
258
+ locale="es"
259
+ ></wodira-shirt-auction>
256
260
  ```
257
261
 
258
- También queda registrado con `defineWodiraElements()` desde `@wodira/browser/ui`.
262
+ También queda registrado con `defineWodiraElements()` desde `@wodira/browser/ui`. three.js es una
263
+ dependencia del paquete, pero se carga con un `import()` dinámico solo cuando hay una camiseta en
264
+ la página: el resto de componentes no lo descargan.
265
+
259
266
  Para HTML sin bundler, ejecuta `pnpm --filter @wodira/browser build`, copia
260
- `packages/browser/dist/ui/shirt-sponsors/cdn.js` a los recursos de tu web y carga:
267
+ `packages/browser/dist/ui/shirt-sponsors/cdn.js` (incluye Lit y three.js) a tu web y carga:
261
268
 
262
269
  ```html
263
270
  <script type="module" src="/assets/wodira-shirt-auction.js"></script>
264
- <wodira-shirt-auction campaign-id="ID_DE_LA_CAMPANA" locale="es"></wodira-shirt-auction>
265
271
  ```
266
272
 
267
- | Atributo | Uso |
268
- | ------------- | ------------------------------------------------------------------------ |
269
- | `campaign-id` | ID de una campaña pública de patrocinio. |
270
- | `locale` | `es`, `en`, `pt` o `auto` (idioma de la página). |
271
- | `app-url` | URL de WODira; por defecto `https://wodira.app`. HTTP solo en localhost. |
273
+ | Atributo | Uso |
274
+ | ----------------- | ------------------------------------------------------------------------ |
275
+ | `campaign-id` | ID de una campaña publicada de un evento de tu organización. |
276
+ | `publishable-key` | Clave `wpk_live_...` con el origen de tu web en los orígenes permitidos. |
277
+ | `locale` | `es`, `en`, `pt` o `auto` (idioma de la página). |
278
+ | `base-url` | API de WODira; por defecto `https://api.wodira.app`. |
279
+ | `app-url` | Web de WODira; por defecto `https://wodira.app`. HTTP solo en localhost. |
280
+
281
+ ### Migrar desde 0.3.x a 1.0.0
282
+
283
+ El componente de camisetas requiere ahora `publishable-key`: crea una clave pública de la
284
+ organización con el origen de tu web permitido y añádela al elemento, conservando
285
+ `campaign-id`, `locale` y `app-url`. Una clave secreta de organizador nunca debe usarse aquí.
286
+ Si utilizas una API distinta de `https://api.wodira.app`, configura además `base-url`.
287
+
288
+ La camiseta se dibuja dentro del propio componente. Sustituye las personalizaciones de
289
+ `::part(frame)` y los antiguos tokens `--wodira-primary`/`--wodira-background` por las partes
290
+ nativas y los tokens `--wodira-color-*` de la sección «Personalización». Permite la API en
291
+ `connect-src` y conserva las ventanas de WODira para el inicio de sesión y el pago.
272
292
 
273
- La altura se adapta al contenido. Se exponen las partes CSS `container`, `frame`
274
- y `footer`; la camiseta y el formulario mantienen el diseño de WODira.
275
- Las variables `--wodira-primary`, `--wodira-text`, `--wodira-border`,
276
- `--wodira-background` y `--wodira-radius` personalizan el contenedor.
293
+ Los imports del cliente, los componentes de inscripción y los widgets de Boxes conservan sus
294
+ entradas públicas. Si necesitas mantener temporalmente la integración anterior de camisetas,
295
+ fija la dependencia a `0.3.0` hasta adaptar su configuración.
296
+
297
+ ### Compra de la puja
298
+
299
+ El componente valida el importe (puja mínima e incrementos) y, al pulsar «Pujar» o «Superar la
300
+ puja», abre una ventana de WODira con el espacio y el importe ya elegidos. Allí el patrocinador
301
+ inicia sesión, sube el logotipo en SVG, acepta las condiciones y paga con Stripe. La sesión de
302
+ WODira y los datos de pago nunca pasan por la web del evento. Cuando Stripe confirma el pago, la
303
+ ventana avisa al componente, que recarga la campaña y muestra la nueva puja en la camiseta.
277
304
 
278
305
  ```js
279
- document
280
- .querySelector('wodira-shirt-auction')
281
- .addEventListener('wodira:shirt:paid', ({ detail }) => {
282
- console.log('Puja confirmada en la campaña', detail.campaignId);
283
- });
306
+ const auction = document.querySelector('wodira-shirt-auction');
307
+ auction.addEventListener('wodira:shirt:slot-selected', ({ detail }) => detail.slotId);
308
+ auction.addEventListener('wodira:shirt:bid-started', ({ detail }) => detail.amountCents);
309
+ auction.addEventListener('wodira:shirt:paid', ({ detail }) => detail.campaignId);
284
310
  ```
285
311
 
286
- Este evento es una señal de interfaz, no una prueba de pago para un servidor.
287
- No contiene email, tokens, datos de tarjeta ni identificadores privados de puja.
288
- La sesión se mantiene en memoria dentro del marco de WODira y se obtiene con una
289
- ventana del mismo origen; no depende de cookies de terceros ni se entrega a la
290
- web del evento. Si se recarga el componente hay que iniciar sesión de nuevo.
312
+ `wodira:shirt:paid` es una señal de interfaz, no una prueba de pago para un servidor. Ningún
313
+ evento contiene emails, tokens, datos de tarjeta ni identificadores privados de puja. Si el
314
+ navegador bloquea la ventana, el componente muestra un enlace para abrir la puja.
315
+
316
+ ### Personalización
317
+
318
+ Usa las mismas variables y la misma convención de `::part()` que el resto de componentes.
319
+ `--wodira-color-accent` (huecos, precio líder, elementos activos),
320
+ `--wodira-color-accent-contrast`, `--wodira-color-primary` (botón y contorno del hueco elegido),
321
+ `--wodira-color-primary-contrast`, `--wodira-color-surface`, `--wodira-color-muted` (fondo de la
322
+ camiseta y del panel de puja), `--wodira-color-border` (también los huecos reservados),
323
+ `--wodira-color-text`, `--wodira-color-text-muted`, `--wodira-font-family`, `--wodira-radius`,
324
+ `--wodira-radius-sm`, `--wodira-space`, `--wodira-shadow` y `--wodira-card-padding`. Además,
325
+ `--wodira-shirt-stage-background` cambia solo el fondo de la camiseta.
326
+
327
+ Los colores también se pintan en la camiseta 3D. Si cambias las variables desde JavaScript sin
328
+ tocar `class`, `style` ni `data-theme` de la página o del elemento, llama a
329
+ `auction.refreshTheme()`.
330
+
331
+ Partes: `container`, `header`, `title`, `meta`, `layout`, `stage`, `shirt`, `stage-hint`,
332
+ `stage-controls`, `zoom-button`, `side-switch`, `side-button`, `side-button-active`,
333
+ `section-title`, `slot-list`, `slot`, `slot-selected`, `slot-reserved`, `slot-name`,
334
+ `slot-detail`, `slot-price`, `price`, `bid-panel`, `bid-title`, `leader`, `leader-logo`,
335
+ `bid-form`, `label`, `input`, `field-error`, `button`, `submit`, `hint`, `status`, `success`,
336
+ `error` y `loader`.
337
+
338
+ ```css
339
+ wodira-shirt-auction {
340
+ --wodira-color-accent: #2fd27a;
341
+ --wodira-color-primary: #10131a;
342
+ --wodira-radius: 4px;
343
+ }
344
+ wodira-shirt-auction::part(title) {
345
+ text-transform: uppercase;
346
+ }
347
+ ```
291
348
 
292
349
  ### Desarrollo y despliegue
293
350
 
294
- - Vista: `/es/embed/shirt-sponsors/:id` (también `/en/` y `/pt/`).
295
- - En desarrollo sin localización: `/embed/shirt-sponsors/:id`.
296
- - Backend: aplicar `20260924190000_shirt_bid_checkout` antes de desplegar.
297
- - Configurar `FRONTEND_URL` con la URL pública de la app de WODira.
298
- - El webhook de Stripe debe entregar `checkout.session.completed`,
299
- `checkout.session.async_payment_succeeded`, `checkout.session.async_payment_failed`
300
- y `checkout.session.expired`, además de los eventos de pago ya utilizados.
351
+ - API: `GET /external/v1/browser/shirt-sponsors/{campaignId}` con la clave publicable. Solo
352
+ devuelve campañas públicas de eventos de la organización de la clave.
301
353
  - La campaña debe estar publicada y el organizador conectado con Stripe.
302
- - La web que integra el componente debe permitir `frame-src https://wodira.app`
303
- en su CSP y las ventanas de inicio de sesión/pago.
304
- - El bundle se distribuye con `@wodira/browser`; utiliza una versión publicada y conserva el SRI exacto de esa versión.
305
-
306
- Preview local: `pnpm --filter @wodira/browser preview:ui`, después abre
307
- `http://127.0.0.1:4179/shirt-auction?app-url=http://localhost:4200&campaign-id=ID`.
308
- Sin parámetros, la preview usa una campaña ficticia sin pagos.
309
-
310
- Prueba del flujo completo con la app local y Stripe/autenticación simulados:
311
- `pnpm exec node scripts/sponsor-studio/check-widget-flow.mjs` desde la raíz.
312
- Los argumentos opcionales son la URL de la app, del API y de la preview,
313
- respectivamente. Guarda capturas desktop/móvil en `output/tmp/shirt-widget`.
314
- Para producción, sirve también la web anfitriona por HTTPS.
354
+ - La web de WODira sirve el modelo `/images/sponsor-studio/*.glb` con CORS, y la API los diseños
355
+ subidos en `/statics/images/`, para que la camiseta se dibuje en otra web.
356
+ - La web que integra el componente debe permitir en su CSP `connect-src https://api.wodira.app
357
+ https://wodira.app`, `img-src data: https:` y abrir ventanas emergentes de `https://wodira.app`.
358
+ - El renderer 3D se comparte con la web de WODira mediante `@wodira/browser/ui/shirt-sponsors/render`.
359
+
360
+ Preview local: `pnpm --filter @wodira/browser preview:ui` y abre
361
+ `http://127.0.0.1:4179/shirt-auction` (añade `?theme=dark` para ver un tema del organizador).
362
+ Usa una campaña ficticia y una ventana de puja simulada, sin pagos. Las pruebas de navegador
363
+ están en `browser-tests/shirt-auction.browser.ts`.
315
364
 
316
365
  ### Disponibilidad y formulario de inscripción
317
366
 
package/dist/index.cjs CHANGED
@@ -87,6 +87,11 @@ class WodiraBrowserClient {
87
87
  getEvent(eventId, signal) {
88
88
  return this.request(`/events/${encodeURIComponent(eventId)}`, { signal });
89
89
  }
90
+ getShirtSponsorCampaign(campaignId, signal) {
91
+ return this.request(`/shirt-sponsors/${encodeURIComponent(campaignId)}`, {
92
+ signal
93
+ });
94
+ }
90
95
  getPricingCards(eventId, signal) {
91
96
  return this.request(`/events/${encodeURIComponent(eventId)}/pricing-cards`, { signal });
92
97
  }
package/dist/index.d.ts CHANGED
@@ -146,6 +146,64 @@ export interface WodiraRegistrationCheckoutSession {
146
146
  export interface WodiraRegistrationReceiptRequestInput {
147
147
  email: string;
148
148
  }
149
+ export type WodiraShirtSlotSide = 'front' | 'back' | 'left-sleeve' | 'right-sleeve';
150
+ /** A sponsorship space on the event shirt. Amounts are in euro cents. */
151
+ export interface WodiraShirtSlot {
152
+ id: string;
153
+ name: string;
154
+ side: WodiraShirtSlotSide;
155
+ /** Position and size on the shirt face, in percent. */
156
+ x: number;
157
+ y: number;
158
+ width: number;
159
+ height: number;
160
+ printWidthCm: number;
161
+ printHeightCm: number;
162
+ startingPriceCents: number;
163
+ incrementCents: number;
164
+ /** Lowest amount that wins the slot now: the starting price, or the leader plus one increment. */
165
+ minimumBidCents: number;
166
+ bidCount: number;
167
+ leadingBrandName: string | null;
168
+ leadingAmountCents: number | null;
169
+ leadingArtworkUrl: string | null;
170
+ /** Kept by the organizer; not open to bids. */
171
+ isReserved?: boolean;
172
+ reservedArtworkUrl?: string | null;
173
+ }
174
+ export interface WodiraShirtDesignLayer {
175
+ url: string;
176
+ name: string;
177
+ scale: number;
178
+ x: number;
179
+ y: number;
180
+ photo?: boolean;
181
+ fabricColor?: string;
182
+ }
183
+ export interface WodiraShirtCampaign {
184
+ id: string;
185
+ eventId: string;
186
+ eventSlug: string;
187
+ eventName: string;
188
+ eventType: string;
189
+ eventStartDate: string;
190
+ eventBanner: string | null;
191
+ city: string;
192
+ province: string;
193
+ shirtCount: number;
194
+ closesAt: string;
195
+ availableSlots: number;
196
+ startingPriceCents: number;
197
+ status: 'DRAFT' | 'PUBLISHED' | 'CLOSED' | 'CANCELLED';
198
+ shirtColor: string;
199
+ shirtDesign?: {
200
+ version: 1;
201
+ front?: WodiraShirtDesignLayer;
202
+ back?: WodiraShirtDesignLayer;
203
+ previewUrl: string;
204
+ } | null;
205
+ slots: WodiraShirtSlot[];
206
+ }
149
207
  export declare class WodiraBrowserClient {
150
208
  private readonly publishableKey;
151
209
  private readonly baseUrl;
@@ -155,6 +213,8 @@ export declare class WodiraBrowserClient {
155
213
  constructor(options: WodiraBrowserClientOptions);
156
214
  searchEvents(input?: Omit<WodiraSearchEventsInput, 'status'>, signal?: AbortSignal): Promise<WodiraPaginatedResponse<WodiraEvent>>;
157
215
  getEvent(eventId: string, signal?: AbortSignal): Promise<WodiraEvent>;
216
+ /** Public shirt sponsorship campaign of an event that belongs to the key's organization. */
217
+ getShirtSponsorCampaign(campaignId: string, signal?: AbortSignal): Promise<WodiraShirtCampaign>;
158
218
  getPricingCards(eventId: string, signal?: AbortSignal): Promise<WodiraPricingCardsResponse>;
159
219
  getRegistrationSummary(input: WodiraRegistrationSummaryInput, signal?: AbortSignal): Promise<WodiraRegistrationSummary>;
160
220
  createRegistrationCheckoutSession(input: WodiraRegistrationCheckoutSessionInput, signal?: AbortSignal): Promise<WodiraRegistrationCheckoutSession>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACtB,WAAW,EACX,YAAY,EACZ,uBAAuB,EACvB,0BAA0B,EAC1B,+BAA+B,EAC/B,mCAAmC,EACnC,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,YAAY,CAAC;AACpB,mBAAmB,YAAY,CAAC;AAEhC,MAAM,WAAW,4BAA4B;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,4BAA4B,GAAG,MAAM,GAAG,IAAI,CAAC;IAE/D,YAAY,MAAM,EAAE;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,4BAA4B,GAAG,MAAM,GA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OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAClD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA6B;IAE7D,YAAY,OAAO,EAAE,0BAA0B,EAY9C;IAED,YAAY,CAAC,KAAK,GAAE,IAAI,CAAC,uBAAuB,EAAE,QAAQ,CAAM,EAAE,MAAM,CAAC,EAAE,WAAW,iDAMrF;IAED,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,wBAE7C;IAED,4FAA4F;IAC5F,uBAAuB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,gCAI/D;IAED,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,uCAKpD;IAED,sBAAsB,CAAC,KAAK,EAAE,8BAA8B,EAAE,MAAM,CAAC,EAAE,WAAW,sCAMjF;IAED,iCAAiC,CAC/B,KAAK,EAAE,sCAAsC,EAC7C,MAAM,CAAC,EAAE,WAAW,8CAoBrB;IAED,0BAA0B,CACxB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,qCAAqC,EAC5C,MAAM,CAAC,EAAE,WAAW,4CAUrB;IAED,wBAAwB,CACtB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,qCAAqC,EAC5C,MAAM,CAAC,EAAE,WAAW,gDAUrB;YAEa,OAAO;CA0BtB;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,0BAA0B,uBAE5E"}
package/dist/index.js CHANGED
@@ -42,6 +42,11 @@ class WodiraBrowserClient {
42
42
  getEvent(eventId, signal) {
43
43
  return this.request(`/events/${encodeURIComponent(eventId)}`, { signal });
44
44
  }
45
+ getShirtSponsorCampaign(campaignId, signal) {
46
+ return this.request(`/shirt-sponsors/${encodeURIComponent(campaignId)}`, {
47
+ signal
48
+ });
49
+ }
45
50
  getPricingCards(eventId, signal) {
46
51
  return this.request(`/events/${encodeURIComponent(eventId)}/pricing-cards`, { signal });
47
52
  }
@@ -1,8 +1,8 @@
1
- var H=globalThis,te=H.ShadowRoot&&(H.ShadyCSS===void 0||H.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,re=Symbol(),Se=new WeakMap;class ie{constructor(e,t,r){if(this._$cssResult$=!0,r!==re)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this._strings=t}get styleSheet(){let e=this._styleSheet,t=this._strings;if(te&&e===void 0){let r=t!==void 0&&t.length===1;if(r)e=Se.get(t);if(e===void 0){if((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),r)Se.set(t,e)}}return e}toString(){return this.cssText}}var et=(e)=>{if(e._$cssResult$===!0)return e.cssText;else if(typeof e==="number")return e;else throw Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)},tt=(e)=>new ie(typeof e==="string"?e:String(e),void 0,re),j=(e,...t)=>{let r=e.length===1?e[0]:t.reduce((i,a,o)=>i+et(a)+e[o+1],e[0]);return new ie(r,e,re)},Ee=(e,t)=>{if(te)e.adoptedStyleSheets=t.map((r)=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let i=document.createElement("style"),a=H.litNonce;if(a!==void 0)i.setAttribute("nonce",a);i.textContent=r.cssText,e.appendChild(i)}},rt=(e)=>{let t="";for(let r of e.cssRules)t+=r.cssText;return tt(t)},ae=te?(e)=>e:(e)=>e instanceof CSSStyleSheet?rt(e):e;var{is:it,defineProperty:at,getOwnPropertyDescriptor:$e,getOwnPropertyNames:ot,getOwnPropertySymbols:st,getPrototypeOf:Te}=Object,nt=!1,f=globalThis;if(nt)f.customElements??=customElements;var b=!0,x,Ce=f.trustedTypes,lt=Ce?Ce.emptyScript:"",We=b?f.reactiveElementPolyfillSupportDevMode:f.reactiveElementPolyfillSupport;if(b)f.litIssuedWarnings??=new Set,x=(e,t)=>{if(t+=` See https://lit.dev/msg/${e} for more information.`,!f.litIssuedWarnings.has(t)&&!f.litIssuedWarnings.has(e))console.warn(t),f.litIssuedWarnings.add(t)},queueMicrotask(()=>{if(x("dev-mode","Lit is in dev mode. Not recommended for production!"),f.ShadyDOM?.inUse&&We===void 0)x("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")});var dt=b?(e)=>{if(!f.emitLitDebugLogEvents)return;f.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))}:void 0,D=(e,t)=>e,oe={toAttribute(e,t){switch(t){case Boolean:e=e?lt:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e);break}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(i){r=null}break}return r}},Re=(e,t)=>!it(e,t),Pe={attribute:!0,type:String,converter:oe,reflect:!1,useDefault:!1,hasChanged:Re};Symbol.metadata??=Symbol("metadata");f.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(e){this.__prepare(),(this._initializers??=[]).push(e)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap&&[...this.__attributeToPropertyMap.keys()]}static createProperty(e,t=Pe){if(t.state)t.attribute=!1;if(this.__prepare(),this.prototype.hasOwnProperty(e))t=Object.create(t),t.wrapped=!0;if(this.elementProperties.set(e,t),!t.noAccessor){let r=b?Symbol.for(`${String(e)} (@property() cache)`):Symbol(),i=this.getPropertyDescriptor(e,r,t);if(i!==void 0)at(this.prototype,e,i)}}static getPropertyDescriptor(e,t,r){let{get:i,set:a}=$e(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};if(b&&i==null){if("value"in($e(this.prototype,e)??{}))throw Error(`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it's actually declared as a value on the prototype. Usually this is due to using @property or @state on a method.`);x("reactive-property-without-getter",`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it does not have a getter. This will be an error in a future version of Lit.`)}return{get:i,set(o){let s=i?.call(this);a?.call(this,o),this.requestUpdate(e,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Pe}static __prepare(){if(this.hasOwnProperty(D("elementProperties",this)))return;let e=Te(this);if(e.finalize(),e._initializers!==void 0)this._initializers=[...e._initializers];this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(D("finalized",this)))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(D("properties",this))){let t=this.properties,r=[...ot(t),...st(t)];for(let i of r)this.createProperty(i,t[i])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,i]of t)this.elementProperties.set(r,i)}this.__attributeToPropertyMap=new Map;for(let[t,r]of this.elementProperties){let i=this.__attributeNameForProperty(t,r);if(i!==void 0)this.__attributeToPropertyMap.set(i,t)}if(this.elementStyles=this.finalizeStyles(this.styles),b){if(this.hasOwnProperty("createProperty"))x("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators");if(this.hasOwnProperty("getPropertyDescriptor"))x("no-override-get-property-descriptor","Overriding ReactiveElement.getPropertyDescriptor() is deprecated. The override will not be called with standard decorators")}}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let i of r)t.unshift(ae(i))}else if(e!==void 0)t.push(ae(e));return t}static __attributeNameForProperty(e,t){let r=t.attribute;return r===!1?void 0:typeof r==="string"?r:typeof e==="string"?e.toLowerCase():void 0}constructor(){super();this.__instanceProperties=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.__reflectingProperty=null,this.__initialize()}__initialize(){this.__updatePromise=new Promise((e)=>this.enableUpdating=e),this._$changedProperties=new Map,this.__saveInstanceProperties(),this.requestUpdate(),this.constructor._initializers?.forEach((e)=>e(this))}addController(e){if((this.__controllers??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected)e.hostConnected?.()}removeController(e){this.__controllers?.delete(e)}__saveInstanceProperties(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())if(this.hasOwnProperty(r))e.set(r,this[r]),delete this[r];if(e.size>0)this.__instanceProperties=e}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ee(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this.__controllers?.forEach((e)=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this.__controllers?.forEach((e)=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$attributeToProperty(e,r)}__propertyToAttribute(e,t){let i=this.constructor.elementProperties.get(e),a=this.constructor.__attributeNameForProperty(e,i);if(a!==void 0&&i.reflect===!0){let s=(i.converter?.toAttribute!==void 0?i.converter:oe).toAttribute(t,i.type);if(b&&this.constructor.enabledWarnings.includes("migration")&&s===void 0)x("undefined-attribute-value",`The attribute value for the ${e} property is undefined on element ${this.localName}. The attribute will be removed, but in the previous version of \`ReactiveElement\`, the attribute would not have changed.`);if(this.__reflectingProperty=e,s==null)this.removeAttribute(a);else this.setAttribute(a,s);this.__reflectingProperty=null}}_$attributeToProperty(e,t){let r=this.constructor,i=r.__attributeToPropertyMap.get(e);if(i!==void 0&&this.__reflectingProperty!==i){let a=r.getPropertyOptions(i),o=typeof a.converter==="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:oe;this.__reflectingProperty=i;let s=o.fromAttribute(t,a.type);this[i]=s??this.__defaultValues?.get(i)??s,this.__reflectingProperty=null}}requestUpdate(e,t,r,i=!1,a){if(e!==void 0){if(b&&e instanceof Event)x("","The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()");let o=this.constructor;if(i===!1)a=this[e];if(r??=o.getPropertyOptions(e),(r.hasChanged??Re)(a,t)||r.useDefault&&r.reflect&&a===this.__defaultValues?.get(e)&&!this.hasAttribute(o.__attributeNameForProperty(e,r)))this._$changeProperty(e,t,r);else return}if(this.isUpdatePending===!1)this.__updatePromise=this.__enqueueUpdate()}_$changeProperty(e,t,{useDefault:r,reflect:i,wrapped:a},o){if(r&&!(this.__defaultValues??=new Map).has(e)){if(this.__defaultValues.set(e,o??t??this[e]),a!==!0||o!==void 0)return}if(!this._$changedProperties.has(e)){if(!this.hasUpdated&&!r)t=void 0;this._$changedProperties.set(e,t)}if(i===!0&&this.__reflectingProperty!==e)(this.__reflectingProperties??=new Set).add(e)}async __enqueueUpdate(){this.isUpdatePending=!0;try{await this.__updatePromise}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();if(e!=null)await e;return!this.isUpdatePending}scheduleUpdate(){let e=this.performUpdate();if(b&&this.constructor.enabledWarnings.includes("async-perform-update")&&typeof e?.then==="function")x("async-perform-update",`Element ${this.localName} returned a Promise from performUpdate(). This behavior is deprecated and will be removed in a future version of ReactiveElement.`);return e}performUpdate(){if(!this.isUpdatePending)return;if(dt?.({kind:"update"}),!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),b){let a=[...this.constructor.elementProperties.keys()].filter((o)=>this.hasOwnProperty(o)&&(o in Te(this)));if(a.length)throw Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${a.join(", ")}. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information.`)}if(this.__instanceProperties){for(let[i,a]of this.__instanceProperties)this[i]=a;this.__instanceProperties=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[i,a]of r){let{wrapped:o}=a,s=this[i];if(o===!0&&!this._$changedProperties.has(i)&&s!==void 0)this._$changeProperty(i,void 0,a,s)}}let e=!1,t=this._$changedProperties;try{if(e=this.shouldUpdate(t),e)this.willUpdate(t),this.__controllers?.forEach((r)=>r.hostUpdate?.()),this.update(t);else this.__markUpdated()}catch(r){throw e=!1,this.__markUpdated(),r}if(e)this._$didUpdate(t)}willUpdate(e){}_$didUpdate(e){if(this.__controllers?.forEach((t)=>t.hostUpdated?.()),!this.hasUpdated)this.hasUpdated=!0,this.firstUpdated(e);if(this.updated(e),b&&this.isUpdatePending&&this.constructor.enabledWarnings.includes("change-in-update"))x("change-in-update",`Element ${this.localName} scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update.`)}__markUpdated(){this._$changedProperties=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.__updatePromise}shouldUpdate(e){return!0}update(e){this.__reflectingProperties&&=this.__reflectingProperties.forEach((t)=>this.__propertyToAttribute(t,this[t])),this.__markUpdated()}updated(e){}firstUpdated(e){}}y.elementStyles=[];y.shadowRootOptions={mode:"open"};y[D("elementProperties",y)]=new Map;y[D("finalized",y)]=new Map;We?.({ReactiveElement:y});if(b){y.enabledWarnings=["change-in-update","async-perform-update"];let e=function(t){if(!t.hasOwnProperty(D("enabledWarnings",t)))t.enabledWarnings=t.enabledWarnings.slice()};y.enableWarning=function(t){if(e(this),!this.enabledWarnings.includes(t))this.enabledWarnings.push(t)},y.disableWarning=function(t){e(this);let r=this.enabledWarnings.indexOf(t);if(r>=0)this.enabledWarnings.splice(r,1)}}(f.reactiveElementVersions??=[]).push("2.1.2");if(b&&f.reactiveElementVersions.length>1)queueMicrotask(()=>{x("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});var w=globalThis,p=(e)=>{if(!w.emitLitDebugLogEvents)return;w.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))},ct=0,B;w.litIssuedWarnings??=new Set,B=(e,t)=>{if(t+=e?` See https://lit.dev/msg/${e} for more information.`:"",!w.litIssuedWarnings.has(t)&&!w.litIssuedWarnings.has(e))console.warn(t),w.litIssuedWarnings.add(t)},queueMicrotask(()=>{B("dev-mode","Lit is in dev mode. Not recommended for production!")});var _=w.ShadyDOM?.inUse&&w.ShadyDOM?.noPatch===!0?w.ShadyDOM.wrap:(e)=>e,Y=w.trustedTypes,Ae=Y?Y.createPolicy("lit-html",{createHTML:(e)=>e}):void 0,pt=(e)=>e,Q=(e,t,r)=>pt,ut=(e)=>{if(I!==Q)throw Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");I=e},ht=()=>{I=Q},ce=(e,t,r)=>I(e,t,r),Me="$lit$",S=`lit$${Math.random().toFixed(9).slice(2)}$`,Be="?"+S,mt=`<${Be}>`,A=document,L=()=>A.createComment(""),V=(e)=>e===null||typeof e!="object"&&typeof e!="function",pe=Array.isArray,gt=(e)=>pe(e)||typeof e?.[Symbol.iterator]==="function",se=`[
1
+ var H=globalThis,te=H.ShadowRoot&&(H.ShadyCSS===void 0||H.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,re=Symbol(),Se=new WeakMap;class ie{constructor(e,t,r){if(this._$cssResult$=!0,r!==re)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this._strings=t}get styleSheet(){let e=this._styleSheet,t=this._strings;if(te&&e===void 0){let r=t!==void 0&&t.length===1;if(r)e=Se.get(t);if(e===void 0){if((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),r)Se.set(t,e)}}return e}toString(){return this.cssText}}var et=(e)=>{if(e._$cssResult$===!0)return e.cssText;else if(typeof e==="number")return e;else throw Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)},tt=(e)=>new ie(typeof e==="string"?e:String(e),void 0,re),j=(e,...t)=>{let r=e.length===1?e[0]:t.reduce((i,a,o)=>i+et(a)+e[o+1],e[0]);return new ie(r,e,re)},Ee=(e,t)=>{if(te)e.adoptedStyleSheets=t.map((r)=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let i=document.createElement("style"),a=H.litNonce;if(a!==void 0)i.setAttribute("nonce",a);i.textContent=r.cssText,e.appendChild(i)}},rt=(e)=>{let t="";for(let r of e.cssRules)t+=r.cssText;return tt(t)},ae=te?(e)=>e:(e)=>e instanceof CSSStyleSheet?rt(e):e;var{is:it,defineProperty:at,getOwnPropertyDescriptor:$e,getOwnPropertyNames:ot,getOwnPropertySymbols:st,getPrototypeOf:Te}=Object,nt=!1,f=globalThis;if(nt)f.customElements??=customElements;var b=!0,x,Ce=f.trustedTypes,lt=Ce?Ce.emptyScript:"",Pe=b?f.reactiveElementPolyfillSupportDevMode:f.reactiveElementPolyfillSupport;if(b)f.litIssuedWarnings??=new Set,x=(e,t)=>{if(t+=` See https://lit.dev/msg/${e} for more information.`,!f.litIssuedWarnings.has(t)&&!f.litIssuedWarnings.has(e))console.warn(t),f.litIssuedWarnings.add(t)},queueMicrotask(()=>{if(x("dev-mode","Lit is in dev mode. Not recommended for production!"),f.ShadyDOM?.inUse&&Pe===void 0)x("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")});var dt=b?(e)=>{if(!f.emitLitDebugLogEvents)return;f.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))}:void 0,O=(e,t)=>e,oe={toAttribute(e,t){switch(t){case Boolean:e=e?lt:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e);break}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(i){r=null}break}return r}},Ae=(e,t)=>!it(e,t),We={attribute:!0,type:String,converter:oe,reflect:!1,useDefault:!1,hasChanged:Ae};Symbol.metadata??=Symbol("metadata");f.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(e){this.__prepare(),(this._initializers??=[]).push(e)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap&&[...this.__attributeToPropertyMap.keys()]}static createProperty(e,t=We){if(t.state)t.attribute=!1;if(this.__prepare(),this.prototype.hasOwnProperty(e))t=Object.create(t),t.wrapped=!0;if(this.elementProperties.set(e,t),!t.noAccessor){let r=b?Symbol.for(`${String(e)} (@property() cache)`):Symbol(),i=this.getPropertyDescriptor(e,r,t);if(i!==void 0)at(this.prototype,e,i)}}static getPropertyDescriptor(e,t,r){let{get:i,set:a}=$e(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};if(b&&i==null){if("value"in($e(this.prototype,e)??{}))throw Error(`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it's actually declared as a value on the prototype. Usually this is due to using @property or @state on a method.`);x("reactive-property-without-getter",`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it does not have a getter. This will be an error in a future version of Lit.`)}return{get:i,set(o){let s=i?.call(this);a?.call(this,o),this.requestUpdate(e,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??We}static __prepare(){if(this.hasOwnProperty(O("elementProperties",this)))return;let e=Te(this);if(e.finalize(),e._initializers!==void 0)this._initializers=[...e._initializers];this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(O("finalized",this)))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(O("properties",this))){let t=this.properties,r=[...ot(t),...st(t)];for(let i of r)this.createProperty(i,t[i])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,i]of t)this.elementProperties.set(r,i)}this.__attributeToPropertyMap=new Map;for(let[t,r]of this.elementProperties){let i=this.__attributeNameForProperty(t,r);if(i!==void 0)this.__attributeToPropertyMap.set(i,t)}if(this.elementStyles=this.finalizeStyles(this.styles),b){if(this.hasOwnProperty("createProperty"))x("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators");if(this.hasOwnProperty("getPropertyDescriptor"))x("no-override-get-property-descriptor","Overriding ReactiveElement.getPropertyDescriptor() is deprecated. The override will not be called with standard decorators")}}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let i of r)t.unshift(ae(i))}else if(e!==void 0)t.push(ae(e));return t}static __attributeNameForProperty(e,t){let r=t.attribute;return r===!1?void 0:typeof r==="string"?r:typeof e==="string"?e.toLowerCase():void 0}constructor(){super();this.__instanceProperties=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.__reflectingProperty=null,this.__initialize()}__initialize(){this.__updatePromise=new Promise((e)=>this.enableUpdating=e),this._$changedProperties=new Map,this.__saveInstanceProperties(),this.requestUpdate(),this.constructor._initializers?.forEach((e)=>e(this))}addController(e){if((this.__controllers??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected)e.hostConnected?.()}removeController(e){this.__controllers?.delete(e)}__saveInstanceProperties(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())if(this.hasOwnProperty(r))e.set(r,this[r]),delete this[r];if(e.size>0)this.__instanceProperties=e}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ee(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this.__controllers?.forEach((e)=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this.__controllers?.forEach((e)=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$attributeToProperty(e,r)}__propertyToAttribute(e,t){let i=this.constructor.elementProperties.get(e),a=this.constructor.__attributeNameForProperty(e,i);if(a!==void 0&&i.reflect===!0){let s=(i.converter?.toAttribute!==void 0?i.converter:oe).toAttribute(t,i.type);if(b&&this.constructor.enabledWarnings.includes("migration")&&s===void 0)x("undefined-attribute-value",`The attribute value for the ${e} property is undefined on element ${this.localName}. The attribute will be removed, but in the previous version of \`ReactiveElement\`, the attribute would not have changed.`);if(this.__reflectingProperty=e,s==null)this.removeAttribute(a);else this.setAttribute(a,s);this.__reflectingProperty=null}}_$attributeToProperty(e,t){let r=this.constructor,i=r.__attributeToPropertyMap.get(e);if(i!==void 0&&this.__reflectingProperty!==i){let a=r.getPropertyOptions(i),o=typeof a.converter==="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:oe;this.__reflectingProperty=i;let s=o.fromAttribute(t,a.type);this[i]=s??this.__defaultValues?.get(i)??s,this.__reflectingProperty=null}}requestUpdate(e,t,r,i=!1,a){if(e!==void 0){if(b&&e instanceof Event)x("","The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()");let o=this.constructor;if(i===!1)a=this[e];if(r??=o.getPropertyOptions(e),(r.hasChanged??Ae)(a,t)||r.useDefault&&r.reflect&&a===this.__defaultValues?.get(e)&&!this.hasAttribute(o.__attributeNameForProperty(e,r)))this._$changeProperty(e,t,r);else return}if(this.isUpdatePending===!1)this.__updatePromise=this.__enqueueUpdate()}_$changeProperty(e,t,{useDefault:r,reflect:i,wrapped:a},o){if(r&&!(this.__defaultValues??=new Map).has(e)){if(this.__defaultValues.set(e,o??t??this[e]),a!==!0||o!==void 0)return}if(!this._$changedProperties.has(e)){if(!this.hasUpdated&&!r)t=void 0;this._$changedProperties.set(e,t)}if(i===!0&&this.__reflectingProperty!==e)(this.__reflectingProperties??=new Set).add(e)}async __enqueueUpdate(){this.isUpdatePending=!0;try{await this.__updatePromise}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();if(e!=null)await e;return!this.isUpdatePending}scheduleUpdate(){let e=this.performUpdate();if(b&&this.constructor.enabledWarnings.includes("async-perform-update")&&typeof e?.then==="function")x("async-perform-update",`Element ${this.localName} returned a Promise from performUpdate(). This behavior is deprecated and will be removed in a future version of ReactiveElement.`);return e}performUpdate(){if(!this.isUpdatePending)return;if(dt?.({kind:"update"}),!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),b){let a=[...this.constructor.elementProperties.keys()].filter((o)=>this.hasOwnProperty(o)&&(o in Te(this)));if(a.length)throw Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${a.join(", ")}. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information.`)}if(this.__instanceProperties){for(let[i,a]of this.__instanceProperties)this[i]=a;this.__instanceProperties=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[i,a]of r){let{wrapped:o}=a,s=this[i];if(o===!0&&!this._$changedProperties.has(i)&&s!==void 0)this._$changeProperty(i,void 0,a,s)}}let e=!1,t=this._$changedProperties;try{if(e=this.shouldUpdate(t),e)this.willUpdate(t),this.__controllers?.forEach((r)=>r.hostUpdate?.()),this.update(t);else this.__markUpdated()}catch(r){throw e=!1,this.__markUpdated(),r}if(e)this._$didUpdate(t)}willUpdate(e){}_$didUpdate(e){if(this.__controllers?.forEach((t)=>t.hostUpdated?.()),!this.hasUpdated)this.hasUpdated=!0,this.firstUpdated(e);if(this.updated(e),b&&this.isUpdatePending&&this.constructor.enabledWarnings.includes("change-in-update"))x("change-in-update",`Element ${this.localName} scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update.`)}__markUpdated(){this._$changedProperties=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.__updatePromise}shouldUpdate(e){return!0}update(e){this.__reflectingProperties&&=this.__reflectingProperties.forEach((t)=>this.__propertyToAttribute(t,this[t])),this.__markUpdated()}updated(e){}firstUpdated(e){}}y.elementStyles=[];y.shadowRootOptions={mode:"open"};y[O("elementProperties",y)]=new Map;y[O("finalized",y)]=new Map;Pe?.({ReactiveElement:y});if(b){y.enabledWarnings=["change-in-update","async-perform-update"];let e=function(t){if(!t.hasOwnProperty(O("enabledWarnings",t)))t.enabledWarnings=t.enabledWarnings.slice()};y.enableWarning=function(t){if(e(this),!this.enabledWarnings.includes(t))this.enabledWarnings.push(t)},y.disableWarning=function(t){e(this);let r=this.enabledWarnings.indexOf(t);if(r>=0)this.enabledWarnings.splice(r,1)}}(f.reactiveElementVersions??=[]).push("2.1.2");if(b&&f.reactiveElementVersions.length>1)queueMicrotask(()=>{x("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});var w=globalThis,p=(e)=>{if(!w.emitLitDebugLogEvents)return;w.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))},ct=0,B;w.litIssuedWarnings??=new Set,B=(e,t)=>{if(t+=e?` See https://lit.dev/msg/${e} for more information.`:"",!w.litIssuedWarnings.has(t)&&!w.litIssuedWarnings.has(e))console.warn(t),w.litIssuedWarnings.add(t)},queueMicrotask(()=>{B("dev-mode","Lit is in dev mode. Not recommended for production!")});var _=w.ShadyDOM?.inUse&&w.ShadyDOM?.noPatch===!0?w.ShadyDOM.wrap:(e)=>e,Y=w.trustedTypes,Re=Y?Y.createPolicy("lit-html",{createHTML:(e)=>e}):void 0,pt=(e)=>e,Q=(e,t,r)=>pt,ut=(e)=>{if(I!==Q)throw Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");I=e},ht=()=>{I=Q},ce=(e,t,r)=>I(e,t,r),Le="$lit$",S=`lit$${Math.random().toFixed(9).slice(2)}$`,Be="?"+S,mt=`<${Be}>`,R=document,M=()=>R.createComment(""),V=(e)=>e===null||typeof e!="object"&&typeof e!="function",pe=Array.isArray,gt=(e)=>pe(e)||typeof e?.[Symbol.iterator]==="function",se=`[
2
2
  \f\r]`,ft=`[^
3
- \f\r"'\`<>=]`,bt=`[^\\s"'>=/]`,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ke=1,ne=2,yt=3,Ie=/-->/g,Oe=/>/g,P=new RegExp(`>|${se}(?:(${bt}+)(${se}*=${se}*(?:${ft}|("|')|))|$)`,"g"),wt=0,De=1,xt=2,Ne=3,le=/'/g,de=/"/g,Le=/^(?:script|style|textarea|title)$/i,_t=1,G=2,J=3,ue=1,X=2,vt=3,St=4,Et=5,he=6,$t=7,me=(e)=>(t,...r)=>{if(t.some((i)=>i===void 0))console.warn(`Some template strings are undefined.
3
+ \f\r"'\`<>=]`,bt=`[^\\s"'>=/]`,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ke=1,ne=2,yt=3,Ie=/-->/g,De=/>/g,W=new RegExp(`>|${se}(?:(${bt}+)(${se}*=${se}*(?:${ft}|("|')|))|$)`,"g"),wt=0,Oe=1,xt=2,Ne=3,le=/'/g,de=/"/g,Me=/^(?:script|style|textarea|title)$/i,_t=1,G=2,J=3,ue=1,X=2,vt=3,St=4,Et=5,he=6,$t=7,me=(e)=>(t,...r)=>{if(t.some((i)=>i===void 0))console.warn(`Some template strings are undefined.
4
4
  This is probably caused by illegal octal escape sequences.`);if(r.some((i)=>i?._$litStatic$))B("",`Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.
5
- Please use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions`);return{["_$litType$"]:e,strings:t,values:r}},c=me(_t),Mt=me(G),Bt=me(J),k=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Ue=new WeakMap,R=A.createTreeWalker(A,129),I=Q;function Ve(e,t){if(!pe(e)||!e.hasOwnProperty("raw")){let r="invalid template strings array";throw r=`
5
+ Please use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions`);return{["_$litType$"]:e,strings:t,values:r}},c=me(_t),Lt=me(G),Bt=me(J),k=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Ue=new WeakMap,A=R.createTreeWalker(R,129),I=Q;function Ve(e,t){if(!pe(e)||!e.hasOwnProperty("raw")){let r="invalid template strings array";throw r=`
6
6
  Internal Error: expected template strings to be an array
7
7
  with a 'raw' field. Faking a template strings array by
8
8
  calling html or svg like an ordinary function is effectively
@@ -13,7 +13,7 @@ Please use the static 'html' tag function. See https://lit.dev/docs/templates/ex
13
13
  https://github.com/lit/lit/issues/new?template=bug_report.md
14
14
  and include information about your build tooling, if any.
15
15
  `.trim().replace(/\n */g,`
16
- `),Error(r)}return Ae!==void 0?Ae.createHTML(t):t}var Tt=(e,t)=>{let r=e.length-1,i=[],a=t===G?"<svg>":t===J?"<math>":"",o,s=U;for(let h=0;h<r;h++){let v=e[h],u=-1,g,C=0,m;while(C<v.length){if(s.lastIndex=C,m=s.exec(v),m===null)break;if(C=s.lastIndex,s===U){if(m[ke]==="!--")s=Ie;else if(m[ke]!==void 0)s=Oe;else if(m[ne]!==void 0){if(Le.test(m[ne]))o=new RegExp(`</${m[ne]}`,"g");s=P}else if(m[yt]!==void 0)throw Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else if(s===P)if(m[wt]===">")s=o??U,u=-1;else if(m[De]===void 0)u=-2;else u=s.lastIndex-m[xt].length,g=m[De],s=m[Ne]===void 0?P:m[Ne]==='"'?de:le;else if(s===de||s===le)s=P;else if(s===Ie||s===Oe)s=U;else s=P,o=void 0}console.assert(u===-1||s===P||s===le||s===de,"unexpected parse state B");let W=s===P&&e[h+1].startsWith("/>")?" ":"";a+=s===U?v+mt:u>=0?(i.push(g),v.slice(0,u)+Me+v.slice(u))+S+W:v+S+(u===-2?h:W)}let n=a+(e[r]||"<?>")+(t===G?"</svg>":t===J?"</math>":"");return[Ve(e,n),i]};class z{constructor({strings:e,["_$litType$"]:t},r){this.parts=[];let i,a=0,o=0,s=e.length-1,n=this.parts,[h,v]=Tt(e,t);if(this.el=z.createElement(h,r),R.currentNode=this.el.content,t===G||t===J){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}while((i=R.nextNode())!==null&&n.length<s){if(i.nodeType===1){{let u=i.localName;if(/^(?:textarea|template)$/i.test(u)&&i.innerHTML.includes(S)){let g=`Expressions are not supported inside \`${u}\` elements. See https://lit.dev/msg/expression-in-${u} for more information.`;if(u==="template")throw Error(g);else B("",g)}}if(i.hasAttributes()){for(let u of i.getAttributeNames())if(u.endsWith(Me)){let g=v[o++],m=i.getAttribute(u).split(S),W=/([.?@])?(.*)/.exec(g);n.push({type:ue,index:a,name:W[2],strings:m,ctor:W[1]==="."?Fe:W[1]==="?"?Ke:W[1]==="@"?qe:K}),i.removeAttribute(u)}else if(u.startsWith(S))n.push({type:he,index:a}),i.removeAttribute(u)}if(Le.test(i.tagName)){let u=i.textContent.split(S),g=u.length-1;if(g>0){i.textContent=Y?Y.emptyScript:"";for(let C=0;C<g;C++)i.append(u[C],L()),R.nextNode(),n.push({type:X,index:++a});i.append(u[g],L())}}}else if(i.nodeType===8)if(i.data===Be)n.push({type:X,index:a});else{let g=-1;while((g=i.data.indexOf(S,g+1))!==-1)n.push({type:$t,index:a}),g+=S.length-1}a++}if(v.length!==o)throw Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+e.join("${...}")+"`");p&&p({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){let r=A.createElement("template");return r.innerHTML=e,r}}function N(e,t,r=e,i){if(t===k)return t;let a=i!==void 0?r.__directives?.[i]:r.__directive,o=V(t)?void 0:t._$litDirective$;if(a?.constructor!==o){if(a?._$notifyDirectiveConnectionChanged?.(!1),o===void 0)a=void 0;else a=new o(e),a._$initialize(e,r,i);if(i!==void 0)(r.__directives??=[])[i]=a;else r.__directive=a}if(a!==void 0)t=N(e,a._$resolve(e,t.values),a,i);return t}class ze{constructor(e,t){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=e,this._$parent=t}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(e){let{el:{content:t},parts:r}=this._$template,i=(e?.creationScope??A).importNode(t,!0);R.currentNode=i;let a=R.nextNode(),o=0,s=0,n=r[0];while(n!==void 0){if(o===n.index){let h;if(n.type===X)h=new F(a,a.nextSibling,this,e);else if(n.type===ue)h=new n.ctor(a,n.name,n.strings,this,e);else if(n.type===he)h=new He(a,this,e);this._$parts.push(h),n=r[++s]}if(o!==n?.index)a=R.nextNode(),o++}return R.currentNode=A,i}_update(e){let t=0;for(let r of this._$parts){if(r!==void 0)if(p&&p({kind:"set part",part:r,value:e[t],valueIndex:t,values:e,templateInstance:this}),r.strings!==void 0)r._$setValue(e,r,t),t+=r.strings.length-2;else r._$setValue(e[t]);t++}}}class F{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,r,i){this.type=X,this._$committedValue=l,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=r,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=_(this._$startNode).parentNode,t=this._$parent;if(t!==void 0&&e?.nodeType===11)e=t.parentNode;return e}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(e,t=this){if(this.parentNode===null)throw Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(e=N(this,e,t),V(e)){if(e===l||e==null||e===""){if(this._$committedValue!==l)p&&p({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear();this._$committedValue=l}else if(e!==this._$committedValue&&e!==k)this._commitText(e)}else if(e._$litType$!==void 0)this._commitTemplateResult(e);else if(e.nodeType!==void 0){if(this.options?.host===e){this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");return}this._commitNode(e)}else if(gt(e))this._commitIterable(e);else this._commitText(e)}_insert(e){return _(_(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),I!==Q){let t=this._$startNode.parentNode?.nodeName;if(t==="STYLE"||t==="SCRIPT"){let r="Forbidden";if(t==="STYLE")r="Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.";else r="Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.";throw Error(r)}}p&&p({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==l&&V(this._$committedValue)){let t=_(this._$startNode).nextSibling;if(this._textSanitizer===void 0)this._textSanitizer=ce(t,"data","property");e=this._textSanitizer(e),p&&p({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{let t=A.createTextNode("");if(this._commitNode(t),this._textSanitizer===void 0)this._textSanitizer=ce(t,"data","property");e=this._textSanitizer(e),p&&p({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){let{values:t,["_$litType$"]:r}=e,i=typeof r==="number"?this._$getTemplate(e):(r.el===void 0&&(r.el=z.createElement(Ve(r.h,r.h[0]),this.options)),r);if(this._$committedValue?._$template===i)p&&p({kind:"template updating",template:i,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{let a=new ze(i,this),o=a._clone(this.options);p&&p({kind:"template instantiated",template:i,instance:a,parts:a._$parts,options:this.options,fragment:o,values:t}),a._update(t),p&&p({kind:"template instantiated and updated",template:i,instance:a,parts:a._$parts,options:this.options,fragment:o,values:t}),this._commitNode(o),this._$committedValue=a}}_$getTemplate(e){let t=Ue.get(e.strings);if(t===void 0)Ue.set(e.strings,t=new z(e));return t}_commitIterable(e){if(!pe(this._$committedValue))this._$committedValue=[],this._$clear();let t=this._$committedValue,r=0,i;for(let a of e){if(r===t.length)t.push(i=new F(this._insert(L()),this._insert(L()),this,this.options));else i=t[r];i._$setValue(a),r++}if(r<t.length)this._$clear(i&&_(i._$endNode).nextSibling,r),t.length=r}_$clear(e=_(this._$startNode).nextSibling,t){this._$notifyConnectionChanged?.(!1,!0,t);while(e!==this._$endNode){let r=_(e).nextSibling;_(e).remove(),e=r}}setConnected(e){if(this._$parent===void 0)this.__isConnected=e,this._$notifyConnectionChanged?.(e);else throw Error("part.setConnected() may only be called on a RootPart returned from render().")}}class K{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,r,i,a){if(this.type=ue,this._$committedValue=l,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=i,this.options=a,r.length>2||r[0]!==""||r[1]!=="")this._$committedValue=Array(r.length-1).fill(new String),this.strings=r;else this._$committedValue=l;this._sanitizer=void 0}_$setValue(e,t=this,r,i){let a=this.strings,o=!1;if(a===void 0){if(e=N(this,e,t,0),o=!V(e)||e!==this._$committedValue&&e!==k,o)this._$committedValue=e}else{let s=e;e=a[0];let n,h;for(n=0;n<a.length-1;n++){if(h=N(this,s[r+n],t,n),h===k)h=this._$committedValue[n];if(o||=!V(h)||h!==this._$committedValue[n],h===l)e=l;else if(e!==l)e+=(h??"")+a[n+1];this._$committedValue[n]=h}}if(o&&!i)this._commitValue(e)}_commitValue(e){if(e===l)_(this.element).removeAttribute(this.name);else{if(this._sanitizer===void 0)this._sanitizer=I(this.element,this.name,"attribute");e=this._sanitizer(e??""),p&&p({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),_(this.element).setAttribute(this.name,e??"")}}}class Fe extends K{constructor(){super(...arguments);this.type=vt}_commitValue(e){if(this._sanitizer===void 0)this._sanitizer=I(this.element,this.name,"property");e=this._sanitizer(e),p&&p({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===l?void 0:e}}class Ke extends K{constructor(){super(...arguments);this.type=St}_commitValue(e){p&&p({kind:"commit boolean attribute",element:this.element,name:this.name,value:!!(e&&e!==l),options:this.options}),_(this.element).toggleAttribute(this.name,!!e&&e!==l)}}class qe extends K{constructor(e,t,r,i,a){super(e,t,r,i,a);if(this.type=Et,this.strings!==void 0)throw Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if(e=N(this,e,t,0)??l,e===k)return;let r=this._$committedValue,i=e===l&&r!==l||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,a=e!==l&&(r===l||i);if(p&&p({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:i,addListener:a,oldListener:r}),i)this.element.removeEventListener(this.name,this,r);if(a)this.element.addEventListener(this.name,this,e);this._$committedValue=e}handleEvent(e){if(typeof this._$committedValue==="function")this._$committedValue.call(this.options?.host??this.element,e);else this._$committedValue.handleEvent(e)}}class He{constructor(e,t,r){this.element=e,this.type=he,this._$disconnectableChildren=void 0,this._$parent=t,this.options=r}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){p&&p({kind:"commit to element binding",element:this.element,value:e,options:this.options}),N(this,e)}}var Ct=w.litHtmlPolyfillSupportDevMode;Ct?.(z,F);(w.litHtmlVersions??=[]).push("3.3.3");if(w.litHtmlVersions.length>1)queueMicrotask(()=>{B("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});var M=(e,t,r)=>{if(t==null)throw TypeError(`The container to render into may not be ${t}`);let i=ct++,a=r?.renderBefore??t,o=a._$litPart$;if(p&&p({kind:"begin render",id:i,value:e,container:t,options:r,part:o}),o===void 0){let s=r?.renderBefore??null;a._$litPart$=o=new F(t.insertBefore(L(),s),s,void 0,r??{})}return o._$setValue(e),p&&p({kind:"end render",id:i,value:e,container:t,options:r,part:o}),o};M.setSanitizer=ut,M.createSanitizer=ce,M._testOnlyClearSanitizerFactoryDoNotCallOrElse=ht;var Pt=(e,t)=>e,ge=!0,E=globalThis,je;if(ge)E.litIssuedWarnings??=new Set,je=(e,t)=>{if(t+=` See https://lit.dev/msg/${e} for more information.`,!E.litIssuedWarnings.has(t)&&!E.litIssuedWarnings.has(e))console.warn(t),E.litIssuedWarnings.add(t)};class T extends y{constructor(){super(...arguments);this.renderOptions={host:this},this.__childPart=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();if(!this.hasUpdated)this.renderOptions.isConnected=this.isConnected;super.update(e),this.__childPart=M(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.__childPart?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.__childPart?.setConnected(!1)}render(){return k}}T._$litElement$=!0;T[Pt("finalized",T)]=!0;E.litElementHydrateSupport?.({LitElement:T});var Wt=ge?E.litElementPolyfillSupportDevMode:E.litElementPolyfillSupport;Wt?.({LitElement:T});(E.litElementVersions??=[]).push("4.2.2");if(ge&&E.litElementVersions.length>1)queueMicrotask(()=>{je("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});class fe extends Error{status;statusText;payload;constructor(e){super(e.message);this.name="WodiraBrowserApiError",this.status=e.status,this.statusText=e.statusText,this.payload=e.payload}}class Ye{options;baseUrl;prefix;fetcher;constructor(e){this.options=e;if(!e.publishableKey?.startsWith("wpk_live_"))throw Error("WODira Boxes widgets require a wpk_live_ publishable key.");if(!e.installationId?.trim())throw Error("WODira Boxes widgets require an installation-id.");this.baseUrl=(e.baseUrl??"https://api.wodira.app").replace(/\/+$/,""),this.prefix=`/external/v1/browser/box-widgets/${encodeURIComponent(e.installationId)}`,this.fetcher=e.fetch??globalThis.fetch.bind(globalThis)}getContext(e){return this.request("/context",e?{signal:e}:{})}getCalendar(e,t=1,r){let i=new URLSearchParams({from:e.toISOString(),weeks:String(t)});return this.request(`/calendar?${i}`,r?{signal:r}:{})}getPlans(e){return this.request("/plans",e?{signal:e}:{})}getTrialClasses(e){return this.request("/trial-classes",e?{signal:e}:{})}createFlow(e,t){return this.request("/flows",{method:"POST",body:e,...t?{signal:t}:{}})}recordTelemetry(e,t){return this.request("/telemetry",{method:"POST",body:{events:e},...t?{signal:t}:{}})}verifyResult(e,t){return this.request(`/results/${encodeURIComponent(e)}`,t?{signal:t}:{})}async request(e,t){let r=new Headers({accept:"application/json","x-publishable-key":this.options.publishableKey}),i={method:t.method??"GET",headers:r};if(t.signal)i.signal=t.signal;if(t.body!==void 0)r.set("content-type","application/json"),i.body=JSON.stringify(t.body);let a=await this.fetcher(`${this.baseUrl}${this.prefix}${e}`,i);if(!a.ok){let s=await a.text(),n=s||null;try{n=s?JSON.parse(s):null}catch{}throw new fe({status:a.status,statusText:a.statusText,message:typeof n==="object"&&typeof n?.message==="string"?n.message:"WODira Boxes widget request failed.",payload:n})}let o=await a.text();return o?JSON.parse(o):void 0}}function Ge(e){return new Ye(e)}var Rt={es:{calendar:"Horario de clases",trial:"Prueba una clase",plans:"Planes",previous:"Semana anterior",next:"Semana siguiente",reserve:"Continuar",loading:"Cargando…",empty:"No hay opciones disponibles en estas fechas.",error:"No pudimos cargar este contenido. Inténtalo de nuevo.",available:"Disponible",last:"Últimas plazas",waitlist:"Lista de espera",full:"Completa",coach:"Coach",duration:"min",free:"Gratis",unlimited:"Ilimitado",email:"Tu email",privacy:"Acepto la política de privacidad de WODira y del box.",trialCta:"Continuar",chooseClass:"Elige una clase",result:"¡Todo listo! Tu solicitud se ha completado.",powered:"Tecnología de WODira",retry:"Reintentar",per:"por",credits:"créditos",once:"pago único",daily:"diario",weekly:"semanal",monthly:"mensual",yearly:"anual"},en:{calendar:"Class schedule",trial:"Try a class",plans:"Plans",previous:"Previous week",next:"Next week",reserve:"Continue",loading:"Loading…",empty:"No options are available for these dates.",error:"We could not load this content. Try again.",available:"Available",last:"Last spots",waitlist:"Waitlist",full:"Full",coach:"Coach",duration:"min",free:"Free",unlimited:"Unlimited",email:"Your email",privacy:"I accept WODira and the gym privacy policies.",trialCta:"Continue",chooseClass:"Choose a class",result:"All set! Your request is complete.",powered:"Powered by WODira",retry:"Retry",per:"per",credits:"credits",once:"one-time",daily:"daily",weekly:"weekly",monthly:"monthly",yearly:"yearly"},pt:{calendar:"Horário de aulas",trial:"Experimente uma aula",plans:"Planos",previous:"Semana anterior",next:"Semana seguinte",reserve:"Continuar",loading:"A carregar…",empty:"Não há opções disponíveis nestas datas.",error:"Não foi possível carregar. Tente novamente.",available:"Disponível",last:"Últimas vagas",waitlist:"Lista de espera",full:"Lotada",coach:"Coach",duration:"min",free:"Grátis",unlimited:"Ilimitado",email:"O seu email",privacy:"Aceito as políticas de privacidade da WODira e do box.",trialCta:"Continuar",chooseClass:"Escolha uma aula",result:"Tudo pronto! O seu pedido foi concluído.",powered:"Tecnologia WODira",retry:"Tentar novamente",per:"por",credits:"créditos",once:"pagamento único",daily:"diário",weekly:"semanal",monthly:"mensal",yearly:"anual"}};function q(e){let r=(e==="auto"||!e?document.documentElement.lang||navigator.language:e).toLowerCase().split("-")[0];return r==="en"||r==="pt"?r:"es"}function d(e,t){return Rt[q(e)][t]}var be=j`
16
+ `),Error(r)}return Re!==void 0?Re.createHTML(t):t}var Tt=(e,t)=>{let r=e.length-1,i=[],a=t===G?"<svg>":t===J?"<math>":"",o,s=U;for(let h=0;h<r;h++){let v=e[h],u=-1,g,C=0,m;while(C<v.length){if(s.lastIndex=C,m=s.exec(v),m===null)break;if(C=s.lastIndex,s===U){if(m[ke]==="!--")s=Ie;else if(m[ke]!==void 0)s=De;else if(m[ne]!==void 0){if(Me.test(m[ne]))o=new RegExp(`</${m[ne]}`,"g");s=W}else if(m[yt]!==void 0)throw Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else if(s===W)if(m[wt]===">")s=o??U,u=-1;else if(m[Oe]===void 0)u=-2;else u=s.lastIndex-m[xt].length,g=m[Oe],s=m[Ne]===void 0?W:m[Ne]==='"'?de:le;else if(s===de||s===le)s=W;else if(s===Ie||s===De)s=U;else s=W,o=void 0}console.assert(u===-1||s===W||s===le||s===de,"unexpected parse state B");let P=s===W&&e[h+1].startsWith("/>")?" ":"";a+=s===U?v+mt:u>=0?(i.push(g),v.slice(0,u)+Le+v.slice(u))+S+P:v+S+(u===-2?h:P)}let n=a+(e[r]||"<?>")+(t===G?"</svg>":t===J?"</math>":"");return[Ve(e,n),i]};class z{constructor({strings:e,["_$litType$"]:t},r){this.parts=[];let i,a=0,o=0,s=e.length-1,n=this.parts,[h,v]=Tt(e,t);if(this.el=z.createElement(h,r),A.currentNode=this.el.content,t===G||t===J){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}while((i=A.nextNode())!==null&&n.length<s){if(i.nodeType===1){{let u=i.localName;if(/^(?:textarea|template)$/i.test(u)&&i.innerHTML.includes(S)){let g=`Expressions are not supported inside \`${u}\` elements. See https://lit.dev/msg/expression-in-${u} for more information.`;if(u==="template")throw Error(g);else B("",g)}}if(i.hasAttributes()){for(let u of i.getAttributeNames())if(u.endsWith(Le)){let g=v[o++],m=i.getAttribute(u).split(S),P=/([.?@])?(.*)/.exec(g);n.push({type:ue,index:a,name:P[2],strings:m,ctor:P[1]==="."?Fe:P[1]==="?"?Ke:P[1]==="@"?qe:K}),i.removeAttribute(u)}else if(u.startsWith(S))n.push({type:he,index:a}),i.removeAttribute(u)}if(Me.test(i.tagName)){let u=i.textContent.split(S),g=u.length-1;if(g>0){i.textContent=Y?Y.emptyScript:"";for(let C=0;C<g;C++)i.append(u[C],M()),A.nextNode(),n.push({type:X,index:++a});i.append(u[g],M())}}}else if(i.nodeType===8)if(i.data===Be)n.push({type:X,index:a});else{let g=-1;while((g=i.data.indexOf(S,g+1))!==-1)n.push({type:$t,index:a}),g+=S.length-1}a++}if(v.length!==o)throw Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+e.join("${...}")+"`");p&&p({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){let r=R.createElement("template");return r.innerHTML=e,r}}function N(e,t,r=e,i){if(t===k)return t;let a=i!==void 0?r.__directives?.[i]:r.__directive,o=V(t)?void 0:t._$litDirective$;if(a?.constructor!==o){if(a?._$notifyDirectiveConnectionChanged?.(!1),o===void 0)a=void 0;else a=new o(e),a._$initialize(e,r,i);if(i!==void 0)(r.__directives??=[])[i]=a;else r.__directive=a}if(a!==void 0)t=N(e,a._$resolve(e,t.values),a,i);return t}class ze{constructor(e,t){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=e,this._$parent=t}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(e){let{el:{content:t},parts:r}=this._$template,i=(e?.creationScope??R).importNode(t,!0);A.currentNode=i;let a=A.nextNode(),o=0,s=0,n=r[0];while(n!==void 0){if(o===n.index){let h;if(n.type===X)h=new F(a,a.nextSibling,this,e);else if(n.type===ue)h=new n.ctor(a,n.name,n.strings,this,e);else if(n.type===he)h=new He(a,this,e);this._$parts.push(h),n=r[++s]}if(o!==n?.index)a=A.nextNode(),o++}return A.currentNode=R,i}_update(e){let t=0;for(let r of this._$parts){if(r!==void 0)if(p&&p({kind:"set part",part:r,value:e[t],valueIndex:t,values:e,templateInstance:this}),r.strings!==void 0)r._$setValue(e,r,t),t+=r.strings.length-2;else r._$setValue(e[t]);t++}}}class F{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,r,i){this.type=X,this._$committedValue=l,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=r,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=_(this._$startNode).parentNode,t=this._$parent;if(t!==void 0&&e?.nodeType===11)e=t.parentNode;return e}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(e,t=this){if(this.parentNode===null)throw Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(e=N(this,e,t),V(e)){if(e===l||e==null||e===""){if(this._$committedValue!==l)p&&p({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear();this._$committedValue=l}else if(e!==this._$committedValue&&e!==k)this._commitText(e)}else if(e._$litType$!==void 0)this._commitTemplateResult(e);else if(e.nodeType!==void 0){if(this.options?.host===e){this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");return}this._commitNode(e)}else if(gt(e))this._commitIterable(e);else this._commitText(e)}_insert(e){return _(_(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),I!==Q){let t=this._$startNode.parentNode?.nodeName;if(t==="STYLE"||t==="SCRIPT"){let r="Forbidden";if(t==="STYLE")r="Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.";else r="Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.";throw Error(r)}}p&&p({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==l&&V(this._$committedValue)){let t=_(this._$startNode).nextSibling;if(this._textSanitizer===void 0)this._textSanitizer=ce(t,"data","property");e=this._textSanitizer(e),p&&p({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{let t=R.createTextNode("");if(this._commitNode(t),this._textSanitizer===void 0)this._textSanitizer=ce(t,"data","property");e=this._textSanitizer(e),p&&p({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){let{values:t,["_$litType$"]:r}=e,i=typeof r==="number"?this._$getTemplate(e):(r.el===void 0&&(r.el=z.createElement(Ve(r.h,r.h[0]),this.options)),r);if(this._$committedValue?._$template===i)p&&p({kind:"template updating",template:i,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{let a=new ze(i,this),o=a._clone(this.options);p&&p({kind:"template instantiated",template:i,instance:a,parts:a._$parts,options:this.options,fragment:o,values:t}),a._update(t),p&&p({kind:"template instantiated and updated",template:i,instance:a,parts:a._$parts,options:this.options,fragment:o,values:t}),this._commitNode(o),this._$committedValue=a}}_$getTemplate(e){let t=Ue.get(e.strings);if(t===void 0)Ue.set(e.strings,t=new z(e));return t}_commitIterable(e){if(!pe(this._$committedValue))this._$committedValue=[],this._$clear();let t=this._$committedValue,r=0,i;for(let a of e){if(r===t.length)t.push(i=new F(this._insert(M()),this._insert(M()),this,this.options));else i=t[r];i._$setValue(a),r++}if(r<t.length)this._$clear(i&&_(i._$endNode).nextSibling,r),t.length=r}_$clear(e=_(this._$startNode).nextSibling,t){this._$notifyConnectionChanged?.(!1,!0,t);while(e!==this._$endNode){let r=_(e).nextSibling;_(e).remove(),e=r}}setConnected(e){if(this._$parent===void 0)this.__isConnected=e,this._$notifyConnectionChanged?.(e);else throw Error("part.setConnected() may only be called on a RootPart returned from render().")}}class K{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,r,i,a){if(this.type=ue,this._$committedValue=l,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=i,this.options=a,r.length>2||r[0]!==""||r[1]!=="")this._$committedValue=Array(r.length-1).fill(new String),this.strings=r;else this._$committedValue=l;this._sanitizer=void 0}_$setValue(e,t=this,r,i){let a=this.strings,o=!1;if(a===void 0){if(e=N(this,e,t,0),o=!V(e)||e!==this._$committedValue&&e!==k,o)this._$committedValue=e}else{let s=e;e=a[0];let n,h;for(n=0;n<a.length-1;n++){if(h=N(this,s[r+n],t,n),h===k)h=this._$committedValue[n];if(o||=!V(h)||h!==this._$committedValue[n],h===l)e=l;else if(e!==l)e+=(h??"")+a[n+1];this._$committedValue[n]=h}}if(o&&!i)this._commitValue(e)}_commitValue(e){if(e===l)_(this.element).removeAttribute(this.name);else{if(this._sanitizer===void 0)this._sanitizer=I(this.element,this.name,"attribute");e=this._sanitizer(e??""),p&&p({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),_(this.element).setAttribute(this.name,e??"")}}}class Fe extends K{constructor(){super(...arguments);this.type=vt}_commitValue(e){if(this._sanitizer===void 0)this._sanitizer=I(this.element,this.name,"property");e=this._sanitizer(e),p&&p({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===l?void 0:e}}class Ke extends K{constructor(){super(...arguments);this.type=St}_commitValue(e){p&&p({kind:"commit boolean attribute",element:this.element,name:this.name,value:!!(e&&e!==l),options:this.options}),_(this.element).toggleAttribute(this.name,!!e&&e!==l)}}class qe extends K{constructor(e,t,r,i,a){super(e,t,r,i,a);if(this.type=Et,this.strings!==void 0)throw Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if(e=N(this,e,t,0)??l,e===k)return;let r=this._$committedValue,i=e===l&&r!==l||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,a=e!==l&&(r===l||i);if(p&&p({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:i,addListener:a,oldListener:r}),i)this.element.removeEventListener(this.name,this,r);if(a)this.element.addEventListener(this.name,this,e);this._$committedValue=e}handleEvent(e){if(typeof this._$committedValue==="function")this._$committedValue.call(this.options?.host??this.element,e);else this._$committedValue.handleEvent(e)}}class He{constructor(e,t,r){this.element=e,this.type=he,this._$disconnectableChildren=void 0,this._$parent=t,this.options=r}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){p&&p({kind:"commit to element binding",element:this.element,value:e,options:this.options}),N(this,e)}}var Ct=w.litHtmlPolyfillSupportDevMode;Ct?.(z,F);(w.litHtmlVersions??=[]).push("3.3.3");if(w.litHtmlVersions.length>1)queueMicrotask(()=>{B("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});var L=(e,t,r)=>{if(t==null)throw TypeError(`The container to render into may not be ${t}`);let i=ct++,a=r?.renderBefore??t,o=a._$litPart$;if(p&&p({kind:"begin render",id:i,value:e,container:t,options:r,part:o}),o===void 0){let s=r?.renderBefore??null;a._$litPart$=o=new F(t.insertBefore(M(),s),s,void 0,r??{})}return o._$setValue(e),p&&p({kind:"end render",id:i,value:e,container:t,options:r,part:o}),o};L.setSanitizer=ut,L.createSanitizer=ce,L._testOnlyClearSanitizerFactoryDoNotCallOrElse=ht;var Wt=(e,t)=>e,ge=!0,E=globalThis,je;if(ge)E.litIssuedWarnings??=new Set,je=(e,t)=>{if(t+=` See https://lit.dev/msg/${e} for more information.`,!E.litIssuedWarnings.has(t)&&!E.litIssuedWarnings.has(e))console.warn(t),E.litIssuedWarnings.add(t)};class T extends y{constructor(){super(...arguments);this.renderOptions={host:this},this.__childPart=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();if(!this.hasUpdated)this.renderOptions.isConnected=this.isConnected;super.update(e),this.__childPart=L(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.__childPart?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.__childPart?.setConnected(!1)}render(){return k}}T._$litElement$=!0;T[Wt("finalized",T)]=!0;E.litElementHydrateSupport?.({LitElement:T});var Pt=ge?E.litElementPolyfillSupportDevMode:E.litElementPolyfillSupport;Pt?.({LitElement:T});(E.litElementVersions??=[]).push("4.2.2");if(ge&&E.litElementVersions.length>1)queueMicrotask(()=>{je("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});class fe extends Error{status;statusText;payload;constructor(e){super(e.message);this.name="WodiraBrowserApiError",this.status=e.status,this.statusText=e.statusText,this.payload=e.payload}}class Ye{options;baseUrl;prefix;fetcher;constructor(e){this.options=e;if(!e.publishableKey?.startsWith("wpk_live_"))throw Error("WODira Boxes widgets require a wpk_live_ publishable key.");if(!e.installationId?.trim())throw Error("WODira Boxes widgets require an installation-id.");this.baseUrl=(e.baseUrl??"https://api.wodira.app").replace(/\/+$/,""),this.prefix=`/external/v1/browser/box-widgets/${encodeURIComponent(e.installationId)}`,this.fetcher=e.fetch??globalThis.fetch.bind(globalThis)}getContext(e){return this.request("/context",e?{signal:e}:{})}getCalendar(e,t=1,r){let i=new URLSearchParams({from:e.toISOString(),weeks:String(t)});return this.request(`/calendar?${i}`,r?{signal:r}:{})}getPlans(e){return this.request("/plans",e?{signal:e}:{})}getTrialClasses(e){return this.request("/trial-classes",e?{signal:e}:{})}createFlow(e,t){return this.request("/flows",{method:"POST",body:e,...t?{signal:t}:{}})}recordTelemetry(e,t){return this.request("/telemetry",{method:"POST",body:{events:e},...t?{signal:t}:{}})}verifyResult(e,t){return this.request(`/results/${encodeURIComponent(e)}`,t?{signal:t}:{})}async request(e,t){let r=new Headers({accept:"application/json","x-publishable-key":this.options.publishableKey}),i={method:t.method??"GET",headers:r};if(t.signal)i.signal=t.signal;if(t.body!==void 0)r.set("content-type","application/json"),i.body=JSON.stringify(t.body);let a=await this.fetcher(`${this.baseUrl}${this.prefix}${e}`,i);if(!a.ok){let s=await a.text(),n=s||null;try{n=s?JSON.parse(s):null}catch{}throw new fe({status:a.status,statusText:a.statusText,message:typeof n==="object"&&typeof n?.message==="string"?n.message:"WODira Boxes widget request failed.",payload:n})}let o=await a.text();return o?JSON.parse(o):void 0}}function Ge(e){return new Ye(e)}var At={es:{calendar:"Horario de clases",trial:"Prueba una clase",plans:"Planes",previous:"Semana anterior",next:"Semana siguiente",reserve:"Continuar",loading:"Cargando…",empty:"No hay opciones disponibles en estas fechas.",error:"No pudimos cargar este contenido. Inténtalo de nuevo.",available:"Disponible",last:"Últimas plazas",waitlist:"Lista de espera",full:"Completa",coach:"Coach",duration:"min",free:"Gratis",unlimited:"Ilimitado",email:"Tu email",privacy:"Acepto la política de privacidad de WODira y del box.",trialCta:"Continuar",chooseClass:"Elige una clase",result:"¡Todo listo! Tu solicitud se ha completado.",powered:"Tecnología de WODira",retry:"Reintentar",per:"por",credits:"créditos",once:"pago único",daily:"diario",weekly:"semanal",monthly:"mensual",yearly:"anual"},en:{calendar:"Class schedule",trial:"Try a class",plans:"Plans",previous:"Previous week",next:"Next week",reserve:"Continue",loading:"Loading…",empty:"No options are available for these dates.",error:"We could not load this content. Try again.",available:"Available",last:"Last spots",waitlist:"Waitlist",full:"Full",coach:"Coach",duration:"min",free:"Free",unlimited:"Unlimited",email:"Your email",privacy:"I accept WODira and the gym privacy policies.",trialCta:"Continue",chooseClass:"Choose a class",result:"All set! Your request is complete.",powered:"Powered by WODira",retry:"Retry",per:"per",credits:"credits",once:"one-time",daily:"daily",weekly:"weekly",monthly:"monthly",yearly:"yearly"},pt:{calendar:"Horário de aulas",trial:"Experimente uma aula",plans:"Planos",previous:"Semana anterior",next:"Semana seguinte",reserve:"Continuar",loading:"A carregar…",empty:"Não há opções disponíveis nestas datas.",error:"Não foi possível carregar. Tente novamente.",available:"Disponível",last:"Últimas vagas",waitlist:"Lista de espera",full:"Lotada",coach:"Coach",duration:"min",free:"Grátis",unlimited:"Ilimitado",email:"O seu email",privacy:"Aceito as políticas de privacidade da WODira e do box.",trialCta:"Continuar",chooseClass:"Escolha uma aula",result:"Tudo pronto! O seu pedido foi concluído.",powered:"Tecnologia WODira",retry:"Tentar novamente",per:"por",credits:"créditos",once:"pagamento único",daily:"diário",weekly:"semanal",monthly:"mensal",yearly:"anual"}};function q(e){let r=(e==="auto"||!e?document.documentElement.lang||navigator.language:e).toLowerCase().split("-")[0];return r==="en"||r==="pt"?r:"es"}function d(e,t){return At[q(e)][t]}var be=j`
17
17
  :host {
18
18
  color: var(--wodira-box-text, var(--wodira-color-text, #17132e));
19
19
  display: block;
@@ -563,7 +563,7 @@ Please use the static 'html' tag function. See https://lit.dev/docs/templates/ex
563
563
  outline: 2px solid Highlight;
564
564
  }
565
565
  }
566
- `;var sr=["stack","grid","card","event-card","event-list","pricing-cards","pricing-card","registration-form","registration-layout","registration-fields","registration-title","availability","legal-signature","checkout-sidebar","summary","summary-row","summary-total","button","submit","secondary","text-button","input","select","textarea","checkbox","label","title","price","meta","hint","description","description-heading","description-list","image","error","field-error","loader","empty","success","waiver","supplement","eligibility-summary","participant-mode","participant-mode-button","deferred-participant-hint","gender-composition","composition-options","composition-option","tier-list","tier-row","tier-heading","tier-name","tier-price","badge","current-tier","read-more","event-card-description","event-card-description-full","purchaser-grid","participant","guest-registration","terms","selected","active","current","retry","inline-code","tier-meta","field","athlete","deferred","athlete-grid","custom-fields","custom-fields-grid","custom-field","supplements","guest-registrations","add-guest","guest-grid","remove-guest","guest-athlete","guest-supplements","waivers","guest-summary-row"].join(","),Z=["shell","widget-shell","hero","widget-hero","cover","box-cover","logo","box-logo","brand","brand-name","title","body","widget-body","toolbar","nav-button","button","grid","card","card-heading","card-title","meta","badge","price","features","field","input","choice","legal","state","loader","error","success","footer","retry","class-cta","trial-cta","plan-cta","class-card","class-meta","availability","calendar-toolbar","previous","next","empty","class-grid","plans-grid","plan-card","trial-form","choices","trial-class-grid","trial-choice","email","legal-choice"].join(",");var At={AVAILABLE:"available",LAST_SPOTS:"last",WAITLIST:"waitlist",FULL:"full"};class O extends T{static properties={publishableKey:{type:String,attribute:"publishable-key"},installationId:{type:String,attribute:"installation-id"},baseUrl:{type:String,attribute:"base-url"},locale:{type:String},context:{state:!0},loading:{state:!0},error:{state:!0},resultMessage:{state:!0}};static styles=[be,ye];client=null;abortController=null;didInitialLoad=!1;pendingResultToken="";constructor(){super();this.publishableKey="",this.installationId="",this.baseUrl="",this.locale="auto",this.context=null,this.loading=!0,this.error="",this.resultMessage=""}firstUpdated(){this.pendingResultToken=this.consumeResult(),this.refresh()}disconnectedCallback(){this.abortController?.abort(),super.disconnectedCallback()}updated(e){if(!this.didInitialLoad){this.didInitialLoad=!0;return}if((e.has("publishableKey")||e.has("installationId")||e.has("baseUrl"))&&this.didInitialLoad)this.refresh();if(this.context)this.style.setProperty("--_wodira-box-brand-primary",this.context.box.theme.primary),this.style.setProperty("--_wodira-box-brand-accent",this.context.box.theme.secondary)}async refresh(){if(!this.publishableKey||!this.installationId){this.loading=!1,this.error="publishable-key and installation-id are required.";return}this.abortController?.abort(),this.abortController=new AbortController,this.loading=!0,this.error="";try{if(this.client=Ge({publishableKey:this.publishableKey,installationId:this.installationId,...this.baseUrl?{baseUrl:this.baseUrl}:{}}),this.context=await this.client.getContext(this.abortController.signal),this.pendingResultToken)await this.verifyResultWithRetry(this.pendingResultToken,this.abortController.signal),this.pendingResultToken="",this.resultMessage=d(this.locale,"result");if(this.locale==="auto")this.locale=this.context.locale;await this.loadData(this.abortController.signal),this.telemetry("IMPRESSION")}catch(e){if(e instanceof Error&&e.name==="AbortError")return;this.error=e instanceof Error?e.message:d(this.locale,"error")}finally{this.loading=!1}}frame(e,t){let r=this.context;return c`
566
+ `;var sr=["stack","grid","card","event-card","event-list","pricing-cards","pricing-card","registration-form","registration-layout","registration-fields","registration-title","availability","legal-signature","checkout-sidebar","summary","summary-row","summary-total","button","submit","secondary","text-button","input","select","textarea","checkbox","label","title","price","meta","hint","description","description-heading","description-list","image","error","field-error","loader","empty","success","waiver","supplement","eligibility-summary","participant-mode","participant-mode-button","deferred-participant-hint","gender-composition","composition-options","composition-option","tier-list","tier-row","tier-heading","tier-name","tier-price","badge","current-tier","read-more","event-card-description","event-card-description-full","purchaser-grid","participant","guest-registration","terms","selected","active","current","retry","inline-code","tier-meta","field","athlete","deferred","athlete-grid","custom-fields","custom-fields-grid","custom-field","supplements","guest-registrations","add-guest","guest-grid","remove-guest","guest-athlete","guest-supplements","waivers","guest-summary-row"].join(","),Z=["shell","widget-shell","hero","widget-hero","cover","box-cover","logo","box-logo","brand","brand-name","title","body","widget-body","toolbar","nav-button","button","grid","card","card-heading","card-title","meta","badge","price","features","field","input","choice","legal","state","loader","error","success","footer","retry","class-cta","trial-cta","plan-cta","class-card","class-meta","availability","calendar-toolbar","previous","next","empty","class-grid","plans-grid","plan-card","trial-form","choices","trial-class-grid","trial-choice","email","legal-choice"].join(",");var Rt={AVAILABLE:"available",LAST_SPOTS:"last",WAITLIST:"waitlist",FULL:"full"};class D extends T{static properties={publishableKey:{type:String,attribute:"publishable-key"},installationId:{type:String,attribute:"installation-id"},baseUrl:{type:String,attribute:"base-url"},locale:{type:String},context:{state:!0},loading:{state:!0},error:{state:!0},resultMessage:{state:!0}};static styles=[be,ye];client=null;abortController=null;didInitialLoad=!1;pendingResultToken="";constructor(){super();this.publishableKey="",this.installationId="",this.baseUrl="",this.locale="auto",this.context=null,this.loading=!0,this.error="",this.resultMessage=""}firstUpdated(){this.pendingResultToken=this.consumeResult(),this.refresh()}disconnectedCallback(){this.abortController?.abort(),super.disconnectedCallback()}updated(e){if(!this.didInitialLoad){this.didInitialLoad=!0;return}if((e.has("publishableKey")||e.has("installationId")||e.has("baseUrl"))&&this.didInitialLoad)this.refresh();if(this.context)this.style.setProperty("--_wodira-box-brand-primary",this.context.box.theme.primary),this.style.setProperty("--_wodira-box-brand-accent",this.context.box.theme.secondary)}async refresh(){if(!this.publishableKey||!this.installationId){this.loading=!1,this.error="publishable-key and installation-id are required.";return}this.abortController?.abort(),this.abortController=new AbortController,this.loading=!0,this.error="";try{if(this.client=Ge({publishableKey:this.publishableKey,installationId:this.installationId,...this.baseUrl?{baseUrl:this.baseUrl}:{}}),this.context=await this.client.getContext(this.abortController.signal),this.pendingResultToken)await this.verifyResultWithRetry(this.pendingResultToken,this.abortController.signal),this.pendingResultToken="",this.resultMessage=d(this.locale,"result");if(this.locale==="auto")this.locale=this.context.locale;await this.loadData(this.abortController.signal),this.telemetry("IMPRESSION")}catch(e){if(e instanceof Error&&e.name==="AbortError")return;this.error=e instanceof Error?e.message:d(this.locale,"error")}finally{this.loading=!1}}frame(e,t){let r=this.context;return c`
567
567
  <section part="shell widget-shell" aria-busy=${this.loading?"true":"false"}>
568
568
  <slot name="header"></slot>
569
569
  ${r?c`<header part="hero widget-hero" ?data-cover=${Boolean(r.box.coverUrl)}>
@@ -596,7 +596,7 @@ Please use the static 'html' tag function. See https://lit.dev/docs/templates/ex
596
596
  <div part="meta class-meta"><time datetime=${e.startsAt}>${i}</time></div>
597
597
  </div>
598
598
  <span part="badge availability" data-status=${e.availability}>
599
- ${d(this.locale,At[e.availability])}
599
+ ${d(this.locale,Rt[e.availability])}
600
600
  </span>
601
601
  </div>
602
602
  <div part="meta">
@@ -610,7 +610,7 @@ Please use the static 'html' tag function. See https://lit.dev/docs/templates/ex
610
610
  <button part="button class-cta" type="button" ?disabled=${a} @click=${t}>
611
611
  ${d(this.locale,"reserve")}
612
612
  </button>
613
- </article>`}emit(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}async startFlow(e,t,r={}){if(!this.client)return;let i=await this.client.createFlow({intent:e,targetId:t,idempotencyKey:[this.installationId,e,t,r.privacyVersion??"none",Je()].join(":"),...r,...Xe()});if(i.continuationUrl)globalThis.location.assign(i.continuationUrl)}telemetry(e,t){if(!this.client)return Promise.resolve();return this.client.recordTelemetry([{id:ee(),kind:e,widgetKind:this.widgetKind(),...t?{entityId:t}:{},sessionId:Je(),occurredAt:new Date().toISOString(),...Xe()}]).then(()=>{return}).catch(()=>{return})}syncStructuredData(e){let t=this.querySelector("script[data-wodira-widget-jsonld]");if(!t)t=document.createElement("script"),t.type="application/ld+json",t.dataset.wodiraWidgetJsonld="",this.append(t);t.textContent=JSON.stringify(e).replaceAll("<","\\u003c")}consumeResult(){try{let e=new URL(globalThis.location.href),t=e.searchParams.get("wodira_widget_result")??"";if(!t)return"";return e.searchParams.delete("wodira_widget_result"),globalThis.history?.replaceState({},"",e),t}catch{return""}}async verifyResultWithRetry(e,t){if(!this.client)return;let r;for(let i=0;i<10;i+=1)try{await this.client.verifyResult(e,t);return}catch(a){if(r=a,t.aborted||i===9)break;await new Promise((o,s)=>{let n=globalThis.setTimeout(o,1000);t.addEventListener("abort",()=>{globalThis.clearTimeout(n),s(new DOMException("Aborted","AbortError"))},{once:!0})})}throw r}}class we extends O{static properties={...O.properties,calendar:{state:!0},week:{state:!0}};constructor(){super();this.calendar=null,this.week=0}widgetKind(){return"CALENDAR"}async loadData(e){let t=new Date;t.setDate(t.getDate()+this.week*7),this.calendar=await this.client?.getCalendar(t,1,e)??null,this.syncStructuredData({"@context":"https://schema.org","@type":"SportsActivityLocation",name:this.context?.box.name,event:this.calendar?.classes.map((r)=>({"@type":"SportsEvent",name:r.name,startDate:r.startsAt,location:r.location?{"@type":"Place",name:r.location}:void 0}))})}changeWeek(e){this.week=Math.min(3,Math.max(0,this.week+e)),this.refresh()}choose(e){this.emit("wodira:box-class-selected",{installationId:this.installationId,classId:e.id}),this.telemetry("CLASS_SELECTED",e.id),this.startFlow("RESERVE_CLASS",e.id)}render(){return this.frame(d(this.locale,"calendar"),c`
613
+ </article>`}emit(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}async startFlow(e,t,r={}){if(!this.client)return;let i=await this.client.createFlow({intent:e,targetId:t,idempotencyKey:[this.installationId,e,t,r.privacyVersion??"none",Je()].join(":"),...r,...Xe()});if(i.continuationUrl)globalThis.location.assign(i.continuationUrl)}telemetry(e,t){if(!this.client)return Promise.resolve();return this.client.recordTelemetry([{id:ee(),kind:e,widgetKind:this.widgetKind(),...t?{entityId:t}:{},sessionId:Je(),occurredAt:new Date().toISOString(),...Xe()}]).then(()=>{return}).catch(()=>{return})}syncStructuredData(e){let t=this.querySelector("script[data-wodira-widget-jsonld]");if(!t)t=document.createElement("script"),t.type="application/ld+json",t.dataset.wodiraWidgetJsonld="",this.append(t);t.textContent=JSON.stringify(e).replaceAll("<","\\u003c")}consumeResult(){try{let e=new URL(globalThis.location.href),t=e.searchParams.get("wodira_widget_result")??"";if(!t)return"";return e.searchParams.delete("wodira_widget_result"),globalThis.history?.replaceState({},"",e),t}catch{return""}}async verifyResultWithRetry(e,t){if(!this.client)return;let r;for(let i=0;i<10;i+=1)try{await this.client.verifyResult(e,t);return}catch(a){if(r=a,t.aborted||i===9)break;await new Promise((o,s)=>{let n=globalThis.setTimeout(o,1000);t.addEventListener("abort",()=>{globalThis.clearTimeout(n),s(new DOMException("Aborted","AbortError"))},{once:!0})})}throw r}}class we extends D{static properties={...D.properties,calendar:{state:!0},week:{state:!0}};constructor(){super();this.calendar=null,this.week=0}widgetKind(){return"CALENDAR"}async loadData(e){let t=new Date;t.setDate(t.getDate()+this.week*7),this.calendar=await this.client?.getCalendar(t,1,e)??null,this.syncStructuredData({"@context":"https://schema.org","@type":"SportsActivityLocation",name:this.context?.box.name,event:this.calendar?.classes.map((r)=>({"@type":"SportsEvent",name:r.name,startDate:r.startsAt,location:r.location?{"@type":"Place",name:r.location}:void 0}))})}changeWeek(e){this.week=Math.min(3,Math.max(0,this.week+e)),this.refresh()}choose(e){this.emit("wodira:box-class-selected",{installationId:this.installationId,classId:e.id}),this.telemetry("CLASS_SELECTED",e.id),this.startFlow("RESERVE_CLASS",e.id)}render(){return this.frame(d(this.locale,"calendar"),c`
614
614
  <div part="toolbar calendar-toolbar">
615
615
  <button
616
616
  part="nav-button previous"
@@ -632,7 +632,7 @@ Please use the static 'html' tag function. See https://lit.dev/docs/templates/ex
632
632
  ${this.calendar?.classes.length?c`<div part="grid class-grid">
633
633
  ${this.calendar.classes.map((e)=>this.classCard(e,()=>this.choose(e)))}
634
634
  </div>`:c`<div part="state empty">${d(this.locale,"empty")}</div>`}
635
- `)}}class xe extends O{static properties={...O.properties,plans:{state:!0}};constructor(){super();this.plans=null}widgetKind(){return"PLANS"}async loadData(e){this.plans=await this.client?.getPlans(e)??null,this.syncStructuredData({"@context":"https://schema.org","@type":"ItemList",itemListElement:this.plans?.plans.map((t,r)=>({"@type":"Offer",position:r+1,name:t.name,price:t.price,priceCurrency:t.currency}))})}choose(e){this.emit("wodira:box-plan-selected",{installationId:this.installationId,planId:e.id}),this.telemetry("PLAN_SELECTED",e.id),this.startFlow("BUY_PLAN",e.id)}render(){let e=q(this.locale);return this.frame(d(this.locale,"plans"),c`
635
+ `)}}class xe extends D{static properties={...D.properties,plans:{state:!0}};constructor(){super();this.plans=null}widgetKind(){return"PLANS"}async loadData(e){this.plans=await this.client?.getPlans(e)??null,this.syncStructuredData({"@context":"https://schema.org","@type":"ItemList",itemListElement:this.plans?.plans.map((t,r)=>({"@type":"Offer",position:r+1,name:t.name,price:t.price,priceCurrency:t.currency}))})}choose(e){this.emit("wodira:box-plan-selected",{installationId:this.installationId,planId:e.id}),this.telemetry("PLAN_SELECTED",e.id),this.startFlow("BUY_PLAN",e.id)}render(){let e=q(this.locale);return this.frame(d(this.locale,"plans"),c`
636
636
  ${this.plans?.plans.length?c`<div part="grid plans-grid">
637
637
  ${this.plans.plans.map((t)=>c` <article part="card plan-card">
638
638
  <div>
@@ -657,7 +657,7 @@ Please use the static 'html' tag function. See https://lit.dev/docs/templates/ex
657
657
  </button>
658
658
  </article>`)}
659
659
  </div>`:c`<div part="state empty">${d(this.locale,"empty")}</div>`}
660
- `)}}class _e extends O{static properties={...O.properties,trials:{state:!0},selectedClassId:{state:!0},email:{state:!0},privacyAccepted:{state:!0},submitting:{state:!0},formError:{state:!0}};constructor(){super();this.trials=null,this.selectedClassId="",this.email="",this.privacyAccepted=!1,this.submitting=!1,this.formError=""}widgetKind(){return"TRIAL"}async loadData(e){this.trials=await this.client?.getTrialClasses(e)??null,this.selectedClassId=this.trials?.classes[0]?.id??""}async submit(e){if(e.preventDefault(),!this.email.includes("@")||!this.selectedClassId||!this.privacyAccepted||!this.context){this.formError=d(this.locale,"error");return}this.submitting=!0,this.formError="",this.emit("wodira:box-trial-selected",{installationId:this.installationId,classId:this.selectedClassId}),this.telemetry("TRIAL_SELECTED",this.selectedClassId);try{let t=e.currentTarget,r=String(new FormData(t).get("website")??"");await this.startFlow("START_TRIAL",this.selectedClassId,{email:this.email,privacyAccepted:!0,privacyVersion:this.context.legal.acceptanceVersion,website:r})}catch(t){this.formError=t instanceof Error?t.message:d(this.locale,"error")}finally{this.submitting=!1}}render(){return this.frame(d(this.locale,"trial"),c`
660
+ `)}}class _e extends D{static properties={...D.properties,trials:{state:!0},selectedClassId:{state:!0},email:{state:!0},privacyAccepted:{state:!0},submitting:{state:!0},formError:{state:!0}};constructor(){super();this.trials=null,this.selectedClassId="",this.email="",this.privacyAccepted=!1,this.submitting=!1,this.formError=""}widgetKind(){return"TRIAL"}async loadData(e){this.trials=await this.client?.getTrialClasses(e)??null,this.selectedClassId=this.trials?.classes[0]?.id??""}async submit(e){if(e.preventDefault(),!this.email.includes("@")||!this.selectedClassId||!this.privacyAccepted||!this.context){this.formError=d(this.locale,"error");return}this.submitting=!0,this.formError="",this.emit("wodira:box-trial-selected",{installationId:this.installationId,classId:this.selectedClassId}),this.telemetry("TRIAL_SELECTED",this.selectedClassId);try{let t=e.currentTarget,r=String(new FormData(t).get("website")??"");await this.startFlow("START_TRIAL",this.selectedClassId,{email:this.email,privacyAccepted:!0,privacyVersion:this.context.legal.acceptanceVersion,website:r})}catch(t){this.formError=t instanceof Error?t.message:d(this.locale,"error")}finally{this.submitting=!1}}render(){return this.frame(d(this.locale,"trial"),c`
661
661
  ${this.trials?.enabled&&this.trials.classes.length?c`<form part="trial-form" @submit=${this.submit}>
662
662
  <fieldset part="field choices">
663
663
  <legend>${d(this.locale,"chooseClass")}</legend>