@reblu/site-blocks 0.33.0 → 0.35.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/CHANGELOG.md +36 -0
- package/README.md +207 -2
- package/dist/client.cjs +459 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +142 -3
- package/dist/client.d.ts +142 -3
- package/dist/client.js +453 -0
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +758 -552
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +104 -78
- package/dist/index.d.ts +104 -78
- package/dist/index.js +752 -553
- package/dist/index.js.map +1 -1
- package/dist/{full-invoice-fields-DMX0sjPG.d.cts → page-links-C0nXQzAW.d.cts} +105 -2
- package/dist/{full-invoice-fields-DMX0sjPG.d.ts → page-links-C0nXQzAW.d.ts} +105 -2
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -42,6 +42,7 @@ __export(src_exports, {
|
|
|
42
42
|
CourseCatalogFilters: () => CourseCatalogFilters,
|
|
43
43
|
CourseDescription: () => CourseDescription,
|
|
44
44
|
CoursePurchaseTerms: () => CoursePurchaseTerms,
|
|
45
|
+
CourseSchedule: () => CourseSchedule,
|
|
45
46
|
DATA_REQUEST_TYPES: () => import_site_contracts.DATA_REQUEST_TYPES,
|
|
46
47
|
DEFAULT_BEFORE_AFTER_LABELS: () => DEFAULT_BEFORE_AFTER_LABELS,
|
|
47
48
|
DEFAULT_CHECKOUT_DELIVERY_CHOICE_LABELS: () => DEFAULT_CHECKOUT_DELIVERY_CHOICE_LABELS,
|
|
@@ -50,6 +51,7 @@ __export(src_exports, {
|
|
|
50
51
|
DEFAULT_COURSE_CATALOG_FILTERS_LABELS: () => DEFAULT_COURSE_CATALOG_FILTERS_LABELS,
|
|
51
52
|
DEFAULT_COURSE_PRICE_BANDS: () => DEFAULT_COURSE_PRICE_BANDS,
|
|
52
53
|
DEFAULT_COURSE_PURCHASE_TERMS_LABELS: () => DEFAULT_COURSE_PURCHASE_TERMS_LABELS,
|
|
54
|
+
DEFAULT_COURSE_SCHEDULE_LABELS: () => DEFAULT_COURSE_SCHEDULE_LABELS,
|
|
53
55
|
DEFAULT_INVOICE_COUNTRIES: () => DEFAULT_INVOICE_COUNTRIES,
|
|
54
56
|
DEFAULT_LESSON_PREVIEW_LABELS: () => DEFAULT_LESSON_PREVIEW_LABELS,
|
|
55
57
|
DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE: () => DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
|
|
@@ -66,6 +68,7 @@ __export(src_exports, {
|
|
|
66
68
|
ImageTextSplit: () => ImageTextSplit,
|
|
67
69
|
LegalDocument: () => LegalDocument,
|
|
68
70
|
LessonPreview: () => LessonPreview,
|
|
71
|
+
LinkedPagesGrid: () => LinkedPagesGrid,
|
|
69
72
|
MarkdownRenderer: () => MarkdownRenderer,
|
|
70
73
|
OrderConfirmation: () => OrderConfirmation,
|
|
71
74
|
OrderInvoiceLink: () => OrderInvoiceLink,
|
|
@@ -80,6 +83,7 @@ __export(src_exports, {
|
|
|
80
83
|
SafeHtml: () => SafeHtml,
|
|
81
84
|
ShopFilters: () => ShopFilters,
|
|
82
85
|
Specialty: () => Specialty,
|
|
86
|
+
TeamGrid: () => TeamGrid,
|
|
83
87
|
Treatment: () => Treatment,
|
|
84
88
|
TrustBadges: () => TrustBadges,
|
|
85
89
|
buildFaqPageJsonLd: () => buildFaqPageJsonLd,
|
|
@@ -89,11 +93,14 @@ __export(src_exports, {
|
|
|
89
93
|
collectFaqItems: () => collectFaqItems,
|
|
90
94
|
courseSellsAsGuest: () => courseSellsAsGuest,
|
|
91
95
|
defaultCheckoutFulfillment: () => defaultCheckoutFulfillment,
|
|
96
|
+
filterByLink: () => filterByLink,
|
|
92
97
|
formatPrice: () => formatPrice,
|
|
93
98
|
getShopErrorMessage: () => getShopErrorMessage,
|
|
94
99
|
isAllowedYouTubeHost: () => isAllowedYouTubeHost,
|
|
95
100
|
isCheckoutDeliveryComplete: () => isCheckoutDeliveryComplete,
|
|
96
101
|
isOverSimplifiedInvoiceCap: () => isOverSimplifiedInvoiceCap,
|
|
102
|
+
linkFilterOptions: () => linkFilterOptions,
|
|
103
|
+
linkKey: () => linkKey,
|
|
97
104
|
markdownToPlainText: () => markdownToPlainText,
|
|
98
105
|
markdownToSafeHtml: () => markdownToSafeHtml,
|
|
99
106
|
quoteRequiresDelivery: () => quoteRequiresDelivery,
|
|
@@ -13639,8 +13646,82 @@ function CoursePurchaseTerms({
|
|
|
13639
13646
|
);
|
|
13640
13647
|
}
|
|
13641
13648
|
|
|
13642
|
-
// src/components/
|
|
13649
|
+
// src/components/course-schedule.tsx
|
|
13643
13650
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
13651
|
+
function formatSession(session, timeZone, locale) {
|
|
13652
|
+
const day = new Intl.DateTimeFormat(locale, { weekday: "long", day: "numeric", month: "long", year: "numeric", timeZone });
|
|
13653
|
+
const time = new Intl.DateTimeFormat(locale, {
|
|
13654
|
+
hour: "2-digit",
|
|
13655
|
+
minute: "2-digit",
|
|
13656
|
+
hour12: false,
|
|
13657
|
+
timeZone,
|
|
13658
|
+
timeZoneName: "short"
|
|
13659
|
+
});
|
|
13660
|
+
const parts = (date) => {
|
|
13661
|
+
const p2 = time.formatToParts(date);
|
|
13662
|
+
const hhmm = p2.filter((x2) => x2.type === "hour" || x2.type === "minute").map((x2) => x2.value).join(":");
|
|
13663
|
+
return { hhmm, zone: p2.find((x2) => x2.type === "timeZoneName")?.value ?? timeZone };
|
|
13664
|
+
};
|
|
13665
|
+
const start = new Date(session.startsAt);
|
|
13666
|
+
const from = parts(start);
|
|
13667
|
+
if (!session.endsAt) return `${day.format(start)}, a las ${from.hhmm} (${from.zone})`;
|
|
13668
|
+
const end = new Date(session.endsAt);
|
|
13669
|
+
const to = parts(end);
|
|
13670
|
+
if (day.format(start) === day.format(end)) {
|
|
13671
|
+
return `${day.format(start)}, de ${from.hhmm} a ${to.hhmm} (${from.zone})`;
|
|
13672
|
+
}
|
|
13673
|
+
return `del ${day.format(start)}, ${from.hhmm} al ${day.format(end)}, ${to.hhmm} (${from.zone})`;
|
|
13674
|
+
}
|
|
13675
|
+
var DEFAULT_COURSE_SCHEDULE_LABELS = {
|
|
13676
|
+
modality: { IN_PERSON: "Presencial", WEBINAR: "Webinar, online y en directo" },
|
|
13677
|
+
dates: "Fechas",
|
|
13678
|
+
place: "Lugar",
|
|
13679
|
+
session: formatSession
|
|
13680
|
+
};
|
|
13681
|
+
function CourseSchedule({
|
|
13682
|
+
course,
|
|
13683
|
+
heading,
|
|
13684
|
+
headingLevel = 2,
|
|
13685
|
+
headingId = "course-schedule-heading",
|
|
13686
|
+
labels,
|
|
13687
|
+
locale = "es-ES",
|
|
13688
|
+
className,
|
|
13689
|
+
headingClassName,
|
|
13690
|
+
bodyClassName
|
|
13691
|
+
}) {
|
|
13692
|
+
const schedule = course.schedule;
|
|
13693
|
+
if (!schedule) return null;
|
|
13694
|
+
const text3 = { ...DEFAULT_COURSE_SCHEDULE_LABELS, ...labels };
|
|
13695
|
+
const place = [schedule.locationName, schedule.locationAddress].filter(Boolean).join(", ");
|
|
13696
|
+
const hasHeading = heading !== void 0 && heading !== null && heading !== "";
|
|
13697
|
+
const Tag = `h${headingLevel}`;
|
|
13698
|
+
const body3 = slotClassName("", "text-sm", bodyClassName);
|
|
13699
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
13700
|
+
"section",
|
|
13701
|
+
{
|
|
13702
|
+
"data-slot": "course-schedule",
|
|
13703
|
+
"data-modality": schedule.modality,
|
|
13704
|
+
"aria-labelledby": hasHeading ? headingId : void 0,
|
|
13705
|
+
className: slotClassName("space-y-3", "", className),
|
|
13706
|
+
children: [
|
|
13707
|
+
hasHeading ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Tag, { id: headingId, className: slotClassName("", "text-lg font-semibold", headingClassName), children: heading }) : null,
|
|
13708
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { "data-slot": "course-schedule-modality", className: body3, children: text3.modality[schedule.modality] }),
|
|
13709
|
+
schedule.sessions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { "data-slot": "course-schedule-dates", className: body3, children: [
|
|
13710
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "font-medium", children: text3.dates }),
|
|
13711
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("ul", { className: "list-disc space-y-1 pl-5", children: schedule.sessions.map((session) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { "data-slot": "course-schedule-session", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("time", { dateTime: session.startsAt, children: text3.session(session, schedule.timeZone, locale) }) }, session.startsAt)) })
|
|
13712
|
+
] }) : null,
|
|
13713
|
+
place ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { "data-slot": "course-schedule-place", className: body3, children: [
|
|
13714
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "font-medium", children: text3.place }),
|
|
13715
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("address", { className: "not-italic", children: place })
|
|
13716
|
+
] }) : null,
|
|
13717
|
+
schedule.attendanceNotes ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { "data-slot": "course-schedule-notes", className: slotClassName("whitespace-pre-line", "text-sm", bodyClassName), children: schedule.attendanceNotes }) : null
|
|
13718
|
+
]
|
|
13719
|
+
}
|
|
13720
|
+
);
|
|
13721
|
+
}
|
|
13722
|
+
|
|
13723
|
+
// src/components/legal-document.tsx
|
|
13724
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
13644
13725
|
function isVisiblyEmpty2(html5) {
|
|
13645
13726
|
if (/<(img|iframe|hr)\b/i.test(html5)) return false;
|
|
13646
13727
|
return html5.replace(/<[^>]*>/g, "").trim() === "";
|
|
@@ -13659,17 +13740,17 @@ function LegalDocument({
|
|
|
13659
13740
|
const hasFallback = fallback !== void 0 && fallback !== null && fallback !== false;
|
|
13660
13741
|
if (isEmpty && !hasFallback) return null;
|
|
13661
13742
|
const hasTitle = title !== void 0 && title !== null && title !== "";
|
|
13662
|
-
return /* @__PURE__ */ (0,
|
|
13743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
13663
13744
|
"article",
|
|
13664
13745
|
{
|
|
13665
13746
|
"data-slot": "legal-document",
|
|
13666
13747
|
"aria-labelledby": hasTitle ? titleId : void 0,
|
|
13667
13748
|
className: slotClassName("space-y-6", "", className),
|
|
13668
13749
|
children: [
|
|
13669
|
-
hasTitle && /* @__PURE__ */ (0,
|
|
13750
|
+
hasTitle && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h1", { id: titleId, className: slotClassName("", "text-3xl font-bold", titleClassName), children: title }),
|
|
13670
13751
|
isEmpty ? fallback : (
|
|
13671
13752
|
// `html` is already sanitised by `markdownToSafeHtml` — SafeHtml only maps it.
|
|
13672
|
-
/* @__PURE__ */ (0,
|
|
13753
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
13673
13754
|
SafeHtml,
|
|
13674
13755
|
{
|
|
13675
13756
|
html: html5,
|
|
@@ -13685,7 +13766,7 @@ function LegalDocument({
|
|
|
13685
13766
|
}
|
|
13686
13767
|
|
|
13687
13768
|
// src/components/lesson-preview.tsx
|
|
13688
|
-
var
|
|
13769
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
13689
13770
|
var DEFAULT_LESSON_PREVIEW_LABELS = {
|
|
13690
13771
|
badge: "Vista previa gratuita",
|
|
13691
13772
|
player: "V\xEDdeo",
|
|
@@ -13728,15 +13809,15 @@ function LessonPreview({
|
|
|
13728
13809
|
const html5 = markdownToSafeHtml(lesson.content);
|
|
13729
13810
|
const hasBody = html5 !== null && html5 !== "" && !isVisiblyEmpty3(html5);
|
|
13730
13811
|
const duration = typeof lesson.durationSeconds === "number" && lesson.durationSeconds > 0 ? clock(lesson.durationSeconds) : null;
|
|
13731
|
-
return /* @__PURE__ */ (0,
|
|
13812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
13732
13813
|
"article",
|
|
13733
13814
|
{
|
|
13734
13815
|
"data-slot": "lesson-preview",
|
|
13735
13816
|
"aria-labelledby": headingId,
|
|
13736
13817
|
className: slotClassName("space-y-6", "", className),
|
|
13737
13818
|
children: [
|
|
13738
|
-
/* @__PURE__ */ (0,
|
|
13739
|
-
/* @__PURE__ */ (0,
|
|
13819
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("header", { className: "space-y-2", children: [
|
|
13820
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
13740
13821
|
"span",
|
|
13741
13822
|
{
|
|
13742
13823
|
"data-slot": "lesson-preview-badge",
|
|
@@ -13744,7 +13825,7 @@ function LessonPreview({
|
|
|
13744
13825
|
children: labels.badge
|
|
13745
13826
|
}
|
|
13746
13827
|
),
|
|
13747
|
-
/* @__PURE__ */ (0,
|
|
13828
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
13748
13829
|
Tag,
|
|
13749
13830
|
{
|
|
13750
13831
|
id: headingId,
|
|
@@ -13752,12 +13833,12 @@ function LessonPreview({
|
|
|
13752
13833
|
children: lesson.title
|
|
13753
13834
|
}
|
|
13754
13835
|
),
|
|
13755
|
-
duration && /* @__PURE__ */ (0,
|
|
13756
|
-
/* @__PURE__ */ (0,
|
|
13836
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("p", { className: "text-sm text-muted-foreground", children: [
|
|
13837
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "sr-only", children: [
|
|
13757
13838
|
labels.duration,
|
|
13758
13839
|
": "
|
|
13759
13840
|
] }),
|
|
13760
|
-
/* @__PURE__ */ (0,
|
|
13841
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
13761
13842
|
"time",
|
|
13762
13843
|
{
|
|
13763
13844
|
"data-slot": "lesson-preview-duration",
|
|
@@ -13768,12 +13849,12 @@ function LessonPreview({
|
|
|
13768
13849
|
)
|
|
13769
13850
|
] })
|
|
13770
13851
|
] }),
|
|
13771
|
-
video && /* @__PURE__ */ (0,
|
|
13852
|
+
video && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
13772
13853
|
"div",
|
|
13773
13854
|
{
|
|
13774
13855
|
"data-slot": "lesson-preview-player",
|
|
13775
13856
|
className: "aspect-video w-full overflow-hidden rounded-xl border border-border bg-black",
|
|
13776
|
-
children: /* @__PURE__ */ (0,
|
|
13857
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
13777
13858
|
"iframe",
|
|
13778
13859
|
{
|
|
13779
13860
|
src: video.embedUrl,
|
|
@@ -13787,7 +13868,7 @@ function LessonPreview({
|
|
|
13787
13868
|
)
|
|
13788
13869
|
}
|
|
13789
13870
|
),
|
|
13790
|
-
hasBody && /* @__PURE__ */ (0,
|
|
13871
|
+
hasBody && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { "data-slot": "lesson-preview-content", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
13791
13872
|
SafeHtml,
|
|
13792
13873
|
{
|
|
13793
13874
|
html: html5,
|
|
@@ -13806,7 +13887,7 @@ var import_utils3 = require("@reblu/site-ui/utils");
|
|
|
13806
13887
|
// src/components/_page-parts.tsx
|
|
13807
13888
|
var import_utils2 = require("@reblu/site-ui/utils");
|
|
13808
13889
|
var import_button_variants = require("@reblu/site-ui/button-variants");
|
|
13809
|
-
var
|
|
13890
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
13810
13891
|
var KNOWN_BUTTON_VARIANTS = /* @__PURE__ */ new Set([
|
|
13811
13892
|
"default",
|
|
13812
13893
|
"destructive",
|
|
@@ -13819,11 +13900,11 @@ function toButtonVariant(variant) {
|
|
|
13819
13900
|
return variant && KNOWN_BUTTON_VARIANTS.has(variant) ? variant : "default";
|
|
13820
13901
|
}
|
|
13821
13902
|
function PageHero({ page }) {
|
|
13822
|
-
return /* @__PURE__ */ (0,
|
|
13823
|
-
page.category && /* @__PURE__ */ (0,
|
|
13824
|
-
/* @__PURE__ */ (0,
|
|
13825
|
-
page.subtitle && /* @__PURE__ */ (0,
|
|
13826
|
-
page.coverImageUrl && /* @__PURE__ */ (0,
|
|
13903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("header", { className: "space-y-4", children: [
|
|
13904
|
+
page.category && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "inline-flex items-center rounded-full bg-secondary px-3 py-1 text-sm font-medium text-secondary-foreground", children: page.category.name }),
|
|
13905
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h1", { className: "text-4xl font-bold tracking-tight", children: page.title }),
|
|
13906
|
+
page.subtitle && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-lg text-muted-foreground", children: page.subtitle }),
|
|
13907
|
+
page.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
13827
13908
|
"img",
|
|
13828
13909
|
{
|
|
13829
13910
|
src: page.coverImageUrl,
|
|
@@ -13837,7 +13918,7 @@ function PageHero({ page }) {
|
|
|
13837
13918
|
function SectionCta({ section }) {
|
|
13838
13919
|
if (!section.ctaLabel || !section.ctaUrl) return null;
|
|
13839
13920
|
const variant = toButtonVariant(section.ctaVariant);
|
|
13840
|
-
return /* @__PURE__ */ (0,
|
|
13921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
13841
13922
|
"a",
|
|
13842
13923
|
{
|
|
13843
13924
|
href: section.ctaUrl,
|
|
@@ -13852,46 +13933,46 @@ function SectionCta({ section }) {
|
|
|
13852
13933
|
}
|
|
13853
13934
|
function SectionImages({ section }) {
|
|
13854
13935
|
if (section.images.length === 0) return null;
|
|
13855
|
-
return /* @__PURE__ */ (0,
|
|
13856
|
-
/* @__PURE__ */ (0,
|
|
13857
|
-
img.caption && /* @__PURE__ */ (0,
|
|
13936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: (0, import_utils2.cn)("grid gap-4", section.images.length > 1 ? "sm:grid-cols-2" : "grid-cols-1"), children: section.images.map((img) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("figure", { className: "space-y-1", children: [
|
|
13937
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("img", { src: img.url, alt: img.alt, loading: "lazy", className: "h-full w-full object-cover" }) }),
|
|
13938
|
+
img.caption && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("figcaption", { className: "text-sm text-muted-foreground", children: img.caption })
|
|
13858
13939
|
] }, `${img.url}-${img.order}`)) });
|
|
13859
13940
|
}
|
|
13860
13941
|
function PageSectionBlock({ section }) {
|
|
13861
13942
|
const imageFirst = section.layout === "IMAGE_TEXT";
|
|
13862
13943
|
const sideBySide = section.layout === "TEXT_IMAGE" || section.layout === "IMAGE_TEXT";
|
|
13863
13944
|
const hasImages = section.images.length > 0;
|
|
13864
|
-
const body3 = /* @__PURE__ */ (0,
|
|
13865
|
-
section.heading && /* @__PURE__ */ (0,
|
|
13866
|
-
/* @__PURE__ */ (0,
|
|
13867
|
-
/* @__PURE__ */ (0,
|
|
13945
|
+
const body3 = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "space-y-4", children: [
|
|
13946
|
+
section.heading && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h2", { className: "text-2xl font-bold", children: section.heading }),
|
|
13947
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SafeHtml, { html: sanitizeHtml(section.contentHtml), headingOffset: 2 }),
|
|
13948
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SectionCta, { section })
|
|
13868
13949
|
] });
|
|
13869
13950
|
if (sideBySide && hasImages) {
|
|
13870
|
-
return /* @__PURE__ */ (0,
|
|
13871
|
-
/* @__PURE__ */ (0,
|
|
13951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("section", { className: "grid items-center gap-8 md:grid-cols-2", children: imageFirst ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
13952
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SectionImages, { section }),
|
|
13872
13953
|
body3
|
|
13873
|
-
] }) : /* @__PURE__ */ (0,
|
|
13954
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
13874
13955
|
body3,
|
|
13875
|
-
/* @__PURE__ */ (0,
|
|
13956
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SectionImages, { section })
|
|
13876
13957
|
] }) });
|
|
13877
13958
|
}
|
|
13878
|
-
return /* @__PURE__ */ (0,
|
|
13959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("section", { className: "space-y-4", children: [
|
|
13879
13960
|
body3,
|
|
13880
|
-
/* @__PURE__ */ (0,
|
|
13961
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SectionImages, { section })
|
|
13881
13962
|
] });
|
|
13882
13963
|
}
|
|
13883
13964
|
function PageSectionList({ sections }) {
|
|
13884
13965
|
if (sections.length === 0) return null;
|
|
13885
13966
|
const ordered = sections.slice().sort((a, b2) => a.order - b2.order);
|
|
13886
|
-
return /* @__PURE__ */ (0,
|
|
13967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "space-y-12", children: ordered.map((section) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PageSectionBlock, { section }, section.id)) });
|
|
13887
13968
|
}
|
|
13888
13969
|
|
|
13889
13970
|
// src/components/treatment.tsx
|
|
13890
|
-
var
|
|
13971
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
13891
13972
|
function Treatment({ page, className }) {
|
|
13892
|
-
return /* @__PURE__ */ (0,
|
|
13893
|
-
/* @__PURE__ */ (0,
|
|
13894
|
-
/* @__PURE__ */ (0,
|
|
13973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("article", { className: (0, import_utils3.cn)("space-y-12", className), "data-slot": "treatment", children: [
|
|
13974
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PageHero, { page }),
|
|
13975
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PageSectionList, { sections: page.sections })
|
|
13895
13976
|
] });
|
|
13896
13977
|
}
|
|
13897
13978
|
|
|
@@ -13900,11 +13981,11 @@ var import_utils5 = require("@reblu/site-ui/utils");
|
|
|
13900
13981
|
|
|
13901
13982
|
// src/components/page-card-grid.tsx
|
|
13902
13983
|
var import_utils4 = require("@reblu/site-ui/utils");
|
|
13903
|
-
var
|
|
13984
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
13904
13985
|
var defaultPageHref = (page) => `/${page.slug}`;
|
|
13905
13986
|
var pageKey = (page) => `${page.category?.slug ?? ""}/${page.slug}`;
|
|
13906
13987
|
function PageCardGrid(props) {
|
|
13907
|
-
return /* @__PURE__ */ (0,
|
|
13988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(PageCardGridSection, { ...props });
|
|
13908
13989
|
}
|
|
13909
13990
|
function PageCardGridSection({
|
|
13910
13991
|
pages,
|
|
@@ -13915,15 +13996,15 @@ function PageCardGridSection({
|
|
|
13915
13996
|
}) {
|
|
13916
13997
|
if (pages.length === 0) return null;
|
|
13917
13998
|
const showHeading = keepEmptyHeading ? heading !== void 0 : !!heading;
|
|
13918
|
-
return /* @__PURE__ */ (0,
|
|
13919
|
-
showHeading && /* @__PURE__ */ (0,
|
|
13920
|
-
/* @__PURE__ */ (0,
|
|
13999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: (0, import_utils4.cn)("space-y-6", className), children: [
|
|
14000
|
+
showHeading && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h2", { className: "text-2xl font-bold", children: heading }),
|
|
14001
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("ul", { className: "grid list-none grid-cols-1 gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3", children: pages.map((page) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
13921
14002
|
"a",
|
|
13922
14003
|
{
|
|
13923
14004
|
href: pageHref(page),
|
|
13924
14005
|
className: "group flex h-full flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
|
|
13925
14006
|
children: [
|
|
13926
|
-
page.coverImageUrl && /* @__PURE__ */ (0,
|
|
14007
|
+
page.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "relative aspect-video overflow-hidden bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
13927
14008
|
"img",
|
|
13928
14009
|
{
|
|
13929
14010
|
src: page.coverImageUrl,
|
|
@@ -13932,9 +14013,9 @@ function PageCardGridSection({
|
|
|
13932
14013
|
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13933
14014
|
}
|
|
13934
14015
|
) }),
|
|
13935
|
-
/* @__PURE__ */ (0,
|
|
13936
|
-
/* @__PURE__ */ (0,
|
|
13937
|
-
page.excerpt && /* @__PURE__ */ (0,
|
|
14016
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
14017
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h3", { className: "font-semibold leading-tight transition-colors group-hover:text-primary", children: page.title }),
|
|
14018
|
+
page.excerpt && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: page.excerpt })
|
|
13938
14019
|
] })
|
|
13939
14020
|
]
|
|
13940
14021
|
}
|
|
@@ -13943,7 +14024,7 @@ function PageCardGridSection({
|
|
|
13943
14024
|
}
|
|
13944
14025
|
|
|
13945
14026
|
// src/components/parent-page.tsx
|
|
13946
|
-
var
|
|
14027
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
13947
14028
|
var defaultChildPageHref = (slug) => `/${slug}`;
|
|
13948
14029
|
function ParentPage({
|
|
13949
14030
|
page,
|
|
@@ -13958,10 +14039,10 @@ function ParentPage({
|
|
|
13958
14039
|
const pages = childPages ?? treatments ?? [];
|
|
13959
14040
|
const hrefFor = childPageHref ?? treatmentHref ?? defaultChildPageHref;
|
|
13960
14041
|
const label = childPagesLabel ?? treatmentsLabel ?? "Treatments";
|
|
13961
|
-
return /* @__PURE__ */ (0,
|
|
13962
|
-
/* @__PURE__ */ (0,
|
|
13963
|
-
/* @__PURE__ */ (0,
|
|
13964
|
-
/* @__PURE__ */ (0,
|
|
14042
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("article", { className: (0, import_utils5.cn)("space-y-12", className), "data-slot": "specialty", children: [
|
|
14043
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PageHero, { page }),
|
|
14044
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PageSectionList, { sections: page.sections }),
|
|
14045
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13965
14046
|
PageCardGridSection,
|
|
13966
14047
|
{
|
|
13967
14048
|
pages,
|
|
@@ -13981,7 +14062,7 @@ var import_utils7 = require("@reblu/site-ui/utils");
|
|
|
13981
14062
|
|
|
13982
14063
|
// src/components/professional-fields.tsx
|
|
13983
14064
|
var import_utils6 = require("@reblu/site-ui/utils");
|
|
13984
|
-
var
|
|
14065
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
13985
14066
|
function ProfessionalFields({
|
|
13986
14067
|
fields,
|
|
13987
14068
|
variant = "profile",
|
|
@@ -13989,7 +14070,7 @@ function ProfessionalFields({
|
|
|
13989
14070
|
}) {
|
|
13990
14071
|
const shown = (fields ?? []).filter((f) => variant !== "card" || f.showOnCard);
|
|
13991
14072
|
if (shown.length === 0) return null;
|
|
13992
|
-
return /* @__PURE__ */ (0,
|
|
14073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
13993
14074
|
"dl",
|
|
13994
14075
|
{
|
|
13995
14076
|
className: (0, import_utils6.cn)(
|
|
@@ -13999,13 +14080,13 @@ function ProfessionalFields({
|
|
|
13999
14080
|
),
|
|
14000
14081
|
"data-slot": "professional-fields",
|
|
14001
14082
|
"data-variant": variant,
|
|
14002
|
-
children: shown.map((field, index) => /* @__PURE__ */ (0,
|
|
14083
|
+
children: shown.map((field, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
14003
14084
|
"div",
|
|
14004
14085
|
{
|
|
14005
14086
|
className: variant === "card" ? "flex justify-center gap-1" : "contents",
|
|
14006
14087
|
children: [
|
|
14007
|
-
/* @__PURE__ */ (0,
|
|
14008
|
-
/* @__PURE__ */ (0,
|
|
14088
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("dt", { className: "text-muted-foreground", children: field.label }),
|
|
14089
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("dd", { className: "m-0 font-medium", children: field.value })
|
|
14009
14090
|
]
|
|
14010
14091
|
},
|
|
14011
14092
|
`${field.label}-${index}`
|
|
@@ -14015,7 +14096,7 @@ function ProfessionalFields({
|
|
|
14015
14096
|
}
|
|
14016
14097
|
|
|
14017
14098
|
// src/components/profile-card.tsx
|
|
14018
|
-
var
|
|
14099
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
14019
14100
|
function initials(name) {
|
|
14020
14101
|
return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
|
|
14021
14102
|
}
|
|
@@ -14030,7 +14111,7 @@ function ProfileCard({
|
|
|
14030
14111
|
className
|
|
14031
14112
|
}) {
|
|
14032
14113
|
const NameTag = href ? "a" : "span";
|
|
14033
|
-
return /* @__PURE__ */ (0,
|
|
14114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
14034
14115
|
"article",
|
|
14035
14116
|
{
|
|
14036
14117
|
className: (0, import_utils7.cn)(
|
|
@@ -14039,7 +14120,7 @@ function ProfileCard({
|
|
|
14039
14120
|
),
|
|
14040
14121
|
"data-slot": "profile-card",
|
|
14041
14122
|
children: [
|
|
14042
|
-
/* @__PURE__ */ (0,
|
|
14123
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "relative h-24 w-24 overflow-hidden rounded-full bg-muted", children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("img", { src: imageUrl, alt: name, loading: "lazy", className: "h-full w-full object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
14043
14124
|
"span",
|
|
14044
14125
|
{
|
|
14045
14126
|
className: "flex h-full w-full items-center justify-center text-2xl font-semibold text-muted-foreground",
|
|
@@ -14047,12 +14128,12 @@ function ProfileCard({
|
|
|
14047
14128
|
children: initials(name)
|
|
14048
14129
|
}
|
|
14049
14130
|
) }),
|
|
14050
|
-
/* @__PURE__ */ (0,
|
|
14051
|
-
/* @__PURE__ */ (0,
|
|
14052
|
-
role && /* @__PURE__ */ (0,
|
|
14131
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "space-y-1", children: [
|
|
14132
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h3", { className: "text-lg font-semibold leading-tight", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(NameTag, { ...href ? { href, className: "transition-colors hover:text-primary" } : {}, children: name }) }),
|
|
14133
|
+
role && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm text-muted-foreground", children: role })
|
|
14053
14134
|
] }),
|
|
14054
|
-
/* @__PURE__ */ (0,
|
|
14055
|
-
specialties.length > 0 && /* @__PURE__ */ (0,
|
|
14135
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ProfessionalFields, { fields, variant: "card" }),
|
|
14136
|
+
specialties.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ul", { className: "flex flex-wrap justify-center gap-1.5 p-0", children: specialties.map((s2) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
14056
14137
|
"li",
|
|
14057
14138
|
{
|
|
14058
14139
|
className: "inline-flex items-center rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium text-secondary-foreground",
|
|
@@ -14060,28 +14141,107 @@ function ProfileCard({
|
|
|
14060
14141
|
},
|
|
14061
14142
|
s2
|
|
14062
14143
|
)) }),
|
|
14063
|
-
bio && /* @__PURE__ */ (0,
|
|
14144
|
+
bio && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm text-muted-foreground", children: bio })
|
|
14064
14145
|
]
|
|
14065
14146
|
}
|
|
14066
14147
|
);
|
|
14067
14148
|
}
|
|
14068
14149
|
|
|
14069
|
-
// src/components/
|
|
14150
|
+
// src/components/linked-pages.tsx
|
|
14070
14151
|
var import_utils8 = require("@reblu/site-ui/utils");
|
|
14071
|
-
|
|
14152
|
+
|
|
14153
|
+
// src/lib/page-links.ts
|
|
14154
|
+
function linkKey(link) {
|
|
14155
|
+
return `${link.category?.slug ?? ""}/${link.slug}`;
|
|
14156
|
+
}
|
|
14157
|
+
function linkFilterOptions(items) {
|
|
14158
|
+
const seen = /* @__PURE__ */ new Map();
|
|
14159
|
+
for (const item of items) {
|
|
14160
|
+
for (const link of item.links ?? []) {
|
|
14161
|
+
const key2 = linkKey(link);
|
|
14162
|
+
if (!seen.has(key2)) seen.set(key2, { key: key2, label: link.title });
|
|
14163
|
+
}
|
|
14164
|
+
}
|
|
14165
|
+
return [...seen.values()];
|
|
14166
|
+
}
|
|
14167
|
+
function filterByLink(items, key2) {
|
|
14168
|
+
if (key2 === null) return items;
|
|
14169
|
+
return items.filter((item) => (item.links ?? []).some((link) => linkKey(link) === key2));
|
|
14170
|
+
}
|
|
14171
|
+
|
|
14172
|
+
// src/components/linked-pages.tsx
|
|
14173
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
14174
|
+
function LinkedPagesGrid({
|
|
14175
|
+
pages,
|
|
14176
|
+
pageHref = (page) => `/${page.slug}`,
|
|
14177
|
+
heading,
|
|
14178
|
+
className
|
|
14179
|
+
}) {
|
|
14180
|
+
if (!pages || pages.length === 0) return null;
|
|
14181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("section", { className: (0, import_utils8.cn)("space-y-6", className), "data-slot": "linked-pages", children: [
|
|
14182
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h2", { className: "text-2xl font-bold", children: heading }),
|
|
14183
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ul", { className: "grid list-none grid-cols-1 gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3", children: pages.map((page) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
14184
|
+
"a",
|
|
14185
|
+
{
|
|
14186
|
+
href: pageHref(page),
|
|
14187
|
+
className: "group flex h-full flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
|
|
14188
|
+
children: [
|
|
14189
|
+
page.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "relative aspect-video overflow-hidden bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
14190
|
+
"img",
|
|
14191
|
+
{
|
|
14192
|
+
src: page.coverImageUrl,
|
|
14193
|
+
alt: "",
|
|
14194
|
+
loading: "lazy",
|
|
14195
|
+
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
14196
|
+
}
|
|
14197
|
+
) }),
|
|
14198
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
14199
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h3", { className: "font-semibold leading-tight transition-colors group-hover:text-primary", children: page.title }),
|
|
14200
|
+
page.excerpt && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: page.excerpt })
|
|
14201
|
+
] })
|
|
14202
|
+
]
|
|
14203
|
+
}
|
|
14204
|
+
) }, linkKey(page))) })
|
|
14205
|
+
] });
|
|
14206
|
+
}
|
|
14207
|
+
function TeamGrid({
|
|
14208
|
+
members,
|
|
14209
|
+
memberHref,
|
|
14210
|
+
heading,
|
|
14211
|
+
className
|
|
14212
|
+
}) {
|
|
14213
|
+
if (!members || members.length === 0) return null;
|
|
14214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("section", { className: (0, import_utils8.cn)("space-y-6", className), "data-slot": "team-grid", children: [
|
|
14215
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h2", { className: "text-2xl font-bold", children: heading }),
|
|
14216
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ul", { className: "grid list-none grid-cols-1 gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3", children: members.map((member) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
14217
|
+
ProfileCard,
|
|
14218
|
+
{
|
|
14219
|
+
name: member.title,
|
|
14220
|
+
role: member.role ?? void 0,
|
|
14221
|
+
imageUrl: member.coverImageUrl ?? void 0,
|
|
14222
|
+
href: memberHref?.(member),
|
|
14223
|
+
className: "h-full"
|
|
14224
|
+
}
|
|
14225
|
+
) }, linkKey(member))) })
|
|
14226
|
+
] });
|
|
14227
|
+
}
|
|
14228
|
+
|
|
14229
|
+
// src/components/product-card.tsx
|
|
14230
|
+
var import_utils9 = require("@reblu/site-ui/utils");
|
|
14231
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
14072
14232
|
function ProductCard({ product, href, currencyCode = "EUR", locale, className }) {
|
|
14073
14233
|
const image = product.images.find((i) => i.isPrimary) ?? product.images[0];
|
|
14074
14234
|
const hasDiscount = product.comparePrice != null && product.comparePrice > product.price;
|
|
14075
|
-
return /* @__PURE__ */ (0,
|
|
14235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
14076
14236
|
"article",
|
|
14077
14237
|
{
|
|
14078
|
-
className: (0,
|
|
14238
|
+
className: (0, import_utils9.cn)(
|
|
14079
14239
|
"group flex flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
|
|
14080
14240
|
className
|
|
14081
14241
|
),
|
|
14082
14242
|
"data-slot": "product-card",
|
|
14083
14243
|
children: [
|
|
14084
|
-
/* @__PURE__ */ (0,
|
|
14244
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "relative aspect-square overflow-hidden bg-muted", children: image ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
14085
14245
|
"img",
|
|
14086
14246
|
{
|
|
14087
14247
|
src: image.url,
|
|
@@ -14089,14 +14249,14 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
14089
14249
|
loading: "lazy",
|
|
14090
14250
|
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
14091
14251
|
}
|
|
14092
|
-
) : /* @__PURE__ */ (0,
|
|
14093
|
-
/* @__PURE__ */ (0,
|
|
14094
|
-
product.category && /* @__PURE__ */ (0,
|
|
14095
|
-
/* @__PURE__ */ (0,
|
|
14096
|
-
product.shortDescription && /* @__PURE__ */ (0,
|
|
14097
|
-
/* @__PURE__ */ (0,
|
|
14098
|
-
/* @__PURE__ */ (0,
|
|
14099
|
-
hasDiscount && /* @__PURE__ */ (0,
|
|
14252
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex h-full items-center justify-center text-4xl text-muted-foreground/30", "aria-hidden": "true", children: "\u{1F6CD}\uFE0F" }) }),
|
|
14253
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
14254
|
+
product.category && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "inline-flex w-fit items-center rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium text-secondary-foreground", children: product.category.name }),
|
|
14255
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h3", { className: "text-base font-semibold leading-tight", children: href ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("a", { href, className: "transition-colors hover:text-primary", children: product.name }) : product.name }),
|
|
14256
|
+
product.shortDescription && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: product.shortDescription }),
|
|
14257
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "mt-auto flex items-baseline gap-2 pt-2", children: [
|
|
14258
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-lg font-bold text-foreground", children: formatPrice(product.price, currencyCode, locale) }),
|
|
14259
|
+
hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-sm text-muted-foreground line-through", children: formatPrice(product.comparePrice, currencyCode, locale) })
|
|
14100
14260
|
] })
|
|
14101
14261
|
] })
|
|
14102
14262
|
]
|
|
@@ -14298,7 +14458,7 @@ var __iconNode8 = [
|
|
|
14298
14458
|
var Truck = createLucideIcon("truck", __iconNode8);
|
|
14299
14459
|
|
|
14300
14460
|
// src/components/product-trust-items.tsx
|
|
14301
|
-
var
|
|
14461
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
14302
14462
|
var DEFAULT_TRUST_ICONS = Object.freeze({
|
|
14303
14463
|
shipping: Truck,
|
|
14304
14464
|
returns: RotateCcw,
|
|
@@ -14332,17 +14492,17 @@ function ProductTrustItems({
|
|
|
14332
14492
|
return [{ key: `${index}-${icon}`, Icon: Icon2, text: text3 }];
|
|
14333
14493
|
});
|
|
14334
14494
|
if (rows.length === 0) return null;
|
|
14335
|
-
return /* @__PURE__ */ (0,
|
|
14336
|
-
/* @__PURE__ */ (0,
|
|
14337
|
-
/* @__PURE__ */ (0,
|
|
14495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(List, { "data-slot": "product-trust-items", className: slotClassName("space-y-2.5", "", className), children: rows.map(({ key: key2, Icon: Icon2, text: text3 }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("li", { className: slotClassName("flex items-center gap-3", "text-sm text-muted-foreground", itemClassName), children: [
|
|
14496
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-foreground/60" }),
|
|
14497
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: text3 })
|
|
14338
14498
|
] }, key2)) });
|
|
14339
14499
|
}
|
|
14340
14500
|
|
|
14341
14501
|
// src/components/faq-accordion.tsx
|
|
14342
|
-
var
|
|
14502
|
+
var import_utils12 = require("@reblu/site-ui/utils");
|
|
14343
14503
|
|
|
14344
14504
|
// src/components/_heading.tsx
|
|
14345
|
-
var
|
|
14505
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
14346
14506
|
function nextHeadingLevel(level) {
|
|
14347
14507
|
return Math.min(level + 1, 6);
|
|
14348
14508
|
}
|
|
@@ -14352,11 +14512,11 @@ function Heading({
|
|
|
14352
14512
|
children: children2
|
|
14353
14513
|
}) {
|
|
14354
14514
|
const Tag = `h${level}`;
|
|
14355
|
-
return /* @__PURE__ */ (0,
|
|
14515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Tag, { className, children: children2 });
|
|
14356
14516
|
}
|
|
14357
14517
|
|
|
14358
14518
|
// src/components/faq-accordion.tsx
|
|
14359
|
-
var
|
|
14519
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
14360
14520
|
function FaqAccordion({
|
|
14361
14521
|
items,
|
|
14362
14522
|
heading,
|
|
@@ -14367,18 +14527,18 @@ function FaqAccordion({
|
|
|
14367
14527
|
}) {
|
|
14368
14528
|
const visible = items.map((item, index) => ({ item, index })).filter(({ item }) => item.q.trim() !== "");
|
|
14369
14529
|
if (visible.length === 0) return null;
|
|
14370
|
-
return /* @__PURE__ */ (0,
|
|
14371
|
-
heading && /* @__PURE__ */ (0,
|
|
14372
|
-
/* @__PURE__ */ (0,
|
|
14530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: (0, import_utils12.cn)("space-y-4", className), "data-slot": "faq-accordion", children: [
|
|
14531
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Heading, { level: headingLevel, className: "text-2xl font-semibold tracking-tight", children: heading }),
|
|
14532
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "divide-y divide-border rounded-xl border border-border", children: visible.map(({ item, index }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
14373
14533
|
"details",
|
|
14374
14534
|
{
|
|
14375
14535
|
className: "group px-4",
|
|
14376
14536
|
"data-slot": "faq-item",
|
|
14377
14537
|
...defaultOpen.includes(index) ? { open: true } : {},
|
|
14378
14538
|
children: [
|
|
14379
|
-
/* @__PURE__ */ (0,
|
|
14380
|
-
questionHeadingLevel ? /* @__PURE__ */ (0,
|
|
14381
|
-
/* @__PURE__ */ (0,
|
|
14539
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4 py-4 font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring [&::-webkit-details-marker]:hidden", children: [
|
|
14540
|
+
questionHeadingLevel ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Heading, { level: questionHeadingLevel, className: "text-base font-medium", children: item.q }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: item.q }),
|
|
14541
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14382
14542
|
"span",
|
|
14383
14543
|
{
|
|
14384
14544
|
"aria-hidden": "true",
|
|
@@ -14387,7 +14547,7 @@ function FaqAccordion({
|
|
|
14387
14547
|
}
|
|
14388
14548
|
)
|
|
14389
14549
|
] }),
|
|
14390
|
-
/* @__PURE__ */ (0,
|
|
14550
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "whitespace-pre-line pb-4 text-muted-foreground", children: item.a })
|
|
14391
14551
|
]
|
|
14392
14552
|
},
|
|
14393
14553
|
index
|
|
@@ -14396,7 +14556,7 @@ function FaqAccordion({
|
|
|
14396
14556
|
}
|
|
14397
14557
|
|
|
14398
14558
|
// src/components/trust-badges.tsx
|
|
14399
|
-
var
|
|
14559
|
+
var import_utils13 = require("@reblu/site-ui/utils");
|
|
14400
14560
|
|
|
14401
14561
|
// src/lib/trust-badge-media.ts
|
|
14402
14562
|
var DEFAULT_ADHESION_NUMBER_LABEL = "N.\xBA de adhesi\xF3n";
|
|
@@ -14424,7 +14584,7 @@ function trustBadgeAlt(badge, numberLabel = DEFAULT_ADHESION_NUMBER_LABEL) {
|
|
|
14424
14584
|
}
|
|
14425
14585
|
|
|
14426
14586
|
// src/components/trust-badges.tsx
|
|
14427
|
-
var
|
|
14587
|
+
var import_jsx_runtime18 = (
|
|
14428
14588
|
// eslint-disable-next-line @next/next/no-img-element -- framework-agnostic SDK; the SITE owns image optimisation
|
|
14429
14589
|
require("react/jsx-runtime")
|
|
14430
14590
|
);
|
|
@@ -14454,17 +14614,17 @@ function isUsable(value) {
|
|
|
14454
14614
|
function BadgeContent({ badge, logoClassName }) {
|
|
14455
14615
|
const src = safeLogoSrc(badge.logoUrl);
|
|
14456
14616
|
if (src) {
|
|
14457
|
-
return /* @__PURE__ */ (0,
|
|
14617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
14458
14618
|
"img",
|
|
14459
14619
|
{
|
|
14460
14620
|
src,
|
|
14461
14621
|
alt: trustBadgeAlt(badge),
|
|
14462
14622
|
loading: "lazy",
|
|
14463
|
-
className: (0,
|
|
14623
|
+
className: (0, import_utils13.cn)("h-12 w-auto object-contain", logoClassName)
|
|
14464
14624
|
}
|
|
14465
14625
|
);
|
|
14466
14626
|
}
|
|
14467
|
-
return /* @__PURE__ */ (0,
|
|
14627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-sm font-medium", children: badge.name });
|
|
14468
14628
|
}
|
|
14469
14629
|
function TrustBadges({
|
|
14470
14630
|
badges,
|
|
@@ -14492,14 +14652,14 @@ function TrustBadges({
|
|
|
14492
14652
|
if (groups.length === 0) return null;
|
|
14493
14653
|
const hasHeading = heading !== void 0 && heading !== null && heading !== "";
|
|
14494
14654
|
const groupHeadingLevel = hasHeading ? nextHeadingLevel(headingLevel) : headingLevel;
|
|
14495
|
-
const content = groups.map(({ type, groupHeading, items }) => /* @__PURE__ */ (0,
|
|
14655
|
+
const content = groups.map(({ type, groupHeading, items }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
14496
14656
|
"div",
|
|
14497
14657
|
{
|
|
14498
14658
|
"data-slot": "trust-badge-group",
|
|
14499
14659
|
"data-type": type,
|
|
14500
|
-
className: (0,
|
|
14660
|
+
className: (0, import_utils13.cn)("space-y-3", groupClassName),
|
|
14501
14661
|
children: [
|
|
14502
|
-
groupHeading ? /* @__PURE__ */ (0,
|
|
14662
|
+
groupHeading ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
14503
14663
|
Heading,
|
|
14504
14664
|
{
|
|
14505
14665
|
level: groupHeadingLevel,
|
|
@@ -14511,30 +14671,30 @@ function TrustBadges({
|
|
|
14511
14671
|
children: groupHeading
|
|
14512
14672
|
}
|
|
14513
14673
|
) : null,
|
|
14514
|
-
/* @__PURE__ */ (0,
|
|
14674
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: (0, import_utils13.cn)("flex flex-wrap items-center gap-6", listClassName), children: items.map((badge) => {
|
|
14515
14675
|
const href = safeHref(badge.url);
|
|
14516
|
-
return /* @__PURE__ */ (0,
|
|
14517
|
-
/* @__PURE__ */ (0,
|
|
14676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { children: href ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("a", { href, target: "_blank", rel: "noopener noreferrer", className: "inline-flex", children: [
|
|
14677
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(BadgeContent, { badge, logoClassName }),
|
|
14518
14678
|
" ",
|
|
14519
|
-
/* @__PURE__ */ (0,
|
|
14520
|
-
] }) : /* @__PURE__ */ (0,
|
|
14679
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "sr-only", children: newWindowLabel })
|
|
14680
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(BadgeContent, { badge, logoClassName }) }, badge.id);
|
|
14521
14681
|
}) })
|
|
14522
14682
|
]
|
|
14523
14683
|
},
|
|
14524
14684
|
type
|
|
14525
14685
|
));
|
|
14526
14686
|
if (!hasHeading) {
|
|
14527
|
-
return /* @__PURE__ */ (0,
|
|
14687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { "data-slot": "trust-badges", className: (0, import_utils13.cn)("space-y-6", className), children: content });
|
|
14528
14688
|
}
|
|
14529
14689
|
const Tag = `h${headingLevel}`;
|
|
14530
|
-
return /* @__PURE__ */ (0,
|
|
14690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
14531
14691
|
"section",
|
|
14532
14692
|
{
|
|
14533
14693
|
"data-slot": "trust-badges",
|
|
14534
14694
|
"aria-labelledby": headingId,
|
|
14535
|
-
className: (0,
|
|
14695
|
+
className: (0, import_utils13.cn)("space-y-6", className),
|
|
14536
14696
|
children: [
|
|
14537
|
-
/* @__PURE__ */ (0,
|
|
14697
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
14538
14698
|
Tag,
|
|
14539
14699
|
{
|
|
14540
14700
|
id: headingId,
|
|
@@ -14549,8 +14709,8 @@ function TrustBadges({
|
|
|
14549
14709
|
}
|
|
14550
14710
|
|
|
14551
14711
|
// src/components/arbitration-badge.tsx
|
|
14552
|
-
var
|
|
14553
|
-
var
|
|
14712
|
+
var import_utils14 = require("@reblu/site-ui/utils");
|
|
14713
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
14554
14714
|
function isArbitrationBadge(value) {
|
|
14555
14715
|
if (typeof value !== "object" || value === null) return false;
|
|
14556
14716
|
const entry = value;
|
|
@@ -14568,35 +14728,35 @@ function ArbitrationBadge({
|
|
|
14568
14728
|
if (!Array.isArray(badges)) return null;
|
|
14569
14729
|
const items = badges.filter(isArbitrationBadge);
|
|
14570
14730
|
if (items.length === 0) return null;
|
|
14571
|
-
return /* @__PURE__ */ (0,
|
|
14731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
14572
14732
|
"ul",
|
|
14573
14733
|
{
|
|
14574
14734
|
"data-slot": "arbitration-badges",
|
|
14575
|
-
className: (0,
|
|
14735
|
+
className: (0, import_utils14.cn)("flex flex-wrap items-start gap-6", className),
|
|
14576
14736
|
children: items.map((badge) => {
|
|
14577
14737
|
const src = safeLogoSrc(badge.logoUrl);
|
|
14578
14738
|
const href = safeHref(badge.url);
|
|
14579
14739
|
const number2 = adhesionNumberOf(badge);
|
|
14580
|
-
const caption = number2 && (showNumber || !src) ? /* @__PURE__ */ (0,
|
|
14581
|
-
const content = /* @__PURE__ */ (0,
|
|
14740
|
+
const caption = number2 && (showNumber || !src) ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: (0, import_utils14.cn)("text-xs", numberClassName), "aria-hidden": src ? "true" : void 0, children: `${numberLabel} ${number2}` }) : null;
|
|
14741
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "inline-flex flex-col items-center gap-1 text-center", children: [
|
|
14582
14742
|
src ? (
|
|
14583
14743
|
// eslint-disable-next-line @next/next/no-img-element -- framework-agnostic SDK; the SITE owns image optimisation
|
|
14584
|
-
/* @__PURE__ */ (0,
|
|
14744
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
14585
14745
|
"img",
|
|
14586
14746
|
{
|
|
14587
14747
|
src,
|
|
14588
14748
|
alt: trustBadgeAlt(badge, numberLabel),
|
|
14589
14749
|
loading: "lazy",
|
|
14590
|
-
className: (0,
|
|
14750
|
+
className: (0, import_utils14.cn)("h-16 w-auto object-contain", logoClassName)
|
|
14591
14751
|
}
|
|
14592
14752
|
)
|
|
14593
|
-
) : /* @__PURE__ */ (0,
|
|
14753
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-sm font-medium", children: badge.name }),
|
|
14594
14754
|
caption
|
|
14595
14755
|
] });
|
|
14596
|
-
return /* @__PURE__ */ (0,
|
|
14756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("li", { "data-slot": "arbitration-badge", children: href ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("a", { href, target: "_blank", rel: "noopener noreferrer", className: "inline-flex", children: [
|
|
14597
14757
|
content,
|
|
14598
14758
|
" ",
|
|
14599
|
-
/* @__PURE__ */ (0,
|
|
14759
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "sr-only", children: newWindowLabel })
|
|
14600
14760
|
] }) : content }, badge.id);
|
|
14601
14761
|
})
|
|
14602
14762
|
}
|
|
@@ -14604,8 +14764,11 @@ function ArbitrationBadge({
|
|
|
14604
14764
|
}
|
|
14605
14765
|
|
|
14606
14766
|
// src/components/reviews.tsx
|
|
14607
|
-
var
|
|
14608
|
-
|
|
14767
|
+
var import_utils16 = require("@reblu/site-ui/utils");
|
|
14768
|
+
|
|
14769
|
+
// src/components/_review-card.tsx
|
|
14770
|
+
var import_utils15 = require("@reblu/site-ui/utils");
|
|
14771
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
14609
14772
|
function isHttps(value) {
|
|
14610
14773
|
if (typeof value !== "string") return false;
|
|
14611
14774
|
try {
|
|
@@ -14615,7 +14778,7 @@ function isHttps(value) {
|
|
|
14615
14778
|
return false;
|
|
14616
14779
|
}
|
|
14617
14780
|
}
|
|
14618
|
-
function
|
|
14781
|
+
function isUsableReview(value) {
|
|
14619
14782
|
if (typeof value !== "object" || value === null) return false;
|
|
14620
14783
|
const review = value;
|
|
14621
14784
|
return typeof review.id === "string" && typeof review.authorName === "string" && review.authorName.trim() !== "" && typeof review.rating === "number" && Number.isInteger(review.rating) && review.rating >= 1 && review.rating <= 5 && typeof review.sourceName === "string" && isHttps(review.sourceUrl);
|
|
@@ -14628,7 +14791,7 @@ function formatDay(day, locale) {
|
|
|
14628
14791
|
}
|
|
14629
14792
|
var STAR_PATH = "M12 2.5l2.9 5.9 6.5.9-4.7 4.6 1.1 6.5L12 17.3l-5.8 3.1 1.1-6.5L2.6 9.3l6.5-.9z";
|
|
14630
14793
|
function Stars({ rating }) {
|
|
14631
|
-
return /* @__PURE__ */ (0,
|
|
14794
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { role: "img", "aria-label": `${rating} de 5 estrellas`, className: "flex gap-0.5", children: [1, 2, 3, 4, 5].map((n) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
14632
14795
|
"svg",
|
|
14633
14796
|
{
|
|
14634
14797
|
"aria-hidden": "true",
|
|
@@ -14640,11 +14803,56 @@ function Stars({ rating }) {
|
|
|
14640
14803
|
stroke: "currentColor",
|
|
14641
14804
|
strokeWidth: "1.5",
|
|
14642
14805
|
strokeLinejoin: "round",
|
|
14643
|
-
children: /* @__PURE__ */ (0,
|
|
14806
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: STAR_PATH })
|
|
14644
14807
|
},
|
|
14645
14808
|
n
|
|
14646
14809
|
)) });
|
|
14647
14810
|
}
|
|
14811
|
+
function usableReviews(reviews) {
|
|
14812
|
+
return Array.isArray(reviews) ? reviews.filter(isUsableReview) : [];
|
|
14813
|
+
}
|
|
14814
|
+
function ReviewCard({
|
|
14815
|
+
review,
|
|
14816
|
+
linkLabel,
|
|
14817
|
+
newWindowLabel,
|
|
14818
|
+
locale,
|
|
14819
|
+
className
|
|
14820
|
+
}) {
|
|
14821
|
+
const date = formatDay(review.reviewDate, locale);
|
|
14822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
14823
|
+
"article",
|
|
14824
|
+
{
|
|
14825
|
+
"data-slot": "review",
|
|
14826
|
+
"data-source": review.source,
|
|
14827
|
+
className: (0, import_utils15.cn)("flex h-full flex-col gap-3 rounded-lg border p-5", className),
|
|
14828
|
+
children: [
|
|
14829
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Stars, { rating: review.rating }),
|
|
14830
|
+
review.text && review.text.trim() !== "" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("blockquote", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: review.text }) }) : null,
|
|
14831
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("footer", { className: "mt-auto space-y-1 text-sm", children: [
|
|
14832
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "font-semibold", children: review.authorName }),
|
|
14833
|
+
date ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("time", { dateTime: review.reviewDate, className: "block text-muted-foreground", children: date }) : null,
|
|
14834
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
14835
|
+
"a",
|
|
14836
|
+
{
|
|
14837
|
+
href: review.sourceUrl,
|
|
14838
|
+
target: "_blank",
|
|
14839
|
+
rel: "noopener nofollow",
|
|
14840
|
+
className: "inline-flex underline underline-offset-4",
|
|
14841
|
+
children: [
|
|
14842
|
+
linkLabel(review.sourceName),
|
|
14843
|
+
" ",
|
|
14844
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "sr-only", children: newWindowLabel })
|
|
14845
|
+
]
|
|
14846
|
+
}
|
|
14847
|
+
)
|
|
14848
|
+
] })
|
|
14849
|
+
]
|
|
14850
|
+
}
|
|
14851
|
+
);
|
|
14852
|
+
}
|
|
14853
|
+
|
|
14854
|
+
// src/components/reviews.tsx
|
|
14855
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
14648
14856
|
function Reviews({
|
|
14649
14857
|
reviews,
|
|
14650
14858
|
heading,
|
|
@@ -14661,11 +14869,10 @@ function Reviews({
|
|
|
14661
14869
|
cardClassName,
|
|
14662
14870
|
noticeClassName
|
|
14663
14871
|
}) {
|
|
14664
|
-
|
|
14665
|
-
const usable = reviews.filter(isUsable2);
|
|
14872
|
+
const usable = usableReviews(reviews);
|
|
14666
14873
|
if (usable.length === 0) return null;
|
|
14667
14874
|
const hasNotice = notice !== void 0 && notice !== null && notice !== "";
|
|
14668
|
-
const noticeNode = hasNotice ? /* @__PURE__ */ (0,
|
|
14875
|
+
const noticeNode = hasNotice ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14669
14876
|
"p",
|
|
14670
14877
|
{
|
|
14671
14878
|
"data-slot": "reviews-notice",
|
|
@@ -14673,68 +14880,47 @@ function Reviews({
|
|
|
14673
14880
|
children: notice
|
|
14674
14881
|
}
|
|
14675
14882
|
) : null;
|
|
14676
|
-
const grid = /* @__PURE__ */ (0,
|
|
14883
|
+
const grid = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14677
14884
|
"ul",
|
|
14678
14885
|
{
|
|
14679
14886
|
"data-slot": "reviews-grid",
|
|
14680
14887
|
className: slotClassName("grid gap-6", "sm:grid-cols-2 lg:grid-cols-3", gridClassName),
|
|
14681
14888
|
children: usable.map((review) => {
|
|
14682
|
-
|
|
14683
|
-
|
|
14684
|
-
"article",
|
|
14889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
14890
|
+
ReviewCard,
|
|
14685
14891
|
{
|
|
14686
|
-
|
|
14687
|
-
|
|
14688
|
-
|
|
14689
|
-
|
|
14690
|
-
|
|
14691
|
-
review.text && review.text.trim() !== "" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("blockquote", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: review.text }) }) : null,
|
|
14692
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("footer", { className: "mt-auto space-y-1 text-sm", children: [
|
|
14693
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "font-semibold", children: review.authorName }),
|
|
14694
|
-
date ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("time", { dateTime: review.reviewDate, className: "block text-muted-foreground", children: date }) : null,
|
|
14695
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
14696
|
-
"a",
|
|
14697
|
-
{
|
|
14698
|
-
href: review.sourceUrl,
|
|
14699
|
-
target: "_blank",
|
|
14700
|
-
rel: "noopener nofollow",
|
|
14701
|
-
className: "inline-flex underline underline-offset-4",
|
|
14702
|
-
children: [
|
|
14703
|
-
linkLabel(review.sourceName),
|
|
14704
|
-
" ",
|
|
14705
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "sr-only", children: newWindowLabel })
|
|
14706
|
-
]
|
|
14707
|
-
}
|
|
14708
|
-
)
|
|
14709
|
-
] })
|
|
14710
|
-
]
|
|
14892
|
+
review,
|
|
14893
|
+
linkLabel,
|
|
14894
|
+
newWindowLabel,
|
|
14895
|
+
locale,
|
|
14896
|
+
className: cardClassName
|
|
14711
14897
|
}
|
|
14712
14898
|
) }, review.id);
|
|
14713
14899
|
})
|
|
14714
14900
|
}
|
|
14715
14901
|
);
|
|
14716
|
-
const body3 = /* @__PURE__ */ (0,
|
|
14902
|
+
const body3 = /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
14717
14903
|
noticePosition === "above" ? noticeNode : null,
|
|
14718
14904
|
grid,
|
|
14719
14905
|
noticePosition === "below" ? noticeNode : null
|
|
14720
14906
|
] });
|
|
14721
14907
|
const hasHeading = heading !== void 0 && heading !== null && heading !== "";
|
|
14722
14908
|
if (!hasHeading) {
|
|
14723
|
-
return /* @__PURE__ */ (0,
|
|
14909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { "data-slot": "reviews", className: (0, import_utils16.cn)("space-y-4", className), children: body3 });
|
|
14724
14910
|
}
|
|
14725
14911
|
const Tag = `h${headingLevel}`;
|
|
14726
|
-
return /* @__PURE__ */ (0,
|
|
14727
|
-
/* @__PURE__ */ (0,
|
|
14912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("section", { "data-slot": "reviews", "aria-labelledby": headingId, className: (0, import_utils16.cn)("space-y-4", className), children: [
|
|
14913
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Tag, { id: headingId, className: slotClassName("", "text-xl font-semibold", headingClassName), children: heading }),
|
|
14728
14914
|
body3
|
|
14729
14915
|
] });
|
|
14730
14916
|
}
|
|
14731
14917
|
|
|
14732
14918
|
// src/components/page-blocks.tsx
|
|
14733
|
-
var
|
|
14919
|
+
var import_utils18 = require("@reblu/site-ui/utils");
|
|
14734
14920
|
var import_button_variants2 = require("@reblu/site-ui/button-variants");
|
|
14735
14921
|
|
|
14736
14922
|
// src/components/content-blocks.tsx
|
|
14737
|
-
var
|
|
14923
|
+
var import_utils17 = require("@reblu/site-ui/utils");
|
|
14738
14924
|
|
|
14739
14925
|
// src/components/_card-icons.ts
|
|
14740
14926
|
var CARD_ICON_NODES = {
|
|
@@ -14897,11 +15083,11 @@ var CARD_ICON_NODES = {
|
|
|
14897
15083
|
};
|
|
14898
15084
|
|
|
14899
15085
|
// src/components/content-blocks.tsx
|
|
14900
|
-
var
|
|
15086
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
14901
15087
|
var DEFAULT_BEFORE_AFTER_LABELS = Object.freeze({ before: "Antes", after: "Despu\xE9s" });
|
|
14902
15088
|
function PairImage({ url, alt, label }) {
|
|
14903
|
-
return /* @__PURE__ */ (0,
|
|
14904
|
-
/* @__PURE__ */ (0,
|
|
15089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("figure", { className: "space-y-2", children: [
|
|
15090
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "relative aspect-[4/3] w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
14905
15091
|
"img",
|
|
14906
15092
|
{
|
|
14907
15093
|
src: url,
|
|
@@ -14911,7 +15097,7 @@ function PairImage({ url, alt, label }) {
|
|
|
14911
15097
|
className: "h-full w-full object-cover"
|
|
14912
15098
|
}
|
|
14913
15099
|
) }),
|
|
14914
|
-
/* @__PURE__ */ (0,
|
|
15100
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("figcaption", { className: "text-sm font-semibold", children: label })
|
|
14915
15101
|
] });
|
|
14916
15102
|
}
|
|
14917
15103
|
function BeforeAfterPairs({
|
|
@@ -14923,26 +15109,26 @@ function BeforeAfterPairs({
|
|
|
14923
15109
|
}) {
|
|
14924
15110
|
const visibleCaption = showCaption && caption && caption.trim() !== "" ? caption : null;
|
|
14925
15111
|
if (pairs.length === 0 && !visibleCaption) return null;
|
|
14926
|
-
return /* @__PURE__ */ (0,
|
|
14927
|
-
pairs.length > 0 && /* @__PURE__ */ (0,
|
|
15112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { "data-slot": "before-after", className: (0, import_utils17.cn)("space-y-4", className), children: [
|
|
15113
|
+
pairs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("ul", { className: "grid gap-6 lg:grid-cols-2", children: pairs.map((pair, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
14928
15114
|
"li",
|
|
14929
15115
|
{
|
|
14930
15116
|
"data-slot": "before-after-pair",
|
|
14931
15117
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
14932
15118
|
children: [
|
|
14933
|
-
/* @__PURE__ */ (0,
|
|
14934
|
-
/* @__PURE__ */ (0,
|
|
15119
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PairImage, { url: pair.beforeUrl, alt: pair.alt ?? "", label: labels.before }),
|
|
15120
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PairImage, { url: pair.afterUrl, alt: pair.alt ?? "", label: labels.after })
|
|
14935
15121
|
]
|
|
14936
15122
|
},
|
|
14937
15123
|
`${pair.beforeUrl}-${pair.afterUrl}-${i}`
|
|
14938
15124
|
)) }),
|
|
14939
|
-
visibleCaption && /* @__PURE__ */ (0,
|
|
15125
|
+
visibleCaption && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { "data-slot": "before-after-caption", className: "whitespace-pre-line text-sm opacity-80", children: visibleCaption })
|
|
14940
15126
|
] });
|
|
14941
15127
|
}
|
|
14942
15128
|
function ChipList({ items, className }) {
|
|
14943
15129
|
const visible = items.filter((item) => item.trim() !== "");
|
|
14944
15130
|
if (visible.length === 0) return null;
|
|
14945
|
-
return /* @__PURE__ */ (0,
|
|
15131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("ul", { "data-slot": "chip-list", className: (0, import_utils17.cn)("flex flex-wrap gap-3", className), children: visible.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
14946
15132
|
"li",
|
|
14947
15133
|
{
|
|
14948
15134
|
"data-slot": "chip",
|
|
@@ -14958,7 +15144,7 @@ function hasCardIcon(icon) {
|
|
|
14958
15144
|
}
|
|
14959
15145
|
function CardIconSvg({ icon, className }) {
|
|
14960
15146
|
if (!hasCardIcon(icon)) return null;
|
|
14961
|
-
return /* @__PURE__ */ (0,
|
|
15147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
14962
15148
|
"svg",
|
|
14963
15149
|
{
|
|
14964
15150
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -14971,30 +15157,30 @@ function CardIconSvg({ icon, className }) {
|
|
|
14971
15157
|
"aria-hidden": "true",
|
|
14972
15158
|
focusable: "false",
|
|
14973
15159
|
"data-icon": icon,
|
|
14974
|
-
className: (0,
|
|
14975
|
-
children: CARD_ICON_NODES[icon].map(([Tag, attrs], i) => /* @__PURE__ */ (0,
|
|
15160
|
+
className: (0, import_utils17.cn)("h-5 w-5", className),
|
|
15161
|
+
children: CARD_ICON_NODES[icon].map(([Tag, attrs], i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Tag, { ...attrs }, i))
|
|
14976
15162
|
}
|
|
14977
15163
|
);
|
|
14978
15164
|
}
|
|
14979
15165
|
function IconCardGrid({ items, intro, headingLevel = 3, className }) {
|
|
14980
15166
|
const hasIntro = !!intro && intro.trim() !== "";
|
|
14981
15167
|
if (items.length === 0 && !hasIntro) return null;
|
|
14982
|
-
return /* @__PURE__ */ (0,
|
|
14983
|
-
hasIntro && /* @__PURE__ */ (0,
|
|
14984
|
-
items.length > 0 && /* @__PURE__ */ (0,
|
|
15168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { "data-slot": "icon-cards", className: (0, import_utils17.cn)("space-y-6", className), children: [
|
|
15169
|
+
hasIntro && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "max-w-prose text-lg opacity-80", children: intro }),
|
|
15170
|
+
items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
14985
15171
|
"ul",
|
|
14986
15172
|
{
|
|
14987
15173
|
"data-slot": "icon-card-grid",
|
|
14988
15174
|
className: "grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3",
|
|
14989
|
-
children: items.map((item, i) => /* @__PURE__ */ (0,
|
|
15175
|
+
children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
14990
15176
|
"li",
|
|
14991
15177
|
{
|
|
14992
15178
|
"data-slot": "icon-card",
|
|
14993
15179
|
className: "space-y-3 rounded-xl border border-border bg-card p-6 text-card-foreground",
|
|
14994
15180
|
children: [
|
|
14995
|
-
hasCardIcon(item.icon) && /* @__PURE__ */ (0,
|
|
14996
|
-
/* @__PURE__ */ (0,
|
|
14997
|
-
item.text && /* @__PURE__ */ (0,
|
|
15181
|
+
hasCardIcon(item.icon) && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "inline-flex h-12 w-12 items-center justify-center rounded-xl bg-primary/10 text-primary", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CardIconSvg, { icon: item.icon }) }),
|
|
15182
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Heading, { level: headingLevel, className: "text-lg font-semibold", children: item.title }),
|
|
15183
|
+
item.text && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-muted-foreground", children: item.text })
|
|
14998
15184
|
]
|
|
14999
15185
|
},
|
|
15000
15186
|
`${item.title}-${i}`
|
|
@@ -15020,19 +15206,19 @@ function ImageTextSplit({
|
|
|
15020
15206
|
const imageRight = imageSide === "right";
|
|
15021
15207
|
const hasKicker = !!kicker && kicker.trim() !== "";
|
|
15022
15208
|
const bodyOffset = heading ? headingLevel : headingLevel - 1;
|
|
15023
|
-
return /* @__PURE__ */ (0,
|
|
15209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
15024
15210
|
"div",
|
|
15025
15211
|
{
|
|
15026
15212
|
"data-slot": "image-text",
|
|
15027
15213
|
"data-image-side": imageRight ? "right" : "left",
|
|
15028
|
-
className: (0,
|
|
15214
|
+
className: (0, import_utils17.cn)("grid grid-cols-1 items-center gap-8 md:grid-cols-2", className),
|
|
15029
15215
|
children: [
|
|
15030
|
-
/* @__PURE__ */ (0,
|
|
15216
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
15031
15217
|
"div",
|
|
15032
15218
|
{
|
|
15033
15219
|
"data-slot": "image-text-media",
|
|
15034
|
-
className: (0,
|
|
15035
|
-
children: /* @__PURE__ */ (0,
|
|
15220
|
+
className: (0, import_utils17.cn)(textFirst ? "order-2" : "order-1", imageRight ? "md:order-2" : "md:order-1"),
|
|
15221
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "relative aspect-[4/3] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
15036
15222
|
"img",
|
|
15037
15223
|
{
|
|
15038
15224
|
src: imageUrl,
|
|
@@ -15044,21 +15230,21 @@ function ImageTextSplit({
|
|
|
15044
15230
|
) })
|
|
15045
15231
|
}
|
|
15046
15232
|
),
|
|
15047
|
-
/* @__PURE__ */ (0,
|
|
15233
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
15048
15234
|
"div",
|
|
15049
15235
|
{
|
|
15050
15236
|
"data-slot": "image-text-body",
|
|
15051
|
-
className: (0,
|
|
15237
|
+
className: (0, import_utils17.cn)(
|
|
15052
15238
|
"space-y-4",
|
|
15053
15239
|
textFirst ? "order-1" : "order-2",
|
|
15054
15240
|
imageRight ? "md:order-1" : "md:order-2"
|
|
15055
15241
|
),
|
|
15056
15242
|
children: [
|
|
15057
|
-
(hasKicker || heading) && /* @__PURE__ */ (0,
|
|
15058
|
-
hasKicker && /* @__PURE__ */ (0,
|
|
15059
|
-
heading && /* @__PURE__ */ (0,
|
|
15243
|
+
(hasKicker || heading) && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-2", children: [
|
|
15244
|
+
hasKicker && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { "data-slot": "page-block-kicker", className: KICKER_CLASS_NAME, children: kicker }),
|
|
15245
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { id: headingId, children: heading }) })
|
|
15060
15246
|
] }),
|
|
15061
|
-
html5 && /* @__PURE__ */ (0,
|
|
15247
|
+
html5 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SafeHtml, { html: sanitizeHtml(html5), headingOffset: bodyOffset })
|
|
15062
15248
|
]
|
|
15063
15249
|
}
|
|
15064
15250
|
)
|
|
@@ -15068,38 +15254,38 @@ function ImageTextSplit({
|
|
|
15068
15254
|
}
|
|
15069
15255
|
|
|
15070
15256
|
// src/components/page-blocks.tsx
|
|
15071
|
-
var
|
|
15257
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
15072
15258
|
var ALIASES = {
|
|
15073
15259
|
doctor_embed: "profile_embed",
|
|
15074
15260
|
specialty_embed: "page_embed"
|
|
15075
15261
|
};
|
|
15076
15262
|
function HeroBlock({ block, headingLevel }) {
|
|
15077
15263
|
const { title, subtitle, imageUrl } = block.data;
|
|
15078
|
-
return /* @__PURE__ */ (0,
|
|
15079
|
-
/* @__PURE__ */ (0,
|
|
15080
|
-
subtitle && /* @__PURE__ */ (0,
|
|
15081
|
-
imageUrl && /* @__PURE__ */ (0,
|
|
15264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-4", children: [
|
|
15265
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
|
|
15266
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-lg opacity-80", children: subtitle }),
|
|
15267
|
+
imageUrl && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
|
|
15082
15268
|
] });
|
|
15083
15269
|
}
|
|
15084
15270
|
function RichtextBlock({ block, headingLevel }) {
|
|
15085
|
-
return /* @__PURE__ */ (0,
|
|
15271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
|
|
15086
15272
|
}
|
|
15087
15273
|
function FaqBlock({ block }) {
|
|
15088
|
-
return /* @__PURE__ */ (0,
|
|
15274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FaqAccordion, { items: block.data.items });
|
|
15089
15275
|
}
|
|
15090
15276
|
function StatsBlock({ block }) {
|
|
15091
|
-
return /* @__PURE__ */ (0,
|
|
15092
|
-
/* @__PURE__ */ (0,
|
|
15093
|
-
/* @__PURE__ */ (0,
|
|
15277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-col-reverse gap-1", children: [
|
|
15278
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("dt", { className: "text-sm opacity-80", children: item.label }),
|
|
15279
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("dd", { className: "text-3xl font-bold", children: item.value })
|
|
15094
15280
|
] }, i)) });
|
|
15095
15281
|
}
|
|
15096
15282
|
function TestimonialBlock({ block }) {
|
|
15097
15283
|
const { quote, author, role, avatarUrl } = block.data;
|
|
15098
|
-
return /* @__PURE__ */ (0,
|
|
15099
|
-
/* @__PURE__ */ (0,
|
|
15100
|
-
/* @__PURE__ */ (0,
|
|
15284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("figure", { className: "space-y-4", children: [
|
|
15285
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { children: quote }) }),
|
|
15286
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("figcaption", { className: "flex items-center gap-3", children: [
|
|
15101
15287
|
avatarUrl && // eslint-disable-next-line @next/next/no-img-element
|
|
15102
|
-
/* @__PURE__ */ (0,
|
|
15288
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
15103
15289
|
"img",
|
|
15104
15290
|
{
|
|
15105
15291
|
src: avatarUrl,
|
|
@@ -15108,9 +15294,9 @@ function TestimonialBlock({ block }) {
|
|
|
15108
15294
|
className: "h-10 w-10 rounded-full object-cover"
|
|
15109
15295
|
}
|
|
15110
15296
|
),
|
|
15111
|
-
/* @__PURE__ */ (0,
|
|
15112
|
-
/* @__PURE__ */ (0,
|
|
15113
|
-
role && /* @__PURE__ */ (0,
|
|
15297
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { children: [
|
|
15298
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "font-semibold", children: author }),
|
|
15299
|
+
role && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "block text-sm opacity-80", children: role })
|
|
15114
15300
|
] })
|
|
15115
15301
|
] })
|
|
15116
15302
|
] });
|
|
@@ -15119,19 +15305,19 @@ function CtaSlotBlock(_props) {
|
|
|
15119
15305
|
return null;
|
|
15120
15306
|
}
|
|
15121
15307
|
function FeatureListBlock({ block }) {
|
|
15122
|
-
return /* @__PURE__ */ (0,
|
|
15308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("ul", { className: "grid list-disc gap-2 pl-5 sm:grid-cols-2", children: block.data.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("li", { children: item.text }, i)) });
|
|
15123
15309
|
}
|
|
15124
15310
|
function GalleryBlock({ block }) {
|
|
15125
15311
|
const { images } = block.data;
|
|
15126
|
-
return /* @__PURE__ */ (0,
|
|
15312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
15127
15313
|
"div",
|
|
15128
15314
|
{
|
|
15129
|
-
className: (0,
|
|
15315
|
+
className: (0, import_utils18.cn)(
|
|
15130
15316
|
"grid gap-4",
|
|
15131
15317
|
images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
|
|
15132
15318
|
),
|
|
15133
|
-
children: images.map((img, i) => /* @__PURE__ */ (0,
|
|
15134
|
-
/* @__PURE__ */ (0,
|
|
15319
|
+
children: images.map((img, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("figure", { className: "space-y-1", children: [
|
|
15320
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
15135
15321
|
"img",
|
|
15136
15322
|
{
|
|
15137
15323
|
src: img.url,
|
|
@@ -15140,7 +15326,7 @@ function GalleryBlock({ block }) {
|
|
|
15140
15326
|
className: "h-full w-full object-cover"
|
|
15141
15327
|
}
|
|
15142
15328
|
) }),
|
|
15143
|
-
img.caption && /* @__PURE__ */ (0,
|
|
15329
|
+
img.caption && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("figcaption", { className: "text-sm opacity-80", children: img.caption })
|
|
15144
15330
|
] }, `${img.url}-${i}`))
|
|
15145
15331
|
}
|
|
15146
15332
|
);
|
|
@@ -15150,13 +15336,13 @@ function EmbedCard({
|
|
|
15150
15336
|
headingLevel,
|
|
15151
15337
|
embedHref
|
|
15152
15338
|
}) {
|
|
15153
|
-
return /* @__PURE__ */ (0,
|
|
15339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
15154
15340
|
"a",
|
|
15155
15341
|
{
|
|
15156
15342
|
href: embedHref(resolved),
|
|
15157
15343
|
className: "group block overflow-hidden rounded-xl border border-border bg-card text-card-foreground transition-shadow hover:shadow-md focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
|
|
15158
15344
|
children: [
|
|
15159
|
-
resolved.coverImageUrl && /* @__PURE__ */ (0,
|
|
15345
|
+
resolved.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
15160
15346
|
"img",
|
|
15161
15347
|
{
|
|
15162
15348
|
src: resolved.coverImageUrl,
|
|
@@ -15165,35 +15351,35 @@ function EmbedCard({
|
|
|
15165
15351
|
className: "h-full w-full object-cover"
|
|
15166
15352
|
}
|
|
15167
15353
|
) }),
|
|
15168
|
-
/* @__PURE__ */ (0,
|
|
15169
|
-
/* @__PURE__ */ (0,
|
|
15170
|
-
resolved.role && /* @__PURE__ */ (0,
|
|
15171
|
-
resolved.excerpt && /* @__PURE__ */ (0,
|
|
15354
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1 p-4", children: [
|
|
15355
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
|
|
15356
|
+
resolved.role && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
|
|
15357
|
+
resolved.excerpt && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-muted-foreground", children: resolved.excerpt })
|
|
15172
15358
|
] })
|
|
15173
15359
|
]
|
|
15174
15360
|
}
|
|
15175
15361
|
);
|
|
15176
15362
|
}
|
|
15177
15363
|
function PageEmbedBlock({ block, headingLevel, embedHref }) {
|
|
15178
|
-
return /* @__PURE__ */ (0,
|
|
15364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
15179
15365
|
}
|
|
15180
15366
|
function ProfileEmbedBlock({
|
|
15181
15367
|
block,
|
|
15182
15368
|
headingLevel,
|
|
15183
15369
|
embedHref
|
|
15184
15370
|
}) {
|
|
15185
|
-
return /* @__PURE__ */ (0,
|
|
15371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
15186
15372
|
}
|
|
15187
15373
|
function BeforeAfterBlock({ block }) {
|
|
15188
15374
|
const { pairs, showCaption, caption } = block.data;
|
|
15189
|
-
return /* @__PURE__ */ (0,
|
|
15375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(BeforeAfterPairs, { pairs, showCaption, caption });
|
|
15190
15376
|
}
|
|
15191
15377
|
function ChipsBlock({ block }) {
|
|
15192
|
-
return /* @__PURE__ */ (0,
|
|
15378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChipList, { items: block.data.items });
|
|
15193
15379
|
}
|
|
15194
15380
|
function ImageTextBlock({ block, headingLevel, headingId }) {
|
|
15195
15381
|
const { kicker, imageUrl, alt, imageSide, mobileOrder, html: html5 } = block.data;
|
|
15196
|
-
return /* @__PURE__ */ (0,
|
|
15382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
15197
15383
|
ImageTextSplit,
|
|
15198
15384
|
{
|
|
15199
15385
|
imageUrl,
|
|
@@ -15209,7 +15395,17 @@ function ImageTextBlock({ block, headingLevel, headingId }) {
|
|
|
15209
15395
|
);
|
|
15210
15396
|
}
|
|
15211
15397
|
function IconCardsBlock({ block, headingLevel }) {
|
|
15212
|
-
return /* @__PURE__ */ (0,
|
|
15398
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(IconCardGrid, { items: block.data.items, intro: block.data.intro, headingLevel });
|
|
15399
|
+
}
|
|
15400
|
+
function ReviewsBlock({ block }) {
|
|
15401
|
+
const { layout, notice } = block.data;
|
|
15402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { "data-slot": "reviews-block", "data-reviews-layout": layout ?? "grid", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
15403
|
+
Reviews,
|
|
15404
|
+
{
|
|
15405
|
+
reviews: block.reviews,
|
|
15406
|
+
notice: notice && notice.trim() !== "" ? notice : void 0
|
|
15407
|
+
}
|
|
15408
|
+
) });
|
|
15213
15409
|
}
|
|
15214
15410
|
var DEFAULT_RENDERERS = {
|
|
15215
15411
|
hero: HeroBlock,
|
|
@@ -15225,7 +15421,8 @@ var DEFAULT_RENDERERS = {
|
|
|
15225
15421
|
before_after: BeforeAfterBlock,
|
|
15226
15422
|
chips: ChipsBlock,
|
|
15227
15423
|
icon_cards: IconCardsBlock,
|
|
15228
|
-
image_text: ImageTextBlock
|
|
15424
|
+
image_text: ImageTextBlock,
|
|
15425
|
+
reviews: ReviewsBlock
|
|
15229
15426
|
};
|
|
15230
15427
|
var KICKER_TYPES = /* @__PURE__ */ new Set([
|
|
15231
15428
|
"before_after",
|
|
@@ -15283,14 +15480,14 @@ function toIdFragment(value) {
|
|
|
15283
15480
|
function SectionCta2({ cta }) {
|
|
15284
15481
|
if (!hasUsableCta(cta)) return null;
|
|
15285
15482
|
const variant = toButtonVariant(cta.variant);
|
|
15286
|
-
return /* @__PURE__ */ (0,
|
|
15483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
15287
15484
|
"a",
|
|
15288
15485
|
{
|
|
15289
15486
|
href: cta.url,
|
|
15290
15487
|
"data-slot": "button",
|
|
15291
15488
|
"data-variant": variant,
|
|
15292
15489
|
"data-size": "default",
|
|
15293
|
-
className: (0,
|
|
15490
|
+
className: (0, import_utils18.cn)((0, import_button_variants2.buttonVariants)({ variant, size: "default" })),
|
|
15294
15491
|
...cta.isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
15295
15492
|
children: cta.label
|
|
15296
15493
|
}
|
|
@@ -15311,6 +15508,8 @@ function PageBlocks({
|
|
|
15311
15508
|
const type = canonicalTypeOf(block.blockType);
|
|
15312
15509
|
if (type === null) return [];
|
|
15313
15510
|
if (EMBED_TYPES.has(type) && !block.resolved) return [];
|
|
15511
|
+
if (type === "reviews" && (!Array.isArray(block.reviews) || block.reviews.length === 0))
|
|
15512
|
+
return [];
|
|
15314
15513
|
if (type === "cta" && !components?.cta && !block.heading && !hasUsableCta(block.cta)) return [];
|
|
15315
15514
|
const Renderer = components?.[type] ?? DEFAULT_RENDERERS[type];
|
|
15316
15515
|
const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
|
|
@@ -15318,18 +15517,18 @@ function PageBlocks({
|
|
|
15318
15517
|
const kicker = kickerOf(type, block);
|
|
15319
15518
|
const ownsHeading = OWN_HEADING_TYPES.has(type);
|
|
15320
15519
|
return [
|
|
15321
|
-
/* @__PURE__ */ (0,
|
|
15520
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
15322
15521
|
"section",
|
|
15323
15522
|
{
|
|
15324
15523
|
"data-slot": "page-block",
|
|
15325
15524
|
"data-block-type": type,
|
|
15326
15525
|
"aria-labelledby": headingId,
|
|
15327
15526
|
style: surfaceStyle(background),
|
|
15328
|
-
className: (0,
|
|
15527
|
+
className: (0, import_utils18.cn)("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
|
|
15329
15528
|
children: [
|
|
15330
|
-
kicker && /* @__PURE__ */ (0,
|
|
15331
|
-
block.heading && !ownsHeading && /* @__PURE__ */ (0,
|
|
15332
|
-
ownsHeading ? /* @__PURE__ */ (0,
|
|
15529
|
+
kicker && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { "data-slot": "page-block-kicker", className: (0, import_utils18.cn)("-mb-4", KICKER_CLASS_NAME), children: kicker }),
|
|
15530
|
+
block.heading && !ownsHeading && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { id: headingId, children: block.heading }) }),
|
|
15531
|
+
ownsHeading ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
15333
15532
|
Renderer,
|
|
15334
15533
|
{
|
|
15335
15534
|
block,
|
|
@@ -15337,7 +15536,7 @@ function PageBlocks({
|
|
|
15337
15536
|
embedHref,
|
|
15338
15537
|
headingId
|
|
15339
15538
|
}
|
|
15340
|
-
) : /* @__PURE__ */ (0,
|
|
15539
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
15341
15540
|
Renderer,
|
|
15342
15541
|
{
|
|
15343
15542
|
block,
|
|
@@ -15345,7 +15544,7 @@ function PageBlocks({
|
|
|
15345
15544
|
embedHref
|
|
15346
15545
|
}
|
|
15347
15546
|
),
|
|
15348
|
-
/* @__PURE__ */ (0,
|
|
15547
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SectionCta2, { cta: block.cta })
|
|
15349
15548
|
]
|
|
15350
15549
|
},
|
|
15351
15550
|
block.id
|
|
@@ -15353,12 +15552,12 @@ function PageBlocks({
|
|
|
15353
15552
|
];
|
|
15354
15553
|
});
|
|
15355
15554
|
if (sections.length === 0) return null;
|
|
15356
|
-
return /* @__PURE__ */ (0,
|
|
15555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: (0, import_utils18.cn)("space-y-12", className), "data-slot": "page-blocks", children: sections });
|
|
15357
15556
|
}
|
|
15358
15557
|
|
|
15359
15558
|
// src/components/shop-filters.tsx
|
|
15360
|
-
var
|
|
15361
|
-
var
|
|
15559
|
+
var import_utils19 = require("@reblu/site-ui/utils");
|
|
15560
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
15362
15561
|
var DEFAULT_SHOP_PRICE_BANDS = [
|
|
15363
15562
|
{ max: 2500 },
|
|
15364
15563
|
{ min: 2500, max: 5e3 },
|
|
@@ -15402,7 +15601,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
|
|
|
15402
15601
|
return "";
|
|
15403
15602
|
}
|
|
15404
15603
|
function OptionLink({ href, active, label, onActivate }) {
|
|
15405
|
-
return /* @__PURE__ */ (0,
|
|
15604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
15406
15605
|
"a",
|
|
15407
15606
|
{
|
|
15408
15607
|
href,
|
|
@@ -15411,7 +15610,7 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
15411
15610
|
event.preventDefault();
|
|
15412
15611
|
onActivate();
|
|
15413
15612
|
} : void 0,
|
|
15414
|
-
className: (0,
|
|
15613
|
+
className: (0, import_utils19.cn)(
|
|
15415
15614
|
"inline-flex items-center rounded-full border px-3 py-1 text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
15416
15615
|
active ? "border-transparent bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
15417
15616
|
),
|
|
@@ -15420,9 +15619,9 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
15420
15619
|
);
|
|
15421
15620
|
}
|
|
15422
15621
|
function FilterFieldset({ legend, children: children2 }) {
|
|
15423
|
-
return /* @__PURE__ */ (0,
|
|
15424
|
-
/* @__PURE__ */ (0,
|
|
15425
|
-
/* @__PURE__ */ (0,
|
|
15622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("fieldset", { className: "space-y-2", children: [
|
|
15623
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("legend", { className: "text-sm font-medium text-foreground", children: legend }),
|
|
15624
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex flex-wrap gap-2", children: children2 })
|
|
15426
15625
|
] });
|
|
15427
15626
|
}
|
|
15428
15627
|
function ShopFilters({
|
|
@@ -15445,11 +15644,11 @@ function ShopFilters({
|
|
|
15445
15644
|
if (!shouldRenderShopFilters(facets, active)) {
|
|
15446
15645
|
return null;
|
|
15447
15646
|
}
|
|
15448
|
-
return /* @__PURE__ */ (0,
|
|
15647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: (0, import_utils19.cn)("space-y-6", className), "data-slot": "shop-filters", children: [
|
|
15449
15648
|
visibleTaxonomies.map((axis) => {
|
|
15450
15649
|
const activeSlug = active.taxonomy?.[axis.key];
|
|
15451
|
-
return /* @__PURE__ */ (0,
|
|
15452
|
-
/* @__PURE__ */ (0,
|
|
15650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(FilterFieldset, { legend: axis.label, children: [
|
|
15651
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
15453
15652
|
OptionLink,
|
|
15454
15653
|
{
|
|
15455
15654
|
href: hrefs.taxonomy(axis.key, void 0),
|
|
@@ -15464,7 +15663,7 @@ function ShopFilters({
|
|
|
15464
15663
|
),
|
|
15465
15664
|
axis.terms.map((term) => {
|
|
15466
15665
|
const isActive = activeSlug === term.slug;
|
|
15467
|
-
return /* @__PURE__ */ (0,
|
|
15666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
15468
15667
|
OptionLink,
|
|
15469
15668
|
{
|
|
15470
15669
|
href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
|
|
@@ -15484,9 +15683,9 @@ function ShopFilters({
|
|
|
15484
15683
|
}),
|
|
15485
15684
|
visibleAttributes.map((attr) => {
|
|
15486
15685
|
const activeValues = toValueArray(active.attr?.[attr.key]);
|
|
15487
|
-
return /* @__PURE__ */ (0,
|
|
15686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
|
|
15488
15687
|
const isActive = activeValues.includes(opt.value);
|
|
15489
|
-
return /* @__PURE__ */ (0,
|
|
15688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
15490
15689
|
OptionLink,
|
|
15491
15690
|
{
|
|
15492
15691
|
href: hrefs.attr(attr.key, opt.value),
|
|
@@ -15504,11 +15703,11 @@ function ShopFilters({
|
|
|
15504
15703
|
);
|
|
15505
15704
|
}) }, attr.key);
|
|
15506
15705
|
}),
|
|
15507
|
-
showPriceGroup && /* @__PURE__ */ (0,
|
|
15706
|
+
showPriceGroup && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
|
|
15508
15707
|
const isActive = active.priceMin === band.min && active.priceMax === band.max;
|
|
15509
15708
|
const nextMin = isActive ? void 0 : band.min;
|
|
15510
15709
|
const nextMax = isActive ? void 0 : band.max;
|
|
15511
|
-
return /* @__PURE__ */ (0,
|
|
15710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
15512
15711
|
OptionLink,
|
|
15513
15712
|
{
|
|
15514
15713
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -15519,7 +15718,7 @@ function ShopFilters({
|
|
|
15519
15718
|
i
|
|
15520
15719
|
);
|
|
15521
15720
|
}) }),
|
|
15522
|
-
hasOnSale && /* @__PURE__ */ (0,
|
|
15721
|
+
hasOnSale && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
15523
15722
|
OptionLink,
|
|
15524
15723
|
{
|
|
15525
15724
|
href: hrefs.onSale(!active.onSale),
|
|
@@ -15528,7 +15727,7 @@ function ShopFilters({
|
|
|
15528
15727
|
onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
|
|
15529
15728
|
}
|
|
15530
15729
|
),
|
|
15531
|
-
/* @__PURE__ */ (0,
|
|
15730
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
15532
15731
|
"a",
|
|
15533
15732
|
{
|
|
15534
15733
|
href: hrefs.clearAll(),
|
|
@@ -15544,8 +15743,8 @@ function ShopFilters({
|
|
|
15544
15743
|
}
|
|
15545
15744
|
|
|
15546
15745
|
// src/components/course-catalog-filters.tsx
|
|
15547
|
-
var
|
|
15548
|
-
var
|
|
15746
|
+
var import_utils20 = require("@reblu/site-ui/utils");
|
|
15747
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
15549
15748
|
var DEFAULT_COURSE_PRICE_BANDS = [
|
|
15550
15749
|
{ max: 5e3 },
|
|
15551
15750
|
{ min: 5e3, max: 15e3 },
|
|
@@ -15598,9 +15797,9 @@ function CourseCatalogFilters({
|
|
|
15598
15797
|
const showPrice = enabled.price !== false;
|
|
15599
15798
|
const isFree = Boolean(active.free);
|
|
15600
15799
|
if (!showCategories && !showInstructors && !showPrice) return null;
|
|
15601
|
-
return /* @__PURE__ */ (0,
|
|
15602
|
-
showCategories && /* @__PURE__ */ (0,
|
|
15603
|
-
/* @__PURE__ */ (0,
|
|
15800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: (0, import_utils20.cn)("space-y-6", className), "data-slot": "course-catalog-filters", children: [
|
|
15801
|
+
showCategories && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(FilterFieldset, { legend: t.category, children: [
|
|
15802
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
15604
15803
|
OptionLink,
|
|
15605
15804
|
{
|
|
15606
15805
|
href: categoryHref(void 0),
|
|
@@ -15612,7 +15811,7 @@ function CourseCatalogFilters({
|
|
|
15612
15811
|
sortedCategories.map((category) => {
|
|
15613
15812
|
const isActive = active.category === category.slug;
|
|
15614
15813
|
const next2 = isActive ? void 0 : category.slug;
|
|
15615
|
-
return /* @__PURE__ */ (0,
|
|
15814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
15616
15815
|
OptionLink,
|
|
15617
15816
|
{
|
|
15618
15817
|
href: categoryHref(next2),
|
|
@@ -15624,8 +15823,8 @@ function CourseCatalogFilters({
|
|
|
15624
15823
|
);
|
|
15625
15824
|
})
|
|
15626
15825
|
] }),
|
|
15627
|
-
showInstructors && /* @__PURE__ */ (0,
|
|
15628
|
-
/* @__PURE__ */ (0,
|
|
15826
|
+
showInstructors && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(FilterFieldset, { legend: t.instructor, children: [
|
|
15827
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
15629
15828
|
OptionLink,
|
|
15630
15829
|
{
|
|
15631
15830
|
href: hrefs.instructor(void 0),
|
|
@@ -15637,7 +15836,7 @@ function CourseCatalogFilters({
|
|
|
15637
15836
|
named.map((instructor) => {
|
|
15638
15837
|
const isActive = active.instructor === instructor.id;
|
|
15639
15838
|
const next2 = isActive ? void 0 : instructor.id;
|
|
15640
|
-
return /* @__PURE__ */ (0,
|
|
15839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
15641
15840
|
OptionLink,
|
|
15642
15841
|
{
|
|
15643
15842
|
href: hrefs.instructor(next2),
|
|
@@ -15649,8 +15848,8 @@ function CourseCatalogFilters({
|
|
|
15649
15848
|
);
|
|
15650
15849
|
})
|
|
15651
15850
|
] }),
|
|
15652
|
-
showPrice && /* @__PURE__ */ (0,
|
|
15653
|
-
/* @__PURE__ */ (0,
|
|
15851
|
+
showPrice && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(FilterFieldset, { legend: t.price, children: [
|
|
15852
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
15654
15853
|
OptionLink,
|
|
15655
15854
|
{
|
|
15656
15855
|
href: hrefs.free(!isFree),
|
|
@@ -15665,7 +15864,7 @@ function CourseCatalogFilters({
|
|
|
15665
15864
|
const isActive = !isFree && active.priceMin === band.min && active.priceMax === band.max;
|
|
15666
15865
|
const nextMin = isActive ? void 0 : band.min;
|
|
15667
15866
|
const nextMax = isActive ? void 0 : band.max;
|
|
15668
|
-
return /* @__PURE__ */ (0,
|
|
15867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
15669
15868
|
OptionLink,
|
|
15670
15869
|
{
|
|
15671
15870
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -15677,7 +15876,7 @@ function CourseCatalogFilters({
|
|
|
15677
15876
|
);
|
|
15678
15877
|
})
|
|
15679
15878
|
] }),
|
|
15680
|
-
/* @__PURE__ */ (0,
|
|
15879
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
15681
15880
|
"a",
|
|
15682
15881
|
{
|
|
15683
15882
|
href: hrefs.clearAll(),
|
|
@@ -15699,8 +15898,8 @@ function CourseCatalogFilters({
|
|
|
15699
15898
|
}
|
|
15700
15899
|
|
|
15701
15900
|
// src/components/cart-line-list.tsx
|
|
15702
|
-
var
|
|
15703
|
-
var
|
|
15901
|
+
var import_utils21 = require("@reblu/site-ui/utils");
|
|
15902
|
+
var import_jsx_runtime26 = (
|
|
15704
15903
|
// eslint-disable-next-line react/no-array-index-key -- entries are positional, SITE-built rows
|
|
15705
15904
|
require("react/jsx-runtime")
|
|
15706
15905
|
);
|
|
@@ -15716,17 +15915,17 @@ var DEFAULT_LABELS2 = {
|
|
|
15716
15915
|
function CartLineIncludes({ entries, note, className }) {
|
|
15717
15916
|
const hasNote = note != null && note !== false && note !== "";
|
|
15718
15917
|
if (entries.length === 0 && !hasNote) return null;
|
|
15719
|
-
return /* @__PURE__ */ (0,
|
|
15918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
15720
15919
|
"div",
|
|
15721
15920
|
{
|
|
15722
|
-
className: (0,
|
|
15921
|
+
className: (0, import_utils21.cn)("mt-2 space-y-2 rounded-lg bg-muted px-4 py-3 text-sm", className),
|
|
15723
15922
|
"data-slot": "cart-line-includes",
|
|
15724
15923
|
children: [
|
|
15725
|
-
entries.length > 0 && /* @__PURE__ */ (0,
|
|
15726
|
-
/* @__PURE__ */ (0,
|
|
15727
|
-
/* @__PURE__ */ (0,
|
|
15924
|
+
entries.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("dl", { className: "grid grid-cols-[max-content_1fr] gap-x-4 gap-y-1.5", children: entries.map((entry, idx) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "contents", children: [
|
|
15925
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("dt", { className: "font-semibold text-muted-foreground", children: entry.label }),
|
|
15926
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("dd", { className: "m-0", children: entry.value })
|
|
15728
15927
|
] }, idx)) }),
|
|
15729
|
-
hasNote && /* @__PURE__ */ (0,
|
|
15928
|
+
hasNote && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-muted-foreground", children: note })
|
|
15730
15929
|
]
|
|
15731
15930
|
}
|
|
15732
15931
|
);
|
|
@@ -15755,9 +15954,9 @@ function CartLineList({
|
|
|
15755
15954
|
}) {
|
|
15756
15955
|
const t = { ...DEFAULT_LABELS2, ...labels };
|
|
15757
15956
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
15758
|
-
return /* @__PURE__ */ (0,
|
|
15759
|
-
/* @__PURE__ */ (0,
|
|
15760
|
-
noticeContent != null && noticeContent !== false && /* @__PURE__ */ (0,
|
|
15957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: (0, import_utils21.cn)("space-y-4", className), "data-slot": "cart-line-list", children: [
|
|
15958
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
|
|
15959
|
+
noticeContent != null && noticeContent !== false && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
15761
15960
|
"div",
|
|
15762
15961
|
{
|
|
15763
15962
|
role: "status",
|
|
@@ -15766,34 +15965,34 @@ function CartLineList({
|
|
|
15766
15965
|
children: noticeContent
|
|
15767
15966
|
}
|
|
15768
15967
|
),
|
|
15769
|
-
/* @__PURE__ */ (0,
|
|
15968
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("ul", { className: "space-y-4", children: items.map((item) => {
|
|
15770
15969
|
const maxQty = item.maxStock ?? Infinity;
|
|
15771
15970
|
const atMax = item.quantity >= maxQty;
|
|
15772
15971
|
const atMin = item.quantity <= 1;
|
|
15773
15972
|
const message = lineMessage?.(item);
|
|
15774
15973
|
const includes = lineIncludes?.(item);
|
|
15775
|
-
return /* @__PURE__ */ (0,
|
|
15974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
15776
15975
|
"li",
|
|
15777
15976
|
{
|
|
15778
15977
|
className: "flex gap-4 rounded-xl border border-border bg-card p-4",
|
|
15779
15978
|
children: [
|
|
15780
|
-
/* @__PURE__ */ (0,
|
|
15781
|
-
/* @__PURE__ */ (0,
|
|
15782
|
-
/* @__PURE__ */ (0,
|
|
15783
|
-
item.variantName && /* @__PURE__ */ (0,
|
|
15784
|
-
/* @__PURE__ */ (0,
|
|
15979
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
|
|
15980
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
15981
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
|
|
15982
|
+
item.variantName && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
|
|
15983
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("p", { className: "mt-1 text-sm text-muted-foreground", children: [
|
|
15785
15984
|
formatPrice(item.unitPrice, currencyCode, locale),
|
|
15786
15985
|
" ",
|
|
15787
15986
|
t.unitPriceSuffix
|
|
15788
15987
|
] }),
|
|
15789
|
-
/* @__PURE__ */ (0,
|
|
15988
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
15790
15989
|
"div",
|
|
15791
15990
|
{
|
|
15792
15991
|
role: "group",
|
|
15793
15992
|
"aria-label": t.quantityLabel,
|
|
15794
15993
|
className: "mt-3 flex items-center gap-3",
|
|
15795
15994
|
children: [
|
|
15796
|
-
/* @__PURE__ */ (0,
|
|
15995
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
15797
15996
|
"button",
|
|
15798
15997
|
{
|
|
15799
15998
|
type: "button",
|
|
@@ -15804,8 +16003,8 @@ function CartLineList({
|
|
|
15804
16003
|
children: "\u2212"
|
|
15805
16004
|
}
|
|
15806
16005
|
),
|
|
15807
|
-
/* @__PURE__ */ (0,
|
|
15808
|
-
/* @__PURE__ */ (0,
|
|
16006
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
|
|
16007
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
15809
16008
|
"button",
|
|
15810
16009
|
{
|
|
15811
16010
|
type: "button",
|
|
@@ -15816,7 +16015,7 @@ function CartLineList({
|
|
|
15816
16015
|
children: "+"
|
|
15817
16016
|
}
|
|
15818
16017
|
),
|
|
15819
|
-
onRemove && /* @__PURE__ */ (0,
|
|
16018
|
+
onRemove && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
15820
16019
|
"button",
|
|
15821
16020
|
{
|
|
15822
16021
|
type: "button",
|
|
@@ -15829,7 +16028,7 @@ function CartLineList({
|
|
|
15829
16028
|
]
|
|
15830
16029
|
}
|
|
15831
16030
|
),
|
|
15832
|
-
message != null && message !== false && /* @__PURE__ */ (0,
|
|
16031
|
+
message != null && message !== false && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
15833
16032
|
"p",
|
|
15834
16033
|
{
|
|
15835
16034
|
className: "mt-2 text-sm text-destructive",
|
|
@@ -15837,12 +16036,12 @@ function CartLineList({
|
|
|
15837
16036
|
children: message
|
|
15838
16037
|
}
|
|
15839
16038
|
),
|
|
15840
|
-
includes != null && includes !== false && /* @__PURE__ */ (0,
|
|
15841
|
-
/* @__PURE__ */ (0,
|
|
16039
|
+
includes != null && includes !== false && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("details", { className: "mt-2", "data-slot": "cart-line-list-includes", children: [
|
|
16040
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("summary", { className: "cursor-pointer text-sm font-semibold text-primary", children: t.includesSummary }),
|
|
15842
16041
|
includes
|
|
15843
16042
|
] })
|
|
15844
16043
|
] }),
|
|
15845
|
-
/* @__PURE__ */ (0,
|
|
16044
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
|
|
15846
16045
|
]
|
|
15847
16046
|
},
|
|
15848
16047
|
lineKey(item.productId, item.variantId)
|
|
@@ -15852,8 +16051,8 @@ function CartLineList({
|
|
|
15852
16051
|
}
|
|
15853
16052
|
|
|
15854
16053
|
// src/components/cart-summary.tsx
|
|
15855
|
-
var
|
|
15856
|
-
var
|
|
16054
|
+
var import_utils22 = require("@reblu/site-ui/utils");
|
|
16055
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
15857
16056
|
var DEFAULT_LABELS3 = {
|
|
15858
16057
|
subtotal: "Subtotal",
|
|
15859
16058
|
discountPrefix: "Descuento",
|
|
@@ -15883,37 +16082,37 @@ function CartSummary({
|
|
|
15883
16082
|
const hasDiscount = Boolean(discountAmount && discountAmount > 0);
|
|
15884
16083
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
15885
16084
|
const hasNotice = noticeContent != null && noticeContent !== false;
|
|
15886
|
-
const breakdown = /* @__PURE__ */ (0,
|
|
16085
|
+
const breakdown = /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
15887
16086
|
"dl",
|
|
15888
16087
|
{
|
|
15889
|
-
className: (0,
|
|
16088
|
+
className: (0, import_utils22.cn)("space-y-2 text-sm", !hasNotice && className),
|
|
15890
16089
|
"data-slot": "cart-summary",
|
|
15891
16090
|
children: [
|
|
15892
|
-
/* @__PURE__ */ (0,
|
|
15893
|
-
/* @__PURE__ */ (0,
|
|
15894
|
-
/* @__PURE__ */ (0,
|
|
16091
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
16092
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("dt", { children: t.subtotal }),
|
|
16093
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("dd", { children: formatPrice(subtotal, currencyCode, locale) })
|
|
15895
16094
|
] }),
|
|
15896
|
-
hasDiscount && /* @__PURE__ */ (0,
|
|
15897
|
-
/* @__PURE__ */ (0,
|
|
15898
|
-
/* @__PURE__ */ (0,
|
|
16095
|
+
hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
|
|
16096
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("dt", { children: autoDiscount ? t.staffDiscountApplied : `${t.discountPrefix}${discountCode ? ` (${discountCode})` : ""}` }),
|
|
16097
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("dd", { children: [
|
|
15899
16098
|
"-",
|
|
15900
16099
|
formatPrice(discountAmount, currencyCode, locale)
|
|
15901
16100
|
] })
|
|
15902
16101
|
] }),
|
|
15903
|
-
shippingEnabled && /* @__PURE__ */ (0,
|
|
15904
|
-
/* @__PURE__ */ (0,
|
|
15905
|
-
/* @__PURE__ */ (0,
|
|
16102
|
+
shippingEnabled && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
16103
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("dt", { children: t.shipping }),
|
|
16104
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
|
|
15906
16105
|
] }),
|
|
15907
|
-
/* @__PURE__ */ (0,
|
|
15908
|
-
/* @__PURE__ */ (0,
|
|
15909
|
-
/* @__PURE__ */ (0,
|
|
16106
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
|
|
16107
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("dt", { children: t.total }),
|
|
16108
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("dd", { children: formatPrice(total, currencyCode, locale) })
|
|
15910
16109
|
] })
|
|
15911
16110
|
]
|
|
15912
16111
|
}
|
|
15913
16112
|
);
|
|
15914
16113
|
if (!hasNotice) return breakdown;
|
|
15915
|
-
return /* @__PURE__ */ (0,
|
|
15916
|
-
/* @__PURE__ */ (0,
|
|
16114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: (0, import_utils22.cn)("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
|
|
16115
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
15917
16116
|
"div",
|
|
15918
16117
|
{
|
|
15919
16118
|
role: "status",
|
|
@@ -15927,8 +16126,8 @@ function CartSummary({
|
|
|
15927
16126
|
}
|
|
15928
16127
|
|
|
15929
16128
|
// src/components/cart-adjustments-notice.tsx
|
|
15930
|
-
var
|
|
15931
|
-
var
|
|
16129
|
+
var import_utils23 = require("@reblu/site-ui/utils");
|
|
16130
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
15932
16131
|
var DEFAULT_LABELS4 = {
|
|
15933
16132
|
removed: (names) => names.length === 1 ? `Hemos quitado del carrito: ${names[0]}, ya no est\xE1 disponible.` : `Hemos quitado del carrito: ${names.join(", ")}, ya no est\xE1n disponibles.`,
|
|
15934
16133
|
quantityChanged: (name, quantity) => `Hemos ajustado la cantidad de ${name} a ${quantity} por el stock disponible.`,
|
|
@@ -15962,20 +16161,20 @@ function CartAdjustmentsNotice({
|
|
|
15962
16161
|
);
|
|
15963
16162
|
}
|
|
15964
16163
|
if (messages.length === 0) return null;
|
|
15965
|
-
return /* @__PURE__ */ (0,
|
|
16164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
15966
16165
|
"div",
|
|
15967
16166
|
{
|
|
15968
16167
|
role: "status",
|
|
15969
|
-
className: (0,
|
|
16168
|
+
className: (0, import_utils23.cn)("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
|
|
15970
16169
|
"data-slot": "cart-adjustments-notice",
|
|
15971
|
-
children: messages.length === 1 ? /* @__PURE__ */ (0,
|
|
16170
|
+
children: messages.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { children: messages[0] }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("li", { children: message }, index)) })
|
|
15972
16171
|
}
|
|
15973
16172
|
);
|
|
15974
16173
|
}
|
|
15975
16174
|
|
|
15976
16175
|
// src/components/added-to-cart-toast.tsx
|
|
15977
|
-
var
|
|
15978
|
-
var
|
|
16176
|
+
var import_utils24 = require("@reblu/site-ui/utils");
|
|
16177
|
+
var import_jsx_runtime29 = (
|
|
15979
16178
|
// eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
|
|
15980
16179
|
require("react/jsx-runtime")
|
|
15981
16180
|
);
|
|
@@ -15998,32 +16197,32 @@ function AddedToCartToast({
|
|
|
15998
16197
|
const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
|
|
15999
16198
|
const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
|
|
16000
16199
|
const variant = status === "success" ? "success" : "error";
|
|
16001
|
-
return /* @__PURE__ */ (0,
|
|
16200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
16002
16201
|
"div",
|
|
16003
16202
|
{
|
|
16004
16203
|
"data-slot": "added-to-cart-toast",
|
|
16005
16204
|
"data-variant": variant,
|
|
16006
|
-
className: (0,
|
|
16205
|
+
className: (0, import_utils24.cn)(
|
|
16007
16206
|
"flex items-center gap-3 rounded-xl border border-border bg-card p-3 text-sm shadow-lg",
|
|
16008
16207
|
variant === "success" && "border-green-600/30 dark:border-green-400/30",
|
|
16009
16208
|
variant === "error" && "border-destructive/30",
|
|
16010
16209
|
className
|
|
16011
16210
|
),
|
|
16012
16211
|
children: [
|
|
16013
|
-
hasThumbnail && /* @__PURE__ */ (0,
|
|
16014
|
-
/* @__PURE__ */ (0,
|
|
16015
|
-
/* @__PURE__ */ (0,
|
|
16016
|
-
/* @__PURE__ */ (0,
|
|
16212
|
+
hasThumbnail && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
|
|
16213
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
16214
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "truncate font-semibold text-foreground", children: productName }),
|
|
16215
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
|
|
16017
16216
|
] }),
|
|
16018
|
-
/* @__PURE__ */ (0,
|
|
16217
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
|
|
16019
16218
|
]
|
|
16020
16219
|
}
|
|
16021
16220
|
);
|
|
16022
16221
|
}
|
|
16023
16222
|
|
|
16024
16223
|
// src/components/checkout-login-prompt.tsx
|
|
16025
|
-
var
|
|
16026
|
-
var
|
|
16224
|
+
var import_utils25 = require("@reblu/site-ui/utils");
|
|
16225
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
16027
16226
|
var DEFAULT_LABELS6 = {
|
|
16028
16227
|
title: "Identificaci\xF3n",
|
|
16029
16228
|
description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
|
|
@@ -16050,26 +16249,26 @@ function CheckoutLoginPrompt({
|
|
|
16050
16249
|
if (!open) return null;
|
|
16051
16250
|
const t = { ...DEFAULT_LABELS6, ...labels };
|
|
16052
16251
|
const isValidEmail = EMAIL_PATTERN.test(email.trim());
|
|
16053
|
-
return /* @__PURE__ */ (0,
|
|
16054
|
-
/* @__PURE__ */ (0,
|
|
16055
|
-
/* @__PURE__ */ (0,
|
|
16252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
16253
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
|
|
16254
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
16056
16255
|
"div",
|
|
16057
16256
|
{
|
|
16058
16257
|
role: "dialog",
|
|
16059
16258
|
"aria-modal": "true",
|
|
16060
16259
|
"aria-labelledby": "checkout-login-prompt-title",
|
|
16061
16260
|
"data-slot": "checkout-login-prompt",
|
|
16062
|
-
className: (0,
|
|
16261
|
+
className: (0, import_utils25.cn)(
|
|
16063
16262
|
"fixed left-1/2 top-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2 space-y-5 rounded-2xl border border-border bg-background p-6 shadow-2xl",
|
|
16064
16263
|
className
|
|
16065
16264
|
),
|
|
16066
16265
|
children: [
|
|
16067
|
-
/* @__PURE__ */ (0,
|
|
16068
|
-
/* @__PURE__ */ (0,
|
|
16069
|
-
/* @__PURE__ */ (0,
|
|
16070
|
-
/* @__PURE__ */ (0,
|
|
16266
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
16267
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
|
|
16268
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
|
|
16269
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
|
|
16071
16270
|
] }),
|
|
16072
|
-
/* @__PURE__ */ (0,
|
|
16271
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
16073
16272
|
"button",
|
|
16074
16273
|
{
|
|
16075
16274
|
type: "button",
|
|
@@ -16080,9 +16279,9 @@ function CheckoutLoginPrompt({
|
|
|
16080
16279
|
}
|
|
16081
16280
|
)
|
|
16082
16281
|
] }),
|
|
16083
|
-
/* @__PURE__ */ (0,
|
|
16084
|
-
/* @__PURE__ */ (0,
|
|
16085
|
-
/* @__PURE__ */ (0,
|
|
16282
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "space-y-2", children: [
|
|
16283
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
16284
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
16086
16285
|
"input",
|
|
16087
16286
|
{
|
|
16088
16287
|
id: "checkout-login-prompt-email",
|
|
@@ -16091,29 +16290,29 @@ function CheckoutLoginPrompt({
|
|
|
16091
16290
|
value: email,
|
|
16092
16291
|
onChange: (e) => onEmailChange(e.target.value),
|
|
16093
16292
|
placeholder: t.emailPlaceholder,
|
|
16094
|
-
className: (0,
|
|
16293
|
+
className: (0, import_utils25.cn)(
|
|
16095
16294
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
16096
16295
|
error ? "border-destructive" : "border-border focus:border-primary"
|
|
16097
16296
|
)
|
|
16098
16297
|
}
|
|
16099
16298
|
),
|
|
16100
|
-
error && /* @__PURE__ */ (0,
|
|
16299
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-xs text-destructive", children: error })
|
|
16101
16300
|
] }),
|
|
16102
|
-
/* @__PURE__ */ (0,
|
|
16103
|
-
/* @__PURE__ */ (0,
|
|
16301
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "space-y-2", children: [
|
|
16302
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
16104
16303
|
"button",
|
|
16105
16304
|
{
|
|
16106
16305
|
type: "button",
|
|
16107
16306
|
onClick: onSubmitEmail,
|
|
16108
16307
|
disabled: checking || !isValidEmail,
|
|
16109
|
-
className: (0,
|
|
16308
|
+
className: (0, import_utils25.cn)(
|
|
16110
16309
|
"flex w-full cursor-pointer items-center justify-center gap-2 rounded-xl px-4 py-2.5 text-sm font-semibold transition-all",
|
|
16111
16310
|
checking || !isValidEmail ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
16112
16311
|
),
|
|
16113
16312
|
children: checking ? t.checking : t.continueWithEmail
|
|
16114
16313
|
}
|
|
16115
16314
|
),
|
|
16116
|
-
/* @__PURE__ */ (0,
|
|
16315
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
16117
16316
|
"button",
|
|
16118
16317
|
{
|
|
16119
16318
|
type: "button",
|
|
@@ -16130,9 +16329,9 @@ function CheckoutLoginPrompt({
|
|
|
16130
16329
|
}
|
|
16131
16330
|
|
|
16132
16331
|
// src/components/checkout-form.tsx
|
|
16133
|
-
var
|
|
16332
|
+
var import_utils26 = require("@reblu/site-ui/utils");
|
|
16134
16333
|
var import_phone_input = require("@reblu/site-ui/phone-input");
|
|
16135
|
-
var
|
|
16334
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
16136
16335
|
var DEFAULT_LABELS7 = {
|
|
16137
16336
|
contactTitle: "Datos de contacto",
|
|
16138
16337
|
nameLabel: "Nombre completo",
|
|
@@ -16188,22 +16387,22 @@ function CheckoutForm({
|
|
|
16188
16387
|
event.preventDefault();
|
|
16189
16388
|
if (discountCode.trim() && !discountApplying) onApplyDiscount();
|
|
16190
16389
|
}
|
|
16191
|
-
return /* @__PURE__ */ (0,
|
|
16390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
|
|
16192
16391
|
loginPrompt,
|
|
16193
|
-
/* @__PURE__ */ (0,
|
|
16392
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
16194
16393
|
"form",
|
|
16195
16394
|
{
|
|
16196
16395
|
"data-testid": "checkout-form",
|
|
16197
16396
|
onSubmit,
|
|
16198
|
-
className: (0,
|
|
16397
|
+
className: (0, import_utils26.cn)("space-y-8", className),
|
|
16199
16398
|
"data-slot": "checkout-form",
|
|
16200
16399
|
children: [
|
|
16201
|
-
/* @__PURE__ */ (0,
|
|
16202
|
-
/* @__PURE__ */ (0,
|
|
16203
|
-
/* @__PURE__ */ (0,
|
|
16204
|
-
/* @__PURE__ */ (0,
|
|
16205
|
-
/* @__PURE__ */ (0,
|
|
16206
|
-
/* @__PURE__ */ (0,
|
|
16400
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("section", { className: "space-y-4", children: [
|
|
16401
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
|
|
16402
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
16403
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "space-y-1", children: [
|
|
16404
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
|
|
16405
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
16207
16406
|
"input",
|
|
16208
16407
|
{
|
|
16209
16408
|
id: "checkout-form-name",
|
|
@@ -16212,17 +16411,17 @@ function CheckoutForm({
|
|
|
16212
16411
|
value: contact.name,
|
|
16213
16412
|
onChange: (e) => patchContact({ name: e.target.value }),
|
|
16214
16413
|
placeholder: t.namePlaceholder,
|
|
16215
|
-
className: (0,
|
|
16414
|
+
className: (0, import_utils26.cn)(
|
|
16216
16415
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
16217
16416
|
contactErrors?.name ? "border-destructive" : "border-border focus:border-primary"
|
|
16218
16417
|
)
|
|
16219
16418
|
}
|
|
16220
16419
|
),
|
|
16221
|
-
contactErrors?.name && /* @__PURE__ */ (0,
|
|
16420
|
+
contactErrors?.name && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.name })
|
|
16222
16421
|
] }),
|
|
16223
|
-
/* @__PURE__ */ (0,
|
|
16224
|
-
/* @__PURE__ */ (0,
|
|
16225
|
-
/* @__PURE__ */ (0,
|
|
16422
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "space-y-1", children: [
|
|
16423
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
16424
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
16226
16425
|
"input",
|
|
16227
16426
|
{
|
|
16228
16427
|
id: "checkout-form-email",
|
|
@@ -16231,15 +16430,15 @@ function CheckoutForm({
|
|
|
16231
16430
|
value: contact.email,
|
|
16232
16431
|
onChange: (e) => patchContact({ email: e.target.value }),
|
|
16233
16432
|
placeholder: t.emailPlaceholder,
|
|
16234
|
-
className: (0,
|
|
16433
|
+
className: (0, import_utils26.cn)(
|
|
16235
16434
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
16236
16435
|
contactErrors?.email ? "border-destructive" : "border-border focus:border-primary"
|
|
16237
16436
|
)
|
|
16238
16437
|
}
|
|
16239
16438
|
),
|
|
16240
|
-
contactErrors?.email && /* @__PURE__ */ (0,
|
|
16439
|
+
contactErrors?.email && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.email })
|
|
16241
16440
|
] }),
|
|
16242
|
-
/* @__PURE__ */ (0,
|
|
16441
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
16243
16442
|
import_phone_input.PhoneInput,
|
|
16244
16443
|
{
|
|
16245
16444
|
id: "checkout-form-phone",
|
|
@@ -16253,26 +16452,26 @@ function CheckoutForm({
|
|
|
16253
16452
|
] })
|
|
16254
16453
|
] }),
|
|
16255
16454
|
children2,
|
|
16256
|
-
generalError ? /* @__PURE__ */ (0,
|
|
16257
|
-
/* @__PURE__ */ (0,
|
|
16258
|
-
/* @__PURE__ */ (0,
|
|
16259
|
-
autoDiscount ? /* @__PURE__ */ (0,
|
|
16455
|
+
generalError ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
|
|
16456
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("section", { className: "space-y-3", children: [
|
|
16457
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
|
|
16458
|
+
autoDiscount ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
16260
16459
|
"div",
|
|
16261
16460
|
{
|
|
16262
16461
|
className: "flex items-center gap-2 rounded-lg border border-green-200 bg-green-50 px-4 py-3 text-sm text-green-700 dark:border-green-800 dark:bg-green-900/20 dark:text-green-400",
|
|
16263
16462
|
"data-slot": "checkout-staff-discount",
|
|
16264
16463
|
children: [
|
|
16265
|
-
/* @__PURE__ */ (0,
|
|
16266
|
-
/* @__PURE__ */ (0,
|
|
16464
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "font-semibold", children: t.staffDiscountApplied }),
|
|
16465
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(autoDiscount.amount, currencyCode, locale)) })
|
|
16267
16466
|
]
|
|
16268
16467
|
}
|
|
16269
16468
|
) : null,
|
|
16270
|
-
appliedDiscount && !autoDiscount ? /* @__PURE__ */ (0,
|
|
16271
|
-
/* @__PURE__ */ (0,
|
|
16272
|
-
/* @__PURE__ */ (0,
|
|
16273
|
-
/* @__PURE__ */ (0,
|
|
16469
|
+
appliedDiscount && !autoDiscount ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center justify-between rounded-lg border border-green-200 bg-green-50 px-4 py-3 dark:border-green-800 dark:bg-green-900/20", children: [
|
|
16470
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
|
|
16471
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "font-semibold", children: appliedDiscount.code }),
|
|
16472
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
|
|
16274
16473
|
] }),
|
|
16275
|
-
/* @__PURE__ */ (0,
|
|
16474
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
16276
16475
|
"button",
|
|
16277
16476
|
{
|
|
16278
16477
|
type: "button",
|
|
@@ -16282,9 +16481,9 @@ function CheckoutForm({
|
|
|
16282
16481
|
children: t.removeDiscount
|
|
16283
16482
|
}
|
|
16284
16483
|
)
|
|
16285
|
-
] }) : /* @__PURE__ */ (0,
|
|
16286
|
-
/* @__PURE__ */ (0,
|
|
16287
|
-
/* @__PURE__ */ (0,
|
|
16484
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex gap-2", children: [
|
|
16485
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
|
|
16486
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
16288
16487
|
"input",
|
|
16289
16488
|
{
|
|
16290
16489
|
id: "checkout-form-discount-code",
|
|
@@ -16296,7 +16495,7 @@ function CheckoutForm({
|
|
|
16296
16495
|
className: "flex-1 rounded-lg border border-border bg-background px-3 py-2 text-sm uppercase transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20"
|
|
16297
16496
|
}
|
|
16298
16497
|
),
|
|
16299
|
-
/* @__PURE__ */ (0,
|
|
16498
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
16300
16499
|
"button",
|
|
16301
16500
|
{
|
|
16302
16501
|
type: "button",
|
|
@@ -16307,14 +16506,14 @@ function CheckoutForm({
|
|
|
16307
16506
|
}
|
|
16308
16507
|
)
|
|
16309
16508
|
] }),
|
|
16310
|
-
discountError && /* @__PURE__ */ (0,
|
|
16509
|
+
discountError && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-xs text-destructive", children: discountError })
|
|
16311
16510
|
] }),
|
|
16312
|
-
/* @__PURE__ */ (0,
|
|
16511
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
16313
16512
|
"button",
|
|
16314
16513
|
{
|
|
16315
16514
|
type: "submit",
|
|
16316
16515
|
disabled: submitting || submitDisabled,
|
|
16317
|
-
className: (0,
|
|
16516
|
+
className: (0, import_utils26.cn)(
|
|
16318
16517
|
"flex w-full cursor-pointer items-center justify-center gap-2 rounded-xl px-4 py-3 font-semibold transition-all",
|
|
16319
16518
|
submitting || submitDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
16320
16519
|
),
|
|
@@ -16328,11 +16527,11 @@ function CheckoutForm({
|
|
|
16328
16527
|
}
|
|
16329
16528
|
|
|
16330
16529
|
// src/components/order-confirmation.tsx
|
|
16331
|
-
var
|
|
16530
|
+
var import_utils28 = require("@reblu/site-ui/utils");
|
|
16332
16531
|
|
|
16333
16532
|
// src/components/order-invoice-link.tsx
|
|
16334
|
-
var
|
|
16335
|
-
var
|
|
16533
|
+
var import_utils27 = require("@reblu/site-ui/utils");
|
|
16534
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
16336
16535
|
var DEFAULT_LABELS8 = {
|
|
16337
16536
|
linkLabel: "Descargar la factura {number}",
|
|
16338
16537
|
signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
|
|
@@ -16340,8 +16539,8 @@ var DEFAULT_LABELS8 = {
|
|
|
16340
16539
|
function OrderInvoiceLink({ invoice, labels, className }) {
|
|
16341
16540
|
if (!invoice) return null;
|
|
16342
16541
|
const t = { ...DEFAULT_LABELS8, ...labels };
|
|
16343
|
-
return /* @__PURE__ */ (0,
|
|
16344
|
-
/* @__PURE__ */ (0,
|
|
16542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: (0, import_utils27.cn)("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
|
|
16543
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
16345
16544
|
"a",
|
|
16346
16545
|
{
|
|
16347
16546
|
href: invoice.url,
|
|
@@ -16349,12 +16548,12 @@ function OrderInvoiceLink({ invoice, labels, className }) {
|
|
|
16349
16548
|
children: t.linkLabel.replace("{number}", invoice.number)
|
|
16350
16549
|
}
|
|
16351
16550
|
),
|
|
16352
|
-
/* @__PURE__ */ (0,
|
|
16551
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-muted-foreground", children: t.signInHint })
|
|
16353
16552
|
] });
|
|
16354
16553
|
}
|
|
16355
16554
|
|
|
16356
16555
|
// src/components/order-confirmation.tsx
|
|
16357
|
-
var
|
|
16556
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
16358
16557
|
var DEFAULT_LABELS9 = {
|
|
16359
16558
|
pollingTitle: "Confirmando tu pedido\u2026",
|
|
16360
16559
|
pollingDescription: "Estamos procesando el pago, un momento\u2026",
|
|
@@ -16429,60 +16628,60 @@ function OrderConfirmation({
|
|
|
16429
16628
|
const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
|
|
16430
16629
|
const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
|
|
16431
16630
|
const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
|
|
16432
|
-
return /* @__PURE__ */ (0,
|
|
16433
|
-
/* @__PURE__ */ (0,
|
|
16434
|
-
/* @__PURE__ */ (0,
|
|
16435
|
-
showFullOrderSummary && order && /* @__PURE__ */ (0,
|
|
16436
|
-
/* @__PURE__ */ (0,
|
|
16437
|
-
/* @__PURE__ */ (0,
|
|
16438
|
-
/* @__PURE__ */ (0,
|
|
16631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: (0, import_utils28.cn)("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
|
|
16632
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h1", { className: "text-3xl font-bold", children: title }),
|
|
16633
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-lg text-muted-foreground", children: description }),
|
|
16634
|
+
showFullOrderSummary && order && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "space-y-6", children: [
|
|
16635
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
16636
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
|
|
16637
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
16439
16638
|
] }),
|
|
16440
|
-
/* @__PURE__ */ (0,
|
|
16441
|
-
order.items.map((item, idx) => /* @__PURE__ */ (0,
|
|
16639
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
|
|
16640
|
+
order.items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
16442
16641
|
"div",
|
|
16443
16642
|
{
|
|
16444
16643
|
className: "flex justify-between gap-4 text-sm",
|
|
16445
16644
|
children: [
|
|
16446
|
-
/* @__PURE__ */ (0,
|
|
16645
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
|
|
16447
16646
|
item.product.name,
|
|
16448
16647
|
item.variant ? ` (${item.variant.name})` : "",
|
|
16449
16648
|
" x",
|
|
16450
16649
|
item.quantity
|
|
16451
16650
|
] }),
|
|
16452
|
-
/* @__PURE__ */ (0,
|
|
16651
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: formatPrice(item.total, currencyCode, locale) })
|
|
16453
16652
|
]
|
|
16454
16653
|
},
|
|
16455
16654
|
idx
|
|
16456
16655
|
)),
|
|
16457
|
-
/* @__PURE__ */ (0,
|
|
16458
|
-
/* @__PURE__ */ (0,
|
|
16459
|
-
/* @__PURE__ */ (0,
|
|
16656
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
|
|
16657
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: t.totalLabel }),
|
|
16658
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: formatPrice(order.total, currencyCode, locale) })
|
|
16460
16659
|
] }) })
|
|
16461
16660
|
] }),
|
|
16462
|
-
showPurchaseTexts && order.purchaseTexts?.length ? /* @__PURE__ */ (0,
|
|
16661
|
+
showPurchaseTexts && order.purchaseTexts?.length ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "mx-auto max-w-sm space-y-3 text-left", "data-slot": "order-confirmation-purchase-texts", children: order.purchaseTexts.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
16463
16662
|
"div",
|
|
16464
16663
|
{
|
|
16465
16664
|
className: "rounded-xl border border-border bg-card p-4",
|
|
16466
16665
|
"data-slot": "order-confirmation-purchase-text",
|
|
16467
16666
|
"data-kind": entry.kind,
|
|
16468
16667
|
children: [
|
|
16469
|
-
/* @__PURE__ */ (0,
|
|
16470
|
-
entry.place ? /* @__PURE__ */ (0,
|
|
16471
|
-
entry.place.name ? /* @__PURE__ */ (0,
|
|
16472
|
-
entry.place.address.map((line) => /* @__PURE__ */ (0,
|
|
16668
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: entry.label }),
|
|
16669
|
+
entry.place ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("address", { className: "mb-2 text-sm not-italic", "data-slot": "order-confirmation-pickup-place", children: [
|
|
16670
|
+
entry.place.name ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "block font-medium", children: entry.place.name }) : null,
|
|
16671
|
+
entry.place.address.map((line) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "block", children: line }, line))
|
|
16473
16672
|
] }) : null,
|
|
16474
|
-
/* @__PURE__ */ (0,
|
|
16673
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "whitespace-pre-line text-sm", children: entry.text })
|
|
16475
16674
|
]
|
|
16476
16675
|
},
|
|
16477
16676
|
entry.kind
|
|
16478
16677
|
)) }) : null,
|
|
16479
|
-
t.foundDescription.includes("{email}") ? null : /* @__PURE__ */ (0,
|
|
16678
|
+
t.foundDescription.includes("{email}") ? null : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
|
|
16480
16679
|
t.confirmationEmailPrefix,
|
|
16481
16680
|
" ",
|
|
16482
|
-
/* @__PURE__ */ (0,
|
|
16681
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "font-medium text-foreground", children: order.customerEmail }),
|
|
16483
16682
|
"."
|
|
16484
16683
|
] }),
|
|
16485
|
-
/* @__PURE__ */ (0,
|
|
16684
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16486
16685
|
OrderInvoiceLink,
|
|
16487
16686
|
{
|
|
16488
16687
|
invoice: order.invoice,
|
|
@@ -16490,11 +16689,11 @@ function OrderConfirmation({
|
|
|
16490
16689
|
}
|
|
16491
16690
|
)
|
|
16492
16691
|
] }),
|
|
16493
|
-
showOrderReference && order && /* @__PURE__ */ (0,
|
|
16494
|
-
/* @__PURE__ */ (0,
|
|
16495
|
-
/* @__PURE__ */ (0,
|
|
16692
|
+
showOrderReference && order && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
16693
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
|
|
16694
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
16496
16695
|
] }),
|
|
16497
|
-
status === "failed" && cartHref && /* @__PURE__ */ (0,
|
|
16696
|
+
status === "failed" && cartHref && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16498
16697
|
"a",
|
|
16499
16698
|
{
|
|
16500
16699
|
href: cartHref,
|
|
@@ -16502,7 +16701,7 @@ function OrderConfirmation({
|
|
|
16502
16701
|
children: t.backToCartLabel
|
|
16503
16702
|
}
|
|
16504
16703
|
),
|
|
16505
|
-
showRecheck && /* @__PURE__ */ (0,
|
|
16704
|
+
showRecheck && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
16506
16705
|
"button",
|
|
16507
16706
|
{
|
|
16508
16707
|
type: "button",
|
|
@@ -16511,16 +16710,16 @@ function OrderConfirmation({
|
|
|
16511
16710
|
children: t.recheckLabel
|
|
16512
16711
|
}
|
|
16513
16712
|
),
|
|
16514
|
-
showSessionReference && /* @__PURE__ */ (0,
|
|
16515
|
-
/* @__PURE__ */ (0,
|
|
16516
|
-
/* @__PURE__ */ (0,
|
|
16713
|
+
showSessionReference && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
16714
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
|
|
16715
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
|
|
16517
16716
|
] })
|
|
16518
16717
|
] });
|
|
16519
16718
|
}
|
|
16520
16719
|
|
|
16521
16720
|
// src/components/full-invoice-fields.tsx
|
|
16522
|
-
var
|
|
16523
|
-
var
|
|
16721
|
+
var import_utils29 = require("@reblu/site-ui/utils");
|
|
16722
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
16524
16723
|
var EMPTY_FULL_INVOICE_VALUE = {
|
|
16525
16724
|
wantsFullInvoice: false,
|
|
16526
16725
|
billingIdType: "NIF",
|
|
@@ -16637,12 +16836,12 @@ function FullInvoiceFields({
|
|
|
16637
16836
|
const showFields = value.wantsFullInvoice || overCap;
|
|
16638
16837
|
const isSpanishNif = value.billingIdType === "NIF";
|
|
16639
16838
|
const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
|
|
16640
|
-
const error = (key2) => errors[key2] ? /* @__PURE__ */ (0,
|
|
16839
|
+
const error = (key2) => errors[key2] ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
|
|
16641
16840
|
const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
|
|
16642
|
-
return /* @__PURE__ */ (0,
|
|
16643
|
-
overCap ? /* @__PURE__ */ (0,
|
|
16644
|
-
/* @__PURE__ */ (0,
|
|
16645
|
-
/* @__PURE__ */ (0,
|
|
16841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("section", { className: (0, import_utils29.cn)("space-y-4", className), "data-slot": "full-invoice-fields", children: [
|
|
16842
|
+
overCap ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "space-y-1", children: [
|
|
16843
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
|
|
16844
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16646
16845
|
"input",
|
|
16647
16846
|
{
|
|
16648
16847
|
type: "checkbox",
|
|
@@ -16652,12 +16851,12 @@ function FullInvoiceFields({
|
|
|
16652
16851
|
),
|
|
16653
16852
|
t.toggle
|
|
16654
16853
|
] }),
|
|
16655
|
-
/* @__PURE__ */ (0,
|
|
16854
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
|
|
16656
16855
|
] }),
|
|
16657
|
-
showFields && /* @__PURE__ */ (0,
|
|
16658
|
-
/* @__PURE__ */ (0,
|
|
16659
|
-
/* @__PURE__ */ (0,
|
|
16660
|
-
/* @__PURE__ */ (0,
|
|
16856
|
+
showFields && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
16857
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "space-y-1", children: [
|
|
16858
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
|
|
16859
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16661
16860
|
"select",
|
|
16662
16861
|
{
|
|
16663
16862
|
id: "full-invoice-id-type",
|
|
@@ -16666,14 +16865,14 @@ function FullInvoiceFields({
|
|
|
16666
16865
|
value: value.billingIdType,
|
|
16667
16866
|
onChange: (e) => set("billingIdType", e.target.value),
|
|
16668
16867
|
...invalid2("billingIdType"),
|
|
16669
|
-
children: ID_TYPES.map((type) => /* @__PURE__ */ (0,
|
|
16868
|
+
children: ID_TYPES.map((type) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("option", { value: type, children: t.idTypeOptions[type] }, type))
|
|
16670
16869
|
}
|
|
16671
16870
|
),
|
|
16672
16871
|
error("billingIdType")
|
|
16673
16872
|
] }),
|
|
16674
|
-
!isSpanishNif && /* @__PURE__ */ (0,
|
|
16675
|
-
/* @__PURE__ */ (0,
|
|
16676
|
-
/* @__PURE__ */ (0,
|
|
16873
|
+
!isSpanishNif && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "space-y-1", children: [
|
|
16874
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
|
|
16875
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
16677
16876
|
"select",
|
|
16678
16877
|
{
|
|
16679
16878
|
id: "full-invoice-id-country",
|
|
@@ -16683,16 +16882,16 @@ function FullInvoiceFields({
|
|
|
16683
16882
|
onChange: (e) => set("billingIdCountry", e.target.value),
|
|
16684
16883
|
...invalid2("billingIdCountry"),
|
|
16685
16884
|
children: [
|
|
16686
|
-
/* @__PURE__ */ (0,
|
|
16687
|
-
countries.map((c) => /* @__PURE__ */ (0,
|
|
16885
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("option", { value: "", disabled: true, children: t.chooseCountry }),
|
|
16886
|
+
countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("option", { value: c.code, children: c.name }, c.code))
|
|
16688
16887
|
]
|
|
16689
16888
|
}
|
|
16690
16889
|
),
|
|
16691
16890
|
error("billingIdCountry")
|
|
16692
16891
|
] }),
|
|
16693
|
-
/* @__PURE__ */ (0,
|
|
16694
|
-
/* @__PURE__ */ (0,
|
|
16695
|
-
/* @__PURE__ */ (0,
|
|
16892
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "space-y-1", children: [
|
|
16893
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
|
|
16894
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16696
16895
|
"input",
|
|
16697
16896
|
{
|
|
16698
16897
|
id: "full-invoice-nif",
|
|
@@ -16705,9 +16904,9 @@ function FullInvoiceFields({
|
|
|
16705
16904
|
),
|
|
16706
16905
|
error("billingNif")
|
|
16707
16906
|
] }),
|
|
16708
|
-
/* @__PURE__ */ (0,
|
|
16709
|
-
/* @__PURE__ */ (0,
|
|
16710
|
-
/* @__PURE__ */ (0,
|
|
16907
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "space-y-1", children: [
|
|
16908
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
|
|
16909
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16711
16910
|
"input",
|
|
16712
16911
|
{
|
|
16713
16912
|
id: "full-invoice-name",
|
|
@@ -16720,9 +16919,9 @@ function FullInvoiceFields({
|
|
|
16720
16919
|
),
|
|
16721
16920
|
error("billingName")
|
|
16722
16921
|
] }),
|
|
16723
|
-
/* @__PURE__ */ (0,
|
|
16724
|
-
/* @__PURE__ */ (0,
|
|
16725
|
-
/* @__PURE__ */ (0,
|
|
16922
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "space-y-1 sm:col-span-2", children: [
|
|
16923
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
|
|
16924
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16726
16925
|
"input",
|
|
16727
16926
|
{
|
|
16728
16927
|
id: "full-invoice-street",
|
|
@@ -16734,9 +16933,9 @@ function FullInvoiceFields({
|
|
|
16734
16933
|
}
|
|
16735
16934
|
)
|
|
16736
16935
|
] }),
|
|
16737
|
-
/* @__PURE__ */ (0,
|
|
16738
|
-
/* @__PURE__ */ (0,
|
|
16739
|
-
/* @__PURE__ */ (0,
|
|
16936
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "space-y-1", children: [
|
|
16937
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
|
|
16938
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16740
16939
|
"input",
|
|
16741
16940
|
{
|
|
16742
16941
|
id: "full-invoice-postal-code",
|
|
@@ -16747,9 +16946,9 @@ function FullInvoiceFields({
|
|
|
16747
16946
|
}
|
|
16748
16947
|
)
|
|
16749
16948
|
] }),
|
|
16750
|
-
/* @__PURE__ */ (0,
|
|
16751
|
-
/* @__PURE__ */ (0,
|
|
16752
|
-
/* @__PURE__ */ (0,
|
|
16949
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "space-y-1", children: [
|
|
16950
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
|
|
16951
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16753
16952
|
"input",
|
|
16754
16953
|
{
|
|
16755
16954
|
id: "full-invoice-city",
|
|
@@ -16760,9 +16959,9 @@ function FullInvoiceFields({
|
|
|
16760
16959
|
}
|
|
16761
16960
|
)
|
|
16762
16961
|
] }),
|
|
16763
|
-
/* @__PURE__ */ (0,
|
|
16764
|
-
/* @__PURE__ */ (0,
|
|
16765
|
-
/* @__PURE__ */ (0,
|
|
16962
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "space-y-1", children: [
|
|
16963
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
|
|
16964
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16766
16965
|
"select",
|
|
16767
16966
|
{
|
|
16768
16967
|
id: "full-invoice-country",
|
|
@@ -16770,18 +16969,18 @@ function FullInvoiceFields({
|
|
|
16770
16969
|
required: true,
|
|
16771
16970
|
value: value.country,
|
|
16772
16971
|
onChange: (e) => set("country", e.target.value),
|
|
16773
|
-
children: countries.map((c) => /* @__PURE__ */ (0,
|
|
16972
|
+
children: countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("option", { value: c.code, children: c.name }, c.code))
|
|
16774
16973
|
}
|
|
16775
16974
|
)
|
|
16776
16975
|
] }),
|
|
16777
|
-
/* @__PURE__ */ (0,
|
|
16976
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "sm:col-span-2", children: error("address") })
|
|
16778
16977
|
] })
|
|
16779
16978
|
] });
|
|
16780
16979
|
}
|
|
16781
16980
|
|
|
16782
16981
|
// src/components/checkout-delivery-choice.tsx
|
|
16783
|
-
var
|
|
16784
|
-
var
|
|
16982
|
+
var import_utils30 = require("@reblu/site-ui/utils");
|
|
16983
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
16785
16984
|
var EMPTY_CHECKOUT_ADDRESS = {
|
|
16786
16985
|
firstName: "",
|
|
16787
16986
|
lastName: "",
|
|
@@ -16844,17 +17043,17 @@ function CheckoutDeliveryChoice({
|
|
|
16844
17043
|
const isPickup = value?.type === "PICKUP";
|
|
16845
17044
|
const isShipping = value?.type === "SHIPPING";
|
|
16846
17045
|
const errorId = `${uid}-delivery-error`;
|
|
16847
|
-
return /* @__PURE__ */ (0,
|
|
17046
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
16848
17047
|
"fieldset",
|
|
16849
17048
|
{
|
|
16850
17049
|
"data-slot": "checkout-delivery",
|
|
16851
17050
|
"aria-describedby": error ? errorId : void 0,
|
|
16852
|
-
className: (0,
|
|
17051
|
+
className: (0, import_utils30.cn)("space-y-4", className),
|
|
16853
17052
|
children: [
|
|
16854
|
-
/* @__PURE__ */ (0,
|
|
16855
|
-
/* @__PURE__ */ (0,
|
|
16856
|
-
homeDelivery ? /* @__PURE__ */ (0,
|
|
16857
|
-
/* @__PURE__ */ (0,
|
|
17053
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("legend", { className: "mb-2 text-lg font-semibold", children: t.legend }),
|
|
17054
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "grid gap-3 sm:grid-cols-2", children: [
|
|
17055
|
+
homeDelivery ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("label", { className: "flex cursor-pointer items-start gap-3 rounded-xl border border-border p-4 has-[:checked]:border-primary", children: [
|
|
17056
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16858
17057
|
"input",
|
|
16859
17058
|
{
|
|
16860
17059
|
type: "radio",
|
|
@@ -16864,16 +17063,16 @@ function CheckoutDeliveryChoice({
|
|
|
16864
17063
|
className: "mt-0.5 size-4 accent-primary"
|
|
16865
17064
|
}
|
|
16866
17065
|
),
|
|
16867
|
-
/* @__PURE__ */ (0,
|
|
16868
|
-
/* @__PURE__ */ (0,
|
|
16869
|
-
/* @__PURE__ */ (0,
|
|
16870
|
-
/* @__PURE__ */ (0,
|
|
17066
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "flex-1 space-y-1", children: [
|
|
17067
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "flex justify-between gap-2 font-medium", children: [
|
|
17068
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: copy.shippingOptionLabel }),
|
|
17069
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "tabular-nums", children: homeCost })
|
|
16871
17070
|
] }),
|
|
16872
|
-
delivery.estimatedDeliveryText ? /* @__PURE__ */ (0,
|
|
17071
|
+
delivery.estimatedDeliveryText ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "block text-sm text-muted-foreground", children: delivery.estimatedDeliveryText }) : null
|
|
16873
17072
|
] })
|
|
16874
17073
|
] }) : null,
|
|
16875
|
-
pickup ? /* @__PURE__ */ (0,
|
|
16876
|
-
/* @__PURE__ */ (0,
|
|
17074
|
+
pickup ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("label", { className: "flex cursor-pointer items-start gap-3 rounded-xl border border-border p-4 has-[:checked]:border-primary", children: [
|
|
17075
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16877
17076
|
"input",
|
|
16878
17077
|
{
|
|
16879
17078
|
type: "radio",
|
|
@@ -16883,23 +17082,23 @@ function CheckoutDeliveryChoice({
|
|
|
16883
17082
|
className: "mt-0.5 size-4 accent-primary"
|
|
16884
17083
|
}
|
|
16885
17084
|
),
|
|
16886
|
-
/* @__PURE__ */ (0,
|
|
16887
|
-
/* @__PURE__ */ (0,
|
|
16888
|
-
/* @__PURE__ */ (0,
|
|
17085
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "flex flex-1 justify-between gap-2 font-medium", children: [
|
|
17086
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: copy.pickupOptionLabel }),
|
|
17087
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: t.free })
|
|
16889
17088
|
] })
|
|
16890
17089
|
] }) : null
|
|
16891
17090
|
] }),
|
|
16892
|
-
error ? /* @__PURE__ */ (0,
|
|
16893
|
-
isPickup ? /* @__PURE__ */ (0,
|
|
16894
|
-
/* @__PURE__ */ (0,
|
|
17091
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { id: errorId, role: "alert", className: "text-sm text-destructive", children: error }) : null,
|
|
17092
|
+
isPickup ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { role: "radiogroup", "aria-labelledby": `${uid}-points`, className: "space-y-2", children: [
|
|
17093
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { id: `${uid}-points`, className: "text-sm font-medium", children: t.pickupPointsLegend }),
|
|
16895
17094
|
delivery.pickupLocations.map((location2) => {
|
|
16896
17095
|
const descId = `${uid}-point-${location2.id}`;
|
|
16897
|
-
return /* @__PURE__ */ (0,
|
|
17096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
16898
17097
|
"label",
|
|
16899
17098
|
{
|
|
16900
17099
|
className: "flex cursor-pointer items-start gap-3 rounded-lg border border-border p-3 has-[:checked]:border-primary",
|
|
16901
17100
|
children: [
|
|
16902
|
-
/* @__PURE__ */ (0,
|
|
17101
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16903
17102
|
"input",
|
|
16904
17103
|
{
|
|
16905
17104
|
type: "radio",
|
|
@@ -16910,9 +17109,9 @@ function CheckoutDeliveryChoice({
|
|
|
16910
17109
|
className: "mt-0.5 size-4 accent-primary"
|
|
16911
17110
|
}
|
|
16912
17111
|
),
|
|
16913
|
-
/* @__PURE__ */ (0,
|
|
16914
|
-
/* @__PURE__ */ (0,
|
|
16915
|
-
/* @__PURE__ */ (0,
|
|
17112
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "space-y-0.5 text-sm", children: [
|
|
17113
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "block font-medium", children: location2.name }),
|
|
17114
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { id: descId, className: "block text-muted-foreground", children: pickupDescription(location2) })
|
|
16916
17115
|
] })
|
|
16917
17116
|
]
|
|
16918
17117
|
},
|
|
@@ -16920,14 +17119,14 @@ function CheckoutDeliveryChoice({
|
|
|
16920
17119
|
);
|
|
16921
17120
|
})
|
|
16922
17121
|
] }) : null,
|
|
16923
|
-
isShipping ? /* @__PURE__ */ (0,
|
|
16924
|
-
/* @__PURE__ */ (0,
|
|
16925
|
-
/* @__PURE__ */ (0,
|
|
17122
|
+
isShipping ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("fieldset", { className: "space-y-3", children: [
|
|
17123
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("legend", { className: "mb-2 text-sm font-medium", children: t.addressLegend }),
|
|
17124
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: ADDRESS_FIELDS.map(({ key: key2, autoComplete, required, wide }) => {
|
|
16926
17125
|
const fieldId = `${uid}-${key2}`;
|
|
16927
17126
|
const fieldError = addressErrors?.[key2];
|
|
16928
|
-
return /* @__PURE__ */ (0,
|
|
16929
|
-
/* @__PURE__ */ (0,
|
|
16930
|
-
/* @__PURE__ */ (0,
|
|
17127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: (0, import_utils30.cn)("space-y-1", wide && "sm:col-span-2"), children: [
|
|
17128
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("label", { htmlFor: fieldId, className: "text-sm font-medium", children: t[key2] }),
|
|
17129
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16931
17130
|
"input",
|
|
16932
17131
|
{
|
|
16933
17132
|
id: fieldId,
|
|
@@ -16938,13 +17137,13 @@ function CheckoutDeliveryChoice({
|
|
|
16938
17137
|
onChange: (e) => onAddressChange({ ...address, [key2]: e.target.value }),
|
|
16939
17138
|
"aria-invalid": fieldError ? true : void 0,
|
|
16940
17139
|
"aria-describedby": fieldError ? `${fieldId}-error` : void 0,
|
|
16941
|
-
className: (0,
|
|
17140
|
+
className: (0, import_utils30.cn)(
|
|
16942
17141
|
INPUT_CLASS,
|
|
16943
17142
|
fieldError ? "border-destructive" : "border-border focus:border-primary"
|
|
16944
17143
|
)
|
|
16945
17144
|
}
|
|
16946
17145
|
),
|
|
16947
|
-
fieldError ? /* @__PURE__ */ (0,
|
|
17146
|
+
fieldError ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { id: `${fieldId}-error`, className: "text-sm text-destructive", children: fieldError }) : null
|
|
16948
17147
|
] }, key2);
|
|
16949
17148
|
}) })
|
|
16950
17149
|
] }) : null
|
|
@@ -16986,8 +17185,8 @@ function toCheckoutFulfillmentFields(value, address, requiresDelivery = true) {
|
|
|
16986
17185
|
}
|
|
16987
17186
|
|
|
16988
17187
|
// src/components/checkout-quote-summary.tsx
|
|
16989
|
-
var
|
|
16990
|
-
var
|
|
17188
|
+
var import_utils31 = require("@reblu/site-ui/utils");
|
|
17189
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
16991
17190
|
var DEFAULT_CHECKOUT_QUOTE_SUMMARY_LABELS = {
|
|
16992
17191
|
subtotal: "Subtotal",
|
|
16993
17192
|
discount: (codeOrLabel, isAutomatic) => isAutomatic ? codeOrLabel : `Descuento (${codeOrLabel})`,
|
|
@@ -17004,9 +17203,9 @@ function Row({
|
|
|
17004
17203
|
value,
|
|
17005
17204
|
className
|
|
17006
17205
|
}) {
|
|
17007
|
-
return /* @__PURE__ */ (0,
|
|
17008
|
-
/* @__PURE__ */ (0,
|
|
17009
|
-
/* @__PURE__ */ (0,
|
|
17206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { "data-slot": "checkout-quote-row", className: (0, import_utils31.cn)("flex justify-between gap-4", className), children: [
|
|
17207
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("dt", { children: name }),
|
|
17208
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("dd", { className: "shrink-0 tabular-nums", children: value })
|
|
17010
17209
|
] });
|
|
17011
17210
|
}
|
|
17012
17211
|
function CheckoutQuoteSummary({
|
|
@@ -17022,22 +17221,22 @@ function CheckoutQuoteSummary({
|
|
|
17022
17221
|
const price = (cents) => formatPrice(cents, currencyCode, locale);
|
|
17023
17222
|
const { fulfillment, shipping, tax, discount } = quote;
|
|
17024
17223
|
const Tag = `h${headingLevel}`;
|
|
17025
|
-
return /* @__PURE__ */ (0,
|
|
17026
|
-
heading ? /* @__PURE__ */ (0,
|
|
17027
|
-
/* @__PURE__ */ (0,
|
|
17028
|
-
/* @__PURE__ */ (0,
|
|
17029
|
-
/* @__PURE__ */ (0,
|
|
17030
|
-
line.variantName ? /* @__PURE__ */ (0,
|
|
17031
|
-
/* @__PURE__ */ (0,
|
|
17032
|
-
line.kindLabel ? /* @__PURE__ */ (0,
|
|
17033
|
-
/* @__PURE__ */ (0,
|
|
17224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("section", { "data-slot": "checkout-quote-summary", className: slotClassName("space-y-4", "", className), children: [
|
|
17225
|
+
heading ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Tag, { className: "text-lg font-semibold", children: heading }) : null,
|
|
17226
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("ul", { className: "space-y-3 text-sm", children: quote.lines.map((line) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("li", { className: "flex justify-between gap-4", children: [
|
|
17227
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "min-w-0 space-y-0.5", children: [
|
|
17228
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "font-medium", children: line.name }),
|
|
17229
|
+
line.variantName ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-muted-foreground", children: line.variantName }) : null,
|
|
17230
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("p", { className: "flex flex-wrap items-center gap-2 text-muted-foreground", children: [
|
|
17231
|
+
line.kindLabel ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { "data-slot": "checkout-quote-kind", className: "rounded-full border border-border px-2 py-0.5 text-xs font-medium text-foreground", children: line.kindLabel }) : null,
|
|
17232
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: t.quantityTimesUnit(line.quantity, price(line.unitPrice)) })
|
|
17034
17233
|
] })
|
|
17035
17234
|
] }),
|
|
17036
|
-
/* @__PURE__ */ (0,
|
|
17235
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "shrink-0 tabular-nums", children: price(line.total) })
|
|
17037
17236
|
] }, `${line.productId}-${line.variantId ?? ""}`)) }),
|
|
17038
|
-
/* @__PURE__ */ (0,
|
|
17039
|
-
/* @__PURE__ */ (0,
|
|
17040
|
-
discount && discount.amount > 0 ? /* @__PURE__ */ (0,
|
|
17237
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("dl", { className: "space-y-2 border-t border-border pt-3 text-sm", children: [
|
|
17238
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Row, { name: t.subtotal, value: price(quote.subtotal) }),
|
|
17239
|
+
discount && discount.amount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17041
17240
|
Row,
|
|
17042
17241
|
{
|
|
17043
17242
|
className: "text-green-700 dark:text-green-400",
|
|
@@ -17045,17 +17244,17 @@ function CheckoutQuoteSummary({
|
|
|
17045
17244
|
value: `\u2212${price(discount.amount)}`
|
|
17046
17245
|
}
|
|
17047
17246
|
) : null,
|
|
17048
|
-
fulfillment.type ? /* @__PURE__ */ (0,
|
|
17247
|
+
fulfillment.type ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17049
17248
|
Row,
|
|
17050
17249
|
{
|
|
17051
|
-
name: /* @__PURE__ */ (0,
|
|
17250
|
+
name: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
17052
17251
|
fulfillment.label ?? t.delivery,
|
|
17053
|
-
fulfillment.type === "PICKUP" && fulfillment.pickupLocation ? /* @__PURE__ */ (0,
|
|
17252
|
+
fulfillment.type === "PICKUP" && fulfillment.pickupLocation ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "block text-muted-foreground", children: fulfillment.pickupLocation.name }) : null
|
|
17054
17253
|
] }),
|
|
17055
17254
|
value: fulfillment.type === "PICKUP" || shipping.isFree ? t.free : price(shipping.cost)
|
|
17056
17255
|
}
|
|
17057
17256
|
) : null,
|
|
17058
|
-
tax.isLineVisible ? tax.breakdown.map((entry) => /* @__PURE__ */ (0,
|
|
17257
|
+
tax.isLineVisible ? tax.breakdown.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17059
17258
|
Row,
|
|
17060
17259
|
{
|
|
17061
17260
|
className: tax.isIncluded ? "text-muted-foreground" : void 0,
|
|
@@ -17064,13 +17263,13 @@ function CheckoutQuoteSummary({
|
|
|
17064
17263
|
},
|
|
17065
17264
|
entry.label
|
|
17066
17265
|
)) : null,
|
|
17067
|
-
/* @__PURE__ */ (0,
|
|
17266
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Row, { className: "border-t border-border pt-2 text-base font-bold", name: t.total, value: price(quote.total) })
|
|
17068
17267
|
] }),
|
|
17069
|
-
tax.isIncluded ? /* @__PURE__ */ (0,
|
|
17070
|
-
fulfillment.type === "SHIPPING" && !shipping.isFree && shipping.remainingForFree ? /* @__PURE__ */ (0,
|
|
17071
|
-
fulfillment.type && quote.deliveryEstimateText ? /* @__PURE__ */ (0,
|
|
17072
|
-
quote.discountError ? /* @__PURE__ */ (0,
|
|
17073
|
-
quote.blockingReason ? /* @__PURE__ */ (0,
|
|
17268
|
+
tax.isIncluded ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-sm text-muted-foreground", children: t.taxesIncludedNote }) : null,
|
|
17269
|
+
fulfillment.type === "SHIPPING" && !shipping.isFree && shipping.remainingForFree ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-sm text-muted-foreground", children: t.remainingForFree(price(shipping.remainingForFree)) }) : null,
|
|
17270
|
+
fulfillment.type && quote.deliveryEstimateText ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { "data-slot": "checkout-quote-estimate", className: "text-sm text-muted-foreground", children: quote.deliveryEstimateText }) : null,
|
|
17271
|
+
quote.discountError ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { role: "status", className: "text-sm text-destructive", children: quote.discountError.message }) : null,
|
|
17272
|
+
quote.blockingReason ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { role: "alert", className: "rounded-lg border border-destructive/50 bg-destructive/10 p-3 text-sm text-destructive", children: quote.blockingReason.message }) : null
|
|
17074
17273
|
] });
|
|
17075
17274
|
}
|
|
17076
17275
|
var DEFAULT_CHECKOUT_QUOTE_NOTICE_LABELS = {
|
|
@@ -17088,7 +17287,7 @@ function checkoutQuoteNotice({
|
|
|
17088
17287
|
function CheckoutQuoteNotice({ reason, labels, className }) {
|
|
17089
17288
|
if (!reason) return null;
|
|
17090
17289
|
const t = { ...DEFAULT_CHECKOUT_QUOTE_NOTICE_LABELS, ...labels };
|
|
17091
|
-
return /* @__PURE__ */ (0,
|
|
17290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17092
17291
|
"p",
|
|
17093
17292
|
{
|
|
17094
17293
|
role: "status",
|
|
@@ -17100,8 +17299,8 @@ function CheckoutQuoteNotice({ reason, labels, className }) {
|
|
|
17100
17299
|
}
|
|
17101
17300
|
|
|
17102
17301
|
// src/components/checkout-terms-acceptance.tsx
|
|
17103
|
-
var
|
|
17104
|
-
var
|
|
17302
|
+
var import_utils32 = require("@reblu/site-ui/utils");
|
|
17303
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
17105
17304
|
function splitTermsLabel(label) {
|
|
17106
17305
|
const at = label.indexOf("{terms}");
|
|
17107
17306
|
return at === -1 ? [`${label} `, ""] : [label.slice(0, at), label.slice(at + "{terms}".length)];
|
|
@@ -17123,9 +17322,9 @@ function CheckoutTermsAcceptance({
|
|
|
17123
17322
|
(part) => part.replaceAll("{tenant}", copy.tenantName)
|
|
17124
17323
|
);
|
|
17125
17324
|
const newTab = copy.isTermsLinkNewTab;
|
|
17126
|
-
return /* @__PURE__ */ (0,
|
|
17127
|
-
/* @__PURE__ */ (0,
|
|
17128
|
-
/* @__PURE__ */ (0,
|
|
17325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { "data-slot": "checkout-terms", className: (0, import_utils32.cn)("space-y-1", className), children: [
|
|
17326
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
17327
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
17129
17328
|
"input",
|
|
17130
17329
|
{
|
|
17131
17330
|
id: boxId,
|
|
@@ -17138,9 +17337,9 @@ function CheckoutTermsAcceptance({
|
|
|
17138
17337
|
className: "mt-0.5 size-5 shrink-0 cursor-pointer accent-primary"
|
|
17139
17338
|
}
|
|
17140
17339
|
),
|
|
17141
|
-
/* @__PURE__ */ (0,
|
|
17340
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("label", { htmlFor: boxId, className: "text-sm leading-relaxed", children: [
|
|
17142
17341
|
before,
|
|
17143
|
-
/* @__PURE__ */ (0,
|
|
17342
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
17144
17343
|
"a",
|
|
17145
17344
|
{
|
|
17146
17345
|
href: copy.termsLinkUrl ?? termsHref,
|
|
@@ -17148,9 +17347,9 @@ function CheckoutTermsAcceptance({
|
|
|
17148
17347
|
className: "font-medium underline underline-offset-2 hover:text-primary",
|
|
17149
17348
|
children: [
|
|
17150
17349
|
copy.termsLinkText,
|
|
17151
|
-
newTab ? /* @__PURE__ */ (0,
|
|
17350
|
+
newTab ? /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
|
|
17152
17351
|
" ",
|
|
17153
|
-
/* @__PURE__ */ (0,
|
|
17352
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "sr-only", children: newTabHint })
|
|
17154
17353
|
] }) : null
|
|
17155
17354
|
]
|
|
17156
17355
|
}
|
|
@@ -17158,7 +17357,7 @@ function CheckoutTermsAcceptance({
|
|
|
17158
17357
|
after
|
|
17159
17358
|
] })
|
|
17160
17359
|
] }),
|
|
17161
|
-
error ? /* @__PURE__ */ (0,
|
|
17360
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { id: errorId, className: "pl-8 text-sm text-destructive", children: error }) : null
|
|
17162
17361
|
] });
|
|
17163
17362
|
}
|
|
17164
17363
|
function toCheckoutTermsFields(copy, accepted) {
|
|
@@ -17167,8 +17366,8 @@ function toCheckoutTermsFields(copy, accepted) {
|
|
|
17167
17366
|
}
|
|
17168
17367
|
|
|
17169
17368
|
// src/components/checkout-pay-action.tsx
|
|
17170
|
-
var
|
|
17171
|
-
var
|
|
17369
|
+
var import_utils33 = require("@reblu/site-ui/utils");
|
|
17370
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
17172
17371
|
function CheckoutPayAction({
|
|
17173
17372
|
label,
|
|
17174
17373
|
notice,
|
|
@@ -17182,22 +17381,22 @@ function CheckoutPayAction({
|
|
|
17182
17381
|
}) {
|
|
17183
17382
|
const noticeId = `${id}-notice`;
|
|
17184
17383
|
const isDisabled = submitting || disabled;
|
|
17185
|
-
return /* @__PURE__ */ (0,
|
|
17186
|
-
/* @__PURE__ */ (0,
|
|
17384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { "data-slot": "checkout-pay-action", className: (0, import_utils33.cn)("space-y-3", className), children: [
|
|
17385
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
17187
17386
|
"button",
|
|
17188
17387
|
{
|
|
17189
17388
|
type: "submit",
|
|
17190
17389
|
disabled: isDisabled,
|
|
17191
17390
|
"aria-busy": submitting || void 0,
|
|
17192
17391
|
"aria-describedby": notice ? noticeId : void 0,
|
|
17193
|
-
className: buttonClassName ?? (0,
|
|
17392
|
+
className: buttonClassName ?? (0, import_utils33.cn)(
|
|
17194
17393
|
"flex w-full items-center justify-center gap-2 rounded-xl px-4 py-3 text-base font-semibold transition-all",
|
|
17195
17394
|
isDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "cursor-pointer bg-primary text-primary-foreground hover:bg-primary/90"
|
|
17196
17395
|
),
|
|
17197
17396
|
children: submitting ? submittingLabel : label
|
|
17198
17397
|
}
|
|
17199
17398
|
),
|
|
17200
|
-
notice ? /* @__PURE__ */ (0,
|
|
17399
|
+
notice ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { id: noticeId, "data-slot": "checkout-pay-notice", className: noticeClassName ?? "text-sm text-muted-foreground", children: notice }) : null
|
|
17201
17400
|
] });
|
|
17202
17401
|
}
|
|
17203
17402
|
|
|
@@ -17224,8 +17423,8 @@ function toAcademyCheckoutInvoiceFields(value, overCap, issuesInvoices = true) {
|
|
|
17224
17423
|
}
|
|
17225
17424
|
|
|
17226
17425
|
// src/components/contact-interest-field.tsx
|
|
17227
|
-
var
|
|
17228
|
-
var
|
|
17426
|
+
var import_utils34 = require("@reblu/site-ui/utils");
|
|
17427
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
17229
17428
|
function ContactInterestField({
|
|
17230
17429
|
interest,
|
|
17231
17430
|
value,
|
|
@@ -17242,18 +17441,18 @@ function ContactInterestField({
|
|
|
17242
17441
|
else next2.delete(option2);
|
|
17243
17442
|
onChange(interest.options.filter((candidate) => next2.has(candidate)));
|
|
17244
17443
|
};
|
|
17245
|
-
return /* @__PURE__ */ (0,
|
|
17246
|
-
/* @__PURE__ */ (0,
|
|
17247
|
-
/* @__PURE__ */ (0,
|
|
17444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("fieldset", { "data-slot": "contact-interest", className: (0, import_utils34.cn)("space-y-2", className), children: [
|
|
17445
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("legend", { className: "text-sm font-medium", children: interest.label }),
|
|
17446
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex flex-col gap-2", children: interest.options.map((option2, index) => {
|
|
17248
17447
|
const id = `${idPrefix}-${index}`;
|
|
17249
|
-
return /* @__PURE__ */ (0,
|
|
17448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
17250
17449
|
"label",
|
|
17251
17450
|
{
|
|
17252
17451
|
htmlFor: id,
|
|
17253
17452
|
"data-slot": "contact-interest-option",
|
|
17254
17453
|
className: "flex items-center gap-2 text-sm",
|
|
17255
17454
|
children: [
|
|
17256
|
-
/* @__PURE__ */ (0,
|
|
17455
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
17257
17456
|
"input",
|
|
17258
17457
|
{
|
|
17259
17458
|
id,
|
|
@@ -17298,6 +17497,7 @@ var import_site_contracts = require("@reblu/site-contracts");
|
|
|
17298
17497
|
CourseCatalogFilters,
|
|
17299
17498
|
CourseDescription,
|
|
17300
17499
|
CoursePurchaseTerms,
|
|
17500
|
+
CourseSchedule,
|
|
17301
17501
|
DATA_REQUEST_TYPES,
|
|
17302
17502
|
DEFAULT_BEFORE_AFTER_LABELS,
|
|
17303
17503
|
DEFAULT_CHECKOUT_DELIVERY_CHOICE_LABELS,
|
|
@@ -17306,6 +17506,7 @@ var import_site_contracts = require("@reblu/site-contracts");
|
|
|
17306
17506
|
DEFAULT_COURSE_CATALOG_FILTERS_LABELS,
|
|
17307
17507
|
DEFAULT_COURSE_PRICE_BANDS,
|
|
17308
17508
|
DEFAULT_COURSE_PURCHASE_TERMS_LABELS,
|
|
17509
|
+
DEFAULT_COURSE_SCHEDULE_LABELS,
|
|
17309
17510
|
DEFAULT_INVOICE_COUNTRIES,
|
|
17310
17511
|
DEFAULT_LESSON_PREVIEW_LABELS,
|
|
17311
17512
|
DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
|
|
@@ -17322,6 +17523,7 @@ var import_site_contracts = require("@reblu/site-contracts");
|
|
|
17322
17523
|
ImageTextSplit,
|
|
17323
17524
|
LegalDocument,
|
|
17324
17525
|
LessonPreview,
|
|
17526
|
+
LinkedPagesGrid,
|
|
17325
17527
|
MarkdownRenderer,
|
|
17326
17528
|
OrderConfirmation,
|
|
17327
17529
|
OrderInvoiceLink,
|
|
@@ -17336,6 +17538,7 @@ var import_site_contracts = require("@reblu/site-contracts");
|
|
|
17336
17538
|
SafeHtml,
|
|
17337
17539
|
ShopFilters,
|
|
17338
17540
|
Specialty,
|
|
17541
|
+
TeamGrid,
|
|
17339
17542
|
Treatment,
|
|
17340
17543
|
TrustBadges,
|
|
17341
17544
|
buildFaqPageJsonLd,
|
|
@@ -17345,11 +17548,14 @@ var import_site_contracts = require("@reblu/site-contracts");
|
|
|
17345
17548
|
collectFaqItems,
|
|
17346
17549
|
courseSellsAsGuest,
|
|
17347
17550
|
defaultCheckoutFulfillment,
|
|
17551
|
+
filterByLink,
|
|
17348
17552
|
formatPrice,
|
|
17349
17553
|
getShopErrorMessage,
|
|
17350
17554
|
isAllowedYouTubeHost,
|
|
17351
17555
|
isCheckoutDeliveryComplete,
|
|
17352
17556
|
isOverSimplifiedInvoiceCap,
|
|
17557
|
+
linkFilterOptions,
|
|
17558
|
+
linkKey,
|
|
17353
17559
|
markdownToPlainText,
|
|
17354
17560
|
markdownToSafeHtml,
|
|
17355
17561
|
quoteRequiresDelivery,
|