@mission-studio/puck 1.0.5 → 1.0.15

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.
@@ -0,0 +1,2162 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // renderer.ts
21
+ var renderer_exports = {};
22
+ __export(renderer_exports, {
23
+ Button: () => Button,
24
+ Card: () => Card,
25
+ Columns: () => Columns,
26
+ Container: () => Container,
27
+ CustomImage: () => CustomImage,
28
+ DEFAULT_THEME: () => DEFAULT_THEME,
29
+ Divider: () => Divider,
30
+ FeatureGrid: () => FeatureGrid,
31
+ FeaturesList: () => FeaturesList,
32
+ Footer: () => Footer,
33
+ Heading: () => Heading,
34
+ Icon: () => Icon,
35
+ Image: () => Image,
36
+ ImageCarousel: () => ImageCarousel,
37
+ Paragraph: () => Paragraph,
38
+ Popup: () => Popup,
39
+ Section: () => Section,
40
+ Spacer: () => Spacer,
41
+ TextBlock: () => TextBlock,
42
+ ThemeProvider: () => ThemeProvider,
43
+ Topbar: () => Topbar,
44
+ VideoEmbed: () => VideoEmbed,
45
+ availableIcons: () => availableIcons,
46
+ useTheme: () => useTheme
47
+ });
48
+ module.exports = __toCommonJS(renderer_exports);
49
+
50
+ // entries/context.tsx
51
+ var import_react = require("react");
52
+ var import_jsx_runtime = require("react/jsx-runtime");
53
+ var EntriesContext = (0, import_react.createContext)(null);
54
+ function useEntries() {
55
+ const context = (0, import_react.useContext)(EntriesContext);
56
+ if (!context) {
57
+ return {
58
+ entries: [],
59
+ entryNames: [],
60
+ getEntry: () => void 0,
61
+ getEntryValue: () => void 0
62
+ };
63
+ }
64
+ return context;
65
+ }
66
+
67
+ // theme/context.tsx
68
+ var import_react2 = require("react");
69
+
70
+ // theme/defaults.ts
71
+ var DEFAULT_THEME = {
72
+ id: "default",
73
+ name: "Default Theme",
74
+ colors: {
75
+ primary: { color: "#3B82F6", opacity: 100 },
76
+ secondary: { color: "#8B5CF6", opacity: 100 },
77
+ accent: { color: "#10B981", opacity: 100 },
78
+ background: { color: "#FFFFFF", opacity: 100 },
79
+ foreground: { color: "#111827", opacity: 100 },
80
+ muted: { color: "#F3F4F6", opacity: 100 }
81
+ },
82
+ typography: {
83
+ fontFamily: {
84
+ heading: "system-ui, sans-serif",
85
+ body: "system-ui, sans-serif"
86
+ },
87
+ fontSize: {
88
+ base: "base",
89
+ heading: "4xl"
90
+ },
91
+ fontWeight: {
92
+ normal: 400,
93
+ heading: 700
94
+ }
95
+ },
96
+ spacing: {
97
+ xs: 8,
98
+ sm: 12,
99
+ md: 16,
100
+ lg: 24,
101
+ xl: 32
102
+ },
103
+ borders: {
104
+ radiusSmall: 4,
105
+ radiusMedium: 8,
106
+ radiusLarge: 16
107
+ },
108
+ shadows: {
109
+ small: "sm",
110
+ medium: "md",
111
+ large: "lg"
112
+ }
113
+ };
114
+
115
+ // theme/context.tsx
116
+ var import_jsx_runtime2 = require("react/jsx-runtime");
117
+ var ThemeContext = (0, import_react2.createContext)(null);
118
+ function ThemeProvider({
119
+ theme,
120
+ children
121
+ }) {
122
+ const activeTheme = theme ?? DEFAULT_THEME;
123
+ const contextValue = {
124
+ theme: activeTheme,
125
+ resolveColor: (key) => activeTheme.colors[key],
126
+ resolveSpacing: (key) => activeTheme.spacing[key],
127
+ resolveBorderRadius: (key) => activeTheme.borders[key],
128
+ resolveShadow: (key) => activeTheme.shadows[key]
129
+ };
130
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ThemeContext.Provider, { value: contextValue, children });
131
+ }
132
+ function useTheme() {
133
+ const context = (0, import_react2.useContext)(ThemeContext);
134
+ if (!context) {
135
+ return {
136
+ theme: DEFAULT_THEME,
137
+ resolveColor: (key) => DEFAULT_THEME.colors[key],
138
+ resolveSpacing: (key) => DEFAULT_THEME.spacing[key],
139
+ resolveBorderRadius: (key) => DEFAULT_THEME.borders[key],
140
+ resolveShadow: (key) => DEFAULT_THEME.shadows[key]
141
+ };
142
+ }
143
+ return context;
144
+ }
145
+
146
+ // utils/index.ts
147
+ var import_tailwind_merge = require("tailwind-merge");
148
+ var import_clsx = require("clsx");
149
+ function hexToRgba(hex, opacity) {
150
+ const sanitized = hex.replace("#", "");
151
+ const r = parseInt(sanitized.slice(0, 2), 16);
152
+ const g = parseInt(sanitized.slice(2, 4), 16);
153
+ const b = parseInt(sanitized.slice(4, 6), 16);
154
+ return `rgba(${r}, ${g}, ${b}, ${opacity / 100})`;
155
+ }
156
+ function cn(...inputs) {
157
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
158
+ }
159
+
160
+ // components/page/Heading.tsx
161
+ var import_jsx_runtime3 = require("react/jsx-runtime");
162
+ var sizeMap = {
163
+ xs: "0.875rem",
164
+ sm: "1rem",
165
+ md: "1.25rem",
166
+ lg: "1.5rem",
167
+ xl: "2rem",
168
+ "2xl": "2.5rem",
169
+ "3xl": "3rem",
170
+ "4xl": "4rem"
171
+ };
172
+ var weightMap = {
173
+ normal: 400,
174
+ medium: 500,
175
+ semibold: 600,
176
+ bold: 700,
177
+ extrabold: 800
178
+ };
179
+ var letterSpacingMap = {
180
+ tight: "-0.025em",
181
+ normal: "0",
182
+ wide: "0.05em"
183
+ };
184
+ var lineHeightMap = {
185
+ tight: "1.1",
186
+ normal: "1.4",
187
+ relaxed: "1.6"
188
+ };
189
+ function isThemeableValue(value) {
190
+ return typeof value === "object" && value !== null && "useTheme" in value;
191
+ }
192
+ function isEntryBoundValue(value) {
193
+ return typeof value === "object" && value !== null && "useEntry" in value;
194
+ }
195
+ function Heading({
196
+ text,
197
+ level = "h2",
198
+ size = "2xl",
199
+ weight = "bold",
200
+ color,
201
+ align = "left",
202
+ letterSpacing = "normal",
203
+ lineHeight = "tight",
204
+ id
205
+ }) {
206
+ const { resolveColor: resolveColor2 } = useTheme();
207
+ const { getEntryValue } = useEntries();
208
+ const resolvedText = (() => {
209
+ if (!text) return "";
210
+ if (typeof text === "string") return text;
211
+ if (isEntryBoundValue(text)) {
212
+ if (text.useEntry) {
213
+ return String(getEntryValue(text.entryName, text.fieldKey) ?? "");
214
+ }
215
+ return text.value;
216
+ }
217
+ return "";
218
+ })();
219
+ const resolvedColor = (() => {
220
+ if (!color) return resolveColor2("foreground");
221
+ if (typeof color === "string") return { color, opacity: 100 };
222
+ if (isThemeableValue(color)) {
223
+ return color.useTheme ? resolveColor2(color.themeKey) : color.value;
224
+ }
225
+ if ("color" in color) return color;
226
+ return resolveColor2("foreground");
227
+ })();
228
+ const Tag = level;
229
+ const style = {
230
+ fontSize: sizeMap[size],
231
+ fontWeight: weightMap[weight],
232
+ color: hexToRgba(resolvedColor.color, resolvedColor.opacity),
233
+ textAlign: align,
234
+ letterSpacing: letterSpacingMap[letterSpacing],
235
+ lineHeight: lineHeightMap[lineHeight],
236
+ margin: 0
237
+ };
238
+ if (!resolvedText) return null;
239
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Tag, { id, style, children: resolvedText });
240
+ }
241
+
242
+ // components/page/Paragraph.tsx
243
+ var import_jsx_runtime4 = require("react/jsx-runtime");
244
+ var sizeMap2 = {
245
+ sm: "0.875rem",
246
+ base: "1rem",
247
+ lg: "1.125rem",
248
+ xl: "1.25rem"
249
+ };
250
+ var weightMap2 = {
251
+ normal: 400,
252
+ medium: 500,
253
+ semibold: 600
254
+ };
255
+ var lineHeightMap2 = {
256
+ tight: "1.4",
257
+ normal: "1.6",
258
+ relaxed: "1.75",
259
+ loose: "2"
260
+ };
261
+ function isThemeableValue2(value) {
262
+ return typeof value === "object" && value !== null && "useTheme" in value;
263
+ }
264
+ function isEntryBoundValue2(value) {
265
+ return typeof value === "object" && value !== null && "useEntry" in value;
266
+ }
267
+ function Paragraph({
268
+ text,
269
+ size = "base",
270
+ weight = "normal",
271
+ color,
272
+ align = "left",
273
+ lineHeight = "normal",
274
+ maxWidth,
275
+ id
276
+ }) {
277
+ const { resolveColor: resolveColor2 } = useTheme();
278
+ const { getEntryValue } = useEntries();
279
+ const resolvedText = (() => {
280
+ if (!text) return "";
281
+ if (typeof text === "string") return text;
282
+ if (isEntryBoundValue2(text)) {
283
+ if (text.useEntry) {
284
+ return String(getEntryValue(text.entryName, text.fieldKey) ?? "");
285
+ }
286
+ return text.value;
287
+ }
288
+ return "";
289
+ })();
290
+ const resolvedColor = (() => {
291
+ if (!color) return resolveColor2("foreground");
292
+ if (typeof color === "string") return { color, opacity: 100 };
293
+ if (isThemeableValue2(color)) {
294
+ return color.useTheme ? resolveColor2(color.themeKey) : color.value;
295
+ }
296
+ if ("color" in color) return color;
297
+ return resolveColor2("foreground");
298
+ })();
299
+ const style = {
300
+ fontSize: sizeMap2[size],
301
+ fontWeight: weightMap2[weight],
302
+ color: hexToRgba(resolvedColor.color, resolvedColor.opacity),
303
+ textAlign: align,
304
+ lineHeight: lineHeightMap2[lineHeight],
305
+ maxWidth: maxWidth || void 0,
306
+ margin: 0
307
+ };
308
+ if (!resolvedText) return null;
309
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { id, style, children: resolvedText });
310
+ }
311
+
312
+ // hooks/useGtmEvent.ts
313
+ function useGtmEvent() {
314
+ return (eventName, data) => {
315
+ if (typeof window === "undefined") return;
316
+ if (typeof window.gtag === "function") {
317
+ window.gtag("event", eventName, data || {});
318
+ }
319
+ };
320
+ }
321
+
322
+ // hooks/useUtmParams.ts
323
+ var import_react3 = require("react");
324
+ function useUtmParams() {
325
+ const [utmParams, setUtmParams] = (0, import_react3.useState)({});
326
+ (0, import_react3.useEffect)(() => {
327
+ if (typeof window === "undefined") return;
328
+ const urlParams = new URLSearchParams(window.location.search);
329
+ const source = urlParams.get("utm_source");
330
+ const medium = urlParams.get("utm_medium");
331
+ const campaign = urlParams.get("utm_campaign");
332
+ const content = urlParams.get("utm_content");
333
+ const term = urlParams.get("utm_term");
334
+ const params = {};
335
+ if (source) {
336
+ params.source = source;
337
+ sessionStorage.setItem("utm_source", source);
338
+ } else {
339
+ const stored = sessionStorage.getItem("utm_source");
340
+ if (stored) params.source = stored;
341
+ }
342
+ if (medium) {
343
+ params.medium = medium;
344
+ sessionStorage.setItem("utm_medium", medium);
345
+ } else {
346
+ const stored = sessionStorage.getItem("utm_medium");
347
+ if (stored) params.medium = stored;
348
+ }
349
+ if (campaign) {
350
+ params.campaign = campaign;
351
+ sessionStorage.setItem("utm_campaign", campaign);
352
+ } else {
353
+ const stored = sessionStorage.getItem("utm_campaign");
354
+ if (stored) params.campaign = stored;
355
+ }
356
+ if (content) {
357
+ params.content = content;
358
+ sessionStorage.setItem("utm_content", content);
359
+ } else {
360
+ const stored = sessionStorage.getItem("utm_content");
361
+ if (stored) params.content = stored;
362
+ }
363
+ if (term) {
364
+ params.term = term;
365
+ sessionStorage.setItem("utm_term", term);
366
+ } else {
367
+ const stored = sessionStorage.getItem("utm_term");
368
+ if (stored) params.term = stored;
369
+ }
370
+ setUtmParams(params);
371
+ }, []);
372
+ return utmParams;
373
+ }
374
+
375
+ // components/page/Button.tsx
376
+ var import_jsx_runtime5 = require("react/jsx-runtime");
377
+ var sizeStyles = {
378
+ sm: { padding: "8px 16px", fontSize: "0.875rem" },
379
+ md: { padding: "12px 24px", fontSize: "1rem" },
380
+ lg: { padding: "16px 32px", fontSize: "1.125rem" },
381
+ xl: { padding: "20px 40px", fontSize: "1.25rem" }
382
+ };
383
+ var radiusMap = {
384
+ none: "0",
385
+ sm: "4px",
386
+ md: "8px",
387
+ lg: "16px",
388
+ full: "9999px"
389
+ };
390
+ function isThemeableValue3(value) {
391
+ return typeof value === "object" && value !== null && "useTheme" in value;
392
+ }
393
+ function isEntryBoundValue3(value) {
394
+ return typeof value === "object" && value !== null && "useEntry" in value;
395
+ }
396
+ function Button({
397
+ text,
398
+ href,
399
+ target = "_self",
400
+ variant = "solid",
401
+ size = "md",
402
+ color,
403
+ textColor,
404
+ borderRadius = "md",
405
+ fullWidth = false,
406
+ align = "center",
407
+ id
408
+ }) {
409
+ const { resolveColor: resolveColor2 } = useTheme();
410
+ const { getEntryValue } = useEntries();
411
+ const utm = useUtmParams();
412
+ const sendEvent = useGtmEvent();
413
+ const resolvedText = (() => {
414
+ if (!text) return "Button";
415
+ if (typeof text === "string") return text;
416
+ if (isEntryBoundValue3(text)) {
417
+ if (text.useEntry) {
418
+ return String(getEntryValue(text.entryName, text.fieldKey) ?? "Button");
419
+ }
420
+ return text.value;
421
+ }
422
+ return "Button";
423
+ })();
424
+ const handleClick = () => {
425
+ const sessionId = typeof window !== "undefined" ? sessionStorage.getItem("session_id") : null;
426
+ sendEvent("button_click", {
427
+ text: resolvedText,
428
+ href: href || void 0,
429
+ variant,
430
+ session_id: sessionId,
431
+ ...utm
432
+ });
433
+ };
434
+ const resolvedColor = (() => {
435
+ if (!color) return resolveColor2("primary");
436
+ if (typeof color === "string") return { color, opacity: 100 };
437
+ if (isThemeableValue3(color)) {
438
+ return color.useTheme ? resolveColor2(color.themeKey) : color.value;
439
+ }
440
+ if ("color" in color) return color;
441
+ return resolveColor2("primary");
442
+ })();
443
+ const resolvedTextColor = (() => {
444
+ if (!textColor) {
445
+ if (variant === "solid") return { color: "#FFFFFF", opacity: 100 };
446
+ return resolvedColor;
447
+ }
448
+ if (typeof textColor === "string")
449
+ return { color: textColor, opacity: 100 };
450
+ if (isThemeableValue3(textColor)) {
451
+ return textColor.useTheme ? resolveColor2(textColor.themeKey) : textColor.value;
452
+ }
453
+ if ("color" in textColor) return textColor;
454
+ return { color: "#FFFFFF", opacity: 100 };
455
+ })();
456
+ const bgColor = hexToRgba(resolvedColor.color, resolvedColor.opacity);
457
+ const fgColor = hexToRgba(resolvedTextColor.color, resolvedTextColor.opacity);
458
+ const baseStyle = {
459
+ ...sizeStyles[size],
460
+ borderRadius: radiusMap[borderRadius],
461
+ fontWeight: 600,
462
+ cursor: "pointer",
463
+ display: "inline-flex",
464
+ alignItems: "center",
465
+ justifyContent: "center",
466
+ textDecoration: "none",
467
+ transition: "opacity 0.2s, transform 0.2s",
468
+ width: fullWidth ? "100%" : "auto",
469
+ border: "none"
470
+ };
471
+ const variantStyles = {
472
+ solid: {
473
+ backgroundColor: bgColor,
474
+ color: fgColor
475
+ },
476
+ outline: {
477
+ backgroundColor: "transparent",
478
+ color: bgColor,
479
+ border: `2px solid ${bgColor}`
480
+ },
481
+ ghost: {
482
+ backgroundColor: "transparent",
483
+ color: bgColor
484
+ },
485
+ link: {
486
+ backgroundColor: "transparent",
487
+ color: bgColor,
488
+ padding: "0",
489
+ textDecoration: "underline"
490
+ }
491
+ };
492
+ const style = { ...baseStyle, ...variantStyles[variant] };
493
+ const wrapperStyle = {
494
+ display: "flex",
495
+ justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center"
496
+ };
497
+ const content = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style, children: resolvedText });
498
+ if (href) {
499
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
500
+ "a",
501
+ {
502
+ id,
503
+ href,
504
+ target,
505
+ style,
506
+ rel: target === "_blank" ? "noopener noreferrer" : void 0,
507
+ onClick: handleClick,
508
+ children: resolvedText
509
+ }
510
+ ) });
511
+ }
512
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { id, type: "button", style, onClick: handleClick, children: resolvedText }) });
513
+ }
514
+
515
+ // components/page/Image.tsx
516
+ var import_jsx_runtime6 = require("react/jsx-runtime");
517
+ var widthMap = {
518
+ auto: "auto",
519
+ full: "100%",
520
+ sm: "300px",
521
+ md: "500px",
522
+ lg: "700px",
523
+ xl: "900px"
524
+ };
525
+ var aspectRatioMap = {
526
+ auto: void 0,
527
+ "1:1": "1 / 1",
528
+ "4:3": "4 / 3",
529
+ "16:9": "16 / 9",
530
+ "21:9": "21 / 9"
531
+ };
532
+ var radiusMap2 = {
533
+ none: "0",
534
+ sm: "4px",
535
+ md: "8px",
536
+ lg: "16px",
537
+ xl: "24px",
538
+ full: "9999px"
539
+ };
540
+ var shadowMap = {
541
+ none: "none",
542
+ sm: "0 1px 2px rgba(0,0,0,0.05)",
543
+ md: "0 4px 6px rgba(0,0,0,0.1)",
544
+ lg: "0 10px 15px rgba(0,0,0,0.1)",
545
+ xl: "0 20px 25px rgba(0,0,0,0.15)"
546
+ };
547
+ function isThemeableValue4(value) {
548
+ return typeof value === "object" && value !== null && "useTheme" in value;
549
+ }
550
+ function isEntryBoundValue4(value) {
551
+ return typeof value === "object" && value !== null && "useEntry" in value;
552
+ }
553
+ function Image({
554
+ src,
555
+ alt = "",
556
+ width = "full",
557
+ aspectRatio = "auto",
558
+ objectFit = "cover",
559
+ borderRadius = "none",
560
+ shadow = "none",
561
+ align = "center",
562
+ caption,
563
+ captionColor,
564
+ id
565
+ }) {
566
+ const { resolveColor: resolveColor2 } = useTheme();
567
+ const { getEntryValue } = useEntries();
568
+ const resolvedSrc = (() => {
569
+ if (!src) return "";
570
+ if (typeof src === "string") return src;
571
+ if (isEntryBoundValue4(src)) {
572
+ if (src.useEntry) {
573
+ return String(getEntryValue(src.entryName, src.fieldKey) ?? "");
574
+ }
575
+ return src.value;
576
+ }
577
+ return "";
578
+ })();
579
+ const resolvedCaption = (() => {
580
+ if (!caption) return "";
581
+ if (typeof caption === "string") return caption;
582
+ if (isEntryBoundValue4(caption)) {
583
+ if (caption.useEntry) {
584
+ return String(getEntryValue(caption.entryName, caption.fieldKey) ?? "");
585
+ }
586
+ return caption.value;
587
+ }
588
+ return "";
589
+ })();
590
+ const resolvedCaptionColor = (() => {
591
+ if (!captionColor) return resolveColor2("muted");
592
+ if (typeof captionColor === "string")
593
+ return { color: captionColor, opacity: 100 };
594
+ if (isThemeableValue4(captionColor)) {
595
+ return captionColor.useTheme ? resolveColor2(captionColor.themeKey) : captionColor.value;
596
+ }
597
+ if ("color" in captionColor) return captionColor;
598
+ return resolveColor2("muted");
599
+ })();
600
+ const wrapperStyle = {
601
+ display: "flex",
602
+ flexDirection: "column",
603
+ alignItems: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center",
604
+ gap: "8px"
605
+ };
606
+ const imageStyle = {
607
+ width: widthMap[width],
608
+ maxWidth: "100%",
609
+ aspectRatio: aspectRatioMap[aspectRatio],
610
+ objectFit,
611
+ borderRadius: radiusMap2[borderRadius],
612
+ boxShadow: shadowMap[shadow],
613
+ display: "block"
614
+ };
615
+ const captionStyle = {
616
+ fontSize: "0.875rem",
617
+ color: hexToRgba(resolvedCaptionColor.color, resolvedCaptionColor.opacity),
618
+ textAlign: align,
619
+ maxWidth: widthMap[width]
620
+ };
621
+ if (!resolvedSrc) {
622
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
623
+ "div",
624
+ {
625
+ style: {
626
+ ...imageStyle,
627
+ backgroundColor: "#e5e7eb",
628
+ display: "flex",
629
+ alignItems: "center",
630
+ justifyContent: "center",
631
+ minHeight: "200px",
632
+ color: "#9ca3af"
633
+ },
634
+ children: "No image"
635
+ }
636
+ ) });
637
+ }
638
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("figure", { id, style: { ...wrapperStyle, margin: 0 }, children: [
639
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("img", { src: resolvedSrc, alt, style: imageStyle, loading: "lazy" }),
640
+ resolvedCaption && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("figcaption", { style: captionStyle, children: resolvedCaption })
641
+ ] });
642
+ }
643
+
644
+ // components/page/ImageCarousel.tsx
645
+ var import_react4 = require("react");
646
+ var import_jsx_runtime7 = require("react/jsx-runtime");
647
+ var aspectRatioMap2 = {
648
+ "16:9": "16 / 9",
649
+ "4:3": "4 / 3",
650
+ "1:1": "1 / 1",
651
+ "21:9": "21 / 9"
652
+ };
653
+ var radiusMap3 = {
654
+ none: "0",
655
+ sm: "4px",
656
+ md: "8px",
657
+ lg: "16px"
658
+ };
659
+ function isThemeableValue5(value) {
660
+ return typeof value === "object" && value !== null && "useTheme" in value;
661
+ }
662
+ function ImageCarousel({
663
+ images = [],
664
+ aspectRatio = "16:9",
665
+ borderRadius = "none",
666
+ showDots = true,
667
+ showArrows = true,
668
+ arrowColor,
669
+ dotColor,
670
+ id
671
+ }) {
672
+ const [currentIndex, setCurrentIndex] = (0, import_react4.useState)(0);
673
+ const { resolveColor: resolveColor2 } = useTheme();
674
+ const utm = useUtmParams();
675
+ const sendEvent = useGtmEvent();
676
+ const resolvedArrowColor = (() => {
677
+ if (!arrowColor) return { color: "#FFFFFF", opacity: 100 };
678
+ if (typeof arrowColor === "string")
679
+ return { color: arrowColor, opacity: 100 };
680
+ if (isThemeableValue5(arrowColor)) {
681
+ return arrowColor.useTheme ? resolveColor2(arrowColor.themeKey) : arrowColor.value;
682
+ }
683
+ if ("color" in arrowColor) return arrowColor;
684
+ return { color: "#FFFFFF", opacity: 100 };
685
+ })();
686
+ const resolvedDotColor = (() => {
687
+ if (!dotColor) return resolveColor2("primary");
688
+ if (typeof dotColor === "string") return { color: dotColor, opacity: 100 };
689
+ if (isThemeableValue5(dotColor)) {
690
+ return dotColor.useTheme ? resolveColor2(dotColor.themeKey) : dotColor.value;
691
+ }
692
+ if ("color" in dotColor) return dotColor;
693
+ return resolveColor2("primary");
694
+ })();
695
+ const goToPrevious = () => {
696
+ const newIndex = currentIndex === 0 ? images.length - 1 : currentIndex - 1;
697
+ setCurrentIndex(newIndex);
698
+ sendEvent("carousel_navigate", {
699
+ direction: "previous",
700
+ slideIndex: newIndex,
701
+ totalSlides: images.length,
702
+ ...utm
703
+ });
704
+ };
705
+ const goToNext = () => {
706
+ const newIndex = currentIndex === images.length - 1 ? 0 : currentIndex + 1;
707
+ setCurrentIndex(newIndex);
708
+ sendEvent("carousel_navigate", {
709
+ direction: "next",
710
+ slideIndex: newIndex,
711
+ totalSlides: images.length,
712
+ ...utm
713
+ });
714
+ };
715
+ const goToSlide = (index) => {
716
+ setCurrentIndex(index);
717
+ sendEvent("carousel_navigate", {
718
+ direction: "direct",
719
+ slideIndex: index,
720
+ totalSlides: images.length,
721
+ ...utm
722
+ });
723
+ };
724
+ if (images.length === 0) {
725
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
726
+ "div",
727
+ {
728
+ style: {
729
+ aspectRatio: aspectRatioMap2[aspectRatio],
730
+ backgroundColor: "#e5e7eb",
731
+ borderRadius: radiusMap3[borderRadius],
732
+ display: "flex",
733
+ alignItems: "center",
734
+ justifyContent: "center",
735
+ color: "#9ca3af"
736
+ },
737
+ children: "No images"
738
+ }
739
+ );
740
+ }
741
+ const containerStyle = {
742
+ position: "relative",
743
+ aspectRatio: aspectRatioMap2[aspectRatio],
744
+ borderRadius: radiusMap3[borderRadius],
745
+ overflow: "hidden"
746
+ };
747
+ const slideContainerStyle = {
748
+ display: "flex",
749
+ transition: "transform 0.3s ease-in-out",
750
+ transform: `translateX(-${currentIndex * 100}%)`,
751
+ height: "100%"
752
+ };
753
+ const slideStyle = {
754
+ minWidth: "100%",
755
+ height: "100%"
756
+ };
757
+ const imageStyle = {
758
+ width: "100%",
759
+ height: "100%",
760
+ objectFit: "cover"
761
+ };
762
+ const arrowStyle = {
763
+ position: "absolute",
764
+ top: "50%",
765
+ transform: "translateY(-50%)",
766
+ backgroundColor: "rgba(0,0,0,0.5)",
767
+ color: hexToRgba(resolvedArrowColor.color, resolvedArrowColor.opacity),
768
+ border: "none",
769
+ borderRadius: "50%",
770
+ width: "40px",
771
+ height: "40px",
772
+ cursor: "pointer",
773
+ display: "flex",
774
+ alignItems: "center",
775
+ justifyContent: "center",
776
+ fontSize: "20px",
777
+ zIndex: 1
778
+ };
779
+ const dotsContainerStyle = {
780
+ position: "absolute",
781
+ bottom: "16px",
782
+ left: "50%",
783
+ transform: "translateX(-50%)",
784
+ display: "flex",
785
+ gap: "8px",
786
+ zIndex: 1
787
+ };
788
+ const dotStyle = (isActive) => ({
789
+ width: "10px",
790
+ height: "10px",
791
+ borderRadius: "50%",
792
+ border: "none",
793
+ cursor: "pointer",
794
+ backgroundColor: isActive ? hexToRgba(resolvedDotColor.color, resolvedDotColor.opacity) : "rgba(255,255,255,0.5)"
795
+ });
796
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { id, style: containerStyle, children: [
797
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: slideContainerStyle, children: images.map((image, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: slideStyle, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
798
+ "img",
799
+ {
800
+ src: image.src,
801
+ alt: image.alt || "",
802
+ style: imageStyle,
803
+ loading: "lazy"
804
+ }
805
+ ) }, index)) }),
806
+ showArrows && images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
807
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
808
+ "button",
809
+ {
810
+ type: "button",
811
+ onClick: goToPrevious,
812
+ style: { ...arrowStyle, left: "16px" },
813
+ "aria-label": "Previous slide",
814
+ children: "\u2039"
815
+ }
816
+ ),
817
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
818
+ "button",
819
+ {
820
+ type: "button",
821
+ onClick: goToNext,
822
+ style: { ...arrowStyle, right: "16px" },
823
+ "aria-label": "Next slide",
824
+ children: "\u203A"
825
+ }
826
+ )
827
+ ] }),
828
+ showDots && images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: dotsContainerStyle, children: images.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
829
+ "button",
830
+ {
831
+ type: "button",
832
+ onClick: () => goToSlide(index),
833
+ style: dotStyle(index === currentIndex),
834
+ "aria-label": `Go to slide ${index + 1}`
835
+ },
836
+ index
837
+ )) })
838
+ ] });
839
+ }
840
+
841
+ // components/page/VideoEmbed.tsx
842
+ var import_jsx_runtime8 = require("react/jsx-runtime");
843
+ var aspectRatioMap3 = {
844
+ "16:9": "56.25%",
845
+ // 9/16 * 100
846
+ "4:3": "75%",
847
+ "1:1": "100%",
848
+ "21:9": "42.86%"
849
+ };
850
+ var radiusMap4 = {
851
+ none: "0",
852
+ sm: "4px",
853
+ md: "8px",
854
+ lg: "16px"
855
+ };
856
+ var maxWidthMap = {
857
+ sm: "400px",
858
+ md: "600px",
859
+ lg: "800px",
860
+ xl: "1000px",
861
+ full: "100%"
862
+ };
863
+ function isEntryBoundValue5(value) {
864
+ return typeof value === "object" && value !== null && "useEntry" in value;
865
+ }
866
+ function parseVideoUrl(url) {
867
+ const ytMatch = url.match(
868
+ /(?:youtube\.com\/(?:watch\?v=|embed\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})/
869
+ );
870
+ if (ytMatch) {
871
+ return {
872
+ type: "youtube",
873
+ embedUrl: `https://www.youtube.com/embed/${ytMatch[1]}`
874
+ };
875
+ }
876
+ const vimeoMatch = url.match(/(?:vimeo\.com\/)(\d+)/);
877
+ if (vimeoMatch) {
878
+ return {
879
+ type: "vimeo",
880
+ embedUrl: `https://player.vimeo.com/video/${vimeoMatch[1]}`
881
+ };
882
+ }
883
+ return { type: "unknown", embedUrl: url };
884
+ }
885
+ function VideoEmbed({
886
+ url,
887
+ aspectRatio = "16:9",
888
+ borderRadius = "none",
889
+ autoplay = false,
890
+ muted = false,
891
+ loop = false,
892
+ align = "center",
893
+ maxWidth = "full",
894
+ id
895
+ }) {
896
+ const { getEntryValue } = useEntries();
897
+ const resolvedUrl = (() => {
898
+ if (!url) return "";
899
+ if (typeof url === "string") return url;
900
+ if (isEntryBoundValue5(url)) {
901
+ if (url.useEntry) {
902
+ return String(getEntryValue(url.entryName, url.fieldKey) ?? "");
903
+ }
904
+ return url.value;
905
+ }
906
+ return "";
907
+ })();
908
+ if (!resolvedUrl) {
909
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
910
+ "div",
911
+ {
912
+ style: {
913
+ backgroundColor: "#1f2937",
914
+ borderRadius: radiusMap4[borderRadius],
915
+ aspectRatio: aspectRatio.replace(":", " / "),
916
+ display: "flex",
917
+ alignItems: "center",
918
+ justifyContent: "center",
919
+ color: "#9ca3af",
920
+ maxWidth: maxWidthMap[maxWidth],
921
+ marginLeft: align === "center" ? "auto" : align === "right" ? "auto" : void 0,
922
+ marginRight: align === "center" ? "auto" : align === "left" ? "auto" : void 0
923
+ },
924
+ children: "No video URL"
925
+ }
926
+ );
927
+ }
928
+ const { embedUrl } = parseVideoUrl(resolvedUrl);
929
+ const params = new URLSearchParams();
930
+ if (autoplay) params.set("autoplay", "1");
931
+ if (muted) params.set("mute", "1");
932
+ if (loop) params.set("loop", "1");
933
+ const finalUrl = params.toString() ? `${embedUrl}?${params.toString()}` : embedUrl;
934
+ const wrapperStyle = {
935
+ display: "flex",
936
+ justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center"
937
+ };
938
+ const containerStyle = {
939
+ position: "relative",
940
+ width: "100%",
941
+ maxWidth: maxWidthMap[maxWidth],
942
+ paddingBottom: aspectRatioMap3[aspectRatio],
943
+ borderRadius: radiusMap4[borderRadius],
944
+ overflow: "hidden"
945
+ };
946
+ const iframeStyle = {
947
+ position: "absolute",
948
+ top: 0,
949
+ left: 0,
950
+ width: "100%",
951
+ height: "100%",
952
+ border: "none"
953
+ };
954
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { id, style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: containerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
955
+ "iframe",
956
+ {
957
+ src: finalUrl,
958
+ style: iframeStyle,
959
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
960
+ allowFullScreen: true,
961
+ loading: "lazy"
962
+ }
963
+ ) }) });
964
+ }
965
+
966
+ // components/page/Icon.tsx
967
+ var import_jsx_runtime9 = require("react/jsx-runtime");
968
+ var sizeMap3 = {
969
+ sm: { size: "16px", strokeWidth: 2 },
970
+ md: { size: "24px", strokeWidth: 2 },
971
+ lg: { size: "32px", strokeWidth: 1.5 },
972
+ xl: { size: "48px", strokeWidth: 1.5 },
973
+ "2xl": { size: "64px", strokeWidth: 1.5 }
974
+ };
975
+ var icons = {
976
+ check: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
977
+ "svg",
978
+ {
979
+ width: size,
980
+ height: size,
981
+ viewBox: "0 0 24 24",
982
+ fill: "none",
983
+ stroke: color,
984
+ strokeWidth,
985
+ strokeLinecap: "round",
986
+ strokeLinejoin: "round",
987
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polyline", { points: "20 6 9 17 4 12" })
988
+ }
989
+ ),
990
+ x: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
991
+ "svg",
992
+ {
993
+ width: size,
994
+ height: size,
995
+ viewBox: "0 0 24 24",
996
+ fill: "none",
997
+ stroke: color,
998
+ strokeWidth,
999
+ strokeLinecap: "round",
1000
+ strokeLinejoin: "round",
1001
+ children: [
1002
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
1003
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
1004
+ ]
1005
+ }
1006
+ ),
1007
+ star: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1008
+ "svg",
1009
+ {
1010
+ width: size,
1011
+ height: size,
1012
+ viewBox: "0 0 24 24",
1013
+ fill: color,
1014
+ stroke: color,
1015
+ strokeWidth,
1016
+ strokeLinecap: "round",
1017
+ strokeLinejoin: "round",
1018
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" })
1019
+ }
1020
+ ),
1021
+ heart: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1022
+ "svg",
1023
+ {
1024
+ width: size,
1025
+ height: size,
1026
+ viewBox: "0 0 24 24",
1027
+ fill: "none",
1028
+ stroke: color,
1029
+ strokeWidth,
1030
+ strokeLinecap: "round",
1031
+ strokeLinejoin: "round",
1032
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" })
1033
+ }
1034
+ ),
1035
+ arrowRight: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1036
+ "svg",
1037
+ {
1038
+ width: size,
1039
+ height: size,
1040
+ viewBox: "0 0 24 24",
1041
+ fill: "none",
1042
+ stroke: color,
1043
+ strokeWidth,
1044
+ strokeLinecap: "round",
1045
+ strokeLinejoin: "round",
1046
+ children: [
1047
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
1048
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polyline", { points: "12 5 19 12 12 19" })
1049
+ ]
1050
+ }
1051
+ ),
1052
+ arrowLeft: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1053
+ "svg",
1054
+ {
1055
+ width: size,
1056
+ height: size,
1057
+ viewBox: "0 0 24 24",
1058
+ fill: "none",
1059
+ stroke: color,
1060
+ strokeWidth,
1061
+ strokeLinecap: "round",
1062
+ strokeLinejoin: "round",
1063
+ children: [
1064
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("line", { x1: "19", y1: "12", x2: "5", y2: "12" }),
1065
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polyline", { points: "12 19 5 12 12 5" })
1066
+ ]
1067
+ }
1068
+ ),
1069
+ mail: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1070
+ "svg",
1071
+ {
1072
+ width: size,
1073
+ height: size,
1074
+ viewBox: "0 0 24 24",
1075
+ fill: "none",
1076
+ stroke: color,
1077
+ strokeWidth,
1078
+ strokeLinecap: "round",
1079
+ strokeLinejoin: "round",
1080
+ children: [
1081
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" }),
1082
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polyline", { points: "22,6 12,13 2,6" })
1083
+ ]
1084
+ }
1085
+ ),
1086
+ phone: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1087
+ "svg",
1088
+ {
1089
+ width: size,
1090
+ height: size,
1091
+ viewBox: "0 0 24 24",
1092
+ fill: "none",
1093
+ stroke: color,
1094
+ strokeWidth,
1095
+ strokeLinecap: "round",
1096
+ strokeLinejoin: "round",
1097
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" })
1098
+ }
1099
+ ),
1100
+ mapPin: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1101
+ "svg",
1102
+ {
1103
+ width: size,
1104
+ height: size,
1105
+ viewBox: "0 0 24 24",
1106
+ fill: "none",
1107
+ stroke: color,
1108
+ strokeWidth,
1109
+ strokeLinecap: "round",
1110
+ strokeLinejoin: "round",
1111
+ children: [
1112
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z" }),
1113
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "12", cy: "10", r: "3" })
1114
+ ]
1115
+ }
1116
+ ),
1117
+ zap: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1118
+ "svg",
1119
+ {
1120
+ width: size,
1121
+ height: size,
1122
+ viewBox: "0 0 24 24",
1123
+ fill: "none",
1124
+ stroke: color,
1125
+ strokeWidth,
1126
+ strokeLinecap: "round",
1127
+ strokeLinejoin: "round",
1128
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polygon", { points: "13 2 3 14 12 14 11 22 21 10 12 10 13 2" })
1129
+ }
1130
+ ),
1131
+ shield: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1132
+ "svg",
1133
+ {
1134
+ width: size,
1135
+ height: size,
1136
+ viewBox: "0 0 24 24",
1137
+ fill: "none",
1138
+ stroke: color,
1139
+ strokeWidth,
1140
+ strokeLinecap: "round",
1141
+ strokeLinejoin: "round",
1142
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" })
1143
+ }
1144
+ ),
1145
+ users: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1146
+ "svg",
1147
+ {
1148
+ width: size,
1149
+ height: size,
1150
+ viewBox: "0 0 24 24",
1151
+ fill: "none",
1152
+ stroke: color,
1153
+ strokeWidth,
1154
+ strokeLinecap: "round",
1155
+ strokeLinejoin: "round",
1156
+ children: [
1157
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
1158
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "9", cy: "7", r: "4" }),
1159
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M23 21v-2a4 4 0 0 0-3-3.87" }),
1160
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
1161
+ ]
1162
+ }
1163
+ )
1164
+ };
1165
+ function isThemeableValue6(value) {
1166
+ return typeof value === "object" && value !== null && "useTheme" in value;
1167
+ }
1168
+ function Icon({
1169
+ name = "check",
1170
+ size = "md",
1171
+ color,
1172
+ align = "center",
1173
+ id
1174
+ }) {
1175
+ const { resolveColor: resolveColor2 } = useTheme();
1176
+ const resolvedColor = (() => {
1177
+ if (!color) return resolveColor2("primary");
1178
+ if (typeof color === "string") return { color, opacity: 100 };
1179
+ if (isThemeableValue6(color)) {
1180
+ return color.useTheme ? resolveColor2(color.themeKey) : color.value;
1181
+ }
1182
+ if ("color" in color) return color;
1183
+ return resolveColor2("primary");
1184
+ })();
1185
+ const IconComponent = icons[name.toLowerCase()] || icons.check;
1186
+ const { size: iconSize, strokeWidth } = sizeMap3[size];
1187
+ const colorValue = hexToRgba(resolvedColor.color, resolvedColor.opacity);
1188
+ const wrapperStyle = {
1189
+ display: "flex",
1190
+ justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center"
1191
+ };
1192
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { id, style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1193
+ IconComponent,
1194
+ {
1195
+ size: iconSize,
1196
+ color: colorValue,
1197
+ strokeWidth
1198
+ }
1199
+ ) });
1200
+ }
1201
+ var availableIcons = Object.keys(icons);
1202
+
1203
+ // design-system/shadows.ts
1204
+ var shadowPresets = [
1205
+ { label: "None", value: "none", css: "none" },
1206
+ { label: "XS", value: "xs", css: "0 1px 2px 0 rgb(0 0 0 / 0.05)" },
1207
+ {
1208
+ label: "SM",
1209
+ value: "sm",
1210
+ css: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"
1211
+ },
1212
+ {
1213
+ label: "MD",
1214
+ value: "md",
1215
+ css: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"
1216
+ },
1217
+ {
1218
+ label: "LG",
1219
+ value: "lg",
1220
+ css: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"
1221
+ },
1222
+ {
1223
+ label: "XL",
1224
+ value: "xl",
1225
+ css: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"
1226
+ },
1227
+ { label: "2XL", value: "2xl", css: "0 25px 50px -12px rgb(0 0 0 / 0.25)" },
1228
+ {
1229
+ label: "Inner",
1230
+ value: "inner",
1231
+ css: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"
1232
+ }
1233
+ ];
1234
+ var getShadowCSS = (value) => {
1235
+ const preset = shadowPresets.find((p) => p.value === value);
1236
+ return preset?.css ?? "none";
1237
+ };
1238
+
1239
+ // components/page/Section.tsx
1240
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1241
+ function isThemeableValue7(value) {
1242
+ return typeof value === "object" && value !== null && "useTheme" in value;
1243
+ }
1244
+ function resolveBackgroundColor(bg, resolveColor2) {
1245
+ if (!bg) return void 0;
1246
+ if (typeof bg === "string") return bg;
1247
+ if (isThemeableValue7(bg)) {
1248
+ if (bg.useTheme) {
1249
+ const themeColor = resolveColor2(bg.themeKey);
1250
+ return hexToRgba(themeColor.color, themeColor.opacity);
1251
+ }
1252
+ return hexToRgba(bg.value.color, bg.value.opacity);
1253
+ }
1254
+ if ("color" in bg && "opacity" in bg) {
1255
+ return hexToRgba(bg.color, bg.opacity);
1256
+ }
1257
+ return void 0;
1258
+ }
1259
+ function getVisibilityClasses(visibility) {
1260
+ if (!visibility) return "";
1261
+ if (!visibility.mobile && !visibility.desktop) {
1262
+ return "hidden";
1263
+ }
1264
+ if (!visibility.mobile && visibility.desktop) {
1265
+ return "hidden md:block";
1266
+ }
1267
+ if (visibility.mobile && !visibility.desktop) {
1268
+ return "md:hidden";
1269
+ }
1270
+ return "";
1271
+ }
1272
+ function Section({
1273
+ children: _children,
1274
+ verticalPadding = 48,
1275
+ horizontalPadding = 32,
1276
+ gap = 24,
1277
+ backgroundColor,
1278
+ backgroundImage,
1279
+ shadow = "none",
1280
+ borderRadius = 0,
1281
+ contentMaxWidth = "1400px",
1282
+ anchorLink,
1283
+ visibility,
1284
+ puck
1285
+ }) {
1286
+ const { resolveColor: resolveColor2 } = useTheme();
1287
+ const DropZone = puck?.renderDropZone;
1288
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1289
+ "section",
1290
+ {
1291
+ id: anchorLink,
1292
+ className: cn("flex w-full flex-col", getVisibilityClasses(visibility)),
1293
+ style: {
1294
+ padding: `${verticalPadding}px ${horizontalPadding}px`,
1295
+ gap: `${gap}px`,
1296
+ backgroundColor: resolveBackgroundColor(backgroundColor, resolveColor2),
1297
+ backgroundImage: backgroundImage ? `url(${backgroundImage})` : void 0,
1298
+ backgroundSize: "cover",
1299
+ backgroundPosition: "center",
1300
+ boxShadow: getShadowCSS(shadow),
1301
+ borderRadius: `${borderRadius}px`
1302
+ },
1303
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "mx-auto w-full", style: { maxWidth: contentMaxWidth }, children: DropZone && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DropZone, { zone: "content" }) })
1304
+ }
1305
+ );
1306
+ }
1307
+
1308
+ // components/page/Container.tsx
1309
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1310
+ var maxWidthMap2 = {
1311
+ sm: "640px",
1312
+ md: "768px",
1313
+ lg: "1024px",
1314
+ xl: "1280px",
1315
+ "2xl": "1536px",
1316
+ full: "100%"
1317
+ };
1318
+ var paddingMap = {
1319
+ none: "0",
1320
+ sm: "16px",
1321
+ md: "24px",
1322
+ lg: "32px",
1323
+ xl: "48px"
1324
+ };
1325
+ function isThemeableValue8(value) {
1326
+ return typeof value === "object" && value !== null && "useTheme" in value;
1327
+ }
1328
+ function Container({
1329
+ maxWidth = "lg",
1330
+ padding,
1331
+ paddingX = "md",
1332
+ paddingY = "none",
1333
+ backgroundColor,
1334
+ centered = true,
1335
+ id,
1336
+ puck
1337
+ }) {
1338
+ const { resolveColor: resolveColor2 } = useTheme();
1339
+ const DropZone = puck?.renderDropZone;
1340
+ const resolvedBgColor = (() => {
1341
+ if (!backgroundColor) return null;
1342
+ if (typeof backgroundColor === "string")
1343
+ return { color: backgroundColor, opacity: 100 };
1344
+ if (isThemeableValue8(backgroundColor)) {
1345
+ return backgroundColor.useTheme ? resolveColor2(backgroundColor.themeKey) : backgroundColor.value;
1346
+ }
1347
+ if ("color" in backgroundColor) return backgroundColor;
1348
+ return null;
1349
+ })();
1350
+ const effectivePaddingX = padding || paddingX;
1351
+ const effectivePaddingY = padding || paddingY;
1352
+ const style = {
1353
+ maxWidth: maxWidthMap2[maxWidth],
1354
+ marginLeft: centered ? "auto" : void 0,
1355
+ marginRight: centered ? "auto" : void 0,
1356
+ paddingLeft: paddingMap[effectivePaddingX],
1357
+ paddingRight: paddingMap[effectivePaddingX],
1358
+ paddingTop: paddingMap[effectivePaddingY],
1359
+ paddingBottom: paddingMap[effectivePaddingY],
1360
+ backgroundColor: resolvedBgColor ? hexToRgba(resolvedBgColor.color, resolvedBgColor.opacity) : void 0,
1361
+ width: "100%"
1362
+ };
1363
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { id, style, children: DropZone && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DropZone, { zone: "container-content" }) });
1364
+ }
1365
+
1366
+ // components/page/Columns.tsx
1367
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1368
+ var gapMap = {
1369
+ none: "0",
1370
+ sm: "16px",
1371
+ md: "24px",
1372
+ lg: "32px",
1373
+ xl: "48px"
1374
+ };
1375
+ var alignMap = {
1376
+ top: "flex-start",
1377
+ center: "center",
1378
+ bottom: "flex-end",
1379
+ stretch: "stretch"
1380
+ };
1381
+ function Columns({
1382
+ columns = 2,
1383
+ gap = "md",
1384
+ verticalAlign = "top",
1385
+ stackOnMobile = true,
1386
+ id,
1387
+ puck
1388
+ }) {
1389
+ const DropZone = puck?.renderDropZone;
1390
+ const containerStyle = {
1391
+ display: "grid",
1392
+ gridTemplateColumns: `repeat(${columns}, 1fr)`,
1393
+ gap: gapMap[gap],
1394
+ alignItems: alignMap[verticalAlign]
1395
+ };
1396
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { id, style: containerStyle, children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { minWidth: 0 }, children: DropZone && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DropZone, { zone: `column-${index}` }) }, index)) });
1397
+ }
1398
+
1399
+ // components/page/Card.tsx
1400
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1401
+ var borderWidthMap = {
1402
+ none: "0",
1403
+ thin: "1px",
1404
+ medium: "2px",
1405
+ thick: "4px"
1406
+ };
1407
+ var radiusMap5 = {
1408
+ none: "0",
1409
+ sm: "4px",
1410
+ md: "8px",
1411
+ lg: "16px",
1412
+ xl: "24px"
1413
+ };
1414
+ var shadowMap2 = {
1415
+ none: "none",
1416
+ sm: "0 1px 2px rgba(0,0,0,0.05)",
1417
+ md: "0 4px 6px rgba(0,0,0,0.1)",
1418
+ lg: "0 10px 15px rgba(0,0,0,0.1)",
1419
+ xl: "0 20px 25px rgba(0,0,0,0.15)"
1420
+ };
1421
+ var paddingMap2 = {
1422
+ none: "0",
1423
+ sm: "16px",
1424
+ md: "24px",
1425
+ lg: "32px",
1426
+ xl: "48px"
1427
+ };
1428
+ function isThemeableValue9(value) {
1429
+ return typeof value === "object" && value !== null && "useTheme" in value;
1430
+ }
1431
+ function Card({
1432
+ backgroundColor,
1433
+ borderColor,
1434
+ borderWidth = "thin",
1435
+ borderRadius = "md",
1436
+ shadow = "sm",
1437
+ padding = "md",
1438
+ id,
1439
+ puck
1440
+ }) {
1441
+ const { resolveColor: resolveColor2 } = useTheme();
1442
+ const DropZone = puck?.renderDropZone;
1443
+ const resolvedBgColor = (() => {
1444
+ if (!backgroundColor) return resolveColor2("background");
1445
+ if (typeof backgroundColor === "string")
1446
+ return { color: backgroundColor, opacity: 100 };
1447
+ if (isThemeableValue9(backgroundColor)) {
1448
+ return backgroundColor.useTheme ? resolveColor2(backgroundColor.themeKey) : backgroundColor.value;
1449
+ }
1450
+ if ("color" in backgroundColor) return backgroundColor;
1451
+ return resolveColor2("background");
1452
+ })();
1453
+ const resolvedBorderColor = (() => {
1454
+ if (!borderColor) return resolveColor2("muted");
1455
+ if (typeof borderColor === "string")
1456
+ return { color: borderColor, opacity: 100 };
1457
+ if (isThemeableValue9(borderColor)) {
1458
+ return borderColor.useTheme ? resolveColor2(borderColor.themeKey) : borderColor.value;
1459
+ }
1460
+ if ("color" in borderColor) return borderColor;
1461
+ return resolveColor2("muted");
1462
+ })();
1463
+ const style = {
1464
+ backgroundColor: hexToRgba(resolvedBgColor.color, resolvedBgColor.opacity),
1465
+ border: borderWidth !== "none" ? `${borderWidthMap[borderWidth]} solid ${hexToRgba(resolvedBorderColor.color, resolvedBorderColor.opacity)}` : "none",
1466
+ borderRadius: radiusMap5[borderRadius],
1467
+ boxShadow: shadowMap2[shadow],
1468
+ padding: paddingMap2[padding]
1469
+ };
1470
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { id, style, children: DropZone && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropZone, { zone: "card-content" }) });
1471
+ }
1472
+
1473
+ // components/page/Divider.tsx
1474
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1475
+ var thicknessMap = {
1476
+ thin: "1px",
1477
+ medium: "2px",
1478
+ thick: "4px"
1479
+ };
1480
+ var widthMap2 = {
1481
+ full: "100%",
1482
+ "3/4": "75%",
1483
+ "1/2": "50%",
1484
+ "1/4": "25%"
1485
+ };
1486
+ var spacingMap = {
1487
+ sm: "16px",
1488
+ md: "24px",
1489
+ lg: "32px",
1490
+ xl: "48px"
1491
+ };
1492
+ function isThemeableValue10(value) {
1493
+ return typeof value === "object" && value !== null && "useTheme" in value;
1494
+ }
1495
+ function Divider({
1496
+ style: lineStyle = "solid",
1497
+ thickness = "thin",
1498
+ color,
1499
+ width = "full",
1500
+ align = "center",
1501
+ spacing = "md",
1502
+ id
1503
+ }) {
1504
+ const { resolveColor: resolveColor2 } = useTheme();
1505
+ const resolvedColor = (() => {
1506
+ if (!color) return resolveColor2("muted");
1507
+ if (typeof color === "string") return { color, opacity: 100 };
1508
+ if (isThemeableValue10(color)) {
1509
+ return color.useTheme ? resolveColor2(color.themeKey) : color.value;
1510
+ }
1511
+ if ("color" in color) return color;
1512
+ return resolveColor2("muted");
1513
+ })();
1514
+ const wrapperStyle = {
1515
+ display: "flex",
1516
+ justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center",
1517
+ padding: `${spacingMap[spacing]} 0`
1518
+ };
1519
+ const hrStyle = {
1520
+ width: widthMap2[width],
1521
+ border: "none",
1522
+ borderTop: `${thicknessMap[thickness]} ${lineStyle} ${hexToRgba(resolvedColor.color, resolvedColor.opacity)}`,
1523
+ margin: 0
1524
+ };
1525
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { id, style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("hr", { style: hrStyle }) });
1526
+ }
1527
+
1528
+ // components/page/Spacer.tsx
1529
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1530
+ var sizeMap4 = {
1531
+ xs: "8px",
1532
+ sm: "16px",
1533
+ md: "24px",
1534
+ lg: "32px",
1535
+ xl: "48px",
1536
+ "2xl": "64px",
1537
+ "3xl": "96px"
1538
+ };
1539
+ function Spacer({ size = "md", id }) {
1540
+ const style = {
1541
+ height: sizeMap4[size],
1542
+ width: "100%"
1543
+ };
1544
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { id, style, "aria-hidden": "true" });
1545
+ }
1546
+
1547
+ // components/page/TextBlock.tsx
1548
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1549
+ var alignmentMap = {
1550
+ left: "text-left",
1551
+ center: "text-center",
1552
+ right: "text-right"
1553
+ };
1554
+ var sizeMap5 = {
1555
+ small: "text-2xl",
1556
+ "medium-small": "text-3xl",
1557
+ medium: "text-4xl",
1558
+ large: "text-5xl",
1559
+ xlarge: "text-6xl"
1560
+ };
1561
+ function isThemeableValue11(value) {
1562
+ return typeof value === "object" && value !== null && "useTheme" in value;
1563
+ }
1564
+ function isEntryBoundValue6(value) {
1565
+ return typeof value === "object" && value !== null && "useEntry" in value;
1566
+ }
1567
+ function resolveColor(color, resolveThemeColor) {
1568
+ if (!color) return "#000000";
1569
+ if (typeof color === "string") return color;
1570
+ if (isThemeableValue11(color)) {
1571
+ if (color.useTheme) {
1572
+ const themeColor = resolveThemeColor(color.themeKey);
1573
+ return hexToRgba(themeColor.color, themeColor.opacity);
1574
+ }
1575
+ return hexToRgba(color.value.color, color.value.opacity);
1576
+ }
1577
+ if ("color" in color && "opacity" in color) {
1578
+ return hexToRgba(color.color, color.opacity);
1579
+ }
1580
+ return "#000000";
1581
+ }
1582
+ function resolveColorHex(color, resolveThemeColor) {
1583
+ if (!color) return "#000000";
1584
+ if (typeof color === "string") return color;
1585
+ if (isThemeableValue11(color)) {
1586
+ if (color.useTheme) {
1587
+ return resolveThemeColor(color.themeKey).color;
1588
+ }
1589
+ return color.value.color;
1590
+ }
1591
+ if ("color" in color) {
1592
+ return color.color;
1593
+ }
1594
+ return "#000000";
1595
+ }
1596
+ function TextBlock({
1597
+ title,
1598
+ subtitle,
1599
+ body,
1600
+ alignment = "left",
1601
+ textSize = "medium",
1602
+ textColor,
1603
+ subtitleBodyColor,
1604
+ useGradientText = false,
1605
+ gradientColor1,
1606
+ gradientColor2,
1607
+ anchorLink
1608
+ }) {
1609
+ const { resolveColor: resolveThemeColor } = useTheme();
1610
+ const { getEntryValue } = useEntries();
1611
+ const resolveText = (value) => {
1612
+ if (!value) return void 0;
1613
+ if (typeof value === "string") return value;
1614
+ if (isEntryBoundValue6(value)) {
1615
+ if (value.useEntry) {
1616
+ const entryVal = getEntryValue(value.entryName, value.fieldKey);
1617
+ return entryVal != null ? String(entryVal) : void 0;
1618
+ }
1619
+ return value.value;
1620
+ }
1621
+ return void 0;
1622
+ };
1623
+ const resolvedTitle = resolveText(title);
1624
+ const resolvedSubtitle = resolveText(subtitle);
1625
+ const resolvedBody = resolveText(body);
1626
+ const titleColorValue = resolveColor(textColor, resolveThemeColor);
1627
+ const subtitleColorValue = resolveColor(subtitleBodyColor, resolveThemeColor);
1628
+ const gradientStyle = useGradientText ? {
1629
+ backgroundImage: `linear-gradient(90deg, ${resolveColorHex(gradientColor1, resolveThemeColor)}, ${resolveColorHex(gradientColor2, resolveThemeColor)})`,
1630
+ WebkitBackgroundClip: "text",
1631
+ WebkitTextFillColor: "transparent",
1632
+ backgroundClip: "text"
1633
+ } : { color: titleColorValue };
1634
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1635
+ "div",
1636
+ {
1637
+ id: anchorLink,
1638
+ className: cn("flex flex-col gap-4", alignmentMap[alignment]),
1639
+ children: [
1640
+ resolvedTitle && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1641
+ "h2",
1642
+ {
1643
+ className: cn("font-bold", sizeMap5[textSize]),
1644
+ style: gradientStyle,
1645
+ children: resolvedTitle
1646
+ }
1647
+ ),
1648
+ resolvedSubtitle && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-xl", style: { color: subtitleColorValue }, children: resolvedSubtitle }),
1649
+ resolvedBody && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1650
+ "div",
1651
+ {
1652
+ className: "prose max-w-none",
1653
+ style: { color: subtitleColorValue },
1654
+ dangerouslySetInnerHTML: { __html: resolvedBody }
1655
+ }
1656
+ )
1657
+ ]
1658
+ }
1659
+ );
1660
+ }
1661
+
1662
+ // components/page/CustomImage.tsx
1663
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1664
+ var alignmentMap2 = {
1665
+ left: "mr-auto",
1666
+ center: "mx-auto",
1667
+ right: "ml-auto"
1668
+ };
1669
+ function CustomImage({
1670
+ image,
1671
+ alt = "",
1672
+ maxWidth,
1673
+ alignment = "center",
1674
+ fitContent = false
1675
+ }) {
1676
+ if (!image) {
1677
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex h-48 w-full items-center justify-center bg-gray-200 text-gray-400", children: "No image" });
1678
+ }
1679
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1680
+ "img",
1681
+ {
1682
+ src: image,
1683
+ alt,
1684
+ className: cn(
1685
+ "block",
1686
+ alignmentMap2[alignment],
1687
+ fitContent && "h-full w-full object-cover"
1688
+ ),
1689
+ style: { maxWidth: maxWidth ? `${maxWidth}px` : void 0 }
1690
+ }
1691
+ );
1692
+ }
1693
+
1694
+ // components/page/FeaturesList.tsx
1695
+ var import_lucide_react = require("lucide-react");
1696
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1697
+ var sizeMap6 = {
1698
+ small: { icon: 24, title: "text-base", desc: "text-sm" },
1699
+ medium: { icon: 32, title: "text-lg", desc: "text-base" },
1700
+ large: { icon: 48, title: "text-xl", desc: "text-lg" }
1701
+ };
1702
+ function FeaturesList({
1703
+ features = [],
1704
+ align = "left",
1705
+ size = "medium",
1706
+ iconColor = "#000000",
1707
+ anchorLink
1708
+ }) {
1709
+ const sizeConfig = sizeMap6[size];
1710
+ const getIcon = (iconName) => {
1711
+ const formatted = iconName.charAt(0).toUpperCase() + iconName.slice(1);
1712
+ return import_lucide_react.icons[formatted] || null;
1713
+ };
1714
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1715
+ "div",
1716
+ {
1717
+ id: anchorLink,
1718
+ className: cn(
1719
+ "flex flex-col gap-6",
1720
+ align === "center" && "items-center text-center",
1721
+ align === "right" && "items-end text-right"
1722
+ ),
1723
+ children: features.map((feature, index) => {
1724
+ const IconComponent = feature.icon ? getIcon(feature.icon) : null;
1725
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1726
+ "div",
1727
+ {
1728
+ className: cn(
1729
+ "flex gap-4",
1730
+ align === "center" && "flex-col items-center",
1731
+ align === "right" && "flex-row-reverse"
1732
+ ),
1733
+ children: [
1734
+ feature.image ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1735
+ "img",
1736
+ {
1737
+ src: feature.image,
1738
+ alt: feature.title || "",
1739
+ className: "object-contain",
1740
+ style: { width: sizeConfig.icon, height: sizeConfig.icon }
1741
+ }
1742
+ ) : IconComponent ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1743
+ IconComponent,
1744
+ {
1745
+ size: sizeConfig.icon,
1746
+ style: { color: iconColor },
1747
+ className: "flex-shrink-0"
1748
+ }
1749
+ ) : null,
1750
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1", children: [
1751
+ feature.title && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { className: cn("font-semibold", sizeConfig.title), children: feature.title }),
1752
+ feature.description && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: cn("text-gray-600", sizeConfig.desc), children: feature.description })
1753
+ ] })
1754
+ ]
1755
+ },
1756
+ index
1757
+ );
1758
+ })
1759
+ }
1760
+ );
1761
+ }
1762
+
1763
+ // components/page/FeatureGrid.tsx
1764
+ var import_lucide_react2 = require("lucide-react");
1765
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1766
+ var sizeMap7 = {
1767
+ small: { icon: 24, title: "text-base", desc: "text-sm" },
1768
+ medium: { icon: 32, title: "text-lg", desc: "text-base" },
1769
+ large: { icon: 48, title: "text-xl", desc: "text-lg" }
1770
+ };
1771
+ function FeatureGrid({
1772
+ heading,
1773
+ description,
1774
+ features = [],
1775
+ columns = 3,
1776
+ align = "left",
1777
+ size = "medium",
1778
+ iconColor = "#3B82F6",
1779
+ textColor = "#000000",
1780
+ anchorLink
1781
+ }) {
1782
+ const sizeConfig = sizeMap7[size];
1783
+ const getIcon = (iconName) => {
1784
+ const formatted = iconName.charAt(0).toUpperCase() + iconName.slice(1);
1785
+ return import_lucide_react2.icons[formatted] || null;
1786
+ };
1787
+ const columnClass = {
1788
+ 2: "grid-cols-1 md:grid-cols-2",
1789
+ 3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
1790
+ 4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
1791
+ };
1792
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { id: anchorLink, className: "flex flex-col gap-8", children: [
1793
+ (heading || description) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1794
+ "div",
1795
+ {
1796
+ className: cn(
1797
+ "flex flex-col gap-2",
1798
+ align === "center" && "text-center",
1799
+ align === "right" && "text-right"
1800
+ ),
1801
+ children: [
1802
+ heading && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { className: "text-3xl font-bold", style: { color: textColor }, children: heading }),
1803
+ description && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-gray-600", children: description })
1804
+ ]
1805
+ }
1806
+ ),
1807
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: cn("grid gap-6", columnClass[columns]), children: features.map((feature, index) => {
1808
+ const IconComponent = feature.icon ? getIcon(feature.icon) : null;
1809
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1810
+ "div",
1811
+ {
1812
+ className: cn(
1813
+ "flex flex-col gap-3 rounded-lg bg-gray-50 p-6",
1814
+ align === "center" && "items-center text-center"
1815
+ ),
1816
+ children: [
1817
+ feature.image ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1818
+ "img",
1819
+ {
1820
+ src: feature.image,
1821
+ alt: feature.title || "",
1822
+ className: "object-contain",
1823
+ style: { width: sizeConfig.icon, height: sizeConfig.icon }
1824
+ }
1825
+ ) : IconComponent ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1826
+ IconComponent,
1827
+ {
1828
+ size: sizeConfig.icon,
1829
+ style: { color: iconColor }
1830
+ }
1831
+ ) : null,
1832
+ feature.title && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1833
+ "h3",
1834
+ {
1835
+ className: cn("font-semibold", sizeConfig.title),
1836
+ style: { color: textColor },
1837
+ children: feature.title
1838
+ }
1839
+ ),
1840
+ feature.description && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: cn("text-gray-600", sizeConfig.desc), children: feature.description })
1841
+ ]
1842
+ },
1843
+ index
1844
+ );
1845
+ }) })
1846
+ ] });
1847
+ }
1848
+
1849
+ // components/page/Footer.tsx
1850
+ var import_lucide_react3 = require("lucide-react");
1851
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1852
+ function Footer({
1853
+ logo,
1854
+ copyright = "\xA9 2024 Company. All rights reserved.",
1855
+ backgroundColor = "#111827",
1856
+ textColor = "#ffffff",
1857
+ facebookUrl,
1858
+ instagramUrl,
1859
+ twitterUrl,
1860
+ puck
1861
+ }) {
1862
+ const DropZone = puck?.renderDropZone;
1863
+ const utm = useUtmParams();
1864
+ const sendEvent = useGtmEvent();
1865
+ const getSocialPlatform = (url) => {
1866
+ if (url.includes("facebook")) return "facebook";
1867
+ if (url.includes("instagram")) return "instagram";
1868
+ if (url.includes("twitter")) return "twitter";
1869
+ return "social";
1870
+ };
1871
+ const handleSocialClick = (url) => {
1872
+ const platform = getSocialPlatform(url);
1873
+ sendEvent("social_click", {
1874
+ platform,
1875
+ url,
1876
+ ...utm
1877
+ });
1878
+ };
1879
+ const socialLinks = [
1880
+ { url: facebookUrl, Icon: import_lucide_react3.Facebook },
1881
+ { url: instagramUrl, Icon: import_lucide_react3.Instagram },
1882
+ { url: twitterUrl, Icon: import_lucide_react3.Twitter }
1883
+ ].filter(
1884
+ (link) => !!link.url
1885
+ );
1886
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1887
+ "footer",
1888
+ {
1889
+ className: "w-full px-6 py-8",
1890
+ style: { backgroundColor, color: textColor },
1891
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "mx-auto flex max-w-7xl flex-col items-center justify-between gap-6 md:flex-row", children: [
1892
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex items-center gap-4", children: logo && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("img", { src: logo, alt: "Logo", className: "h-8" }) }),
1893
+ DropZone && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropZone, { zone: "footer-content" }),
1894
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex items-center gap-4", children: socialLinks.map(({ url, Icon: Icon3 }, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1895
+ "a",
1896
+ {
1897
+ href: url,
1898
+ target: "_blank",
1899
+ rel: "noopener noreferrer",
1900
+ className: "transition-opacity hover:opacity-80",
1901
+ onClick: () => handleSocialClick(url),
1902
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon3, { size: 24, style: { color: textColor } })
1903
+ },
1904
+ index
1905
+ )) }),
1906
+ copyright && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-sm opacity-80", children: copyright })
1907
+ ] })
1908
+ }
1909
+ );
1910
+ }
1911
+
1912
+ // components/page/Topbar.tsx
1913
+ var import_react5 = require("react");
1914
+ var import_lucide_react4 = require("lucide-react");
1915
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1916
+ function Topbar({
1917
+ logo,
1918
+ logoUrl = "/",
1919
+ navItems = [],
1920
+ backgroundColor = "#ffffff",
1921
+ textColor = "#000000",
1922
+ maxWidth = "1400px",
1923
+ puck
1924
+ }) {
1925
+ const DropZone = puck?.renderDropZone;
1926
+ const [mobileMenuOpen, setMobileMenuOpen] = (0, import_react5.useState)(false);
1927
+ const utm = useUtmParams();
1928
+ const sendEvent = useGtmEvent();
1929
+ const handleNavClick = (item) => {
1930
+ sendEvent("nav_click", {
1931
+ name: item.name,
1932
+ url: item.url,
1933
+ linkType: item.linkType || "internal",
1934
+ ...utm
1935
+ });
1936
+ };
1937
+ const handleMobileMenuToggle = () => {
1938
+ const newState = !mobileMenuOpen;
1939
+ setMobileMenuOpen(newState);
1940
+ sendEvent("mobile_menu_toggle", {
1941
+ open: newState,
1942
+ ...utm
1943
+ });
1944
+ };
1945
+ const renderLink = (item, index) => {
1946
+ const className = "hover:opacity-80 transition-opacity";
1947
+ if (item.linkType === "external") {
1948
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1949
+ "a",
1950
+ {
1951
+ href: item.url,
1952
+ target: "_blank",
1953
+ rel: "noopener noreferrer",
1954
+ className,
1955
+ onClick: () => handleNavClick(item),
1956
+ children: item.name
1957
+ },
1958
+ index
1959
+ );
1960
+ }
1961
+ if (item.linkType === "scrollTo") {
1962
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1963
+ "a",
1964
+ {
1965
+ href: item.url,
1966
+ className,
1967
+ onClick: () => handleNavClick(item),
1968
+ children: item.name
1969
+ },
1970
+ index
1971
+ );
1972
+ }
1973
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1974
+ "a",
1975
+ {
1976
+ href: item.url,
1977
+ className,
1978
+ onClick: () => handleNavClick(item),
1979
+ children: item.name
1980
+ },
1981
+ index
1982
+ );
1983
+ };
1984
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1985
+ "nav",
1986
+ {
1987
+ className: "sticky top-0 z-50 w-full px-6 py-4",
1988
+ style: { backgroundColor, color: textColor },
1989
+ children: [
1990
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1991
+ "div",
1992
+ {
1993
+ className: "mx-auto flex items-center justify-between",
1994
+ style: { maxWidth },
1995
+ children: [
1996
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1997
+ "a",
1998
+ {
1999
+ href: logoUrl,
2000
+ className: "flex-shrink-0",
2001
+ onClick: () => sendEvent("nav_click", {
2002
+ name: "logo",
2003
+ url: logoUrl,
2004
+ linkType: "internal",
2005
+ ...utm
2006
+ }),
2007
+ children: logo ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("img", { src: logo, alt: "Logo", className: "h-8" }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-xl font-bold", children: "Logo" })
2008
+ }
2009
+ ),
2010
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "hidden items-center gap-8 md:flex", children: [
2011
+ navItems.map(renderLink),
2012
+ DropZone && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DropZone, { zone: "cta" })
2013
+ ] }),
2014
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { className: "md:hidden", onClick: handleMobileMenuToggle, children: mobileMenuOpen ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react4.X, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react4.Menu, { size: 24 }) })
2015
+ ]
2016
+ }
2017
+ ),
2018
+ mobileMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2019
+ "div",
2020
+ {
2021
+ className: "absolute top-full right-0 left-0 flex flex-col gap-4 px-6 py-4 md:hidden",
2022
+ style: { backgroundColor },
2023
+ children: [
2024
+ navItems.map(renderLink),
2025
+ DropZone && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DropZone, { zone: "cta" })
2026
+ ]
2027
+ }
2028
+ )
2029
+ ]
2030
+ }
2031
+ );
2032
+ }
2033
+
2034
+ // components/page/Popup.tsx
2035
+ var import_react6 = require("react");
2036
+ var import_lucide_react5 = require("lucide-react");
2037
+ var import_jsx_runtime22 = require("react/jsx-runtime");
2038
+ function Icon2({ name, ...props }) {
2039
+ const formatted = name.charAt(0).toUpperCase() + name.slice(1);
2040
+ const IconComponent = import_lucide_react5.icons[formatted];
2041
+ if (!IconComponent) return null;
2042
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(IconComponent, { ...props });
2043
+ }
2044
+ var widthMap3 = {
2045
+ small: "max-w-sm",
2046
+ medium: "max-w-lg",
2047
+ large: "max-w-2xl"
2048
+ };
2049
+ var sizeMap8 = {
2050
+ small: "px-3 py-1.5 text-sm",
2051
+ medium: "px-4 py-2 text-base",
2052
+ large: "px-6 py-3 text-lg"
2053
+ };
2054
+ function Popup({
2055
+ ctaText = "Open",
2056
+ buttonColor = "#3B82F6",
2057
+ textColor = "#ffffff",
2058
+ icon,
2059
+ iconPosition = "left",
2060
+ size = "medium",
2061
+ width = "medium",
2062
+ textLink = false,
2063
+ puck
2064
+ }) {
2065
+ const [isOpen, setIsOpen] = (0, import_react6.useState)(false);
2066
+ const utm = useUtmParams();
2067
+ const sendEvent = useGtmEvent();
2068
+ const handleOpen = () => {
2069
+ setIsOpen(true);
2070
+ sendEvent("popup_open", {
2071
+ ctaText,
2072
+ type: textLink ? "link" : "button",
2073
+ ...utm
2074
+ });
2075
+ };
2076
+ const handleClose = () => {
2077
+ setIsOpen(false);
2078
+ sendEvent("popup_close", { ctaText, ...utm });
2079
+ };
2080
+ const trigger = textLink ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2081
+ "button",
2082
+ {
2083
+ onClick: handleOpen,
2084
+ className: "underline hover:opacity-80",
2085
+ style: { color: buttonColor },
2086
+ children: ctaText
2087
+ }
2088
+ ) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2089
+ "button",
2090
+ {
2091
+ onClick: handleOpen,
2092
+ className: cn(
2093
+ "flex items-center gap-2 rounded-full font-medium",
2094
+ sizeMap8[size]
2095
+ ),
2096
+ style: { backgroundColor: buttonColor, color: textColor },
2097
+ children: [
2098
+ icon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon2, { name: icon, size: 18 }),
2099
+ ctaText,
2100
+ icon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon2, { name: icon, size: 18 })
2101
+ ]
2102
+ }
2103
+ );
2104
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
2105
+ trigger,
2106
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2107
+ "div",
2108
+ {
2109
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
2110
+ onClick: handleClose,
2111
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2112
+ "div",
2113
+ {
2114
+ className: cn(
2115
+ "relative w-full rounded-lg bg-white p-6",
2116
+ widthMap3[width]
2117
+ ),
2118
+ onClick: (e) => e.stopPropagation(),
2119
+ children: [
2120
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2121
+ "button",
2122
+ {
2123
+ onClick: handleClose,
2124
+ className: "absolute top-4 right-4 text-gray-500 hover:text-gray-700",
2125
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react5.X, { size: 24 })
2126
+ }
2127
+ ),
2128
+ puck && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(puck.renderDropZone, { zone: "popup-content" })
2129
+ ]
2130
+ }
2131
+ )
2132
+ }
2133
+ )
2134
+ ] });
2135
+ }
2136
+ // Annotate the CommonJS export names for ESM import in node:
2137
+ 0 && (module.exports = {
2138
+ Button,
2139
+ Card,
2140
+ Columns,
2141
+ Container,
2142
+ CustomImage,
2143
+ DEFAULT_THEME,
2144
+ Divider,
2145
+ FeatureGrid,
2146
+ FeaturesList,
2147
+ Footer,
2148
+ Heading,
2149
+ Icon,
2150
+ Image,
2151
+ ImageCarousel,
2152
+ Paragraph,
2153
+ Popup,
2154
+ Section,
2155
+ Spacer,
2156
+ TextBlock,
2157
+ ThemeProvider,
2158
+ Topbar,
2159
+ VideoEmbed,
2160
+ availableIcons,
2161
+ useTheme
2162
+ });