@circlesquare/embedding-next 1.0.1 → 2.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.
package/README.md CHANGED
@@ -1,106 +1,119 @@
1
1
  # @circlesquare/embedding-next
2
2
 
3
- Next.js components for embedding your clubs events and court availability.
3
+ React components that put your club's CircleSquare events and court availability on your
4
+ Next.js site, in your club's colours, corners and typeface.
4
5
 
5
6
  ## Installation
6
7
 
7
8
  ```bash
8
9
  npm install @circlesquare/embedding-next
9
- # or
10
- yarn add @circlesquare/embedding-next
11
10
  ```
12
11
 
13
- ## Usage
14
-
15
- All components must be used in client components. Add `'use client'` at the top of your file.
12
+ React 18 or later. The components are client components (`'use client'`), so a Server Component
13
+ page can render them directly.
16
14
 
17
- ### Config Provider (Optional)
15
+ ## Usage
18
16
 
19
17
  ```tsx
20
- 'use client'
21
- import { CircleSquareEmbeddingConfigProvider } from '@circlesquare/embedding-next'
22
-
23
- export default function RootLayout({ children }) {
18
+ import {
19
+ CircleSquareEmbeddingConfigProvider,
20
+ CSCourtAvailability,
21
+ CSEvents,
22
+ CsEventType,
23
+ } from '@circlesquare/embedding-next'
24
+
25
+ export default function ClubPage() {
24
26
  return (
25
27
  <CircleSquareEmbeddingConfigProvider
26
28
  merchantId="your-merchant-id"
27
- backgroundColor="#FFFFFF"
28
- language="en"
29
+ accentColor="#B33E25"
30
+ fontFamily="Poppins"
29
31
  >
30
- <>{children}</>
32
+ <h2>Book a court</h2>
33
+ <CSCourtAvailability sportIds={[1]} />
34
+ <h2>Events</h2>
35
+ <CSEvents eventTypes={[CsEventType.OpenPlay, CsEventType.Training]} />
31
36
  </CircleSquareEmbeddingConfigProvider>
32
37
  )
33
38
  }
34
39
  ```
35
- _Note: When using React 19 wrapping children with `<></>` might be required_
36
40
 
37
- #### Provider Config
38
- - `merchantId` (required): Your CircleSquare merchant ID
39
- - `backgroundColor` (optional): Background color for the embedded content
40
- - `language` (optional): Language of the embedded content (en / de). Will otherwise be selected automatically.
41
+ The provider is optional: every option it takes, a component takes too, and a component's own
42
+ value wins. A component left without `merchantId` (or, for events, without `hostId`) renders
43
+ nothing and says why in the console.
41
44
 
42
- ### Events Component
45
+ ## Options
43
46
 
44
- ```tsx
45
- 'use client'
46
- import { CSEvents, CsEventType } from "@circlesquare/embedding-next";
47
+ ### Content
47
48
 
48
- export default function EventsPage() {
49
- return (
50
- <div>
51
- <h1>Events</h1>
52
- <CSEvents
53
- merchantId="your-merchant-id"
54
- eventTypes={[CsEventType.OpenPlay, CsEventType.Training]}
55
- backgroundColor="#F5F5F5"
56
- />
57
- </div>
58
- )
59
- }
60
- ```
49
+ | Option | Where | What |
50
+ | ------------ | --------------------------------- | ------------------------------------------------------------------------ |
51
+ | `merchantId` | provider, both | Your club. Required, except for an organizer's events listed by `hostId` |
52
+ | `hostId` | `CSEvents` | The organizer whose events are listed |
53
+ | `eventTypes` | `CSEvents` | The kinds of event to list (`CsEventType`); all of them by default |
54
+ | `sportIds` | `CSEvents`, `CSCourtAvailability` | The sports to show; all of the club's by default |
55
+ | `language` | provider, both | `en` or `de`; without it, the visitor's language |
61
56
 
62
- #### CSEvents Config
63
- - `merchantId` (optional if in provider): Your CircleSquare merchant ID
64
- - `hostId` (optional): Filter events by host ID
65
- - `backgroundColor` (optional): Background color for the embedded content
66
- - `language` (optional): Language of the embedded content (en / de). Will otherwise be selected automatically.
67
- - `eventTypes` (optional): Array of event types to filter
68
- - `OpenPlay`
69
- - `Training`
70
- - `Other`
71
- - `League`
72
- - `Americano`
73
- - `AmericanoTournament`
74
- - `KnockOutTournament`
75
- - `RoundRobinTournament`
76
- - `className` (optional): Additional CSS class for the container
77
- - `fallback` (optional): A component to display in case the embedding iframe can not be loaded or displayed. If not provided, the default component will be used.
78
- - `timeoutMs` (optional): Time after which the fallback component is displayed. Defaults to 3000 (3 seconds)
79
-
80
-
81
- ### Court Availability Component
57
+ ### Look
82
58
 
83
- ```tsx
84
- 'use client'
85
- import { CSCourtAvailability } from '@circlesquare/embedding-next'
59
+ Every colour is any CSS colour: hex, a colour function or a name. The widget mixes everything
60
+ else it paints (secondary text, lines, hover, the unavailable cells) from these, and keeps its
61
+ own colour for a value it cannot read; your browser's console then says which.
86
62
 
87
- export default function CourtsPage() {
88
- return (
89
- <div>
90
- <h1>Court Availability</h1>
91
- <CSCourtAvailability
92
- merchantId="your-merchant-id"
93
- backgroundColor="#F5F5F5"
94
- />
95
- </div>
96
- )
97
- }
63
+ | Option | What |
64
+ | ----------------- | ---------------------------------------------------------------------------------------------------- |
65
+ | `appearance` | `light` (default) or `dark`, for a dark site |
66
+ | `backgroundColor` | The page behind the widget; `transparent` lets your page show through |
67
+ | `surfaceColor` | The widget's own surface, such as the court grid's card and a popover |
68
+ | `textColor` | The text |
69
+ | `accentColor` | Your club's colour: your booking, the chosen slot, the main button, focus |
70
+ | `accentTextColor` | The text on the accent; black or white, whichever reads on the accent, by default |
71
+ | `eventColor` | The events in the court grid |
72
+ | `borderRadius` | A card's corner: a number of pixels or a length in `px` or `rem` |
73
+ | `fontFamily` | One of Barlow, DM Sans, Inter, Lato, Manrope, Montserrat, Nunito, Open Sans, Oswald, Poppins, Roboto |
74
+
75
+ The frame cannot use the fonts of your page, so the typeface has to be one CircleSquare serves.
76
+
77
+ ### Behaviour
78
+
79
+ | Option | Where | What |
80
+ | ----------- | ----- | --------------------------------------------------------------------------------------- |
81
+ | `className` | both | A class for the element that holds the frame |
82
+ | `fallback` | both | Shown instead of the default notice when the frame does not show in time |
83
+ | `timeoutMs` | both | How long the frame may take to show before the fallback replaces it; 8000 ms by default |
84
+
85
+ A frame that has not shown after `timeoutMs` (CircleSquare unreachable, a blocker, your site's
86
+ content security policy) gives way to a notice, in your look, with a link to your club on
87
+ CircleSquare. The frame keeps loading behind it and replaces the notice once it shows. A content
88
+ security policy needs `frame-src https://circlesquare.app`.
89
+
90
+ ## Changes in 2.0
91
+
92
+ - The look: `appearance`, `surfaceColor`, `textColor`, `accentColor`, `accentTextColor`,
93
+ `eventColor`, `borderRadius` and `fontFamily`, in the provider or on each component.
94
+ - `sportIds` on both components; `hostId` alone lists an organizer's events.
95
+ - `CsEventType.Tournament` and `CsEventType.LevelingSession`.
96
+ - `CsEventType.KnockOutTournament` is gone.
97
+ - The frame stays behind the fallback notice until it shows, and replaces the notice then.
98
+ The default `timeoutMs` is 8000 instead of 3000.
99
+ - `className` goes on the element that holds the frame, not on the iframe itself.
100
+ - The package is an ES module with an `exports` map, and needs no `next` peer.
101
+
102
+ ## Developing
103
+
104
+ The package lives in CircleSquare's monorepo, in `apps/universal/packages/published/embedding-next`,
105
+ next to the pages it frames. It imports nothing from the workspace.
106
+
107
+ ```bash
108
+ cd apps/universal/packages/published/embedding-next
109
+ pnpm test && pnpm typecheck && pnpm lint
110
+ pnpm build # dist/, what npm receives
111
+ pnpm pack # look at the tarball: package.json takes its exports from publishConfig
112
+ pnpm publish # needs a login to the @circlesquare scope on npm
98
113
  ```
99
114
 
100
- #### CSCourtAvailability Config
101
- - `merchantId` (optional if in provider): Your CircleSquare merchant ID
102
- - `language` (optional): Language of the embedded content (en / de). Will otherwise be selected automatically.
103
- - `backgroundColor` (optional): Background color for the embedded content
104
- - `className` (optional): Additional CSS class for the container
105
- - `fallback` (optional): A component to display in case the embedding iframe can not be loaded or displayed. If not provided, the default component will be used.
106
- - `timeoutMs` (optional): Time after which the fallback component is displayed. Defaults to 3000 (3 seconds)
115
+ The option names, their parameters and the height message are the framed page's contract
116
+ (`apps/universal/apps/web/src/lib/embed.ts`, `embed-theme.ts`), shared with the loader a club
117
+ pastes (`apps/universal/apps/web/public/assets/scripts/embed.js`). Change the three together;
118
+ `apps/universal/apps/web/src/lib/embed-package.test.tsx` reads this package's address with the
119
+ page's parsers.
@@ -0,0 +1,6 @@
1
+ import { type EmbeddedFrameOptions } from './embedded-frame.js';
2
+ import type { CsCourtAvailabilityConfig } from './types.js';
3
+ export interface CSCourtAvailabilityProps extends CsCourtAvailabilityConfig, EmbeddedFrameOptions {
4
+ }
5
+ /** The club's courts, bookable by the day, framed from CircleSquare. */
6
+ export declare function CSCourtAvailability({ className, fallback, timeoutMs, ...own }: CSCourtAvailabilityProps): import("react").JSX.Element | null;
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useEffect } from 'react';
4
+ import { EmbeddedFrame } from './embedded-frame.js';
5
+ import { mergeConfig, useCircleSquareEmbeddingConfig } from './embedding-config.js';
6
+ /** The club's courts, bookable by the day, framed from CircleSquare. */
7
+ export function CSCourtAvailability({ className, fallback, timeoutMs, ...own }) {
8
+ const config = mergeConfig(useCircleSquareEmbeddingConfig(), own);
9
+ const hasClub = Boolean(config.merchantId);
10
+ useEffect(() => {
11
+ if (!hasClub)
12
+ console.error('[CircleSquare] merchantId is required for court availability');
13
+ }, [hasClub]);
14
+ if (!hasClub)
15
+ return null;
16
+ return (_jsx(EmbeddedFrame, { widget: "courts", config: config, className: className, fallback: fallback, timeoutMs: timeoutMs }));
17
+ }
@@ -0,0 +1,6 @@
1
+ import { type EmbeddedFrameOptions } from './embedded-frame.js';
2
+ import type { CsEventsConfig } from './types.js';
3
+ export interface CSEventsProps extends CsEventsConfig, EmbeddedFrameOptions {
4
+ }
5
+ /** The club's events, or an organizer's with `hostId`, framed from CircleSquare. */
6
+ export declare function CSEvents({ className, fallback, timeoutMs, ...own }: CSEventsProps): import("react").JSX.Element | null;
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useEffect } from 'react';
4
+ import { EmbeddedFrame } from './embedded-frame.js';
5
+ import { mergeConfig, useCircleSquareEmbeddingConfig } from './embedding-config.js';
6
+ /** The club's events, or an organizer's with `hostId`, framed from CircleSquare. */
7
+ export function CSEvents({ className, fallback, timeoutMs, ...own }) {
8
+ const config = mergeConfig(useCircleSquareEmbeddingConfig(), own);
9
+ const hasOwner = Boolean(config.merchantId || config.hostId);
10
+ useEffect(() => {
11
+ if (!hasOwner)
12
+ console.error('[CircleSquare] merchantId or hostId is required for events');
13
+ }, [hasOwner]);
14
+ if (!hasOwner)
15
+ return null;
16
+ return (_jsx(EmbeddedFrame, { widget: "events", config: config, className: className, fallback: fallback, timeoutMs: timeoutMs }));
17
+ }
@@ -0,0 +1,16 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type EmbeddedWidget, type FrameConfig } from './frame-url.js';
3
+ export declare const DEFAULT_TIMEOUT_MS = 8000;
4
+ export interface EmbeddedFrameOptions {
5
+ /** A class for the element that holds the frame, or the notice in its place. */
6
+ className?: string;
7
+ /** Shown instead of the default notice when the frame does not show in time. */
8
+ fallback?: ReactNode;
9
+ /** How long a frame may take to report its height before the fallback shows. */
10
+ timeoutMs?: number;
11
+ }
12
+ /** One framed page on the host's page, as tall as its content. */
13
+ export declare function EmbeddedFrame({ widget, config, className, fallback, timeoutMs, }: EmbeddedFrameOptions & {
14
+ widget: EmbeddedWidget;
15
+ config: FrameConfig;
16
+ }): import("react").JSX.Element;
@@ -0,0 +1,88 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useEffect, useId, useRef, useState } from 'react';
4
+ import { FallbackNotice } from './fallback-notice.js';
5
+ import { getConfigWarning, getFrameUrl } from './frame-url.js';
6
+ /* A FRAME THAT DOES NOT SHOW, because our site is down, the visitor's
7
+ network or a blocker drops it, or the host's policy forbids frames,
8
+ leaves an empty box where the club sells its courts. A frame shows once
9
+ it reports its height, so a frame that has not done so in time gives way
10
+ to a notice with a link to the club on CircleSquare. The frame keeps
11
+ loading behind the notice and replaces it when it reports, so the wait is
12
+ the loader's: a slow phone sees the notice only when the frame would keep
13
+ it waiting long. */
14
+ export const DEFAULT_TIMEOUT_MS = 8000;
15
+ /* What the frame posts whenever its content resizes (apps/web/src/lib/embed.ts). */
16
+ const isSetHeightMessage = (data, containerId) => {
17
+ if (typeof data !== 'object' || data === null)
18
+ return false;
19
+ const message = data;
20
+ return (message.type === 'setHeight' &&
21
+ message.containerId === containerId &&
22
+ typeof message.height === 'number' &&
23
+ Number.isFinite(message.height));
24
+ };
25
+ const isBrowserColour = (value) => typeof CSS === 'undefined' || CSS.supports('color', value);
26
+ /** One framed page on the host's page, as tall as its content. */
27
+ export function EmbeddedFrame({ widget, config, className, fallback, timeoutMs = DEFAULT_TIMEOUT_MS, }) {
28
+ const containerId = useId();
29
+ const frameUrl = getFrameUrl({ widget, containerId, config });
30
+ const { href, origin } = frameUrl;
31
+ const frameRef = useRef(null);
32
+ const [height, setHeight] = useState();
33
+ const [hasTimedOut, setHasTimedOut] = useState(false);
34
+ const configWarning = getConfigWarning(config, { isColour: isBrowserColour });
35
+ useEffect(() => {
36
+ if (configWarning)
37
+ console.warn(configWarning);
38
+ }, [configWarning]);
39
+ useEffect(() => {
40
+ const fallbackTimer = window.setTimeout(() => {
41
+ console.warn(`[CircleSquare] the ${widget} frame did not show within ${timeoutMs} ms, linking to CircleSquare instead`);
42
+ setHasTimedOut(true);
43
+ }, timeoutMs);
44
+ /* The host's window receives every message on its page, the host's own
45
+ included: only a height message from this very frame, sent by the
46
+ origin it was loaded from and naming this container, is ours. */
47
+ const handleMessage = (event) => {
48
+ if (event.source !== frameRef.current?.contentWindow || event.origin !== origin)
49
+ return;
50
+ if (!isSetHeightMessage(event.data, containerId))
51
+ return;
52
+ window.clearTimeout(fallbackTimer);
53
+ setHasTimedOut(false);
54
+ setHeight(event.data.height);
55
+ };
56
+ /* A press on the host's page never reaches the frame's document, so a
57
+ popover open in the frame would stay open: the frame is told of every
58
+ click, in the capture phase, so a host's handler that stops the click
59
+ cannot keep it from the frame. */
60
+ const handleHostPress = () => frameRef.current?.contentWindow?.postMessage({ type: 'hostPress' }, origin);
61
+ window.addEventListener('message', handleMessage);
62
+ document.addEventListener('click', handleHostPress, true);
63
+ /* The frame reports its height when it first lays out and then only
64
+ when it resizes, so it loads once this listens: a frame in the
65
+ server's HTML could report before the host's page hydrates, and that
66
+ report would be lost. Setting the same address again would reload it. */
67
+ const frame = frameRef.current;
68
+ if (frame && frame.src !== href)
69
+ frame.src = href;
70
+ return () => {
71
+ window.clearTimeout(fallbackTimer);
72
+ window.removeEventListener('message', handleMessage);
73
+ document.removeEventListener('click', handleHostPress, true);
74
+ };
75
+ }, [href, origin, containerId, widget, timeoutMs]);
76
+ return (_jsxs("div", { className: className, style: { width: '100%' }, children: [_jsx("iframe", { ref: frameRef, style: {
77
+ display: 'block',
78
+ width: '100%',
79
+ border: 'none',
80
+ height: hasTimedOut ? 0 : height,
81
+ /* The framed page's root is light in both appearances, a dark frame
82
+ dark from <body> down (apps/web/src/lib/embed-theme.ts). An iframe
83
+ in another scheme than its document gets an opaque canvas, which
84
+ hides the host's page behind it, so the iframe stays light on a
85
+ host that declares itself dark too. */
86
+ colorScheme: 'light',
87
+ } }), hasTimedOut && (fallback ?? _jsx(FallbackNotice, { widget: widget, config: config }))] }));
88
+ }
@@ -0,0 +1,10 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { CsEmbeddingBaseConfig } from './types.js';
3
+ /** The configuration the nearest provider shares, or null outside one. */
4
+ export declare const useCircleSquareEmbeddingConfig: () => CsEmbeddingBaseConfig | null;
5
+ export interface CircleSquareEmbeddingConfigProviderProps extends CsEmbeddingBaseConfig {
6
+ children: ReactNode;
7
+ }
8
+ /** The configuration every widget below shares, the club's look included; a widget's own props win. */
9
+ export declare function CircleSquareEmbeddingConfigProvider({ children, ...config }: CircleSquareEmbeddingConfigProviderProps): import("react").JSX.Element;
10
+ export declare function mergeConfig<T extends CsEmbeddingBaseConfig>(shared: CsEmbeddingBaseConfig | null, own: T): T;
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { createContext, useContext } from 'react';
4
+ const CircleSquareEmbeddingConfigContext = createContext(null);
5
+ /** The configuration the nearest provider shares, or null outside one. */
6
+ export const useCircleSquareEmbeddingConfig = () => useContext(CircleSquareEmbeddingConfigContext)?.config ?? null;
7
+ /** The configuration every widget below shares, the club's look included; a widget's own props win. */
8
+ export function CircleSquareEmbeddingConfigProvider({ children, ...config }) {
9
+ return (_jsx(CircleSquareEmbeddingConfigContext.Provider, { value: { config }, children: children }));
10
+ }
11
+ /* An option a widget leaves undefined keeps the provider's, as the old
12
+ package had it; the loader's `Object.assign` would let an explicit
13
+ `undefined` erase it, which a React prop passed through often is. */
14
+ export function mergeConfig(shared, own) {
15
+ const defined = Object.fromEntries(Object.entries(own).filter(([, value]) => value !== undefined));
16
+ return { ...shared, ...defined };
17
+ }
@@ -0,0 +1,9 @@
1
+ import { type EmbeddedWidget, type FrameConfig } from './frame-url.js';
2
+ /**
3
+ * What a frame that does not show is replaced with: a link to the club on CircleSquare, in the
4
+ * host's look as far as its options give it.
5
+ */
6
+ export declare function FallbackNotice({ widget, config }: {
7
+ widget: EmbeddedWidget;
8
+ config: FrameConfig;
9
+ }): import("react").JSX.Element;
@@ -0,0 +1,76 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { getFallbackUrl } from './frame-url.js';
4
+ const FALLBACK_TEXTS = {
5
+ courts: {
6
+ en: {
7
+ title: 'Court availability cannot be displayed',
8
+ text: 'You can still book your court directly on CircleSquare.',
9
+ action: 'Book a court on CircleSquare',
10
+ },
11
+ de: {
12
+ title: 'Die Platzverfügbarkeit kann nicht angezeigt werden',
13
+ text: 'Du kannst deinen Platz aber direkt bei CircleSquare buchen.',
14
+ action: 'Platz bei CircleSquare buchen',
15
+ },
16
+ },
17
+ events: {
18
+ en: {
19
+ title: 'Events cannot be displayed',
20
+ text: 'You can find all our events directly on CircleSquare.',
21
+ action: 'View events on CircleSquare',
22
+ },
23
+ de: {
24
+ title: 'Events können nicht angezeigt werden',
25
+ text: 'Alle unsere Events findest du direkt bei CircleSquare.',
26
+ action: 'Events bei CircleSquare anzeigen',
27
+ },
28
+ },
29
+ };
30
+ /* The kit's ink, its text and its primary button, for a host that sets neither. */
31
+ const KIT_INK = '#10261E';
32
+ /* The notice shows only after a timeout, in the browser, so it may read the visitor's language. */
33
+ const getTexts = (widget, config) => {
34
+ const language = (config.language || window.navigator.language || '').slice(0, 2).toLowerCase();
35
+ return FALLBACK_TEXTS[widget][language === 'de' ? 'de' : 'en'];
36
+ };
37
+ /* A bare number is pixels, as the framed page reads `borderRadius`. */
38
+ const toRadius = (radius) => typeof radius === 'number' || /^\d+(\.\d+)?$/.test(radius ?? '') ? `${radius}px` : radius;
39
+ /* Inline, as everything here, to hold against the host's rules for `p` and `a`. */
40
+ const PARAGRAPH = { color: 'inherit', fontFamily: 'inherit', lineHeight: 1.4 };
41
+ /**
42
+ * What a frame that does not show is replaced with: a link to the club on CircleSquare, in the
43
+ * host's look as far as its options give it.
44
+ */
45
+ export function FallbackNotice({ widget, config }) {
46
+ const texts = getTexts(widget, config);
47
+ const radius = toRadius(config.borderRadius);
48
+ const accent = config.accentColor || KIT_INK;
49
+ return (_jsxs("div", { "data-circlesquare-fallback": "", style: {
50
+ boxSizing: 'border-box',
51
+ display: 'flex',
52
+ flexDirection: 'column',
53
+ alignItems: 'center',
54
+ gap: 8,
55
+ padding: '32px 24px',
56
+ textAlign: 'center',
57
+ border: '1px solid rgba(128, 128, 128, 0.3)',
58
+ borderRadius: radius || 12,
59
+ background: config.surfaceColor || config.backgroundColor || 'transparent',
60
+ color: config.textColor || (config.appearance === 'dark' ? '#FFFFFF' : KIT_INK),
61
+ fontFamily: config.fontFamily ? `"${config.fontFamily}", system-ui, sans-serif` : 'inherit',
62
+ }, children: [_jsx("p", { style: { ...PARAGRAPH, margin: 0, fontSize: 18, fontWeight: 700 }, children: texts.title }), _jsx("p", { style: { ...PARAGRAPH, margin: '0 0 8px', fontSize: 15, opacity: 0.75 }, children: texts.text }), _jsx("a", { href: getFallbackUrl({ widget, config }).href, target: "_blank", rel: "noopener", style: {
63
+ display: 'inline-block',
64
+ padding: '10px 20px',
65
+ borderRadius: radius || 999,
66
+ background: accent,
67
+ color: '#FFFFFF',
68
+ fontFamily: 'inherit',
69
+ fontSize: 15,
70
+ fontWeight: 700,
71
+ lineHeight: 1.4,
72
+ textDecoration: 'none',
73
+ }, children: _jsx("span", { style: {
74
+ color: config.accentTextColor || `oklch(from ${accent} clamp(0, (0.62 - l) * 1000, 1) 0 0)`,
75
+ }, children: texts.action }) })] }));
76
+ }
@@ -0,0 +1,30 @@
1
+ import type { CsEventsConfig } from './types.js';
2
+ export declare const DEFAULT_CS_BASE_URL = "https://circlesquare.app";
3
+ export type EmbeddedWidget = 'courts' | 'events';
4
+ /** A widget's configuration once the provider's and the component's are merged. */
5
+ export type FrameConfig = CsEventsConfig;
6
+ /**
7
+ * The frame's address. `csEmbedded` told the Angular site during server rendering that it was
8
+ * framed; the universal app knows it from the path and leaves it alone.
9
+ */
10
+ export declare function getFrameUrl({ widget, containerId, config, }: {
11
+ widget: EmbeddedWidget;
12
+ containerId: string;
13
+ config: FrameConfig;
14
+ }): URL;
15
+ /**
16
+ * Where the fallback notice sends a visitor: the club's page on the tab the widget stands for, or
17
+ * the events on CircleSquare for an organizer's list.
18
+ */
19
+ export declare function getFallbackUrl({ widget, config }: {
20
+ widget: EmbeddedWidget;
21
+ config: FrameConfig;
22
+ }): URL;
23
+ /**
24
+ * What the host asked for that the frame will not show, as one console warning, or null. The page
25
+ * leaves out a colour it cannot read and keeps the kit's own; the host's browser says so here,
26
+ * before the host wonders why the club's colour does not show. `isColour` is the browser's check.
27
+ */
28
+ export declare function getConfigWarning(config: FrameConfig, { isColour }: {
29
+ isColour: (value: string) => boolean;
30
+ }): string | null;
@@ -0,0 +1,78 @@
1
+ /* Until circlesquare.app serves the universal app, the Angular site answers
2
+ here, and it ignores the theme options it does not know. */
3
+ export const DEFAULT_CS_BASE_URL = 'https://circlesquare.app';
4
+ const WIDGET_PATHS = {
5
+ courts: '/embedded/court-availability',
6
+ events: '/embedded/events',
7
+ };
8
+ const SUPPORTED_LANGUAGES = ['en', 'de'];
9
+ /** Each theme option by the parameter the framed page reads. */
10
+ const THEME_PARAMETERS = {
11
+ appearance: 'appearance',
12
+ surfaceColor: 'surface',
13
+ textColor: 'text',
14
+ accentColor: 'accent',
15
+ accentTextColor: 'accentText',
16
+ eventColor: 'event',
17
+ borderRadius: 'radius',
18
+ fontFamily: 'font',
19
+ };
20
+ const COLOUR_OPTIONS = ['surfaceColor', 'textColor', 'accentColor', 'accentTextColor', 'eventColor'];
21
+ const getBaseUrl = (config) => config.csBaseUrl || DEFAULT_CS_BASE_URL;
22
+ /* A plain JavaScript caller can pass any string as the language. */
23
+ const isSupportedLanguage = (language) => SUPPORTED_LANGUAGES.includes(language.toLowerCase());
24
+ /* A configured language goes in front of the path, which is how the pages
25
+ are served per language; without one, or with one the pages do not
26
+ have, the page negotiates the language from the visitor. */
27
+ const getLocalizedPath = (path, { language }) => language && isSupportedLanguage(language) ? `/${language.toLowerCase()}${path}` : path;
28
+ const joinList = (values) => (values ?? []).map(String).join(',');
29
+ /**
30
+ * The frame's address. `csEmbedded` told the Angular site during server rendering that it was
31
+ * framed; the universal app knows it from the path and leaves it alone.
32
+ */
33
+ export function getFrameUrl({ widget, containerId, config, }) {
34
+ const url = new URL(getLocalizedPath(WIDGET_PATHS[widget], config), getBaseUrl(config));
35
+ const append = (name, value) => {
36
+ if (value)
37
+ url.searchParams.append(name, value);
38
+ };
39
+ append('containerId', containerId);
40
+ append('csEmbedded', 'true');
41
+ append('hostId', config.hostId);
42
+ append('clubId', config.merchantId);
43
+ append('eventTypes', joinList(config.eventTypes));
44
+ append('sportIds', joinList(config.sportIds));
45
+ append('background', config.backgroundColor);
46
+ for (const [option, parameter] of Object.entries(THEME_PARAMETERS)) {
47
+ const value = config[option];
48
+ if (value !== undefined && value !== null)
49
+ append(parameter, String(value));
50
+ }
51
+ return url;
52
+ }
53
+ /**
54
+ * Where the fallback notice sends a visitor: the club's page on the tab the widget stands for, or
55
+ * the events on CircleSquare for an organizer's list.
56
+ */
57
+ export function getFallbackUrl({ widget, config }) {
58
+ const path = config.merchantId ? `/clubs/${encodeURIComponent(config.merchantId)}` : '/events';
59
+ const url = new URL(getLocalizedPath(path, config), getBaseUrl(config));
60
+ if (config.merchantId)
61
+ url.searchParams.set('tab', widget === 'courts' ? 'booking' : 'events');
62
+ return url;
63
+ }
64
+ /**
65
+ * What the host asked for that the frame will not show, as one console warning, or null. The page
66
+ * leaves out a colour it cannot read and keeps the kit's own; the host's browser says so here,
67
+ * before the host wonders why the club's colour does not show. `isColour` is the browser's check.
68
+ */
69
+ export function getConfigWarning(config, { isColour }) {
70
+ const warnings = COLOUR_OPTIONS.flatMap((option) => {
71
+ const value = config[option];
72
+ return value && !isColour(value) ? [`${option} "${value}" is not a colour, leaving the widget's own`] : [];
73
+ });
74
+ if (config.language && !isSupportedLanguage(config.language)) {
75
+ warnings.push(`unsupported language "${config.language}", falling back to automatic selection`);
76
+ }
77
+ return warnings.length ? warnings.map((warning) => `[CircleSquare] ${warning}`).join('\n') : null;
78
+ }
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- export * from './types';
2
- export * from './CsEmbeddingConfigProvider';
3
- export * from './CsEvents';
4
- export * from './CsCourtAvailability';
1
+ export * from './types.js';
2
+ export { CircleSquareEmbeddingConfigProvider, useCircleSquareEmbeddingConfig, type CircleSquareEmbeddingConfigProviderProps, } from './embedding-config.js';
3
+ export { CSEvents, type CSEventsProps } from './cs-events.js';
4
+ export { CSCourtAvailability, type CSCourtAvailabilityProps } from './cs-court-availability.js';
5
+ export { DEFAULT_TIMEOUT_MS } from './embedded-frame.js';
6
+ export { DEFAULT_CS_BASE_URL } from './frame-url.js';
package/dist/index.js CHANGED
@@ -1,4 +1,6 @@
1
- export * from './types';
2
- export * from './CsEmbeddingConfigProvider';
3
- export * from './CsEvents';
4
- export * from './CsCourtAvailability';
1
+ export * from './types.js';
2
+ export { CircleSquareEmbeddingConfigProvider, useCircleSquareEmbeddingConfig, } from './embedding-config.js';
3
+ export { CSEvents } from './cs-events.js';
4
+ export { CSCourtAvailability } from './cs-court-availability.js';
5
+ export { DEFAULT_TIMEOUT_MS } from './embedded-frame.js';
6
+ export { DEFAULT_CS_BASE_URL } from './frame-url.js';
package/dist/types.d.ts CHANGED
@@ -1,24 +1,55 @@
1
+ /** The kinds of event the list can be limited to, as the API spells them. */
1
2
  export declare enum CsEventType {
2
- KnockOutTournament = "KNOCKOUT_TOURNAMENT",
3
+ OpenPlay = "OPEN_PLAY",
4
+ Training = "TRAINING",
5
+ League = "LEAGUE",
6
+ Tournament = "TOURNAMENT",
3
7
  RoundRobinTournament = "ROUND_ROBIN_TOURNAMENT",
4
8
  AmericanoTournament = "AMERICANO_TOURNAMENT",
5
9
  Americano = "AMERICANO",
6
- OpenPlay = "OPEN_PLAY",
7
- Training = "TRAINING",
8
- Other = "OTHER",
9
- League = "LEAGUE"
10
+ LevelingSession = "LEVELING_SESSION",
11
+ Other = "OTHER"
12
+ }
13
+ export type CsLanguage = 'en' | 'de';
14
+ export type CsAppearance = 'light' | 'dark';
15
+ /** The typefaces the framed page serves itself; a frame cannot use the fonts of the page around it. */
16
+ export type CsFontFamily = 'Barlow' | 'DM Sans' | 'Inter' | 'Lato' | 'Manrope' | 'Montserrat' | 'Nunito' | 'Open Sans' | 'Oswald' | 'Poppins' | 'Roboto';
17
+ /** The club's look. Every colour is any CSS colour: hex, a colour function or a name. */
18
+ export interface CsEmbeddingTheme {
19
+ /** The look the rest follows: `dark` for a dark site. Light by default. */
20
+ appearance?: CsAppearance;
21
+ /** The widget's own surface, such as the court grid's card and a popover. */
22
+ surfaceColor?: string;
23
+ /** The text; secondary text, lines and the unavailable cells are mixed from it. */
24
+ textColor?: string;
25
+ /** The club's colour: your booking, the chosen slot, the main button, focus. */
26
+ accentColor?: string;
27
+ /** The text on the accent; without it, black or white, whichever reads on the accent. */
28
+ accentTextColor?: string;
29
+ /** The events in the court grid. */
30
+ eventColor?: string;
31
+ /** A card's corner: a number of pixels or a CSS length in `px` or `rem`. */
32
+ borderRadius?: number | string;
33
+ fontFamily?: CsFontFamily;
10
34
  }
11
- export interface CsEmbeddingBaseConfig {
35
+ export interface CsEmbeddingBaseConfig extends CsEmbeddingTheme {
36
+ /** The club. */
12
37
  merchantId?: string;
38
+ /** The page behind the widget, any CSS colour; the widget's surface by default. */
13
39
  backgroundColor?: string;
14
- language?: 'en' | 'de';
40
+ /** Without one, the framed page picks the visitor's language. */
41
+ language?: CsLanguage;
42
+ /** Where the framed pages are served: `https://circlesquare.app` by default. */
15
43
  csBaseUrl?: string;
16
44
  }
17
45
  export interface CsEventsConfig extends CsEmbeddingBaseConfig {
46
+ /** The organizer whose events are listed; replaces `merchantId` for an organizer's own list. */
18
47
  hostId?: string;
19
48
  eventTypes?: CsEventType[];
49
+ sportIds?: number[];
20
50
  }
21
51
  export interface CsCourtAvailabilityConfig extends CsEmbeddingBaseConfig {
52
+ sportIds?: number[];
22
53
  }
23
54
  export interface CircleSquareEmbeddingConfigContextType {
24
55
  config: CsEmbeddingBaseConfig;
package/dist/types.js CHANGED
@@ -1,11 +1,18 @@
1
+ /* WHAT A CLUB'S SITE PASSES TO THE FRAMES. The option names are the loader's
2
+ (apps/web/public/assets/scripts/embed.js), so a club that moves between
3
+ the loader and this package keeps its configuration. The framed page reads
4
+ them as apps/web/src/lib/embed.ts and lib/embed-theme.ts describe, and
5
+ leaves out a value it cannot read. */
6
+ /** The kinds of event the list can be limited to, as the API spells them. */
1
7
  export var CsEventType;
2
8
  (function (CsEventType) {
3
- CsEventType["KnockOutTournament"] = "KNOCKOUT_TOURNAMENT";
9
+ CsEventType["OpenPlay"] = "OPEN_PLAY";
10
+ CsEventType["Training"] = "TRAINING";
11
+ CsEventType["League"] = "LEAGUE";
12
+ CsEventType["Tournament"] = "TOURNAMENT";
4
13
  CsEventType["RoundRobinTournament"] = "ROUND_ROBIN_TOURNAMENT";
5
14
  CsEventType["AmericanoTournament"] = "AMERICANO_TOURNAMENT";
6
15
  CsEventType["Americano"] = "AMERICANO";
7
- CsEventType["OpenPlay"] = "OPEN_PLAY";
8
- CsEventType["Training"] = "TRAINING";
16
+ CsEventType["LevelingSession"] = "LEVELING_SESSION";
9
17
  CsEventType["Other"] = "OTHER";
10
- CsEventType["League"] = "LEAGUE";
11
18
  })(CsEventType || (CsEventType = {}));
package/package.json CHANGED
@@ -1,28 +1,7 @@
1
1
  {
2
2
  "name": "@circlesquare/embedding-next",
3
- "private": false,
4
- "version": "1.0.1",
5
- "description": "Next.js components for embedding your CircleSquare events and court availability",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "scripts": {
9
- "build": "tsc",
10
- "prepare": "npm run build"
11
- },
12
- "peerDependencies": {
13
- "next": ">=13.0.0",
14
- "react": ">=18.0.0",
15
- "react-dom": ">=18.0.0"
16
- },
17
- "devDependencies": {
18
- "@types/node": "^20.0.0",
19
- "@types/react": "^18.0.0",
20
- "@types/react-dom": "^18.0.0",
21
- "typescript": "^5.0.0"
22
- },
23
- "files": [
24
- "dist"
25
- ],
3
+ "version": "2.0.0",
4
+ "description": "React components for Next.js that embed a club's CircleSquare events and court availability, in the club's look",
26
5
  "keywords": [
27
6
  "circlesquare",
28
7
  "embedding",
@@ -30,5 +9,41 @@
30
9
  "react"
31
10
  ],
32
11
  "author": "CircleSquare",
33
- "license": "MIT"
34
- }
12
+ "license": "MIT",
13
+ "type": "module",
14
+ "sideEffects": false,
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "import": "./dist/index.js"
19
+ }
20
+ },
21
+ "files": [
22
+ "dist"
23
+ ],
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "peerDependencies": {
28
+ "react": ">=18.0.0"
29
+ },
30
+ "devDependencies": {
31
+ "@circlesquare/config": "0.0.0",
32
+ "@testing-library/react": "^16.3.3",
33
+ "@types/react": "~19.2.4",
34
+ "eslint": "^10.10.0",
35
+ "jsdom": "^30.1.1",
36
+ "react": "19.2.3",
37
+ "react-dom": "19.2.3",
38
+ "typescript": "~6.0.3",
39
+ "vitest": "^5.0.0"
40
+ },
41
+ "scripts": {
42
+ "typecheck": "tsc -p tsconfig.json",
43
+ "lint": "eslint .",
44
+ "test": "vitest run",
45
+ "build": "rm -rf dist && tsc -p tsconfig.build.json"
46
+ },
47
+ "main": "./dist/index.js",
48
+ "types": "./dist/index.d.ts"
49
+ }
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { CsCourtAvailabilityConfig } from './types';
3
- interface CSCourtAvailabilityProps extends CsCourtAvailabilityConfig {
4
- className?: string;
5
- fallback?: React.ReactNode;
6
- timeoutMs?: number;
7
- }
8
- export declare const CSCourtAvailability: React.FC<CSCourtAvailabilityProps>;
9
- export {};
@@ -1,80 +0,0 @@
1
- 'use client';
2
- import React, { useEffect, useId, useState, useRef } from 'react';
3
- import { useCircleSquareEmbeddingConfig } from './CsEmbeddingConfigProvider';
4
- import { getBaseUrlWithLanguage } from './utils';
5
- export var CSCourtAvailability = function (_a) {
6
- var merchantId = _a.merchantId, backgroundColor = _a.backgroundColor, csBaseUrl = _a.csBaseUrl, language = _a.language, className = _a.className, fallback = _a.fallback, _b = _a.timeoutMs, timeoutMs = _b === void 0 ? 3000 : _b;
7
- var containerId = useId();
8
- var context = useCircleSquareEmbeddingConfig();
9
- var _c = useState(), iframeUrl = _c[0], setIframeUrl = _c[1];
10
- var _d = useState(), height = _d[0], setHeight = _d[1];
11
- var _e = useState('loading'), status = _e[0], setStatus = _e[1];
12
- var timerRef = useRef();
13
- useEffect(function () {
14
- var finalConfig = {
15
- merchantId: merchantId || (context === null || context === void 0 ? void 0 : context.merchantId),
16
- backgroundColor: backgroundColor || (context === null || context === void 0 ? void 0 : context.backgroundColor),
17
- csBaseUrl: csBaseUrl || (context === null || context === void 0 ? void 0 : context.csBaseUrl) || 'https://circlesquare.app',
18
- };
19
- if (!finalConfig.merchantId) {
20
- console.error('[CircleSquare] merchantId is required');
21
- setStatus('error');
22
- return;
23
- }
24
- var url = new URL("".concat(getBaseUrlWithLanguage(finalConfig.csBaseUrl, language || (context === null || context === void 0 ? void 0 : context.language)), "/embedded/court-availability"));
25
- url.searchParams.append('clubId', finalConfig.merchantId);
26
- url.searchParams.append('containerId', containerId);
27
- if (finalConfig.backgroundColor) {
28
- url.searchParams.append('background', finalConfig.backgroundColor);
29
- }
30
- setIframeUrl(url.toString());
31
- // start our timeout
32
- timerRef.current = window.setTimeout(function () {
33
- if (status === 'loading') {
34
- console.warn('[CircleSquare] iframe didn’t respond in time');
35
- setStatus('error');
36
- }
37
- }, timeoutMs);
38
- // message listener
39
- var handleMessage = function (event) {
40
- if (event.origin !== finalConfig.csBaseUrl)
41
- return;
42
- if (event.data.type === 'setHeight' && event.data.containerId === containerId) {
43
- clearTimeout(timerRef.current);
44
- setHeight(event.data.height);
45
- setStatus('ready');
46
- }
47
- };
48
- window.addEventListener('message', handleMessage);
49
- return function () {
50
- clearTimeout(timerRef.current);
51
- window.removeEventListener('message', handleMessage);
52
- };
53
- }, [
54
- merchantId,
55
- backgroundColor,
56
- csBaseUrl,
57
- context === null || context === void 0 ? void 0 : context.merchantId,
58
- context === null || context === void 0 ? void 0 : context.backgroundColor,
59
- context === null || context === void 0 ? void 0 : context.csBaseUrl,
60
- containerId,
61
- timeoutMs,
62
- ]);
63
- if (status === 'error' || !iframeUrl) {
64
- return <div className={className}>{fallback ? fallback : <Fallback csBaseUrl={csBaseUrl || 'https://circlesquare.app'} merchantId={merchantId || (context === null || context === void 0 ? void 0 : context.merchantId)} backgroundColor={backgroundColor || (context === null || context === void 0 ? void 0 : context.backgroundColor)} language={language || (context === null || context === void 0 ? void 0 : context.language)}/>}</div>;
65
- }
66
- return (<iframe className={className} src={iframeUrl} style={{ width: '100%', border: 'none', height: height }} onError={function () { return setStatus('error'); }}/>);
67
- };
68
- function Fallback(_a) {
69
- var csBaseUrl = _a.csBaseUrl, merchantId = _a.merchantId, backgroundColor = _a.backgroundColor, language = _a.language;
70
- var title = language === 'de' ? 'Verfügbarkeit kann nicht angezeigt werden' : 'Unable to display court availability';
71
- var description = language === 'de' ? 'Bitte klicken unten, um einen Platz direkt über CircleSquare zu buchen.' : 'Please click the button below to book a court via CircleSquare directly.';
72
- var buttonText = language === 'de' ? 'Platz über CircleSquare buchen' : 'Book a court via CircleSquare';
73
- return <div style={{ width: '100%', minHeight: 200, display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', backgroundColor: backgroundColor, padding: '2rem' }}>
74
- <p style={{ marginBottom: '0.5rem', fontSize: '1.2rem', fontWeight: 'bold', color: '#000' }}>{title}</p>
75
- <p style={{ marginBottom: '1rem', color: '#000' }}>{description}</p>
76
- <a href={"".concat(getBaseUrlWithLanguage(csBaseUrl, language), "/clubs/").concat(merchantId)} style={{ display: 'block', width: 'fit-content', padding: '10px 20px', backgroundColor: '#007A70', color: '#fff', borderRadius: '5px', textDecoration: 'none', fontWeight: 'semibold', cursor: 'pointer' }}>
77
- <span>{buttonText}</span>
78
- </a>
79
- </div>;
80
- }
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { CsEmbeddingBaseConfig } from './types';
3
- export declare const useCircleSquareEmbeddingConfig: () => CsEmbeddingBaseConfig | null;
4
- interface CircleSquareEmbeddingConfigProviderProps {
5
- children: React.ReactNode;
6
- merchantId: string;
7
- backgroundColor?: string;
8
- csBaseUrl?: string;
9
- language?: 'en' | 'de';
10
- }
11
- export declare const CircleSquareEmbeddingConfigProvider: React.FC<CircleSquareEmbeddingConfigProviderProps>;
12
- export {};
@@ -1,22 +0,0 @@
1
- 'use client';
2
- import React, { createContext, useContext } from 'react';
3
- var CircleSquareEmbeddingConfigContext = createContext(null);
4
- export var useCircleSquareEmbeddingConfig = function () {
5
- var context = useContext(CircleSquareEmbeddingConfigContext);
6
- if (!context) {
7
- return null;
8
- }
9
- return context.config;
10
- };
11
- export var CircleSquareEmbeddingConfigProvider = function (_a) {
12
- var children = _a.children, merchantId = _a.merchantId, backgroundColor = _a.backgroundColor, _b = _a.csBaseUrl, csBaseUrl = _b === void 0 ? 'https://circlesquare.app' : _b, language = _a.language;
13
- var config = {
14
- merchantId: merchantId,
15
- backgroundColor: backgroundColor,
16
- csBaseUrl: csBaseUrl,
17
- language: language,
18
- };
19
- return (<CircleSquareEmbeddingConfigContext.Provider value={{ config: config }}>
20
- {children}
21
- </CircleSquareEmbeddingConfigContext.Provider>);
22
- };
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { CsEventsConfig } from './types';
3
- interface CSEventsProps extends CsEventsConfig {
4
- className?: string;
5
- /** Render this instead of the iframe if something goes wrong */
6
- fallback?: React.ReactNode;
7
- /** How long (ms) to wait for a height postMessage before erroring */
8
- timeoutMs?: number;
9
- }
10
- export declare const CSEvents: React.FC<CSEventsProps>;
11
- export {};
package/dist/CsEvents.jsx DELETED
@@ -1,94 +0,0 @@
1
- 'use client';
2
- import React, { useEffect, useId, useState, useRef } from 'react';
3
- import { useCircleSquareEmbeddingConfig } from './CsEmbeddingConfigProvider';
4
- import { getBaseUrlWithLanguage } from './utils';
5
- export var CSEvents = function (_a) {
6
- var merchantId = _a.merchantId, hostId = _a.hostId, backgroundColor = _a.backgroundColor, csBaseUrl = _a.csBaseUrl, eventTypes = _a.eventTypes, className = _a.className, language = _a.language, fallback = _a.fallback, _b = _a.timeoutMs, timeoutMs = _b === void 0 ? 3000 : _b;
7
- var containerId = useId();
8
- var context = useCircleSquareEmbeddingConfig();
9
- // Computed iframe URL (or undefined if missing merchantId)
10
- var _c = useState(), iframeUrl = _c[0], setIframeUrl = _c[1];
11
- // Measured height from postMessage
12
- var _d = useState(), height = _d[0], setHeight = _d[1];
13
- // 'loading' → 'ready' → 'error'
14
- var _e = useState('loading'), status = _e[0], setStatus = _e[1];
15
- var timerRef = useRef();
16
- useEffect(function () {
17
- var finalConfig = {
18
- merchantId: merchantId || (context === null || context === void 0 ? void 0 : context.merchantId),
19
- hostId: hostId,
20
- backgroundColor: backgroundColor || (context === null || context === void 0 ? void 0 : context.backgroundColor),
21
- csBaseUrl: csBaseUrl || (context === null || context === void 0 ? void 0 : context.csBaseUrl) || 'https://circlesquare.app',
22
- };
23
- if (!finalConfig.merchantId) {
24
- console.error('[CircleSquare] merchantId is required for events');
25
- setStatus('error');
26
- return;
27
- }
28
- // Build URL
29
- var url = new URL("".concat(getBaseUrlWithLanguage(finalConfig.csBaseUrl, language || (context === null || context === void 0 ? void 0 : context.language)), "/embedded/events"));
30
- url.searchParams.append('clubId', finalConfig.merchantId);
31
- url.searchParams.append('containerId', containerId);
32
- if (finalConfig.hostId) {
33
- url.searchParams.append('hostId', finalConfig.hostId);
34
- }
35
- if (eventTypes) {
36
- url.searchParams.append('eventTypes', eventTypes.join(','));
37
- }
38
- if (finalConfig.backgroundColor) {
39
- url.searchParams.append('background', finalConfig.backgroundColor);
40
- }
41
- setIframeUrl(url.toString());
42
- // Kick off a timeout to catch silent failures/ad-blockers
43
- timerRef.current = window.setTimeout(function () {
44
- if (status === 'loading') {
45
- console.warn('[CircleSquare] events iframe did not respond in time');
46
- setStatus('error');
47
- }
48
- }, timeoutMs);
49
- // Listen for height postMessage
50
- var handleMessage = function (event) {
51
- if (event.origin !== finalConfig.csBaseUrl)
52
- return;
53
- if (event.data.type === 'setHeight' && event.data.containerId === containerId) {
54
- clearTimeout(timerRef.current);
55
- setHeight(event.data.height);
56
- setStatus('ready');
57
- }
58
- };
59
- window.addEventListener('message', handleMessage);
60
- return function () {
61
- clearTimeout(timerRef.current);
62
- window.removeEventListener('message', handleMessage);
63
- };
64
- }, [
65
- merchantId,
66
- hostId,
67
- backgroundColor,
68
- csBaseUrl,
69
- eventTypes,
70
- context === null || context === void 0 ? void 0 : context.merchantId,
71
- context === null || context === void 0 ? void 0 : context.backgroundColor,
72
- context === null || context === void 0 ? void 0 : context.csBaseUrl,
73
- containerId,
74
- timeoutMs,
75
- status,
76
- ]);
77
- if (status === 'error' || !iframeUrl) {
78
- return <div className={className}>{fallback ? fallback : <Fallback csBaseUrl={csBaseUrl || 'https://circlesquare.app'} merchantId={merchantId || (context === null || context === void 0 ? void 0 : context.merchantId)} backgroundColor={backgroundColor || (context === null || context === void 0 ? void 0 : context.backgroundColor)} language={language || (context === null || context === void 0 ? void 0 : context.language)}/>}</div>;
79
- }
80
- return (<iframe className={className} src={iframeUrl} style={{ width: '100%', border: 'none', height: height }} onError={function () { return setStatus('error'); }}/>);
81
- };
82
- function Fallback(_a) {
83
- var csBaseUrl = _a.csBaseUrl, merchantId = _a.merchantId, backgroundColor = _a.backgroundColor, language = _a.language;
84
- var title = language === 'de' ? 'Events können nicht angezeigt werden' : 'Unable to display events';
85
- var description = language === 'de' ? 'Bitte klicken unten, um alle unsere Events bei CircleSquare anzuzeigen.' : 'Please click the button below to view all our events on CircleSquare.';
86
- var buttonText = language === 'de' ? 'Events bei CircleSquare anzeigen' : 'View events on CircleSquare';
87
- return <div style={{ width: '100%', minHeight: 200, display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', backgroundColor: backgroundColor, padding: '2rem' }}>
88
- <p style={{ marginBottom: '0.5rem', fontSize: '1.2rem', fontWeight: 'bold', color: '#000' }}>{title}</p>
89
- <p style={{ marginBottom: '1rem', color: '#000' }}>{description}</p>
90
- <a href={"".concat(getBaseUrlWithLanguage(csBaseUrl, language), "/clubs/").concat(merchantId)} style={{ display: 'block', width: 'fit-content', padding: '10px 20px', backgroundColor: '#007A70', color: '#fff', borderRadius: '5px', textDecoration: 'none', fontWeight: 'semibold', cursor: 'pointer' }}>
91
- <span>{buttonText}</span>
92
- </a>
93
- </div>;
94
- }
@@ -1 +0,0 @@
1
- {"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/typescript/lib/lib.es2022.d.ts","../node_modules/typescript/lib/lib.es2023.d.ts","../node_modules/typescript/lib/lib.es2024.d.ts","../node_modules/typescript/lib/lib.esnext.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2016.intl.d.ts","../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/typescript/lib/lib.es2022.array.d.ts","../node_modules/typescript/lib/lib.es2022.error.d.ts","../node_modules/typescript/lib/lib.es2022.intl.d.ts","../node_modules/typescript/lib/lib.es2022.object.d.ts","../node_modules/typescript/lib/lib.es2022.string.d.ts","../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../node_modules/typescript/lib/lib.es2023.array.d.ts","../node_modules/typescript/lib/lib.es2023.collection.d.ts","../node_modules/typescript/lib/lib.es2023.intl.d.ts","../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../node_modules/typescript/lib/lib.es2024.collection.d.ts","../node_modules/typescript/lib/lib.es2024.object.d.ts","../node_modules/typescript/lib/lib.es2024.promise.d.ts","../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2024.string.d.ts","../node_modules/typescript/lib/lib.esnext.array.d.ts","../node_modules/typescript/lib/lib.esnext.collection.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../node_modules/typescript/lib/lib.esnext.promise.d.ts","../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../node_modules/typescript/lib/lib.esnext.float16.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/@types/react/global.d.ts","../node_modules/csstype/index.d.ts","../node_modules/@types/prop-types/index.d.ts","../node_modules/@types/react/index.d.ts","../src/types.ts","../src/csembeddingconfigprovider.tsx","../src/utils.ts","../src/cscourtavailability.tsx","../src/csevents.tsx","../src/index.ts","../node_modules/@types/node/compatibility/disposable.d.ts","../node_modules/@types/node/compatibility/indexable.d.ts","../node_modules/@types/node/compatibility/iterators.d.ts","../node_modules/@types/node/compatibility/index.d.ts","../node_modules/@types/node/globals.typedarray.d.ts","../node_modules/@types/node/buffer.buffer.d.ts","../node_modules/undici-types/header.d.ts","../node_modules/undici-types/readable.d.ts","../node_modules/undici-types/file.d.ts","../node_modules/undici-types/fetch.d.ts","../node_modules/undici-types/formdata.d.ts","../node_modules/undici-types/connector.d.ts","../node_modules/undici-types/client.d.ts","../node_modules/undici-types/errors.d.ts","../node_modules/undici-types/dispatcher.d.ts","../node_modules/undici-types/global-dispatcher.d.ts","../node_modules/undici-types/global-origin.d.ts","../node_modules/undici-types/pool-stats.d.ts","../node_modules/undici-types/pool.d.ts","../node_modules/undici-types/handlers.d.ts","../node_modules/undici-types/balanced-pool.d.ts","../node_modules/undici-types/agent.d.ts","../node_modules/undici-types/mock-interceptor.d.ts","../node_modules/undici-types/mock-agent.d.ts","../node_modules/undici-types/mock-client.d.ts","../node_modules/undici-types/mock-pool.d.ts","../node_modules/undici-types/mock-errors.d.ts","../node_modules/undici-types/proxy-agent.d.ts","../node_modules/undici-types/env-http-proxy-agent.d.ts","../node_modules/undici-types/retry-handler.d.ts","../node_modules/undici-types/retry-agent.d.ts","../node_modules/undici-types/api.d.ts","../node_modules/undici-types/interceptors.d.ts","../node_modules/undici-types/util.d.ts","../node_modules/undici-types/cookies.d.ts","../node_modules/undici-types/patch.d.ts","../node_modules/undici-types/websocket.d.ts","../node_modules/undici-types/eventsource.d.ts","../node_modules/undici-types/filereader.d.ts","../node_modules/undici-types/diagnostics-channel.d.ts","../node_modules/undici-types/content-type.d.ts","../node_modules/undici-types/cache.d.ts","../node_modules/undici-types/index.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/dom-events.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/readline/promises.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/sea.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/test.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/react-dom/index.d.ts"],"fileIdsList":[[96,135,138],[96,137,138],[138],[96,138,143,172],[96,138,139,144,150,151,158,169,180],[96,138,139,140,150,158],[96,138],[91,92,93,96,138],[96,138,141,181],[96,138,142,143,151,159],[96,138,143,169,177],[96,138,144,146,150,158],[96,137,138,145],[96,138,146,147],[96,138,150],[96,138,148,150],[96,137,138,150],[96,138,150,151,152,169,180],[96,138,150,151,152,165,169,172],[96,133,138,185],[96,138,146,150,153,158,169,180],[96,138,150,151,153,154,158,169,177,180],[96,138,153,155,169,177,180],[94,95,96,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186],[96,138,150,156],[96,138,157,180,185],[96,138,146,150,158,169],[96,138,159],[96,138,160],[96,137,138,161],[96,135,136,137,138,139,140,141,142,143,144,145,146,147,148,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186],[96,138,163],[96,138,164],[96,138,150,165,166],[96,138,165,167,181,183],[96,138,150,169,170,172],[96,138,171,172],[96,138,169,170],[96,138,172],[96,138,173],[96,135,138,169],[96,138,150,175,176],[96,138,175,176],[96,138,143,158,169,177],[96,138,178],[96,138,158,179],[96,138,153,164,180],[96,138,143,181],[96,138,169,182],[96,138,157,183],[96,138,184],[96,138,143,150,152,161,169,180,183,185],[96,138,169,186],[84,96,138],[81,82,83,96,138],[96,105,109,138,180],[96,105,138,169,180],[96,100,138],[96,102,105,138,177,180],[96,138,158,177],[96,138,187],[96,100,138,187],[96,102,105,138,158,180],[96,97,98,101,104,138,150,169,180],[96,105,112,138],[96,97,103,138],[96,105,126,127,138],[96,101,105,138,172,180,187],[96,126,138,187],[96,99,100,138,187],[96,105,138],[96,99,100,101,102,103,104,105,106,107,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,127,128,129,130,131,132,138],[96,105,120,138],[96,105,112,113,138],[96,103,105,113,114,138],[96,104,138],[96,97,100,105,138],[96,105,109,113,114,138],[96,109,138],[96,103,105,108,138,180],[96,97,102,105,112,138],[96,138,169],[96,100,105,126,138,185,187],[84,85,86,87,96,138],[84,85,96,138],[85,86,88,89,96,138]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"8bf8b5e44e3c9c36f98e1007e8b7018c0f38d8adc07aecef42f5200114547c70","impliedFormat":1},{"version":"092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763","affectsGlobalScope":true,"impliedFormat":1},{"version":"07f073f19d67f74d732b1adea08e1dc66b1b58d77cb5b43931dee3d798a2fd53","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"65ff5a0aefd7817a03c1ad04fee85c9cdd3ec415cc3c9efec85d8008d4d5e4ee","impliedFormat":1},{"version":"b2546f0fbeae6ef5e232c04100e1d8c49d36d1fff8e4755f663a3e3f06e7f2d6","affectsGlobalScope":true,"impliedFormat":1},{"version":"837dd9e0f6e2685a1b3f4486c8eadd0efe4ace4b42875a90faa90797d4656a31","signature":"3e791486b872495a6b6179ec1f4ac85a44546b58852d653b670cab29d9e53a50"},{"version":"7706ea180328d8f1f07283231b86b592a647bfeaa73bbcf8d73b97141446f70e","signature":"a10b82d3b99df215ff17b41389cc415111fe67cab30fa19d5dd161a310a168dc"},{"version":"c63238ae2cdb4211c55f6079e450e059273a289bf87f536a0d14c9da61d646de","signature":"82b7cb2d28b997442cb9144cfeb579bd9e46bb2fac0d9e0185e177e78cc800f4"},{"version":"86a0f36c4af3ed17f3e2154eee1be46649dde585f78093edd84795550dec8b03","signature":"4d0f931a58a985a43af6a941495a4bbc08f426d2179d99ce8f2c960297a6bf30"},{"version":"94590c404849742b41f791f14d0eaa2be823a9fd21294aea8def8b73e1585d2b","signature":"06057212bf06b828bab680b65bb146f24f85d34e06183cb6a98ed4ea1a49874e"},{"version":"61538db7145e995bfe8d751a00a79439c917f9a67270299003b6574c0d87456b","signature":"7ac8302921e4e4c4f29240dbce2d4ab9c726a4b022732815761d7bf3b7ed681f"},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b80c6175da9de59bace50a72c2d68490d4ab5b07016ff5367bc7ba33cf2f219","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"08faa97886e71757779428dd4c69a545c32c85fd629d1116d42710b32c6378bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b042aa5d277ad6963e2837179fd2f8fbb01968ac67115b0833c0244e93d1d50","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"3d77c73be94570813f8cadd1f05ebc3dc5e2e4fdefe4d340ca20cd018724ee36","impliedFormat":1},{"version":"23cfd70b42094e54cc3c5dab996d81b97e2b6f38ccb24ead85454b8ddfe2fc4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3e58c4c18a031cbb17abec7a4ad0bd5ae9fc70c1f4ba1e7fb921ad87c504aca","impliedFormat":1},{"version":"a3e8bafb2af8e850c644f4be7f5156cf7d23b7bfdc3b786bd4d10ed40329649c","impliedFormat":1},{"version":"35ec8b6760fd7138bbf5809b84551e31028fb2ba7b6dc91d95d098bf212ca8b4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4b87f767c7bc841511113c876a6b8bf1fd0cb0b718c888ad84478b372ec486b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d04e3640dd9eb67f7f1e5bd3d0bf96c784666f7aefc8ac1537af6f2d38d4c29","impliedFormat":1},{"version":"3c884d9d9ec454bdf0d5a0b8465bf8297d2caa4d853851d92cc417ac6f30b969","impliedFormat":1},{"version":"5a369483ac4cfbdf0331c248deeb36140e6907db5e1daed241546b4a2055f82c","impliedFormat":1},{"version":"e8f5b5cc36615c17d330eaf8eebbc0d6bdd942c25991f96ef122f246f4ff722f","impliedFormat":1},{"version":"f0bd7e6d931657b59605c44112eaf8b980ba7f957a5051ed21cb93d978cf2f45","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"0ada07543808f3b967624645a8e1ccd446f8b01ade47842acf1328aec899fed0","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a37b8d00d03f0381d2db2fe31b0571dc9d7cc0f4b87ca103cc3cd2277690ba0","impliedFormat":1},{"version":"71adf5dbc59568663d252a46179e71e4d544c053978bfc526d11543a3f716f42","impliedFormat":1},{"version":"38bf8ff1b403c861e9052c9ea651cb4f38c1ecc084a34d79f8acc6d6477a7321","impliedFormat":1},{"version":"93bd413918fa921c8729cef45302b24d8b6c7855d72d5bf82d3972595ae8dcbf","impliedFormat":1},{"version":"4ff41188773cbf465807dd2f7059c7494cbee5115608efc297383832a1150c43","impliedFormat":1},{"version":"dccdf1677e531e33f8ac961a68bc537418c9a414797c1ea7e91307501cdc3f5e","impliedFormat":1},{"version":"e184c4b8918ef56c8c9e68bd79f3f3780e2d0d75bf2b8a41da1509a40c2deb46","affectsGlobalScope":true,"impliedFormat":1},{"version":"d206b4baf4ddcc15d9d69a9a2f4999a72a2c6adeaa8af20fa7a9960816287555","impliedFormat":1},{"version":"93f437e1398a4f06a984f441f7fa7a9f0535c04399619b5c22e0b87bdee182cb","impliedFormat":1},{"version":"afbe24ab0d74694372baa632ecb28bb375be53f3be53f9b07ecd7fc994907de5","impliedFormat":1},{"version":"70731d10d5311bd4cf710ef7f6539b62660f4b0bfdbb3f9fbe1d25fe6366a7fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b19db3600a17af69d4f33d08cc7076a7d19fb65bb36e442cac58929ec7c9482","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e043a1bc8fbf2a255bccf9bf27e0f1caf916c3b0518ea34aa72357c0afd42ec","impliedFormat":1},{"version":"137c2894e8f3e9672d401cc0a305dc7b1db7c69511cf6d3970fb53302f9eae09","impliedFormat":1},{"version":"3bc2f1e2c95c04048212c569ed38e338873f6a8593930cf5a7ef24ffb38fc3b6","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"f9d9d753d430ed050dc1bf2667a1bab711ccbb1c1507183d794cc195a5b085cc","impliedFormat":1},{"version":"9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","impliedFormat":1},{"version":"ba1f814c22fd970255ddd60d61fb7e00c28271c933ab5d5cc19cd3ca66b8f57c","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093","impliedFormat":1},{"version":"295f068af94245ee9d780555351bef98adfd58f8baf0b9dadbc31a489b881f8b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1851a3b4db78664f83901bb9cac9e45e03a37bb5933cc5bf37e10bb7e91ab4eb","impliedFormat":1},{"version":"09d479208911ac3ac6a7c2fe86217fc1abe6c4f04e2d52e4890e500699eeab32","affectsGlobalScope":true,"impliedFormat":1},{"version":"12ed4559eba17cd977aa0db658d25c4047067444b51acfdcbf38470630642b23","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3ffabc95802521e1e4bcba4c88d8615176dc6e09111d920c7a213bdda6e1d65","impliedFormat":1},{"version":"4f029899f9bae07e225c43aef893590541b2b43267383bf5e32e3a884d219ed5","impliedFormat":1},{"version":"ae56f65caf3be91108707bd8dfbccc2a57a91feb5daabf7165a06a945545ed26","impliedFormat":1},{"version":"a136d5de521da20f31631a0a96bf712370779d1c05b7015d7019a9b2a0446ca9","impliedFormat":1},{"version":"5b566927cad2ed2139655d55d690ffa87df378b956e7fe1c96024c4d9f75c4cf","affectsGlobalScope":true,"impliedFormat":1},{"version":"bce947017cb7a2deebcc4f5ba04cead891ce6ad1602a4438ae45ed9aa1f39104","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3dffd70e6375b872f0b4e152de4ae682d762c61a24881ecc5eb9f04c5caf76f","impliedFormat":1},{"version":"e2c72c065a36bc9ab2a00ac6a6f51e71501619a72c0609defd304d46610487a4","impliedFormat":1},{"version":"d91a7d8b5655c42986f1bdfe2105c4408f472831c8f20cf11a8c3345b6b56c8c","impliedFormat":1},{"version":"616075a6ac578cf5a013ee12964188b4412823796ce0b202c6f1d2e4ca8480d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"e8a979b8af001c9fc2e774e7809d233c8ca955a28756f52ee5dee88ccb0611d2","impliedFormat":1},{"version":"cac793cc47c29e26e4ac3601dcb00b4435ebed26203485790e44f2ad8b6ad847","impliedFormat":1},{"version":"17ed71200119e86ccef2d96b73b02ce8854b76ad6bd21b5021d4269bec527b5f","impliedFormat":1}],"root":[[85,90]],"options":{"allowJs":true,"declaration":true,"esModuleInterop":true,"jsx":1,"module":99,"outDir":"./","skipLibCheck":true,"strict":true,"target":1},"referencedMap":[[135,1],[136,1],[137,2],[96,3],[138,4],[139,5],[140,6],[91,7],[94,8],[92,7],[93,7],[141,9],[142,10],[143,11],[144,12],[145,13],[146,14],[147,14],[149,15],[148,16],[150,17],[151,18],[152,19],[134,20],[95,7],[153,21],[154,22],[155,23],[187,24],[156,25],[157,26],[158,27],[159,28],[160,29],[161,30],[162,31],[163,32],[164,33],[165,34],[166,34],[167,35],[168,7],[169,36],[171,37],[170,38],[172,39],[173,40],[174,41],[175,42],[176,43],[177,44],[178,45],[179,46],[180,47],[181,48],[182,49],[183,50],[184,51],[185,52],[186,53],[83,7],[188,54],[81,7],[84,55],[82,7],[79,7],[80,7],[13,7],[14,7],[16,7],[15,7],[2,7],[17,7],[18,7],[19,7],[20,7],[21,7],[22,7],[23,7],[24,7],[3,7],[25,7],[26,7],[4,7],[27,7],[31,7],[28,7],[29,7],[30,7],[32,7],[33,7],[34,7],[5,7],[35,7],[36,7],[37,7],[38,7],[6,7],[42,7],[39,7],[40,7],[41,7],[43,7],[7,7],[44,7],[49,7],[50,7],[45,7],[46,7],[47,7],[48,7],[8,7],[54,7],[51,7],[52,7],[53,7],[55,7],[9,7],[56,7],[57,7],[58,7],[60,7],[59,7],[61,7],[62,7],[10,7],[63,7],[64,7],[65,7],[11,7],[66,7],[67,7],[68,7],[69,7],[70,7],[1,7],[71,7],[72,7],[12,7],[76,7],[74,7],[78,7],[73,7],[77,7],[75,7],[112,56],[122,57],[111,56],[132,58],[103,59],[102,60],[131,61],[125,62],[130,63],[105,64],[119,65],[104,66],[128,67],[100,68],[99,61],[129,69],[101,70],[106,71],[107,7],[110,71],[97,7],[133,72],[123,73],[114,74],[115,75],[117,76],[113,77],[116,78],[126,61],[108,79],[109,80],[118,81],[98,82],[121,73],[120,71],[124,7],[127,83],[88,84],[86,85],[89,84],[90,86],[85,7],[87,7]],"version":"5.8.3"}
package/dist/utils.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export declare const cn: (...classes: string[]) => string;
2
- export declare function getBaseUrlWithLanguage(baseUrl: string, language?: 'en' | 'de'): string;
package/dist/utils.js DELETED
@@ -1,12 +0,0 @@
1
- export var cn = function () {
2
- var classes = [];
3
- for (var _i = 0; _i < arguments.length; _i++) {
4
- classes[_i] = arguments[_i];
5
- }
6
- return classes.filter(Boolean).join(' ');
7
- };
8
- export function getBaseUrlWithLanguage(baseUrl, language) {
9
- if (!language)
10
- return baseUrl;
11
- return "".concat(baseUrl, "/").concat(language);
12
- }