@windrun-huaiin/third-ui 5.14.2 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/clerk/index.d.mts +2 -21
- package/dist/clerk/index.d.ts +2 -21
- package/dist/clerk/index.js +5 -2884
- package/dist/clerk/index.js.map +1 -1
- package/dist/clerk/index.mjs +3 -2872
- package/dist/clerk/index.mjs.map +1 -1
- package/dist/clerk/server.d.mts +28 -0
- package/dist/clerk/server.d.ts +28 -0
- package/dist/clerk/server.js +3025 -0
- package/dist/clerk/server.js.map +1 -0
- package/dist/clerk/server.mjs +2991 -0
- package/dist/clerk/server.mjs.map +1 -0
- package/dist/fuma/mdx/index.d.mts +1 -12
- package/dist/fuma/mdx/index.d.ts +1 -12
- package/dist/fuma/mdx/index.js +47 -262
- package/dist/fuma/mdx/index.js.map +1 -1
- package/dist/fuma/mdx/index.mjs +48 -261
- package/dist/fuma/mdx/index.mjs.map +1 -1
- package/dist/fuma/server.d.mts +15 -2
- package/dist/fuma/server.d.ts +15 -2
- package/dist/fuma/server.js +234 -49
- package/dist/fuma/server.js.map +1 -1
- package/dist/fuma/server.mjs +231 -48
- package/dist/fuma/server.mjs.map +1 -1
- package/dist/lib/server.d.mts +509 -465
- package/dist/lib/server.d.ts +509 -465
- package/dist/main/index.d.mts +5 -56
- package/dist/main/index.d.ts +5 -56
- package/dist/main/index.js +646 -1322
- package/dist/main/index.js.map +1 -1
- package/dist/main/index.mjs +675 -1342
- package/dist/main/index.mjs.map +1 -1
- package/dist/main/server.d.mts +64 -0
- package/dist/main/server.d.ts +64 -0
- package/dist/main/server.js +4166 -0
- package/dist/main/server.js.map +1 -0
- package/dist/main/server.mjs +4128 -0
- package/dist/main/server.mjs.map +1 -0
- package/package.json +12 -2
- package/src/clerk/clerk-organization-client.tsx +50 -0
- package/src/clerk/clerk-organization.tsx +21 -38
- package/src/clerk/clerk-page-generator.tsx +0 -2
- package/src/clerk/clerk-provider-client.tsx +1 -1
- package/src/clerk/clerk-user-client.tsx +64 -0
- package/src/clerk/clerk-user.tsx +29 -58
- package/src/clerk/index.ts +1 -4
- package/src/clerk/server.ts +3 -0
- package/src/fuma/{mdx/fuma-banner-suit.tsx → fuma-banner-suit.tsx} +5 -7
- package/src/fuma/mdx/banner.tsx +51 -52
- package/src/fuma/mdx/index.ts +0 -2
- package/src/fuma/mdx/toc-footer-wrapper.tsx +1 -0
- package/src/fuma/mdx/zia-file.tsx +0 -1
- package/src/fuma/server.ts +3 -1
- package/src/fuma/{mdx/site-x.tsx → site-x.tsx} +4 -5
- package/src/main/cta.tsx +33 -10
- package/src/main/faq-interactive.tsx +68 -0
- package/src/main/faq.tsx +62 -38
- package/src/main/features.tsx +40 -11
- package/src/main/footer.tsx +27 -16
- package/src/main/gallery-interactive.tsx +171 -0
- package/src/main/gallery.tsx +54 -101
- package/src/main/index.ts +1 -10
- package/src/main/language-detector.tsx +175 -0
- package/src/main/price-plan-interactive.tsx +273 -0
- package/src/main/price-plan.tsx +112 -129
- package/src/main/seo-content.tsx +46 -13
- package/src/main/server.ts +10 -0
- package/src/main/tips.tsx +48 -22
- package/src/main/usage.tsx +43 -11
package/dist/main/index.mjs
CHANGED
|
@@ -55,6 +55,9 @@ var __async = (__this, __arguments, generator) => {
|
|
|
55
55
|
});
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
+
// src/main/go-to-top.tsx
|
|
59
|
+
import { useState, useEffect } from "react";
|
|
60
|
+
|
|
58
61
|
// ../base-ui/src/assets/github.tsx
|
|
59
62
|
import React from "react";
|
|
60
63
|
|
|
@@ -2693,1112 +2696,220 @@ for (const [iconName, IconComponent] of Object.entries(BUILTIN_ICON_COMPONENTS))
|
|
|
2693
2696
|
}
|
|
2694
2697
|
var wrappedBuiltinIconsPart = tempWrappedBuiltinIcons;
|
|
2695
2698
|
var globalLucideIcons = __spreadValues(__spreadValues({}, styledLimitedIconsPart), wrappedBuiltinIconsPart);
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2699
|
+
|
|
2700
|
+
// src/main/go-to-top.tsx
|
|
2701
|
+
import { Fragment, jsx as jsx33 } from "react/jsx-runtime";
|
|
2702
|
+
function GoToTop() {
|
|
2703
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
2704
|
+
useEffect(() => {
|
|
2705
|
+
const toggleVisibility = () => {
|
|
2706
|
+
if (window.scrollY > 300) {
|
|
2707
|
+
setIsVisible(true);
|
|
2708
|
+
} else {
|
|
2709
|
+
setIsVisible(false);
|
|
2710
|
+
}
|
|
2711
|
+
};
|
|
2712
|
+
window.addEventListener("scroll", toggleVisibility);
|
|
2713
|
+
return () => window.removeEventListener("scroll", toggleVisibility);
|
|
2714
|
+
}, []);
|
|
2715
|
+
const scrollToTop = () => {
|
|
2716
|
+
window.scrollTo({
|
|
2717
|
+
top: 0,
|
|
2718
|
+
behavior: "smooth"
|
|
2719
|
+
});
|
|
2720
|
+
};
|
|
2721
|
+
return /* @__PURE__ */ jsx33(Fragment, { children: isVisible && /* @__PURE__ */ jsx33(
|
|
2722
|
+
"button",
|
|
2723
|
+
{
|
|
2724
|
+
onClick: scrollToTop,
|
|
2725
|
+
className: "fixed bottom-6 right-6 p-3 bg-gradient-to-r from-purple-400 to-pink-500 hover:from-purple-500 hover:to-pink-600 dark:from-purple-500 dark:to-pink-600 dark:hover:from-purple-600 dark:hover:to-pink-700 text-white rounded-full shadow-lg hover:shadow-xl transition-all duration-300 z-50",
|
|
2726
|
+
"aria-label": "Go to top",
|
|
2727
|
+
children: /* @__PURE__ */ jsx33(globalLucideIcons.ArrowUp, { size: 20, className: "text-white" })
|
|
2715
2728
|
}
|
|
2716
|
-
|
|
2717
|
-
}
|
|
2718
|
-
if (createElement8) {
|
|
2719
|
-
return React32.createElement(Icon2);
|
|
2720
|
-
}
|
|
2721
|
-
return Icon2;
|
|
2729
|
+
) });
|
|
2722
2730
|
}
|
|
2723
2731
|
|
|
2724
|
-
//
|
|
2725
|
-
import {
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2732
|
+
// src/main/loading.tsx
|
|
2733
|
+
import { jsx as jsx34, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2734
|
+
var NUM_ROWS = 15;
|
|
2735
|
+
var NUM_COLS = 15;
|
|
2736
|
+
var DOT_SIZE = 6;
|
|
2737
|
+
var SPACING = 12;
|
|
2738
|
+
var ANIMATION_DURATION = 1.8;
|
|
2739
|
+
var STAGGER_DELAY_FACTOR = 0.08;
|
|
2740
|
+
var COLORS = [
|
|
2741
|
+
"#AC62FD",
|
|
2742
|
+
// Base Purple
|
|
2743
|
+
"#C364FA",
|
|
2744
|
+
"#DD59F7",
|
|
2745
|
+
"#FF4FF2",
|
|
2746
|
+
// Bright Pink/Magenta
|
|
2747
|
+
"#F067DD",
|
|
2748
|
+
"#E26AF8",
|
|
2749
|
+
"#DA70D6",
|
|
2750
|
+
// Orchid
|
|
2751
|
+
"#BA55D3",
|
|
2752
|
+
// Medium Orchid
|
|
2753
|
+
"#9370DB",
|
|
2754
|
+
// Medium Purple
|
|
2755
|
+
"#8A2BE2"
|
|
2756
|
+
// Blue Violet
|
|
2757
|
+
];
|
|
2758
|
+
function Loading() {
|
|
2759
|
+
const dots = [];
|
|
2760
|
+
const centerX = (NUM_COLS - 1) / 2;
|
|
2761
|
+
const centerY = (NUM_ROWS - 1) / 2;
|
|
2762
|
+
for (let i = 0; i < NUM_ROWS; i++) {
|
|
2763
|
+
for (let j = 0; j < NUM_COLS; j++) {
|
|
2764
|
+
const distance = Math.sqrt(Math.pow(i - centerY, 2) + Math.pow(j - centerX, 2));
|
|
2765
|
+
dots.push({
|
|
2766
|
+
id: `${i}-${j}`,
|
|
2767
|
+
row: i,
|
|
2768
|
+
col: j,
|
|
2769
|
+
// Animation delay based on distance, creating a ripple effect
|
|
2770
|
+
delay: distance * STAGGER_DELAY_FACTOR,
|
|
2771
|
+
// Color selection based on distance rings
|
|
2772
|
+
color: COLORS[Math.floor(distance) % COLORS.length]
|
|
2773
|
+
});
|
|
2774
|
+
}
|
|
2775
|
+
}
|
|
2776
|
+
const containerWidth = (NUM_COLS - 1) * SPACING + DOT_SIZE;
|
|
2777
|
+
const containerHeight = (NUM_ROWS - 1) * SPACING + DOT_SIZE;
|
|
2778
|
+
return /* @__PURE__ */ jsx34("div", { className: "flex flex-col items-center justify-center min-h-screen bg-neutral-900", children: /* @__PURE__ */ jsxs10(
|
|
2779
|
+
"div",
|
|
2780
|
+
{
|
|
2781
|
+
style: {
|
|
2782
|
+
width: containerWidth,
|
|
2783
|
+
height: containerHeight,
|
|
2784
|
+
position: "relative",
|
|
2785
|
+
borderRadius: "50%",
|
|
2786
|
+
// Make the container circular
|
|
2787
|
+
overflow: "hidden"
|
|
2788
|
+
// Clip dots outside the circle
|
|
2789
|
+
},
|
|
2790
|
+
children: [
|
|
2791
|
+
dots.map((dot) => /* @__PURE__ */ jsx34(
|
|
2792
|
+
"div",
|
|
2793
|
+
{
|
|
2794
|
+
style: {
|
|
2795
|
+
position: "absolute",
|
|
2796
|
+
left: dot.col * SPACING,
|
|
2797
|
+
top: dot.row * SPACING,
|
|
2798
|
+
width: DOT_SIZE,
|
|
2799
|
+
height: DOT_SIZE,
|
|
2800
|
+
backgroundColor: dot.color,
|
|
2801
|
+
borderRadius: "50%",
|
|
2802
|
+
animationName: "loading-dot-pulse",
|
|
2803
|
+
animationDuration: `${ANIMATION_DURATION}s`,
|
|
2804
|
+
animationTimingFunction: "cubic-bezier(0.45, 0, 0.55, 1)",
|
|
2805
|
+
animationIterationCount: "infinite",
|
|
2806
|
+
animationDelay: `${dot.delay}s`,
|
|
2807
|
+
opacity: 0,
|
|
2808
|
+
transform: "scale(0)"
|
|
2809
|
+
}
|
|
2810
|
+
},
|
|
2811
|
+
dot.id
|
|
2812
|
+
)),
|
|
2813
|
+
/* @__PURE__ */ jsx34(
|
|
2814
|
+
"div",
|
|
2815
|
+
{
|
|
2816
|
+
className: "absolute inset-0 flex items-center justify-center",
|
|
2817
|
+
style: { pointerEvents: "none" },
|
|
2818
|
+
children: /* @__PURE__ */ jsx34("p", { className: "text-xl font-semibold text-white", children: "Loading..." })
|
|
2819
|
+
}
|
|
2820
|
+
)
|
|
2821
|
+
]
|
|
2822
|
+
}
|
|
2823
|
+
) });
|
|
2729
2824
|
}
|
|
2730
2825
|
|
|
2731
|
-
// src/main/
|
|
2732
|
-
import
|
|
2733
|
-
import
|
|
2734
|
-
import {
|
|
2735
|
-
|
|
2736
|
-
function
|
|
2737
|
-
const
|
|
2738
|
-
const
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
const cdnProxyUrl = process.env.NEXT_PUBLIC_STYLE_CDN_PROXY_URL;
|
|
2743
|
-
const handleDownload = (item, index) => __async(null, null, function* () {
|
|
2744
|
-
var _a;
|
|
2745
|
-
if (downloadingItems.has(index)) {
|
|
2746
|
-
return;
|
|
2747
|
-
}
|
|
2748
|
-
setDownloadingItems((prev) => new Set(prev).add(index));
|
|
2749
|
-
try {
|
|
2750
|
-
const originalUrl = new URL(item.url);
|
|
2751
|
-
const filename = originalUrl.pathname.substring(1);
|
|
2752
|
-
const proxyUrl = `${cdnProxyUrl}/${encodeURIComponent(filename)}`;
|
|
2753
|
-
const urlExtension = (_a = item.url.split(".").pop()) == null ? void 0 : _a.toLowerCase();
|
|
2754
|
-
let extension = ".webp";
|
|
2755
|
-
if (urlExtension && ["jpg", "jpeg", "png", "gif", "webp", "svg"].includes(urlExtension)) {
|
|
2756
|
-
extension = `.${urlExtension}`;
|
|
2757
|
-
}
|
|
2758
|
-
const downloadPrefix = t("downloadPrefix");
|
|
2759
|
-
const response = yield fetch(proxyUrl);
|
|
2760
|
-
if (!response.ok) {
|
|
2761
|
-
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
2762
|
-
}
|
|
2763
|
-
const blob = yield response.blob();
|
|
2764
|
-
const blobUrl = URL.createObjectURL(blob);
|
|
2765
|
-
const a = document.createElement("a");
|
|
2766
|
-
a.href = blobUrl;
|
|
2767
|
-
a.download = `${downloadPrefix}-${index + 1}${extension}`;
|
|
2768
|
-
a.style.display = "none";
|
|
2769
|
-
document.body.appendChild(a);
|
|
2770
|
-
a.click();
|
|
2826
|
+
// src/main/nprogress-bar.tsx
|
|
2827
|
+
import NProgress from "nprogress";
|
|
2828
|
+
import { usePathname } from "next/navigation";
|
|
2829
|
+
import { useEffect as useEffect2, useRef } from "react";
|
|
2830
|
+
NProgress.configure({ showSpinner: false });
|
|
2831
|
+
function NProgressBar() {
|
|
2832
|
+
const pathname = usePathname();
|
|
2833
|
+
const previousPath = useRef(pathname);
|
|
2834
|
+
useEffect2(() => {
|
|
2835
|
+
if (previousPath.current !== pathname) {
|
|
2836
|
+
NProgress.start();
|
|
2771
2837
|
setTimeout(() => {
|
|
2772
|
-
|
|
2773
|
-
URL.revokeObjectURL(blobUrl);
|
|
2838
|
+
NProgress.done();
|
|
2774
2839
|
}, 100);
|
|
2775
|
-
|
|
2776
|
-
console.error("Download failed:", error);
|
|
2777
|
-
} finally {
|
|
2778
|
-
setDownloadingItems((prev) => {
|
|
2779
|
-
const newSet = new Set(prev);
|
|
2780
|
-
newSet.delete(index);
|
|
2781
|
-
return newSet;
|
|
2782
|
-
});
|
|
2840
|
+
previousPath.current = pathname;
|
|
2783
2841
|
}
|
|
2784
|
-
});
|
|
2785
|
-
|
|
2786
|
-
setImageErrors((prev) => new Set(prev).add(index));
|
|
2787
|
-
};
|
|
2788
|
-
const getImageSrc = (item, index) => {
|
|
2789
|
-
return imageErrors.has(index) ? defaultImgUrl : item.url;
|
|
2790
|
-
};
|
|
2791
|
-
return /* @__PURE__ */ jsxs10("section", { id: "gallery", className: cn("container mx-auto px-4 py-20 scroll-mt-20", sectionClassName), children: [
|
|
2792
|
-
/* @__PURE__ */ jsxs10("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-6", children: [
|
|
2793
|
-
t("titleL"),
|
|
2794
|
-
" ",
|
|
2795
|
-
/* @__PURE__ */ jsx33("span", { className: "text-purple-500", children: t("eyesOn") }),
|
|
2796
|
-
" ",
|
|
2797
|
-
t("titleR")
|
|
2798
|
-
] }),
|
|
2799
|
-
/* @__PURE__ */ jsx33("p", { className: "text-center max-w-2xl mx-auto mb-16", children: t("description") }),
|
|
2800
|
-
/* @__PURE__ */ jsx33("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6", children: galleryItems.map((item, index) => /* @__PURE__ */ jsxs10("div", { className: "group relative overflow-hidden rounded-xl", children: [
|
|
2801
|
-
/* @__PURE__ */ jsx33(
|
|
2802
|
-
Image,
|
|
2803
|
-
{
|
|
2804
|
-
src: getImageSrc(item, index),
|
|
2805
|
-
alt: item.altMsg,
|
|
2806
|
-
width: 600,
|
|
2807
|
-
height: 600,
|
|
2808
|
-
className: "w-full h-80 object-cover transition duration-300 group-hover:scale-105",
|
|
2809
|
-
onError: () => handleImageError(index)
|
|
2810
|
-
}
|
|
2811
|
-
),
|
|
2812
|
-
/* @__PURE__ */ jsx33("div", { className: "absolute inset-0 flex items-end justify-end p-4 opacity-0 group-hover:opacity-100 transition duration-300", children: /* @__PURE__ */ jsx33(
|
|
2813
|
-
"button",
|
|
2814
|
-
{
|
|
2815
|
-
onClick: () => handleDownload(item, index),
|
|
2816
|
-
disabled: downloadingItems.has(index),
|
|
2817
|
-
className: cn(
|
|
2818
|
-
"p-2 rounded-full transition-all duration-300",
|
|
2819
|
-
downloadingItems.has(index) ? "bg-black/30 text-white/50" : "bg-black/50 hover:bg-black/70 text-white/80 hover:text-white"
|
|
2820
|
-
),
|
|
2821
|
-
children: downloadingItems.has(index) ? /* @__PURE__ */ jsx33(globalLucideIcons.Loader2, { className: "h-5 w-5 text-white animate-spin" }) : /* @__PURE__ */ jsx33(globalLucideIcons.Download, { className: "h-5 w-5 text-white" })
|
|
2822
|
-
}
|
|
2823
|
-
) })
|
|
2824
|
-
] }, index)) }),
|
|
2825
|
-
button && /* @__PURE__ */ jsx33("div", { className: "text-center mt-12", children: button })
|
|
2826
|
-
] });
|
|
2842
|
+
}, [pathname]);
|
|
2843
|
+
return null;
|
|
2827
2844
|
}
|
|
2828
2845
|
|
|
2829
|
-
// src/main/
|
|
2830
|
-
import {
|
|
2831
|
-
|
|
2832
|
-
// src/main/rich-text-expert.tsx
|
|
2833
|
-
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2834
|
-
var defaultTagRenderers = {
|
|
2835
|
-
// text Stong
|
|
2836
|
-
strong: (chunks) => /* @__PURE__ */ jsx34("strong", { children: chunks }),
|
|
2837
|
-
// text Emphasis
|
|
2838
|
-
em: (chunks) => /* @__PURE__ */ jsx34("em", { children: chunks }),
|
|
2839
|
-
// text Underline
|
|
2840
|
-
u: (chunks) => /* @__PURE__ */ jsx34("u", { children: chunks }),
|
|
2841
|
-
// text Mark
|
|
2842
|
-
mark: (chunks) => /* @__PURE__ */ jsx34("mark", { className: "bg-purple-300 dark:bg-purple-500 text-neutral-800 dark:text-neutral-300 px-1 rounded", children: chunks }),
|
|
2843
|
-
// text Delete
|
|
2844
|
-
del: (chunks) => /* @__PURE__ */ jsx34("del", { children: chunks }),
|
|
2845
|
-
// text Subscript
|
|
2846
|
-
sub: (chunks) => /* @__PURE__ */ jsx34("sub", { children: chunks }),
|
|
2847
|
-
// text Superscript
|
|
2848
|
-
sup: (chunks) => /* @__PURE__ */ jsx34("sup", { children: chunks })
|
|
2849
|
-
};
|
|
2850
|
-
function createRichTextRenderer(customRenderers) {
|
|
2851
|
-
const renderers = __spreadValues(__spreadValues({}, defaultTagRenderers), customRenderers);
|
|
2852
|
-
return function richText2(t, key) {
|
|
2853
|
-
return t.rich(key, renderers);
|
|
2854
|
-
};
|
|
2855
|
-
}
|
|
2856
|
-
var richText = createRichTextRenderer();
|
|
2846
|
+
// src/main/ads-alert-dialog.tsx
|
|
2847
|
+
import { useState as useState11 } from "react";
|
|
2848
|
+
import Image from "next/image";
|
|
2857
2849
|
|
|
2858
|
-
// src/
|
|
2859
|
-
import
|
|
2860
|
-
function Usage({ sectionClassName }) {
|
|
2861
|
-
const t = useTranslations2("usage");
|
|
2862
|
-
const steps = t.raw("steps");
|
|
2863
|
-
return /* @__PURE__ */ jsxs11("section", { id: "usage", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
|
|
2864
|
-
/* @__PURE__ */ jsxs11("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: [
|
|
2865
|
-
t("title"),
|
|
2866
|
-
" ",
|
|
2867
|
-
/* @__PURE__ */ jsx35("span", { className: "text-purple-500", children: t("eyesOn") })
|
|
2868
|
-
] }),
|
|
2869
|
-
/* @__PURE__ */ jsx35("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-base md:text-lg mx-auto whitespace-nowrap", children: richText(t, "description") }),
|
|
2870
|
-
/* @__PURE__ */ jsx35("div", { className: "bg-gray-50 dark:bg-gray-800/60 border border-gray-200 dark:border-gray-700 rounded-2xl p-8 md:p-12 shadow-sm dark:shadow-none", children: /* @__PURE__ */ jsx35("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8 gap-y-12", children: steps.map((step, idx) => {
|
|
2871
|
-
const Icon2 = getGlobalIcon(step.iconKey);
|
|
2872
|
-
return /* @__PURE__ */ jsxs11("div", { className: "flex items-start", children: [
|
|
2873
|
-
/* @__PURE__ */ jsx35("div", { className: "flex-shrink-0 mr-4", children: /* @__PURE__ */ jsx35(Icon2, { className: "w-8 h-8 text-purple-500" }) }),
|
|
2874
|
-
/* @__PURE__ */ jsxs11("div", { children: [
|
|
2875
|
-
/* @__PURE__ */ jsx35("h3", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100 flex items-center", children: `${idx + 1}. ${step.title}` }),
|
|
2876
|
-
/* @__PURE__ */ jsx35("p", { className: "text-gray-700 dark:text-gray-300", children: richText(t, `steps.${idx}.description`) })
|
|
2877
|
-
] })
|
|
2878
|
-
] }, idx);
|
|
2879
|
-
}) }) })
|
|
2880
|
-
] });
|
|
2881
|
-
}
|
|
2850
|
+
// ../base-ui/src/ui/alert-dialog.tsx
|
|
2851
|
+
import * as React57 from "react";
|
|
2882
2852
|
|
|
2883
|
-
//
|
|
2884
|
-
import
|
|
2885
|
-
import { jsx as jsx36, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2886
|
-
function Features({ sectionClassName }) {
|
|
2887
|
-
const t = useTranslations3("features");
|
|
2888
|
-
const featureItems = t.raw("items");
|
|
2889
|
-
return /* @__PURE__ */ jsxs12("section", { id: "features", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-18", sectionClassName), children: [
|
|
2890
|
-
/* @__PURE__ */ jsxs12("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: [
|
|
2891
|
-
t("title"),
|
|
2892
|
-
" ",
|
|
2893
|
-
/* @__PURE__ */ jsx36("span", { className: "text-purple-500", children: t("eyesOn") })
|
|
2894
|
-
] }),
|
|
2895
|
-
/* @__PURE__ */ jsx36("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-base md:text-lg mx-auto whitespace-nowrap", children: richText(t, "description") }),
|
|
2896
|
-
/* @__PURE__ */ jsx36("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8 gap-y-12", children: featureItems.map((feature, index) => {
|
|
2897
|
-
const Icon2 = getGlobalIcon(feature.iconKey);
|
|
2898
|
-
return /* @__PURE__ */ jsxs12(
|
|
2899
|
-
"div",
|
|
2900
|
-
{
|
|
2901
|
-
className: "bg-white dark:bg-gray-800/60 p-8 rounded-xl border border-gray-200 dark:border-gray-700 hover:border-purple-300 dark:hover:border-purple-500/50 transition shadow-sm dark:shadow-none",
|
|
2902
|
-
children: [
|
|
2903
|
-
/* @__PURE__ */ jsx36("div", { className: "text-4xl mb-4 flex items-center justify-start", children: /* @__PURE__ */ jsx36(Icon2, { className: "w-8 h-8" }) }),
|
|
2904
|
-
/* @__PURE__ */ jsx36("h3", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100", children: feature.title }),
|
|
2905
|
-
/* @__PURE__ */ jsx36("p", { className: "text-gray-700 dark:text-gray-300", children: richText(t, `items.${index}.description`) })
|
|
2906
|
-
]
|
|
2907
|
-
},
|
|
2908
|
-
index
|
|
2909
|
-
);
|
|
2910
|
-
}) })
|
|
2911
|
-
] });
|
|
2912
|
-
}
|
|
2853
|
+
// ../../node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types_c6ff7006a888f63e36d2502e019661c3/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs
|
|
2854
|
+
import * as React55 from "react";
|
|
2913
2855
|
|
|
2914
|
-
//
|
|
2915
|
-
import
|
|
2916
|
-
import { jsx as
|
|
2917
|
-
function
|
|
2918
|
-
const
|
|
2919
|
-
const
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
/* @__PURE__ */ jsx37("h3", { className: "text-2xl font-semibold", children: tip.title }),
|
|
2933
|
-
/* @__PURE__ */ jsx37("p", { className: "", children: richText(t, `sections.${actualIndex}.description`) })
|
|
2934
|
-
] }, tipIndex);
|
|
2935
|
-
}) }, colIndex)) })
|
|
2936
|
-
] });
|
|
2856
|
+
// ../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
2857
|
+
import * as React33 from "react";
|
|
2858
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
2859
|
+
function createContext2(rootComponentName, defaultContext) {
|
|
2860
|
+
const Context = React33.createContext(defaultContext);
|
|
2861
|
+
const Provider = (props) => {
|
|
2862
|
+
const _a = props, { children } = _a, context = __objRest(_a, ["children"]);
|
|
2863
|
+
const value = React33.useMemo(() => context, Object.values(context));
|
|
2864
|
+
return /* @__PURE__ */ jsx35(Context.Provider, { value, children });
|
|
2865
|
+
};
|
|
2866
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
2867
|
+
function useContext22(consumerName) {
|
|
2868
|
+
const context = React33.useContext(Context);
|
|
2869
|
+
if (context) return context;
|
|
2870
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
2871
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
2872
|
+
}
|
|
2873
|
+
return [Provider, useContext22];
|
|
2937
2874
|
}
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2875
|
+
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
2876
|
+
let defaultContexts = [];
|
|
2877
|
+
function createContext32(rootComponentName, defaultContext) {
|
|
2878
|
+
const BaseContext = React33.createContext(defaultContext);
|
|
2879
|
+
const index = defaultContexts.length;
|
|
2880
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
2881
|
+
const Provider = (props) => {
|
|
2882
|
+
var _b;
|
|
2883
|
+
const _a = props, { scope, children } = _a, context = __objRest(_a, ["scope", "children"]);
|
|
2884
|
+
const Context = ((_b = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _b[index]) || BaseContext;
|
|
2885
|
+
const value = React33.useMemo(() => context, Object.values(context));
|
|
2886
|
+
return /* @__PURE__ */ jsx35(Context.Provider, { value, children });
|
|
2887
|
+
};
|
|
2888
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
2889
|
+
function useContext22(consumerName, scope) {
|
|
2890
|
+
var _a;
|
|
2891
|
+
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
|
|
2892
|
+
const context = React33.useContext(Context);
|
|
2893
|
+
if (context) return context;
|
|
2894
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
2895
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
2896
|
+
}
|
|
2897
|
+
return [Provider, useContext22];
|
|
2898
|
+
}
|
|
2899
|
+
const createScope = () => {
|
|
2900
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
2901
|
+
return React33.createContext(defaultContext);
|
|
2952
2902
|
});
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
const isOpen = openArr[idx];
|
|
2959
|
-
const Icon2 = isOpen ? globalLucideIcons.ChevronDown : globalLucideIcons.ChevronRight;
|
|
2960
|
-
return /* @__PURE__ */ jsxs14(
|
|
2961
|
-
"div",
|
|
2962
|
-
{
|
|
2963
|
-
className: "bg-white dark:bg-gray-800/60 p-6 rounded-xl border border-gray-200 dark:border-gray-700 hover:border-purple-300 dark:hover:border-purple-500/50 transition shadow-sm dark:shadow-none",
|
|
2964
|
-
children: [
|
|
2965
|
-
/* @__PURE__ */ jsxs14(
|
|
2966
|
-
"button",
|
|
2967
|
-
{
|
|
2968
|
-
className: "w-full flex items-center justify-between text-left focus:outline-none",
|
|
2969
|
-
onClick: () => handleToggle(idx),
|
|
2970
|
-
"aria-expanded": isOpen,
|
|
2971
|
-
children: [
|
|
2972
|
-
/* @__PURE__ */ jsx38("span", { className: "text-lg font-semibold text-gray-900 dark:text-gray-100", children: item.question }),
|
|
2973
|
-
/* @__PURE__ */ jsx38(Icon2, { className: "w-6 h-6 text-gray-400 ml-2 transition-transform duration-200" })
|
|
2974
|
-
]
|
|
2975
|
-
}
|
|
2976
|
-
),
|
|
2977
|
-
isOpen && /* @__PURE__ */ jsx38("div", { className: "mt-4 text-gray-700 dark:text-gray-300 text-base", children: richText(t, `items.${idx}.answer`) })
|
|
2978
|
-
]
|
|
2979
|
-
},
|
|
2980
|
-
idx
|
|
2903
|
+
return function useScope(scope) {
|
|
2904
|
+
const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
|
2905
|
+
return React33.useMemo(
|
|
2906
|
+
() => ({ [`__scope${scopeName}`]: __spreadProps(__spreadValues({}, scope), { [scopeName]: contexts }) }),
|
|
2907
|
+
[scope, contexts]
|
|
2981
2908
|
);
|
|
2982
|
-
}
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
// src/main/seo-content.tsx
|
|
2987
|
-
import { useTranslations as useTranslations6 } from "next-intl";
|
|
2988
|
-
import { jsx as jsx39, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2989
|
-
function SeoContent({ sectionClassName }) {
|
|
2990
|
-
const t = useTranslations6("seoContent");
|
|
2991
|
-
return /* @__PURE__ */ jsxs15("section", { id: "seo", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
|
|
2992
|
-
/* @__PURE__ */ jsxs15("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-8", children: [
|
|
2993
|
-
t("title"),
|
|
2994
|
-
" ",
|
|
2995
|
-
/* @__PURE__ */ jsx39("span", { className: "text-purple-500", children: t("eyesOn") })
|
|
2996
|
-
] }),
|
|
2997
|
-
/* @__PURE__ */ jsx39("h3", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-lg", children: t("description") }),
|
|
2998
|
-
/* @__PURE__ */ jsxs15("div", { className: "bg-gray-50 dark:bg-gray-800/60 border border-gray-200 dark:border-gray-700 rounded-2xl p-8 md:p-12 shadow-sm dark:shadow-none", children: [
|
|
2999
|
-
/* @__PURE__ */ jsxs15("div", { className: "space-y-10", children: [
|
|
3000
|
-
/* @__PURE__ */ jsx39("p", { className: "text-gray-600 dark:text-gray-400 text-lg", children: richText(t, "intro") }),
|
|
3001
|
-
t.raw("sections").map((section, index) => /* @__PURE__ */ jsxs15("div", { children: [
|
|
3002
|
-
/* @__PURE__ */ jsx39("h2", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100 flex items-center", children: section.title }),
|
|
3003
|
-
/* @__PURE__ */ jsx39("p", { className: "text-gray-700 dark:text-gray-300", children: richText(t, `sections.${index}.content`) })
|
|
3004
|
-
] }, index))
|
|
3005
|
-
] }),
|
|
3006
|
-
/* @__PURE__ */ jsx39("p", { className: "mt-10 text-gray-600 dark:text-gray-400 text-lg", children: richText(t, "conclusion") })
|
|
3007
|
-
] })
|
|
3008
|
-
] });
|
|
3009
|
-
}
|
|
3010
|
-
|
|
3011
|
-
// ../base-ui/src/ui/button.tsx
|
|
3012
|
-
import * as React35 from "react";
|
|
3013
|
-
|
|
3014
|
-
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
3015
|
-
import * as React34 from "react";
|
|
3016
|
-
|
|
3017
|
-
// ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
3018
|
-
import * as React33 from "react";
|
|
3019
|
-
function setRef(ref, value) {
|
|
3020
|
-
if (typeof ref === "function") {
|
|
3021
|
-
return ref(value);
|
|
3022
|
-
} else if (ref !== null && ref !== void 0) {
|
|
3023
|
-
ref.current = value;
|
|
3024
|
-
}
|
|
3025
|
-
}
|
|
3026
|
-
function composeRefs(...refs) {
|
|
3027
|
-
return (node) => {
|
|
3028
|
-
let hasCleanup = false;
|
|
3029
|
-
const cleanups = refs.map((ref) => {
|
|
3030
|
-
const cleanup = setRef(ref, node);
|
|
3031
|
-
if (!hasCleanup && typeof cleanup == "function") {
|
|
3032
|
-
hasCleanup = true;
|
|
3033
|
-
}
|
|
3034
|
-
return cleanup;
|
|
3035
|
-
});
|
|
3036
|
-
if (hasCleanup) {
|
|
3037
|
-
return () => {
|
|
3038
|
-
for (let i = 0; i < cleanups.length; i++) {
|
|
3039
|
-
const cleanup = cleanups[i];
|
|
3040
|
-
if (typeof cleanup == "function") {
|
|
3041
|
-
cleanup();
|
|
3042
|
-
} else {
|
|
3043
|
-
setRef(refs[i], null);
|
|
3044
|
-
}
|
|
3045
|
-
}
|
|
3046
|
-
};
|
|
3047
|
-
}
|
|
3048
|
-
};
|
|
3049
|
-
}
|
|
3050
|
-
function useComposedRefs(...refs) {
|
|
3051
|
-
return React33.useCallback(composeRefs(...refs), refs);
|
|
3052
|
-
}
|
|
3053
|
-
|
|
3054
|
-
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
3055
|
-
import { Fragment as Fragment2, jsx as jsx40 } from "react/jsx-runtime";
|
|
3056
|
-
// @__NO_SIDE_EFFECTS__
|
|
3057
|
-
function createSlot(ownerName) {
|
|
3058
|
-
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
3059
|
-
const Slot22 = React34.forwardRef((props, forwardedRef) => {
|
|
3060
|
-
const _a = props, { children } = _a, slotProps = __objRest(_a, ["children"]);
|
|
3061
|
-
const childrenArray = React34.Children.toArray(children);
|
|
3062
|
-
const slottable = childrenArray.find(isSlottable);
|
|
3063
|
-
if (slottable) {
|
|
3064
|
-
const newElement = slottable.props.children;
|
|
3065
|
-
const newChildren = childrenArray.map((child) => {
|
|
3066
|
-
if (child === slottable) {
|
|
3067
|
-
if (React34.Children.count(newElement) > 1) return React34.Children.only(null);
|
|
3068
|
-
return React34.isValidElement(newElement) ? newElement.props.children : null;
|
|
3069
|
-
} else {
|
|
3070
|
-
return child;
|
|
3071
|
-
}
|
|
3072
|
-
});
|
|
3073
|
-
return /* @__PURE__ */ jsx40(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children: React34.isValidElement(newElement) ? React34.cloneElement(newElement, void 0, newChildren) : null }));
|
|
3074
|
-
}
|
|
3075
|
-
return /* @__PURE__ */ jsx40(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children }));
|
|
3076
|
-
});
|
|
3077
|
-
Slot22.displayName = `${ownerName}.Slot`;
|
|
3078
|
-
return Slot22;
|
|
3079
|
-
}
|
|
3080
|
-
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
3081
|
-
// @__NO_SIDE_EFFECTS__
|
|
3082
|
-
function createSlotClone(ownerName) {
|
|
3083
|
-
const SlotClone = React34.forwardRef((props, forwardedRef) => {
|
|
3084
|
-
const _a = props, { children } = _a, slotProps = __objRest(_a, ["children"]);
|
|
3085
|
-
if (React34.isValidElement(children)) {
|
|
3086
|
-
const childrenRef = getElementRef(children);
|
|
3087
|
-
const props2 = mergeProps(slotProps, children.props);
|
|
3088
|
-
if (children.type !== React34.Fragment) {
|
|
3089
|
-
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
3090
|
-
}
|
|
3091
|
-
return React34.cloneElement(children, props2);
|
|
3092
|
-
}
|
|
3093
|
-
return React34.Children.count(children) > 1 ? React34.Children.only(null) : null;
|
|
3094
|
-
});
|
|
3095
|
-
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
3096
|
-
return SlotClone;
|
|
3097
|
-
}
|
|
3098
|
-
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
3099
|
-
// @__NO_SIDE_EFFECTS__
|
|
3100
|
-
function createSlottable(ownerName) {
|
|
3101
|
-
const Slottable2 = ({ children }) => {
|
|
3102
|
-
return /* @__PURE__ */ jsx40(Fragment2, { children });
|
|
3103
|
-
};
|
|
3104
|
-
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
3105
|
-
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
3106
|
-
return Slottable2;
|
|
3107
|
-
}
|
|
3108
|
-
function isSlottable(child) {
|
|
3109
|
-
return React34.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
3110
|
-
}
|
|
3111
|
-
function mergeProps(slotProps, childProps) {
|
|
3112
|
-
const overrideProps = __spreadValues({}, childProps);
|
|
3113
|
-
for (const propName in childProps) {
|
|
3114
|
-
const slotPropValue = slotProps[propName];
|
|
3115
|
-
const childPropValue = childProps[propName];
|
|
3116
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
3117
|
-
if (isHandler) {
|
|
3118
|
-
if (slotPropValue && childPropValue) {
|
|
3119
|
-
overrideProps[propName] = (...args) => {
|
|
3120
|
-
const result = childPropValue(...args);
|
|
3121
|
-
slotPropValue(...args);
|
|
3122
|
-
return result;
|
|
3123
|
-
};
|
|
3124
|
-
} else if (slotPropValue) {
|
|
3125
|
-
overrideProps[propName] = slotPropValue;
|
|
3126
|
-
}
|
|
3127
|
-
} else if (propName === "style") {
|
|
3128
|
-
overrideProps[propName] = __spreadValues(__spreadValues({}, slotPropValue), childPropValue);
|
|
3129
|
-
} else if (propName === "className") {
|
|
3130
|
-
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
3131
|
-
}
|
|
3132
|
-
}
|
|
3133
|
-
return __spreadValues(__spreadValues({}, slotProps), overrideProps);
|
|
3134
|
-
}
|
|
3135
|
-
function getElementRef(element) {
|
|
3136
|
-
var _a, _b;
|
|
3137
|
-
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
3138
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3139
|
-
if (mayWarn) {
|
|
3140
|
-
return element.ref;
|
|
3141
|
-
}
|
|
3142
|
-
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
3143
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3144
|
-
if (mayWarn) {
|
|
3145
|
-
return element.props.ref;
|
|
3146
|
-
}
|
|
3147
|
-
return element.props.ref || element.ref;
|
|
3148
|
-
}
|
|
3149
|
-
|
|
3150
|
-
// ../base-ui/src/ui/button.tsx
|
|
3151
|
-
import { cva } from "class-variance-authority";
|
|
3152
|
-
import { jsx as jsx41, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3153
|
-
var buttonVariants = cva(
|
|
3154
|
-
"inline-flex items-center gap-2 whitespace-nowrap rounded-md text-sm ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
3155
|
-
{
|
|
3156
|
-
variants: {
|
|
3157
|
-
variant: {
|
|
3158
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
3159
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
3160
|
-
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
3161
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
3162
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
3163
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
3164
|
-
},
|
|
3165
|
-
size: {
|
|
3166
|
-
default: "h-10 px-4 py-2",
|
|
3167
|
-
sm: "h-9 rounded-md px-3",
|
|
3168
|
-
lg: "h-11 rounded-md px-8",
|
|
3169
|
-
icon: "h-10 w-10"
|
|
3170
|
-
}
|
|
3171
|
-
},
|
|
3172
|
-
defaultVariants: {
|
|
3173
|
-
variant: "default",
|
|
3174
|
-
size: "default"
|
|
3175
|
-
}
|
|
3176
|
-
}
|
|
3177
|
-
);
|
|
3178
|
-
var Button = React35.forwardRef(
|
|
3179
|
-
(_a, ref) => {
|
|
3180
|
-
var _b = _a, { className, variant, size, asChild = false, loading = false, children } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild", "loading", "children"]);
|
|
3181
|
-
const Comp = asChild ? Slot : "button";
|
|
3182
|
-
if (asChild) {
|
|
3183
|
-
return /* @__PURE__ */ jsx41(
|
|
3184
|
-
Comp,
|
|
3185
|
-
__spreadProps(__spreadValues({
|
|
3186
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
3187
|
-
ref,
|
|
3188
|
-
disabled: loading || props.disabled
|
|
3189
|
-
}, props), {
|
|
3190
|
-
children
|
|
3191
|
-
})
|
|
3192
|
-
);
|
|
3193
|
-
}
|
|
3194
|
-
return /* @__PURE__ */ jsxs16(
|
|
3195
|
-
Comp,
|
|
3196
|
-
__spreadProps(__spreadValues({
|
|
3197
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
3198
|
-
ref,
|
|
3199
|
-
disabled: loading || props.disabled
|
|
3200
|
-
}, props), {
|
|
3201
|
-
children: [
|
|
3202
|
-
children,
|
|
3203
|
-
loading && /* @__PURE__ */ jsx41(globalLucideIcons.Loader2, { className: "ml-2 h-4 w-4 animate-spin" })
|
|
3204
|
-
]
|
|
3205
|
-
})
|
|
3206
|
-
);
|
|
3207
|
-
}
|
|
3208
|
-
);
|
|
3209
|
-
Button.displayName = "Button";
|
|
3210
|
-
|
|
3211
|
-
// src/fuma/mdx/gradient-button.tsx
|
|
3212
|
-
import Link2 from "next/link";
|
|
3213
|
-
import React36, { useState as useState3 } from "react";
|
|
3214
|
-
import { Fragment as Fragment3, jsx as jsx42, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3215
|
-
function GradientButton({
|
|
3216
|
-
title,
|
|
3217
|
-
icon,
|
|
3218
|
-
align = "left",
|
|
3219
|
-
disabled = false,
|
|
3220
|
-
className = "",
|
|
3221
|
-
href,
|
|
3222
|
-
openInNewTab = true,
|
|
3223
|
-
onClick,
|
|
3224
|
-
loadingText,
|
|
3225
|
-
preventDoubleClick = true
|
|
3226
|
-
}) {
|
|
3227
|
-
const [isLoading, setIsLoading] = useState3(false);
|
|
3228
|
-
const actualLoadingText = loadingText || (title == null ? void 0 : title.toString().trim()) || "Loading...";
|
|
3229
|
-
const getAlignmentClass = () => {
|
|
3230
|
-
switch (align) {
|
|
3231
|
-
case "center":
|
|
3232
|
-
return "justify-center";
|
|
3233
|
-
case "right":
|
|
3234
|
-
return "justify-end";
|
|
3235
|
-
default:
|
|
3236
|
-
return "justify-start";
|
|
3237
|
-
}
|
|
3238
|
-
};
|
|
3239
|
-
const handleClick = (e) => __async(null, null, function* () {
|
|
3240
|
-
if (disabled || isLoading) {
|
|
3241
|
-
e.preventDefault();
|
|
3242
|
-
return;
|
|
3243
|
-
}
|
|
3244
|
-
if (onClick) {
|
|
3245
|
-
e.preventDefault();
|
|
3246
|
-
if (preventDoubleClick) {
|
|
3247
|
-
setIsLoading(true);
|
|
3248
|
-
}
|
|
3249
|
-
try {
|
|
3250
|
-
yield onClick();
|
|
3251
|
-
} catch (error) {
|
|
3252
|
-
console.error("GradientButton onClick error:", error);
|
|
3253
|
-
} finally {
|
|
3254
|
-
if (preventDoubleClick) {
|
|
3255
|
-
setIsLoading(false);
|
|
3256
|
-
}
|
|
3257
|
-
}
|
|
3258
|
-
}
|
|
3259
|
-
});
|
|
3260
|
-
const isDisabled = disabled || isLoading;
|
|
3261
|
-
const displayTitle = isLoading ? actualLoadingText : title;
|
|
3262
|
-
const displayIcon = isLoading ? /* @__PURE__ */ jsx42(globalLucideIcons.Loader2, { className: "h-4 w-4 text-white animate-spin" }) : icon ? React36.cloneElement(icon, {
|
|
3263
|
-
className: "h-4 w-4 text-white"
|
|
3264
|
-
}) : /* @__PURE__ */ jsx42(globalLucideIcons.ArrowRight, { className: "h-4 w-4 text-white" });
|
|
3265
|
-
const buttonContent = onClick ? /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
3266
|
-
/* @__PURE__ */ jsx42("span", { children: displayIcon }),
|
|
3267
|
-
/* @__PURE__ */ jsx42("span", { className: "ml-1", children: displayTitle })
|
|
3268
|
-
] }) : /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
3269
|
-
/* @__PURE__ */ jsx42("span", { children: displayTitle }),
|
|
3270
|
-
/* @__PURE__ */ jsx42("span", { className: "ml-1", children: displayIcon })
|
|
3271
|
-
] });
|
|
3272
|
-
const buttonClassName = `
|
|
3273
|
-
bg-gradient-to-r
|
|
3274
|
-
from-purple-400 to-pink-500
|
|
3275
|
-
hover:from-purple-500 hover:to-pink-600
|
|
3276
|
-
dark:from-purple-500 dark:to-pink-600
|
|
3277
|
-
dark:hover:from-purple-600 dark:hover:to-pink-700
|
|
3278
|
-
text-white text-base font-bold shadow-lg hover:shadow-xl
|
|
3279
|
-
transition-all duration-300
|
|
3280
|
-
rounded-full
|
|
3281
|
-
${isDisabled ? "opacity-50 cursor-not-allowed" : ""}
|
|
3282
|
-
${className}
|
|
3283
|
-
`;
|
|
3284
|
-
return /* @__PURE__ */ jsx42("div", { className: `flex flex-col sm:flex-row gap-3 ${getAlignmentClass()}`, children: onClick ? (
|
|
3285
|
-
// for click
|
|
3286
|
-
/* @__PURE__ */ jsx42(
|
|
3287
|
-
Button,
|
|
3288
|
-
{
|
|
3289
|
-
size: "lg",
|
|
3290
|
-
className: buttonClassName,
|
|
3291
|
-
onClick: handleClick,
|
|
3292
|
-
disabled: isDisabled,
|
|
3293
|
-
children: buttonContent
|
|
3294
|
-
}
|
|
3295
|
-
)
|
|
3296
|
-
) : (
|
|
3297
|
-
// for Link
|
|
3298
|
-
/* @__PURE__ */ jsx42(
|
|
3299
|
-
Button,
|
|
3300
|
-
{
|
|
3301
|
-
asChild: true,
|
|
3302
|
-
size: "lg",
|
|
3303
|
-
className: buttonClassName,
|
|
3304
|
-
disabled: isDisabled,
|
|
3305
|
-
children: /* @__PURE__ */ jsx42(
|
|
3306
|
-
Link2,
|
|
3307
|
-
__spreadProps(__spreadValues({
|
|
3308
|
-
href: href || "#",
|
|
3309
|
-
className: "no-underline hover:no-underline"
|
|
3310
|
-
}, openInNewTab ? { target: "_blank", rel: "noopener noreferrer" } : {}), {
|
|
3311
|
-
onClick: isDisabled ? (e) => e.preventDefault() : void 0,
|
|
3312
|
-
children: buttonContent
|
|
3313
|
-
})
|
|
3314
|
-
)
|
|
3315
|
-
}
|
|
3316
|
-
)
|
|
3317
|
-
) });
|
|
3318
|
-
}
|
|
3319
|
-
|
|
3320
|
-
// src/main/cta.tsx
|
|
3321
|
-
import { useTranslations as useTranslations7 } from "next-intl";
|
|
3322
|
-
import { jsx as jsx43, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3323
|
-
function CTA({ sectionClassName }) {
|
|
3324
|
-
const t = useTranslations7("cta");
|
|
3325
|
-
return /* @__PURE__ */ jsx43("section", { id: "cta", className: cn("px-16 py-20 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: /* @__PURE__ */ jsxs18("div", { className: "\n bg-gradient-to-r from-[#f7f8fa] via-[#e0c3fc] to-[#b2fefa]\n dark:bg-gradient-to-r dark:from-[#2d0b4e] dark:via-[#6a3fa0] dark:to-[#3a185a]\n rounded-2xl p-12 text-center\n bg-[length:200%_auto] animate-cta-gradient-wave\n ", children: [
|
|
3326
|
-
/* @__PURE__ */ jsxs18("h2", { className: "text-3xl md:text-4xl font-bold mb-6", children: [
|
|
3327
|
-
t("title"),
|
|
3328
|
-
" ",
|
|
3329
|
-
/* @__PURE__ */ jsx43("span", { className: "text-purple-400", children: t("eyesOn") }),
|
|
3330
|
-
"?"
|
|
3331
|
-
] }),
|
|
3332
|
-
/* @__PURE__ */ jsxs18("p", { className: "text-2xl mx-auto mb-8", children: [
|
|
3333
|
-
richText(t, "description1"),
|
|
3334
|
-
/* @__PURE__ */ jsx43("br", {}),
|
|
3335
|
-
/* @__PURE__ */ jsx43("span", { className: "text-purple-400", children: t("description2") })
|
|
3336
|
-
] }),
|
|
3337
|
-
/* @__PURE__ */ jsx43(
|
|
3338
|
-
GradientButton,
|
|
3339
|
-
{
|
|
3340
|
-
title: t("button"),
|
|
3341
|
-
href: t("url"),
|
|
3342
|
-
align: "center"
|
|
3343
|
-
}
|
|
3344
|
-
)
|
|
3345
|
-
] }) });
|
|
3346
|
-
}
|
|
3347
|
-
|
|
3348
|
-
// src/main/footer.tsx
|
|
3349
|
-
import { useLocale, useTranslations as useTranslations8 } from "next-intl";
|
|
3350
|
-
import Link3 from "next/link";
|
|
3351
|
-
import { jsx as jsx44, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3352
|
-
function Footer() {
|
|
3353
|
-
const tFooter = useTranslations8("footer");
|
|
3354
|
-
const locale = useLocale();
|
|
3355
|
-
return /* @__PURE__ */ jsx44("div", { className: "mb-10 w-full mx-auto border-t-purple-700/80 border-t-1", children: /* @__PURE__ */ jsx44("footer", { children: /* @__PURE__ */ jsxs19("div", { className: "w-full flex flex-col items-center justify-center px-4 py-8 space-y-3", children: [
|
|
3356
|
-
/* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-center space-x-6 text-xs", children: [
|
|
3357
|
-
/* @__PURE__ */ jsxs19(Link3, { href: `/${locale}/legal/terms`, className: "flex items-center space-x-1 hover:underline", children: [
|
|
3358
|
-
/* @__PURE__ */ jsx44(globalLucideIcons.ReceiptText, { className: "h-3.5 w-3.5" }),
|
|
3359
|
-
/* @__PURE__ */ jsx44("span", { children: tFooter("terms", { defaultValue: "Terms of Service" }) })
|
|
3360
|
-
] }),
|
|
3361
|
-
/* @__PURE__ */ jsxs19(Link3, { href: `/${locale}/legal/privacy`, className: "flex items-center space-x-1 hover:underline", children: [
|
|
3362
|
-
/* @__PURE__ */ jsx44(globalLucideIcons.ShieldUser, { className: "h-3.5 w-3.5" }),
|
|
3363
|
-
/* @__PURE__ */ jsx44("span", { children: tFooter("privacy", { defaultValue: "Privacy Policy" }) })
|
|
3364
|
-
] }),
|
|
3365
|
-
/* @__PURE__ */ jsxs19("div", { className: "relative group", children: [
|
|
3366
|
-
/* @__PURE__ */ jsx44("div", { className: "absolute left-2/3 -translate-x-1/4 bottom-full mb-1 hidden group-hover:block bg-zinc-600 text-white text-xs rounded px-3 py-1 whitespace-nowrap z-10 shadow-lg", children: tFooter("email") }),
|
|
3367
|
-
/* @__PURE__ */ jsxs19(
|
|
3368
|
-
"a",
|
|
3369
|
-
{
|
|
3370
|
-
href: `mailto:${tFooter("email")}`,
|
|
3371
|
-
className: "flex items-center space-x-1 underline cursor-pointer px-2",
|
|
3372
|
-
children: [
|
|
3373
|
-
/* @__PURE__ */ jsx44(globalLucideIcons.Mail, { className: "h-3.5 w-3.5" }),
|
|
3374
|
-
/* @__PURE__ */ jsx44("span", { children: tFooter("contactUs", { defaultValue: "Contact Us" }) })
|
|
3375
|
-
]
|
|
3376
|
-
}
|
|
3377
|
-
)
|
|
3378
|
-
] })
|
|
3379
|
-
] }),
|
|
3380
|
-
/* @__PURE__ */ jsx44("div", { className: "text-xs text-center", children: /* @__PURE__ */ jsx44("span", { children: tFooter("copyright", { year: (/* @__PURE__ */ new Date()).getFullYear(), name: tFooter("company") }) }) })
|
|
3381
|
-
] }) }) });
|
|
3382
|
-
}
|
|
3383
|
-
|
|
3384
|
-
// src/main/go-to-top.tsx
|
|
3385
|
-
import { useState as useState4, useEffect } from "react";
|
|
3386
|
-
import { Fragment as Fragment4, jsx as jsx45 } from "react/jsx-runtime";
|
|
3387
|
-
function GoToTop() {
|
|
3388
|
-
const [isVisible, setIsVisible] = useState4(false);
|
|
3389
|
-
useEffect(() => {
|
|
3390
|
-
const toggleVisibility = () => {
|
|
3391
|
-
if (window.scrollY > 300) {
|
|
3392
|
-
setIsVisible(true);
|
|
3393
|
-
} else {
|
|
3394
|
-
setIsVisible(false);
|
|
3395
|
-
}
|
|
3396
|
-
};
|
|
3397
|
-
window.addEventListener("scroll", toggleVisibility);
|
|
3398
|
-
return () => window.removeEventListener("scroll", toggleVisibility);
|
|
3399
|
-
}, []);
|
|
3400
|
-
const scrollToTop = () => {
|
|
3401
|
-
window.scrollTo({
|
|
3402
|
-
top: 0,
|
|
3403
|
-
behavior: "smooth"
|
|
3404
|
-
});
|
|
3405
|
-
};
|
|
3406
|
-
return /* @__PURE__ */ jsx45(Fragment4, { children: isVisible && /* @__PURE__ */ jsx45(
|
|
3407
|
-
"button",
|
|
3408
|
-
{
|
|
3409
|
-
onClick: scrollToTop,
|
|
3410
|
-
className: "fixed bottom-6 right-6 p-3 bg-gradient-to-r from-purple-400 to-pink-500 hover:from-purple-500 hover:to-pink-600 dark:from-purple-500 dark:to-pink-600 dark:hover:from-purple-600 dark:hover:to-pink-700 text-white rounded-full shadow-lg hover:shadow-xl transition-all duration-300 z-50",
|
|
3411
|
-
"aria-label": "Go to top",
|
|
3412
|
-
children: /* @__PURE__ */ jsx45(globalLucideIcons.ArrowUp, { size: 20, className: "text-white" })
|
|
3413
|
-
}
|
|
3414
|
-
) });
|
|
3415
|
-
}
|
|
3416
|
-
|
|
3417
|
-
// src/main/loading.tsx
|
|
3418
|
-
import { jsx as jsx46, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3419
|
-
var NUM_ROWS = 15;
|
|
3420
|
-
var NUM_COLS = 15;
|
|
3421
|
-
var DOT_SIZE = 6;
|
|
3422
|
-
var SPACING = 12;
|
|
3423
|
-
var ANIMATION_DURATION = 1.8;
|
|
3424
|
-
var STAGGER_DELAY_FACTOR = 0.08;
|
|
3425
|
-
var COLORS = [
|
|
3426
|
-
"#AC62FD",
|
|
3427
|
-
// Base Purple
|
|
3428
|
-
"#C364FA",
|
|
3429
|
-
"#DD59F7",
|
|
3430
|
-
"#FF4FF2",
|
|
3431
|
-
// Bright Pink/Magenta
|
|
3432
|
-
"#F067DD",
|
|
3433
|
-
"#E26AF8",
|
|
3434
|
-
"#DA70D6",
|
|
3435
|
-
// Orchid
|
|
3436
|
-
"#BA55D3",
|
|
3437
|
-
// Medium Orchid
|
|
3438
|
-
"#9370DB",
|
|
3439
|
-
// Medium Purple
|
|
3440
|
-
"#8A2BE2"
|
|
3441
|
-
// Blue Violet
|
|
3442
|
-
];
|
|
3443
|
-
function Loading() {
|
|
3444
|
-
const dots = [];
|
|
3445
|
-
const centerX = (NUM_COLS - 1) / 2;
|
|
3446
|
-
const centerY = (NUM_ROWS - 1) / 2;
|
|
3447
|
-
for (let i = 0; i < NUM_ROWS; i++) {
|
|
3448
|
-
for (let j = 0; j < NUM_COLS; j++) {
|
|
3449
|
-
const distance = Math.sqrt(Math.pow(i - centerY, 2) + Math.pow(j - centerX, 2));
|
|
3450
|
-
dots.push({
|
|
3451
|
-
id: `${i}-${j}`,
|
|
3452
|
-
row: i,
|
|
3453
|
-
col: j,
|
|
3454
|
-
// Animation delay based on distance, creating a ripple effect
|
|
3455
|
-
delay: distance * STAGGER_DELAY_FACTOR,
|
|
3456
|
-
// Color selection based on distance rings
|
|
3457
|
-
color: COLORS[Math.floor(distance) % COLORS.length]
|
|
3458
|
-
});
|
|
3459
|
-
}
|
|
3460
|
-
}
|
|
3461
|
-
const containerWidth = (NUM_COLS - 1) * SPACING + DOT_SIZE;
|
|
3462
|
-
const containerHeight = (NUM_ROWS - 1) * SPACING + DOT_SIZE;
|
|
3463
|
-
return /* @__PURE__ */ jsx46("div", { className: "flex flex-col items-center justify-center min-h-screen bg-neutral-900", children: /* @__PURE__ */ jsxs20(
|
|
3464
|
-
"div",
|
|
3465
|
-
{
|
|
3466
|
-
style: {
|
|
3467
|
-
width: containerWidth,
|
|
3468
|
-
height: containerHeight,
|
|
3469
|
-
position: "relative",
|
|
3470
|
-
borderRadius: "50%",
|
|
3471
|
-
// Make the container circular
|
|
3472
|
-
overflow: "hidden"
|
|
3473
|
-
// Clip dots outside the circle
|
|
3474
|
-
},
|
|
3475
|
-
children: [
|
|
3476
|
-
dots.map((dot) => /* @__PURE__ */ jsx46(
|
|
3477
|
-
"div",
|
|
3478
|
-
{
|
|
3479
|
-
style: {
|
|
3480
|
-
position: "absolute",
|
|
3481
|
-
left: dot.col * SPACING,
|
|
3482
|
-
top: dot.row * SPACING,
|
|
3483
|
-
width: DOT_SIZE,
|
|
3484
|
-
height: DOT_SIZE,
|
|
3485
|
-
backgroundColor: dot.color,
|
|
3486
|
-
borderRadius: "50%",
|
|
3487
|
-
animationName: "loading-dot-pulse",
|
|
3488
|
-
animationDuration: `${ANIMATION_DURATION}s`,
|
|
3489
|
-
animationTimingFunction: "cubic-bezier(0.45, 0, 0.55, 1)",
|
|
3490
|
-
animationIterationCount: "infinite",
|
|
3491
|
-
animationDelay: `${dot.delay}s`,
|
|
3492
|
-
opacity: 0,
|
|
3493
|
-
transform: "scale(0)"
|
|
3494
|
-
}
|
|
3495
|
-
},
|
|
3496
|
-
dot.id
|
|
3497
|
-
)),
|
|
3498
|
-
/* @__PURE__ */ jsx46(
|
|
3499
|
-
"div",
|
|
3500
|
-
{
|
|
3501
|
-
className: "absolute inset-0 flex items-center justify-center",
|
|
3502
|
-
style: { pointerEvents: "none" },
|
|
3503
|
-
children: /* @__PURE__ */ jsx46("p", { className: "text-xl font-semibold text-white", children: "Loading..." })
|
|
3504
|
-
}
|
|
3505
|
-
)
|
|
3506
|
-
]
|
|
3507
|
-
}
|
|
3508
|
-
) });
|
|
3509
|
-
}
|
|
3510
|
-
|
|
3511
|
-
// src/main/nprogress-bar.tsx
|
|
3512
|
-
import NProgress from "nprogress";
|
|
3513
|
-
import { usePathname } from "next/navigation";
|
|
3514
|
-
import { useEffect as useEffect2, useRef } from "react";
|
|
3515
|
-
NProgress.configure({ showSpinner: false });
|
|
3516
|
-
function NProgressBar() {
|
|
3517
|
-
const pathname = usePathname();
|
|
3518
|
-
const previousPath = useRef(pathname);
|
|
3519
|
-
useEffect2(() => {
|
|
3520
|
-
if (previousPath.current !== pathname) {
|
|
3521
|
-
NProgress.start();
|
|
3522
|
-
setTimeout(() => {
|
|
3523
|
-
NProgress.done();
|
|
3524
|
-
}, 100);
|
|
3525
|
-
previousPath.current = pathname;
|
|
3526
|
-
}
|
|
3527
|
-
}, [pathname]);
|
|
3528
|
-
return null;
|
|
3529
|
-
}
|
|
3530
|
-
|
|
3531
|
-
// src/main/price-plan.tsx
|
|
3532
|
-
import { useState as useState5 } from "react";
|
|
3533
|
-
import { useTranslations as useTranslations9 } from "next-intl";
|
|
3534
|
-
import { useRouter } from "next/navigation";
|
|
3535
|
-
import { Fragment as Fragment5, jsx as jsx47, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3536
|
-
function PricePlan({ currency = "$", pricePlanConfig, sectionClassName }) {
|
|
3537
|
-
var _a, _b;
|
|
3538
|
-
const t = useTranslations9("pricePlan");
|
|
3539
|
-
const billingSwitch = t.raw("billingSwitch");
|
|
3540
|
-
const plans = t.raw("plans");
|
|
3541
|
-
const router = useRouter();
|
|
3542
|
-
const billingOptions = pricePlanConfig.billingOptions;
|
|
3543
|
-
const prices = pricePlanConfig.prices;
|
|
3544
|
-
const minPlanFeaturesCount = pricePlanConfig.minPlanFeaturesCount;
|
|
3545
|
-
const [billingKey, setBillingKey] = useState5(billingSwitch.defaultKey);
|
|
3546
|
-
const [tooltip, setTooltip] = useState5({ show: false, content: "", x: 0, y: 0 });
|
|
3547
|
-
const currentBilling = billingOptions.find((opt) => opt.key === billingKey) || billingOptions[0];
|
|
3548
|
-
const currentBillingDisplay = billingSwitch.options.find((opt) => opt.key === billingKey) || billingSwitch.options[0];
|
|
3549
|
-
const maxFeaturesCount = Math.max(
|
|
3550
|
-
...plans.map((plan) => {
|
|
3551
|
-
var _a2;
|
|
3552
|
-
return ((_a2 = plan.features) == null ? void 0 : _a2.length) || 0;
|
|
3553
|
-
}),
|
|
3554
|
-
minPlanFeaturesCount || 0
|
|
3555
|
-
);
|
|
3556
|
-
const getFeatureRows = (plan) => {
|
|
3557
|
-
const features = plan.features || [];
|
|
3558
|
-
const filled = [...features];
|
|
3559
|
-
while (filled.length < maxFeaturesCount) filled.push(null);
|
|
3560
|
-
return filled;
|
|
3561
|
-
};
|
|
3562
|
-
function renderPrice(plan) {
|
|
3563
|
-
var _a2;
|
|
3564
|
-
const priceValue = prices[plan.key];
|
|
3565
|
-
const billingSubTitle = ((_a2 = billingSwitch.options.find((opt) => opt.key === billingKey)) == null ? void 0 : _a2.subTitle) || "";
|
|
3566
|
-
if (typeof priceValue !== "number" || isNaN(priceValue)) {
|
|
3567
|
-
return /* @__PURE__ */ jsxs21("div", { className: "flex flex-col items-start w-full", children: [
|
|
3568
|
-
/* @__PURE__ */ jsx47("div", { className: "flex items-end gap-2", children: /* @__PURE__ */ jsx47("span", { className: "text-4xl font-extrabold text-gray-900 dark:text-gray-100", children: priceValue }) }),
|
|
3569
|
-
/* @__PURE__ */ jsx47("div", { className: "flex items-center gap-2 min-h-[24px] mt-1", children: /* @__PURE__ */ jsx47("span", { className: cn("text-xs text-gray-700 dark:text-gray-300 font-medium", plan.showBillingSubTitle === false && "opacity-0 select-none"), children: plan.showBillingSubTitle === false ? "" : billingSubTitle }) })
|
|
3570
|
-
] });
|
|
3571
|
-
}
|
|
3572
|
-
const originValue = Number(priceValue);
|
|
3573
|
-
const discount = currentBilling.discount;
|
|
3574
|
-
const hasDiscount = discount !== 0;
|
|
3575
|
-
const saleValue = originValue * (1 - discount);
|
|
3576
|
-
const formatPrice = (v) => Number(v.toFixed(2)).toString();
|
|
3577
|
-
const unit = currentBillingDisplay.unit || "";
|
|
3578
|
-
let discountText = "";
|
|
3579
|
-
if (hasDiscount && currentBillingDisplay.discountText) {
|
|
3580
|
-
discountText = currentBillingDisplay.discountText.replace("{percent}", String(Math.round(Math.abs(discount) * 100)));
|
|
3581
|
-
}
|
|
3582
|
-
const showNaN = saleValue < 0;
|
|
3583
|
-
return /* @__PURE__ */ jsxs21("div", { className: "flex flex-col items-start w-full", children: [
|
|
3584
|
-
/* @__PURE__ */ jsxs21("div", { className: "flex items-end gap-2", children: [
|
|
3585
|
-
/* @__PURE__ */ jsxs21("span", { className: "text-4xl font-extrabold text-gray-900 dark:text-gray-100", children: [
|
|
3586
|
-
currency,
|
|
3587
|
-
showNaN ? "NaN" : hasDiscount ? formatPrice(saleValue) : formatPrice(originValue)
|
|
3588
|
-
] }),
|
|
3589
|
-
/* @__PURE__ */ jsx47("span", { className: "text-lg text-gray-700 dark:text-gray-300 font-medium mb-1", children: unit })
|
|
3590
|
-
] }),
|
|
3591
|
-
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2 min-h-[24px] mt-1", children: [
|
|
3592
|
-
hasDiscount && /* @__PURE__ */ jsxs21(Fragment5, { children: [
|
|
3593
|
-
/* @__PURE__ */ jsxs21("span", { className: "text-base text-gray-400 line-through", children: [
|
|
3594
|
-
currency,
|
|
3595
|
-
showNaN ? "NaN" : formatPrice(originValue)
|
|
3596
|
-
] }),
|
|
3597
|
-
discountText && /* @__PURE__ */ jsx47("span", { className: "px-2 py-0.5 text-xs rounded bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200 font-semibold align-middle", children: discountText })
|
|
3598
|
-
] }),
|
|
3599
|
-
/* @__PURE__ */ jsx47("span", { className: cn("text-xs text-gray-700 dark:text-gray-300 font-medium", plan.showBillingSubTitle === false && "opacity-0 select-none"), children: plan.showBillingSubTitle === false ? "" : billingSubTitle })
|
|
3600
|
-
] })
|
|
3601
|
-
] });
|
|
3602
|
-
}
|
|
3603
|
-
const Tooltip = ({ show, content, x, y }) => {
|
|
3604
|
-
if (!show) return null;
|
|
3605
|
-
const style = {
|
|
3606
|
-
position: "fixed",
|
|
3607
|
-
left: Math.max(8, x),
|
|
3608
|
-
top: Math.max(8, y),
|
|
3609
|
-
zIndex: 9999,
|
|
3610
|
-
maxWidth: 200,
|
|
3611
|
-
transform: "translateY(-50%)",
|
|
3612
|
-
pointerEvents: "none",
|
|
3613
|
-
whiteSpace: "pre-line"
|
|
3614
|
-
};
|
|
3615
|
-
return /* @__PURE__ */ jsx47(
|
|
3616
|
-
"div",
|
|
3617
|
-
{
|
|
3618
|
-
style,
|
|
3619
|
-
className: "bg-gray-700 dark:bg-gray-200 text-gray-100 dark:text-gray-800 text-xs leading-relaxed px-3 py-2 rounded-lg shadow-lg border border-gray-300 dark:border-gray-600 backdrop-blur-sm",
|
|
3620
|
-
children: content
|
|
3621
|
-
}
|
|
3622
|
-
);
|
|
3623
|
-
};
|
|
3624
|
-
return /* @__PURE__ */ jsxs21("section", { id: "pricing", className: cn("px-4 py-10 md:px-16 md:py-16 mx-auto max-w-7xl scroll-mt-10", sectionClassName), children: [
|
|
3625
|
-
/* @__PURE__ */ jsx47("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-3", children: t("title") }),
|
|
3626
|
-
/* @__PURE__ */ jsx47("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-8 text-base md:text-lg mx-auto", children: t("subtitle") }),
|
|
3627
|
-
/* @__PURE__ */ jsxs21("div", { className: "flex flex-col items-center", children: [
|
|
3628
|
-
/* @__PURE__ */ jsx47("div", { className: "flex items-center relative mb-3", children: /* @__PURE__ */ jsxs21("div", { className: "flex bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-full p-1", children: [
|
|
3629
|
-
/* @__PURE__ */ jsx47(
|
|
3630
|
-
"button",
|
|
3631
|
-
{
|
|
3632
|
-
className: cn(
|
|
3633
|
-
"min-w-[120px] px-6 py-2 font-medium transition text-lg relative",
|
|
3634
|
-
billingKey === "monthly" ? "text-white bg-gradient-to-r from-purple-400 to-pink-500 hover:from-purple-500 hover:to-pink-600 dark:from-purple-500 dark:to-pink-600 dark:hover:from-purple-600 rounded-full shadow-sm" : "text-gray-800 dark:text-gray-200 hover:text-gray-900 dark:hover:text-gray-100 rounded-full"
|
|
3635
|
-
),
|
|
3636
|
-
onClick: () => setBillingKey("monthly"),
|
|
3637
|
-
type: "button",
|
|
3638
|
-
children: ((_a = billingSwitch.options.find((opt) => opt.key === "monthly")) == null ? void 0 : _a.name) || "Monthly"
|
|
3639
|
-
}
|
|
3640
|
-
),
|
|
3641
|
-
/* @__PURE__ */ jsx47(
|
|
3642
|
-
"button",
|
|
3643
|
-
{
|
|
3644
|
-
className: cn(
|
|
3645
|
-
"min-w-[120px] px-6 py-2 font-medium transition text-lg relative",
|
|
3646
|
-
billingKey === "yearly" ? "text-white bg-gradient-to-r from-purple-400 to-pink-500 hover:from-purple-500 hover:to-pink-600 dark:from-purple-500 dark:to-pink-600 dark:hover:from-purple-600 rounded-full shadow-sm" : "text-gray-800 dark:text-gray-200 hover:text-gray-900 dark:hover:text-gray-100 rounded-full"
|
|
3647
|
-
),
|
|
3648
|
-
onClick: () => setBillingKey("yearly"),
|
|
3649
|
-
type: "button",
|
|
3650
|
-
children: ((_b = billingSwitch.options.find((opt) => opt.key === "yearly")) == null ? void 0 : _b.name) || "Yearly"
|
|
3651
|
-
}
|
|
3652
|
-
)
|
|
3653
|
-
] }) }),
|
|
3654
|
-
/* @__PURE__ */ jsx47("div", { className: "h-8 flex items-center justify-center mb-3", children: (() => {
|
|
3655
|
-
const opt = billingSwitch.options.find((opt2) => opt2.key === billingKey);
|
|
3656
|
-
const bOpt = billingOptions.find((opt2) => opt2.key === billingKey);
|
|
3657
|
-
if (!(opt && bOpt && opt.discountText && bOpt.discount !== 0)) return null;
|
|
3658
|
-
return /* @__PURE__ */ jsx47("span", { className: "px-2 py-1 text-xs rounded bg-yellow-100 text-yellow-800 font-semibold align-middle text-center inline-flex items-center justify-center whitespace-nowrap", children: opt.discountText.replace(
|
|
3659
|
-
"{percent}",
|
|
3660
|
-
String(Math.round(Math.abs(bOpt.discount) * 100))
|
|
3661
|
-
) });
|
|
3662
|
-
})() })
|
|
3663
|
-
] }),
|
|
3664
|
-
/* @__PURE__ */ jsx47("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8", children: plans.map((plan, _idx) => {
|
|
3665
|
-
var _a2, _b2, _c;
|
|
3666
|
-
return /* @__PURE__ */ jsxs21(
|
|
3667
|
-
"div",
|
|
3668
|
-
{
|
|
3669
|
-
className: cn(
|
|
3670
|
-
"flex flex-col bg-white dark:bg-gray-800/60 rounded-2xl border border-gray-300 dark:border-[#7c3aed40] transition p-8 h-full shadow-sm dark:shadow-none",
|
|
3671
|
-
"hover:border-2 hover:border-purple-500",
|
|
3672
|
-
"focus-within:border-2 focus-within:border-purple-500"
|
|
3673
|
-
),
|
|
3674
|
-
style: { minHeight: maxFeaturesCount * 100 },
|
|
3675
|
-
children: [
|
|
3676
|
-
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
3677
|
-
/* @__PURE__ */ jsx47("span", { className: "text-xl font-bold text-gray-900 dark:text-gray-100", children: plan.title }),
|
|
3678
|
-
plan.titleTags && plan.titleTags.map((tag, i) => /* @__PURE__ */ jsx47("span", { className: "px-2 py-0.5 text-xs rounded bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-200 font-semibold align-middle", children: tag }, i))
|
|
3679
|
-
] }),
|
|
3680
|
-
renderPrice(plan),
|
|
3681
|
-
/* @__PURE__ */ jsx47("ul", { className: "flex-1 mb-6 mt-4", children: getFeatureRows(plan).map((feature, i) => /* @__PURE__ */ jsxs21("li", { className: "flex items-center gap-2 mb-2 min-h-[28px]", children: [
|
|
3682
|
-
feature ? /* @__PURE__ */ jsx47("span", { className: "inline-flex items-center justify-center w-5 h-5 rounded-full bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-200 mr-1", children: feature.icon ? /* @__PURE__ */ jsx47("span", { children: feature.icon }) : /* @__PURE__ */ jsx47("span", { className: "font-bold", children: "\u2713" }) }) : /* @__PURE__ */ jsx47("span", { className: "inline-flex items-center justify-center w-5 h-5 rounded-full mr-1", children: "\xA0" }),
|
|
3683
|
-
feature && feature.tag && /* @__PURE__ */ jsx47("span", { className: "px-1 py-0.5 text-[6px] rounded bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200 font-semibold align-middle", children: feature.tag }),
|
|
3684
|
-
feature ? /* @__PURE__ */ jsxs21("span", { className: "relative group cursor-pointer text-sm text-gray-800 dark:text-gray-200", children: [
|
|
3685
|
-
feature.description,
|
|
3686
|
-
feature.tooltip && /* @__PURE__ */ jsx47(
|
|
3687
|
-
"span",
|
|
3688
|
-
{
|
|
3689
|
-
className: "ml-1 align-middle inline-flex",
|
|
3690
|
-
onMouseEnter: (e) => {
|
|
3691
|
-
setTooltip({
|
|
3692
|
-
show: true,
|
|
3693
|
-
content: feature.tooltip,
|
|
3694
|
-
x: e.clientX,
|
|
3695
|
-
y: e.clientY
|
|
3696
|
-
});
|
|
3697
|
-
},
|
|
3698
|
-
onMouseMove: (e) => {
|
|
3699
|
-
setTooltip((t2) => __spreadProps(__spreadValues({}, t2), { x: e.clientX, y: e.clientY }));
|
|
3700
|
-
},
|
|
3701
|
-
onMouseLeave: () => setTooltip((t2) => __spreadProps(__spreadValues({}, t2), { show: false })),
|
|
3702
|
-
children: /* @__PURE__ */ jsx47(globalLucideIcons.FAQ, { className: "w-4 h-4" })
|
|
3703
|
-
}
|
|
3704
|
-
)
|
|
3705
|
-
] }) : /* @__PURE__ */ jsx47("span", { children: "\xA0" })
|
|
3706
|
-
] }, i)) }),
|
|
3707
|
-
/* @__PURE__ */ jsx47("div", { className: "flex-1" }),
|
|
3708
|
-
/* @__PURE__ */ jsx47(
|
|
3709
|
-
"button",
|
|
3710
|
-
{
|
|
3711
|
-
className: cn(
|
|
3712
|
-
"w-full py-2 mt-auto text-white text-base font-bold shadow-lg hover:shadow-xl transition-all duration-300 rounded-full",
|
|
3713
|
-
((_a2 = plan.button) == null ? void 0 : _a2.disabled) ? "bg-gray-400 cursor-not-allowed" : "bg-gradient-to-r from-purple-400 to-pink-500 hover:from-purple-500 hover:to-pink-600 dark:from-purple-500 dark:to-pink-600 dark:hover:from-purple-600 dark:hover:to-pink-700"
|
|
3714
|
-
),
|
|
3715
|
-
disabled: (_b2 = plan.button) == null ? void 0 : _b2.disabled,
|
|
3716
|
-
type: "button",
|
|
3717
|
-
onClick: () => {
|
|
3718
|
-
var _a3;
|
|
3719
|
-
if (!((_a3 = plan.button) == null ? void 0 : _a3.disabled)) {
|
|
3720
|
-
router.push("/");
|
|
3721
|
-
}
|
|
3722
|
-
},
|
|
3723
|
-
children: ((_c = plan.button) == null ? void 0 : _c.text) || "--"
|
|
3724
|
-
}
|
|
3725
|
-
)
|
|
3726
|
-
]
|
|
3727
|
-
},
|
|
3728
|
-
plan.key
|
|
3729
|
-
);
|
|
3730
|
-
}) }),
|
|
3731
|
-
/* @__PURE__ */ jsx47(Tooltip, __spreadValues({}, tooltip))
|
|
3732
|
-
] });
|
|
3733
|
-
}
|
|
3734
|
-
|
|
3735
|
-
// src/main/ads-alert-dialog.tsx
|
|
3736
|
-
import { useState as useState15 } from "react";
|
|
3737
|
-
import Image2 from "next/image";
|
|
3738
|
-
|
|
3739
|
-
// ../base-ui/src/ui/alert-dialog.tsx
|
|
3740
|
-
import * as React59 from "react";
|
|
3741
|
-
|
|
3742
|
-
// ../../node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types_c6ff7006a888f63e36d2502e019661c3/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs
|
|
3743
|
-
import * as React58 from "react";
|
|
3744
|
-
|
|
3745
|
-
// ../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
3746
|
-
import * as React38 from "react";
|
|
3747
|
-
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
3748
|
-
function createContext2(rootComponentName, defaultContext) {
|
|
3749
|
-
const Context = React38.createContext(defaultContext);
|
|
3750
|
-
const Provider = (props) => {
|
|
3751
|
-
const _a = props, { children } = _a, context = __objRest(_a, ["children"]);
|
|
3752
|
-
const value = React38.useMemo(() => context, Object.values(context));
|
|
3753
|
-
return /* @__PURE__ */ jsx48(Context.Provider, { value, children });
|
|
3754
|
-
};
|
|
3755
|
-
Provider.displayName = rootComponentName + "Provider";
|
|
3756
|
-
function useContext22(consumerName) {
|
|
3757
|
-
const context = React38.useContext(Context);
|
|
3758
|
-
if (context) return context;
|
|
3759
|
-
if (defaultContext !== void 0) return defaultContext;
|
|
3760
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
3761
|
-
}
|
|
3762
|
-
return [Provider, useContext22];
|
|
3763
|
-
}
|
|
3764
|
-
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
3765
|
-
let defaultContexts = [];
|
|
3766
|
-
function createContext32(rootComponentName, defaultContext) {
|
|
3767
|
-
const BaseContext = React38.createContext(defaultContext);
|
|
3768
|
-
const index = defaultContexts.length;
|
|
3769
|
-
defaultContexts = [...defaultContexts, defaultContext];
|
|
3770
|
-
const Provider = (props) => {
|
|
3771
|
-
var _b;
|
|
3772
|
-
const _a = props, { scope, children } = _a, context = __objRest(_a, ["scope", "children"]);
|
|
3773
|
-
const Context = ((_b = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _b[index]) || BaseContext;
|
|
3774
|
-
const value = React38.useMemo(() => context, Object.values(context));
|
|
3775
|
-
return /* @__PURE__ */ jsx48(Context.Provider, { value, children });
|
|
3776
|
-
};
|
|
3777
|
-
Provider.displayName = rootComponentName + "Provider";
|
|
3778
|
-
function useContext22(consumerName, scope) {
|
|
3779
|
-
var _a;
|
|
3780
|
-
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
|
|
3781
|
-
const context = React38.useContext(Context);
|
|
3782
|
-
if (context) return context;
|
|
3783
|
-
if (defaultContext !== void 0) return defaultContext;
|
|
3784
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
3785
|
-
}
|
|
3786
|
-
return [Provider, useContext22];
|
|
3787
|
-
}
|
|
3788
|
-
const createScope = () => {
|
|
3789
|
-
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
3790
|
-
return React38.createContext(defaultContext);
|
|
3791
|
-
});
|
|
3792
|
-
return function useScope(scope) {
|
|
3793
|
-
const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
|
3794
|
-
return React38.useMemo(
|
|
3795
|
-
() => ({ [`__scope${scopeName}`]: __spreadProps(__spreadValues({}, scope), { [scopeName]: contexts }) }),
|
|
3796
|
-
[scope, contexts]
|
|
3797
|
-
);
|
|
3798
|
-
};
|
|
3799
|
-
};
|
|
3800
|
-
createScope.scopeName = scopeName;
|
|
3801
|
-
return [createContext32, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
2909
|
+
};
|
|
2910
|
+
};
|
|
2911
|
+
createScope.scopeName = scopeName;
|
|
2912
|
+
return [createContext32, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
3802
2913
|
}
|
|
3803
2914
|
function composeContextScopes(...scopes) {
|
|
3804
2915
|
const baseScope = scopes[0];
|
|
@@ -3814,15 +2925,52 @@ function composeContextScopes(...scopes) {
|
|
|
3814
2925
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
3815
2926
|
return __spreadValues(__spreadValues({}, nextScopes2), currentScope);
|
|
3816
2927
|
}, {});
|
|
3817
|
-
return
|
|
2928
|
+
return React33.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
3818
2929
|
};
|
|
3819
2930
|
};
|
|
3820
2931
|
createScope.scopeName = baseScope.scopeName;
|
|
3821
2932
|
return createScope;
|
|
3822
2933
|
}
|
|
3823
2934
|
|
|
2935
|
+
// ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
2936
|
+
import * as React34 from "react";
|
|
2937
|
+
function setRef(ref, value) {
|
|
2938
|
+
if (typeof ref === "function") {
|
|
2939
|
+
return ref(value);
|
|
2940
|
+
} else if (ref !== null && ref !== void 0) {
|
|
2941
|
+
ref.current = value;
|
|
2942
|
+
}
|
|
2943
|
+
}
|
|
2944
|
+
function composeRefs(...refs) {
|
|
2945
|
+
return (node) => {
|
|
2946
|
+
let hasCleanup = false;
|
|
2947
|
+
const cleanups = refs.map((ref) => {
|
|
2948
|
+
const cleanup = setRef(ref, node);
|
|
2949
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
|
2950
|
+
hasCleanup = true;
|
|
2951
|
+
}
|
|
2952
|
+
return cleanup;
|
|
2953
|
+
});
|
|
2954
|
+
if (hasCleanup) {
|
|
2955
|
+
return () => {
|
|
2956
|
+
for (let i = 0; i < cleanups.length; i++) {
|
|
2957
|
+
const cleanup = cleanups[i];
|
|
2958
|
+
if (typeof cleanup == "function") {
|
|
2959
|
+
cleanup();
|
|
2960
|
+
} else {
|
|
2961
|
+
setRef(refs[i], null);
|
|
2962
|
+
}
|
|
2963
|
+
}
|
|
2964
|
+
};
|
|
2965
|
+
}
|
|
2966
|
+
};
|
|
2967
|
+
}
|
|
2968
|
+
function useComposedRefs(...refs) {
|
|
2969
|
+
return React34.useCallback(composeRefs(...refs), refs);
|
|
2970
|
+
}
|
|
2971
|
+
|
|
3824
2972
|
// ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types+react_848f83211ce5e4d8275fe0d3e11a9387/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
3825
|
-
import * as
|
|
2973
|
+
import * as React54 from "react";
|
|
3826
2974
|
|
|
3827
2975
|
// ../../node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
3828
2976
|
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
@@ -3835,18 +2983,18 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
3835
2983
|
}
|
|
3836
2984
|
|
|
3837
2985
|
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
3838
|
-
import * as
|
|
2986
|
+
import * as React36 from "react";
|
|
3839
2987
|
|
|
3840
2988
|
// ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
3841
|
-
import * as
|
|
3842
|
-
var useLayoutEffect2 = (globalThis == null ? void 0 : globalThis.document) ?
|
|
2989
|
+
import * as React35 from "react";
|
|
2990
|
+
var useLayoutEffect2 = (globalThis == null ? void 0 : globalThis.document) ? React35.useLayoutEffect : () => {
|
|
3843
2991
|
};
|
|
3844
2992
|
|
|
3845
2993
|
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
3846
|
-
var useReactId =
|
|
2994
|
+
var useReactId = React36[" useId ".trim().toString()] || (() => void 0);
|
|
3847
2995
|
var count = 0;
|
|
3848
2996
|
function useId(deterministicId) {
|
|
3849
|
-
const [id, setId] =
|
|
2997
|
+
const [id, setId] = React36.useState(useReactId());
|
|
3850
2998
|
useLayoutEffect2(() => {
|
|
3851
2999
|
if (!deterministicId) setId((reactId) => reactId != null ? reactId : String(count++));
|
|
3852
3000
|
}, [deterministicId]);
|
|
@@ -3854,9 +3002,9 @@ function useId(deterministicId) {
|
|
|
3854
3002
|
}
|
|
3855
3003
|
|
|
3856
3004
|
// ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
3857
|
-
import * as
|
|
3005
|
+
import * as React37 from "react";
|
|
3858
3006
|
import * as React210 from "react";
|
|
3859
|
-
var useInsertionEffect =
|
|
3007
|
+
var useInsertionEffect = React37[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
3860
3008
|
function useControllableState({
|
|
3861
3009
|
prop,
|
|
3862
3010
|
defaultProp,
|
|
@@ -3871,8 +3019,8 @@ function useControllableState({
|
|
|
3871
3019
|
const isControlled = prop !== void 0;
|
|
3872
3020
|
const value = isControlled ? prop : uncontrolledProp;
|
|
3873
3021
|
if (true) {
|
|
3874
|
-
const isControlledRef =
|
|
3875
|
-
|
|
3022
|
+
const isControlledRef = React37.useRef(prop !== void 0);
|
|
3023
|
+
React37.useEffect(() => {
|
|
3876
3024
|
const wasControlled = isControlledRef.current;
|
|
3877
3025
|
if (wasControlled !== isControlled) {
|
|
3878
3026
|
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
@@ -3884,7 +3032,7 @@ function useControllableState({
|
|
|
3884
3032
|
isControlledRef.current = isControlled;
|
|
3885
3033
|
}, [isControlled, caller]);
|
|
3886
3034
|
}
|
|
3887
|
-
const setValue =
|
|
3035
|
+
const setValue = React37.useCallback(
|
|
3888
3036
|
(nextValue) => {
|
|
3889
3037
|
var _a;
|
|
3890
3038
|
if (isControlled) {
|
|
@@ -3904,13 +3052,13 @@ function useUncontrolledState({
|
|
|
3904
3052
|
defaultProp,
|
|
3905
3053
|
onChange
|
|
3906
3054
|
}) {
|
|
3907
|
-
const [value, setValue] =
|
|
3908
|
-
const prevValueRef =
|
|
3909
|
-
const onChangeRef =
|
|
3055
|
+
const [value, setValue] = React37.useState(defaultProp);
|
|
3056
|
+
const prevValueRef = React37.useRef(value);
|
|
3057
|
+
const onChangeRef = React37.useRef(onChange);
|
|
3910
3058
|
useInsertionEffect(() => {
|
|
3911
3059
|
onChangeRef.current = onChange;
|
|
3912
3060
|
}, [onChange]);
|
|
3913
|
-
|
|
3061
|
+
React37.useEffect(() => {
|
|
3914
3062
|
var _a;
|
|
3915
3063
|
if (prevValueRef.current !== value) {
|
|
3916
3064
|
(_a = onChangeRef.current) == null ? void 0 : _a.call(onChangeRef, value);
|
|
@@ -3925,12 +3073,111 @@ function isFunction(value) {
|
|
|
3925
3073
|
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
|
|
3926
3074
|
|
|
3927
3075
|
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.10_@types+react-dom@19.1.3_@types+react@19.1.2__@_048ea5800fbfacb7489e4b7d728b493c/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
3928
|
-
import * as
|
|
3076
|
+
import * as React42 from "react";
|
|
3929
3077
|
|
|
3930
3078
|
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.1.3_@types+react@19.1.2__@types+rea_43250ccbc78c27b15284efcf829a65d5/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
3931
|
-
import * as
|
|
3079
|
+
import * as React39 from "react";
|
|
3932
3080
|
import * as ReactDOM from "react-dom";
|
|
3933
|
-
|
|
3081
|
+
|
|
3082
|
+
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
3083
|
+
import * as React38 from "react";
|
|
3084
|
+
import { Fragment as Fragment22, jsx as jsx36 } from "react/jsx-runtime";
|
|
3085
|
+
// @__NO_SIDE_EFFECTS__
|
|
3086
|
+
function createSlot(ownerName) {
|
|
3087
|
+
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
3088
|
+
const Slot22 = React38.forwardRef((props, forwardedRef) => {
|
|
3089
|
+
const _a = props, { children } = _a, slotProps = __objRest(_a, ["children"]);
|
|
3090
|
+
const childrenArray = React38.Children.toArray(children);
|
|
3091
|
+
const slottable = childrenArray.find(isSlottable);
|
|
3092
|
+
if (slottable) {
|
|
3093
|
+
const newElement = slottable.props.children;
|
|
3094
|
+
const newChildren = childrenArray.map((child) => {
|
|
3095
|
+
if (child === slottable) {
|
|
3096
|
+
if (React38.Children.count(newElement) > 1) return React38.Children.only(null);
|
|
3097
|
+
return React38.isValidElement(newElement) ? newElement.props.children : null;
|
|
3098
|
+
} else {
|
|
3099
|
+
return child;
|
|
3100
|
+
}
|
|
3101
|
+
});
|
|
3102
|
+
return /* @__PURE__ */ jsx36(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children: React38.isValidElement(newElement) ? React38.cloneElement(newElement, void 0, newChildren) : null }));
|
|
3103
|
+
}
|
|
3104
|
+
return /* @__PURE__ */ jsx36(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children }));
|
|
3105
|
+
});
|
|
3106
|
+
Slot22.displayName = `${ownerName}.Slot`;
|
|
3107
|
+
return Slot22;
|
|
3108
|
+
}
|
|
3109
|
+
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
3110
|
+
// @__NO_SIDE_EFFECTS__
|
|
3111
|
+
function createSlotClone(ownerName) {
|
|
3112
|
+
const SlotClone = React38.forwardRef((props, forwardedRef) => {
|
|
3113
|
+
const _a = props, { children } = _a, slotProps = __objRest(_a, ["children"]);
|
|
3114
|
+
if (React38.isValidElement(children)) {
|
|
3115
|
+
const childrenRef = getElementRef(children);
|
|
3116
|
+
const props2 = mergeProps(slotProps, children.props);
|
|
3117
|
+
if (children.type !== React38.Fragment) {
|
|
3118
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
3119
|
+
}
|
|
3120
|
+
return React38.cloneElement(children, props2);
|
|
3121
|
+
}
|
|
3122
|
+
return React38.Children.count(children) > 1 ? React38.Children.only(null) : null;
|
|
3123
|
+
});
|
|
3124
|
+
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
3125
|
+
return SlotClone;
|
|
3126
|
+
}
|
|
3127
|
+
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
3128
|
+
// @__NO_SIDE_EFFECTS__
|
|
3129
|
+
function createSlottable(ownerName) {
|
|
3130
|
+
const Slottable2 = ({ children }) => {
|
|
3131
|
+
return /* @__PURE__ */ jsx36(Fragment22, { children });
|
|
3132
|
+
};
|
|
3133
|
+
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
3134
|
+
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
3135
|
+
return Slottable2;
|
|
3136
|
+
}
|
|
3137
|
+
function isSlottable(child) {
|
|
3138
|
+
return React38.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
3139
|
+
}
|
|
3140
|
+
function mergeProps(slotProps, childProps) {
|
|
3141
|
+
const overrideProps = __spreadValues({}, childProps);
|
|
3142
|
+
for (const propName in childProps) {
|
|
3143
|
+
const slotPropValue = slotProps[propName];
|
|
3144
|
+
const childPropValue = childProps[propName];
|
|
3145
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
3146
|
+
if (isHandler) {
|
|
3147
|
+
if (slotPropValue && childPropValue) {
|
|
3148
|
+
overrideProps[propName] = (...args) => {
|
|
3149
|
+
const result = childPropValue(...args);
|
|
3150
|
+
slotPropValue(...args);
|
|
3151
|
+
return result;
|
|
3152
|
+
};
|
|
3153
|
+
} else if (slotPropValue) {
|
|
3154
|
+
overrideProps[propName] = slotPropValue;
|
|
3155
|
+
}
|
|
3156
|
+
} else if (propName === "style") {
|
|
3157
|
+
overrideProps[propName] = __spreadValues(__spreadValues({}, slotPropValue), childPropValue);
|
|
3158
|
+
} else if (propName === "className") {
|
|
3159
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
3160
|
+
}
|
|
3161
|
+
}
|
|
3162
|
+
return __spreadValues(__spreadValues({}, slotProps), overrideProps);
|
|
3163
|
+
}
|
|
3164
|
+
function getElementRef(element) {
|
|
3165
|
+
var _a, _b;
|
|
3166
|
+
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
3167
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3168
|
+
if (mayWarn) {
|
|
3169
|
+
return element.ref;
|
|
3170
|
+
}
|
|
3171
|
+
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
3172
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3173
|
+
if (mayWarn) {
|
|
3174
|
+
return element.props.ref;
|
|
3175
|
+
}
|
|
3176
|
+
return element.props.ref || element.ref;
|
|
3177
|
+
}
|
|
3178
|
+
|
|
3179
|
+
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.1.3_@types+react@19.1.2__@types+rea_43250ccbc78c27b15284efcf829a65d5/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
3180
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
3934
3181
|
var NODES = [
|
|
3935
3182
|
"a",
|
|
3936
3183
|
"button",
|
|
@@ -3952,13 +3199,13 @@ var NODES = [
|
|
|
3952
3199
|
];
|
|
3953
3200
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
3954
3201
|
const Slot3 = createSlot(`Primitive.${node}`);
|
|
3955
|
-
const Node2 =
|
|
3202
|
+
const Node2 = React39.forwardRef((props, forwardedRef) => {
|
|
3956
3203
|
const _a = props, { asChild } = _a, primitiveProps = __objRest(_a, ["asChild"]);
|
|
3957
3204
|
const Comp = asChild ? Slot3 : node;
|
|
3958
3205
|
if (typeof window !== "undefined") {
|
|
3959
3206
|
window[Symbol.for("radix-ui")] = true;
|
|
3960
3207
|
}
|
|
3961
|
-
return /* @__PURE__ */
|
|
3208
|
+
return /* @__PURE__ */ jsx37(Comp, __spreadProps(__spreadValues({}, primitiveProps), { ref: forwardedRef }));
|
|
3962
3209
|
});
|
|
3963
3210
|
Node2.displayName = `Primitive.${node}`;
|
|
3964
3211
|
return __spreadProps(__spreadValues({}, primitive), { [node]: Node2 });
|
|
@@ -3968,23 +3215,23 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
3968
3215
|
}
|
|
3969
3216
|
|
|
3970
3217
|
// ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
3971
|
-
import * as
|
|
3218
|
+
import * as React40 from "react";
|
|
3972
3219
|
function useCallbackRef(callback) {
|
|
3973
|
-
const callbackRef =
|
|
3974
|
-
|
|
3220
|
+
const callbackRef = React40.useRef(callback);
|
|
3221
|
+
React40.useEffect(() => {
|
|
3975
3222
|
callbackRef.current = callback;
|
|
3976
3223
|
});
|
|
3977
|
-
return
|
|
3224
|
+
return React40.useMemo(() => (...args) => {
|
|
3978
3225
|
var _a;
|
|
3979
3226
|
return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
|
|
3980
3227
|
}, []);
|
|
3981
3228
|
}
|
|
3982
3229
|
|
|
3983
3230
|
// ../../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
3984
|
-
import * as
|
|
3231
|
+
import * as React41 from "react";
|
|
3985
3232
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
3986
3233
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
3987
|
-
|
|
3234
|
+
React41.useEffect(() => {
|
|
3988
3235
|
const handleKeyDown = (event) => {
|
|
3989
3236
|
if (event.key === "Escape") {
|
|
3990
3237
|
onEscapeKeyDown(event);
|
|
@@ -3996,18 +3243,18 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis == nul
|
|
|
3996
3243
|
}
|
|
3997
3244
|
|
|
3998
3245
|
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.10_@types+react-dom@19.1.3_@types+react@19.1.2__@_048ea5800fbfacb7489e4b7d728b493c/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
3999
|
-
import { jsx as
|
|
3246
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
4000
3247
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
4001
3248
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
4002
3249
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
4003
3250
|
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
4004
3251
|
var originalBodyPointerEvents;
|
|
4005
|
-
var DismissableLayerContext =
|
|
3252
|
+
var DismissableLayerContext = React42.createContext({
|
|
4006
3253
|
layers: /* @__PURE__ */ new Set(),
|
|
4007
3254
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
4008
3255
|
branches: /* @__PURE__ */ new Set()
|
|
4009
3256
|
});
|
|
4010
|
-
var DismissableLayer =
|
|
3257
|
+
var DismissableLayer = React42.forwardRef(
|
|
4011
3258
|
(props, forwardedRef) => {
|
|
4012
3259
|
var _b;
|
|
4013
3260
|
const _a = props, {
|
|
@@ -4025,10 +3272,10 @@ var DismissableLayer = React45.forwardRef(
|
|
|
4025
3272
|
"onInteractOutside",
|
|
4026
3273
|
"onDismiss"
|
|
4027
3274
|
]);
|
|
4028
|
-
const context =
|
|
4029
|
-
const [node, setNode] =
|
|
3275
|
+
const context = React42.useContext(DismissableLayerContext);
|
|
3276
|
+
const [node, setNode] = React42.useState(null);
|
|
4030
3277
|
const ownerDocument = (_b = node == null ? void 0 : node.ownerDocument) != null ? _b : globalThis == null ? void 0 : globalThis.document;
|
|
4031
|
-
const [, force] =
|
|
3278
|
+
const [, force] = React42.useState({});
|
|
4032
3279
|
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
|
4033
3280
|
const layers = Array.from(context.layers);
|
|
4034
3281
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
@@ -4061,7 +3308,7 @@ var DismissableLayer = React45.forwardRef(
|
|
|
4061
3308
|
onDismiss();
|
|
4062
3309
|
}
|
|
4063
3310
|
}, ownerDocument);
|
|
4064
|
-
|
|
3311
|
+
React42.useEffect(() => {
|
|
4065
3312
|
if (!node) return;
|
|
4066
3313
|
if (disableOutsidePointerEvents) {
|
|
4067
3314
|
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
@@ -4078,7 +3325,7 @@ var DismissableLayer = React45.forwardRef(
|
|
|
4078
3325
|
}
|
|
4079
3326
|
};
|
|
4080
3327
|
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
|
4081
|
-
|
|
3328
|
+
React42.useEffect(() => {
|
|
4082
3329
|
return () => {
|
|
4083
3330
|
if (!node) return;
|
|
4084
3331
|
context.layers.delete(node);
|
|
@@ -4086,12 +3333,12 @@ var DismissableLayer = React45.forwardRef(
|
|
|
4086
3333
|
dispatchUpdate();
|
|
4087
3334
|
};
|
|
4088
3335
|
}, [node, context]);
|
|
4089
|
-
|
|
3336
|
+
React42.useEffect(() => {
|
|
4090
3337
|
const handleUpdate = () => force({});
|
|
4091
3338
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
4092
3339
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
4093
3340
|
}, []);
|
|
4094
|
-
return /* @__PURE__ */
|
|
3341
|
+
return /* @__PURE__ */ jsx38(
|
|
4095
3342
|
Primitive.div,
|
|
4096
3343
|
__spreadProps(__spreadValues({}, layerProps), {
|
|
4097
3344
|
ref: composedRefs,
|
|
@@ -4110,11 +3357,11 @@ var DismissableLayer = React45.forwardRef(
|
|
|
4110
3357
|
);
|
|
4111
3358
|
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
4112
3359
|
var BRANCH_NAME = "DismissableLayerBranch";
|
|
4113
|
-
var DismissableLayerBranch =
|
|
4114
|
-
const context =
|
|
4115
|
-
const ref =
|
|
3360
|
+
var DismissableLayerBranch = React42.forwardRef((props, forwardedRef) => {
|
|
3361
|
+
const context = React42.useContext(DismissableLayerContext);
|
|
3362
|
+
const ref = React42.useRef(null);
|
|
4116
3363
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
4117
|
-
|
|
3364
|
+
React42.useEffect(() => {
|
|
4118
3365
|
const node = ref.current;
|
|
4119
3366
|
if (node) {
|
|
4120
3367
|
context.branches.add(node);
|
|
@@ -4123,15 +3370,15 @@ var DismissableLayerBranch = React45.forwardRef((props, forwardedRef) => {
|
|
|
4123
3370
|
};
|
|
4124
3371
|
}
|
|
4125
3372
|
}, [context.branches]);
|
|
4126
|
-
return /* @__PURE__ */
|
|
3373
|
+
return /* @__PURE__ */ jsx38(Primitive.div, __spreadProps(__spreadValues({}, props), { ref: composedRefs }));
|
|
4127
3374
|
});
|
|
4128
3375
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
4129
3376
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
4130
3377
|
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
4131
|
-
const isPointerInsideReactTreeRef =
|
|
4132
|
-
const handleClickRef =
|
|
3378
|
+
const isPointerInsideReactTreeRef = React42.useRef(false);
|
|
3379
|
+
const handleClickRef = React42.useRef(() => {
|
|
4133
3380
|
});
|
|
4134
|
-
|
|
3381
|
+
React42.useEffect(() => {
|
|
4135
3382
|
const handlePointerDown = (event) => {
|
|
4136
3383
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
4137
3384
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
@@ -4172,8 +3419,8 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis
|
|
|
4172
3419
|
}
|
|
4173
3420
|
function useFocusOutside(onFocusOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
4174
3421
|
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
|
4175
|
-
const isFocusInsideReactTreeRef =
|
|
4176
|
-
|
|
3422
|
+
const isFocusInsideReactTreeRef = React42.useRef(false);
|
|
3423
|
+
React42.useEffect(() => {
|
|
4177
3424
|
const handleFocus = (event) => {
|
|
4178
3425
|
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
4179
3426
|
const eventDetail = { originalEvent: event };
|
|
@@ -4206,13 +3453,13 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
4206
3453
|
}
|
|
4207
3454
|
|
|
4208
3455
|
// ../../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.3_@types+react@19.1.2__@types+r_1ff7b04b7c975087a2da2b1568ac976e/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
4209
|
-
import * as
|
|
4210
|
-
import { jsx as
|
|
3456
|
+
import * as React43 from "react";
|
|
3457
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
4211
3458
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
4212
3459
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
4213
3460
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
4214
3461
|
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
4215
|
-
var FocusScope =
|
|
3462
|
+
var FocusScope = React43.forwardRef((props, forwardedRef) => {
|
|
4216
3463
|
const _a = props, {
|
|
4217
3464
|
loop = false,
|
|
4218
3465
|
trapped = false,
|
|
@@ -4224,12 +3471,12 @@ var FocusScope = React46.forwardRef((props, forwardedRef) => {
|
|
|
4224
3471
|
"onMountAutoFocus",
|
|
4225
3472
|
"onUnmountAutoFocus"
|
|
4226
3473
|
]);
|
|
4227
|
-
const [container, setContainer] =
|
|
3474
|
+
const [container, setContainer] = React43.useState(null);
|
|
4228
3475
|
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
4229
3476
|
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
4230
|
-
const lastFocusedElementRef =
|
|
3477
|
+
const lastFocusedElementRef = React43.useRef(null);
|
|
4231
3478
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
|
|
4232
|
-
const focusScope =
|
|
3479
|
+
const focusScope = React43.useRef({
|
|
4233
3480
|
paused: false,
|
|
4234
3481
|
pause() {
|
|
4235
3482
|
this.paused = true;
|
|
@@ -4238,7 +3485,7 @@ var FocusScope = React46.forwardRef((props, forwardedRef) => {
|
|
|
4238
3485
|
this.paused = false;
|
|
4239
3486
|
}
|
|
4240
3487
|
}).current;
|
|
4241
|
-
|
|
3488
|
+
React43.useEffect(() => {
|
|
4242
3489
|
if (trapped) {
|
|
4243
3490
|
let handleFocusIn2 = function(event) {
|
|
4244
3491
|
if (focusScope.paused || !container) return;
|
|
@@ -4274,7 +3521,7 @@ var FocusScope = React46.forwardRef((props, forwardedRef) => {
|
|
|
4274
3521
|
};
|
|
4275
3522
|
}
|
|
4276
3523
|
}, [trapped, container, focusScope.paused]);
|
|
4277
|
-
|
|
3524
|
+
React43.useEffect(() => {
|
|
4278
3525
|
if (container) {
|
|
4279
3526
|
focusScopesStack.add(focusScope);
|
|
4280
3527
|
const previouslyFocusedElement = document.activeElement;
|
|
@@ -4305,7 +3552,7 @@ var FocusScope = React46.forwardRef((props, forwardedRef) => {
|
|
|
4305
3552
|
};
|
|
4306
3553
|
}
|
|
4307
3554
|
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
4308
|
-
const handleKeyDown =
|
|
3555
|
+
const handleKeyDown = React43.useCallback(
|
|
4309
3556
|
(event) => {
|
|
4310
3557
|
if (!loop && !trapped) return;
|
|
4311
3558
|
if (focusScope.paused) return;
|
|
@@ -4330,7 +3577,7 @@ var FocusScope = React46.forwardRef((props, forwardedRef) => {
|
|
|
4330
3577
|
},
|
|
4331
3578
|
[loop, trapped, focusScope.paused]
|
|
4332
3579
|
);
|
|
4333
|
-
return /* @__PURE__ */
|
|
3580
|
+
return /* @__PURE__ */ jsx39(Primitive.div, __spreadProps(__spreadValues({ tabIndex: -1 }, scopeProps), { ref: composedRefs, onKeyDown: handleKeyDown }));
|
|
4334
3581
|
});
|
|
4335
3582
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
4336
3583
|
function focusFirst(candidates, { select = false } = {}) {
|
|
@@ -4415,25 +3662,25 @@ function removeLinks(items) {
|
|
|
4415
3662
|
}
|
|
4416
3663
|
|
|
4417
3664
|
// ../../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@19.1.3_@types+react@19.1.2__@types+react@_a0745de0839b0b019298ec068509a840/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
4418
|
-
import * as
|
|
3665
|
+
import * as React44 from "react";
|
|
4419
3666
|
import ReactDOM2 from "react-dom";
|
|
4420
|
-
import { jsx as
|
|
3667
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
4421
3668
|
var PORTAL_NAME = "Portal";
|
|
4422
|
-
var Portal =
|
|
3669
|
+
var Portal = React44.forwardRef((props, forwardedRef) => {
|
|
4423
3670
|
var _b;
|
|
4424
3671
|
const _a = props, { container: containerProp } = _a, portalProps = __objRest(_a, ["container"]);
|
|
4425
|
-
const [mounted, setMounted] =
|
|
3672
|
+
const [mounted, setMounted] = React44.useState(false);
|
|
4426
3673
|
useLayoutEffect2(() => setMounted(true), []);
|
|
4427
3674
|
const container = containerProp || mounted && ((_b = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _b.body);
|
|
4428
|
-
return container ? ReactDOM2.createPortal(/* @__PURE__ */
|
|
3675
|
+
return container ? ReactDOM2.createPortal(/* @__PURE__ */ jsx40(Primitive.div, __spreadProps(__spreadValues({}, portalProps), { ref: forwardedRef })), container) : null;
|
|
4429
3676
|
});
|
|
4430
3677
|
Portal.displayName = PORTAL_NAME;
|
|
4431
3678
|
|
|
4432
3679
|
// ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.4_@types+react-dom@19.1.3_@types+react@19.1.2__@types+reac_dbbe976722e7c3e02883ea31c3bbbf14/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
4433
3680
|
import * as React211 from "react";
|
|
4434
|
-
import * as
|
|
3681
|
+
import * as React45 from "react";
|
|
4435
3682
|
function useStateMachine(initialState, machine) {
|
|
4436
|
-
return
|
|
3683
|
+
return React45.useReducer((state, event) => {
|
|
4437
3684
|
const nextState = machine[state][event];
|
|
4438
3685
|
return nextState != null ? nextState : state;
|
|
4439
3686
|
}, initialState);
|
|
@@ -4558,10 +3805,10 @@ function getElementRef2(element) {
|
|
|
4558
3805
|
}
|
|
4559
3806
|
|
|
4560
3807
|
// ../../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
4561
|
-
import * as
|
|
3808
|
+
import * as React46 from "react";
|
|
4562
3809
|
var count2 = 0;
|
|
4563
3810
|
function useFocusGuards() {
|
|
4564
|
-
|
|
3811
|
+
React46.useEffect(() => {
|
|
4565
3812
|
var _a, _b;
|
|
4566
3813
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
4567
3814
|
document.body.insertAdjacentElement("afterbegin", (_a = edgeGuards[0]) != null ? _a : createFocusGuard());
|
|
@@ -4619,10 +3866,10 @@ function __spreadArray(to, from, pack) {
|
|
|
4619
3866
|
}
|
|
4620
3867
|
|
|
4621
3868
|
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
4622
|
-
import * as
|
|
3869
|
+
import * as React53 from "react";
|
|
4623
3870
|
|
|
4624
3871
|
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
4625
|
-
import * as
|
|
3872
|
+
import * as React49 from "react";
|
|
4626
3873
|
|
|
4627
3874
|
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
|
|
4628
3875
|
var zeroRightClassName = "right-scroll-bar-position";
|
|
@@ -4641,9 +3888,9 @@ function assignRef(ref, value) {
|
|
|
4641
3888
|
}
|
|
4642
3889
|
|
|
4643
3890
|
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.1.2_react@19.1.0/node_modules/use-callback-ref/dist/es2015/useRef.js
|
|
4644
|
-
import { useState as
|
|
3891
|
+
import { useState as useState8 } from "react";
|
|
4645
3892
|
function useCallbackRef2(initialValue, callback) {
|
|
4646
|
-
var ref =
|
|
3893
|
+
var ref = useState8(function() {
|
|
4647
3894
|
return {
|
|
4648
3895
|
// value
|
|
4649
3896
|
value: initialValue,
|
|
@@ -4669,8 +3916,8 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
4669
3916
|
}
|
|
4670
3917
|
|
|
4671
3918
|
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.1.2_react@19.1.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
|
|
4672
|
-
import * as
|
|
4673
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
3919
|
+
import * as React47 from "react";
|
|
3920
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React47.useLayoutEffect : React47.useEffect;
|
|
4674
3921
|
var currentValues = /* @__PURE__ */ new WeakMap();
|
|
4675
3922
|
function useMergeRefs(refs, defaultValue) {
|
|
4676
3923
|
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
@@ -4787,7 +4034,7 @@ function createSidecarMedium(options) {
|
|
|
4787
4034
|
}
|
|
4788
4035
|
|
|
4789
4036
|
// ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.1.2_react@19.1.0/node_modules/use-sidecar/dist/es2015/exports.js
|
|
4790
|
-
import * as
|
|
4037
|
+
import * as React48 from "react";
|
|
4791
4038
|
var SideCar = function(_a) {
|
|
4792
4039
|
var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
|
|
4793
4040
|
if (!sideCar) {
|
|
@@ -4797,7 +4044,7 @@ var SideCar = function(_a) {
|
|
|
4797
4044
|
if (!Target) {
|
|
4798
4045
|
throw new Error("Sidecar medium not found");
|
|
4799
4046
|
}
|
|
4800
|
-
return
|
|
4047
|
+
return React48.createElement(Target, __assign({}, rest));
|
|
4801
4048
|
};
|
|
4802
4049
|
SideCar.isSideCarExport = true;
|
|
4803
4050
|
function exportSidecar(medium, exported) {
|
|
@@ -4812,9 +4059,9 @@ var effectCar = createSidecarMedium();
|
|
|
4812
4059
|
var nothing = function() {
|
|
4813
4060
|
return;
|
|
4814
4061
|
};
|
|
4815
|
-
var RemoveScroll =
|
|
4816
|
-
var ref =
|
|
4817
|
-
var _a =
|
|
4062
|
+
var RemoveScroll = React49.forwardRef(function(props, parentRef) {
|
|
4063
|
+
var ref = React49.useRef(null);
|
|
4064
|
+
var _a = React49.useState({
|
|
4818
4065
|
onScrollCapture: nothing,
|
|
4819
4066
|
onWheelCapture: nothing,
|
|
4820
4067
|
onTouchMoveCapture: nothing
|
|
@@ -4823,11 +4070,11 @@ var RemoveScroll = React52.forwardRef(function(props, parentRef) {
|
|
|
4823
4070
|
var SideCar2 = sideCar;
|
|
4824
4071
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
4825
4072
|
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
4826
|
-
return
|
|
4827
|
-
|
|
4073
|
+
return React49.createElement(
|
|
4074
|
+
React49.Fragment,
|
|
4828
4075
|
null,
|
|
4829
|
-
enabled &&
|
|
4830
|
-
forwardProps ?
|
|
4076
|
+
enabled && React49.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
|
|
4077
|
+
forwardProps ? React49.cloneElement(React49.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React49.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
|
|
4831
4078
|
);
|
|
4832
4079
|
});
|
|
4833
4080
|
RemoveScroll.defaultProps = {
|
|
@@ -4841,13 +4088,13 @@ RemoveScroll.classNames = {
|
|
|
4841
4088
|
};
|
|
4842
4089
|
|
|
4843
4090
|
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
4844
|
-
import * as
|
|
4091
|
+
import * as React52 from "react";
|
|
4845
4092
|
|
|
4846
4093
|
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
4847
|
-
import * as
|
|
4094
|
+
import * as React51 from "react";
|
|
4848
4095
|
|
|
4849
4096
|
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.1.2_react@19.1.0/node_modules/react-style-singleton/dist/es2015/hook.js
|
|
4850
|
-
import * as
|
|
4097
|
+
import * as React50 from "react";
|
|
4851
4098
|
|
|
4852
4099
|
// ../../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
|
|
4853
4100
|
var currentNonce;
|
|
@@ -4911,7 +4158,7 @@ var stylesheetSingleton = function() {
|
|
|
4911
4158
|
var styleHookSingleton = function() {
|
|
4912
4159
|
var sheet = stylesheetSingleton();
|
|
4913
4160
|
return function(styles, isDynamic) {
|
|
4914
|
-
|
|
4161
|
+
React50.useEffect(function() {
|
|
4915
4162
|
sheet.add(styles);
|
|
4916
4163
|
return function() {
|
|
4917
4164
|
sheet.remove();
|
|
@@ -4985,7 +4232,7 @@ var getCurrentUseCounter = function() {
|
|
|
4985
4232
|
return isFinite(counter) ? counter : 0;
|
|
4986
4233
|
};
|
|
4987
4234
|
var useLockAttribute = function() {
|
|
4988
|
-
|
|
4235
|
+
React51.useEffect(function() {
|
|
4989
4236
|
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
4990
4237
|
return function() {
|
|
4991
4238
|
var newCounter = getCurrentUseCounter() - 1;
|
|
@@ -5000,10 +4247,10 @@ var useLockAttribute = function() {
|
|
|
5000
4247
|
var RemoveScrollBar = function(_a) {
|
|
5001
4248
|
var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
|
|
5002
4249
|
useLockAttribute();
|
|
5003
|
-
var gap =
|
|
4250
|
+
var gap = React51.useMemo(function() {
|
|
5004
4251
|
return getGapWidth(gapMode);
|
|
5005
4252
|
}, [gapMode]);
|
|
5006
|
-
return
|
|
4253
|
+
return React51.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
5007
4254
|
};
|
|
5008
4255
|
|
|
5009
4256
|
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
@@ -5144,16 +4391,16 @@ var generateStyle = function(id) {
|
|
|
5144
4391
|
var idCounter = 0;
|
|
5145
4392
|
var lockStack = [];
|
|
5146
4393
|
function RemoveScrollSideCar(props) {
|
|
5147
|
-
var shouldPreventQueue =
|
|
5148
|
-
var touchStartRef =
|
|
5149
|
-
var activeAxis =
|
|
5150
|
-
var id =
|
|
5151
|
-
var Style2 =
|
|
5152
|
-
var lastProps =
|
|
5153
|
-
|
|
4394
|
+
var shouldPreventQueue = React52.useRef([]);
|
|
4395
|
+
var touchStartRef = React52.useRef([0, 0]);
|
|
4396
|
+
var activeAxis = React52.useRef();
|
|
4397
|
+
var id = React52.useState(idCounter++)[0];
|
|
4398
|
+
var Style2 = React52.useState(styleSingleton)[0];
|
|
4399
|
+
var lastProps = React52.useRef(props);
|
|
4400
|
+
React52.useEffect(function() {
|
|
5154
4401
|
lastProps.current = props;
|
|
5155
4402
|
}, [props]);
|
|
5156
|
-
|
|
4403
|
+
React52.useEffect(function() {
|
|
5157
4404
|
if (props.inert) {
|
|
5158
4405
|
document.body.classList.add("block-interactivity-".concat(id));
|
|
5159
4406
|
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
@@ -5169,7 +4416,7 @@ function RemoveScrollSideCar(props) {
|
|
|
5169
4416
|
}
|
|
5170
4417
|
return;
|
|
5171
4418
|
}, [props.inert, props.lockRef.current, props.shards]);
|
|
5172
|
-
var shouldCancelEvent =
|
|
4419
|
+
var shouldCancelEvent = React52.useCallback(function(event, parent) {
|
|
5173
4420
|
if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
|
|
5174
4421
|
return !lastProps.current.allowPinchZoom;
|
|
5175
4422
|
}
|
|
@@ -5205,7 +4452,7 @@ function RemoveScrollSideCar(props) {
|
|
|
5205
4452
|
var cancelingAxis = activeAxis.current || currentAxis;
|
|
5206
4453
|
return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
|
|
5207
4454
|
}, []);
|
|
5208
|
-
var shouldPrevent =
|
|
4455
|
+
var shouldPrevent = React52.useCallback(function(_event) {
|
|
5209
4456
|
var event = _event;
|
|
5210
4457
|
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
|
|
5211
4458
|
return;
|
|
@@ -5232,7 +4479,7 @@ function RemoveScrollSideCar(props) {
|
|
|
5232
4479
|
}
|
|
5233
4480
|
}
|
|
5234
4481
|
}, []);
|
|
5235
|
-
var shouldCancel =
|
|
4482
|
+
var shouldCancel = React52.useCallback(function(name, delta, target, should) {
|
|
5236
4483
|
var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
5237
4484
|
shouldPreventQueue.current.push(event);
|
|
5238
4485
|
setTimeout(function() {
|
|
@@ -5241,17 +4488,17 @@ function RemoveScrollSideCar(props) {
|
|
|
5241
4488
|
});
|
|
5242
4489
|
}, 1);
|
|
5243
4490
|
}, []);
|
|
5244
|
-
var scrollTouchStart =
|
|
4491
|
+
var scrollTouchStart = React52.useCallback(function(event) {
|
|
5245
4492
|
touchStartRef.current = getTouchXY(event);
|
|
5246
4493
|
activeAxis.current = void 0;
|
|
5247
4494
|
}, []);
|
|
5248
|
-
var scrollWheel =
|
|
4495
|
+
var scrollWheel = React52.useCallback(function(event) {
|
|
5249
4496
|
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
5250
4497
|
}, []);
|
|
5251
|
-
var scrollTouchMove =
|
|
4498
|
+
var scrollTouchMove = React52.useCallback(function(event) {
|
|
5252
4499
|
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
5253
4500
|
}, []);
|
|
5254
|
-
|
|
4501
|
+
React52.useEffect(function() {
|
|
5255
4502
|
lockStack.push(Style2);
|
|
5256
4503
|
props.setCallbacks({
|
|
5257
4504
|
onScrollCapture: scrollWheel,
|
|
@@ -5271,11 +4518,11 @@ function RemoveScrollSideCar(props) {
|
|
|
5271
4518
|
};
|
|
5272
4519
|
}, []);
|
|
5273
4520
|
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
5274
|
-
return
|
|
5275
|
-
|
|
4521
|
+
return React52.createElement(
|
|
4522
|
+
React52.Fragment,
|
|
5276
4523
|
null,
|
|
5277
|
-
inert ?
|
|
5278
|
-
removeScrollBar ?
|
|
4524
|
+
inert ? React52.createElement(Style2, { styles: generateStyle(id) }) : null,
|
|
4525
|
+
removeScrollBar ? React52.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
|
|
5279
4526
|
);
|
|
5280
4527
|
}
|
|
5281
4528
|
function getOutermostShadowParent(node) {
|
|
@@ -5294,8 +4541,8 @@ function getOutermostShadowParent(node) {
|
|
|
5294
4541
|
var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
5295
4542
|
|
|
5296
4543
|
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
5297
|
-
var ReactRemoveScroll =
|
|
5298
|
-
return
|
|
4544
|
+
var ReactRemoveScroll = React53.forwardRef(function(props, ref) {
|
|
4545
|
+
return React53.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
|
|
5299
4546
|
});
|
|
5300
4547
|
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
5301
4548
|
var Combination_default = ReactRemoveScroll;
|
|
@@ -5422,7 +4669,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
|
5422
4669
|
};
|
|
5423
4670
|
|
|
5424
4671
|
// ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types+react_848f83211ce5e4d8275fe0d3e11a9387/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
5425
|
-
import { Fragment as
|
|
4672
|
+
import { Fragment as Fragment5, jsx as jsx41, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
5426
4673
|
var DIALOG_NAME = "Dialog";
|
|
5427
4674
|
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
5428
4675
|
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
@@ -5435,15 +4682,15 @@ var Dialog = (props) => {
|
|
|
5435
4682
|
onOpenChange,
|
|
5436
4683
|
modal = true
|
|
5437
4684
|
} = props;
|
|
5438
|
-
const triggerRef =
|
|
5439
|
-
const contentRef =
|
|
4685
|
+
const triggerRef = React54.useRef(null);
|
|
4686
|
+
const contentRef = React54.useRef(null);
|
|
5440
4687
|
const [open, setOpen] = useControllableState({
|
|
5441
4688
|
prop: openProp,
|
|
5442
4689
|
defaultProp: defaultOpen != null ? defaultOpen : false,
|
|
5443
4690
|
onChange: onOpenChange,
|
|
5444
4691
|
caller: DIALOG_NAME
|
|
5445
4692
|
});
|
|
5446
|
-
return /* @__PURE__ */
|
|
4693
|
+
return /* @__PURE__ */ jsx41(
|
|
5447
4694
|
DialogProvider,
|
|
5448
4695
|
{
|
|
5449
4696
|
scope: __scopeDialog,
|
|
@@ -5454,7 +4701,7 @@ var Dialog = (props) => {
|
|
|
5454
4701
|
descriptionId: useId(),
|
|
5455
4702
|
open,
|
|
5456
4703
|
onOpenChange: setOpen,
|
|
5457
|
-
onOpenToggle:
|
|
4704
|
+
onOpenToggle: React54.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
5458
4705
|
modal,
|
|
5459
4706
|
children
|
|
5460
4707
|
}
|
|
@@ -5462,12 +4709,12 @@ var Dialog = (props) => {
|
|
|
5462
4709
|
};
|
|
5463
4710
|
Dialog.displayName = DIALOG_NAME;
|
|
5464
4711
|
var TRIGGER_NAME = "DialogTrigger";
|
|
5465
|
-
var DialogTrigger =
|
|
4712
|
+
var DialogTrigger = React54.forwardRef(
|
|
5466
4713
|
(props, forwardedRef) => {
|
|
5467
4714
|
const _a = props, { __scopeDialog } = _a, triggerProps = __objRest(_a, ["__scopeDialog"]);
|
|
5468
4715
|
const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
|
|
5469
4716
|
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
5470
|
-
return /* @__PURE__ */
|
|
4717
|
+
return /* @__PURE__ */ jsx41(
|
|
5471
4718
|
Primitive.button,
|
|
5472
4719
|
__spreadProps(__spreadValues({
|
|
5473
4720
|
type: "button",
|
|
@@ -5490,28 +4737,28 @@ var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME2, {
|
|
|
5490
4737
|
var DialogPortal = (props) => {
|
|
5491
4738
|
const { __scopeDialog, forceMount, children, container } = props;
|
|
5492
4739
|
const context = useDialogContext(PORTAL_NAME2, __scopeDialog);
|
|
5493
|
-
return /* @__PURE__ */
|
|
4740
|
+
return /* @__PURE__ */ jsx41(PortalProvider, { scope: __scopeDialog, forceMount, children: React54.Children.map(children, (child) => /* @__PURE__ */ jsx41(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx41(Portal, { asChild: true, container, children: child }) })) });
|
|
5494
4741
|
};
|
|
5495
4742
|
DialogPortal.displayName = PORTAL_NAME2;
|
|
5496
4743
|
var OVERLAY_NAME = "DialogOverlay";
|
|
5497
|
-
var DialogOverlay =
|
|
4744
|
+
var DialogOverlay = React54.forwardRef(
|
|
5498
4745
|
(props, forwardedRef) => {
|
|
5499
4746
|
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
|
5500
4747
|
const _a = props, { forceMount = portalContext.forceMount } = _a, overlayProps = __objRest(_a, ["forceMount"]);
|
|
5501
4748
|
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
|
5502
|
-
return context.modal ? /* @__PURE__ */
|
|
4749
|
+
return context.modal ? /* @__PURE__ */ jsx41(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx41(DialogOverlayImpl, __spreadProps(__spreadValues({}, overlayProps), { ref: forwardedRef })) }) : null;
|
|
5503
4750
|
}
|
|
5504
4751
|
);
|
|
5505
4752
|
DialogOverlay.displayName = OVERLAY_NAME;
|
|
5506
4753
|
var Slot2 = createSlot("DialogOverlay.RemoveScroll");
|
|
5507
|
-
var DialogOverlayImpl =
|
|
4754
|
+
var DialogOverlayImpl = React54.forwardRef(
|
|
5508
4755
|
(props, forwardedRef) => {
|
|
5509
4756
|
const _a = props, { __scopeDialog } = _a, overlayProps = __objRest(_a, ["__scopeDialog"]);
|
|
5510
4757
|
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
|
5511
4758
|
return (
|
|
5512
4759
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
5513
4760
|
// ie. when `Overlay` and `Content` are siblings
|
|
5514
|
-
/* @__PURE__ */
|
|
4761
|
+
/* @__PURE__ */ jsx41(Combination_default, { as: Slot2, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx41(
|
|
5515
4762
|
Primitive.div,
|
|
5516
4763
|
__spreadProps(__spreadValues({
|
|
5517
4764
|
"data-state": getState(context.open)
|
|
@@ -5524,25 +4771,25 @@ var DialogOverlayImpl = React57.forwardRef(
|
|
|
5524
4771
|
}
|
|
5525
4772
|
);
|
|
5526
4773
|
var CONTENT_NAME = "DialogContent";
|
|
5527
|
-
var DialogContent =
|
|
4774
|
+
var DialogContent = React54.forwardRef(
|
|
5528
4775
|
(props, forwardedRef) => {
|
|
5529
4776
|
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
|
|
5530
4777
|
const _a = props, { forceMount = portalContext.forceMount } = _a, contentProps = __objRest(_a, ["forceMount"]);
|
|
5531
4778
|
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
5532
|
-
return /* @__PURE__ */
|
|
4779
|
+
return /* @__PURE__ */ jsx41(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx41(DialogContentModal, __spreadProps(__spreadValues({}, contentProps), { ref: forwardedRef })) : /* @__PURE__ */ jsx41(DialogContentNonModal, __spreadProps(__spreadValues({}, contentProps), { ref: forwardedRef })) });
|
|
5533
4780
|
}
|
|
5534
4781
|
);
|
|
5535
4782
|
DialogContent.displayName = CONTENT_NAME;
|
|
5536
|
-
var DialogContentModal =
|
|
4783
|
+
var DialogContentModal = React54.forwardRef(
|
|
5537
4784
|
(props, forwardedRef) => {
|
|
5538
4785
|
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
5539
|
-
const contentRef =
|
|
4786
|
+
const contentRef = React54.useRef(null);
|
|
5540
4787
|
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
5541
|
-
|
|
4788
|
+
React54.useEffect(() => {
|
|
5542
4789
|
const content = contentRef.current;
|
|
5543
4790
|
if (content) return hideOthers(content);
|
|
5544
4791
|
}, []);
|
|
5545
|
-
return /* @__PURE__ */
|
|
4792
|
+
return /* @__PURE__ */ jsx41(
|
|
5546
4793
|
DialogContentImpl,
|
|
5547
4794
|
__spreadProps(__spreadValues({}, props), {
|
|
5548
4795
|
ref: composedRefs,
|
|
@@ -5567,12 +4814,12 @@ var DialogContentModal = React57.forwardRef(
|
|
|
5567
4814
|
);
|
|
5568
4815
|
}
|
|
5569
4816
|
);
|
|
5570
|
-
var DialogContentNonModal =
|
|
4817
|
+
var DialogContentNonModal = React54.forwardRef(
|
|
5571
4818
|
(props, forwardedRef) => {
|
|
5572
4819
|
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
5573
|
-
const hasInteractedOutsideRef =
|
|
5574
|
-
const hasPointerDownOutsideRef =
|
|
5575
|
-
return /* @__PURE__ */
|
|
4820
|
+
const hasInteractedOutsideRef = React54.useRef(false);
|
|
4821
|
+
const hasPointerDownOutsideRef = React54.useRef(false);
|
|
4822
|
+
return /* @__PURE__ */ jsx41(
|
|
5576
4823
|
DialogContentImpl,
|
|
5577
4824
|
__spreadProps(__spreadValues({}, props), {
|
|
5578
4825
|
ref: forwardedRef,
|
|
@@ -5608,15 +4855,15 @@ var DialogContentNonModal = React57.forwardRef(
|
|
|
5608
4855
|
);
|
|
5609
4856
|
}
|
|
5610
4857
|
);
|
|
5611
|
-
var DialogContentImpl =
|
|
4858
|
+
var DialogContentImpl = React54.forwardRef(
|
|
5612
4859
|
(props, forwardedRef) => {
|
|
5613
4860
|
const _a = props, { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus } = _a, contentProps = __objRest(_a, ["__scopeDialog", "trapFocus", "onOpenAutoFocus", "onCloseAutoFocus"]);
|
|
5614
4861
|
const context = useDialogContext(CONTENT_NAME, __scopeDialog);
|
|
5615
|
-
const contentRef =
|
|
4862
|
+
const contentRef = React54.useRef(null);
|
|
5616
4863
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
5617
4864
|
useFocusGuards();
|
|
5618
|
-
return /* @__PURE__ */
|
|
5619
|
-
/* @__PURE__ */
|
|
4865
|
+
return /* @__PURE__ */ jsxs11(Fragment5, { children: [
|
|
4866
|
+
/* @__PURE__ */ jsx41(
|
|
5620
4867
|
FocusScope,
|
|
5621
4868
|
{
|
|
5622
4869
|
asChild: true,
|
|
@@ -5624,7 +4871,7 @@ var DialogContentImpl = React57.forwardRef(
|
|
|
5624
4871
|
trapped: trapFocus,
|
|
5625
4872
|
onMountAutoFocus: onOpenAutoFocus,
|
|
5626
4873
|
onUnmountAutoFocus: onCloseAutoFocus,
|
|
5627
|
-
children: /* @__PURE__ */
|
|
4874
|
+
children: /* @__PURE__ */ jsx41(
|
|
5628
4875
|
DismissableLayer,
|
|
5629
4876
|
__spreadProps(__spreadValues({
|
|
5630
4877
|
role: "dialog",
|
|
@@ -5639,37 +4886,37 @@ var DialogContentImpl = React57.forwardRef(
|
|
|
5639
4886
|
)
|
|
5640
4887
|
}
|
|
5641
4888
|
),
|
|
5642
|
-
/* @__PURE__ */
|
|
5643
|
-
/* @__PURE__ */
|
|
5644
|
-
/* @__PURE__ */
|
|
4889
|
+
/* @__PURE__ */ jsxs11(Fragment5, { children: [
|
|
4890
|
+
/* @__PURE__ */ jsx41(TitleWarning, { titleId: context.titleId }),
|
|
4891
|
+
/* @__PURE__ */ jsx41(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
5645
4892
|
] })
|
|
5646
4893
|
] });
|
|
5647
4894
|
}
|
|
5648
4895
|
);
|
|
5649
4896
|
var TITLE_NAME = "DialogTitle";
|
|
5650
|
-
var DialogTitle =
|
|
4897
|
+
var DialogTitle = React54.forwardRef(
|
|
5651
4898
|
(props, forwardedRef) => {
|
|
5652
4899
|
const _a = props, { __scopeDialog } = _a, titleProps = __objRest(_a, ["__scopeDialog"]);
|
|
5653
4900
|
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
5654
|
-
return /* @__PURE__ */
|
|
4901
|
+
return /* @__PURE__ */ jsx41(Primitive.h2, __spreadProps(__spreadValues({ id: context.titleId }, titleProps), { ref: forwardedRef }));
|
|
5655
4902
|
}
|
|
5656
4903
|
);
|
|
5657
4904
|
DialogTitle.displayName = TITLE_NAME;
|
|
5658
4905
|
var DESCRIPTION_NAME = "DialogDescription";
|
|
5659
|
-
var DialogDescription =
|
|
4906
|
+
var DialogDescription = React54.forwardRef(
|
|
5660
4907
|
(props, forwardedRef) => {
|
|
5661
4908
|
const _a = props, { __scopeDialog } = _a, descriptionProps = __objRest(_a, ["__scopeDialog"]);
|
|
5662
4909
|
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
5663
|
-
return /* @__PURE__ */
|
|
4910
|
+
return /* @__PURE__ */ jsx41(Primitive.p, __spreadProps(__spreadValues({ id: context.descriptionId }, descriptionProps), { ref: forwardedRef }));
|
|
5664
4911
|
}
|
|
5665
4912
|
);
|
|
5666
4913
|
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
5667
4914
|
var CLOSE_NAME = "DialogClose";
|
|
5668
|
-
var DialogClose =
|
|
4915
|
+
var DialogClose = React54.forwardRef(
|
|
5669
4916
|
(props, forwardedRef) => {
|
|
5670
4917
|
const _a = props, { __scopeDialog } = _a, closeProps = __objRest(_a, ["__scopeDialog"]);
|
|
5671
4918
|
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
5672
|
-
return /* @__PURE__ */
|
|
4919
|
+
return /* @__PURE__ */ jsx41(
|
|
5673
4920
|
Primitive.button,
|
|
5674
4921
|
__spreadProps(__spreadValues({
|
|
5675
4922
|
type: "button"
|
|
@@ -5697,7 +4944,7 @@ var TitleWarning = ({ titleId }) => {
|
|
|
5697
4944
|
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
5698
4945
|
|
|
5699
4946
|
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
|
5700
|
-
|
|
4947
|
+
React54.useEffect(() => {
|
|
5701
4948
|
if (titleId) {
|
|
5702
4949
|
const hasTitle = document.getElementById(titleId);
|
|
5703
4950
|
if (!hasTitle) console.error(MESSAGE);
|
|
@@ -5709,7 +4956,7 @@ var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
|
|
5709
4956
|
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
|
5710
4957
|
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
|
5711
4958
|
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
|
5712
|
-
|
|
4959
|
+
React54.useEffect(() => {
|
|
5713
4960
|
var _a;
|
|
5714
4961
|
const describedById = (_a = contentRef.current) == null ? void 0 : _a.getAttribute("aria-describedby");
|
|
5715
4962
|
if (descriptionId && describedById) {
|
|
@@ -5729,7 +4976,7 @@ var Description = DialogDescription;
|
|
|
5729
4976
|
var Close = DialogClose;
|
|
5730
4977
|
|
|
5731
4978
|
// ../../node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types_c6ff7006a888f63e36d2502e019661c3/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs
|
|
5732
|
-
import { jsx as
|
|
4979
|
+
import { jsx as jsx42, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
5733
4980
|
var ROOT_NAME = "AlertDialog";
|
|
5734
4981
|
var [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [
|
|
5735
4982
|
createDialogScope
|
|
@@ -5738,15 +4985,15 @@ var useDialogScope = createDialogScope();
|
|
|
5738
4985
|
var AlertDialog = (props) => {
|
|
5739
4986
|
const _a = props, { __scopeAlertDialog } = _a, alertDialogProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
5740
4987
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
5741
|
-
return /* @__PURE__ */
|
|
4988
|
+
return /* @__PURE__ */ jsx42(Root, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), alertDialogProps), { modal: true }));
|
|
5742
4989
|
};
|
|
5743
4990
|
AlertDialog.displayName = ROOT_NAME;
|
|
5744
4991
|
var TRIGGER_NAME2 = "AlertDialogTrigger";
|
|
5745
|
-
var AlertDialogTrigger =
|
|
4992
|
+
var AlertDialogTrigger = React55.forwardRef(
|
|
5746
4993
|
(props, forwardedRef) => {
|
|
5747
4994
|
const _a = props, { __scopeAlertDialog } = _a, triggerProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
5748
4995
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
5749
|
-
return /* @__PURE__ */
|
|
4996
|
+
return /* @__PURE__ */ jsx42(Trigger, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), triggerProps), { ref: forwardedRef }));
|
|
5750
4997
|
}
|
|
5751
4998
|
);
|
|
5752
4999
|
AlertDialogTrigger.displayName = TRIGGER_NAME2;
|
|
@@ -5754,35 +5001,35 @@ var PORTAL_NAME3 = "AlertDialogPortal";
|
|
|
5754
5001
|
var AlertDialogPortal = (props) => {
|
|
5755
5002
|
const _a = props, { __scopeAlertDialog } = _a, portalProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
5756
5003
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
5757
|
-
return /* @__PURE__ */
|
|
5004
|
+
return /* @__PURE__ */ jsx42(Portal2, __spreadValues(__spreadValues({}, dialogScope), portalProps));
|
|
5758
5005
|
};
|
|
5759
5006
|
AlertDialogPortal.displayName = PORTAL_NAME3;
|
|
5760
5007
|
var OVERLAY_NAME2 = "AlertDialogOverlay";
|
|
5761
|
-
var AlertDialogOverlay =
|
|
5008
|
+
var AlertDialogOverlay = React55.forwardRef(
|
|
5762
5009
|
(props, forwardedRef) => {
|
|
5763
5010
|
const _a = props, { __scopeAlertDialog } = _a, overlayProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
5764
5011
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
5765
|
-
return /* @__PURE__ */
|
|
5012
|
+
return /* @__PURE__ */ jsx42(Overlay, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), overlayProps), { ref: forwardedRef }));
|
|
5766
5013
|
}
|
|
5767
5014
|
);
|
|
5768
5015
|
AlertDialogOverlay.displayName = OVERLAY_NAME2;
|
|
5769
5016
|
var CONTENT_NAME2 = "AlertDialogContent";
|
|
5770
5017
|
var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME2);
|
|
5771
5018
|
var Slottable = createSlottable("AlertDialogContent");
|
|
5772
|
-
var AlertDialogContent =
|
|
5019
|
+
var AlertDialogContent = React55.forwardRef(
|
|
5773
5020
|
(props, forwardedRef) => {
|
|
5774
5021
|
const _a = props, { __scopeAlertDialog, children } = _a, contentProps = __objRest(_a, ["__scopeAlertDialog", "children"]);
|
|
5775
5022
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
5776
|
-
const contentRef =
|
|
5023
|
+
const contentRef = React55.useRef(null);
|
|
5777
5024
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
5778
|
-
const cancelRef =
|
|
5779
|
-
return /* @__PURE__ */
|
|
5025
|
+
const cancelRef = React55.useRef(null);
|
|
5026
|
+
return /* @__PURE__ */ jsx42(
|
|
5780
5027
|
WarningProvider,
|
|
5781
5028
|
{
|
|
5782
5029
|
contentName: CONTENT_NAME2,
|
|
5783
5030
|
titleName: TITLE_NAME2,
|
|
5784
5031
|
docsSlug: "alert-dialog",
|
|
5785
|
-
children: /* @__PURE__ */
|
|
5032
|
+
children: /* @__PURE__ */ jsx42(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs12(
|
|
5786
5033
|
Content,
|
|
5787
5034
|
__spreadProps(__spreadValues(__spreadValues({
|
|
5788
5035
|
role: "alertdialog"
|
|
@@ -5796,8 +5043,8 @@ var AlertDialogContent = React58.forwardRef(
|
|
|
5796
5043
|
onPointerDownOutside: (event) => event.preventDefault(),
|
|
5797
5044
|
onInteractOutside: (event) => event.preventDefault(),
|
|
5798
5045
|
children: [
|
|
5799
|
-
/* @__PURE__ */
|
|
5800
|
-
/* @__PURE__ */
|
|
5046
|
+
/* @__PURE__ */ jsx42(Slottable, { children }),
|
|
5047
|
+
/* @__PURE__ */ jsx42(DescriptionWarning2, { contentRef })
|
|
5801
5048
|
]
|
|
5802
5049
|
})
|
|
5803
5050
|
) })
|
|
@@ -5807,38 +5054,38 @@ var AlertDialogContent = React58.forwardRef(
|
|
|
5807
5054
|
);
|
|
5808
5055
|
AlertDialogContent.displayName = CONTENT_NAME2;
|
|
5809
5056
|
var TITLE_NAME2 = "AlertDialogTitle";
|
|
5810
|
-
var AlertDialogTitle =
|
|
5057
|
+
var AlertDialogTitle = React55.forwardRef(
|
|
5811
5058
|
(props, forwardedRef) => {
|
|
5812
5059
|
const _a = props, { __scopeAlertDialog } = _a, titleProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
5813
5060
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
5814
|
-
return /* @__PURE__ */
|
|
5061
|
+
return /* @__PURE__ */ jsx42(Title, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), titleProps), { ref: forwardedRef }));
|
|
5815
5062
|
}
|
|
5816
5063
|
);
|
|
5817
5064
|
AlertDialogTitle.displayName = TITLE_NAME2;
|
|
5818
5065
|
var DESCRIPTION_NAME2 = "AlertDialogDescription";
|
|
5819
|
-
var AlertDialogDescription =
|
|
5066
|
+
var AlertDialogDescription = React55.forwardRef((props, forwardedRef) => {
|
|
5820
5067
|
const _a = props, { __scopeAlertDialog } = _a, descriptionProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
5821
5068
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
5822
|
-
return /* @__PURE__ */
|
|
5069
|
+
return /* @__PURE__ */ jsx42(Description, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), descriptionProps), { ref: forwardedRef }));
|
|
5823
5070
|
});
|
|
5824
5071
|
AlertDialogDescription.displayName = DESCRIPTION_NAME2;
|
|
5825
5072
|
var ACTION_NAME = "AlertDialogAction";
|
|
5826
|
-
var AlertDialogAction =
|
|
5073
|
+
var AlertDialogAction = React55.forwardRef(
|
|
5827
5074
|
(props, forwardedRef) => {
|
|
5828
5075
|
const _a = props, { __scopeAlertDialog } = _a, actionProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
5829
5076
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
5830
|
-
return /* @__PURE__ */
|
|
5077
|
+
return /* @__PURE__ */ jsx42(Close, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), actionProps), { ref: forwardedRef }));
|
|
5831
5078
|
}
|
|
5832
5079
|
);
|
|
5833
5080
|
AlertDialogAction.displayName = ACTION_NAME;
|
|
5834
5081
|
var CANCEL_NAME = "AlertDialogCancel";
|
|
5835
|
-
var AlertDialogCancel =
|
|
5082
|
+
var AlertDialogCancel = React55.forwardRef(
|
|
5836
5083
|
(props, forwardedRef) => {
|
|
5837
5084
|
const _a = props, { __scopeAlertDialog } = _a, cancelProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
5838
5085
|
const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
|
|
5839
5086
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
5840
5087
|
const ref = useComposedRefs(forwardedRef, cancelRef);
|
|
5841
|
-
return /* @__PURE__ */
|
|
5088
|
+
return /* @__PURE__ */ jsx42(Close, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), cancelProps), { ref }));
|
|
5842
5089
|
}
|
|
5843
5090
|
);
|
|
5844
5091
|
AlertDialogCancel.displayName = CANCEL_NAME;
|
|
@@ -5850,7 +5097,7 @@ You can add a description to the \`${CONTENT_NAME2}\` by passing a \`${DESCRIPTI
|
|
|
5850
5097
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME2}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
5851
5098
|
|
|
5852
5099
|
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
|
|
5853
|
-
|
|
5100
|
+
React55.useEffect(() => {
|
|
5854
5101
|
var _a;
|
|
5855
5102
|
const hasDescription = document.getElementById(
|
|
5856
5103
|
(_a = contentRef.current) == null ? void 0 : _a.getAttribute("aria-describedby")
|
|
@@ -5868,13 +5115,82 @@ var Cancel = AlertDialogCancel;
|
|
|
5868
5115
|
var Title2 = AlertDialogTitle;
|
|
5869
5116
|
var Description2 = AlertDialogDescription;
|
|
5870
5117
|
|
|
5118
|
+
// ../lib/src/utils.ts
|
|
5119
|
+
import { clsx } from "clsx";
|
|
5120
|
+
import { twMerge } from "tailwind-merge";
|
|
5121
|
+
function cn(...inputs) {
|
|
5122
|
+
return twMerge(clsx(inputs));
|
|
5123
|
+
}
|
|
5124
|
+
|
|
5125
|
+
// ../base-ui/src/ui/button.tsx
|
|
5126
|
+
import * as React56 from "react";
|
|
5127
|
+
import { cva } from "class-variance-authority";
|
|
5128
|
+
import { jsx as jsx43, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
5129
|
+
var buttonVariants = cva(
|
|
5130
|
+
"inline-flex items-center gap-2 whitespace-nowrap rounded-md text-sm ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
5131
|
+
{
|
|
5132
|
+
variants: {
|
|
5133
|
+
variant: {
|
|
5134
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
5135
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
5136
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
5137
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
5138
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
5139
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
5140
|
+
},
|
|
5141
|
+
size: {
|
|
5142
|
+
default: "h-10 px-4 py-2",
|
|
5143
|
+
sm: "h-9 rounded-md px-3",
|
|
5144
|
+
lg: "h-11 rounded-md px-8",
|
|
5145
|
+
icon: "h-10 w-10"
|
|
5146
|
+
}
|
|
5147
|
+
},
|
|
5148
|
+
defaultVariants: {
|
|
5149
|
+
variant: "default",
|
|
5150
|
+
size: "default"
|
|
5151
|
+
}
|
|
5152
|
+
}
|
|
5153
|
+
);
|
|
5154
|
+
var Button = React56.forwardRef(
|
|
5155
|
+
(_a, ref) => {
|
|
5156
|
+
var _b = _a, { className, variant, size, asChild = false, loading = false, children } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild", "loading", "children"]);
|
|
5157
|
+
const Comp = asChild ? Slot : "button";
|
|
5158
|
+
if (asChild) {
|
|
5159
|
+
return /* @__PURE__ */ jsx43(
|
|
5160
|
+
Comp,
|
|
5161
|
+
__spreadProps(__spreadValues({
|
|
5162
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
5163
|
+
ref,
|
|
5164
|
+
disabled: loading || props.disabled
|
|
5165
|
+
}, props), {
|
|
5166
|
+
children
|
|
5167
|
+
})
|
|
5168
|
+
);
|
|
5169
|
+
}
|
|
5170
|
+
return /* @__PURE__ */ jsxs13(
|
|
5171
|
+
Comp,
|
|
5172
|
+
__spreadProps(__spreadValues({
|
|
5173
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
5174
|
+
ref,
|
|
5175
|
+
disabled: loading || props.disabled
|
|
5176
|
+
}, props), {
|
|
5177
|
+
children: [
|
|
5178
|
+
children,
|
|
5179
|
+
loading && /* @__PURE__ */ jsx43(globalLucideIcons.Loader2, { className: "ml-2 h-4 w-4 animate-spin" })
|
|
5180
|
+
]
|
|
5181
|
+
})
|
|
5182
|
+
);
|
|
5183
|
+
}
|
|
5184
|
+
);
|
|
5185
|
+
Button.displayName = "Button";
|
|
5186
|
+
|
|
5871
5187
|
// ../base-ui/src/ui/alert-dialog.tsx
|
|
5872
|
-
import { jsx as
|
|
5188
|
+
import { jsx as jsx44, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
5873
5189
|
var AlertDialog2 = Root2;
|
|
5874
5190
|
var AlertDialogPortal2 = Portal22;
|
|
5875
|
-
var AlertDialogOverlay2 =
|
|
5191
|
+
var AlertDialogOverlay2 = React57.forwardRef((_a, ref) => {
|
|
5876
5192
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5877
|
-
return /* @__PURE__ */
|
|
5193
|
+
return /* @__PURE__ */ jsx44(
|
|
5878
5194
|
Overlay2,
|
|
5879
5195
|
__spreadProps(__spreadValues({
|
|
5880
5196
|
className: cn(
|
|
@@ -5887,11 +5203,11 @@ var AlertDialogOverlay2 = React59.forwardRef((_a, ref) => {
|
|
|
5887
5203
|
);
|
|
5888
5204
|
});
|
|
5889
5205
|
AlertDialogOverlay2.displayName = Overlay2.displayName;
|
|
5890
|
-
var AlertDialogContent2 =
|
|
5206
|
+
var AlertDialogContent2 = React57.forwardRef((_a, ref) => {
|
|
5891
5207
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5892
|
-
return /* @__PURE__ */
|
|
5893
|
-
/* @__PURE__ */
|
|
5894
|
-
/* @__PURE__ */
|
|
5208
|
+
return /* @__PURE__ */ jsxs14(AlertDialogPortal2, { children: [
|
|
5209
|
+
/* @__PURE__ */ jsx44(AlertDialogOverlay2, {}),
|
|
5210
|
+
/* @__PURE__ */ jsx44(
|
|
5895
5211
|
Content2,
|
|
5896
5212
|
__spreadValues({
|
|
5897
5213
|
ref,
|
|
@@ -5910,7 +5226,7 @@ var AlertDialogHeader = (_a) => {
|
|
|
5910
5226
|
} = _b, props = __objRest(_b, [
|
|
5911
5227
|
"className"
|
|
5912
5228
|
]);
|
|
5913
|
-
return /* @__PURE__ */
|
|
5229
|
+
return /* @__PURE__ */ jsx44(
|
|
5914
5230
|
"div",
|
|
5915
5231
|
__spreadValues({
|
|
5916
5232
|
className: cn(
|
|
@@ -5927,7 +5243,7 @@ var AlertDialogFooter = (_a) => {
|
|
|
5927
5243
|
} = _b, props = __objRest(_b, [
|
|
5928
5244
|
"className"
|
|
5929
5245
|
]);
|
|
5930
|
-
return /* @__PURE__ */
|
|
5246
|
+
return /* @__PURE__ */ jsx44(
|
|
5931
5247
|
"div",
|
|
5932
5248
|
__spreadValues({
|
|
5933
5249
|
className: cn(
|
|
@@ -5938,9 +5254,9 @@ var AlertDialogFooter = (_a) => {
|
|
|
5938
5254
|
);
|
|
5939
5255
|
};
|
|
5940
5256
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
5941
|
-
var AlertDialogTitle2 =
|
|
5257
|
+
var AlertDialogTitle2 = React57.forwardRef((_a, ref) => {
|
|
5942
5258
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5943
|
-
return /* @__PURE__ */
|
|
5259
|
+
return /* @__PURE__ */ jsx44(
|
|
5944
5260
|
Title2,
|
|
5945
5261
|
__spreadValues({
|
|
5946
5262
|
ref,
|
|
@@ -5949,9 +5265,9 @@ var AlertDialogTitle2 = React59.forwardRef((_a, ref) => {
|
|
|
5949
5265
|
);
|
|
5950
5266
|
});
|
|
5951
5267
|
AlertDialogTitle2.displayName = Title2.displayName;
|
|
5952
|
-
var AlertDialogDescription2 =
|
|
5268
|
+
var AlertDialogDescription2 = React57.forwardRef((_a, ref) => {
|
|
5953
5269
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5954
|
-
return /* @__PURE__ */
|
|
5270
|
+
return /* @__PURE__ */ jsx44(
|
|
5955
5271
|
Description2,
|
|
5956
5272
|
__spreadValues({
|
|
5957
5273
|
ref,
|
|
@@ -5960,9 +5276,9 @@ var AlertDialogDescription2 = React59.forwardRef((_a, ref) => {
|
|
|
5960
5276
|
);
|
|
5961
5277
|
});
|
|
5962
5278
|
AlertDialogDescription2.displayName = Description2.displayName;
|
|
5963
|
-
var AlertDialogAction2 =
|
|
5279
|
+
var AlertDialogAction2 = React57.forwardRef((_a, ref) => {
|
|
5964
5280
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5965
|
-
return /* @__PURE__ */
|
|
5281
|
+
return /* @__PURE__ */ jsx44(
|
|
5966
5282
|
Action,
|
|
5967
5283
|
__spreadValues({
|
|
5968
5284
|
ref,
|
|
@@ -5971,9 +5287,9 @@ var AlertDialogAction2 = React59.forwardRef((_a, ref) => {
|
|
|
5971
5287
|
);
|
|
5972
5288
|
});
|
|
5973
5289
|
AlertDialogAction2.displayName = Action.displayName;
|
|
5974
|
-
var AlertDialogCancel2 =
|
|
5290
|
+
var AlertDialogCancel2 = React57.forwardRef((_a, ref) => {
|
|
5975
5291
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5976
|
-
return /* @__PURE__ */
|
|
5292
|
+
return /* @__PURE__ */ jsx44(
|
|
5977
5293
|
Cancel,
|
|
5978
5294
|
__spreadValues({
|
|
5979
5295
|
ref,
|
|
@@ -5988,7 +5304,7 @@ var AlertDialogCancel2 = React59.forwardRef((_a, ref) => {
|
|
|
5988
5304
|
AlertDialogCancel2.displayName = Cancel.displayName;
|
|
5989
5305
|
|
|
5990
5306
|
// src/main/ads-alert-dialog.tsx
|
|
5991
|
-
import { jsx as
|
|
5307
|
+
import { jsx as jsx45, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
5992
5308
|
function AdsAlertDialog({
|
|
5993
5309
|
open,
|
|
5994
5310
|
onOpenChange,
|
|
@@ -6001,34 +5317,34 @@ function AdsAlertDialog({
|
|
|
6001
5317
|
confirmText,
|
|
6002
5318
|
onConfirm
|
|
6003
5319
|
}) {
|
|
6004
|
-
const [imgError, setImgError] =
|
|
6005
|
-
return /* @__PURE__ */
|
|
5320
|
+
const [imgError, setImgError] = useState11(false);
|
|
5321
|
+
return /* @__PURE__ */ jsx45(AlertDialog2, { open, onOpenChange, children: /* @__PURE__ */ jsxs15(
|
|
6006
5322
|
AlertDialogContent2,
|
|
6007
5323
|
{
|
|
6008
5324
|
className: "fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-white dark:bg-neutral-900 rounded-2xl shadow-2xl border border-neutral-200 dark:border-neutral-700 max-w-md w-full min-w-[320px] p-4 flex flex-col items-stretch",
|
|
6009
5325
|
children: [
|
|
6010
|
-
/* @__PURE__ */
|
|
6011
|
-
/* @__PURE__ */
|
|
6012
|
-
/* @__PURE__ */
|
|
6013
|
-
/* @__PURE__ */
|
|
5326
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex flex-row items-center justify-between mb-2", children: [
|
|
5327
|
+
/* @__PURE__ */ jsx45(AlertDialogTitle2, { asChild: true, children: /* @__PURE__ */ jsxs15("div", { className: "flex flex-row items-center gap-1 min-w-0 text-xl font-semibold", children: [
|
|
5328
|
+
/* @__PURE__ */ jsx45(globalLucideIcons.Info, { className: "w-5 h-5" }),
|
|
5329
|
+
/* @__PURE__ */ jsx45("span", { className: "truncate", children: title })
|
|
6014
5330
|
] }) }),
|
|
6015
|
-
/* @__PURE__ */
|
|
5331
|
+
/* @__PURE__ */ jsx45(
|
|
6016
5332
|
"button",
|
|
6017
5333
|
{
|
|
6018
5334
|
className: "text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-200 text-xl ml-4",
|
|
6019
5335
|
onClick: () => onOpenChange(false),
|
|
6020
5336
|
"aria-label": "Close",
|
|
6021
5337
|
tabIndex: 0,
|
|
6022
|
-
children: /* @__PURE__ */
|
|
5338
|
+
children: /* @__PURE__ */ jsx45(globalLucideIcons.X, { className: "w-5 h-5" })
|
|
6023
5339
|
}
|
|
6024
5340
|
)
|
|
6025
5341
|
] }),
|
|
6026
|
-
/* @__PURE__ */
|
|
6027
|
-
imgSrc && /* @__PURE__ */
|
|
6028
|
-
/* @__PURE__ */
|
|
6029
|
-
/* @__PURE__ */
|
|
6030
|
-
] }) : imgHref ? /* @__PURE__ */
|
|
6031
|
-
|
|
5342
|
+
/* @__PURE__ */ jsx45(AlertDialogDescription2, { className: "text-base font-medium text-neutral-800 dark:text-neutral-100 mb-2", children: description }),
|
|
5343
|
+
imgSrc && /* @__PURE__ */ jsx45("div", { className: "w-full max-w-[400px] h-[220px] relative flex items-center justify-center mb-2", children: imgError ? /* @__PURE__ */ jsxs15("div", { className: "absolute inset-0 flex flex-col items-center justify-center bg-gray-100 dark:bg-neutral-800 border border-dashed border-neutral-300 dark:border-neutral-700 rounded-lg text-neutral-400 text-sm", children: [
|
|
5344
|
+
/* @__PURE__ */ jsx45(globalLucideIcons.ImageOff, { className: "w-12 h-12 mb-2" }),
|
|
5345
|
+
/* @__PURE__ */ jsx45("span", { children: "Image loading failed" })
|
|
5346
|
+
] }) : imgHref ? /* @__PURE__ */ jsx45("a", { href: imgHref, target: "_blank", rel: "noopener noreferrer", className: "block w-full h-full", children: /* @__PURE__ */ jsx45(
|
|
5347
|
+
Image,
|
|
6032
5348
|
{
|
|
6033
5349
|
src: imgSrc,
|
|
6034
5350
|
alt: "image",
|
|
@@ -6040,8 +5356,8 @@ function AdsAlertDialog({
|
|
|
6040
5356
|
onError: () => setImgError(true),
|
|
6041
5357
|
sizes: "(max-width: 400px) 100vw, 400px"
|
|
6042
5358
|
}
|
|
6043
|
-
) }) : /* @__PURE__ */
|
|
6044
|
-
|
|
5359
|
+
) }) : /* @__PURE__ */ jsx45(
|
|
5360
|
+
Image,
|
|
6045
5361
|
{
|
|
6046
5362
|
src: imgSrc,
|
|
6047
5363
|
alt: "image",
|
|
@@ -6054,8 +5370,8 @@ function AdsAlertDialog({
|
|
|
6054
5370
|
sizes: "(max-width: 400px) 100vw, 400px"
|
|
6055
5371
|
}
|
|
6056
5372
|
) }),
|
|
6057
|
-
(cancelText || confirmText) && /* @__PURE__ */
|
|
6058
|
-
cancelText && /* @__PURE__ */
|
|
5373
|
+
(cancelText || confirmText) && /* @__PURE__ */ jsxs15("div", { className: "flex justify-end gap-2 mt-2", children: [
|
|
5374
|
+
cancelText && /* @__PURE__ */ jsx45(
|
|
6059
5375
|
"button",
|
|
6060
5376
|
{
|
|
6061
5377
|
onClick: () => {
|
|
@@ -6066,7 +5382,7 @@ function AdsAlertDialog({
|
|
|
6066
5382
|
children: cancelText
|
|
6067
5383
|
}
|
|
6068
5384
|
),
|
|
6069
|
-
confirmText && /* @__PURE__ */
|
|
5385
|
+
confirmText && /* @__PURE__ */ jsx45(
|
|
6070
5386
|
AlertDialogAction2,
|
|
6071
5387
|
{
|
|
6072
5388
|
onClick: () => {
|
|
@@ -6084,12 +5400,12 @@ function AdsAlertDialog({
|
|
|
6084
5400
|
}
|
|
6085
5401
|
|
|
6086
5402
|
// src/main/x-button.tsx
|
|
6087
|
-
import { useState as
|
|
6088
|
-
import { Fragment as
|
|
5403
|
+
import { useState as useState12, useRef as useRef12, useEffect as useEffect17 } from "react";
|
|
5404
|
+
import { Fragment as Fragment6, jsx as jsx46, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
6089
5405
|
function XButton(props) {
|
|
6090
5406
|
var _a, _b;
|
|
6091
|
-
const [isLoading, setIsLoading] =
|
|
6092
|
-
const [menuOpen, setMenuOpen] =
|
|
5407
|
+
const [isLoading, setIsLoading] = useState12(false);
|
|
5408
|
+
const [menuOpen, setMenuOpen] = useState12(false);
|
|
6093
5409
|
const menuRef = useRef12(null);
|
|
6094
5410
|
useEffect17(() => {
|
|
6095
5411
|
if (props.type === "split") {
|
|
@@ -6123,19 +5439,19 @@ function XButton(props) {
|
|
|
6123
5439
|
const { button, loadingText: loadingText2, minWidth = "min-w-[110px]", className: className2 = "" } = props;
|
|
6124
5440
|
const isDisabled = button.disabled || isLoading;
|
|
6125
5441
|
const actualLoadingText2 = loadingText2 || ((_a = button.text) == null ? void 0 : _a.trim()) || "Loading...";
|
|
6126
|
-
return /* @__PURE__ */
|
|
5442
|
+
return /* @__PURE__ */ jsx46(
|
|
6127
5443
|
"button",
|
|
6128
5444
|
{
|
|
6129
5445
|
onClick: () => handleButtonClick(button.onClick),
|
|
6130
5446
|
disabled: isDisabled,
|
|
6131
5447
|
className: `${minWidth} ${baseButtonClass} rounded-full ${isDisabled ? disabledClass : ""} ${className2}`,
|
|
6132
5448
|
title: button.text,
|
|
6133
|
-
children: isLoading ? /* @__PURE__ */
|
|
6134
|
-
/* @__PURE__ */
|
|
6135
|
-
/* @__PURE__ */
|
|
6136
|
-
] }) : /* @__PURE__ */
|
|
5449
|
+
children: isLoading ? /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
5450
|
+
/* @__PURE__ */ jsx46(globalLucideIcons.Loader2, { className: "w-5 h-5 mr-1 animate-spin" }),
|
|
5451
|
+
/* @__PURE__ */ jsx46("span", { children: actualLoadingText2 })
|
|
5452
|
+
] }) : /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
6137
5453
|
button.icon,
|
|
6138
|
-
/* @__PURE__ */
|
|
5454
|
+
/* @__PURE__ */ jsx46("span", { children: button.text })
|
|
6139
5455
|
] })
|
|
6140
5456
|
}
|
|
6141
5457
|
);
|
|
@@ -6143,8 +5459,8 @@ function XButton(props) {
|
|
|
6143
5459
|
const { mainButton, menuItems, loadingText, menuWidth = "w-40", className = "", mainButtonClassName = "", dropdownButtonClassName = "" } = props;
|
|
6144
5460
|
const isMainDisabled = mainButton.disabled || isLoading;
|
|
6145
5461
|
const actualLoadingText = loadingText || ((_b = mainButton.text) == null ? void 0 : _b.trim()) || "Loading...";
|
|
6146
|
-
return /* @__PURE__ */
|
|
6147
|
-
/* @__PURE__ */
|
|
5462
|
+
return /* @__PURE__ */ jsxs16("div", { className: `relative flex bg-neutral-200 dark:bg-neutral-800 rounded-full ${className}`, children: [
|
|
5463
|
+
/* @__PURE__ */ jsx46(
|
|
6148
5464
|
"button",
|
|
6149
5465
|
{
|
|
6150
5466
|
onClick: () => handleButtonClick(mainButton.onClick),
|
|
@@ -6154,16 +5470,16 @@ function XButton(props) {
|
|
|
6154
5470
|
if (e.button === 2) e.preventDefault();
|
|
6155
5471
|
},
|
|
6156
5472
|
style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
|
|
6157
|
-
children: isLoading ? /* @__PURE__ */
|
|
6158
|
-
/* @__PURE__ */
|
|
6159
|
-
/* @__PURE__ */
|
|
6160
|
-
] }) : /* @__PURE__ */
|
|
5473
|
+
children: isLoading ? /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
5474
|
+
/* @__PURE__ */ jsx46(globalLucideIcons.Loader2, { className: "w-5 h-5 mr-1 animate-spin" }),
|
|
5475
|
+
/* @__PURE__ */ jsx46("span", { children: actualLoadingText })
|
|
5476
|
+
] }) : /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
6161
5477
|
mainButton.icon,
|
|
6162
|
-
/* @__PURE__ */
|
|
5478
|
+
/* @__PURE__ */ jsx46("span", { children: mainButton.text })
|
|
6163
5479
|
] })
|
|
6164
5480
|
}
|
|
6165
5481
|
),
|
|
6166
|
-
/* @__PURE__ */
|
|
5482
|
+
/* @__PURE__ */ jsx46(
|
|
6167
5483
|
"span",
|
|
6168
5484
|
{
|
|
6169
5485
|
className: `flex items-center justify-center w-10 py-2 cursor-pointer transition hover:bg-neutral-300 dark:hover:bg-neutral-700 rounded-r-full ${dropdownButtonClassName}`,
|
|
@@ -6173,15 +5489,15 @@ function XButton(props) {
|
|
|
6173
5489
|
},
|
|
6174
5490
|
tabIndex: 0,
|
|
6175
5491
|
style: { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },
|
|
6176
|
-
children: /* @__PURE__ */
|
|
5492
|
+
children: /* @__PURE__ */ jsx46(globalLucideIcons.ChevronDown, { className: "w-6 h-6" })
|
|
6177
5493
|
}
|
|
6178
5494
|
),
|
|
6179
|
-
menuOpen && /* @__PURE__ */
|
|
5495
|
+
menuOpen && /* @__PURE__ */ jsx46(
|
|
6180
5496
|
"div",
|
|
6181
5497
|
{
|
|
6182
5498
|
ref: menuRef,
|
|
6183
5499
|
className: `absolute right-0 top-full ${menuWidth} bg-white dark:bg-neutral-800 text-neutral-800 dark:text-white text-sm rounded-xl shadow-lg z-50 border border-neutral-200 dark:border-neutral-700 overflow-hidden animate-fade-in`,
|
|
6184
|
-
children: menuItems.map((item, index) => /* @__PURE__ */
|
|
5500
|
+
children: menuItems.map((item, index) => /* @__PURE__ */ jsxs16(
|
|
6185
5501
|
"button",
|
|
6186
5502
|
{
|
|
6187
5503
|
onClick: () => {
|
|
@@ -6192,11 +5508,11 @@ function XButton(props) {
|
|
|
6192
5508
|
className: `flex items-center w-full px-4 py-3 transition hover:bg-neutral-300 dark:hover:bg-neutral-600 text-left relative ${item.disabled ? disabledClass : ""}`,
|
|
6193
5509
|
style: item.splitTopBorder ? { borderTop: "1px solid #AC62FD" } : void 0,
|
|
6194
5510
|
children: [
|
|
6195
|
-
/* @__PURE__ */
|
|
5511
|
+
/* @__PURE__ */ jsxs16("span", { className: "flex items-center", children: [
|
|
6196
5512
|
item.icon,
|
|
6197
|
-
/* @__PURE__ */
|
|
5513
|
+
/* @__PURE__ */ jsx46("span", { children: item.text })
|
|
6198
5514
|
] }),
|
|
6199
|
-
item.tag && /* @__PURE__ */
|
|
5515
|
+
item.tag && /* @__PURE__ */ jsx46(
|
|
6200
5516
|
"span",
|
|
6201
5517
|
{
|
|
6202
5518
|
className: "absolute right-3 top-1 text-[10px] font-semibold",
|
|
@@ -6215,7 +5531,7 @@ function XButton(props) {
|
|
|
6215
5531
|
|
|
6216
5532
|
// src/main/ai-prompt-textarea.tsx
|
|
6217
5533
|
import { useEffect as useEffect18, useRef as useRef13 } from "react";
|
|
6218
|
-
import { jsx as
|
|
5534
|
+
import { jsx as jsx47, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
6219
5535
|
function AIPromptTextarea({
|
|
6220
5536
|
value,
|
|
6221
5537
|
onChange,
|
|
@@ -6303,12 +5619,12 @@ function AIPromptTextarea({
|
|
|
6303
5619
|
};
|
|
6304
5620
|
const renderTitle = () => {
|
|
6305
5621
|
if (!(title == null ? void 0 : title.trim())) return null;
|
|
6306
|
-
return /* @__PURE__ */
|
|
6307
|
-
title && /* @__PURE__ */
|
|
6308
|
-
(description == null ? void 0 : description.trim()) && /* @__PURE__ */
|
|
5622
|
+
return /* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
|
|
5623
|
+
title && /* @__PURE__ */ jsx47("span", { className: "text-xl font-semibold text-foreground", children: title }),
|
|
5624
|
+
(description == null ? void 0 : description.trim()) && /* @__PURE__ */ jsx47("span", { className: "text-sm text-gray-400 ml-2", children: description })
|
|
6309
5625
|
] });
|
|
6310
5626
|
};
|
|
6311
|
-
const renderTextarea = (isEmbedded = false) => /* @__PURE__ */
|
|
5627
|
+
const renderTextarea = (isEmbedded = false) => /* @__PURE__ */ jsx47(
|
|
6312
5628
|
"textarea",
|
|
6313
5629
|
{
|
|
6314
5630
|
ref: textareaRef,
|
|
@@ -6327,7 +5643,7 @@ function AIPromptTextarea({
|
|
|
6327
5643
|
);
|
|
6328
5644
|
const renderWordCount = () => {
|
|
6329
5645
|
if (!showWordCount) return null;
|
|
6330
|
-
return /* @__PURE__ */
|
|
5646
|
+
return /* @__PURE__ */ jsx47("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxs17(
|
|
6331
5647
|
"span",
|
|
6332
5648
|
{
|
|
6333
5649
|
className: `text-sm ${wordCount >= maxWords ? "text-red-500" : wordCount > maxWords * 0.75 ? "text-orange-500" : "text-muted-foreground"} ${isWordLimit ? "animate-bounce" : ""}`,
|
|
@@ -6343,36 +5659,53 @@ function AIPromptTextarea({
|
|
|
6343
5659
|
) });
|
|
6344
5660
|
};
|
|
6345
5661
|
if (embed && title) {
|
|
6346
|
-
return /* @__PURE__ */
|
|
6347
|
-
/* @__PURE__ */
|
|
6348
|
-
/* @__PURE__ */
|
|
6349
|
-
/* @__PURE__ */
|
|
6350
|
-
/* @__PURE__ */
|
|
5662
|
+
return /* @__PURE__ */ jsxs17("div", { className: "space-y-2", children: [
|
|
5663
|
+
/* @__PURE__ */ jsxs17("div", { className: "border-2 border-border rounded-lg bg-transparent", children: [
|
|
5664
|
+
/* @__PURE__ */ jsx47("div", { className: "p-4 pb-2", children: renderTitle() }),
|
|
5665
|
+
/* @__PURE__ */ jsx47("hr", { className: "border-t-1 border-border" }),
|
|
5666
|
+
/* @__PURE__ */ jsx47("div", { className: "p-1", children: renderTextarea(true) })
|
|
6351
5667
|
] }),
|
|
6352
5668
|
renderWordCount()
|
|
6353
5669
|
] });
|
|
6354
5670
|
}
|
|
6355
|
-
return /* @__PURE__ */
|
|
5671
|
+
return /* @__PURE__ */ jsxs17("div", { className: "space-y-2", children: [
|
|
6356
5672
|
renderTitle(),
|
|
6357
5673
|
renderTextarea(),
|
|
6358
5674
|
renderWordCount()
|
|
6359
5675
|
] });
|
|
6360
5676
|
}
|
|
5677
|
+
|
|
5678
|
+
// src/main/rich-text-expert.tsx
|
|
5679
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
5680
|
+
var defaultTagRenderers = {
|
|
5681
|
+
// text Stong
|
|
5682
|
+
strong: (chunks) => /* @__PURE__ */ jsx48("strong", { children: chunks }),
|
|
5683
|
+
// text Emphasis
|
|
5684
|
+
em: (chunks) => /* @__PURE__ */ jsx48("em", { children: chunks }),
|
|
5685
|
+
// text Underline
|
|
5686
|
+
u: (chunks) => /* @__PURE__ */ jsx48("u", { children: chunks }),
|
|
5687
|
+
// text Mark
|
|
5688
|
+
mark: (chunks) => /* @__PURE__ */ jsx48("mark", { className: "bg-purple-300 dark:bg-purple-500 text-neutral-800 dark:text-neutral-300 px-1 rounded", children: chunks }),
|
|
5689
|
+
// text Delete
|
|
5690
|
+
del: (chunks) => /* @__PURE__ */ jsx48("del", { children: chunks }),
|
|
5691
|
+
// text Subscript
|
|
5692
|
+
sub: (chunks) => /* @__PURE__ */ jsx48("sub", { children: chunks }),
|
|
5693
|
+
// text Superscript
|
|
5694
|
+
sup: (chunks) => /* @__PURE__ */ jsx48("sup", { children: chunks })
|
|
5695
|
+
};
|
|
5696
|
+
function createRichTextRenderer(customRenderers) {
|
|
5697
|
+
const renderers = __spreadValues(__spreadValues({}, defaultTagRenderers), customRenderers);
|
|
5698
|
+
return function richText2(t, key) {
|
|
5699
|
+
return t.rich(key, renderers);
|
|
5700
|
+
};
|
|
5701
|
+
}
|
|
5702
|
+
var richText = createRichTextRenderer();
|
|
6361
5703
|
export {
|
|
6362
5704
|
AIPromptTextarea,
|
|
6363
5705
|
AdsAlertDialog,
|
|
6364
|
-
CTA,
|
|
6365
|
-
FAQ,
|
|
6366
|
-
Features,
|
|
6367
|
-
Footer,
|
|
6368
|
-
Gallery,
|
|
6369
5706
|
GoToTop,
|
|
6370
5707
|
Loading,
|
|
6371
5708
|
NProgressBar,
|
|
6372
|
-
PricePlan,
|
|
6373
|
-
SeoContent,
|
|
6374
|
-
Tips,
|
|
6375
|
-
Usage,
|
|
6376
5709
|
XButton,
|
|
6377
5710
|
createRichTextRenderer,
|
|
6378
5711
|
richText
|