@mission-studio/puck 1.0.23 → 1.0.24

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.
@@ -166,181 +166,7 @@ function Paragraph({
166
166
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { id, style, children: resolvedText });
167
167
  }
168
168
 
169
- // entries/context.tsx
170
- var import_react = require("react");
171
- var import_jsx_runtime3 = require("react/jsx-runtime");
172
- var EntriesContext = (0, import_react.createContext)(null);
173
- function useEntries() {
174
- const context = (0, import_react.useContext)(EntriesContext);
175
- if (!context) {
176
- return {
177
- entries: [],
178
- entryNames: [],
179
- getEntry: () => void 0,
180
- getEntryValue: () => void 0
181
- };
182
- }
183
- return context;
184
- }
185
-
186
- // hooks/useGtmEvent.ts
187
- function useGtmEvent() {
188
- return (eventName, data) => {
189
- if (typeof window === "undefined") return;
190
- if (typeof window.gtag === "function") {
191
- window.gtag("event", eventName, data || {});
192
- }
193
- };
194
- }
195
-
196
- // hooks/useUtmParams.ts
197
- var import_react2 = require("react");
198
- function useUtmParams() {
199
- const [utmParams, setUtmParams] = (0, import_react2.useState)({});
200
- (0, import_react2.useEffect)(() => {
201
- if (typeof window === "undefined") return;
202
- const urlParams = new URLSearchParams(window.location.search);
203
- const source = urlParams.get("utm_source");
204
- const medium = urlParams.get("utm_medium");
205
- const campaign = urlParams.get("utm_campaign");
206
- const content = urlParams.get("utm_content");
207
- const term = urlParams.get("utm_term");
208
- const params = {};
209
- if (source) {
210
- params.source = source;
211
- sessionStorage.setItem("utm_source", source);
212
- } else {
213
- const stored = sessionStorage.getItem("utm_source");
214
- if (stored) params.source = stored;
215
- }
216
- if (medium) {
217
- params.medium = medium;
218
- sessionStorage.setItem("utm_medium", medium);
219
- } else {
220
- const stored = sessionStorage.getItem("utm_medium");
221
- if (stored) params.medium = stored;
222
- }
223
- if (campaign) {
224
- params.campaign = campaign;
225
- sessionStorage.setItem("utm_campaign", campaign);
226
- } else {
227
- const stored = sessionStorage.getItem("utm_campaign");
228
- if (stored) params.campaign = stored;
229
- }
230
- if (content) {
231
- params.content = content;
232
- sessionStorage.setItem("utm_content", content);
233
- } else {
234
- const stored = sessionStorage.getItem("utm_content");
235
- if (stored) params.content = stored;
236
- }
237
- if (term) {
238
- params.term = term;
239
- sessionStorage.setItem("utm_term", term);
240
- } else {
241
- const stored = sessionStorage.getItem("utm_term");
242
- if (stored) params.term = stored;
243
- }
244
- setUtmParams(params);
245
- }, []);
246
- return utmParams;
247
- }
248
-
249
- // theme/context.tsx
250
- var import_react3 = require("react");
251
-
252
- // theme/defaults.ts
253
- var DEFAULT_THEME = {
254
- id: "default",
255
- name: "Default Theme",
256
- colors: {
257
- primary: { color: "#3B82F6", opacity: 100 },
258
- secondary: { color: "#8B5CF6", opacity: 100 },
259
- accent: { color: "#10B981", opacity: 100 },
260
- background: { color: "#FFFFFF", opacity: 100 },
261
- foreground: { color: "#111827", opacity: 100 },
262
- muted: { color: "#F3F4F6", opacity: 100 }
263
- },
264
- typography: {
265
- fontFamily: {
266
- heading: "system-ui, sans-serif",
267
- body: "system-ui, sans-serif"
268
- },
269
- fontSize: {
270
- base: "base",
271
- heading: "4xl"
272
- },
273
- fontWeight: {
274
- normal: 400,
275
- heading: 700
276
- }
277
- },
278
- spacing: {
279
- xs: 8,
280
- sm: 12,
281
- md: 16,
282
- lg: 24,
283
- xl: 32
284
- },
285
- borders: {
286
- radiusSmall: 4,
287
- radiusMedium: 8,
288
- radiusLarge: 16
289
- },
290
- shadows: {
291
- small: "sm",
292
- medium: "md",
293
- large: "lg"
294
- }
295
- };
296
-
297
- // theme/context.tsx
298
- var import_jsx_runtime4 = require("react/jsx-runtime");
299
- var ThemeContext = (0, import_react3.createContext)(null);
300
- function useTheme() {
301
- const context = (0, import_react3.useContext)(ThemeContext);
302
- if (!context) {
303
- return {
304
- theme: DEFAULT_THEME,
305
- resolveColor: (key) => DEFAULT_THEME.colors[key],
306
- resolveSpacing: (key) => DEFAULT_THEME.spacing[key],
307
- resolveBorderRadius: (key) => DEFAULT_THEME.borders[key],
308
- resolveShadow: (key) => DEFAULT_THEME.shadows[key]
309
- };
310
- }
311
- return context;
312
- }
313
-
314
- // utils/index.ts
315
- var import_tailwind_merge = require("tailwind-merge");
316
- var import_clsx = require("clsx");
317
- function hexToRgba(hex, opacity) {
318
- if (hex.startsWith("rgba(")) {
319
- const rgbaMatch = hex.match(
320
- /rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)/
321
- );
322
- if (rgbaMatch) {
323
- return `rgba(${rgbaMatch[1]}, ${rgbaMatch[2]}, ${rgbaMatch[3]}, ${opacity / 100})`;
324
- }
325
- }
326
- if (hex.startsWith("rgb(")) {
327
- const rgbMatch = hex.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
328
- if (rgbMatch) {
329
- return `rgba(${rgbMatch[1]}, ${rgbMatch[2]}, ${rgbMatch[3]}, ${opacity / 100})`;
330
- }
331
- }
332
- const sanitized = hex.replace("#", "");
333
- const r = parseInt(sanitized.slice(0, 2), 16);
334
- const g = parseInt(sanitized.slice(2, 4), 16);
335
- const b = parseInt(sanitized.slice(4, 6), 16);
336
- return `rgba(${r}, ${g}, ${b}, ${opacity / 100})`;
337
- }
338
- function cn(...inputs) {
339
- return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
340
- }
341
-
342
- // components/page/Button.tsx
343
- var import_jsx_runtime5 = require("react/jsx-runtime");
169
+ // components/page/primitives/Button.ts
344
170
  var sizeStyles = {
345
171
  sm: { padding: "8px 16px", fontSize: "0.875rem" },
346
172
  md: { padding: "12px 24px", fontSize: "1rem" },
@@ -354,75 +180,8 @@ var radiusMap = {
354
180
  lg: "16px",
355
181
  full: "9999px"
356
182
  };
357
- function isThemeableValue(value) {
358
- return typeof value === "object" && value !== null && "useTheme" in value;
359
- }
360
- function isEntryBoundValue(value) {
361
- return typeof value === "object" && value !== null && "useEntry" in value;
362
- }
363
- function Button({
364
- text,
365
- href,
366
- target = "_self",
367
- variant = "solid",
368
- size = "md",
369
- color,
370
- textColor,
371
- borderRadius = "md",
372
- fullWidth = false,
373
- align = "center",
374
- id
375
- }) {
376
- const { resolveColor: resolveColor2 } = useTheme();
377
- const { getEntryValue } = useEntries();
378
- const utm = useUtmParams();
379
- const sendEvent = useGtmEvent();
380
- const resolvedText = (() => {
381
- if (!text) return "Button";
382
- if (typeof text === "string") return text;
383
- if (isEntryBoundValue(text)) {
384
- if (text.useEntry) {
385
- return String(getEntryValue(text.entryName, text.fieldKey) ?? "Button");
386
- }
387
- return text.value;
388
- }
389
- return "Button";
390
- })();
391
- const handleClick = () => {
392
- const sessionId = typeof window !== "undefined" ? sessionStorage.getItem("session_id") : null;
393
- sendEvent("button_click", {
394
- text: resolvedText,
395
- href: href || void 0,
396
- variant,
397
- session_id: sessionId,
398
- ...utm
399
- });
400
- };
401
- const resolvedColor = (() => {
402
- if (!color) return resolveColor2("primary");
403
- if (typeof color === "string") return { color, opacity: 100 };
404
- if (isThemeableValue(color)) {
405
- return color.useTheme ? resolveColor2(color.themeKey) : color.value;
406
- }
407
- if ("color" in color) return color;
408
- return resolveColor2("primary");
409
- })();
410
- const resolvedTextColor = (() => {
411
- if (!textColor) {
412
- if (variant === "solid") return { color: "#FFFFFF", opacity: 100 };
413
- return resolvedColor;
414
- }
415
- if (typeof textColor === "string")
416
- return { color: textColor, opacity: 100 };
417
- if (isThemeableValue(textColor)) {
418
- return textColor.useTheme ? resolveColor2(textColor.themeKey) : textColor.value;
419
- }
420
- if ("color" in textColor) return textColor;
421
- return { color: "#FFFFFF", opacity: 100 };
422
- })();
423
- const bgColor = hexToRgba(resolvedColor.color, resolvedColor.opacity);
424
- const fgColor = hexToRgba(resolvedTextColor.color, resolvedTextColor.opacity);
425
- const baseStyle = {
183
+ function getBaseStyle(size, borderRadius, fullWidth) {
184
+ return {
426
185
  ...sizeStyles[size],
427
186
  borderRadius: radiusMap[borderRadius],
428
187
  fontWeight: 600,
@@ -435,6 +194,8 @@ function Button({
435
194
  width: fullWidth ? "100%" : "auto",
436
195
  border: "none"
437
196
  };
197
+ }
198
+ function getVariantStyles(variant, bgColor, fgColor) {
438
199
  const variantStyles = {
439
200
  solid: {
440
201
  backgroundColor: bgColor,
@@ -456,14 +217,45 @@ function Button({
456
217
  textDecoration: "underline"
457
218
  }
458
219
  };
459
- const style = { ...baseStyle, ...variantStyles[variant] };
460
- const wrapperStyle = {
220
+ return variantStyles[variant] || variantStyles.solid;
221
+ }
222
+ function getWrapperStyle(align) {
223
+ return {
461
224
  display: "flex",
462
225
  justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center"
463
226
  };
464
- const content = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style, children: resolvedText });
227
+ }
228
+
229
+ // components/page/astro/Button.tsx
230
+ var import_jsx_runtime3 = require("react/jsx-runtime");
231
+ function Button({
232
+ text,
233
+ href,
234
+ target = "_self",
235
+ variant = "solid",
236
+ size = "md",
237
+ color,
238
+ textColor,
239
+ borderRadius = "md",
240
+ fullWidth = false,
241
+ align = "center",
242
+ id
243
+ }) {
244
+ const resolvedText = typeof text === "string" ? text : "Button";
245
+ const bgColor = typeof color === "string" ? color : "rgba(99, 102, 241, 1)";
246
+ const fgColor = typeof textColor === "string" ? textColor : variant === "solid" ? "rgba(255, 255, 255, 1)" : bgColor;
247
+ const baseStyle = getBaseStyle(size, borderRadius, fullWidth);
248
+ const variantStyle = getVariantStyles(variant, bgColor, fgColor);
249
+ const style = { ...baseStyle, ...variantStyle };
250
+ const wrapperStyle = getWrapperStyle(align);
251
+ const dataAttrs = {
252
+ "data-gtm-event": "button_click",
253
+ "data-gtm-text": resolvedText,
254
+ "data-gtm-href": href || "",
255
+ "data-gtm-variant": variant
256
+ };
465
257
  if (href) {
466
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
258
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
467
259
  "a",
468
260
  {
469
261
  id,
@@ -471,16 +263,15 @@ function Button({
471
263
  target,
472
264
  style,
473
265
  rel: target === "_blank" ? "noopener noreferrer" : void 0,
474
- onClick: handleClick,
266
+ ...dataAttrs,
475
267
  children: resolvedText
476
268
  }
477
269
  ) });
478
270
  }
479
- 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 }) });
271
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { id, type: "button", style, ...dataAttrs, children: resolvedText }) });
480
272
  }
481
273
 
482
- // components/page/Image.tsx
483
- var import_jsx_runtime6 = require("react/jsx-runtime");
274
+ // components/page/primitives/Image.ts
484
275
  var widthMap = {
485
276
  auto: "auto",
486
277
  full: "100%",
@@ -511,66 +302,16 @@ var shadowMap = {
511
302
  lg: "0 10px 15px rgba(0,0,0,0.1)",
512
303
  xl: "0 20px 25px rgba(0,0,0,0.15)"
513
304
  };
514
- function isThemeableValue2(value) {
515
- return typeof value === "object" && value !== null && "useTheme" in value;
516
- }
517
- function isEntryBoundValue2(value) {
518
- return typeof value === "object" && value !== null && "useEntry" in value;
519
- }
520
- function Image({
521
- src,
522
- alt = "",
523
- width = "full",
524
- aspectRatio = "auto",
525
- objectFit = "cover",
526
- borderRadius = "none",
527
- shadow = "none",
528
- align = "center",
529
- caption,
530
- captionColor,
531
- id
532
- }) {
533
- const { resolveColor: resolveColor2 } = useTheme();
534
- const { getEntryValue } = useEntries();
535
- const resolvedSrc = (() => {
536
- if (!src) return "";
537
- if (typeof src === "string") return src;
538
- if (isEntryBoundValue2(src)) {
539
- if (src.useEntry) {
540
- return String(getEntryValue(src.entryName, src.fieldKey) ?? "");
541
- }
542
- return src.value;
543
- }
544
- return "";
545
- })();
546
- const resolvedCaption = (() => {
547
- if (!caption) return "";
548
- if (typeof caption === "string") return caption;
549
- if (isEntryBoundValue2(caption)) {
550
- if (caption.useEntry) {
551
- return String(getEntryValue(caption.entryName, caption.fieldKey) ?? "");
552
- }
553
- return caption.value;
554
- }
555
- return "";
556
- })();
557
- const resolvedCaptionColor = (() => {
558
- if (!captionColor) return resolveColor2("muted");
559
- if (typeof captionColor === "string")
560
- return { color: captionColor, opacity: 100 };
561
- if (isThemeableValue2(captionColor)) {
562
- return captionColor.useTheme ? resolveColor2(captionColor.themeKey) : captionColor.value;
563
- }
564
- if ("color" in captionColor) return captionColor;
565
- return resolveColor2("muted");
566
- })();
567
- const wrapperStyle = {
305
+ function getWrapperStyle2(align) {
306
+ return {
568
307
  display: "flex",
569
308
  flexDirection: "column",
570
309
  alignItems: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center",
571
310
  gap: "8px"
572
311
  };
573
- const imageStyle = {
312
+ }
313
+ function getImageStyle(width, aspectRatio, objectFit, borderRadius, shadow) {
314
+ return {
574
315
  width: widthMap[width],
575
316
  maxWidth: "100%",
576
317
  aspectRatio: aspectRatioMap[aspectRatio],
@@ -579,18 +320,49 @@ function Image({
579
320
  boxShadow: shadowMap[shadow],
580
321
  display: "block"
581
322
  };
582
- const captionStyle = {
323
+ }
324
+ function getCaptionStyle(align, width, captionColor) {
325
+ return {
583
326
  fontSize: "0.875rem",
584
- color: hexToRgba(resolvedCaptionColor.color, resolvedCaptionColor.opacity),
327
+ color: captionColor,
585
328
  textAlign: align,
586
329
  maxWidth: widthMap[width]
587
330
  };
331
+ }
332
+
333
+ // components/page/astro/Image.tsx
334
+ var import_jsx_runtime4 = require("react/jsx-runtime");
335
+ function Image({
336
+ src,
337
+ alt = "",
338
+ width = "full",
339
+ aspectRatio = "auto",
340
+ objectFit = "cover",
341
+ borderRadius = "none",
342
+ shadow = "none",
343
+ align = "center",
344
+ caption,
345
+ captionColor,
346
+ id
347
+ }) {
348
+ const resolvedSrc = typeof src === "string" ? src : "";
349
+ const resolvedCaption = typeof caption === "string" ? caption : "";
350
+ const resolvedCaptionColorStr = typeof captionColor === "string" ? captionColor : "rgba(107, 114, 128, 1)";
351
+ const wrapperStyle = getWrapperStyle2(align);
352
+ const imageStyle2 = getImageStyle(
353
+ width,
354
+ aspectRatio,
355
+ objectFit,
356
+ borderRadius,
357
+ shadow
358
+ );
359
+ const captionStyle = getCaptionStyle(align, width, resolvedCaptionColorStr);
588
360
  if (!resolvedSrc) {
589
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
361
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
590
362
  "div",
591
363
  {
592
364
  style: {
593
- ...imageStyle,
365
+ ...imageStyle2,
594
366
  backgroundColor: "#e5e7eb",
595
367
  display: "flex",
596
368
  alignItems: "center",
@@ -602,15 +374,16 @@ function Image({
602
374
  }
603
375
  ) });
604
376
  }
605
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("figure", { id, style: { ...wrapperStyle, margin: 0 }, children: [
606
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("img", { src: resolvedSrc, alt, style: imageStyle, loading: "lazy" }),
607
- resolvedCaption && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("figcaption", { style: captionStyle, children: resolvedCaption })
377
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("figure", { id, style: { ...wrapperStyle, margin: 0 }, children: [
378
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("img", { src: resolvedSrc, alt, style: imageStyle2, loading: "lazy" }),
379
+ resolvedCaption && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("figcaption", { style: captionStyle, children: resolvedCaption })
608
380
  ] });
609
381
  }
610
382
 
611
- // components/page/ImageCarousel.tsx
612
- var import_react4 = require("react");
613
- var import_jsx_runtime7 = require("react/jsx-runtime");
383
+ // components/page/astro/ImageCarousel.tsx
384
+ var import_react = require("react");
385
+
386
+ // components/page/primitives/ImageCarousel.ts
614
387
  var aspectRatioMap2 = {
615
388
  "16:9": "16 / 9",
616
389
  "4:3": "4 / 3",
@@ -623,115 +396,38 @@ var radiusMap3 = {
623
396
  md: "8px",
624
397
  lg: "16px"
625
398
  };
626
- function isThemeableValue3(value) {
627
- return typeof value === "object" && value !== null && "useTheme" in value;
628
- }
629
- function ImageCarousel({
630
- images = [],
631
- aspectRatio = "16:9",
632
- borderRadius = "none",
633
- showDots = true,
634
- showArrows = true,
635
- arrowColor,
636
- dotColor,
637
- id
638
- }) {
639
- const [currentIndex, setCurrentIndex] = (0, import_react4.useState)(0);
640
- const { resolveColor: resolveColor2 } = useTheme();
641
- const utm = useUtmParams();
642
- const sendEvent = useGtmEvent();
643
- const resolvedArrowColor = (() => {
644
- if (!arrowColor) return { color: "#FFFFFF", opacity: 100 };
645
- if (typeof arrowColor === "string")
646
- return { color: arrowColor, opacity: 100 };
647
- if (isThemeableValue3(arrowColor)) {
648
- return arrowColor.useTheme ? resolveColor2(arrowColor.themeKey) : arrowColor.value;
649
- }
650
- if ("color" in arrowColor) return arrowColor;
651
- return { color: "#FFFFFF", opacity: 100 };
652
- })();
653
- const resolvedDotColor = (() => {
654
- if (!dotColor) return resolveColor2("primary");
655
- if (typeof dotColor === "string") return { color: dotColor, opacity: 100 };
656
- if (isThemeableValue3(dotColor)) {
657
- return dotColor.useTheme ? resolveColor2(dotColor.themeKey) : dotColor.value;
658
- }
659
- if ("color" in dotColor) return dotColor;
660
- return resolveColor2("primary");
661
- })();
662
- const goToPrevious = () => {
663
- const newIndex = currentIndex === 0 ? images.length - 1 : currentIndex - 1;
664
- setCurrentIndex(newIndex);
665
- sendEvent("carousel_navigate", {
666
- direction: "previous",
667
- slideIndex: newIndex,
668
- totalSlides: images.length,
669
- ...utm
670
- });
671
- };
672
- const goToNext = () => {
673
- const newIndex = currentIndex === images.length - 1 ? 0 : currentIndex + 1;
674
- setCurrentIndex(newIndex);
675
- sendEvent("carousel_navigate", {
676
- direction: "next",
677
- slideIndex: newIndex,
678
- totalSlides: images.length,
679
- ...utm
680
- });
681
- };
682
- const goToSlide = (index) => {
683
- setCurrentIndex(index);
684
- sendEvent("carousel_navigate", {
685
- direction: "direct",
686
- slideIndex: index,
687
- totalSlides: images.length,
688
- ...utm
689
- });
690
- };
691
- if (images.length === 0) {
692
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
693
- "div",
694
- {
695
- style: {
696
- aspectRatio: aspectRatioMap2[aspectRatio],
697
- backgroundColor: "#e5e7eb",
698
- borderRadius: radiusMap3[borderRadius],
699
- display: "flex",
700
- alignItems: "center",
701
- justifyContent: "center",
702
- color: "#9ca3af"
703
- },
704
- children: "No images"
705
- }
706
- );
707
- }
708
- const containerStyle = {
399
+ function getContainerStyle(aspectRatio, borderRadius) {
400
+ return {
709
401
  position: "relative",
710
402
  aspectRatio: aspectRatioMap2[aspectRatio],
711
403
  borderRadius: radiusMap3[borderRadius],
712
404
  overflow: "hidden"
713
405
  };
714
- const slideContainerStyle = {
406
+ }
407
+ function getSlideContainerStyle(currentIndex) {
408
+ return {
715
409
  display: "flex",
716
410
  transition: "transform 0.3s ease-in-out",
717
411
  transform: `translateX(-${currentIndex * 100}%)`,
718
412
  height: "100%"
719
413
  };
720
- const slideStyle = {
721
- minWidth: "100%",
722
- height: "100%"
723
- };
724
- const imageStyle = {
725
- width: "100%",
726
- height: "100%",
727
- objectFit: "cover"
728
- };
729
- const arrowStyle = {
414
+ }
415
+ var slideStyle = {
416
+ minWidth: "100%",
417
+ height: "100%"
418
+ };
419
+ var imageStyle = {
420
+ width: "100%",
421
+ height: "100%",
422
+ objectFit: "cover"
423
+ };
424
+ function getArrowStyle(arrowColor) {
425
+ return {
730
426
  position: "absolute",
731
427
  top: "50%",
732
428
  transform: "translateY(-50%)",
733
429
  backgroundColor: "rgba(0,0,0,0.5)",
734
- color: hexToRgba(resolvedArrowColor.color, resolvedArrowColor.opacity),
430
+ color: arrowColor,
735
431
  border: "none",
736
432
  borderRadius: "50%",
737
433
  width: "40px",
@@ -743,25 +439,102 @@ function ImageCarousel({
743
439
  fontSize: "20px",
744
440
  zIndex: 1
745
441
  };
746
- const dotsContainerStyle = {
747
- position: "absolute",
748
- bottom: "16px",
749
- left: "50%",
750
- transform: "translateX(-50%)",
751
- display: "flex",
752
- gap: "8px",
753
- zIndex: 1
754
- };
755
- const dotStyle = (isActive) => ({
442
+ }
443
+ var dotsContainerStyle = {
444
+ position: "absolute",
445
+ bottom: "16px",
446
+ left: "50%",
447
+ transform: "translateX(-50%)",
448
+ display: "flex",
449
+ gap: "8px",
450
+ zIndex: 1
451
+ };
452
+ function getDotStyle(isActive, dotColor) {
453
+ return {
756
454
  width: "10px",
757
455
  height: "10px",
758
456
  borderRadius: "50%",
759
457
  border: "none",
760
458
  cursor: "pointer",
761
- backgroundColor: isActive ? hexToRgba(resolvedDotColor.color, resolvedDotColor.opacity) : "rgba(255,255,255,0.5)"
762
- });
763
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { id, style: containerStyle, children: [
764
- /* @__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)(
459
+ backgroundColor: isActive ? dotColor : "rgba(255,255,255,0.5)"
460
+ };
461
+ }
462
+ function getEmptyState(aspectRatio, borderRadius) {
463
+ return {
464
+ aspectRatio: aspectRatioMap2[aspectRatio],
465
+ backgroundColor: "#e5e7eb",
466
+ borderRadius: radiusMap3[borderRadius],
467
+ display: "flex",
468
+ alignItems: "center",
469
+ justifyContent: "center",
470
+ color: "#9ca3af"
471
+ };
472
+ }
473
+
474
+ // components/page/astro/ImageCarousel.tsx
475
+ var import_jsx_runtime5 = require("react/jsx-runtime");
476
+ function ImageCarousel({
477
+ images = [],
478
+ aspectRatio = "16:9",
479
+ borderRadius = "none",
480
+ showDots = true,
481
+ showArrows = true,
482
+ arrowColor,
483
+ dotColor,
484
+ id
485
+ }) {
486
+ const [currentIndex, setCurrentIndex] = (0, import_react.useState)(0);
487
+ const arrowColorStr = typeof arrowColor === "string" ? arrowColor : "rgba(255, 255, 255, 1)";
488
+ const dotColorStr = typeof dotColor === "string" ? dotColor : "rgba(99, 102, 241, 1)";
489
+ const goToPrevious = () => {
490
+ const newIndex = currentIndex === 0 ? images.length - 1 : currentIndex - 1;
491
+ setCurrentIndex(newIndex);
492
+ if (typeof window !== "undefined") {
493
+ window.dispatchEvent(
494
+ new CustomEvent("carousel_navigate", {
495
+ detail: {
496
+ direction: "previous",
497
+ slideIndex: newIndex,
498
+ totalSlides: images.length
499
+ }
500
+ })
501
+ );
502
+ }
503
+ };
504
+ const goToNext = () => {
505
+ const newIndex = currentIndex === images.length - 1 ? 0 : currentIndex + 1;
506
+ setCurrentIndex(newIndex);
507
+ if (typeof window !== "undefined") {
508
+ window.dispatchEvent(
509
+ new CustomEvent("carousel_navigate", {
510
+ detail: {
511
+ direction: "next",
512
+ slideIndex: newIndex,
513
+ totalSlides: images.length
514
+ }
515
+ })
516
+ );
517
+ }
518
+ };
519
+ const goToSlide = (index) => {
520
+ setCurrentIndex(index);
521
+ if (typeof window !== "undefined") {
522
+ window.dispatchEvent(
523
+ new CustomEvent("carousel_navigate", {
524
+ detail: {
525
+ direction: "direct",
526
+ slideIndex: index,
527
+ totalSlides: images.length
528
+ }
529
+ })
530
+ );
531
+ }
532
+ };
533
+ if (images.length === 0) {
534
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: getEmptyState(aspectRatio, borderRadius), children: "No images" });
535
+ }
536
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { id, style: getContainerStyle(aspectRatio, borderRadius), children: [
537
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: getSlideContainerStyle(currentIndex), children: images.map((image, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: slideStyle, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
765
538
  "img",
766
539
  {
767
540
  src: image.src,
@@ -770,34 +543,34 @@ function ImageCarousel({
770
543
  loading: "lazy"
771
544
  }
772
545
  ) }, index)) }),
773
- showArrows && images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
774
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
546
+ showArrows && images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
547
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
775
548
  "button",
776
549
  {
777
550
  type: "button",
778
551
  onClick: goToPrevious,
779
- style: { ...arrowStyle, left: "16px" },
552
+ style: { ...getArrowStyle(arrowColorStr), left: "16px" },
780
553
  "aria-label": "Previous slide",
781
554
  children: "\u2039"
782
555
  }
783
556
  ),
784
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
557
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
785
558
  "button",
786
559
  {
787
560
  type: "button",
788
561
  onClick: goToNext,
789
- style: { ...arrowStyle, right: "16px" },
562
+ style: { ...getArrowStyle(arrowColorStr), right: "16px" },
790
563
  "aria-label": "Next slide",
791
564
  children: "\u203A"
792
565
  }
793
566
  )
794
567
  ] }),
795
- showDots && images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: dotsContainerStyle, children: images.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
568
+ showDots && images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: dotsContainerStyle, children: images.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
796
569
  "button",
797
570
  {
798
571
  type: "button",
799
572
  onClick: () => goToSlide(index),
800
- style: dotStyle(index === currentIndex),
573
+ style: getDotStyle(index === currentIndex, dotColorStr),
801
574
  "aria-label": `Go to slide ${index + 1}`
802
575
  },
803
576
  index
@@ -805,8 +578,25 @@ function ImageCarousel({
805
578
  ] });
806
579
  }
807
580
 
581
+ // entries/context.tsx
582
+ var import_react2 = require("react");
583
+ var import_jsx_runtime6 = require("react/jsx-runtime");
584
+ var EntriesContext = (0, import_react2.createContext)(null);
585
+ function useEntries() {
586
+ const context = (0, import_react2.useContext)(EntriesContext);
587
+ if (!context) {
588
+ return {
589
+ entries: [],
590
+ entryNames: [],
591
+ getEntry: () => void 0,
592
+ getEntryValue: () => void 0
593
+ };
594
+ }
595
+ return context;
596
+ }
597
+
808
598
  // components/page/VideoEmbed.tsx
809
- var import_jsx_runtime8 = require("react/jsx-runtime");
599
+ var import_jsx_runtime7 = require("react/jsx-runtime");
810
600
  var aspectRatioMap3 = {
811
601
  "16:9": "56.25%",
812
602
  // 9/16 * 100
@@ -827,7 +617,7 @@ var maxWidthMap = {
827
617
  xl: "1000px",
828
618
  full: "100%"
829
619
  };
830
- function isEntryBoundValue3(value) {
620
+ function isEntryBoundValue(value) {
831
621
  return typeof value === "object" && value !== null && "useEntry" in value;
832
622
  }
833
623
  function parseVideoUrl(url) {
@@ -864,7 +654,7 @@ function VideoEmbed({
864
654
  const resolvedUrl = (() => {
865
655
  if (!url) return "";
866
656
  if (typeof url === "string") return url;
867
- if (isEntryBoundValue3(url)) {
657
+ if (isEntryBoundValue(url)) {
868
658
  if (url.useEntry) {
869
659
  return String(getEntryValue(url.entryName, url.fieldKey) ?? "");
870
660
  }
@@ -873,7 +663,7 @@ function VideoEmbed({
873
663
  return "";
874
664
  })();
875
665
  if (!resolvedUrl) {
876
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
666
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
877
667
  "div",
878
668
  {
879
669
  style: {
@@ -918,7 +708,7 @@ function VideoEmbed({
918
708
  height: "100%",
919
709
  border: "none"
920
710
  };
921
- 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)(
711
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { id, style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: containerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
922
712
  "iframe",
923
713
  {
924
714
  src: finalUrl,
@@ -930,8 +720,8 @@ function VideoEmbed({
930
720
  ) }) });
931
721
  }
932
722
 
933
- // components/page/Icon.tsx
934
- var import_jsx_runtime9 = require("react/jsx-runtime");
723
+ // components/page/primitives/Icon.tsx
724
+ var import_jsx_runtime8 = require("react/jsx-runtime");
935
725
  var sizeMap = {
936
726
  sm: { size: "16px", strokeWidth: 2 },
937
727
  md: { size: "24px", strokeWidth: 2 },
@@ -940,7 +730,7 @@ var sizeMap = {
940
730
  "2xl": { size: "64px", strokeWidth: 1.5 }
941
731
  };
942
732
  var icons = {
943
- check: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
733
+ check: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
944
734
  "svg",
945
735
  {
946
736
  width: size,
@@ -951,10 +741,10 @@ var icons = {
951
741
  strokeWidth,
952
742
  strokeLinecap: "round",
953
743
  strokeLinejoin: "round",
954
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polyline", { points: "20 6 9 17 4 12" })
744
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("polyline", { points: "20 6 9 17 4 12" })
955
745
  }
956
746
  ),
957
- x: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
747
+ x: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
958
748
  "svg",
959
749
  {
960
750
  width: size,
@@ -966,12 +756,12 @@ var icons = {
966
756
  strokeLinecap: "round",
967
757
  strokeLinejoin: "round",
968
758
  children: [
969
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
970
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
759
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
760
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
971
761
  ]
972
762
  }
973
763
  ),
974
- star: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
764
+ star: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
975
765
  "svg",
976
766
  {
977
767
  width: size,
@@ -982,10 +772,10 @@ var icons = {
982
772
  strokeWidth,
983
773
  strokeLinecap: "round",
984
774
  strokeLinejoin: "round",
985
- 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" })
775
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.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" })
986
776
  }
987
777
  ),
988
- heart: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
778
+ heart: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
989
779
  "svg",
990
780
  {
991
781
  width: size,
@@ -996,10 +786,10 @@ var icons = {
996
786
  strokeWidth,
997
787
  strokeLinecap: "round",
998
788
  strokeLinejoin: "round",
999
- 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" })
789
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.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" })
1000
790
  }
1001
791
  ),
1002
- arrowRight: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
792
+ arrowRight: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1003
793
  "svg",
1004
794
  {
1005
795
  width: size,
@@ -1011,12 +801,12 @@ var icons = {
1011
801
  strokeLinecap: "round",
1012
802
  strokeLinejoin: "round",
1013
803
  children: [
1014
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
1015
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polyline", { points: "12 5 19 12 12 19" })
804
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
805
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("polyline", { points: "12 5 19 12 12 19" })
1016
806
  ]
1017
807
  }
1018
808
  ),
1019
- arrowLeft: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
809
+ arrowLeft: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1020
810
  "svg",
1021
811
  {
1022
812
  width: size,
@@ -1028,12 +818,12 @@ var icons = {
1028
818
  strokeLinecap: "round",
1029
819
  strokeLinejoin: "round",
1030
820
  children: [
1031
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("line", { x1: "19", y1: "12", x2: "5", y2: "12" }),
1032
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polyline", { points: "12 19 5 12 12 5" })
821
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("line", { x1: "19", y1: "12", x2: "5", y2: "12" }),
822
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("polyline", { points: "12 19 5 12 12 5" })
1033
823
  ]
1034
824
  }
1035
825
  ),
1036
- mail: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
826
+ mail: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1037
827
  "svg",
1038
828
  {
1039
829
  width: size,
@@ -1045,12 +835,12 @@ var icons = {
1045
835
  strokeLinecap: "round",
1046
836
  strokeLinejoin: "round",
1047
837
  children: [
1048
- /* @__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" }),
1049
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polyline", { points: "22,6 12,13 2,6" })
838
+ /* @__PURE__ */ (0, import_jsx_runtime8.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" }),
839
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("polyline", { points: "22,6 12,13 2,6" })
1050
840
  ]
1051
841
  }
1052
842
  ),
1053
- phone: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
843
+ phone: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1054
844
  "svg",
1055
845
  {
1056
846
  width: size,
@@ -1061,10 +851,10 @@ var icons = {
1061
851
  strokeWidth,
1062
852
  strokeLinecap: "round",
1063
853
  strokeLinejoin: "round",
1064
- 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" })
854
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.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" })
1065
855
  }
1066
856
  ),
1067
- mapPin: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
857
+ mapPin: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1068
858
  "svg",
1069
859
  {
1070
860
  width: size,
@@ -1076,12 +866,12 @@ var icons = {
1076
866
  strokeLinecap: "round",
1077
867
  strokeLinejoin: "round",
1078
868
  children: [
1079
- /* @__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" }),
1080
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "12", cy: "10", r: "3" })
869
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z" }),
870
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("circle", { cx: "12", cy: "10", r: "3" })
1081
871
  ]
1082
872
  }
1083
873
  ),
1084
- zap: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
874
+ zap: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1085
875
  "svg",
1086
876
  {
1087
877
  width: size,
@@ -1092,10 +882,10 @@ var icons = {
1092
882
  strokeWidth,
1093
883
  strokeLinecap: "round",
1094
884
  strokeLinejoin: "round",
1095
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polygon", { points: "13 2 3 14 12 14 11 22 21 10 12 10 13 2" })
885
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("polygon", { points: "13 2 3 14 12 14 11 22 21 10 12 10 13 2" })
1096
886
  }
1097
887
  ),
1098
- shield: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
888
+ shield: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1099
889
  "svg",
1100
890
  {
1101
891
  width: size,
@@ -1106,10 +896,10 @@ var icons = {
1106
896
  strokeWidth,
1107
897
  strokeLinecap: "round",
1108
898
  strokeLinejoin: "round",
1109
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" })
899
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" })
1110
900
  }
1111
901
  ),
1112
- users: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
902
+ users: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1113
903
  "svg",
1114
904
  {
1115
905
  width: size,
@@ -1121,17 +911,24 @@ var icons = {
1121
911
  strokeLinecap: "round",
1122
912
  strokeLinejoin: "round",
1123
913
  children: [
1124
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
1125
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "9", cy: "7", r: "4" }),
1126
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M23 21v-2a4 4 0 0 0-3-3.87" }),
1127
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
914
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
915
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("circle", { cx: "9", cy: "7", r: "4" }),
916
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M23 21v-2a4 4 0 0 0-3-3.87" }),
917
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
1128
918
  ]
1129
919
  }
1130
920
  )
1131
921
  };
1132
- function isThemeableValue4(value) {
1133
- return typeof value === "object" && value !== null && "useTheme" in value;
922
+ function getWrapperStyle3(align) {
923
+ return {
924
+ display: "flex",
925
+ justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center"
926
+ };
1134
927
  }
928
+ var availableIcons = Object.keys(icons);
929
+
930
+ // components/page/astro/Icon.tsx
931
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1135
932
  function Icon({
1136
933
  name = "check",
1137
934
  size = "md",
@@ -1139,23 +936,10 @@ function Icon({
1139
936
  align = "center",
1140
937
  id
1141
938
  }) {
1142
- const { resolveColor: resolveColor2 } = useTheme();
1143
- const resolvedColor = (() => {
1144
- if (!color) return resolveColor2("primary");
1145
- if (typeof color === "string") return { color, opacity: 100 };
1146
- if (isThemeableValue4(color)) {
1147
- return color.useTheme ? resolveColor2(color.themeKey) : color.value;
1148
- }
1149
- if ("color" in color) return color;
1150
- return resolveColor2("primary");
1151
- })();
939
+ const colorValue = typeof color === "string" ? color : "rgba(99, 102, 241, 1)";
1152
940
  const IconComponent = icons[name.toLowerCase()] || icons.check;
1153
941
  const { size: iconSize, strokeWidth } = sizeMap[size];
1154
- const colorValue = hexToRgba(resolvedColor.color, resolvedColor.opacity);
1155
- const wrapperStyle = {
1156
- display: "flex",
1157
- justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center"
1158
- };
942
+ const wrapperStyle = getWrapperStyle3(align);
1159
943
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { id, style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1160
944
  IconComponent,
1161
945
  {
@@ -1165,7 +949,34 @@ function Icon({
1165
949
  }
1166
950
  ) });
1167
951
  }
1168
- var availableIcons = Object.keys(icons);
952
+
953
+ // utils/index.ts
954
+ var import_tailwind_merge = require("tailwind-merge");
955
+ var import_clsx = require("clsx");
956
+ function hexToRgba(hex, opacity) {
957
+ if (hex.startsWith("rgba(")) {
958
+ const rgbaMatch = hex.match(
959
+ /rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)/
960
+ );
961
+ if (rgbaMatch) {
962
+ return `rgba(${rgbaMatch[1]}, ${rgbaMatch[2]}, ${rgbaMatch[3]}, ${opacity / 100})`;
963
+ }
964
+ }
965
+ if (hex.startsWith("rgb(")) {
966
+ const rgbMatch = hex.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
967
+ if (rgbMatch) {
968
+ return `rgba(${rgbMatch[1]}, ${rgbMatch[2]}, ${rgbMatch[3]}, ${opacity / 100})`;
969
+ }
970
+ }
971
+ const sanitized = hex.replace("#", "");
972
+ const r = parseInt(sanitized.slice(0, 2), 16);
973
+ const g = parseInt(sanitized.slice(2, 4), 16);
974
+ const b = parseInt(sanitized.slice(4, 6), 16);
975
+ return `rgba(${r}, ${g}, ${b}, ${opacity / 100})`;
976
+ }
977
+ function cn(...inputs) {
978
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
979
+ }
1169
980
 
1170
981
  // design-system/shadows.ts
1171
982
  var shadowPresets = [
@@ -1203,26 +1014,7 @@ var getShadowCSS = (value) => {
1203
1014
  return preset?.css ?? "none";
1204
1015
  };
1205
1016
 
1206
- // components/page/Section.tsx
1207
- var import_jsx_runtime10 = require("react/jsx-runtime");
1208
- function isThemeableValue5(value) {
1209
- return typeof value === "object" && value !== null && "useTheme" in value;
1210
- }
1211
- function resolveBackgroundColor(bg, resolveColor2) {
1212
- if (!bg) return void 0;
1213
- if (typeof bg === "string") return bg;
1214
- if (isThemeableValue5(bg)) {
1215
- if (bg.useTheme) {
1216
- const themeColor = resolveColor2(bg.themeKey);
1217
- return hexToRgba(themeColor.color, themeColor.opacity);
1218
- }
1219
- return hexToRgba(bg.value.color, bg.value.opacity);
1220
- }
1221
- if ("color" in bg && "opacity" in bg) {
1222
- return hexToRgba(bg.color, bg.opacity);
1223
- }
1224
- return void 0;
1225
- }
1017
+ // components/page/primitives/Section.ts
1226
1018
  function getVisibilityClasses(visibility) {
1227
1019
  if (!visibility) return "";
1228
1020
  if (!visibility.mobile && !visibility.desktop) {
@@ -1236,6 +1028,20 @@ function getVisibilityClasses(visibility) {
1236
1028
  }
1237
1029
  return "";
1238
1030
  }
1031
+ function getSectionStyle(verticalPadding, horizontalPadding, gap, backgroundColor, backgroundImage, shadow, borderRadius) {
1032
+ return {
1033
+ padding: `${verticalPadding}px ${horizontalPadding}px`,
1034
+ gap: `${gap}px`,
1035
+ backgroundColor,
1036
+ backgroundImage: backgroundImage ? `url(${backgroundImage})` : void 0,
1037
+ backgroundSize: "cover",
1038
+ backgroundPosition: "center",
1039
+ borderRadius: `${borderRadius}px`
1040
+ };
1041
+ }
1042
+
1043
+ // components/page/astro/Section.tsx
1044
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1239
1045
  function Section({
1240
1046
  children: _children,
1241
1047
  verticalPadding = 48,
@@ -1250,30 +1056,32 @@ function Section({
1250
1056
  visibility,
1251
1057
  puck
1252
1058
  }) {
1253
- const { resolveColor: resolveColor2 } = useTheme();
1254
1059
  const DropZone = puck?.renderDropZone;
1060
+ const bgColor = typeof backgroundColor === "string" ? backgroundColor : void 0;
1061
+ const style = {
1062
+ ...getSectionStyle(
1063
+ verticalPadding,
1064
+ horizontalPadding,
1065
+ gap,
1066
+ bgColor,
1067
+ backgroundImage,
1068
+ shadow,
1069
+ borderRadius
1070
+ ),
1071
+ boxShadow: getShadowCSS(shadow)
1072
+ };
1255
1073
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1256
1074
  "section",
1257
1075
  {
1258
1076
  id: anchorLink,
1259
1077
  className: cn("flex w-full flex-col", getVisibilityClasses(visibility)),
1260
- style: {
1261
- padding: `${verticalPadding}px ${horizontalPadding}px`,
1262
- gap: `${gap}px`,
1263
- backgroundColor: resolveBackgroundColor(backgroundColor, resolveColor2),
1264
- backgroundImage: backgroundImage ? `url(${backgroundImage})` : void 0,
1265
- backgroundSize: "cover",
1266
- backgroundPosition: "center",
1267
- boxShadow: getShadowCSS(shadow),
1268
- borderRadius: `${borderRadius}px`
1269
- },
1078
+ style,
1270
1079
  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" }) })
1271
1080
  }
1272
1081
  );
1273
1082
  }
1274
1083
 
1275
- // components/page/Container.tsx
1276
- var import_jsx_runtime11 = require("react/jsx-runtime");
1084
+ // components/page/primitives/Container.ts
1277
1085
  var maxWidthMap2 = {
1278
1086
  sm: "640px",
1279
1087
  md: "768px",
@@ -1289,9 +1097,22 @@ var paddingMap = {
1289
1097
  lg: "32px",
1290
1098
  xl: "48px"
1291
1099
  };
1292
- function isThemeableValue6(value) {
1293
- return typeof value === "object" && value !== null && "useTheme" in value;
1100
+ function getContainerStyle2(maxWidth, paddingX, paddingY, centered, backgroundColor) {
1101
+ return {
1102
+ maxWidth: maxWidthMap2[maxWidth],
1103
+ marginLeft: centered ? "auto" : void 0,
1104
+ marginRight: centered ? "auto" : void 0,
1105
+ paddingLeft: paddingMap[paddingX],
1106
+ paddingRight: paddingMap[paddingX],
1107
+ paddingTop: paddingMap[paddingY],
1108
+ paddingBottom: paddingMap[paddingY],
1109
+ backgroundColor,
1110
+ width: "100%"
1111
+ };
1294
1112
  }
1113
+
1114
+ // components/page/astro/Container.tsx
1115
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1295
1116
  function Container({
1296
1117
  maxWidth = "lg",
1297
1118
  padding,
@@ -1302,36 +1123,21 @@ function Container({
1302
1123
  id,
1303
1124
  puck
1304
1125
  }) {
1305
- const { resolveColor: resolveColor2 } = useTheme();
1306
1126
  const DropZone = puck?.renderDropZone;
1307
- const resolvedBgColor = (() => {
1308
- if (!backgroundColor) return null;
1309
- if (typeof backgroundColor === "string")
1310
- return { color: backgroundColor, opacity: 100 };
1311
- if (isThemeableValue6(backgroundColor)) {
1312
- return backgroundColor.useTheme ? resolveColor2(backgroundColor.themeKey) : backgroundColor.value;
1313
- }
1314
- if ("color" in backgroundColor) return backgroundColor;
1315
- return null;
1316
- })();
1127
+ const bgColor = typeof backgroundColor === "string" ? backgroundColor : void 0;
1317
1128
  const effectivePaddingX = padding || paddingX;
1318
1129
  const effectivePaddingY = padding || paddingY;
1319
- const style = {
1320
- maxWidth: maxWidthMap2[maxWidth],
1321
- marginLeft: centered ? "auto" : void 0,
1322
- marginRight: centered ? "auto" : void 0,
1323
- paddingLeft: paddingMap[effectivePaddingX],
1324
- paddingRight: paddingMap[effectivePaddingX],
1325
- paddingTop: paddingMap[effectivePaddingY],
1326
- paddingBottom: paddingMap[effectivePaddingY],
1327
- backgroundColor: resolvedBgColor ? hexToRgba(resolvedBgColor.color, resolvedBgColor.opacity) : void 0,
1328
- width: "100%"
1329
- };
1130
+ const style = getContainerStyle2(
1131
+ maxWidth,
1132
+ effectivePaddingX,
1133
+ effectivePaddingY,
1134
+ centered,
1135
+ bgColor
1136
+ );
1330
1137
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { id, style, children: DropZone && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DropZone, { zone: "container-content" }) });
1331
1138
  }
1332
1139
 
1333
- // components/page/Columns.tsx
1334
- var import_jsx_runtime12 = require("react/jsx-runtime");
1140
+ // components/page/primitives/Columns.ts
1335
1141
  var gapMap = {
1336
1142
  none: "0",
1337
1143
  sm: "16px",
@@ -1345,6 +1151,17 @@ var alignMap = {
1345
1151
  bottom: "flex-end",
1346
1152
  stretch: "stretch"
1347
1153
  };
1154
+ function getContainerStyle3(columns, gap, verticalAlign) {
1155
+ return {
1156
+ display: "grid",
1157
+ gridTemplateColumns: `repeat(${columns}, 1fr)`,
1158
+ gap: gapMap[gap],
1159
+ alignItems: alignMap[verticalAlign]
1160
+ };
1161
+ }
1162
+
1163
+ // components/page/astro/Columns.tsx
1164
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1348
1165
  function Columns({
1349
1166
  columns = 2,
1350
1167
  gap = "md",
@@ -1354,17 +1171,11 @@ function Columns({
1354
1171
  puck
1355
1172
  }) {
1356
1173
  const DropZone = puck?.renderDropZone;
1357
- const containerStyle = {
1358
- display: "grid",
1359
- gridTemplateColumns: `repeat(${columns}, 1fr)`,
1360
- gap: gapMap[gap],
1361
- alignItems: alignMap[verticalAlign]
1362
- };
1174
+ const containerStyle = getContainerStyle3(columns, gap, verticalAlign);
1363
1175
  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)) });
1364
1176
  }
1365
1177
 
1366
- // components/page/Card.tsx
1367
- var import_jsx_runtime13 = require("react/jsx-runtime");
1178
+ // components/page/primitives/Card.ts
1368
1179
  var borderWidthMap = {
1369
1180
  none: "0",
1370
1181
  thin: "1px",
@@ -1392,9 +1203,18 @@ var paddingMap2 = {
1392
1203
  lg: "32px",
1393
1204
  xl: "48px"
1394
1205
  };
1395
- function isThemeableValue7(value) {
1396
- return typeof value === "object" && value !== null && "useTheme" in value;
1206
+ function getCardStyle(backgroundColor, borderColor, borderWidth, borderRadius, shadow, padding) {
1207
+ return {
1208
+ backgroundColor,
1209
+ border: borderWidth !== "none" ? `${borderWidthMap[borderWidth]} solid ${borderColor}` : "none",
1210
+ borderRadius: radiusMap5[borderRadius],
1211
+ boxShadow: shadowMap2[shadow],
1212
+ padding: paddingMap2[padding]
1213
+ };
1397
1214
  }
1215
+
1216
+ // components/page/astro/Card.tsx
1217
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1398
1218
  function Card({
1399
1219
  backgroundColor,
1400
1220
  borderColor,
@@ -1405,40 +1225,21 @@ function Card({
1405
1225
  id,
1406
1226
  puck
1407
1227
  }) {
1408
- const { resolveColor: resolveColor2 } = useTheme();
1409
1228
  const DropZone = puck?.renderDropZone;
1410
- const resolvedBgColor = (() => {
1411
- if (!backgroundColor) return resolveColor2("background");
1412
- if (typeof backgroundColor === "string")
1413
- return { color: backgroundColor, opacity: 100 };
1414
- if (isThemeableValue7(backgroundColor)) {
1415
- return backgroundColor.useTheme ? resolveColor2(backgroundColor.themeKey) : backgroundColor.value;
1416
- }
1417
- if ("color" in backgroundColor) return backgroundColor;
1418
- return resolveColor2("background");
1419
- })();
1420
- const resolvedBorderColor = (() => {
1421
- if (!borderColor) return resolveColor2("muted");
1422
- if (typeof borderColor === "string")
1423
- return { color: borderColor, opacity: 100 };
1424
- if (isThemeableValue7(borderColor)) {
1425
- return borderColor.useTheme ? resolveColor2(borderColor.themeKey) : borderColor.value;
1426
- }
1427
- if ("color" in borderColor) return borderColor;
1428
- return resolveColor2("muted");
1429
- })();
1430
- const style = {
1431
- backgroundColor: hexToRgba(resolvedBgColor.color, resolvedBgColor.opacity),
1432
- border: borderWidth !== "none" ? `${borderWidthMap[borderWidth]} solid ${hexToRgba(resolvedBorderColor.color, resolvedBorderColor.opacity)}` : "none",
1433
- borderRadius: radiusMap5[borderRadius],
1434
- boxShadow: shadowMap2[shadow],
1435
- padding: paddingMap2[padding]
1436
- };
1229
+ const bgColor = typeof backgroundColor === "string" ? backgroundColor : "rgba(255, 255, 255, 1)";
1230
+ const bColor = typeof borderColor === "string" ? borderColor : "rgba(229, 231, 235, 1)";
1231
+ const style = getCardStyle(
1232
+ bgColor,
1233
+ bColor,
1234
+ borderWidth,
1235
+ borderRadius,
1236
+ shadow,
1237
+ padding
1238
+ );
1437
1239
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { id, style, children: DropZone && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropZone, { zone: "card-content" }) });
1438
1240
  }
1439
1241
 
1440
- // components/page/Divider.tsx
1441
- var import_jsx_runtime14 = require("react/jsx-runtime");
1242
+ // components/page/primitives/Divider.ts
1442
1243
  var thicknessMap = {
1443
1244
  thin: "1px",
1444
1245
  medium: "2px",
@@ -1456,9 +1257,24 @@ var spacingMap = {
1456
1257
  lg: "32px",
1457
1258
  xl: "48px"
1458
1259
  };
1459
- function isThemeableValue8(value) {
1460
- return typeof value === "object" && value !== null && "useTheme" in value;
1260
+ function getWrapperStyle4(align, spacing) {
1261
+ return {
1262
+ display: "flex",
1263
+ justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center",
1264
+ padding: `${spacingMap[spacing]} 0`
1265
+ };
1266
+ }
1267
+ function getHrStyle(width, thickness, lineStyle, color) {
1268
+ return {
1269
+ width: widthMap2[width],
1270
+ border: "none",
1271
+ borderTop: `${thicknessMap[thickness]} ${lineStyle} ${color}`,
1272
+ margin: 0
1273
+ };
1461
1274
  }
1275
+
1276
+ // components/page/astro/Divider.tsx
1277
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1462
1278
  function Divider({
1463
1279
  style: lineStyle = "solid",
1464
1280
  thickness = "thin",
@@ -1468,32 +1284,13 @@ function Divider({
1468
1284
  spacing = "md",
1469
1285
  id
1470
1286
  }) {
1471
- const { resolveColor: resolveColor2 } = useTheme();
1472
- const resolvedColor = (() => {
1473
- if (!color) return resolveColor2("muted");
1474
- if (typeof color === "string") return { color, opacity: 100 };
1475
- if (isThemeableValue8(color)) {
1476
- return color.useTheme ? resolveColor2(color.themeKey) : color.value;
1477
- }
1478
- if ("color" in color) return color;
1479
- return resolveColor2("muted");
1480
- })();
1481
- const wrapperStyle = {
1482
- display: "flex",
1483
- justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center",
1484
- padding: `${spacingMap[spacing]} 0`
1485
- };
1486
- const hrStyle = {
1487
- width: widthMap2[width],
1488
- border: "none",
1489
- borderTop: `${thicknessMap[thickness]} ${lineStyle} ${hexToRgba(resolvedColor.color, resolvedColor.opacity)}`,
1490
- margin: 0
1491
- };
1287
+ const colorValue = typeof color === "string" ? color : "rgba(107, 114, 128, 1)";
1288
+ const wrapperStyle = getWrapperStyle4(align, spacing);
1289
+ const hrStyle = getHrStyle(width, thickness, lineStyle, colorValue);
1492
1290
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { id, style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("hr", { style: hrStyle }) });
1493
1291
  }
1494
1292
 
1495
- // components/page/Spacer.tsx
1496
- var import_jsx_runtime15 = require("react/jsx-runtime");
1293
+ // components/page/primitives/Spacer.ts
1497
1294
  var sizeMap2 = {
1498
1295
  xs: "8px",
1499
1296
  sm: "16px",
@@ -1503,6 +1300,9 @@ var sizeMap2 = {
1503
1300
  "2xl": "64px",
1504
1301
  "3xl": "96px"
1505
1302
  };
1303
+
1304
+ // components/page/astro/Spacer.tsx
1305
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1506
1306
  function Spacer({ size = "md", id }) {
1507
1307
  const style = {
1508
1308
  height: sizeMap2[size],
@@ -1511,8 +1311,73 @@ function Spacer({ size = "md", id }) {
1511
1311
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { id, style, "aria-hidden": "true" });
1512
1312
  }
1513
1313
 
1514
- // components/page/TextBlock.tsx
1314
+ // theme/context.tsx
1315
+ var import_react3 = require("react");
1316
+
1317
+ // theme/defaults.ts
1318
+ var DEFAULT_THEME = {
1319
+ id: "default",
1320
+ name: "Default Theme",
1321
+ colors: {
1322
+ primary: { color: "#3B82F6", opacity: 100 },
1323
+ secondary: { color: "#8B5CF6", opacity: 100 },
1324
+ accent: { color: "#10B981", opacity: 100 },
1325
+ background: { color: "#FFFFFF", opacity: 100 },
1326
+ foreground: { color: "#111827", opacity: 100 },
1327
+ muted: { color: "#F3F4F6", opacity: 100 }
1328
+ },
1329
+ typography: {
1330
+ fontFamily: {
1331
+ heading: "system-ui, sans-serif",
1332
+ body: "system-ui, sans-serif"
1333
+ },
1334
+ fontSize: {
1335
+ base: "base",
1336
+ heading: "4xl"
1337
+ },
1338
+ fontWeight: {
1339
+ normal: 400,
1340
+ heading: 700
1341
+ }
1342
+ },
1343
+ spacing: {
1344
+ xs: 8,
1345
+ sm: 12,
1346
+ md: 16,
1347
+ lg: 24,
1348
+ xl: 32
1349
+ },
1350
+ borders: {
1351
+ radiusSmall: 4,
1352
+ radiusMedium: 8,
1353
+ radiusLarge: 16
1354
+ },
1355
+ shadows: {
1356
+ small: "sm",
1357
+ medium: "md",
1358
+ large: "lg"
1359
+ }
1360
+ };
1361
+
1362
+ // theme/context.tsx
1515
1363
  var import_jsx_runtime16 = require("react/jsx-runtime");
1364
+ var ThemeContext = (0, import_react3.createContext)(null);
1365
+ function useTheme() {
1366
+ const context = (0, import_react3.useContext)(ThemeContext);
1367
+ if (!context) {
1368
+ return {
1369
+ theme: DEFAULT_THEME,
1370
+ resolveColor: (key) => DEFAULT_THEME.colors[key],
1371
+ resolveSpacing: (key) => DEFAULT_THEME.spacing[key],
1372
+ resolveBorderRadius: (key) => DEFAULT_THEME.borders[key],
1373
+ resolveShadow: (key) => DEFAULT_THEME.shadows[key]
1374
+ };
1375
+ }
1376
+ return context;
1377
+ }
1378
+
1379
+ // components/page/TextBlock.tsx
1380
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1516
1381
  var alignmentMap = {
1517
1382
  left: "text-left",
1518
1383
  center: "text-center",
@@ -1525,16 +1390,16 @@ var sizeMap3 = {
1525
1390
  large: "text-5xl",
1526
1391
  xlarge: "text-6xl"
1527
1392
  };
1528
- function isThemeableValue9(value) {
1393
+ function isThemeableValue(value) {
1529
1394
  return typeof value === "object" && value !== null && "useTheme" in value;
1530
1395
  }
1531
- function isEntryBoundValue4(value) {
1396
+ function isEntryBoundValue2(value) {
1532
1397
  return typeof value === "object" && value !== null && "useEntry" in value;
1533
1398
  }
1534
1399
  function resolveColor(color, resolveThemeColor) {
1535
1400
  if (!color) return "#000000";
1536
1401
  if (typeof color === "string") return color;
1537
- if (isThemeableValue9(color)) {
1402
+ if (isThemeableValue(color)) {
1538
1403
  if (color.useTheme) {
1539
1404
  const themeColor = resolveThemeColor(color.themeKey);
1540
1405
  return hexToRgba(themeColor.color, themeColor.opacity);
@@ -1549,7 +1414,7 @@ function resolveColor(color, resolveThemeColor) {
1549
1414
  function resolveColorHex(color, resolveThemeColor) {
1550
1415
  if (!color) return "#000000";
1551
1416
  if (typeof color === "string") return color;
1552
- if (isThemeableValue9(color)) {
1417
+ if (isThemeableValue(color)) {
1553
1418
  if (color.useTheme) {
1554
1419
  return resolveThemeColor(color.themeKey).color;
1555
1420
  }
@@ -1578,7 +1443,7 @@ function TextBlock({
1578
1443
  const resolveText = (value) => {
1579
1444
  if (!value) return void 0;
1580
1445
  if (typeof value === "string") return value;
1581
- if (isEntryBoundValue4(value)) {
1446
+ if (isEntryBoundValue2(value)) {
1582
1447
  if (value.useEntry) {
1583
1448
  const entryVal = getEntryValue(value.entryName, value.fieldKey);
1584
1449
  return entryVal != null ? String(entryVal) : void 0;
@@ -1598,13 +1463,13 @@ function TextBlock({
1598
1463
  WebkitTextFillColor: "transparent",
1599
1464
  backgroundClip: "text"
1600
1465
  } : { color: titleColorValue };
1601
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1466
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1602
1467
  "div",
1603
1468
  {
1604
1469
  id: anchorLink,
1605
1470
  className: cn("flex flex-col gap-4", alignmentMap[alignment]),
1606
1471
  children: [
1607
- resolvedTitle && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1472
+ resolvedTitle && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1608
1473
  "h2",
1609
1474
  {
1610
1475
  className: cn("font-bold", sizeMap3[textSize]),
@@ -1612,8 +1477,8 @@ function TextBlock({
1612
1477
  children: resolvedTitle
1613
1478
  }
1614
1479
  ),
1615
- resolvedSubtitle && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-xl", style: { color: subtitleColorValue }, children: resolvedSubtitle }),
1616
- resolvedBody && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1480
+ resolvedSubtitle && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-xl", style: { color: subtitleColorValue }, children: resolvedSubtitle }),
1481
+ resolvedBody && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1617
1482
  "div",
1618
1483
  {
1619
1484
  className: "prose max-w-none",
@@ -1627,7 +1492,7 @@ function TextBlock({
1627
1492
  }
1628
1493
 
1629
1494
  // components/page/CustomImage.tsx
1630
- var import_jsx_runtime17 = require("react/jsx-runtime");
1495
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1631
1496
  var alignmentMap2 = {
1632
1497
  left: "mr-auto",
1633
1498
  center: "mx-auto",
@@ -1641,9 +1506,9 @@ function CustomImage({
1641
1506
  fitContent = false
1642
1507
  }) {
1643
1508
  if (!image) {
1644
- 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" });
1509
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex h-48 w-full items-center justify-center bg-gray-200 text-gray-400", children: "No image" });
1645
1510
  }
1646
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1511
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1647
1512
  "img",
1648
1513
  {
1649
1514
  src: image,
@@ -1660,7 +1525,7 @@ function CustomImage({
1660
1525
 
1661
1526
  // components/page/FeaturesList.tsx
1662
1527
  var import_lucide_react = require("lucide-react");
1663
- var import_jsx_runtime18 = require("react/jsx-runtime");
1528
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1664
1529
  var sizeMap4 = {
1665
1530
  small: { icon: 24, title: "text-base", desc: "text-sm" },
1666
1531
  medium: { icon: 32, title: "text-lg", desc: "text-base" },
@@ -1678,7 +1543,7 @@ function FeaturesList({
1678
1543
  const formatted = iconName.charAt(0).toUpperCase() + iconName.slice(1);
1679
1544
  return import_lucide_react.icons[formatted] || null;
1680
1545
  };
1681
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1546
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1682
1547
  "div",
1683
1548
  {
1684
1549
  id: anchorLink,
@@ -1689,7 +1554,7 @@ function FeaturesList({
1689
1554
  ),
1690
1555
  children: features.map((feature, index) => {
1691
1556
  const IconComponent = feature.icon ? getIcon(feature.icon) : null;
1692
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1557
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1693
1558
  "div",
1694
1559
  {
1695
1560
  className: cn(
@@ -1698,7 +1563,7 @@ function FeaturesList({
1698
1563
  align === "right" && "flex-row-reverse"
1699
1564
  ),
1700
1565
  children: [
1701
- feature.image ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1566
+ feature.image ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1702
1567
  "img",
1703
1568
  {
1704
1569
  src: feature.image,
@@ -1706,7 +1571,7 @@ function FeaturesList({
1706
1571
  className: "object-contain",
1707
1572
  style: { width: sizeConfig.icon, height: sizeConfig.icon }
1708
1573
  }
1709
- ) : IconComponent ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1574
+ ) : IconComponent ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1710
1575
  IconComponent,
1711
1576
  {
1712
1577
  size: sizeConfig.icon,
@@ -1714,9 +1579,9 @@ function FeaturesList({
1714
1579
  className: "flex-shrink-0"
1715
1580
  }
1716
1581
  ) : null,
1717
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1", children: [
1718
- feature.title && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { className: cn("font-semibold", sizeConfig.title), children: feature.title }),
1719
- feature.description && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: cn("text-gray-600", sizeConfig.desc), children: feature.description })
1582
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-col gap-1", children: [
1583
+ feature.title && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h3", { className: cn("font-semibold", sizeConfig.title), children: feature.title }),
1584
+ feature.description && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: cn("text-gray-600", sizeConfig.desc), children: feature.description })
1720
1585
  ] })
1721
1586
  ]
1722
1587
  },
@@ -1729,7 +1594,7 @@ function FeaturesList({
1729
1594
 
1730
1595
  // components/page/FeatureGrid.tsx
1731
1596
  var import_lucide_react2 = require("lucide-react");
1732
- var import_jsx_runtime19 = require("react/jsx-runtime");
1597
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1733
1598
  var sizeMap5 = {
1734
1599
  small: { icon: 24, title: "text-base", desc: "text-sm" },
1735
1600
  medium: { icon: 32, title: "text-lg", desc: "text-base" },
@@ -1756,8 +1621,8 @@ function FeatureGrid({
1756
1621
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
1757
1622
  4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
1758
1623
  };
1759
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { id: anchorLink, className: "flex flex-col gap-8", children: [
1760
- (heading || description) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1624
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { id: anchorLink, className: "flex flex-col gap-8", children: [
1625
+ (heading || description) && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
1761
1626
  "div",
1762
1627
  {
1763
1628
  className: cn(
@@ -1766,14 +1631,14 @@ function FeatureGrid({
1766
1631
  align === "right" && "text-right"
1767
1632
  ),
1768
1633
  children: [
1769
- heading && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { className: "text-3xl font-bold", style: { color: textColor }, children: heading }),
1770
- description && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-gray-600", children: description })
1634
+ heading && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h2", { className: "text-3xl font-bold", style: { color: textColor }, children: heading }),
1635
+ description && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-gray-600", children: description })
1771
1636
  ]
1772
1637
  }
1773
1638
  ),
1774
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: cn("grid gap-6", columnClass[columns]), children: features.map((feature, index) => {
1639
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: cn("grid gap-6", columnClass[columns]), children: features.map((feature, index) => {
1775
1640
  const IconComponent = feature.icon ? getIcon(feature.icon) : null;
1776
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1641
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
1777
1642
  "div",
1778
1643
  {
1779
1644
  className: cn(
@@ -1781,7 +1646,7 @@ function FeatureGrid({
1781
1646
  align === "center" && "items-center text-center"
1782
1647
  ),
1783
1648
  children: [
1784
- feature.image ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1649
+ feature.image ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1785
1650
  "img",
1786
1651
  {
1787
1652
  src: feature.image,
@@ -1789,14 +1654,14 @@ function FeatureGrid({
1789
1654
  className: "object-contain",
1790
1655
  style: { width: sizeConfig.icon, height: sizeConfig.icon }
1791
1656
  }
1792
- ) : IconComponent ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1657
+ ) : IconComponent ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1793
1658
  IconComponent,
1794
1659
  {
1795
1660
  size: sizeConfig.icon,
1796
1661
  style: { color: iconColor }
1797
1662
  }
1798
1663
  ) : null,
1799
- feature.title && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1664
+ feature.title && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1800
1665
  "h3",
1801
1666
  {
1802
1667
  className: cn("font-semibold", sizeConfig.title),
@@ -1804,7 +1669,7 @@ function FeatureGrid({
1804
1669
  children: feature.title
1805
1670
  }
1806
1671
  ),
1807
- feature.description && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: cn("text-gray-600", sizeConfig.desc), children: feature.description })
1672
+ feature.description && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: cn("text-gray-600", sizeConfig.desc), children: feature.description })
1808
1673
  ]
1809
1674
  },
1810
1675
  index
@@ -1815,7 +1680,72 @@ function FeatureGrid({
1815
1680
 
1816
1681
  // components/page/Footer.tsx
1817
1682
  var import_lucide_react3 = require("lucide-react");
1818
- var import_jsx_runtime20 = require("react/jsx-runtime");
1683
+
1684
+ // hooks/useGtmEvent.ts
1685
+ function useGtmEvent() {
1686
+ return (eventName, data) => {
1687
+ if (typeof window === "undefined") return;
1688
+ if (typeof window.gtag === "function") {
1689
+ window.gtag("event", eventName, data || {});
1690
+ }
1691
+ };
1692
+ }
1693
+
1694
+ // hooks/useUtmParams.ts
1695
+ var import_react4 = require("react");
1696
+ function useUtmParams() {
1697
+ const [utmParams, setUtmParams] = (0, import_react4.useState)({});
1698
+ (0, import_react4.useEffect)(() => {
1699
+ if (typeof window === "undefined") return;
1700
+ const urlParams = new URLSearchParams(window.location.search);
1701
+ const source = urlParams.get("utm_source");
1702
+ const medium = urlParams.get("utm_medium");
1703
+ const campaign = urlParams.get("utm_campaign");
1704
+ const content = urlParams.get("utm_content");
1705
+ const term = urlParams.get("utm_term");
1706
+ const params = {};
1707
+ if (source) {
1708
+ params.source = source;
1709
+ sessionStorage.setItem("utm_source", source);
1710
+ } else {
1711
+ const stored = sessionStorage.getItem("utm_source");
1712
+ if (stored) params.source = stored;
1713
+ }
1714
+ if (medium) {
1715
+ params.medium = medium;
1716
+ sessionStorage.setItem("utm_medium", medium);
1717
+ } else {
1718
+ const stored = sessionStorage.getItem("utm_medium");
1719
+ if (stored) params.medium = stored;
1720
+ }
1721
+ if (campaign) {
1722
+ params.campaign = campaign;
1723
+ sessionStorage.setItem("utm_campaign", campaign);
1724
+ } else {
1725
+ const stored = sessionStorage.getItem("utm_campaign");
1726
+ if (stored) params.campaign = stored;
1727
+ }
1728
+ if (content) {
1729
+ params.content = content;
1730
+ sessionStorage.setItem("utm_content", content);
1731
+ } else {
1732
+ const stored = sessionStorage.getItem("utm_content");
1733
+ if (stored) params.content = stored;
1734
+ }
1735
+ if (term) {
1736
+ params.term = term;
1737
+ sessionStorage.setItem("utm_term", term);
1738
+ } else {
1739
+ const stored = sessionStorage.getItem("utm_term");
1740
+ if (stored) params.term = stored;
1741
+ }
1742
+ setUtmParams(params);
1743
+ }, []);
1744
+ return utmParams;
1745
+ }
1746
+
1747
+ // components/page/Footer.tsx
1748
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1819
1749
  function Footer({
1820
1750
  logo,
1821
1751
  copyright = "\xA9 2024 Company. All rights reserved.",
@@ -1850,15 +1780,15 @@ function Footer({
1850
1780
  ].filter(
1851
1781
  (link) => !!link.url
1852
1782
  );
1853
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1783
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1854
1784
  "footer",
1855
1785
  {
1856
1786
  className: "w-full px-6 py-8",
1857
1787
  style: { backgroundColor, color: textColor },
1858
- 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: [
1859
- /* @__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" }) }),
1860
- DropZone && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropZone, { zone: "footer-content" }),
1861
- /* @__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)(
1788
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "mx-auto flex max-w-7xl flex-col items-center justify-between gap-6 md:flex-row", children: [
1789
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex items-center gap-4", children: logo && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("img", { src: logo, alt: "Logo", className: "h-8" }) }),
1790
+ DropZone && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DropZone, { zone: "footer-content" }),
1791
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex items-center gap-4", children: socialLinks.map(({ url, Icon: Icon3 }, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1862
1792
  "a",
1863
1793
  {
1864
1794
  href: url,
@@ -1866,11 +1796,11 @@ function Footer({
1866
1796
  rel: "noopener noreferrer",
1867
1797
  className: "transition-opacity hover:opacity-80",
1868
1798
  onClick: () => handleSocialClick(url),
1869
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon3, { size: 24, style: { color: textColor } })
1799
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon3, { size: 24, style: { color: textColor } })
1870
1800
  },
1871
1801
  index
1872
1802
  )) }),
1873
- copyright && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-sm opacity-80", children: copyright })
1803
+ copyright && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-sm opacity-80", children: copyright })
1874
1804
  ] })
1875
1805
  }
1876
1806
  );
@@ -1879,7 +1809,7 @@ function Footer({
1879
1809
  // components/page/Topbar.tsx
1880
1810
  var import_react5 = require("react");
1881
1811
  var import_lucide_react4 = require("lucide-react");
1882
- var import_jsx_runtime21 = require("react/jsx-runtime");
1812
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1883
1813
  function Topbar({
1884
1814
  logo,
1885
1815
  logoUrl = "/",
@@ -1912,7 +1842,7 @@ function Topbar({
1912
1842
  const renderLink = (item, index) => {
1913
1843
  const className = "hover:opacity-80 transition-opacity";
1914
1844
  if (item.linkType === "external") {
1915
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1845
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1916
1846
  "a",
1917
1847
  {
1918
1848
  href: item.url,
@@ -1926,7 +1856,7 @@ function Topbar({
1926
1856
  );
1927
1857
  }
1928
1858
  if (item.linkType === "scrollTo") {
1929
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1859
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1930
1860
  "a",
1931
1861
  {
1932
1862
  href: item.url,
@@ -1937,7 +1867,7 @@ function Topbar({
1937
1867
  index
1938
1868
  );
1939
1869
  }
1940
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1870
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1941
1871
  "a",
1942
1872
  {
1943
1873
  href: item.url,
@@ -1948,19 +1878,19 @@ function Topbar({
1948
1878
  index
1949
1879
  );
1950
1880
  };
1951
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1881
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1952
1882
  "nav",
1953
1883
  {
1954
1884
  className: "sticky top-0 z-50 w-full px-6 py-4",
1955
1885
  style: { backgroundColor, color: textColor },
1956
1886
  children: [
1957
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1887
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1958
1888
  "div",
1959
1889
  {
1960
1890
  className: "mx-auto flex items-center justify-between",
1961
1891
  style: { maxWidth },
1962
1892
  children: [
1963
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1893
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1964
1894
  "a",
1965
1895
  {
1966
1896
  href: logoUrl,
@@ -1971,25 +1901,25 @@ function Topbar({
1971
1901
  linkType: "internal",
1972
1902
  ...utm
1973
1903
  }),
1974
- 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" })
1904
+ children: logo ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("img", { src: logo, alt: "Logo", className: "h-8" }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-xl font-bold", children: "Logo" })
1975
1905
  }
1976
1906
  ),
1977
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "hidden items-center gap-8 md:flex", children: [
1907
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "hidden items-center gap-8 md:flex", children: [
1978
1908
  navItems.map(renderLink),
1979
- DropZone && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DropZone, { zone: "cta" })
1909
+ DropZone && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropZone, { zone: "cta" })
1980
1910
  ] }),
1981
- /* @__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 }) })
1911
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("button", { className: "md:hidden", onClick: handleMobileMenuToggle, children: mobileMenuOpen ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react4.X, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react4.Menu, { size: 24 }) })
1982
1912
  ]
1983
1913
  }
1984
1914
  ),
1985
- mobileMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1915
+ mobileMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1986
1916
  "div",
1987
1917
  {
1988
1918
  className: "absolute top-full right-0 left-0 flex flex-col gap-4 px-6 py-4 md:hidden",
1989
1919
  style: { backgroundColor },
1990
1920
  children: [
1991
1921
  navItems.map(renderLink),
1992
- DropZone && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DropZone, { zone: "cta" })
1922
+ DropZone && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropZone, { zone: "cta" })
1993
1923
  ]
1994
1924
  }
1995
1925
  )
@@ -2001,12 +1931,12 @@ function Topbar({
2001
1931
  // components/page/Popup.tsx
2002
1932
  var import_react6 = require("react");
2003
1933
  var import_lucide_react5 = require("lucide-react");
2004
- var import_jsx_runtime22 = require("react/jsx-runtime");
1934
+ var import_jsx_runtime23 = require("react/jsx-runtime");
2005
1935
  function Icon2({ name, ...props }) {
2006
1936
  const formatted = name.charAt(0).toUpperCase() + name.slice(1);
2007
1937
  const IconComponent = import_lucide_react5.icons[formatted];
2008
1938
  if (!IconComponent) return null;
2009
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(IconComponent, { ...props });
1939
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(IconComponent, { ...props });
2010
1940
  }
2011
1941
  var widthMap3 = {
2012
1942
  small: "max-w-sm",
@@ -2044,7 +1974,7 @@ function Popup({
2044
1974
  setIsOpen(false);
2045
1975
  sendEvent("popup_close", { ctaText, ...utm });
2046
1976
  };
2047
- const trigger = textLink ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1977
+ const trigger = textLink ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2048
1978
  "button",
2049
1979
  {
2050
1980
  onClick: handleOpen,
@@ -2052,7 +1982,7 @@ function Popup({
2052
1982
  style: { color: buttonColor },
2053
1983
  children: ctaText
2054
1984
  }
2055
- ) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1985
+ ) : /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2056
1986
  "button",
2057
1987
  {
2058
1988
  onClick: handleOpen,
@@ -2062,20 +1992,20 @@ function Popup({
2062
1992
  ),
2063
1993
  style: { backgroundColor: buttonColor, color: textColor },
2064
1994
  children: [
2065
- icon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon2, { name: icon, size: 18 }),
1995
+ icon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon2, { name: icon, size: 18 }),
2066
1996
  ctaText,
2067
- icon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon2, { name: icon, size: 18 })
1997
+ icon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon2, { name: icon, size: 18 })
2068
1998
  ]
2069
1999
  }
2070
2000
  );
2071
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
2001
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
2072
2002
  trigger,
2073
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2003
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2074
2004
  "div",
2075
2005
  {
2076
2006
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
2077
2007
  onClick: handleClose,
2078
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2008
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2079
2009
  "div",
2080
2010
  {
2081
2011
  className: cn(
@@ -2084,15 +2014,15 @@ function Popup({
2084
2014
  ),
2085
2015
  onClick: (e) => e.stopPropagation(),
2086
2016
  children: [
2087
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2017
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2088
2018
  "button",
2089
2019
  {
2090
2020
  onClick: handleClose,
2091
2021
  className: "absolute top-4 right-4 text-gray-500 hover:text-gray-700",
2092
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react5.X, { size: 24 })
2022
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react5.X, { size: 24 })
2093
2023
  }
2094
2024
  ),
2095
- puck && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(puck.renderDropZone, { zone: "popup-content" })
2025
+ puck && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(puck.renderDropZone, { zone: "popup-content" })
2096
2026
  ]
2097
2027
  }
2098
2028
  )