@opensite/ui 2.8.7 → 2.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/about-culture-tabs.cjs +174 -174
- package/dist/about-culture-tabs.js +174 -174
- package/dist/about-developer-profile.cjs +200 -200
- package/dist/about-developer-profile.js +198 -198
- package/dist/about-developer-story.cjs +142 -142
- package/dist/about-developer-story.js +142 -142
- package/dist/about-mission-dual-image.cjs +142 -142
- package/dist/about-mission-dual-image.js +142 -142
- package/dist/about-mission-features.cjs +142 -142
- package/dist/about-mission-features.js +142 -142
- package/dist/about-network-spotlight.cjs +142 -142
- package/dist/about-network-spotlight.js +142 -142
- package/dist/about-story-expertise.cjs +142 -142
- package/dist/about-story-expertise.js +142 -142
- package/dist/about-streamline-team.cjs +142 -142
- package/dist/about-streamline-team.js +142 -142
- package/dist/carousel-icon-sidebar.cjs +5 -4
- package/dist/carousel-icon-sidebar.js +5 -4
- package/dist/community-initiatives.cjs +142 -142
- package/dist/community-initiatives.js +142 -142
- package/dist/components.cjs +723 -1364
- package/dist/components.d.cts +0 -2
- package/dist/components.d.ts +0 -2
- package/dist/components.js +633 -1273
- package/dist/contact-map.cjs +14 -1069
- package/dist/contact-map.d.cts +13 -3
- package/dist/contact-map.d.ts +13 -3
- package/dist/contact-map.js +14 -1069
- package/dist/cta-feature-checklist.cjs +142 -142
- package/dist/cta-feature-checklist.js +142 -142
- package/dist/faq-numbered-grid.cjs +142 -142
- package/dist/faq-numbered-grid.js +142 -142
- package/dist/feature-animated-carousel.cjs +142 -142
- package/dist/feature-animated-carousel.js +142 -142
- package/dist/feature-bento-utilities.cjs +142 -142
- package/dist/feature-bento-utilities.js +142 -142
- package/dist/feature-capabilities-grid.cjs +142 -142
- package/dist/feature-capabilities-grid.js +142 -142
- package/dist/feature-category-image-cards.cjs +142 -142
- package/dist/feature-category-image-cards.js +142 -142
- package/dist/feature-icon-grid-bordered.cjs +142 -142
- package/dist/feature-icon-grid-bordered.js +142 -142
- package/dist/feature-icon-grid-muted.cjs +142 -142
- package/dist/feature-icon-grid-muted.js +142 -142
- package/dist/feature-numbered-cards.cjs +142 -142
- package/dist/feature-numbered-cards.js +142 -142
- package/dist/feature-three-column-values.cjs +142 -142
- package/dist/feature-three-column-values.js +142 -142
- package/dist/hero-ad-campaign-expert.cjs +142 -142
- package/dist/hero-ad-campaign-expert.js +142 -142
- package/dist/hero-adaptable-product-grid.cjs +142 -142
- package/dist/hero-adaptable-product-grid.js +142 -142
- package/dist/hero-agency-animated-images.cjs +142 -142
- package/dist/hero-agency-animated-images.js +142 -142
- package/dist/hero-announcement-badge.cjs +142 -142
- package/dist/hero-announcement-badge.js +142 -142
- package/dist/hero-badge-image-split.cjs +142 -142
- package/dist/hero-badge-image-split.js +142 -142
- package/dist/hero-business-carousel-dots.cjs +142 -142
- package/dist/hero-business-carousel-dots.js +142 -142
- package/dist/hero-business-operations-mosaic.cjs +142 -142
- package/dist/hero-business-operations-mosaic.js +142 -142
- package/dist/hero-conversation-intelligence.cjs +142 -142
- package/dist/hero-conversation-intelligence.js +142 -142
- package/dist/hero-creative-studio-stacked.cjs +142 -142
- package/dist/hero-creative-studio-stacked.js +142 -142
- package/dist/hero-crm-streamlined.cjs +142 -142
- package/dist/hero-crm-streamlined.js +142 -142
- package/dist/hero-customer-support-layered.cjs +142 -142
- package/dist/hero-customer-support-layered.js +142 -142
- package/dist/hero-design-showcase-logos.cjs +142 -142
- package/dist/hero-design-showcase-logos.js +142 -142
- package/dist/hero-design-system-3d.cjs +142 -142
- package/dist/hero-design-system-3d.js +142 -142
- package/dist/hero-developer-tools-code.cjs +142 -142
- package/dist/hero-developer-tools-code.js +142 -142
- package/dist/hero-digital-agency-fullscreen.cjs +142 -142
- package/dist/hero-digital-agency-fullscreen.js +142 -142
- package/dist/hero-ecommerce-product-showcase.cjs +174 -174
- package/dist/hero-ecommerce-product-showcase.js +174 -174
- package/dist/hero-event-registration.cjs +142 -142
- package/dist/hero-event-registration.js +142 -142
- package/dist/hero-fullscreen-background-image.cjs +142 -142
- package/dist/hero-fullscreen-background-image.js +142 -142
- package/dist/hero-gradient-avatars-rating.cjs +142 -142
- package/dist/hero-gradient-avatars-rating.js +142 -142
- package/dist/hero-gradient-client-focused.cjs +142 -142
- package/dist/hero-gradient-client-focused.js +142 -142
- package/dist/hero-hiring-animated-text.cjs +142 -142
- package/dist/hero-hiring-animated-text.js +142 -142
- package/dist/hero-image-left-content.cjs +142 -142
- package/dist/hero-image-left-content.js +142 -142
- package/dist/hero-innovation-image-grid.cjs +142 -142
- package/dist/hero-innovation-image-grid.js +142 -142
- package/dist/hero-mental-health-team.cjs +142 -142
- package/dist/hero-mental-health-team.js +142 -142
- package/dist/hero-minimal-centered-dark.cjs +174 -174
- package/dist/hero-minimal-centered-dark.js +174 -174
- package/dist/hero-presentation-platform-video.cjs +142 -142
- package/dist/hero-presentation-platform-video.js +142 -142
- package/dist/hero-product-showcase-floating.cjs +174 -174
- package/dist/hero-product-showcase-floating.js +174 -174
- package/dist/hero-shared-inbox-layered.cjs +142 -142
- package/dist/hero-shared-inbox-layered.js +142 -142
- package/dist/hero-software-growth-video-dialog.cjs +142 -142
- package/dist/hero-software-growth-video-dialog.js +142 -142
- package/dist/hero-spiral-pattern-cards.cjs +174 -174
- package/dist/hero-spiral-pattern-cards.js +174 -174
- package/dist/hero-split-geometric-shapes.cjs +142 -142
- package/dist/hero-split-geometric-shapes.js +142 -142
- package/dist/hero-startup-launch-cta.cjs +174 -174
- package/dist/hero-startup-launch-cta.js +174 -174
- package/dist/hero-stats-social-proof.cjs +174 -174
- package/dist/hero-stats-social-proof.js +174 -174
- package/dist/hero-task-timer-animated.cjs +142 -142
- package/dist/hero-task-timer-animated.js +142 -142
- package/dist/hero-testimonial-image-grid.cjs +142 -142
- package/dist/hero-testimonial-image-grid.js +142 -142
- package/dist/hero-therapy-testimonial-grid.cjs +142 -142
- package/dist/hero-therapy-testimonial-grid.js +142 -142
- package/dist/hero-ui-library-showcase.cjs +142 -142
- package/dist/hero-ui-library-showcase.js +142 -142
- package/dist/hero-video-background-dark.cjs +174 -174
- package/dist/hero-video-background-dark.js +174 -174
- package/dist/hero-video-dialog-gradient.cjs +142 -142
- package/dist/hero-video-dialog-gradient.js +142 -142
- package/dist/hero-video-overlay-stars.cjs +142 -142
- package/dist/hero-video-overlay-stars.js +142 -142
- package/dist/hero-welcome-asymmetric-images.cjs +142 -142
- package/dist/hero-welcome-asymmetric-images.js +142 -142
- package/dist/index.cjs +725 -1366
- package/dist/index.d.cts +0 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.js +634 -1274
- package/dist/registry.cjs +2371 -2915
- package/dist/registry.js +1120 -1664
- package/dist/testimonials-large-quote.cjs +74 -43
- package/dist/testimonials-large-quote.d.cts +5 -1
- package/dist/testimonials-large-quote.d.ts +5 -1
- package/dist/testimonials-large-quote.js +74 -43
- package/dist/testimonials-logo-cards.cjs +8 -2
- package/dist/testimonials-logo-cards.js +8 -2
- package/dist/testimonials-masonry-grid.cjs +486 -69
- package/dist/testimonials-masonry-grid.d.cts +5 -1
- package/dist/testimonials-masonry-grid.d.ts +5 -1
- package/dist/testimonials-masonry-grid.js +483 -63
- package/dist/testimonials-mini-dividers.cjs +2 -3
- package/dist/testimonials-mini-dividers.js +2 -3
- package/dist/testimonials-minimal-numbered.cjs +5 -4
- package/dist/testimonials-minimal-numbered.js +5 -4
- package/dist/testimonials-parallax-number.cjs +5 -4
- package/dist/testimonials-parallax-number.js +5 -4
- package/dist/testimonials-scrolling-columns.cjs +7 -12
- package/dist/testimonials-scrolling-columns.js +7 -12
- package/dist/testimonials-stats-header.cjs +528 -87
- package/dist/testimonials-stats-header.d.cts +39 -3
- package/dist/testimonials-stats-header.d.ts +39 -3
- package/dist/testimonials-stats-header.js +523 -82
- package/package.json +4 -7
- package/dist/geo-map.cjs +0 -1103
- package/dist/geo-map.d.cts +0 -92
- package/dist/geo-map.d.ts +0 -92
- package/dist/geo-map.js +0 -1081
package/dist/components.cjs
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var React4 = require('react');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
-
var maps = require('@page-speed/maps');
|
|
9
|
-
var classVarianceAuthority = require('class-variance-authority');
|
|
10
|
-
var icon = require('@page-speed/icon');
|
|
11
|
-
var img = require('@page-speed/img');
|
|
12
8
|
var framerMotion = require('framer-motion');
|
|
13
9
|
var useOnClickOutside = require('@opensite/hooks/useOnClickOutside');
|
|
14
10
|
var react = require('motion/react');
|
|
11
|
+
var img = require('@page-speed/img');
|
|
15
12
|
var reactSlot = require('@radix-ui/react-slot');
|
|
13
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
16
14
|
var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
15
|
+
var icon = require('@page-speed/icon');
|
|
17
16
|
var usePlatformFromUrl = require('@opensite/hooks/usePlatformFromUrl');
|
|
18
17
|
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
19
18
|
var integration = require('@page-speed/forms/integration');
|
|
@@ -36,7 +35,7 @@ function _interopNamespace(e) {
|
|
|
36
35
|
return Object.freeze(n);
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
var
|
|
38
|
+
var React4__namespace = /*#__PURE__*/_interopNamespace(React4);
|
|
40
39
|
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
|
|
41
40
|
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
|
|
42
41
|
|
|
@@ -83,7 +82,7 @@ var maxWidthStyles = {
|
|
|
83
82
|
"4xl": "max-w-[1536px]",
|
|
84
83
|
full: "max-w-full"
|
|
85
84
|
};
|
|
86
|
-
var Container =
|
|
85
|
+
var Container = React4__namespace.default.forwardRef(
|
|
87
86
|
({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
|
|
88
87
|
const Component = as;
|
|
89
88
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -389,7 +388,7 @@ var spacingStyles = {
|
|
|
389
388
|
};
|
|
390
389
|
var predefinedSpacings = ["none", "sm", "md", "lg", "xl", "hero"];
|
|
391
390
|
var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
|
|
392
|
-
var Section =
|
|
391
|
+
var Section = React4__namespace.default.forwardRef(
|
|
393
392
|
({
|
|
394
393
|
id,
|
|
395
394
|
title,
|
|
@@ -450,1130 +449,65 @@ var Section = React6__namespace.default.forwardRef(
|
|
|
450
449
|
}
|
|
451
450
|
);
|
|
452
451
|
Section.displayName = "Section";
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
const
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
const phoneRegex = /^[\s\+\-\(\)]*\d[\d\s\-\(\)\.]*\d[\s\-]*(x|ext\.?|extension)?[\s\-]*\d*$/i;
|
|
486
|
-
return phoneRegex.test(trimmed);
|
|
487
|
-
}
|
|
488
|
-
function isInternalUrl(href) {
|
|
489
|
-
if (typeof window === "undefined") {
|
|
490
|
-
return href.startsWith("/") && !href.startsWith("//");
|
|
491
|
-
}
|
|
492
|
-
const trimmed = href.trim();
|
|
493
|
-
if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
|
|
494
|
-
return true;
|
|
495
|
-
}
|
|
496
|
-
try {
|
|
497
|
-
const url = new URL(trimmed, window.location.href);
|
|
498
|
-
const currentOrigin = window.location.origin;
|
|
499
|
-
const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
|
|
500
|
-
return normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin);
|
|
501
|
-
} catch {
|
|
502
|
-
return false;
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
function toRelativePath(href) {
|
|
506
|
-
if (typeof window === "undefined") {
|
|
507
|
-
return href;
|
|
508
|
-
}
|
|
509
|
-
const trimmed = href.trim();
|
|
510
|
-
if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
|
|
511
|
-
return trimmed;
|
|
512
|
-
}
|
|
513
|
-
try {
|
|
514
|
-
const url = new URL(trimmed, window.location.href);
|
|
515
|
-
const currentOrigin = window.location.origin;
|
|
516
|
-
const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
|
|
517
|
-
if (normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin)) {
|
|
518
|
-
return url.pathname + url.search + url.hash;
|
|
519
|
-
}
|
|
520
|
-
} catch {
|
|
521
|
-
}
|
|
522
|
-
return trimmed;
|
|
523
|
-
}
|
|
524
|
-
function useNavigation({
|
|
525
|
-
href,
|
|
526
|
-
onClick
|
|
527
|
-
} = {}) {
|
|
528
|
-
const linkType = React6__namespace.useMemo(() => {
|
|
529
|
-
if (!href || href.trim() === "") {
|
|
530
|
-
return onClick ? "none" : "none";
|
|
531
|
-
}
|
|
532
|
-
const trimmed = href.trim();
|
|
533
|
-
if (trimmed.toLowerCase().startsWith("mailto:") || isEmail(trimmed)) {
|
|
534
|
-
return "mailto";
|
|
535
|
-
}
|
|
536
|
-
if (trimmed.toLowerCase().startsWith("tel:") || isPhoneNumber(trimmed)) {
|
|
537
|
-
return "tel";
|
|
538
|
-
}
|
|
539
|
-
if (isInternalUrl(trimmed)) {
|
|
540
|
-
return "internal";
|
|
541
|
-
}
|
|
542
|
-
try {
|
|
543
|
-
new URL(trimmed, typeof window !== "undefined" ? window.location.href : "http://localhost");
|
|
544
|
-
return "external";
|
|
545
|
-
} catch {
|
|
546
|
-
return "internal";
|
|
547
|
-
}
|
|
548
|
-
}, [href, onClick]);
|
|
549
|
-
const normalizedHref = React6__namespace.useMemo(() => {
|
|
550
|
-
if (!href || href.trim() === "") {
|
|
551
|
-
return void 0;
|
|
552
|
-
}
|
|
553
|
-
const trimmed = href.trim();
|
|
554
|
-
switch (linkType) {
|
|
555
|
-
case "tel":
|
|
556
|
-
return normalizePhoneNumber(trimmed);
|
|
557
|
-
case "mailto":
|
|
558
|
-
return normalizeEmail(trimmed);
|
|
559
|
-
case "internal":
|
|
560
|
-
return toRelativePath(trimmed);
|
|
561
|
-
case "external":
|
|
562
|
-
return trimmed;
|
|
563
|
-
default:
|
|
564
|
-
return trimmed;
|
|
565
|
-
}
|
|
566
|
-
}, [href, linkType]);
|
|
567
|
-
const target = React6__namespace.useMemo(() => {
|
|
568
|
-
switch (linkType) {
|
|
569
|
-
case "external":
|
|
570
|
-
return "_blank";
|
|
571
|
-
case "internal":
|
|
572
|
-
return "_self";
|
|
573
|
-
case "mailto":
|
|
574
|
-
case "tel":
|
|
575
|
-
return void 0;
|
|
576
|
-
default:
|
|
577
|
-
return void 0;
|
|
452
|
+
var sizeStyles = {
|
|
453
|
+
sm: "max-w-md",
|
|
454
|
+
md: "max-w-2xl",
|
|
455
|
+
lg: "max-w-4xl",
|
|
456
|
+
xl: "max-w-5xl",
|
|
457
|
+
full: "max-w-7xl",
|
|
458
|
+
compact: "max-w-[700px]"
|
|
459
|
+
};
|
|
460
|
+
var dialogTransition = {
|
|
461
|
+
duration: 0.35,
|
|
462
|
+
ease: [0.16, 1, 0.3, 1]
|
|
463
|
+
};
|
|
464
|
+
function AnimatedDialog({
|
|
465
|
+
open,
|
|
466
|
+
onOpenChange,
|
|
467
|
+
title,
|
|
468
|
+
eyebrow,
|
|
469
|
+
description,
|
|
470
|
+
children,
|
|
471
|
+
header,
|
|
472
|
+
footer,
|
|
473
|
+
size = "lg",
|
|
474
|
+
className,
|
|
475
|
+
contentClassName,
|
|
476
|
+
featuredMediaHeader
|
|
477
|
+
}) {
|
|
478
|
+
const titleId = React4.useId();
|
|
479
|
+
const descriptionId = React4.useId();
|
|
480
|
+
const containerRef = React4.useRef(null);
|
|
481
|
+
useOnClickOutside.useOnClickOutside(containerRef, () => {
|
|
482
|
+
if (open) {
|
|
483
|
+
onOpenChange(false);
|
|
578
484
|
}
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
if (
|
|
582
|
-
return
|
|
485
|
+
});
|
|
486
|
+
React4.useEffect(() => {
|
|
487
|
+
if (!open) {
|
|
488
|
+
return;
|
|
583
489
|
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
const isInternal = linkType === "internal";
|
|
588
|
-
const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
|
|
589
|
-
const handleClick = React6__namespace.useCallback(
|
|
590
|
-
(event) => {
|
|
591
|
-
if (onClick) {
|
|
592
|
-
try {
|
|
593
|
-
onClick(event);
|
|
594
|
-
} catch (error) {
|
|
595
|
-
console.error("Error in user onClick handler:", error);
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
if (event.defaultPrevented) {
|
|
599
|
-
return;
|
|
490
|
+
const onKeyDown = (event) => {
|
|
491
|
+
if (event.key === "Escape") {
|
|
492
|
+
onOpenChange(false);
|
|
600
493
|
}
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
[onClick, shouldUseRouter, normalizedHref]
|
|
619
|
-
);
|
|
620
|
-
return {
|
|
621
|
-
linkType,
|
|
622
|
-
normalizedHref,
|
|
623
|
-
target,
|
|
624
|
-
rel,
|
|
625
|
-
isExternal,
|
|
626
|
-
isInternal,
|
|
627
|
-
shouldUseRouter,
|
|
628
|
-
handleClick
|
|
629
|
-
};
|
|
630
|
-
}
|
|
631
|
-
var baseStyles = [
|
|
632
|
-
// Layout
|
|
633
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap shrink-0",
|
|
634
|
-
// Typography - using CSS variables with sensible defaults
|
|
635
|
-
"font-[var(--button-font-family,inherit)]",
|
|
636
|
-
"font-[var(--button-font-weight,500)]",
|
|
637
|
-
"tracking-[var(--button-letter-spacing,0)]",
|
|
638
|
-
"leading-[var(--button-line-height,1.25)]",
|
|
639
|
-
"[text-transform:var(--button-text-transform,none)]",
|
|
640
|
-
"text-sm",
|
|
641
|
-
// Border radius
|
|
642
|
-
"rounded-[var(--button-radius,var(--radius,0.375rem))]",
|
|
643
|
-
// Smooth transition - using [transition:...] to set full shorthand property (not just transition-property)
|
|
644
|
-
"[transition:var(--button-transition,all_250ms_cubic-bezier(0.4,0,0.2,1))]",
|
|
645
|
-
// Box shadow (master level) - using [box-shadow:...] for complex multi-value shadows
|
|
646
|
-
"[box-shadow:var(--button-shadow,none)]",
|
|
647
|
-
"hover:[box-shadow:var(--button-shadow-hover,var(--button-shadow,none))]",
|
|
648
|
-
// Disabled state
|
|
649
|
-
"disabled:pointer-events-none disabled:opacity-50",
|
|
650
|
-
// SVG handling
|
|
651
|
-
"[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
|
|
652
|
-
// Focus styles
|
|
653
|
-
"outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
654
|
-
// Invalid state
|
|
655
|
-
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
|
|
656
|
-
].join(" ");
|
|
657
|
-
var buttonVariants = classVarianceAuthority.cva(baseStyles, {
|
|
658
|
-
variants: {
|
|
659
|
-
variant: {
|
|
660
|
-
// Default (Primary) variant - full customization
|
|
661
|
-
default: [
|
|
662
|
-
"bg-[var(--button-default-bg,hsl(var(--primary)))]",
|
|
663
|
-
"text-[var(--button-default-fg,hsl(var(--primary-foreground)))]",
|
|
664
|
-
"border-[length:var(--button-default-border-width,0px)]",
|
|
665
|
-
"border-[color:var(--button-default-border,transparent)]",
|
|
666
|
-
"[box-shadow:var(--button-default-shadow,var(--button-shadow,none))]",
|
|
667
|
-
"hover:bg-[var(--button-default-hover-bg,hsl(var(--primary)/0.9))]",
|
|
668
|
-
"hover:text-[var(--button-default-hover-fg,var(--button-default-fg,hsl(var(--primary-foreground))))]",
|
|
669
|
-
"hover:border-[color:var(--button-default-hover-border,var(--button-default-border,transparent))]",
|
|
670
|
-
"hover:[box-shadow:var(--button-default-shadow-hover,var(--button-shadow-hover,var(--button-default-shadow,var(--button-shadow,none))))]"
|
|
671
|
-
].join(" "),
|
|
672
|
-
// Destructive variant - full customization
|
|
673
|
-
destructive: [
|
|
674
|
-
"bg-[var(--button-destructive-bg,hsl(var(--destructive)))]",
|
|
675
|
-
"text-[var(--button-destructive-fg,white)]",
|
|
676
|
-
"border-[length:var(--button-destructive-border-width,0px)]",
|
|
677
|
-
"border-[color:var(--button-destructive-border,transparent)]",
|
|
678
|
-
"[box-shadow:var(--button-destructive-shadow,var(--button-shadow,none))]",
|
|
679
|
-
"hover:bg-[var(--button-destructive-hover-bg,hsl(var(--destructive)/0.9))]",
|
|
680
|
-
"hover:text-[var(--button-destructive-hover-fg,var(--button-destructive-fg,white))]",
|
|
681
|
-
"hover:border-[color:var(--button-destructive-hover-border,var(--button-destructive-border,transparent))]",
|
|
682
|
-
"hover:[box-shadow:var(--button-destructive-shadow-hover,var(--button-shadow-hover,var(--button-destructive-shadow,var(--button-shadow,none))))]",
|
|
683
|
-
"focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
|
|
684
|
-
"dark:bg-destructive/60"
|
|
685
|
-
].join(" "),
|
|
686
|
-
// Outline variant - full customization with proper border handling
|
|
687
|
-
outline: [
|
|
688
|
-
"bg-[var(--button-outline-bg,hsl(var(--background)))]",
|
|
689
|
-
"text-[var(--button-outline-fg,inherit)]",
|
|
690
|
-
"border-[length:var(--button-outline-border-width,1px)]",
|
|
691
|
-
"border-[color:var(--button-outline-border,hsl(var(--border)))]",
|
|
692
|
-
"[box-shadow:var(--button-outline-shadow,var(--button-shadow,0_1px_2px_0_rgb(0_0_0/0.05)))]",
|
|
693
|
-
"hover:bg-[var(--button-outline-hover-bg,hsl(var(--accent)))]",
|
|
694
|
-
"hover:text-[var(--button-outline-hover-fg,hsl(var(--accent-foreground)))]",
|
|
695
|
-
"hover:border-[color:var(--button-outline-hover-border,var(--button-outline-border,hsl(var(--border))))]",
|
|
696
|
-
"hover:[box-shadow:var(--button-outline-shadow-hover,var(--button-shadow-hover,var(--button-outline-shadow,var(--button-shadow,none))))]",
|
|
697
|
-
"dark:bg-input/30 dark:border-input dark:hover:bg-input/50"
|
|
698
|
-
].join(" "),
|
|
699
|
-
// Secondary variant - full customization
|
|
700
|
-
secondary: [
|
|
701
|
-
"bg-[var(--button-secondary-bg,hsl(var(--secondary)))]",
|
|
702
|
-
"text-[var(--button-secondary-fg,hsl(var(--secondary-foreground)))]",
|
|
703
|
-
"border-[length:var(--button-secondary-border-width,0px)]",
|
|
704
|
-
"border-[color:var(--button-secondary-border,transparent)]",
|
|
705
|
-
"[box-shadow:var(--button-secondary-shadow,var(--button-shadow,none))]",
|
|
706
|
-
"hover:bg-[var(--button-secondary-hover-bg,hsl(var(--secondary)/0.8))]",
|
|
707
|
-
"hover:text-[var(--button-secondary-hover-fg,var(--button-secondary-fg,hsl(var(--secondary-foreground))))]",
|
|
708
|
-
"hover:border-[color:var(--button-secondary-hover-border,var(--button-secondary-border,transparent))]",
|
|
709
|
-
"hover:[box-shadow:var(--button-secondary-shadow-hover,var(--button-shadow-hover,var(--button-secondary-shadow,var(--button-shadow,none))))]"
|
|
710
|
-
].join(" "),
|
|
711
|
-
// Ghost variant - full customization
|
|
712
|
-
ghost: [
|
|
713
|
-
"bg-[var(--button-ghost-bg,transparent)]",
|
|
714
|
-
"text-[var(--button-ghost-fg,inherit)]",
|
|
715
|
-
"border-[length:var(--button-ghost-border-width,0px)]",
|
|
716
|
-
"border-[color:var(--button-ghost-border,transparent)]",
|
|
717
|
-
"[box-shadow:var(--button-ghost-shadow,var(--button-shadow,none))]",
|
|
718
|
-
"hover:bg-[var(--button-ghost-hover-bg,hsl(var(--accent)))]",
|
|
719
|
-
"hover:text-[var(--button-ghost-hover-fg,hsl(var(--accent-foreground)))]",
|
|
720
|
-
"hover:border-[color:var(--button-ghost-hover-border,var(--button-ghost-border,transparent))]",
|
|
721
|
-
"hover:[box-shadow:var(--button-ghost-shadow-hover,var(--button-shadow-hover,var(--button-ghost-shadow,var(--button-shadow,none))))]",
|
|
722
|
-
"dark:hover:bg-accent/50"
|
|
723
|
-
].join(" "),
|
|
724
|
-
// Link variant - full customization
|
|
725
|
-
link: [
|
|
726
|
-
"bg-[var(--button-link-bg,transparent)]",
|
|
727
|
-
"text-[var(--button-link-fg,hsl(var(--primary)))]",
|
|
728
|
-
"border-[length:var(--button-link-border-width,0px)]",
|
|
729
|
-
"border-[color:var(--button-link-border,transparent)]",
|
|
730
|
-
"[box-shadow:var(--button-link-shadow,none)]",
|
|
731
|
-
"hover:bg-[var(--button-link-hover-bg,transparent)]",
|
|
732
|
-
"hover:text-[var(--button-link-hover-fg,var(--button-link-fg,hsl(var(--primary))))]",
|
|
733
|
-
"hover:[box-shadow:var(--button-link-shadow-hover,none)]",
|
|
734
|
-
"underline-offset-4 hover:underline"
|
|
735
|
-
].join(" ")
|
|
736
|
-
},
|
|
737
|
-
size: {
|
|
738
|
-
default: [
|
|
739
|
-
"h-[var(--button-height-md,2.25rem)]",
|
|
740
|
-
"px-[var(--button-padding-x-md,1rem)]",
|
|
741
|
-
"py-[var(--button-padding-y-md,0.5rem)]",
|
|
742
|
-
"has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
|
|
743
|
-
].join(" "),
|
|
744
|
-
sm: [
|
|
745
|
-
"h-[var(--button-height-sm,2rem)]",
|
|
746
|
-
"px-[var(--button-padding-x-sm,0.75rem)]",
|
|
747
|
-
"py-[var(--button-padding-y-sm,0.25rem)]",
|
|
748
|
-
"gap-1.5",
|
|
749
|
-
"has-[>svg]:px-[calc(var(--button-padding-x-sm,0.75rem)*0.83)]"
|
|
750
|
-
].join(" "),
|
|
751
|
-
md: [
|
|
752
|
-
"h-[var(--button-height-md,2.25rem)]",
|
|
753
|
-
"px-[var(--button-padding-x-md,1rem)]",
|
|
754
|
-
"py-[var(--button-padding-y-md,0.5rem)]",
|
|
755
|
-
"has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
|
|
756
|
-
].join(" "),
|
|
757
|
-
lg: [
|
|
758
|
-
"h-[var(--button-height-lg,2.5rem)]",
|
|
759
|
-
"px-[var(--button-padding-x-lg,1.5rem)]",
|
|
760
|
-
"py-[var(--button-padding-y-lg,0.5rem)]",
|
|
761
|
-
"has-[>svg]:px-[calc(var(--button-padding-x-lg,1.5rem)*0.67)]"
|
|
762
|
-
].join(" "),
|
|
763
|
-
icon: "size-[var(--button-height-md,2.25rem)]",
|
|
764
|
-
"icon-sm": "size-[var(--button-height-sm,2rem)]",
|
|
765
|
-
"icon-lg": "size-[var(--button-height-lg,2.5rem)]"
|
|
766
|
-
}
|
|
767
|
-
},
|
|
768
|
-
defaultVariants: {
|
|
769
|
-
variant: "default",
|
|
770
|
-
size: "default"
|
|
771
|
-
}
|
|
772
|
-
});
|
|
773
|
-
var Pressable = React6__namespace.forwardRef(
|
|
774
|
-
({
|
|
775
|
-
children,
|
|
776
|
-
className,
|
|
777
|
-
href,
|
|
778
|
-
onClick,
|
|
779
|
-
variant,
|
|
780
|
-
size,
|
|
781
|
-
asButton = false,
|
|
782
|
-
fallbackComponentType = "span",
|
|
783
|
-
componentType,
|
|
784
|
-
"aria-label": ariaLabel,
|
|
785
|
-
"aria-describedby": ariaDescribedby,
|
|
786
|
-
id,
|
|
787
|
-
...props
|
|
788
|
-
}, ref) => {
|
|
789
|
-
const navigation = useNavigation({ href, onClick });
|
|
790
|
-
const {
|
|
791
|
-
normalizedHref,
|
|
792
|
-
target,
|
|
793
|
-
rel,
|
|
794
|
-
linkType,
|
|
795
|
-
isInternal,
|
|
796
|
-
handleClick
|
|
797
|
-
} = navigation;
|
|
798
|
-
const shouldRenderLink = normalizedHref && linkType !== "none";
|
|
799
|
-
const shouldRenderButton = !shouldRenderLink && onClick;
|
|
800
|
-
const effectiveComponentType = componentType || (shouldRenderLink ? "a" : shouldRenderButton ? "button" : fallbackComponentType);
|
|
801
|
-
const finalComponentType = isInternal && shouldRenderLink ? "a" : effectiveComponentType;
|
|
802
|
-
const shouldApplyButtonStyles = asButton || variant || size;
|
|
803
|
-
const combinedClassName = cn(
|
|
804
|
-
shouldApplyButtonStyles && buttonVariants({ variant, size }),
|
|
805
|
-
className
|
|
806
|
-
);
|
|
807
|
-
const dataProps = Object.fromEntries(
|
|
808
|
-
Object.entries(props).filter(([key]) => key.startsWith("data-"))
|
|
809
|
-
);
|
|
810
|
-
const buttonDataAttributes = shouldApplyButtonStyles ? {
|
|
811
|
-
"data-slot": "button",
|
|
812
|
-
"data-variant": variant ?? "default",
|
|
813
|
-
"data-size": size ?? "default"
|
|
814
|
-
} : {};
|
|
815
|
-
const commonProps = {
|
|
816
|
-
className: combinedClassName,
|
|
817
|
-
onClick: handleClick,
|
|
818
|
-
"aria-label": ariaLabel,
|
|
819
|
-
"aria-describedby": ariaDescribedby,
|
|
820
|
-
id,
|
|
821
|
-
...dataProps,
|
|
822
|
-
...buttonDataAttributes
|
|
823
|
-
};
|
|
824
|
-
if (finalComponentType === "a" && shouldRenderLink) {
|
|
825
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
826
|
-
"a",
|
|
827
|
-
{
|
|
828
|
-
ref,
|
|
829
|
-
href: normalizedHref,
|
|
830
|
-
target,
|
|
831
|
-
rel,
|
|
832
|
-
...commonProps,
|
|
833
|
-
...props,
|
|
834
|
-
children
|
|
835
|
-
}
|
|
836
|
-
);
|
|
837
|
-
}
|
|
838
|
-
if (finalComponentType === "button") {
|
|
839
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
840
|
-
"button",
|
|
841
|
-
{
|
|
842
|
-
ref,
|
|
843
|
-
type: props.type || "button",
|
|
844
|
-
...commonProps,
|
|
845
|
-
...props,
|
|
846
|
-
children
|
|
847
|
-
}
|
|
848
|
-
);
|
|
849
|
-
}
|
|
850
|
-
if (finalComponentType === "div") {
|
|
851
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
852
|
-
"div",
|
|
853
|
-
{
|
|
854
|
-
ref,
|
|
855
|
-
...commonProps,
|
|
856
|
-
children
|
|
857
|
-
}
|
|
858
|
-
);
|
|
859
|
-
}
|
|
860
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
861
|
-
"span",
|
|
862
|
-
{
|
|
863
|
-
ref,
|
|
864
|
-
...commonProps,
|
|
865
|
-
children
|
|
866
|
-
}
|
|
867
|
-
);
|
|
868
|
-
}
|
|
869
|
-
);
|
|
870
|
-
Pressable.displayName = "Pressable";
|
|
871
|
-
var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
|
|
872
|
-
var DynamicIcon = React6__namespace.memo(function DynamicIcon2({
|
|
873
|
-
apiKey,
|
|
874
|
-
...props
|
|
875
|
-
}) {
|
|
876
|
-
return /* @__PURE__ */ jsxRuntime.jsx(icon.Icon, { ...props, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
|
|
877
|
-
});
|
|
878
|
-
DynamicIcon.displayName = "DynamicIcon";
|
|
879
|
-
var PANEL_POSITION_CLASS = {
|
|
880
|
-
"top-left": "left-4 top-4",
|
|
881
|
-
"top-right": "right-4 top-4",
|
|
882
|
-
"bottom-left": "bottom-4 left-4",
|
|
883
|
-
"bottom-right": "bottom-4 right-4"
|
|
884
|
-
};
|
|
885
|
-
var DEFAULT_VIEW_STATE = {
|
|
886
|
-
latitude: 39.5,
|
|
887
|
-
longitude: -98.35,
|
|
888
|
-
zoom: 3
|
|
889
|
-
};
|
|
890
|
-
var VIDEO_FILE_EXTENSION_REGEX = /\.(mp4|webm|ogg|mov|m4v|m3u8)(\?.*)?$/i;
|
|
891
|
-
function resolveMediaType(item) {
|
|
892
|
-
if (item.type) {
|
|
893
|
-
return item.type;
|
|
894
|
-
}
|
|
895
|
-
return VIDEO_FILE_EXTENSION_REGEX.test(item.src) ? "video" : "image";
|
|
896
|
-
}
|
|
897
|
-
function normalizeId(value, fallback) {
|
|
898
|
-
if (value === null || value === void 0 || value === "") {
|
|
899
|
-
return fallback;
|
|
900
|
-
}
|
|
901
|
-
return String(value);
|
|
902
|
-
}
|
|
903
|
-
function buildClusterCenter(markers) {
|
|
904
|
-
if (!markers.length) {
|
|
905
|
-
return null;
|
|
906
|
-
}
|
|
907
|
-
const total = markers.reduce(
|
|
908
|
-
(accumulator, marker) => ({
|
|
909
|
-
latitude: accumulator.latitude + marker.latitude,
|
|
910
|
-
longitude: accumulator.longitude + marker.longitude
|
|
911
|
-
}),
|
|
912
|
-
{ latitude: 0, longitude: 0 }
|
|
913
|
-
);
|
|
914
|
-
return {
|
|
915
|
-
latitude: total.latitude / markers.length,
|
|
916
|
-
longitude: total.longitude / markers.length
|
|
917
|
-
};
|
|
918
|
-
}
|
|
919
|
-
function resolveActionKey(action, index) {
|
|
920
|
-
if (typeof action.label === "string" && action.label.trim().length > 0) {
|
|
921
|
-
return `label:${action.label}:${index}`;
|
|
922
|
-
}
|
|
923
|
-
if (action.href) {
|
|
924
|
-
return `href:${action.href}:${index}`;
|
|
925
|
-
}
|
|
926
|
-
return `action:${index}`;
|
|
927
|
-
}
|
|
928
|
-
function MarkerActions({ actions }) {
|
|
929
|
-
if (!actions || actions.length === 0) {
|
|
930
|
-
return null;
|
|
931
|
-
}
|
|
932
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 flex flex-wrap gap-2", children: actions.map((action, index) => {
|
|
933
|
-
const {
|
|
934
|
-
label,
|
|
935
|
-
icon,
|
|
936
|
-
iconAfter,
|
|
937
|
-
children,
|
|
938
|
-
href,
|
|
939
|
-
onClick,
|
|
940
|
-
className: actionClassName,
|
|
941
|
-
variant,
|
|
942
|
-
size,
|
|
943
|
-
asButton,
|
|
944
|
-
...rest
|
|
945
|
-
} = action;
|
|
946
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
947
|
-
Pressable,
|
|
948
|
-
{
|
|
949
|
-
href,
|
|
950
|
-
onClick,
|
|
951
|
-
variant: variant ?? (index === 0 ? "default" : "outline"),
|
|
952
|
-
size: size ?? "sm",
|
|
953
|
-
asButton: asButton ?? true,
|
|
954
|
-
className: cn("inline-flex items-center gap-2", actionClassName),
|
|
955
|
-
...rest,
|
|
956
|
-
children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
957
|
-
icon,
|
|
958
|
-
label,
|
|
959
|
-
iconAfter
|
|
960
|
-
] })
|
|
961
|
-
},
|
|
962
|
-
resolveActionKey(action, index)
|
|
963
|
-
);
|
|
964
|
-
}) });
|
|
965
|
-
}
|
|
966
|
-
function MarkerMediaCarousel({
|
|
967
|
-
mediaItems,
|
|
968
|
-
optixFlowConfig
|
|
969
|
-
}) {
|
|
970
|
-
const [activeIndex, setActiveIndex] = React6__namespace.useState(0);
|
|
971
|
-
const totalItems = mediaItems.length;
|
|
972
|
-
const mediaResetKey = React6__namespace.useMemo(
|
|
973
|
-
() => mediaItems.map((item, index) => {
|
|
974
|
-
const itemId = normalizeId(item.id, `media-${index}`);
|
|
975
|
-
return `${itemId}:${item.src}:${item.type ?? ""}:${item.poster ?? ""}`;
|
|
976
|
-
}).join("|"),
|
|
977
|
-
[mediaItems]
|
|
978
|
-
);
|
|
979
|
-
const activeItemIndex = Math.min(activeIndex, Math.max(0, totalItems - 1));
|
|
980
|
-
React6__namespace.useEffect(() => {
|
|
981
|
-
setActiveIndex(0);
|
|
982
|
-
}, [mediaResetKey]);
|
|
983
|
-
const activeMediaItem = mediaItems[activeItemIndex];
|
|
984
|
-
const mediaType = resolveMediaType(activeMediaItem);
|
|
985
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative border-b border-border/60 bg-muted/40", children: [
|
|
986
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative h-44 w-full overflow-hidden", children: mediaType === "video" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
987
|
-
"video",
|
|
988
|
-
{
|
|
989
|
-
className: "h-full w-full object-cover",
|
|
990
|
-
controls: true,
|
|
991
|
-
preload: "metadata",
|
|
992
|
-
poster: activeMediaItem.poster,
|
|
993
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("source", { src: activeMediaItem.src })
|
|
994
|
-
}
|
|
995
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
996
|
-
img.Img,
|
|
997
|
-
{
|
|
998
|
-
src: activeMediaItem.src,
|
|
999
|
-
alt: activeMediaItem.alt ?? "Map marker media",
|
|
1000
|
-
className: "h-full w-full object-cover",
|
|
1001
|
-
loading: "eager",
|
|
1002
|
-
optixFlowConfig
|
|
1003
|
-
}
|
|
1004
|
-
) }),
|
|
1005
|
-
totalItems > 1 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1006
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1007
|
-
"button",
|
|
1008
|
-
{
|
|
1009
|
-
type: "button",
|
|
1010
|
-
"aria-label": "Show previous media",
|
|
1011
|
-
className: "absolute left-2 top-1/2 inline-flex size-8 -translate-y-1/2 items-center justify-center rounded-full bg-card text-card-foreground shadow-sm transition hover:bg-muted hover:text-muted-foreground",
|
|
1012
|
-
onClick: () => {
|
|
1013
|
-
setActiveIndex(
|
|
1014
|
-
(current) => (current - 1 + totalItems) % totalItems
|
|
1015
|
-
);
|
|
1016
|
-
},
|
|
1017
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/arrow-left", size: 16 })
|
|
1018
|
-
}
|
|
1019
|
-
),
|
|
1020
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1021
|
-
"button",
|
|
1022
|
-
{
|
|
1023
|
-
type: "button",
|
|
1024
|
-
"aria-label": "Show next media",
|
|
1025
|
-
className: "absolute right-2 top-1/2 inline-flex h-8 w-8 -translate-y-1/2 items-center justify-center rounded-full bg-card text-card-foreground shadow-sm transition hover:bg-muted hover:text-muted-foreground",
|
|
1026
|
-
onClick: () => {
|
|
1027
|
-
setActiveIndex((current) => (current + 1) % totalItems);
|
|
1028
|
-
},
|
|
1029
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/arrow-right", size: 16 })
|
|
1030
|
-
}
|
|
1031
|
-
),
|
|
1032
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-2 left-1/2 flex -translate-x-1/2 items-center gap-1.5", children: mediaItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1033
|
-
"button",
|
|
1034
|
-
{
|
|
1035
|
-
type: "button",
|
|
1036
|
-
"aria-label": `Show media item ${index + 1}`,
|
|
1037
|
-
className: cn(
|
|
1038
|
-
"h-2 rounded-full transition-all",
|
|
1039
|
-
index === activeItemIndex ? "w-6 bg-card" : "w-2 bg-card opacity-50 hover:opacity-100"
|
|
1040
|
-
),
|
|
1041
|
-
onClick: () => setActiveIndex(index)
|
|
1042
|
-
},
|
|
1043
|
-
normalizeId(item.id, `media-dot-${index}`)
|
|
1044
|
-
)) })
|
|
1045
|
-
] }) : null
|
|
1046
|
-
] });
|
|
1047
|
-
}
|
|
1048
|
-
function getMarkerTitle(marker, markerIndex) {
|
|
1049
|
-
if (marker.title !== void 0 && marker.title !== null) {
|
|
1050
|
-
return marker.title;
|
|
1051
|
-
}
|
|
1052
|
-
if (marker.label !== void 0 && marker.label !== null) {
|
|
1053
|
-
return marker.label;
|
|
1054
|
-
}
|
|
1055
|
-
return `Location ${markerIndex + 1}`;
|
|
1056
|
-
}
|
|
1057
|
-
function GeoMap({
|
|
1058
|
-
className,
|
|
1059
|
-
mapWrapperClassName,
|
|
1060
|
-
mapClassName,
|
|
1061
|
-
panelClassName,
|
|
1062
|
-
panelPosition = "top-left",
|
|
1063
|
-
stadiaApiKey = "",
|
|
1064
|
-
mapStyle = "osm-bright",
|
|
1065
|
-
styleUrl,
|
|
1066
|
-
mapLibreCssHref,
|
|
1067
|
-
markers = [],
|
|
1068
|
-
clusters = [],
|
|
1069
|
-
viewState,
|
|
1070
|
-
defaultViewState,
|
|
1071
|
-
onViewStateChange,
|
|
1072
|
-
onMapClick,
|
|
1073
|
-
onMarkerDrag,
|
|
1074
|
-
showNavigationControl = true,
|
|
1075
|
-
showGeolocateControl = false,
|
|
1076
|
-
navigationControlPosition = "top-right",
|
|
1077
|
-
geolocateControlPosition = "top-left",
|
|
1078
|
-
flyToOptions,
|
|
1079
|
-
markerFocusZoom = 14,
|
|
1080
|
-
clusterFocusZoom = 5,
|
|
1081
|
-
selectedMarkerId,
|
|
1082
|
-
initialSelectedMarkerId,
|
|
1083
|
-
onSelectionChange,
|
|
1084
|
-
clearSelectionOnMapClick = true,
|
|
1085
|
-
mapChildren,
|
|
1086
|
-
optixFlowConfig
|
|
1087
|
-
}) {
|
|
1088
|
-
const normalizedStandaloneMarkers = React6__namespace.useMemo(
|
|
1089
|
-
() => markers.map((marker, index) => ({
|
|
1090
|
-
...marker,
|
|
1091
|
-
id: normalizeId(marker.id, `marker-${index}`)
|
|
1092
|
-
})),
|
|
1093
|
-
[markers]
|
|
1094
|
-
);
|
|
1095
|
-
const normalizedClusters = React6__namespace.useMemo(() => {
|
|
1096
|
-
const results = [];
|
|
1097
|
-
clusters.forEach((cluster, clusterIndex) => {
|
|
1098
|
-
const clusterId = normalizeId(cluster.id, `cluster-${clusterIndex}`);
|
|
1099
|
-
const normalizedClusterMarkers = cluster.markers.map(
|
|
1100
|
-
(marker, markerIndex) => ({
|
|
1101
|
-
...marker,
|
|
1102
|
-
id: normalizeId(marker.id, `${clusterId}-marker-${markerIndex}`),
|
|
1103
|
-
clusterId
|
|
1104
|
-
})
|
|
1105
|
-
);
|
|
1106
|
-
const clusterCenter = cluster.latitude !== void 0 && cluster.longitude !== void 0 ? { latitude: cluster.latitude, longitude: cluster.longitude } : buildClusterCenter(normalizedClusterMarkers);
|
|
1107
|
-
if (!clusterCenter) {
|
|
1108
|
-
return;
|
|
1109
|
-
}
|
|
1110
|
-
results.push({
|
|
1111
|
-
...cluster,
|
|
1112
|
-
id: clusterId,
|
|
1113
|
-
latitude: clusterCenter.latitude,
|
|
1114
|
-
longitude: clusterCenter.longitude,
|
|
1115
|
-
markers: normalizedClusterMarkers
|
|
1116
|
-
});
|
|
1117
|
-
});
|
|
1118
|
-
return results;
|
|
1119
|
-
}, [clusters]);
|
|
1120
|
-
const markerLookup = React6__namespace.useMemo(() => {
|
|
1121
|
-
const lookup = /* @__PURE__ */ new Map();
|
|
1122
|
-
normalizedStandaloneMarkers.forEach((marker) => {
|
|
1123
|
-
lookup.set(marker.id, marker);
|
|
1124
|
-
});
|
|
1125
|
-
normalizedClusters.forEach((cluster) => {
|
|
1126
|
-
cluster.markers.forEach((marker) => {
|
|
1127
|
-
lookup.set(marker.id, marker);
|
|
1128
|
-
});
|
|
1129
|
-
});
|
|
1130
|
-
return lookup;
|
|
1131
|
-
}, [normalizedClusters, normalizedStandaloneMarkers]);
|
|
1132
|
-
const clusterLookup = React6__namespace.useMemo(() => {
|
|
1133
|
-
const lookup = /* @__PURE__ */ new Map();
|
|
1134
|
-
normalizedClusters.forEach((cluster) => {
|
|
1135
|
-
lookup.set(cluster.id, cluster);
|
|
1136
|
-
});
|
|
1137
|
-
return lookup;
|
|
1138
|
-
}, [normalizedClusters]);
|
|
1139
|
-
const firstCoordinate = React6__namespace.useMemo(() => {
|
|
1140
|
-
if (normalizedStandaloneMarkers.length > 0) {
|
|
1141
|
-
const firstStandaloneMarker = normalizedStandaloneMarkers[0];
|
|
1142
|
-
return {
|
|
1143
|
-
latitude: firstStandaloneMarker.latitude,
|
|
1144
|
-
longitude: firstStandaloneMarker.longitude
|
|
1145
|
-
};
|
|
1146
|
-
}
|
|
1147
|
-
if (normalizedClusters.length > 0) {
|
|
1148
|
-
const firstCluster = normalizedClusters[0];
|
|
1149
|
-
return {
|
|
1150
|
-
latitude: firstCluster.latitude,
|
|
1151
|
-
longitude: firstCluster.longitude
|
|
1152
|
-
};
|
|
1153
|
-
}
|
|
1154
|
-
return {
|
|
1155
|
-
latitude: DEFAULT_VIEW_STATE.latitude,
|
|
1156
|
-
longitude: DEFAULT_VIEW_STATE.longitude
|
|
1157
|
-
};
|
|
1158
|
-
}, [normalizedClusters, normalizedStandaloneMarkers]);
|
|
1159
|
-
const [uncontrolledViewState, setUncontrolledViewState] = React6__namespace.useState({
|
|
1160
|
-
latitude: defaultViewState?.latitude ?? firstCoordinate.latitude,
|
|
1161
|
-
longitude: defaultViewState?.longitude ?? firstCoordinate.longitude,
|
|
1162
|
-
zoom: defaultViewState?.zoom ?? DEFAULT_VIEW_STATE.zoom
|
|
1163
|
-
});
|
|
1164
|
-
const isControlledViewState = viewState !== void 0;
|
|
1165
|
-
const resolvedViewState = isControlledViewState ? viewState : uncontrolledViewState;
|
|
1166
|
-
const applyViewState = React6__namespace.useCallback(
|
|
1167
|
-
(nextState) => {
|
|
1168
|
-
if (!isControlledViewState) {
|
|
1169
|
-
setUncontrolledViewState((current) => {
|
|
1170
|
-
const next = { ...current, ...nextState };
|
|
1171
|
-
const hasChanged = current.latitude !== next.latitude || current.longitude !== next.longitude || current.zoom !== next.zoom;
|
|
1172
|
-
return hasChanged ? next : current;
|
|
1173
|
-
});
|
|
1174
|
-
}
|
|
1175
|
-
onViewStateChange?.(nextState);
|
|
1176
|
-
},
|
|
1177
|
-
[isControlledViewState, onViewStateChange]
|
|
1178
|
-
);
|
|
1179
|
-
const [selection, setSelection] = React6__namespace.useState(() => {
|
|
1180
|
-
if (initialSelectedMarkerId !== void 0 && initialSelectedMarkerId !== null) {
|
|
1181
|
-
return {
|
|
1182
|
-
type: "marker",
|
|
1183
|
-
markerId: String(initialSelectedMarkerId)
|
|
1184
|
-
};
|
|
1185
|
-
}
|
|
1186
|
-
return { type: "none" };
|
|
1187
|
-
});
|
|
1188
|
-
React6__namespace.useEffect(() => {
|
|
1189
|
-
if (selectedMarkerId === void 0 || selectedMarkerId === null) {
|
|
1190
|
-
return;
|
|
1191
|
-
}
|
|
1192
|
-
setSelection({
|
|
1193
|
-
type: "marker",
|
|
1194
|
-
markerId: String(selectedMarkerId)
|
|
1195
|
-
});
|
|
1196
|
-
}, [selectedMarkerId]);
|
|
1197
|
-
const selectedMarker = selection.markerId ? markerLookup.get(selection.markerId) : void 0;
|
|
1198
|
-
const selectedCluster = selection.clusterId ? clusterLookup.get(selection.clusterId) : void 0;
|
|
1199
|
-
React6__namespace.useEffect(() => {
|
|
1200
|
-
if (selection.type === "marker" && selection.markerId && !selectedMarker) {
|
|
1201
|
-
setSelection({ type: "none" });
|
|
1202
|
-
onSelectionChange?.({ type: "none" });
|
|
1203
|
-
}
|
|
1204
|
-
}, [onSelectionChange, selectedMarker, selection]);
|
|
1205
|
-
const emitSelectionChange = React6__namespace.useCallback(
|
|
1206
|
-
(nextSelection) => {
|
|
1207
|
-
if (nextSelection.type === "none") {
|
|
1208
|
-
onSelectionChange?.({ type: "none" });
|
|
1209
|
-
return;
|
|
1210
|
-
}
|
|
1211
|
-
if (nextSelection.type === "marker") {
|
|
1212
|
-
const parentCluster = nextSelection.marker.clusterId ? clusterLookup.get(nextSelection.marker.clusterId) : void 0;
|
|
1213
|
-
onSelectionChange?.({
|
|
1214
|
-
type: "marker",
|
|
1215
|
-
marker: nextSelection.marker,
|
|
1216
|
-
cluster: parentCluster
|
|
1217
|
-
});
|
|
1218
|
-
return;
|
|
1219
|
-
}
|
|
1220
|
-
onSelectionChange?.({
|
|
1221
|
-
type: "cluster",
|
|
1222
|
-
cluster: nextSelection.cluster
|
|
1223
|
-
});
|
|
1224
|
-
},
|
|
1225
|
-
[clusterLookup, onSelectionChange]
|
|
1226
|
-
);
|
|
1227
|
-
const selectMarker = React6__namespace.useCallback(
|
|
1228
|
-
(marker) => {
|
|
1229
|
-
setSelection({
|
|
1230
|
-
type: "marker",
|
|
1231
|
-
markerId: marker.id,
|
|
1232
|
-
clusterId: marker.clusterId
|
|
1233
|
-
});
|
|
1234
|
-
applyViewState({
|
|
1235
|
-
latitude: marker.latitude,
|
|
1236
|
-
longitude: marker.longitude,
|
|
1237
|
-
zoom: markerFocusZoom
|
|
1238
|
-
});
|
|
1239
|
-
emitSelectionChange({ type: "marker", marker });
|
|
1240
|
-
},
|
|
1241
|
-
[applyViewState, emitSelectionChange, markerFocusZoom]
|
|
1242
|
-
);
|
|
1243
|
-
const selectCluster = React6__namespace.useCallback(
|
|
1244
|
-
(cluster) => {
|
|
1245
|
-
setSelection({
|
|
1246
|
-
type: "cluster",
|
|
1247
|
-
clusterId: cluster.id
|
|
1248
|
-
});
|
|
1249
|
-
applyViewState({
|
|
1250
|
-
latitude: cluster.latitude,
|
|
1251
|
-
longitude: cluster.longitude,
|
|
1252
|
-
zoom: clusterFocusZoom
|
|
1253
|
-
});
|
|
1254
|
-
emitSelectionChange({ type: "cluster", cluster });
|
|
1255
|
-
},
|
|
1256
|
-
[applyViewState, clusterFocusZoom, emitSelectionChange]
|
|
1257
|
-
);
|
|
1258
|
-
const clearSelection = React6__namespace.useCallback(() => {
|
|
1259
|
-
setSelection({ type: "none" });
|
|
1260
|
-
emitSelectionChange({ type: "none" });
|
|
1261
|
-
}, [emitSelectionChange]);
|
|
1262
|
-
const mapMarkers = React6__namespace.useMemo(() => {
|
|
1263
|
-
const resolvedMarkers = [];
|
|
1264
|
-
normalizedClusters.forEach((cluster) => {
|
|
1265
|
-
const isSelected = selection.type === "cluster" && selection.clusterId === cluster.id;
|
|
1266
|
-
resolvedMarkers.push({
|
|
1267
|
-
id: `cluster-pin:${cluster.id}`,
|
|
1268
|
-
latitude: cluster.latitude,
|
|
1269
|
-
longitude: cluster.longitude,
|
|
1270
|
-
element: () => {
|
|
1271
|
-
const customMarkerElement = cluster.markerElement;
|
|
1272
|
-
const markerBody = typeof customMarkerElement === "function" ? customMarkerElement({
|
|
1273
|
-
isSelected,
|
|
1274
|
-
count: cluster.markers.length
|
|
1275
|
-
}) : customMarkerElement;
|
|
1276
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1277
|
-
"button",
|
|
1278
|
-
{
|
|
1279
|
-
type: "button",
|
|
1280
|
-
className: "group cursor-pointer",
|
|
1281
|
-
onClick: (event) => {
|
|
1282
|
-
event.preventDefault();
|
|
1283
|
-
event.stopPropagation();
|
|
1284
|
-
selectCluster(cluster);
|
|
1285
|
-
},
|
|
1286
|
-
"aria-label": `View ${cluster.markers.length} clustered locations`,
|
|
1287
|
-
children: markerBody ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1288
|
-
"span",
|
|
1289
|
-
{
|
|
1290
|
-
className: cn(
|
|
1291
|
-
"inline-flex min-h-10 min-w-10 items-center justify-center rounded-full border-2 border-white px-2 text-xs font-semibold text-white shadow-lg transition-transform duration-200 group-hover:scale-105",
|
|
1292
|
-
isSelected && "ring-4 ring-primary/30",
|
|
1293
|
-
cluster.pinClassName
|
|
1294
|
-
),
|
|
1295
|
-
style: {
|
|
1296
|
-
backgroundColor: cluster.pinColor ?? "var(--foreground)"
|
|
1297
|
-
},
|
|
1298
|
-
children: cluster.markers.length
|
|
1299
|
-
}
|
|
1300
|
-
)
|
|
1301
|
-
}
|
|
1302
|
-
);
|
|
1303
|
-
}
|
|
1304
|
-
});
|
|
1305
|
-
});
|
|
1306
|
-
normalizedStandaloneMarkers.forEach((marker) => {
|
|
1307
|
-
const isSelected = selection.type === "marker" && selection.markerId === marker.id;
|
|
1308
|
-
const customMarkerElement = marker.markerElement;
|
|
1309
|
-
resolvedMarkers.push({
|
|
1310
|
-
id: marker.id,
|
|
1311
|
-
latitude: marker.latitude,
|
|
1312
|
-
longitude: marker.longitude,
|
|
1313
|
-
draggable: marker.draggable,
|
|
1314
|
-
element: () => {
|
|
1315
|
-
const markerBody = typeof customMarkerElement === "function" ? customMarkerElement({ isSelected }) : customMarkerElement;
|
|
1316
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1317
|
-
"button",
|
|
1318
|
-
{
|
|
1319
|
-
type: "button",
|
|
1320
|
-
className: "group cursor-pointer",
|
|
1321
|
-
onClick: (event) => {
|
|
1322
|
-
event.preventDefault();
|
|
1323
|
-
event.stopPropagation();
|
|
1324
|
-
selectMarker(marker);
|
|
1325
|
-
},
|
|
1326
|
-
"aria-label": typeof marker.title === "string" ? `View ${marker.title}` : "View location details",
|
|
1327
|
-
children: markerBody ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1328
|
-
"span",
|
|
1329
|
-
{
|
|
1330
|
-
className: cn(
|
|
1331
|
-
"inline-flex h-4 w-4 rounded-full border-2 border-white shadow-md transition-transform duration-200 group-hover:scale-110",
|
|
1332
|
-
isSelected && "h-5 w-5 ring-4 ring-primary/30",
|
|
1333
|
-
marker.pinClassName
|
|
1334
|
-
),
|
|
1335
|
-
style: {
|
|
1336
|
-
backgroundColor: marker.pinColor ?? "#f43f5e"
|
|
1337
|
-
}
|
|
1338
|
-
}
|
|
1339
|
-
)
|
|
1340
|
-
}
|
|
1341
|
-
);
|
|
1342
|
-
}
|
|
1343
|
-
});
|
|
1344
|
-
});
|
|
1345
|
-
return resolvedMarkers;
|
|
1346
|
-
}, [
|
|
1347
|
-
normalizedClusters,
|
|
1348
|
-
normalizedStandaloneMarkers,
|
|
1349
|
-
selectCluster,
|
|
1350
|
-
selectMarker,
|
|
1351
|
-
selection
|
|
1352
|
-
]);
|
|
1353
|
-
const renderMarkerPanel = () => {
|
|
1354
|
-
if (selectedMarker) {
|
|
1355
|
-
const markerMediaItems = selectedMarker.mediaItems ?? [];
|
|
1356
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1357
|
-
"div",
|
|
1358
|
-
{
|
|
1359
|
-
className: cn(
|
|
1360
|
-
"relative w-[min(24rem,calc(100vw-2rem))] overflow-hidden rounded-xl border border-border bg-card text-card-foreground shadow-2xl",
|
|
1361
|
-
panelClassName
|
|
1362
|
-
),
|
|
1363
|
-
children: [
|
|
1364
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1365
|
-
"button",
|
|
1366
|
-
{
|
|
1367
|
-
type: "button",
|
|
1368
|
-
"aria-label": "Close marker details",
|
|
1369
|
-
className: "flex size-8 items-center justify-center rounded-full border border-border bg-card text-card-foreground transition hover:bg-muted hover:text-foreground absolute top-2 right-2 z-10",
|
|
1370
|
-
onClick: clearSelection,
|
|
1371
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", size: 16 })
|
|
1372
|
-
}
|
|
1373
|
-
),
|
|
1374
|
-
markerMediaItems.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1375
|
-
MarkerMediaCarousel,
|
|
1376
|
-
{
|
|
1377
|
-
mediaItems: markerMediaItems,
|
|
1378
|
-
optixFlowConfig
|
|
1379
|
-
}
|
|
1380
|
-
) : null,
|
|
1381
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 p-4", children: [
|
|
1382
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start justify-between gap-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 space-y-1", children: [
|
|
1383
|
-
selectedMarker.eyebrow ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold uppercase tracking-wide", children: selectedMarker.eyebrow }) : null,
|
|
1384
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base font-semibold leading-tight", children: selectedMarker.title ?? selectedMarker.label ?? "Location" })
|
|
1385
|
-
] }) }),
|
|
1386
|
-
selectedMarker.summary ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm leading-relaxed", children: selectedMarker.summary }) : null,
|
|
1387
|
-
selectedMarker.locationLine ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center justify-start text-sm gap-2", children: [
|
|
1388
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1389
|
-
DynamicIcon,
|
|
1390
|
-
{
|
|
1391
|
-
name: "lucide:map-pin",
|
|
1392
|
-
className: "opacity-50",
|
|
1393
|
-
size: 14
|
|
1394
|
-
}
|
|
1395
|
-
),
|
|
1396
|
-
typeof selectedMarker.locationLine === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1397
|
-
Pressable,
|
|
1398
|
-
{
|
|
1399
|
-
href: selectedMarker.locationUrl,
|
|
1400
|
-
className: cn(
|
|
1401
|
-
"transition-all duration-500",
|
|
1402
|
-
"font-medium opacity-75 hover:opacity-100",
|
|
1403
|
-
selectedMarker.locationUrl ? "underline underline-offset-4" : ""
|
|
1404
|
-
),
|
|
1405
|
-
children: selectedMarker.locationLine
|
|
1406
|
-
}
|
|
1407
|
-
) : selectedMarker.locationLine
|
|
1408
|
-
] }) : null,
|
|
1409
|
-
selectedMarker.hoursLine ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center justify-start text-sm gap-2", children: [
|
|
1410
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1411
|
-
DynamicIcon,
|
|
1412
|
-
{
|
|
1413
|
-
name: "lucide:clock",
|
|
1414
|
-
className: "opacity-50",
|
|
1415
|
-
size: 14
|
|
1416
|
-
}
|
|
1417
|
-
),
|
|
1418
|
-
typeof selectedMarker.hoursLine === "string" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium", children: selectedMarker.hoursLine }) : selectedMarker.hoursLine
|
|
1419
|
-
] }) : null,
|
|
1420
|
-
selectedMarker.markerContentComponent ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", children: selectedMarker.markerContentComponent }) : null,
|
|
1421
|
-
/* @__PURE__ */ jsxRuntime.jsx(MarkerActions, { actions: selectedMarker.actions })
|
|
1422
|
-
] })
|
|
1423
|
-
]
|
|
1424
|
-
}
|
|
1425
|
-
);
|
|
1426
|
-
}
|
|
1427
|
-
if (selectedCluster) {
|
|
1428
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1429
|
-
"div",
|
|
1430
|
-
{
|
|
1431
|
-
className: cn(
|
|
1432
|
-
"relative w-[min(24rem,calc(100vw-2rem))] overflow-hidden rounded-xl border border-border bg-card text-card-foreground p-4 shadow-2xl",
|
|
1433
|
-
panelClassName
|
|
1434
|
-
),
|
|
1435
|
-
children: [
|
|
1436
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1437
|
-
"button",
|
|
1438
|
-
{
|
|
1439
|
-
type: "button",
|
|
1440
|
-
"aria-label": "Close cluster details",
|
|
1441
|
-
className: "flex size-8 items-center justify-center rounded-full border border-border bg-card text-card-foreground transition hover:bg-muted hover:text-foreground absolute top-2 right-2 z-10",
|
|
1442
|
-
onClick: clearSelection,
|
|
1443
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/x", size: 16 })
|
|
1444
|
-
}
|
|
1445
|
-
),
|
|
1446
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3 flex items-start justify-between gap-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
1447
|
-
selectedCluster.label ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: selectedCluster.label }) : null,
|
|
1448
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base font-semibold leading-tight text-foreground", children: selectedCluster.title ?? "Clustered Locations" }),
|
|
1449
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: selectedCluster.summary ?? `${selectedCluster.markers.length} location${selectedCluster.markers.length === 1 ? "" : "s"} in this cluster.` })
|
|
1450
|
-
] }) }),
|
|
1451
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-56 space-y-2 overflow-y-auto pr-1", children: selectedCluster.markers.map((marker, markerIndex) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1452
|
-
"button",
|
|
1453
|
-
{
|
|
1454
|
-
type: "button",
|
|
1455
|
-
className: "w-full rounded-lg border border-border/60 p-3 text-left transition hover:border-border hover:bg-muted/50",
|
|
1456
|
-
onClick: () => selectMarker(marker),
|
|
1457
|
-
children: [
|
|
1458
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "line-clamp-1 text-sm font-semibold text-foreground", children: getMarkerTitle(marker, markerIndex) }),
|
|
1459
|
-
marker.summary ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 line-clamp-2 text-xs text-muted-foreground", children: marker.summary }) : null
|
|
1460
|
-
]
|
|
1461
|
-
},
|
|
1462
|
-
marker.id
|
|
1463
|
-
)) })
|
|
1464
|
-
]
|
|
1465
|
-
}
|
|
1466
|
-
);
|
|
1467
|
-
}
|
|
1468
|
-
return null;
|
|
1469
|
-
};
|
|
1470
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1471
|
-
"div",
|
|
1472
|
-
{
|
|
1473
|
-
className: cn(
|
|
1474
|
-
"relative overflow-hidden rounded-2xl border border-border bg-background",
|
|
1475
|
-
className
|
|
1476
|
-
),
|
|
1477
|
-
children: [
|
|
1478
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("h-[520px] w-full", mapWrapperClassName), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1479
|
-
maps.MapLibre,
|
|
1480
|
-
{
|
|
1481
|
-
stadiaApiKey,
|
|
1482
|
-
mapStyle,
|
|
1483
|
-
styleUrl,
|
|
1484
|
-
mapLibreCssHref,
|
|
1485
|
-
viewState: resolvedViewState,
|
|
1486
|
-
onViewStateChange: applyViewState,
|
|
1487
|
-
markers: mapMarkers,
|
|
1488
|
-
onClick: (coord) => {
|
|
1489
|
-
onMapClick?.(coord);
|
|
1490
|
-
if (clearSelectionOnMapClick) {
|
|
1491
|
-
clearSelection();
|
|
1492
|
-
}
|
|
1493
|
-
},
|
|
1494
|
-
onMarkerDrag,
|
|
1495
|
-
showNavigationControl,
|
|
1496
|
-
showGeolocateControl,
|
|
1497
|
-
navigationControlPosition,
|
|
1498
|
-
geolocateControlPosition,
|
|
1499
|
-
flyToOptions,
|
|
1500
|
-
className: cn("h-full w-full", mapClassName),
|
|
1501
|
-
children: mapChildren
|
|
1502
|
-
}
|
|
1503
|
-
) }),
|
|
1504
|
-
selection.type !== "none" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1505
|
-
"div",
|
|
1506
|
-
{
|
|
1507
|
-
className: cn(
|
|
1508
|
-
"pointer-events-none absolute z-20",
|
|
1509
|
-
PANEL_POSITION_CLASS[panelPosition]
|
|
1510
|
-
),
|
|
1511
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-auto", children: renderMarkerPanel() })
|
|
1512
|
-
}
|
|
1513
|
-
) : null
|
|
1514
|
-
]
|
|
1515
|
-
}
|
|
1516
|
-
);
|
|
1517
|
-
}
|
|
1518
|
-
var sizeStyles = {
|
|
1519
|
-
sm: "max-w-md",
|
|
1520
|
-
md: "max-w-2xl",
|
|
1521
|
-
lg: "max-w-4xl",
|
|
1522
|
-
xl: "max-w-5xl",
|
|
1523
|
-
full: "max-w-7xl",
|
|
1524
|
-
compact: "max-w-[700px]"
|
|
1525
|
-
};
|
|
1526
|
-
var dialogTransition = {
|
|
1527
|
-
duration: 0.35,
|
|
1528
|
-
ease: [0.16, 1, 0.3, 1]
|
|
1529
|
-
};
|
|
1530
|
-
function AnimatedDialog({
|
|
1531
|
-
open,
|
|
1532
|
-
onOpenChange,
|
|
1533
|
-
title,
|
|
1534
|
-
eyebrow,
|
|
1535
|
-
description,
|
|
1536
|
-
children,
|
|
1537
|
-
header,
|
|
1538
|
-
footer,
|
|
1539
|
-
size = "lg",
|
|
1540
|
-
className,
|
|
1541
|
-
contentClassName,
|
|
1542
|
-
featuredMediaHeader
|
|
1543
|
-
}) {
|
|
1544
|
-
const titleId = React6.useId();
|
|
1545
|
-
const descriptionId = React6.useId();
|
|
1546
|
-
const containerRef = React6.useRef(null);
|
|
1547
|
-
useOnClickOutside.useOnClickOutside(containerRef, () => {
|
|
1548
|
-
if (open) {
|
|
1549
|
-
onOpenChange(false);
|
|
1550
|
-
}
|
|
1551
|
-
});
|
|
1552
|
-
React6.useEffect(() => {
|
|
1553
|
-
if (!open) {
|
|
1554
|
-
return;
|
|
1555
|
-
}
|
|
1556
|
-
const onKeyDown = (event) => {
|
|
1557
|
-
if (event.key === "Escape") {
|
|
1558
|
-
onOpenChange(false);
|
|
1559
|
-
}
|
|
1560
|
-
};
|
|
1561
|
-
const previousOverflow = document.body.style.overflow;
|
|
1562
|
-
document.body.style.overflow = "hidden";
|
|
1563
|
-
window.addEventListener("keydown", onKeyDown);
|
|
1564
|
-
return () => {
|
|
1565
|
-
document.body.style.overflow = previousOverflow;
|
|
1566
|
-
window.removeEventListener("keydown", onKeyDown);
|
|
1567
|
-
};
|
|
1568
|
-
}, [open, onOpenChange]);
|
|
1569
|
-
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: open ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fixed inset-0 z-50 h-screen overflow-y-auto", children: [
|
|
1570
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1571
|
-
framerMotion.motion.div,
|
|
1572
|
-
{
|
|
1573
|
-
initial: { opacity: 0 },
|
|
1574
|
-
animate: { opacity: 1, transition: dialogTransition },
|
|
1575
|
-
exit: { opacity: 0, transition: dialogTransition },
|
|
1576
|
-
className: "fixed inset-0 h-full w-full bg-foreground/80 backdrop-blur-lg"
|
|
494
|
+
};
|
|
495
|
+
const previousOverflow = document.body.style.overflow;
|
|
496
|
+
document.body.style.overflow = "hidden";
|
|
497
|
+
window.addEventListener("keydown", onKeyDown);
|
|
498
|
+
return () => {
|
|
499
|
+
document.body.style.overflow = previousOverflow;
|
|
500
|
+
window.removeEventListener("keydown", onKeyDown);
|
|
501
|
+
};
|
|
502
|
+
}, [open, onOpenChange]);
|
|
503
|
+
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: open ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fixed inset-0 z-50 h-screen overflow-y-auto", children: [
|
|
504
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
505
|
+
framerMotion.motion.div,
|
|
506
|
+
{
|
|
507
|
+
initial: { opacity: 0 },
|
|
508
|
+
animate: { opacity: 1, transition: dialogTransition },
|
|
509
|
+
exit: { opacity: 0, transition: dialogTransition },
|
|
510
|
+
className: "fixed inset-0 h-full w-full bg-foreground/80 backdrop-blur-lg"
|
|
1577
511
|
}
|
|
1578
512
|
),
|
|
1579
513
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1872,10 +806,10 @@ var ImageSlider = ({
|
|
|
1872
806
|
optixFlowConfig
|
|
1873
807
|
}) => {
|
|
1874
808
|
const hasImages = images.length > 0;
|
|
1875
|
-
const [currentIndex, setCurrentIndex] =
|
|
809
|
+
const [currentIndex, setCurrentIndex] = React4__namespace.useState(
|
|
1876
810
|
() => normalizeIndex(startIndex, images.length)
|
|
1877
811
|
);
|
|
1878
|
-
const handleNext =
|
|
812
|
+
const handleNext = React4__namespace.useCallback(() => {
|
|
1879
813
|
if (!hasImages) return;
|
|
1880
814
|
setCurrentIndex((prevIndex) => {
|
|
1881
815
|
const nextIndex = prevIndex + 1 >= images.length ? 0 : prevIndex + 1;
|
|
@@ -1883,7 +817,7 @@ var ImageSlider = ({
|
|
|
1883
817
|
return nextIndex;
|
|
1884
818
|
});
|
|
1885
819
|
}, [hasImages, images.length, onSlideChange]);
|
|
1886
|
-
const handlePrevious =
|
|
820
|
+
const handlePrevious = React4__namespace.useCallback(() => {
|
|
1887
821
|
if (!hasImages) return;
|
|
1888
822
|
setCurrentIndex((prevIndex) => {
|
|
1889
823
|
const nextIndex = prevIndex - 1 < 0 ? images.length - 1 : prevIndex - 1;
|
|
@@ -1891,11 +825,11 @@ var ImageSlider = ({
|
|
|
1891
825
|
return nextIndex;
|
|
1892
826
|
});
|
|
1893
827
|
}, [hasImages, images.length, onSlideChange]);
|
|
1894
|
-
|
|
828
|
+
React4__namespace.useEffect(() => {
|
|
1895
829
|
if (!hasImages) return;
|
|
1896
830
|
setCurrentIndex(normalizeIndex(startIndex, images.length));
|
|
1897
831
|
}, [startIndex, images.length, hasImages]);
|
|
1898
|
-
|
|
832
|
+
React4__namespace.useEffect(() => {
|
|
1899
833
|
if (!enableKeyboard || !hasImages) return;
|
|
1900
834
|
const handleKeyDown = (event) => {
|
|
1901
835
|
if (event.key === "ArrowRight") {
|
|
@@ -1909,7 +843,7 @@ var ImageSlider = ({
|
|
|
1909
843
|
window.removeEventListener("keydown", handleKeyDown);
|
|
1910
844
|
};
|
|
1911
845
|
}, [enableKeyboard, handleNext, handlePrevious, hasImages]);
|
|
1912
|
-
|
|
846
|
+
React4__namespace.useEffect(() => {
|
|
1913
847
|
if (!autoplay || images.length < 2) return;
|
|
1914
848
|
const interval = window.setInterval(handleNext, autoplayIntervalMs);
|
|
1915
849
|
return () => window.clearInterval(interval);
|
|
@@ -1980,8 +914,150 @@ var ImageSlider = ({
|
|
|
1980
914
|
) : null
|
|
1981
915
|
]
|
|
1982
916
|
}
|
|
1983
|
-
);
|
|
1984
|
-
};
|
|
917
|
+
);
|
|
918
|
+
};
|
|
919
|
+
var baseStyles = [
|
|
920
|
+
// Layout
|
|
921
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap shrink-0",
|
|
922
|
+
// Typography - using CSS variables with sensible defaults
|
|
923
|
+
"font-[var(--button-font-family,inherit)]",
|
|
924
|
+
"font-[var(--button-font-weight,500)]",
|
|
925
|
+
"tracking-[var(--button-letter-spacing,0)]",
|
|
926
|
+
"leading-[var(--button-line-height,1.25)]",
|
|
927
|
+
"[text-transform:var(--button-text-transform,none)]",
|
|
928
|
+
"text-sm",
|
|
929
|
+
// Border radius
|
|
930
|
+
"rounded-[var(--button-radius,var(--radius,0.375rem))]",
|
|
931
|
+
// Smooth transition - using [transition:...] to set full shorthand property (not just transition-property)
|
|
932
|
+
"[transition:var(--button-transition,all_250ms_cubic-bezier(0.4,0,0.2,1))]",
|
|
933
|
+
// Box shadow (master level) - using [box-shadow:...] for complex multi-value shadows
|
|
934
|
+
"[box-shadow:var(--button-shadow,none)]",
|
|
935
|
+
"hover:[box-shadow:var(--button-shadow-hover,var(--button-shadow,none))]",
|
|
936
|
+
// Disabled state
|
|
937
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
938
|
+
// SVG handling
|
|
939
|
+
"[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
|
|
940
|
+
// Focus styles
|
|
941
|
+
"outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
942
|
+
// Invalid state
|
|
943
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
|
|
944
|
+
].join(" ");
|
|
945
|
+
var buttonVariants = classVarianceAuthority.cva(baseStyles, {
|
|
946
|
+
variants: {
|
|
947
|
+
variant: {
|
|
948
|
+
// Default (Primary) variant - full customization
|
|
949
|
+
default: [
|
|
950
|
+
"bg-[var(--button-default-bg,hsl(var(--primary)))]",
|
|
951
|
+
"text-[var(--button-default-fg,hsl(var(--primary-foreground)))]",
|
|
952
|
+
"border-[length:var(--button-default-border-width,0px)]",
|
|
953
|
+
"border-[color:var(--button-default-border,transparent)]",
|
|
954
|
+
"[box-shadow:var(--button-default-shadow,var(--button-shadow,none))]",
|
|
955
|
+
"hover:bg-[var(--button-default-hover-bg,hsl(var(--primary)/0.9))]",
|
|
956
|
+
"hover:text-[var(--button-default-hover-fg,var(--button-default-fg,hsl(var(--primary-foreground))))]",
|
|
957
|
+
"hover:border-[color:var(--button-default-hover-border,var(--button-default-border,transparent))]",
|
|
958
|
+
"hover:[box-shadow:var(--button-default-shadow-hover,var(--button-shadow-hover,var(--button-default-shadow,var(--button-shadow,none))))]"
|
|
959
|
+
].join(" "),
|
|
960
|
+
// Destructive variant - full customization
|
|
961
|
+
destructive: [
|
|
962
|
+
"bg-[var(--button-destructive-bg,hsl(var(--destructive)))]",
|
|
963
|
+
"text-[var(--button-destructive-fg,white)]",
|
|
964
|
+
"border-[length:var(--button-destructive-border-width,0px)]",
|
|
965
|
+
"border-[color:var(--button-destructive-border,transparent)]",
|
|
966
|
+
"[box-shadow:var(--button-destructive-shadow,var(--button-shadow,none))]",
|
|
967
|
+
"hover:bg-[var(--button-destructive-hover-bg,hsl(var(--destructive)/0.9))]",
|
|
968
|
+
"hover:text-[var(--button-destructive-hover-fg,var(--button-destructive-fg,white))]",
|
|
969
|
+
"hover:border-[color:var(--button-destructive-hover-border,var(--button-destructive-border,transparent))]",
|
|
970
|
+
"hover:[box-shadow:var(--button-destructive-shadow-hover,var(--button-shadow-hover,var(--button-destructive-shadow,var(--button-shadow,none))))]",
|
|
971
|
+
"focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
|
|
972
|
+
"dark:bg-destructive/60"
|
|
973
|
+
].join(" "),
|
|
974
|
+
// Outline variant - full customization with proper border handling
|
|
975
|
+
outline: [
|
|
976
|
+
"bg-[var(--button-outline-bg,hsl(var(--background)))]",
|
|
977
|
+
"text-[var(--button-outline-fg,inherit)]",
|
|
978
|
+
"border-[length:var(--button-outline-border-width,1px)]",
|
|
979
|
+
"border-[color:var(--button-outline-border,hsl(var(--border)))]",
|
|
980
|
+
"[box-shadow:var(--button-outline-shadow,var(--button-shadow,0_1px_2px_0_rgb(0_0_0/0.05)))]",
|
|
981
|
+
"hover:bg-[var(--button-outline-hover-bg,hsl(var(--accent)))]",
|
|
982
|
+
"hover:text-[var(--button-outline-hover-fg,hsl(var(--accent-foreground)))]",
|
|
983
|
+
"hover:border-[color:var(--button-outline-hover-border,var(--button-outline-border,hsl(var(--border))))]",
|
|
984
|
+
"hover:[box-shadow:var(--button-outline-shadow-hover,var(--button-shadow-hover,var(--button-outline-shadow,var(--button-shadow,none))))]",
|
|
985
|
+
"dark:bg-input/30 dark:border-input dark:hover:bg-input/50"
|
|
986
|
+
].join(" "),
|
|
987
|
+
// Secondary variant - full customization
|
|
988
|
+
secondary: [
|
|
989
|
+
"bg-[var(--button-secondary-bg,hsl(var(--secondary)))]",
|
|
990
|
+
"text-[var(--button-secondary-fg,hsl(var(--secondary-foreground)))]",
|
|
991
|
+
"border-[length:var(--button-secondary-border-width,0px)]",
|
|
992
|
+
"border-[color:var(--button-secondary-border,transparent)]",
|
|
993
|
+
"[box-shadow:var(--button-secondary-shadow,var(--button-shadow,none))]",
|
|
994
|
+
"hover:bg-[var(--button-secondary-hover-bg,hsl(var(--secondary)/0.8))]",
|
|
995
|
+
"hover:text-[var(--button-secondary-hover-fg,var(--button-secondary-fg,hsl(var(--secondary-foreground))))]",
|
|
996
|
+
"hover:border-[color:var(--button-secondary-hover-border,var(--button-secondary-border,transparent))]",
|
|
997
|
+
"hover:[box-shadow:var(--button-secondary-shadow-hover,var(--button-shadow-hover,var(--button-secondary-shadow,var(--button-shadow,none))))]"
|
|
998
|
+
].join(" "),
|
|
999
|
+
// Ghost variant - full customization
|
|
1000
|
+
ghost: [
|
|
1001
|
+
"bg-[var(--button-ghost-bg,transparent)]",
|
|
1002
|
+
"text-[var(--button-ghost-fg,inherit)]",
|
|
1003
|
+
"border-[length:var(--button-ghost-border-width,0px)]",
|
|
1004
|
+
"border-[color:var(--button-ghost-border,transparent)]",
|
|
1005
|
+
"[box-shadow:var(--button-ghost-shadow,var(--button-shadow,none))]",
|
|
1006
|
+
"hover:bg-[var(--button-ghost-hover-bg,hsl(var(--accent)))]",
|
|
1007
|
+
"hover:text-[var(--button-ghost-hover-fg,hsl(var(--accent-foreground)))]",
|
|
1008
|
+
"hover:border-[color:var(--button-ghost-hover-border,var(--button-ghost-border,transparent))]",
|
|
1009
|
+
"hover:[box-shadow:var(--button-ghost-shadow-hover,var(--button-shadow-hover,var(--button-ghost-shadow,var(--button-shadow,none))))]",
|
|
1010
|
+
"dark:hover:bg-accent/50"
|
|
1011
|
+
].join(" "),
|
|
1012
|
+
// Link variant - full customization
|
|
1013
|
+
link: [
|
|
1014
|
+
"bg-[var(--button-link-bg,transparent)]",
|
|
1015
|
+
"text-[var(--button-link-fg,hsl(var(--primary)))]",
|
|
1016
|
+
"border-[length:var(--button-link-border-width,0px)]",
|
|
1017
|
+
"border-[color:var(--button-link-border,transparent)]",
|
|
1018
|
+
"[box-shadow:var(--button-link-shadow,none)]",
|
|
1019
|
+
"hover:bg-[var(--button-link-hover-bg,transparent)]",
|
|
1020
|
+
"hover:text-[var(--button-link-hover-fg,var(--button-link-fg,hsl(var(--primary))))]",
|
|
1021
|
+
"hover:[box-shadow:var(--button-link-shadow-hover,none)]",
|
|
1022
|
+
"underline-offset-4 hover:underline"
|
|
1023
|
+
].join(" ")
|
|
1024
|
+
},
|
|
1025
|
+
size: {
|
|
1026
|
+
default: [
|
|
1027
|
+
"h-[var(--button-height-md,2.25rem)]",
|
|
1028
|
+
"px-[var(--button-padding-x-md,1rem)]",
|
|
1029
|
+
"py-[var(--button-padding-y-md,0.5rem)]",
|
|
1030
|
+
"has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
|
|
1031
|
+
].join(" "),
|
|
1032
|
+
sm: [
|
|
1033
|
+
"h-[var(--button-height-sm,2rem)]",
|
|
1034
|
+
"px-[var(--button-padding-x-sm,0.75rem)]",
|
|
1035
|
+
"py-[var(--button-padding-y-sm,0.25rem)]",
|
|
1036
|
+
"gap-1.5",
|
|
1037
|
+
"has-[>svg]:px-[calc(var(--button-padding-x-sm,0.75rem)*0.83)]"
|
|
1038
|
+
].join(" "),
|
|
1039
|
+
md: [
|
|
1040
|
+
"h-[var(--button-height-md,2.25rem)]",
|
|
1041
|
+
"px-[var(--button-padding-x-md,1rem)]",
|
|
1042
|
+
"py-[var(--button-padding-y-md,0.5rem)]",
|
|
1043
|
+
"has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
|
|
1044
|
+
].join(" "),
|
|
1045
|
+
lg: [
|
|
1046
|
+
"h-[var(--button-height-lg,2.5rem)]",
|
|
1047
|
+
"px-[var(--button-padding-x-lg,1.5rem)]",
|
|
1048
|
+
"py-[var(--button-padding-y-lg,0.5rem)]",
|
|
1049
|
+
"has-[>svg]:px-[calc(var(--button-padding-x-lg,1.5rem)*0.67)]"
|
|
1050
|
+
].join(" "),
|
|
1051
|
+
icon: "size-[var(--button-height-md,2.25rem)]",
|
|
1052
|
+
"icon-sm": "size-[var(--button-height-sm,2rem)]",
|
|
1053
|
+
"icon-lg": "size-[var(--button-height-lg,2.5rem)]"
|
|
1054
|
+
}
|
|
1055
|
+
},
|
|
1056
|
+
defaultVariants: {
|
|
1057
|
+
variant: "default",
|
|
1058
|
+
size: "default"
|
|
1059
|
+
}
|
|
1060
|
+
});
|
|
1985
1061
|
function Button({
|
|
1986
1062
|
className,
|
|
1987
1063
|
variant = "default",
|
|
@@ -2025,127 +1101,411 @@ function CardHeader({ className, ...props }) {
|
|
|
2025
1101
|
),
|
|
2026
1102
|
...props
|
|
2027
1103
|
}
|
|
2028
|
-
);
|
|
2029
|
-
}
|
|
2030
|
-
function CardTitle({ className, ...props }) {
|
|
2031
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2032
|
-
"div",
|
|
2033
|
-
{
|
|
2034
|
-
"data-slot": "card-title",
|
|
2035
|
-
className: cn("leading-none font-semibold", className),
|
|
2036
|
-
...props
|
|
1104
|
+
);
|
|
1105
|
+
}
|
|
1106
|
+
function CardTitle({ className, ...props }) {
|
|
1107
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1108
|
+
"div",
|
|
1109
|
+
{
|
|
1110
|
+
"data-slot": "card-title",
|
|
1111
|
+
className: cn("leading-none font-semibold", className),
|
|
1112
|
+
...props
|
|
1113
|
+
}
|
|
1114
|
+
);
|
|
1115
|
+
}
|
|
1116
|
+
function CardDescription({ className, ...props }) {
|
|
1117
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1118
|
+
"div",
|
|
1119
|
+
{
|
|
1120
|
+
"data-slot": "card-description",
|
|
1121
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
1122
|
+
...props
|
|
1123
|
+
}
|
|
1124
|
+
);
|
|
1125
|
+
}
|
|
1126
|
+
function CardContent({ className, ...props }) {
|
|
1127
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1128
|
+
"div",
|
|
1129
|
+
{
|
|
1130
|
+
"data-slot": "card-content",
|
|
1131
|
+
className: cn("px-6", className),
|
|
1132
|
+
...props
|
|
1133
|
+
}
|
|
1134
|
+
);
|
|
1135
|
+
}
|
|
1136
|
+
function CardFooter({ className, ...props }) {
|
|
1137
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1138
|
+
"div",
|
|
1139
|
+
{
|
|
1140
|
+
"data-slot": "card-footer",
|
|
1141
|
+
className: cn("flex items-center px-6 [.border-t]:pt-6", className),
|
|
1142
|
+
...props
|
|
1143
|
+
}
|
|
1144
|
+
);
|
|
1145
|
+
}
|
|
1146
|
+
var badgeVariants = classVarianceAuthority.cva(
|
|
1147
|
+
"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
1148
|
+
{
|
|
1149
|
+
variants: {
|
|
1150
|
+
variant: {
|
|
1151
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
1152
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
1153
|
+
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
1154
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
1155
|
+
}
|
|
1156
|
+
},
|
|
1157
|
+
defaultVariants: {
|
|
1158
|
+
variant: "default"
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
);
|
|
1162
|
+
function Badge({
|
|
1163
|
+
className,
|
|
1164
|
+
variant,
|
|
1165
|
+
asChild = false,
|
|
1166
|
+
...props
|
|
1167
|
+
}) {
|
|
1168
|
+
const Comp = asChild ? reactSlot.Slot : "span";
|
|
1169
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1170
|
+
Comp,
|
|
1171
|
+
{
|
|
1172
|
+
"data-slot": "badge",
|
|
1173
|
+
className: cn(badgeVariants({ variant }), className),
|
|
1174
|
+
...props
|
|
1175
|
+
}
|
|
1176
|
+
);
|
|
1177
|
+
}
|
|
1178
|
+
function Popover({
|
|
1179
|
+
...props
|
|
1180
|
+
}) {
|
|
1181
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Root, { "data-slot": "popover", ...props });
|
|
1182
|
+
}
|
|
1183
|
+
function PopoverTrigger({
|
|
1184
|
+
...props
|
|
1185
|
+
}) {
|
|
1186
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1187
|
+
}
|
|
1188
|
+
function PopoverContent({
|
|
1189
|
+
className,
|
|
1190
|
+
align = "center",
|
|
1191
|
+
sideOffset = 4,
|
|
1192
|
+
...props
|
|
1193
|
+
}) {
|
|
1194
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1195
|
+
PopoverPrimitive__namespace.Content,
|
|
1196
|
+
{
|
|
1197
|
+
"data-slot": "popover-content",
|
|
1198
|
+
align,
|
|
1199
|
+
sideOffset,
|
|
1200
|
+
className: cn(
|
|
1201
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
1202
|
+
className
|
|
1203
|
+
),
|
|
1204
|
+
...props
|
|
1205
|
+
}
|
|
1206
|
+
) });
|
|
1207
|
+
}
|
|
1208
|
+
var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
|
|
1209
|
+
var DynamicIcon = React4__namespace.memo(function DynamicIcon2({
|
|
1210
|
+
apiKey,
|
|
1211
|
+
...props
|
|
1212
|
+
}) {
|
|
1213
|
+
return /* @__PURE__ */ jsxRuntime.jsx(icon.Icon, { ...props, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
|
|
1214
|
+
});
|
|
1215
|
+
DynamicIcon.displayName = "DynamicIcon";
|
|
1216
|
+
function StarRating({
|
|
1217
|
+
rating,
|
|
1218
|
+
size = 18,
|
|
1219
|
+
className
|
|
1220
|
+
}) {
|
|
1221
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex items-center gap-0.5", className), children: [1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1222
|
+
DynamicIcon,
|
|
1223
|
+
{
|
|
1224
|
+
name: "icon-park-solid/star",
|
|
1225
|
+
size,
|
|
1226
|
+
className: cn(
|
|
1227
|
+
star <= rating ? "fill-primary text-primary" : "fill-muted text-muted"
|
|
1228
|
+
)
|
|
1229
|
+
},
|
|
1230
|
+
star
|
|
1231
|
+
)) });
|
|
1232
|
+
}
|
|
1233
|
+
function normalizePhoneNumber(input) {
|
|
1234
|
+
const trimmed = input.trim();
|
|
1235
|
+
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
1236
|
+
return trimmed;
|
|
1237
|
+
}
|
|
1238
|
+
const match = trimmed.match(/^[\s\+\-\(\)]*(\d[\d\s\-\(\)\.]*\d)[\s\-]*(x|ext\.?|extension)?[\s\-]*(\d+)?$/i);
|
|
1239
|
+
if (match) {
|
|
1240
|
+
const mainNumber = match[1].replace(/[\s\-\(\)\.]/g, "");
|
|
1241
|
+
const extension = match[3];
|
|
1242
|
+
const normalized = mainNumber.length >= 10 && !trimmed.startsWith("+") ? `+${mainNumber}` : mainNumber;
|
|
1243
|
+
const withExtension = extension ? `${normalized};ext=${extension}` : normalized;
|
|
1244
|
+
return `tel:${withExtension}`;
|
|
1245
|
+
}
|
|
1246
|
+
const cleaned = trimmed.replace(/[\s\-\(\)\.]/g, "");
|
|
1247
|
+
return `tel:${cleaned}`;
|
|
1248
|
+
}
|
|
1249
|
+
function normalizeEmail(input) {
|
|
1250
|
+
const trimmed = input.trim();
|
|
1251
|
+
if (trimmed.toLowerCase().startsWith("mailto:")) {
|
|
1252
|
+
return trimmed;
|
|
1253
|
+
}
|
|
1254
|
+
return `mailto:${trimmed}`;
|
|
1255
|
+
}
|
|
1256
|
+
function isEmail(input) {
|
|
1257
|
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
1258
|
+
return emailRegex.test(input.trim());
|
|
1259
|
+
}
|
|
1260
|
+
function isPhoneNumber(input) {
|
|
1261
|
+
const trimmed = input.trim();
|
|
1262
|
+
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
1263
|
+
return true;
|
|
1264
|
+
}
|
|
1265
|
+
const phoneRegex = /^[\s\+\-\(\)]*\d[\d\s\-\(\)\.]*\d[\s\-]*(x|ext\.?|extension)?[\s\-]*\d*$/i;
|
|
1266
|
+
return phoneRegex.test(trimmed);
|
|
1267
|
+
}
|
|
1268
|
+
function isInternalUrl(href) {
|
|
1269
|
+
if (typeof window === "undefined") {
|
|
1270
|
+
return href.startsWith("/") && !href.startsWith("//");
|
|
1271
|
+
}
|
|
1272
|
+
const trimmed = href.trim();
|
|
1273
|
+
if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
|
|
1274
|
+
return true;
|
|
1275
|
+
}
|
|
1276
|
+
try {
|
|
1277
|
+
const url = new URL(trimmed, window.location.href);
|
|
1278
|
+
const currentOrigin = window.location.origin;
|
|
1279
|
+
const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
|
|
1280
|
+
return normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin);
|
|
1281
|
+
} catch {
|
|
1282
|
+
return false;
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
function toRelativePath(href) {
|
|
1286
|
+
if (typeof window === "undefined") {
|
|
1287
|
+
return href;
|
|
1288
|
+
}
|
|
1289
|
+
const trimmed = href.trim();
|
|
1290
|
+
if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
|
|
1291
|
+
return trimmed;
|
|
1292
|
+
}
|
|
1293
|
+
try {
|
|
1294
|
+
const url = new URL(trimmed, window.location.href);
|
|
1295
|
+
const currentOrigin = window.location.origin;
|
|
1296
|
+
const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
|
|
1297
|
+
if (normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin)) {
|
|
1298
|
+
return url.pathname + url.search + url.hash;
|
|
1299
|
+
}
|
|
1300
|
+
} catch {
|
|
1301
|
+
}
|
|
1302
|
+
return trimmed;
|
|
1303
|
+
}
|
|
1304
|
+
function useNavigation({
|
|
1305
|
+
href,
|
|
1306
|
+
onClick
|
|
1307
|
+
} = {}) {
|
|
1308
|
+
const linkType = React4__namespace.useMemo(() => {
|
|
1309
|
+
if (!href || href.trim() === "") {
|
|
1310
|
+
return onClick ? "none" : "none";
|
|
1311
|
+
}
|
|
1312
|
+
const trimmed = href.trim();
|
|
1313
|
+
if (trimmed.toLowerCase().startsWith("mailto:") || isEmail(trimmed)) {
|
|
1314
|
+
return "mailto";
|
|
1315
|
+
}
|
|
1316
|
+
if (trimmed.toLowerCase().startsWith("tel:") || isPhoneNumber(trimmed)) {
|
|
1317
|
+
return "tel";
|
|
1318
|
+
}
|
|
1319
|
+
if (isInternalUrl(trimmed)) {
|
|
1320
|
+
return "internal";
|
|
1321
|
+
}
|
|
1322
|
+
try {
|
|
1323
|
+
new URL(trimmed, typeof window !== "undefined" ? window.location.href : "http://localhost");
|
|
1324
|
+
return "external";
|
|
1325
|
+
} catch {
|
|
1326
|
+
return "internal";
|
|
1327
|
+
}
|
|
1328
|
+
}, [href, onClick]);
|
|
1329
|
+
const normalizedHref = React4__namespace.useMemo(() => {
|
|
1330
|
+
if (!href || href.trim() === "") {
|
|
1331
|
+
return void 0;
|
|
1332
|
+
}
|
|
1333
|
+
const trimmed = href.trim();
|
|
1334
|
+
switch (linkType) {
|
|
1335
|
+
case "tel":
|
|
1336
|
+
return normalizePhoneNumber(trimmed);
|
|
1337
|
+
case "mailto":
|
|
1338
|
+
return normalizeEmail(trimmed);
|
|
1339
|
+
case "internal":
|
|
1340
|
+
return toRelativePath(trimmed);
|
|
1341
|
+
case "external":
|
|
1342
|
+
return trimmed;
|
|
1343
|
+
default:
|
|
1344
|
+
return trimmed;
|
|
1345
|
+
}
|
|
1346
|
+
}, [href, linkType]);
|
|
1347
|
+
const target = React4__namespace.useMemo(() => {
|
|
1348
|
+
switch (linkType) {
|
|
1349
|
+
case "external":
|
|
1350
|
+
return "_blank";
|
|
1351
|
+
case "internal":
|
|
1352
|
+
return "_self";
|
|
1353
|
+
case "mailto":
|
|
1354
|
+
case "tel":
|
|
1355
|
+
return void 0;
|
|
1356
|
+
default:
|
|
1357
|
+
return void 0;
|
|
1358
|
+
}
|
|
1359
|
+
}, [linkType]);
|
|
1360
|
+
const rel = React4__namespace.useMemo(() => {
|
|
1361
|
+
if (linkType === "external") {
|
|
1362
|
+
return "noopener noreferrer";
|
|
2037
1363
|
}
|
|
1364
|
+
return void 0;
|
|
1365
|
+
}, [linkType]);
|
|
1366
|
+
const isExternal = linkType === "external";
|
|
1367
|
+
const isInternal = linkType === "internal";
|
|
1368
|
+
const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
|
|
1369
|
+
const handleClick = React4__namespace.useCallback(
|
|
1370
|
+
(event) => {
|
|
1371
|
+
if (onClick) {
|
|
1372
|
+
try {
|
|
1373
|
+
onClick(event);
|
|
1374
|
+
} catch (error) {
|
|
1375
|
+
console.error("Error in user onClick handler:", error);
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
if (event.defaultPrevented) {
|
|
1379
|
+
return;
|
|
1380
|
+
}
|
|
1381
|
+
if (shouldUseRouter && normalizedHref && event.button === 0 && // left-click only
|
|
1382
|
+
!event.metaKey && !event.altKey && !event.ctrlKey && !event.shiftKey) {
|
|
1383
|
+
if (typeof window !== "undefined") {
|
|
1384
|
+
const handler = window.__opensiteNavigationHandler;
|
|
1385
|
+
if (typeof handler === "function") {
|
|
1386
|
+
try {
|
|
1387
|
+
const handled = handler(normalizedHref, event.nativeEvent || event);
|
|
1388
|
+
if (handled !== false) {
|
|
1389
|
+
event.preventDefault();
|
|
1390
|
+
}
|
|
1391
|
+
} catch (error) {
|
|
1392
|
+
console.error("Error in navigation handler:", error);
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
},
|
|
1398
|
+
[onClick, shouldUseRouter, normalizedHref]
|
|
2038
1399
|
);
|
|
1400
|
+
return {
|
|
1401
|
+
linkType,
|
|
1402
|
+
normalizedHref,
|
|
1403
|
+
target,
|
|
1404
|
+
rel,
|
|
1405
|
+
isExternal,
|
|
1406
|
+
isInternal,
|
|
1407
|
+
shouldUseRouter,
|
|
1408
|
+
handleClick
|
|
1409
|
+
};
|
|
2039
1410
|
}
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
1411
|
+
var Pressable = React4__namespace.forwardRef(
|
|
1412
|
+
({
|
|
1413
|
+
children,
|
|
1414
|
+
className,
|
|
1415
|
+
href,
|
|
1416
|
+
onClick,
|
|
1417
|
+
variant,
|
|
1418
|
+
size,
|
|
1419
|
+
asButton = false,
|
|
1420
|
+
fallbackComponentType = "span",
|
|
1421
|
+
componentType,
|
|
1422
|
+
"aria-label": ariaLabel,
|
|
1423
|
+
"aria-describedby": ariaDescribedby,
|
|
1424
|
+
id,
|
|
1425
|
+
...props
|
|
1426
|
+
}, ref) => {
|
|
1427
|
+
const navigation = useNavigation({ href, onClick });
|
|
1428
|
+
const {
|
|
1429
|
+
normalizedHref,
|
|
1430
|
+
target,
|
|
1431
|
+
rel,
|
|
1432
|
+
linkType,
|
|
1433
|
+
isInternal,
|
|
1434
|
+
handleClick
|
|
1435
|
+
} = navigation;
|
|
1436
|
+
const shouldRenderLink = normalizedHref && linkType !== "none";
|
|
1437
|
+
const shouldRenderButton = !shouldRenderLink && onClick;
|
|
1438
|
+
const effectiveComponentType = componentType || (shouldRenderLink ? "a" : shouldRenderButton ? "button" : fallbackComponentType);
|
|
1439
|
+
const finalComponentType = isInternal && shouldRenderLink ? "a" : effectiveComponentType;
|
|
1440
|
+
const shouldApplyButtonStyles = asButton || variant || size;
|
|
1441
|
+
const combinedClassName = cn(
|
|
1442
|
+
shouldApplyButtonStyles && buttonVariants({ variant, size }),
|
|
1443
|
+
className
|
|
1444
|
+
);
|
|
1445
|
+
const dataProps = Object.fromEntries(
|
|
1446
|
+
Object.entries(props).filter(([key]) => key.startsWith("data-"))
|
|
1447
|
+
);
|
|
1448
|
+
const buttonDataAttributes = shouldApplyButtonStyles ? {
|
|
1449
|
+
"data-slot": "button",
|
|
1450
|
+
"data-variant": variant ?? "default",
|
|
1451
|
+
"data-size": size ?? "default"
|
|
1452
|
+
} : {};
|
|
1453
|
+
const commonProps = {
|
|
1454
|
+
className: combinedClassName,
|
|
1455
|
+
onClick: handleClick,
|
|
1456
|
+
"aria-label": ariaLabel,
|
|
1457
|
+
"aria-describedby": ariaDescribedby,
|
|
1458
|
+
id,
|
|
1459
|
+
...dataProps,
|
|
1460
|
+
...buttonDataAttributes
|
|
1461
|
+
};
|
|
1462
|
+
if (finalComponentType === "a" && shouldRenderLink) {
|
|
1463
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1464
|
+
"a",
|
|
1465
|
+
{
|
|
1466
|
+
ref,
|
|
1467
|
+
href: normalizedHref,
|
|
1468
|
+
target,
|
|
1469
|
+
rel,
|
|
1470
|
+
...commonProps,
|
|
1471
|
+
...props,
|
|
1472
|
+
children
|
|
1473
|
+
}
|
|
1474
|
+
);
|
|
2047
1475
|
}
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
1476
|
+
if (finalComponentType === "button") {
|
|
1477
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1478
|
+
"button",
|
|
1479
|
+
{
|
|
1480
|
+
ref,
|
|
1481
|
+
type: props.type || "button",
|
|
1482
|
+
...commonProps,
|
|
1483
|
+
...props,
|
|
1484
|
+
children
|
|
1485
|
+
}
|
|
1486
|
+
);
|
|
2057
1487
|
}
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
1488
|
+
if (finalComponentType === "div") {
|
|
1489
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1490
|
+
"div",
|
|
1491
|
+
{
|
|
1492
|
+
ref,
|
|
1493
|
+
...commonProps,
|
|
1494
|
+
children
|
|
1495
|
+
}
|
|
1496
|
+
);
|
|
2067
1497
|
}
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
variant: {
|
|
2075
|
-
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
2076
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
2077
|
-
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
2078
|
-
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
1498
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1499
|
+
"span",
|
|
1500
|
+
{
|
|
1501
|
+
ref,
|
|
1502
|
+
...commonProps,
|
|
1503
|
+
children
|
|
2079
1504
|
}
|
|
2080
|
-
|
|
2081
|
-
defaultVariants: {
|
|
2082
|
-
variant: "default"
|
|
2083
|
-
}
|
|
1505
|
+
);
|
|
2084
1506
|
}
|
|
2085
1507
|
);
|
|
2086
|
-
|
|
2087
|
-
className,
|
|
2088
|
-
variant,
|
|
2089
|
-
asChild = false,
|
|
2090
|
-
...props
|
|
2091
|
-
}) {
|
|
2092
|
-
const Comp = asChild ? reactSlot.Slot : "span";
|
|
2093
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2094
|
-
Comp,
|
|
2095
|
-
{
|
|
2096
|
-
"data-slot": "badge",
|
|
2097
|
-
className: cn(badgeVariants({ variant }), className),
|
|
2098
|
-
...props
|
|
2099
|
-
}
|
|
2100
|
-
);
|
|
2101
|
-
}
|
|
2102
|
-
function Popover({
|
|
2103
|
-
...props
|
|
2104
|
-
}) {
|
|
2105
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Root, { "data-slot": "popover", ...props });
|
|
2106
|
-
}
|
|
2107
|
-
function PopoverTrigger({
|
|
2108
|
-
...props
|
|
2109
|
-
}) {
|
|
2110
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
2111
|
-
}
|
|
2112
|
-
function PopoverContent({
|
|
2113
|
-
className,
|
|
2114
|
-
align = "center",
|
|
2115
|
-
sideOffset = 4,
|
|
2116
|
-
...props
|
|
2117
|
-
}) {
|
|
2118
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2119
|
-
PopoverPrimitive__namespace.Content,
|
|
2120
|
-
{
|
|
2121
|
-
"data-slot": "popover-content",
|
|
2122
|
-
align,
|
|
2123
|
-
sideOffset,
|
|
2124
|
-
className: cn(
|
|
2125
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
2126
|
-
className
|
|
2127
|
-
),
|
|
2128
|
-
...props
|
|
2129
|
-
}
|
|
2130
|
-
) });
|
|
2131
|
-
}
|
|
2132
|
-
function StarRating({
|
|
2133
|
-
rating,
|
|
2134
|
-
size = 18,
|
|
2135
|
-
className
|
|
2136
|
-
}) {
|
|
2137
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex items-center gap-0.5", className), children: [1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2138
|
-
DynamicIcon,
|
|
2139
|
-
{
|
|
2140
|
-
name: "icon-park-solid/star",
|
|
2141
|
-
size,
|
|
2142
|
-
className: cn(
|
|
2143
|
-
star <= rating ? "fill-primary text-primary" : "fill-muted text-muted"
|
|
2144
|
-
)
|
|
2145
|
-
},
|
|
2146
|
-
star
|
|
2147
|
-
)) });
|
|
2148
|
-
}
|
|
1508
|
+
Pressable.displayName = "Pressable";
|
|
2149
1509
|
var BUTTON_SIZES = {
|
|
2150
1510
|
sm: { buttonSize: "size-8", iconSize: 16 },
|
|
2151
1511
|
md: { buttonSize: "size-10", iconSize: 20 },
|
|
@@ -2237,7 +1597,7 @@ var platformIconMap = {
|
|
|
2237
1597
|
dribbble: "cib/dribbble",
|
|
2238
1598
|
unknown: "icon-park-solid/circular-connection"
|
|
2239
1599
|
};
|
|
2240
|
-
var SocialLinkIcon =
|
|
1600
|
+
var SocialLinkIcon = React4__namespace.forwardRef(
|
|
2241
1601
|
({
|
|
2242
1602
|
platformName,
|
|
2243
1603
|
label,
|
|
@@ -2251,16 +1611,16 @@ var SocialLinkIcon = React6__namespace.forwardRef(
|
|
|
2251
1611
|
...pressableProps
|
|
2252
1612
|
}, ref) => {
|
|
2253
1613
|
const platform = usePlatformFromUrl.usePlatformFromUrl(href);
|
|
2254
|
-
const smartPlatformName =
|
|
1614
|
+
const smartPlatformName = React4__namespace.useMemo(() => {
|
|
2255
1615
|
return platform || platformName;
|
|
2256
1616
|
}, [platform, platformName]);
|
|
2257
|
-
const iconName =
|
|
1617
|
+
const iconName = React4__namespace.useMemo(() => {
|
|
2258
1618
|
return iconNameOverride || platformIconMap[smartPlatformName];
|
|
2259
1619
|
}, [iconNameOverride, smartPlatformName]);
|
|
2260
|
-
const accessibleLabel =
|
|
1620
|
+
const accessibleLabel = React4__namespace.useMemo(() => {
|
|
2261
1621
|
return label || platformName;
|
|
2262
1622
|
}, [label, platformName]);
|
|
2263
|
-
const icon =
|
|
1623
|
+
const icon = React4__namespace.useMemo(() => {
|
|
2264
1624
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2265
1625
|
DynamicIcon,
|
|
2266
1626
|
{
|
|
@@ -2340,12 +1700,12 @@ function TextInner({ as, className, children, ...props }, ref) {
|
|
|
2340
1700
|
const Component = as || "span";
|
|
2341
1701
|
return /* @__PURE__ */ jsxRuntime.jsx(Component, { ref, className: cn(className), ...props, children });
|
|
2342
1702
|
}
|
|
2343
|
-
var Text =
|
|
1703
|
+
var Text = React4__namespace.forwardRef(TextInner);
|
|
2344
1704
|
Text.displayName = "Text";
|
|
2345
1705
|
function isContentTextItem(item) {
|
|
2346
|
-
return item !== null && typeof item === "object" && !
|
|
1706
|
+
return item !== null && typeof item === "object" && !React4__namespace.isValidElement(item) && "_type" in item && item._type === "text";
|
|
2347
1707
|
}
|
|
2348
|
-
var ContentGroup =
|
|
1708
|
+
var ContentGroup = React4__namespace.forwardRef(
|
|
2349
1709
|
({ items, className, children, ...props }, ref) => {
|
|
2350
1710
|
const hasContent = items && items.length > 0;
|
|
2351
1711
|
if (!hasContent) {
|
|
@@ -2358,10 +1718,10 @@ var ContentGroup = React6__namespace.forwardRef(
|
|
|
2358
1718
|
return /* @__PURE__ */ jsxRuntime.jsx(Text, { ...textProps }, idx);
|
|
2359
1719
|
}
|
|
2360
1720
|
const reactNode = item;
|
|
2361
|
-
if (
|
|
2362
|
-
return
|
|
1721
|
+
if (React4__namespace.isValidElement(reactNode)) {
|
|
1722
|
+
return React4__namespace.cloneElement(reactNode, { key: reactNode.key ?? idx });
|
|
2363
1723
|
}
|
|
2364
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1724
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React4__namespace.Fragment, { children: reactNode }, idx);
|
|
2365
1725
|
}),
|
|
2366
1726
|
children
|
|
2367
1727
|
] });
|
|
@@ -2385,7 +1745,7 @@ function AlternatingBlocks({
|
|
|
2385
1745
|
pattern,
|
|
2386
1746
|
patternOpacity
|
|
2387
1747
|
}) {
|
|
2388
|
-
const sectionsContent =
|
|
1748
|
+
const sectionsContent = React4.useMemo(() => {
|
|
2389
1749
|
if (sectionsSlot) return sectionsSlot;
|
|
2390
1750
|
if (!sections || sections.length === 0) return null;
|
|
2391
1751
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("space-y-12", sectionsClassName), children: sections.map((section, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2429,7 +1789,7 @@ function AlternatingBlocks({
|
|
|
2429
1789
|
sectionContentClassName,
|
|
2430
1790
|
sectionMediaClassName
|
|
2431
1791
|
]);
|
|
2432
|
-
const headerItems =
|
|
1792
|
+
const headerItems = React4.useMemo(() => {
|
|
2433
1793
|
const items = [];
|
|
2434
1794
|
if (subtitle) {
|
|
2435
1795
|
items.push(
|
|
@@ -2498,7 +1858,7 @@ function AboutSplitHero({
|
|
|
2498
1858
|
patternOpacity,
|
|
2499
1859
|
directionConfig = { desktop: "mediaRight", mobile: "mediaTop" }
|
|
2500
1860
|
}) {
|
|
2501
|
-
const ctaContent =
|
|
1861
|
+
const ctaContent = React4.useMemo(() => {
|
|
2502
1862
|
if (ctaSlot) return ctaSlot;
|
|
2503
1863
|
if (!ctaAction) return null;
|
|
2504
1864
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2520,7 +1880,7 @@ function AboutSplitHero({
|
|
|
2520
1880
|
}
|
|
2521
1881
|
);
|
|
2522
1882
|
}, [ctaSlot, ctaAction, ctaClassName]);
|
|
2523
|
-
const bgColorClass =
|
|
1883
|
+
const bgColorClass = React4.useMemo(() => {
|
|
2524
1884
|
switch (background) {
|
|
2525
1885
|
case "dark":
|
|
2526
1886
|
return "bg-foreground text-background";
|
|
@@ -2648,7 +2008,7 @@ function AboutMissionPrinciples({
|
|
|
2648
2008
|
pattern,
|
|
2649
2009
|
patternOpacity
|
|
2650
2010
|
}) {
|
|
2651
|
-
const missionActionContent =
|
|
2011
|
+
const missionActionContent = React4.useMemo(() => {
|
|
2652
2012
|
if (missionActionSlot) return missionActionSlot;
|
|
2653
2013
|
if (!missionAction) return null;
|
|
2654
2014
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("pt-2", missionActionClassName), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2673,7 +2033,7 @@ function AboutMissionPrinciples({
|
|
|
2673
2033
|
}
|
|
2674
2034
|
) });
|
|
2675
2035
|
}, [missionActionSlot, missionAction, missionActionClassName]);
|
|
2676
|
-
const principlesContent =
|
|
2036
|
+
const principlesContent = React4.useMemo(() => {
|
|
2677
2037
|
if (principlesSlot) return principlesSlot;
|
|
2678
2038
|
if (!principles || principles.length === 0) return null;
|
|
2679
2039
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2711,7 +2071,7 @@ function AboutMissionPrinciples({
|
|
|
2711
2071
|
}
|
|
2712
2072
|
);
|
|
2713
2073
|
}, [principlesSlot, principles, principlesClassName]);
|
|
2714
|
-
const visionActionContent =
|
|
2074
|
+
const visionActionContent = React4.useMemo(() => {
|
|
2715
2075
|
if (visionActionSlot) return visionActionSlot;
|
|
2716
2076
|
if (!visionAction) return null;
|
|
2717
2077
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2886,11 +2246,11 @@ function AboutExpandableValues({
|
|
|
2886
2246
|
pattern,
|
|
2887
2247
|
patternOpacity
|
|
2888
2248
|
}) {
|
|
2889
|
-
const [expandedValue, setExpandedValue] =
|
|
2890
|
-
const toggleExpand =
|
|
2249
|
+
const [expandedValue, setExpandedValue] = React4__namespace.useState(null);
|
|
2250
|
+
const toggleExpand = React4.useCallback((id) => {
|
|
2891
2251
|
setExpandedValue((prev) => prev === id ? null : id);
|
|
2892
2252
|
}, []);
|
|
2893
|
-
|
|
2253
|
+
React4.useMemo(() => {
|
|
2894
2254
|
if (actionsSlot) return actionsSlot;
|
|
2895
2255
|
if (!actions || actions.length === 0) return null;
|
|
2896
2256
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: actionsClassName, children: actions.map((action, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2906,7 +2266,7 @@ function AboutExpandableValues({
|
|
|
2906
2266
|
idx
|
|
2907
2267
|
)) });
|
|
2908
2268
|
}, [actionsSlot, actions, actionsClassName]);
|
|
2909
|
-
const valuesContent =
|
|
2269
|
+
const valuesContent = React4.useMemo(() => {
|
|
2910
2270
|
if (valuesSlot) return valuesSlot;
|
|
2911
2271
|
if (!values || values.length === 0) return null;
|
|
2912
2272
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("grid grid-cols-1 gap-6 mt-8", valuesClassName), children: values.map((value) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3122,17 +2482,17 @@ function CommunityInitiatives({
|
|
|
3122
2482
|
pattern,
|
|
3123
2483
|
patternOpacity
|
|
3124
2484
|
}) {
|
|
3125
|
-
const [activeCategory, setActiveCategory] =
|
|
2485
|
+
const [activeCategory, setActiveCategory] = React4__namespace.useState(
|
|
3126
2486
|
categories?.[0]?.id || ""
|
|
3127
2487
|
);
|
|
3128
2488
|
const currentCategory = categories?.find((category) => category.id === activeCategory) || categories?.[0];
|
|
3129
|
-
const handleCategoryChange =
|
|
2489
|
+
const handleCategoryChange = React4.useCallback(
|
|
3130
2490
|
(e) => {
|
|
3131
2491
|
setActiveCategory(e.target.value);
|
|
3132
2492
|
},
|
|
3133
2493
|
[]
|
|
3134
2494
|
);
|
|
3135
|
-
const categoriesContent =
|
|
2495
|
+
const categoriesContent = React4.useMemo(() => {
|
|
3136
2496
|
if (categoriesSlot) return categoriesSlot;
|
|
3137
2497
|
if (!categories || categories.length === 0) return null;
|
|
3138
2498
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3386,10 +2746,10 @@ function AboutCultureTabs({
|
|
|
3386
2746
|
patternOpacity
|
|
3387
2747
|
}) {
|
|
3388
2748
|
const resolvedAspects = aspects ?? [];
|
|
3389
|
-
const [activeTab, setActiveTab] =
|
|
2749
|
+
const [activeTab, setActiveTab] = React4__namespace.useState(
|
|
3390
2750
|
resolvedAspects[0]?.id || ""
|
|
3391
2751
|
);
|
|
3392
|
-
const headerItems =
|
|
2752
|
+
const headerItems = React4.useMemo(() => {
|
|
3393
2753
|
const items = [];
|
|
3394
2754
|
if (badgeText) {
|
|
3395
2755
|
if (typeof badgeText === "string") {
|
|
@@ -3436,7 +2796,7 @@ function AboutCultureTabs({
|
|
|
3436
2796
|
description,
|
|
3437
2797
|
descriptionClassName
|
|
3438
2798
|
]);
|
|
3439
|
-
const ctaImagesContent =
|
|
2799
|
+
const ctaImagesContent = React4.useMemo(() => {
|
|
3440
2800
|
if (ctaImagesSlot) return ctaImagesSlot;
|
|
3441
2801
|
if (!ctaImages || ctaImages.length === 0) return null;
|
|
3442
2802
|
return ctaImages.map((src, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3602,7 +2962,7 @@ function MediaHoverCtas({
|
|
|
3602
2962
|
optixFlowConfig
|
|
3603
2963
|
}) {
|
|
3604
2964
|
const resolvedItems = items ?? [];
|
|
3605
|
-
const itemsContent =
|
|
2965
|
+
const itemsContent = React4.useMemo(() => {
|
|
3606
2966
|
if (itemsSlot) return itemsSlot;
|
|
3607
2967
|
return resolvedItems.map((item, index) => {
|
|
3608
2968
|
const CardComponent = item.cardHref ? "a" : "div";
|
|
@@ -3692,13 +3052,13 @@ function BannerAnnouncementDismissible({
|
|
|
3692
3052
|
actionsClassName,
|
|
3693
3053
|
dismissButtonClassName
|
|
3694
3054
|
}) {
|
|
3695
|
-
const [isVisible, setIsVisible] =
|
|
3055
|
+
const [isVisible, setIsVisible] = React4.useState(true);
|
|
3696
3056
|
const dismissLabel = dismissAriaLabel ?? "Dismiss banner";
|
|
3697
|
-
const handleDismiss =
|
|
3057
|
+
const handleDismiss = React4.useCallback(() => {
|
|
3698
3058
|
setIsVisible(false);
|
|
3699
3059
|
onDismiss?.();
|
|
3700
3060
|
}, [onDismiss]);
|
|
3701
|
-
const actionsContent =
|
|
3061
|
+
const actionsContent = React4.useMemo(() => {
|
|
3702
3062
|
if (actionsSlot) return actionsSlot;
|
|
3703
3063
|
if (!actions || actions.length === 0) return null;
|
|
3704
3064
|
return actions.map((action, index) => {
|
|
@@ -3726,7 +3086,7 @@ function BannerAnnouncementDismissible({
|
|
|
3726
3086
|
);
|
|
3727
3087
|
});
|
|
3728
3088
|
}, [actions, actionsSlot]);
|
|
3729
|
-
const iconContent =
|
|
3089
|
+
const iconContent = React4.useMemo(() => {
|
|
3730
3090
|
if (icon) return icon;
|
|
3731
3091
|
if (!iconName) return null;
|
|
3732
3092
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3738,11 +3098,11 @@ function BannerAnnouncementDismissible({
|
|
|
3738
3098
|
}
|
|
3739
3099
|
);
|
|
3740
3100
|
}, [icon, iconName, iconClassName]);
|
|
3741
|
-
const dismissIconContent =
|
|
3101
|
+
const dismissIconContent = React4.useMemo(() => {
|
|
3742
3102
|
if (dismissIcon) return dismissIcon;
|
|
3743
3103
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "mynaui/x", size: 16 });
|
|
3744
3104
|
}, [dismissIcon]);
|
|
3745
|
-
const messageContent =
|
|
3105
|
+
const messageContent = React4.useMemo(() => {
|
|
3746
3106
|
if (!message) return null;
|
|
3747
3107
|
return typeof message === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-medium text-sm", messageClassName), children: message }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: messageClassName, children: message });
|
|
3748
3108
|
}, [message, messageClassName]);
|
|
@@ -3788,12 +3148,12 @@ function BannerCountdownSale({
|
|
|
3788
3148
|
separatorClassName
|
|
3789
3149
|
}) {
|
|
3790
3150
|
const targetTime = endTime;
|
|
3791
|
-
const [timeLeft, setTimeLeft] =
|
|
3151
|
+
const [timeLeft, setTimeLeft] = React4.useState({
|
|
3792
3152
|
hours: 0,
|
|
3793
3153
|
minutes: 0,
|
|
3794
3154
|
seconds: 0
|
|
3795
3155
|
});
|
|
3796
|
-
|
|
3156
|
+
React4.useEffect(() => {
|
|
3797
3157
|
if (!targetTime) {
|
|
3798
3158
|
return;
|
|
3799
3159
|
}
|
|
@@ -3816,8 +3176,8 @@ function BannerCountdownSale({
|
|
|
3816
3176
|
}, 1e3);
|
|
3817
3177
|
return () => clearInterval(timer);
|
|
3818
3178
|
}, [targetTime]);
|
|
3819
|
-
const pad =
|
|
3820
|
-
const timerContent =
|
|
3179
|
+
const pad = React4.useCallback((n) => n.toString().padStart(2, "0"), []);
|
|
3180
|
+
const timerContent = React4.useMemo(() => {
|
|
3821
3181
|
if (timerSlot) return timerSlot;
|
|
3822
3182
|
if (renderTimer) return renderTimer(timeLeft);
|
|
3823
3183
|
if (!targetTime) return null;
|
|
@@ -3829,11 +3189,11 @@ function BannerCountdownSale({
|
|
|
3829
3189
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("rounded bg-destructive px-2 py-0.5", timeUnitClassName), children: pad(timeLeft.seconds) })
|
|
3830
3190
|
] });
|
|
3831
3191
|
}, [timerSlot, renderTimer, timeLeft, timerClassName, timeUnitClassName, separatorClassName, pad, targetTime]);
|
|
3832
|
-
const messageContent =
|
|
3192
|
+
const messageContent = React4.useMemo(() => {
|
|
3833
3193
|
if (!message) return null;
|
|
3834
3194
|
return typeof message === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-medium", messageClassName), children: message }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: messageClassName, children: message });
|
|
3835
3195
|
}, [message, messageClassName]);
|
|
3836
|
-
const descriptionContent =
|
|
3196
|
+
const descriptionContent = React4.useMemo(() => {
|
|
3837
3197
|
if (!description) return null;
|
|
3838
3198
|
return typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-destructive-foreground", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: descriptionClassName, children: description });
|
|
3839
3199
|
}, [description, descriptionClassName]);
|
|
@@ -3862,12 +3222,12 @@ function BannerDeliveryCountdown({
|
|
|
3862
3222
|
deliveryDateClassName
|
|
3863
3223
|
}) {
|
|
3864
3224
|
const targetTime = cutoffTime;
|
|
3865
|
-
const [timeLeft, setTimeLeft] =
|
|
3225
|
+
const [timeLeft, setTimeLeft] = React4.useState({
|
|
3866
3226
|
hours: 0,
|
|
3867
3227
|
minutes: 0,
|
|
3868
3228
|
seconds: 0
|
|
3869
3229
|
});
|
|
3870
|
-
|
|
3230
|
+
React4.useEffect(() => {
|
|
3871
3231
|
if (!targetTime) {
|
|
3872
3232
|
return;
|
|
3873
3233
|
}
|
|
@@ -3890,13 +3250,13 @@ function BannerDeliveryCountdown({
|
|
|
3890
3250
|
}, 1e3);
|
|
3891
3251
|
return () => clearInterval(timer);
|
|
3892
3252
|
}, [targetTime]);
|
|
3893
|
-
const pad =
|
|
3894
|
-
const iconContent =
|
|
3253
|
+
const pad = React4.useCallback((n) => n.toString().padStart(2, "0"), []);
|
|
3254
|
+
const iconContent = React4.useMemo(() => {
|
|
3895
3255
|
if (icon) return icon;
|
|
3896
3256
|
if (!iconName) return null;
|
|
3897
3257
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: iconName, size: 16, className: iconClassName });
|
|
3898
3258
|
}, [icon, iconName, iconClassName]);
|
|
3899
|
-
const timerContent =
|
|
3259
|
+
const timerContent = React4.useMemo(() => {
|
|
3900
3260
|
if (timerSlot) return timerSlot;
|
|
3901
3261
|
if (renderTimer) return renderTimer(timeLeft);
|
|
3902
3262
|
if (!targetTime) return null;
|
|
@@ -3908,18 +3268,18 @@ function BannerDeliveryCountdown({
|
|
|
3908
3268
|
pad(timeLeft.seconds)
|
|
3909
3269
|
] });
|
|
3910
3270
|
}, [timerSlot, renderTimer, timeLeft, timerClassName, pad, targetTime]);
|
|
3911
|
-
const deliveryDateContent =
|
|
3271
|
+
const deliveryDateContent = React4.useMemo(() => {
|
|
3912
3272
|
if (!deliveryDate) return null;
|
|
3913
3273
|
return typeof deliveryDate === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-semibold", deliveryDateClassName), children: deliveryDate }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: deliveryDateClassName, children: deliveryDate });
|
|
3914
3274
|
}, [deliveryDate, deliveryDateClassName]);
|
|
3915
|
-
const messageParts =
|
|
3275
|
+
const messageParts = React4.useMemo(() => {
|
|
3916
3276
|
return [prefixText, timerContent, middleText, deliveryDateContent].filter(
|
|
3917
3277
|
(part) => part !== null && part !== void 0
|
|
3918
3278
|
);
|
|
3919
3279
|
}, [prefixText, timerContent, middleText, deliveryDateContent]);
|
|
3920
3280
|
return /* @__PURE__ */ jsxRuntime.jsx(Section, { background, spacing: "none", className: cn("bg-accent text-accent-foreground", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("container py-2.5", containerClassName), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-wrap items-center justify-center gap-3 text-sm", contentClassName), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-2", messageClassName), children: [
|
|
3921
3281
|
iconContent,
|
|
3922
|
-
messageParts.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { children: messageParts.map((part, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3282
|
+
messageParts.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { children: messageParts.map((part, index) => /* @__PURE__ */ jsxRuntime.jsxs(React4__namespace.Fragment, { children: [
|
|
3923
3283
|
index > 0 ? " " : null,
|
|
3924
3284
|
part
|
|
3925
3285
|
] }, index)) })
|
|
@@ -3941,7 +3301,7 @@ function BannerEventPromo({
|
|
|
3941
3301
|
eventDetailsClassName,
|
|
3942
3302
|
actionsClassName
|
|
3943
3303
|
}) {
|
|
3944
|
-
const actionsContent =
|
|
3304
|
+
const actionsContent = React4.useMemo(() => {
|
|
3945
3305
|
if (actionsSlot) return actionsSlot;
|
|
3946
3306
|
if (!actions || actions.length === 0) return null;
|
|
3947
3307
|
return actions.map((action, index) => {
|
|
@@ -3969,7 +3329,7 @@ function BannerEventPromo({
|
|
|
3969
3329
|
);
|
|
3970
3330
|
});
|
|
3971
3331
|
}, [actions, actionsSlot]);
|
|
3972
|
-
const separatorContent =
|
|
3332
|
+
const separatorContent = React4.useMemo(() => {
|
|
3973
3333
|
if (separator) return separator;
|
|
3974
3334
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3975
3335
|
"svg",
|
|
@@ -3981,11 +3341,11 @@ function BannerEventPromo({
|
|
|
3981
3341
|
}
|
|
3982
3342
|
);
|
|
3983
3343
|
}, [separator, separatorClassName]);
|
|
3984
|
-
const eventNameContent =
|
|
3344
|
+
const eventNameContent = React4.useMemo(() => {
|
|
3985
3345
|
if (!eventName) return null;
|
|
3986
3346
|
return typeof eventName === "string" ? /* @__PURE__ */ jsxRuntime.jsx("strong", { className: cn("font-semibold", eventNameClassName), children: eventName }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: eventNameClassName, children: eventName });
|
|
3987
3347
|
}, [eventName, eventNameClassName]);
|
|
3988
|
-
const eventDetailsContent =
|
|
3348
|
+
const eventDetailsContent = React4.useMemo(() => {
|
|
3989
3349
|
if (!eventDetails) return null;
|
|
3990
3350
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: eventDetailsClassName, children: eventDetails });
|
|
3991
3351
|
}, [eventDetails, eventDetailsClassName]);
|
|
@@ -4022,22 +3382,22 @@ function BannerFloatingOffer({
|
|
|
4022
3382
|
}) {
|
|
4023
3383
|
const isControlled = open !== void 0;
|
|
4024
3384
|
const initialOpen = defaultOpen ?? true;
|
|
4025
|
-
const [internalOpen, setInternalOpen] =
|
|
3385
|
+
const [internalOpen, setInternalOpen] = React4.useState(initialOpen);
|
|
4026
3386
|
const isVisible = isControlled ? open : internalOpen;
|
|
4027
3387
|
const dismissLabel = dismissAriaLabel ?? "Dismiss banner";
|
|
4028
3388
|
const isDismissible = dismissible ?? false;
|
|
4029
|
-
|
|
3389
|
+
React4.useEffect(() => {
|
|
4030
3390
|
if (!isControlled && defaultOpen !== internalOpen) {
|
|
4031
3391
|
setInternalOpen(initialOpen);
|
|
4032
3392
|
}
|
|
4033
3393
|
}, [defaultOpen, initialOpen, isControlled, internalOpen]);
|
|
4034
|
-
const handleDismiss =
|
|
3394
|
+
const handleDismiss = React4.useCallback(() => {
|
|
4035
3395
|
if (!isControlled) {
|
|
4036
3396
|
setInternalOpen(false);
|
|
4037
3397
|
}
|
|
4038
3398
|
onOpenChange?.(false);
|
|
4039
3399
|
}, [isControlled, onOpenChange]);
|
|
4040
|
-
const actionsContent =
|
|
3400
|
+
const actionsContent = React4.useMemo(() => {
|
|
4041
3401
|
if (actionsSlot) return actionsSlot;
|
|
4042
3402
|
if (!actions || actions.length === 0) return null;
|
|
4043
3403
|
return actions.map((action, index) => {
|
|
@@ -4065,7 +3425,7 @@ function BannerFloatingOffer({
|
|
|
4065
3425
|
);
|
|
4066
3426
|
});
|
|
4067
3427
|
}, [actions, actionsSlot]);
|
|
4068
|
-
const separatorContent =
|
|
3428
|
+
const separatorContent = React4.useMemo(() => {
|
|
4069
3429
|
if (separator) return separator;
|
|
4070
3430
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4071
3431
|
"svg",
|
|
@@ -4077,15 +3437,15 @@ function BannerFloatingOffer({
|
|
|
4077
3437
|
}
|
|
4078
3438
|
);
|
|
4079
3439
|
}, [separator, separatorClassName]);
|
|
4080
|
-
const dismissIconContent =
|
|
3440
|
+
const dismissIconContent = React4.useMemo(() => {
|
|
4081
3441
|
if (dismissIcon) return dismissIcon;
|
|
4082
3442
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "mynaui/x", size: 16 });
|
|
4083
3443
|
}, [dismissIcon]);
|
|
4084
|
-
const offerTitleContent =
|
|
3444
|
+
const offerTitleContent = React4.useMemo(() => {
|
|
4085
3445
|
if (!offerTitle) return null;
|
|
4086
3446
|
return typeof offerTitle === "string" ? /* @__PURE__ */ jsxRuntime.jsx("strong", { className: cn("font-semibold", offerTitleClassName), children: offerTitle }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: offerTitleClassName, children: offerTitle });
|
|
4087
3447
|
}, [offerTitle, offerTitleClassName]);
|
|
4088
|
-
const offerDescriptionContent =
|
|
3448
|
+
const offerDescriptionContent = React4.useMemo(() => {
|
|
4089
3449
|
if (!offerDescription) return null;
|
|
4090
3450
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: offerDescriptionClassName, children: offerDescription });
|
|
4091
3451
|
}, [offerDescription, offerDescriptionClassName]);
|
|
@@ -4146,13 +3506,13 @@ function BannerGdprRights({
|
|
|
4146
3506
|
actionsClassName,
|
|
4147
3507
|
dismissButtonClassName
|
|
4148
3508
|
}) {
|
|
4149
|
-
const [isVisible, setIsVisible] =
|
|
3509
|
+
const [isVisible, setIsVisible] = React4.useState(true);
|
|
4150
3510
|
const dismissLabel = dismissAriaLabel ?? "Dismiss banner";
|
|
4151
|
-
const handleDismiss =
|
|
3511
|
+
const handleDismiss = React4.useCallback(() => {
|
|
4152
3512
|
setIsVisible(false);
|
|
4153
3513
|
onDismiss?.();
|
|
4154
3514
|
}, [onDismiss]);
|
|
4155
|
-
const iconContent =
|
|
3515
|
+
const iconContent = React4.useMemo(() => {
|
|
4156
3516
|
if (icon) return icon;
|
|
4157
3517
|
if (!iconName) return null;
|
|
4158
3518
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4164,7 +3524,7 @@ function BannerGdprRights({
|
|
|
4164
3524
|
}
|
|
4165
3525
|
);
|
|
4166
3526
|
}, [icon, iconName, iconClassName]);
|
|
4167
|
-
const actionsContent =
|
|
3527
|
+
const actionsContent = React4.useMemo(() => {
|
|
4168
3528
|
if (actionsSlot) return actionsSlot;
|
|
4169
3529
|
if (!actions || actions.length === 0) return null;
|
|
4170
3530
|
return actions.map((action, index) => {
|
|
@@ -4191,15 +3551,15 @@ function BannerGdprRights({
|
|
|
4191
3551
|
);
|
|
4192
3552
|
});
|
|
4193
3553
|
}, [actions, actionsSlot]);
|
|
4194
|
-
const dismissIconContent =
|
|
3554
|
+
const dismissIconContent = React4.useMemo(() => {
|
|
4195
3555
|
if (dismissIcon) return dismissIcon;
|
|
4196
3556
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "mynaui/x", size: 16 });
|
|
4197
3557
|
}, [dismissIcon]);
|
|
4198
|
-
const titleContent =
|
|
3558
|
+
const titleContent = React4.useMemo(() => {
|
|
4199
3559
|
if (!title) return null;
|
|
4200
3560
|
return typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: cn("font-semibold text-sm", titleClassName), children: title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: titleClassName, children: title });
|
|
4201
3561
|
}, [title, titleClassName]);
|
|
4202
|
-
const descriptionContent =
|
|
3562
|
+
const descriptionContent = React4.useMemo(() => {
|
|
4203
3563
|
if (!description && !actionsContent) return null;
|
|
4204
3564
|
return /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cn("text-sm text-muted-foreground mt-1", descriptionClassName), children: [
|
|
4205
3565
|
description,
|
|
@@ -4253,13 +3613,13 @@ function BannerPrivacyNotice({
|
|
|
4253
3613
|
actionsClassName,
|
|
4254
3614
|
dismissButtonClassName
|
|
4255
3615
|
}) {
|
|
4256
|
-
const [isVisible, setIsVisible] =
|
|
3616
|
+
const [isVisible, setIsVisible] = React4.useState(true);
|
|
4257
3617
|
const dismissLabel = dismissAriaLabel ?? "Dismiss banner";
|
|
4258
|
-
const handleDismiss =
|
|
3618
|
+
const handleDismiss = React4.useCallback(() => {
|
|
4259
3619
|
setIsVisible(false);
|
|
4260
3620
|
onDismiss?.();
|
|
4261
3621
|
}, [onDismiss]);
|
|
4262
|
-
const iconContent =
|
|
3622
|
+
const iconContent = React4.useMemo(() => {
|
|
4263
3623
|
if (icon) return icon;
|
|
4264
3624
|
if (!iconName) return null;
|
|
4265
3625
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4271,7 +3631,7 @@ function BannerPrivacyNotice({
|
|
|
4271
3631
|
}
|
|
4272
3632
|
);
|
|
4273
3633
|
}, [icon, iconName, iconClassName]);
|
|
4274
|
-
const actionsContent =
|
|
3634
|
+
const actionsContent = React4.useMemo(() => {
|
|
4275
3635
|
if (actionsSlot) return actionsSlot;
|
|
4276
3636
|
if (!actions || actions.length === 0) return null;
|
|
4277
3637
|
return actions.map((action, index) => {
|
|
@@ -4298,15 +3658,15 @@ function BannerPrivacyNotice({
|
|
|
4298
3658
|
);
|
|
4299
3659
|
});
|
|
4300
3660
|
}, [actions, actionsSlot]);
|
|
4301
|
-
const dismissIconContent =
|
|
3661
|
+
const dismissIconContent = React4.useMemo(() => {
|
|
4302
3662
|
if (dismissIcon) return dismissIcon;
|
|
4303
3663
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "mynaui/x", size: 16 });
|
|
4304
3664
|
}, [dismissIcon]);
|
|
4305
|
-
const titleContent =
|
|
3665
|
+
const titleContent = React4.useMemo(() => {
|
|
4306
3666
|
if (!title) return null;
|
|
4307
3667
|
return typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: cn("font-semibold text-sm", titleClassName), children: title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: titleClassName, children: title });
|
|
4308
3668
|
}, [title, titleClassName]);
|
|
4309
|
-
const descriptionContent =
|
|
3669
|
+
const descriptionContent = React4.useMemo(() => {
|
|
4310
3670
|
if (!description) return null;
|
|
4311
3671
|
return typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-sm text-muted-foreground mt-1", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-sm text-muted-foreground mt-1", descriptionClassName), children: description });
|
|
4312
3672
|
}, [description, descriptionClassName]);
|
|
@@ -4353,7 +3713,7 @@ function BannerPromoCta({
|
|
|
4353
3713
|
discountClassName,
|
|
4354
3714
|
actionsClassName
|
|
4355
3715
|
}) {
|
|
4356
|
-
const actionsContent =
|
|
3716
|
+
const actionsContent = React4.useMemo(() => {
|
|
4357
3717
|
if (actionsSlot) return actionsSlot;
|
|
4358
3718
|
if (!actions || actions.length === 0) return null;
|
|
4359
3719
|
return actions.map((action, index) => {
|
|
@@ -4380,15 +3740,15 @@ function BannerPromoCta({
|
|
|
4380
3740
|
);
|
|
4381
3741
|
});
|
|
4382
3742
|
}, [actions, actionsSlot]);
|
|
4383
|
-
const separatorContent =
|
|
3743
|
+
const separatorContent = React4.useMemo(() => {
|
|
4384
3744
|
if (separator) return separator;
|
|
4385
3745
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("hidden sm:inline", separatorClassName), children: "\xB7" });
|
|
4386
3746
|
}, [separator, separatorClassName]);
|
|
4387
|
-
const messageContent =
|
|
3747
|
+
const messageContent = React4.useMemo(() => {
|
|
4388
3748
|
if (!message) return null;
|
|
4389
3749
|
return typeof message === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-semibold", messageClassName), children: message }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: messageClassName, children: message });
|
|
4390
3750
|
}, [message, messageClassName]);
|
|
4391
|
-
const discountContent =
|
|
3751
|
+
const discountContent = React4.useMemo(() => {
|
|
4392
3752
|
if (!discount) return null;
|
|
4393
3753
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: discountClassName, children: discount });
|
|
4394
3754
|
}, [discount, discountClassName]);
|
|
@@ -4416,13 +3776,13 @@ function BannerSocialFollow({
|
|
|
4416
3776
|
actionsClassName,
|
|
4417
3777
|
dismissButtonClassName
|
|
4418
3778
|
}) {
|
|
4419
|
-
const [isVisible, setIsVisible] =
|
|
3779
|
+
const [isVisible, setIsVisible] = React4.useState(true);
|
|
4420
3780
|
const dismissLabel = dismissAriaLabel ?? "Dismiss banner";
|
|
4421
|
-
const handleDismiss =
|
|
3781
|
+
const handleDismiss = React4.useCallback(() => {
|
|
4422
3782
|
setIsVisible(false);
|
|
4423
3783
|
onDismiss?.();
|
|
4424
3784
|
}, [onDismiss]);
|
|
4425
|
-
const iconContent =
|
|
3785
|
+
const iconContent = React4.useMemo(() => {
|
|
4426
3786
|
if (icon) return icon;
|
|
4427
3787
|
if (!iconName) return null;
|
|
4428
3788
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4434,7 +3794,7 @@ function BannerSocialFollow({
|
|
|
4434
3794
|
}
|
|
4435
3795
|
);
|
|
4436
3796
|
}, [icon, iconName, iconClassName]);
|
|
4437
|
-
const actionsContent =
|
|
3797
|
+
const actionsContent = React4.useMemo(() => {
|
|
4438
3798
|
if (actionsSlot) return actionsSlot;
|
|
4439
3799
|
if (!actions || actions.length === 0) return null;
|
|
4440
3800
|
return actions.map((action, index) => {
|
|
@@ -4462,11 +3822,11 @@ function BannerSocialFollow({
|
|
|
4462
3822
|
);
|
|
4463
3823
|
});
|
|
4464
3824
|
}, [actions, actionsSlot]);
|
|
4465
|
-
const dismissIconContent =
|
|
3825
|
+
const dismissIconContent = React4.useMemo(() => {
|
|
4466
3826
|
if (dismissIcon) return dismissIcon;
|
|
4467
3827
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "mynaui/x", size: 16 });
|
|
4468
3828
|
}, [dismissIcon]);
|
|
4469
|
-
const messageContent =
|
|
3829
|
+
const messageContent = React4.useMemo(() => {
|
|
4470
3830
|
if (!message) return null;
|
|
4471
3831
|
return typeof message === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-medium", messageClassName), children: message }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: messageClassName, children: message });
|
|
4472
3832
|
}, [message, messageClassName]);
|
|
@@ -4514,13 +3874,13 @@ function BannerSurveyIncentive({
|
|
|
4514
3874
|
actionsClassName,
|
|
4515
3875
|
dismissButtonClassName
|
|
4516
3876
|
}) {
|
|
4517
|
-
const [isVisible, setIsVisible] =
|
|
3877
|
+
const [isVisible, setIsVisible] = React4.useState(true);
|
|
4518
3878
|
const dismissLabel = dismissAriaLabel ?? "Dismiss banner";
|
|
4519
|
-
const handleDismiss =
|
|
3879
|
+
const handleDismiss = React4.useCallback(() => {
|
|
4520
3880
|
setIsVisible(false);
|
|
4521
3881
|
onDismiss?.();
|
|
4522
3882
|
}, [onDismiss]);
|
|
4523
|
-
const iconContent =
|
|
3883
|
+
const iconContent = React4.useMemo(() => {
|
|
4524
3884
|
if (icon) return icon;
|
|
4525
3885
|
if (!iconName) return null;
|
|
4526
3886
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4532,7 +3892,7 @@ function BannerSurveyIncentive({
|
|
|
4532
3892
|
}
|
|
4533
3893
|
);
|
|
4534
3894
|
}, [icon, iconName, iconClassName]);
|
|
4535
|
-
const actionsContent =
|
|
3895
|
+
const actionsContent = React4.useMemo(() => {
|
|
4536
3896
|
if (actionsSlot) return actionsSlot;
|
|
4537
3897
|
if (!actions || actions.length === 0) return null;
|
|
4538
3898
|
return actions.map((action, index) => {
|
|
@@ -4560,15 +3920,15 @@ function BannerSurveyIncentive({
|
|
|
4560
3920
|
);
|
|
4561
3921
|
});
|
|
4562
3922
|
}, [actions, actionsSlot]);
|
|
4563
|
-
const dismissIconContent =
|
|
3923
|
+
const dismissIconContent = React4.useMemo(() => {
|
|
4564
3924
|
if (dismissIcon) return dismissIcon;
|
|
4565
3925
|
return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "mynaui/x", size: 16 });
|
|
4566
3926
|
}, [dismissIcon]);
|
|
4567
|
-
const titleContent =
|
|
3927
|
+
const titleContent = React4.useMemo(() => {
|
|
4568
3928
|
if (!title) return null;
|
|
4569
3929
|
return typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-medium", titleClassName), children: title }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: titleClassName, children: title });
|
|
4570
3930
|
}, [title, titleClassName]);
|
|
4571
|
-
const descriptionContent =
|
|
3931
|
+
const descriptionContent = React4.useMemo(() => {
|
|
4572
3932
|
if (!description) return null;
|
|
4573
3933
|
return typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-muted-foreground", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: descriptionClassName, children: description });
|
|
4574
3934
|
}, [description, descriptionClassName]);
|
|
@@ -4678,7 +4038,7 @@ function FooterCopyright({
|
|
|
4678
4038
|
copyright,
|
|
4679
4039
|
className
|
|
4680
4040
|
}) {
|
|
4681
|
-
const currentYear =
|
|
4041
|
+
const currentYear = React4.useMemo(() => (/* @__PURE__ */ new Date()).getFullYear(), []);
|
|
4682
4042
|
if (!copyright) {
|
|
4683
4043
|
return null;
|
|
4684
4044
|
}
|
|
@@ -5190,8 +4550,8 @@ var BrandAttribution = ({
|
|
|
5190
4550
|
}
|
|
5191
4551
|
const { prefix = "", anchorText, href, suffix = "" } = options[optionIndex];
|
|
5192
4552
|
const ContainerEl = variant;
|
|
5193
|
-
const [trackedHref, setTrackedHref] =
|
|
5194
|
-
|
|
4553
|
+
const [trackedHref, setTrackedHref] = React4__namespace.useState(href);
|
|
4554
|
+
React4__namespace.useEffect(() => {
|
|
5195
4555
|
setTrackedHref(buildTrackedHref(href));
|
|
5196
4556
|
}, [href]);
|
|
5197
4557
|
return /* @__PURE__ */ jsxRuntime.jsxs(ContainerEl, { className: containerClassName, children: [
|
|
@@ -5311,7 +4671,7 @@ function FooterSocialNewsletter({
|
|
|
5311
4671
|
patternOpacity,
|
|
5312
4672
|
optixFlowConfig
|
|
5313
4673
|
}) {
|
|
5314
|
-
const renderForm =
|
|
4674
|
+
const renderForm = React4__namespace.useMemo(() => {
|
|
5315
4675
|
if (!formEngineSetup) return null;
|
|
5316
4676
|
const action = {
|
|
5317
4677
|
variant: "default",
|
|
@@ -5464,14 +4824,14 @@ function FooterSocialApps({
|
|
|
5464
4824
|
patternOpacity,
|
|
5465
4825
|
optixFlowConfig
|
|
5466
4826
|
}) {
|
|
5467
|
-
const sectionsContent =
|
|
4827
|
+
const sectionsContent = React4.useMemo(() => {
|
|
5468
4828
|
if (!sections || sections.length === 0) return null;
|
|
5469
4829
|
return sections.map((section, sectionIdx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 md:mt-0", children: [
|
|
5470
4830
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-4 font-bold", children: section.title }),
|
|
5471
4831
|
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-4", children: section.links.map((link, linkIdx) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "font-medium ", children: /* @__PURE__ */ jsxRuntime.jsx(Pressable, { href: link.href, children: link.name }) }, linkIdx)) })
|
|
5472
4832
|
] }, sectionIdx));
|
|
5473
4833
|
}, [sections]);
|
|
5474
|
-
const socialLinksContent =
|
|
4834
|
+
const socialLinksContent = React4.useMemo(() => {
|
|
5475
4835
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
5476
4836
|
return socialLinks.map((social, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "font-medium", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5477
4837
|
SocialLinkIcon,
|
|
@@ -5486,7 +4846,7 @@ function FooterSocialApps({
|
|
|
5486
4846
|
}
|
|
5487
4847
|
) }, idx));
|
|
5488
4848
|
}, [socialLinks, background]);
|
|
5489
|
-
const appLinksContent =
|
|
4849
|
+
const appLinksContent = React4.useMemo(() => {
|
|
5490
4850
|
if (!appLinks || appLinks.length === 0) return null;
|
|
5491
4851
|
return appLinks.map((app, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "font-medium", children: /* @__PURE__ */ jsxRuntime.jsx(Pressable, { href: app.href, "aria-label": app.label, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5492
4852
|
"span",
|
|
@@ -5575,7 +4935,7 @@ function FooterSimpleCentered({
|
|
|
5575
4935
|
patternOpacity,
|
|
5576
4936
|
optixFlowConfig
|
|
5577
4937
|
}) {
|
|
5578
|
-
const sitemapContent =
|
|
4938
|
+
const sitemapContent = React4.useMemo(() => {
|
|
5579
4939
|
if (!sitemap || sitemap.length === 0) return null;
|
|
5580
4940
|
return sitemap.map((section) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(sitemapSectionClassName), children: [
|
|
5581
4941
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: cn("mb-4 text-sm font-semibold", sitemapTitleClassName), children: section.title }),
|
|
@@ -5598,9 +4958,9 @@ function FooterSimpleCentered({
|
|
|
5598
4958
|
sitemapLinksClassName,
|
|
5599
4959
|
sitemapLinkClassName
|
|
5600
4960
|
]);
|
|
5601
|
-
const bottomLinksContent =
|
|
4961
|
+
const bottomLinksContent = React4.useMemo(() => {
|
|
5602
4962
|
if (!bottomLinks || bottomLinks.length === 0) return null;
|
|
5603
|
-
return bottomLinks.map((link, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4963
|
+
return bottomLinks.map((link, idx) => /* @__PURE__ */ jsxRuntime.jsx(React4__namespace.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5604
4964
|
Pressable,
|
|
5605
4965
|
{
|
|
5606
4966
|
href: link.href,
|
|
@@ -5925,7 +5285,7 @@ function FooterNewsletterGrid({
|
|
|
5925
5285
|
patternOpacity,
|
|
5926
5286
|
optixFlowConfig
|
|
5927
5287
|
}) {
|
|
5928
|
-
const sectionsContent =
|
|
5288
|
+
const sectionsContent = React4.useMemo(() => {
|
|
5929
5289
|
if (!sections || sections.length === 0) return null;
|
|
5930
5290
|
return sections.map((section, sectionIdx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-2 md:col-span-1", children: [
|
|
5931
5291
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-5 font-medium", children: section.title }),
|
|
@@ -5939,7 +5299,7 @@ function FooterNewsletterGrid({
|
|
|
5939
5299
|
)) })
|
|
5940
5300
|
] }, sectionIdx));
|
|
5941
5301
|
}, [sections]);
|
|
5942
|
-
const socialLinksContent =
|
|
5302
|
+
const socialLinksContent = React4.useMemo(() => {
|
|
5943
5303
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
5944
5304
|
return socialLinks.map((social, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5945
5305
|
SocialLinkIcon,
|
|
@@ -6455,7 +5815,7 @@ function FooterBackgroundCard({
|
|
|
6455
5815
|
patternOpacity,
|
|
6456
5816
|
optixFlowConfig
|
|
6457
5817
|
}) {
|
|
6458
|
-
const sectionStyle =
|
|
5818
|
+
const sectionStyle = React4.useMemo(
|
|
6459
5819
|
() => backgroundImage ? { backgroundImage: `url('${backgroundImage}')` } : void 0,
|
|
6460
5820
|
[backgroundImage]
|
|
6461
5821
|
);
|
|
@@ -6729,7 +6089,7 @@ function FooterAnimatedSocial({
|
|
|
6729
6089
|
pattern,
|
|
6730
6090
|
patternOpacity
|
|
6731
6091
|
}) {
|
|
6732
|
-
const socialLinksContent =
|
|
6092
|
+
const socialLinksContent = React4.useMemo(() => {
|
|
6733
6093
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
6734
6094
|
return socialLinks.map((link, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6735
6095
|
framerMotion.motion.div,
|
|
@@ -6947,7 +6307,7 @@ function FooterNewsletterMinimal({
|
|
|
6947
6307
|
buttonAction,
|
|
6948
6308
|
formSlot
|
|
6949
6309
|
}) {
|
|
6950
|
-
const navLinksContent =
|
|
6310
|
+
const navLinksContent = React4__namespace.useMemo(() => {
|
|
6951
6311
|
if (!navLinks || navLinks.length === 0) return null;
|
|
6952
6312
|
return navLinks.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6953
6313
|
Pressable,
|
|
@@ -6958,7 +6318,7 @@ function FooterNewsletterMinimal({
|
|
|
6958
6318
|
}
|
|
6959
6319
|
) }, idx));
|
|
6960
6320
|
}, [navLinks, navLinkClassName]);
|
|
6961
|
-
const socialLinksContent =
|
|
6321
|
+
const socialLinksContent = React4__namespace.useMemo(() => {
|
|
6962
6322
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
6963
6323
|
return socialLinks.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6964
6324
|
SocialLinkIcon,
|
|
@@ -6974,7 +6334,7 @@ function FooterNewsletterMinimal({
|
|
|
6974
6334
|
}
|
|
6975
6335
|
) }, idx));
|
|
6976
6336
|
}, [socialLinks, socialLinkClassName]);
|
|
6977
|
-
const footerLinksContent =
|
|
6337
|
+
const footerLinksContent = React4__namespace.useMemo(() => {
|
|
6978
6338
|
if (!footerLinks || footerLinks.length === 0) return null;
|
|
6979
6339
|
return footerLinks.map((item) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6980
6340
|
Pressable,
|
|
@@ -6988,7 +6348,7 @@ function FooterNewsletterMinimal({
|
|
|
6988
6348
|
}
|
|
6989
6349
|
) }, item.label));
|
|
6990
6350
|
}, [footerLinks, footerLinkClassName]);
|
|
6991
|
-
const renderForm =
|
|
6351
|
+
const renderForm = React4__namespace.useMemo(() => {
|
|
6992
6352
|
if (formSlot) return formSlot;
|
|
6993
6353
|
if (!formEngineSetup) return null;
|
|
6994
6354
|
const defaultButtonAction = {
|
|
@@ -7223,7 +6583,7 @@ function FooterCtaSocial({
|
|
|
7223
6583
|
pattern,
|
|
7224
6584
|
patternOpacity
|
|
7225
6585
|
}) {
|
|
7226
|
-
const socialLinksContent =
|
|
6586
|
+
const socialLinksContent = React4.useMemo(() => {
|
|
7227
6587
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
7228
6588
|
return socialLinks.map((link) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7229
6589
|
SocialLinkIcon,
|
|
@@ -7341,7 +6701,7 @@ function FooterNavSocial({
|
|
|
7341
6701
|
patternOpacity,
|
|
7342
6702
|
optixFlowConfig
|
|
7343
6703
|
}) {
|
|
7344
|
-
const sectionsContent =
|
|
6704
|
+
const sectionsContent = React4.useMemo(() => {
|
|
7345
6705
|
if (!sections || sections.length === 0) return null;
|
|
7346
6706
|
return sections.map((section, sectionIdx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(navSectionClassName), children: [
|
|
7347
6707
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: cn("mb-4 font-semibold", navTitleClassName), children: section.title }),
|
|
@@ -7354,7 +6714,7 @@ function FooterNavSocial({
|
|
|
7354
6714
|
navLinksClassName,
|
|
7355
6715
|
navLinkClassName
|
|
7356
6716
|
]);
|
|
7357
|
-
const socialLinksContent =
|
|
6717
|
+
const socialLinksContent = React4.useMemo(() => {
|
|
7358
6718
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
7359
6719
|
return socialLinks.map((social, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7360
6720
|
SocialLinkIcon,
|
|
@@ -7369,7 +6729,7 @@ function FooterNavSocial({
|
|
|
7369
6729
|
}
|
|
7370
6730
|
) }, idx));
|
|
7371
6731
|
}, [socialLinks, socialLinkClassName]);
|
|
7372
|
-
const legalLinksContent =
|
|
6732
|
+
const legalLinksContent = React4.useMemo(() => {
|
|
7373
6733
|
if (!legalLinks || legalLinks.length === 0) return null;
|
|
7374
6734
|
return legalLinks.map((link, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: cn(legalLinkClassName), children: /* @__PURE__ */ jsxRuntime.jsx(Pressable, { href: link.href, className: "hover:opacity-100", children: link.name }) }, idx));
|
|
7375
6735
|
}, [legalLinks, legalLinkClassName]);
|
|
@@ -7576,7 +6936,6 @@ exports.FooterNewsletterMinimal = FooterNewsletterMinimal;
|
|
|
7576
6936
|
exports.FooterSimpleCentered = FooterSimpleCentered;
|
|
7577
6937
|
exports.FooterSocialApps = FooterSocialApps;
|
|
7578
6938
|
exports.FooterSocialNewsletter = FooterSocialNewsletter;
|
|
7579
|
-
exports.GeoMap = GeoMap;
|
|
7580
6939
|
exports.ImageSlider = ImageSlider;
|
|
7581
6940
|
exports.MediaHoverCtas = MediaHoverCtas;
|
|
7582
6941
|
exports.PageHeroBanner = PageHeroBanner;
|