@reblu/site-blocks 0.31.0 → 0.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -76,6 +76,7 @@ __export(src_exports, {
76
76
  ProductTrustItems: () => ProductTrustItems,
77
77
  ProfessionalFields: () => ProfessionalFields,
78
78
  ProfileCard: () => ProfileCard,
79
+ Reviews: () => Reviews,
79
80
  SafeHtml: () => SafeHtml,
80
81
  ShopFilters: () => ShopFilters,
81
82
  Specialty: () => Specialty,
@@ -14602,12 +14603,138 @@ function ArbitrationBadge({
14602
14603
  );
14603
14604
  }
14604
14605
 
14606
+ // src/components/reviews.tsx
14607
+ var import_utils14 = require("@reblu/site-ui/utils");
14608
+ var import_jsx_runtime18 = require("react/jsx-runtime");
14609
+ function isHttps(value) {
14610
+ if (typeof value !== "string") return false;
14611
+ try {
14612
+ const url = new URL(value);
14613
+ return url.protocol === "https:" && url.hostname !== "";
14614
+ } catch {
14615
+ return false;
14616
+ }
14617
+ }
14618
+ function isUsable2(value) {
14619
+ if (typeof value !== "object" || value === null) return false;
14620
+ const review = value;
14621
+ 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);
14622
+ }
14623
+ function formatDay(day, locale) {
14624
+ if (!/^\d{4}-\d{2}-\d{2}$/.test(day)) return null;
14625
+ const date = /* @__PURE__ */ new Date(`${day}T00:00:00.000Z`);
14626
+ if (Number.isNaN(date.getTime())) return null;
14627
+ return new Intl.DateTimeFormat(locale, { dateStyle: "long", timeZone: "UTC" }).format(date);
14628
+ }
14629
+ 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
+ function Stars({ rating }) {
14631
+ return /* @__PURE__ */ (0, import_jsx_runtime18.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_runtime18.jsx)(
14632
+ "svg",
14633
+ {
14634
+ "aria-hidden": "true",
14635
+ viewBox: "0 0 24 24",
14636
+ width: "16",
14637
+ height: "16",
14638
+ "data-filled": n <= rating ? "true" : "false",
14639
+ className: n <= rating ? "fill-current" : "fill-none opacity-40",
14640
+ stroke: "currentColor",
14641
+ strokeWidth: "1.5",
14642
+ strokeLinejoin: "round",
14643
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: STAR_PATH })
14644
+ },
14645
+ n
14646
+ )) });
14647
+ }
14648
+ function Reviews({
14649
+ reviews,
14650
+ heading,
14651
+ headingId = "reviews-heading",
14652
+ headingLevel = 2,
14653
+ notice,
14654
+ noticePosition = "below",
14655
+ linkLabel = (name) => `Ver en ${name}`,
14656
+ newWindowLabel = "(se abre en una pesta\xF1a nueva)",
14657
+ locale = "es-ES",
14658
+ className,
14659
+ headingClassName,
14660
+ gridClassName,
14661
+ cardClassName,
14662
+ noticeClassName
14663
+ }) {
14664
+ if (!Array.isArray(reviews) || reviews.length === 0) return null;
14665
+ const usable = reviews.filter(isUsable2);
14666
+ if (usable.length === 0) return null;
14667
+ const hasNotice = notice !== void 0 && notice !== null && notice !== "";
14668
+ const noticeNode = hasNotice ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14669
+ "p",
14670
+ {
14671
+ "data-slot": "reviews-notice",
14672
+ className: slotClassName("", "text-sm text-muted-foreground", noticeClassName),
14673
+ children: notice
14674
+ }
14675
+ ) : null;
14676
+ const grid = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14677
+ "ul",
14678
+ {
14679
+ "data-slot": "reviews-grid",
14680
+ className: slotClassName("grid gap-6", "sm:grid-cols-2 lg:grid-cols-3", gridClassName),
14681
+ children: usable.map((review) => {
14682
+ const date = formatDay(review.reviewDate, locale);
14683
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
14684
+ "article",
14685
+ {
14686
+ "data-slot": "review",
14687
+ "data-source": review.source,
14688
+ className: (0, import_utils14.cn)("flex h-full flex-col gap-3 rounded-lg border p-5", cardClassName),
14689
+ children: [
14690
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Stars, { rating: review.rating }),
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
+ ]
14711
+ }
14712
+ ) }, review.id);
14713
+ })
14714
+ }
14715
+ );
14716
+ const body3 = /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
14717
+ noticePosition === "above" ? noticeNode : null,
14718
+ grid,
14719
+ noticePosition === "below" ? noticeNode : null
14720
+ ] });
14721
+ const hasHeading = heading !== void 0 && heading !== null && heading !== "";
14722
+ if (!hasHeading) {
14723
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { "data-slot": "reviews", className: (0, import_utils14.cn)("space-y-4", className), children: body3 });
14724
+ }
14725
+ const Tag = `h${headingLevel}`;
14726
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { "data-slot": "reviews", "aria-labelledby": headingId, className: (0, import_utils14.cn)("space-y-4", className), children: [
14727
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Tag, { id: headingId, className: slotClassName("", "text-xl font-semibold", headingClassName), children: heading }),
14728
+ body3
14729
+ ] });
14730
+ }
14731
+
14605
14732
  // src/components/page-blocks.tsx
14606
- var import_utils15 = require("@reblu/site-ui/utils");
14733
+ var import_utils16 = require("@reblu/site-ui/utils");
14607
14734
  var import_button_variants2 = require("@reblu/site-ui/button-variants");
14608
14735
 
14609
14736
  // src/components/content-blocks.tsx
14610
- var import_utils14 = require("@reblu/site-ui/utils");
14737
+ var import_utils15 = require("@reblu/site-ui/utils");
14611
14738
 
14612
14739
  // src/components/_card-icons.ts
14613
14740
  var CARD_ICON_NODES = {
@@ -14770,11 +14897,11 @@ var CARD_ICON_NODES = {
14770
14897
  };
14771
14898
 
14772
14899
  // src/components/content-blocks.tsx
14773
- var import_jsx_runtime18 = require("react/jsx-runtime");
14900
+ var import_jsx_runtime19 = require("react/jsx-runtime");
14774
14901
  var DEFAULT_BEFORE_AFTER_LABELS = Object.freeze({ before: "Antes", after: "Despu\xE9s" });
14775
14902
  function PairImage({ url, alt, label }) {
14776
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("figure", { className: "space-y-2", children: [
14777
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "relative aspect-[4/3] w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14903
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("figure", { className: "space-y-2", children: [
14904
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "relative aspect-[4/3] w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14778
14905
  "img",
14779
14906
  {
14780
14907
  src: url,
@@ -14784,7 +14911,7 @@ function PairImage({ url, alt, label }) {
14784
14911
  className: "h-full w-full object-cover"
14785
14912
  }
14786
14913
  ) }),
14787
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("figcaption", { className: "text-sm font-semibold", children: label })
14914
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("figcaption", { className: "text-sm font-semibold", children: label })
14788
14915
  ] });
14789
14916
  }
14790
14917
  function BeforeAfterPairs({
@@ -14796,26 +14923,26 @@ function BeforeAfterPairs({
14796
14923
  }) {
14797
14924
  const visibleCaption = showCaption && caption && caption.trim() !== "" ? caption : null;
14798
14925
  if (pairs.length === 0 && !visibleCaption) return null;
14799
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { "data-slot": "before-after", className: (0, import_utils14.cn)("space-y-4", className), children: [
14800
- pairs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "grid gap-6 lg:grid-cols-2", children: pairs.map((pair, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
14926
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { "data-slot": "before-after", className: (0, import_utils15.cn)("space-y-4", className), children: [
14927
+ pairs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("ul", { className: "grid gap-6 lg:grid-cols-2", children: pairs.map((pair, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
14801
14928
  "li",
14802
14929
  {
14803
14930
  "data-slot": "before-after-pair",
14804
14931
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
14805
14932
  children: [
14806
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PairImage, { url: pair.beforeUrl, alt: pair.alt ?? "", label: labels.before }),
14807
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PairImage, { url: pair.afterUrl, alt: pair.alt ?? "", label: labels.after })
14933
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PairImage, { url: pair.beforeUrl, alt: pair.alt ?? "", label: labels.before }),
14934
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PairImage, { url: pair.afterUrl, alt: pair.alt ?? "", label: labels.after })
14808
14935
  ]
14809
14936
  },
14810
14937
  `${pair.beforeUrl}-${pair.afterUrl}-${i}`
14811
14938
  )) }),
14812
- visibleCaption && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { "data-slot": "before-after-caption", className: "whitespace-pre-line text-sm opacity-80", children: visibleCaption })
14939
+ visibleCaption && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { "data-slot": "before-after-caption", className: "whitespace-pre-line text-sm opacity-80", children: visibleCaption })
14813
14940
  ] });
14814
14941
  }
14815
14942
  function ChipList({ items, className }) {
14816
14943
  const visible = items.filter((item) => item.trim() !== "");
14817
14944
  if (visible.length === 0) return null;
14818
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { "data-slot": "chip-list", className: (0, import_utils14.cn)("flex flex-wrap gap-3", className), children: visible.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14945
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("ul", { "data-slot": "chip-list", className: (0, import_utils15.cn)("flex flex-wrap gap-3", className), children: visible.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14819
14946
  "li",
14820
14947
  {
14821
14948
  "data-slot": "chip",
@@ -14831,7 +14958,7 @@ function hasCardIcon(icon) {
14831
14958
  }
14832
14959
  function CardIconSvg({ icon, className }) {
14833
14960
  if (!hasCardIcon(icon)) return null;
14834
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14961
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14835
14962
  "svg",
14836
14963
  {
14837
14964
  xmlns: "http://www.w3.org/2000/svg",
@@ -14844,30 +14971,30 @@ function CardIconSvg({ icon, className }) {
14844
14971
  "aria-hidden": "true",
14845
14972
  focusable: "false",
14846
14973
  "data-icon": icon,
14847
- className: (0, import_utils14.cn)("h-5 w-5", className),
14848
- children: CARD_ICON_NODES[icon].map(([Tag, attrs], i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Tag, { ...attrs }, i))
14974
+ className: (0, import_utils15.cn)("h-5 w-5", className),
14975
+ children: CARD_ICON_NODES[icon].map(([Tag, attrs], i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Tag, { ...attrs }, i))
14849
14976
  }
14850
14977
  );
14851
14978
  }
14852
14979
  function IconCardGrid({ items, intro, headingLevel = 3, className }) {
14853
14980
  const hasIntro = !!intro && intro.trim() !== "";
14854
14981
  if (items.length === 0 && !hasIntro) return null;
14855
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { "data-slot": "icon-cards", className: (0, import_utils14.cn)("space-y-6", className), children: [
14856
- hasIntro && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "max-w-prose text-lg opacity-80", children: intro }),
14857
- items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14982
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { "data-slot": "icon-cards", className: (0, import_utils15.cn)("space-y-6", className), children: [
14983
+ hasIntro && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "max-w-prose text-lg opacity-80", children: intro }),
14984
+ items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14858
14985
  "ul",
14859
14986
  {
14860
14987
  "data-slot": "icon-card-grid",
14861
14988
  className: "grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3",
14862
- children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
14989
+ children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
14863
14990
  "li",
14864
14991
  {
14865
14992
  "data-slot": "icon-card",
14866
14993
  className: "space-y-3 rounded-xl border border-border bg-card p-6 text-card-foreground",
14867
14994
  children: [
14868
- hasCardIcon(item.icon) && /* @__PURE__ */ (0, import_jsx_runtime18.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_runtime18.jsx)(CardIconSvg, { icon: item.icon }) }),
14869
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Heading, { level: headingLevel, className: "text-lg font-semibold", children: item.title }),
14870
- item.text && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-muted-foreground", children: item.text })
14995
+ hasCardIcon(item.icon) && /* @__PURE__ */ (0, import_jsx_runtime19.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_runtime19.jsx)(CardIconSvg, { icon: item.icon }) }),
14996
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Heading, { level: headingLevel, className: "text-lg font-semibold", children: item.title }),
14997
+ item.text && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-muted-foreground", children: item.text })
14871
14998
  ]
14872
14999
  },
14873
15000
  `${item.title}-${i}`
@@ -14893,19 +15020,19 @@ function ImageTextSplit({
14893
15020
  const imageRight = imageSide === "right";
14894
15021
  const hasKicker = !!kicker && kicker.trim() !== "";
14895
15022
  const bodyOffset = heading ? headingLevel : headingLevel - 1;
14896
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
15023
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
14897
15024
  "div",
14898
15025
  {
14899
15026
  "data-slot": "image-text",
14900
15027
  "data-image-side": imageRight ? "right" : "left",
14901
- className: (0, import_utils14.cn)("grid grid-cols-1 items-center gap-8 md:grid-cols-2", className),
15028
+ className: (0, import_utils15.cn)("grid grid-cols-1 items-center gap-8 md:grid-cols-2", className),
14902
15029
  children: [
14903
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
15030
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14904
15031
  "div",
14905
15032
  {
14906
15033
  "data-slot": "image-text-media",
14907
- className: (0, import_utils14.cn)(textFirst ? "order-2" : "order-1", imageRight ? "md:order-2" : "md:order-1"),
14908
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "relative aspect-[4/3] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
15034
+ className: (0, import_utils15.cn)(textFirst ? "order-2" : "order-1", imageRight ? "md:order-2" : "md:order-1"),
15035
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "relative aspect-[4/3] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14909
15036
  "img",
14910
15037
  {
14911
15038
  src: imageUrl,
@@ -14917,21 +15044,21 @@ function ImageTextSplit({
14917
15044
  ) })
14918
15045
  }
14919
15046
  ),
14920
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
15047
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
14921
15048
  "div",
14922
15049
  {
14923
15050
  "data-slot": "image-text-body",
14924
- className: (0, import_utils14.cn)(
15051
+ className: (0, import_utils15.cn)(
14925
15052
  "space-y-4",
14926
15053
  textFirst ? "order-1" : "order-2",
14927
15054
  imageRight ? "md:order-1" : "md:order-2"
14928
15055
  ),
14929
15056
  children: [
14930
- (hasKicker || heading) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-2", children: [
14931
- hasKicker && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { "data-slot": "page-block-kicker", className: KICKER_CLASS_NAME, children: kicker }),
14932
- heading && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { id: headingId, children: heading }) })
15057
+ (hasKicker || heading) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "space-y-2", children: [
15058
+ hasKicker && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { "data-slot": "page-block-kicker", className: KICKER_CLASS_NAME, children: kicker }),
15059
+ heading && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { id: headingId, children: heading }) })
14933
15060
  ] }),
14934
- html5 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SafeHtml, { html: sanitizeHtml(html5), headingOffset: bodyOffset })
15061
+ html5 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SafeHtml, { html: sanitizeHtml(html5), headingOffset: bodyOffset })
14935
15062
  ]
14936
15063
  }
14937
15064
  )
@@ -14941,38 +15068,38 @@ function ImageTextSplit({
14941
15068
  }
14942
15069
 
14943
15070
  // src/components/page-blocks.tsx
14944
- var import_jsx_runtime19 = require("react/jsx-runtime");
15071
+ var import_jsx_runtime20 = require("react/jsx-runtime");
14945
15072
  var ALIASES = {
14946
15073
  doctor_embed: "profile_embed",
14947
15074
  specialty_embed: "page_embed"
14948
15075
  };
14949
15076
  function HeroBlock({ block, headingLevel }) {
14950
15077
  const { title, subtitle, imageUrl } = block.data;
14951
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "space-y-4", children: [
14952
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
14953
- subtitle && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-lg opacity-80", children: subtitle }),
14954
- imageUrl && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
15078
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "space-y-4", children: [
15079
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
15080
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-lg opacity-80", children: subtitle }),
15081
+ imageUrl && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
14955
15082
  ] });
14956
15083
  }
14957
15084
  function RichtextBlock({ block, headingLevel }) {
14958
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
15085
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
14959
15086
  }
14960
15087
  function FaqBlock({ block }) {
14961
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FaqAccordion, { items: block.data.items });
15088
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FaqAccordion, { items: block.data.items });
14962
15089
  }
14963
15090
  function StatsBlock({ block }) {
14964
- return /* @__PURE__ */ (0, import_jsx_runtime19.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_runtime19.jsxs)("div", { className: "flex flex-col-reverse gap-1", children: [
14965
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dt", { className: "text-sm opacity-80", children: item.label }),
14966
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("dd", { className: "text-3xl font-bold", children: item.value })
15091
+ return /* @__PURE__ */ (0, import_jsx_runtime20.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_runtime20.jsxs)("div", { className: "flex flex-col-reverse gap-1", children: [
15092
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("dt", { className: "text-sm opacity-80", children: item.label }),
15093
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("dd", { className: "text-3xl font-bold", children: item.value })
14967
15094
  ] }, i)) });
14968
15095
  }
14969
15096
  function TestimonialBlock({ block }) {
14970
15097
  const { quote, author, role, avatarUrl } = block.data;
14971
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("figure", { className: "space-y-4", children: [
14972
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: quote }) }),
14973
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("figcaption", { className: "flex items-center gap-3", children: [
15098
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("figure", { className: "space-y-4", children: [
15099
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: quote }) }),
15100
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("figcaption", { className: "flex items-center gap-3", children: [
14974
15101
  avatarUrl && // eslint-disable-next-line @next/next/no-img-element
14975
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15102
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14976
15103
  "img",
14977
15104
  {
14978
15105
  src: avatarUrl,
@@ -14981,9 +15108,9 @@ function TestimonialBlock({ block }) {
14981
15108
  className: "h-10 w-10 rounded-full object-cover"
14982
15109
  }
14983
15110
  ),
14984
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
14985
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "font-semibold", children: author }),
14986
- role && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "block text-sm opacity-80", children: role })
15111
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
15112
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "font-semibold", children: author }),
15113
+ role && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "block text-sm opacity-80", children: role })
14987
15114
  ] })
14988
15115
  ] })
14989
15116
  ] });
@@ -14992,19 +15119,19 @@ function CtaSlotBlock(_props) {
14992
15119
  return null;
14993
15120
  }
14994
15121
  function FeatureListBlock({ block }) {
14995
- return /* @__PURE__ */ (0, import_jsx_runtime19.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_runtime19.jsx)("li", { children: item.text }, i)) });
15122
+ return /* @__PURE__ */ (0, import_jsx_runtime20.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_runtime20.jsx)("li", { children: item.text }, i)) });
14996
15123
  }
14997
15124
  function GalleryBlock({ block }) {
14998
15125
  const { images } = block.data;
14999
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15126
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15000
15127
  "div",
15001
15128
  {
15002
- className: (0, import_utils15.cn)(
15129
+ className: (0, import_utils16.cn)(
15003
15130
  "grid gap-4",
15004
15131
  images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
15005
15132
  ),
15006
- children: images.map((img, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("figure", { className: "space-y-1", children: [
15007
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15133
+ children: images.map((img, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("figure", { className: "space-y-1", children: [
15134
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15008
15135
  "img",
15009
15136
  {
15010
15137
  src: img.url,
@@ -15013,7 +15140,7 @@ function GalleryBlock({ block }) {
15013
15140
  className: "h-full w-full object-cover"
15014
15141
  }
15015
15142
  ) }),
15016
- img.caption && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("figcaption", { className: "text-sm opacity-80", children: img.caption })
15143
+ img.caption && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("figcaption", { className: "text-sm opacity-80", children: img.caption })
15017
15144
  ] }, `${img.url}-${i}`))
15018
15145
  }
15019
15146
  );
@@ -15023,13 +15150,13 @@ function EmbedCard({
15023
15150
  headingLevel,
15024
15151
  embedHref
15025
15152
  }) {
15026
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
15153
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
15027
15154
  "a",
15028
15155
  {
15029
15156
  href: embedHref(resolved),
15030
15157
  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",
15031
15158
  children: [
15032
- resolved.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15159
+ resolved.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15033
15160
  "img",
15034
15161
  {
15035
15162
  src: resolved.coverImageUrl,
@@ -15038,35 +15165,35 @@ function EmbedCard({
15038
15165
  className: "h-full w-full object-cover"
15039
15166
  }
15040
15167
  ) }),
15041
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "space-y-1 p-4", children: [
15042
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
15043
- resolved.role && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
15044
- resolved.excerpt && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-muted-foreground", children: resolved.excerpt })
15168
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "space-y-1 p-4", children: [
15169
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
15170
+ resolved.role && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
15171
+ resolved.excerpt && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-muted-foreground", children: resolved.excerpt })
15045
15172
  ] })
15046
15173
  ]
15047
15174
  }
15048
15175
  );
15049
15176
  }
15050
15177
  function PageEmbedBlock({ block, headingLevel, embedHref }) {
15051
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
15178
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
15052
15179
  }
15053
15180
  function ProfileEmbedBlock({
15054
15181
  block,
15055
15182
  headingLevel,
15056
15183
  embedHref
15057
15184
  }) {
15058
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
15185
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
15059
15186
  }
15060
15187
  function BeforeAfterBlock({ block }) {
15061
15188
  const { pairs, showCaption, caption } = block.data;
15062
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(BeforeAfterPairs, { pairs, showCaption, caption });
15189
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(BeforeAfterPairs, { pairs, showCaption, caption });
15063
15190
  }
15064
15191
  function ChipsBlock({ block }) {
15065
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ChipList, { items: block.data.items });
15192
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChipList, { items: block.data.items });
15066
15193
  }
15067
15194
  function ImageTextBlock({ block, headingLevel, headingId }) {
15068
15195
  const { kicker, imageUrl, alt, imageSide, mobileOrder, html: html5 } = block.data;
15069
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15196
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15070
15197
  ImageTextSplit,
15071
15198
  {
15072
15199
  imageUrl,
@@ -15082,7 +15209,7 @@ function ImageTextBlock({ block, headingLevel, headingId }) {
15082
15209
  );
15083
15210
  }
15084
15211
  function IconCardsBlock({ block, headingLevel }) {
15085
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(IconCardGrid, { items: block.data.items, intro: block.data.intro, headingLevel });
15212
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(IconCardGrid, { items: block.data.items, intro: block.data.intro, headingLevel });
15086
15213
  }
15087
15214
  var DEFAULT_RENDERERS = {
15088
15215
  hero: HeroBlock,
@@ -15156,14 +15283,14 @@ function toIdFragment(value) {
15156
15283
  function SectionCta2({ cta }) {
15157
15284
  if (!hasUsableCta(cta)) return null;
15158
15285
  const variant = toButtonVariant(cta.variant);
15159
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15286
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15160
15287
  "a",
15161
15288
  {
15162
15289
  href: cta.url,
15163
15290
  "data-slot": "button",
15164
15291
  "data-variant": variant,
15165
15292
  "data-size": "default",
15166
- className: (0, import_utils15.cn)((0, import_button_variants2.buttonVariants)({ variant, size: "default" })),
15293
+ className: (0, import_utils16.cn)((0, import_button_variants2.buttonVariants)({ variant, size: "default" })),
15167
15294
  ...cta.isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
15168
15295
  children: cta.label
15169
15296
  }
@@ -15191,18 +15318,18 @@ function PageBlocks({
15191
15318
  const kicker = kickerOf(type, block);
15192
15319
  const ownsHeading = OWN_HEADING_TYPES.has(type);
15193
15320
  return [
15194
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
15321
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
15195
15322
  "section",
15196
15323
  {
15197
15324
  "data-slot": "page-block",
15198
15325
  "data-block-type": type,
15199
15326
  "aria-labelledby": headingId,
15200
15327
  style: surfaceStyle(background),
15201
- className: (0, import_utils15.cn)("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
15328
+ className: (0, import_utils16.cn)("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
15202
15329
  children: [
15203
- kicker && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { "data-slot": "page-block-kicker", className: (0, import_utils15.cn)("-mb-4", KICKER_CLASS_NAME), children: kicker }),
15204
- block.heading && !ownsHeading && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { id: headingId, children: block.heading }) }),
15205
- ownsHeading ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15330
+ kicker && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { "data-slot": "page-block-kicker", className: (0, import_utils16.cn)("-mb-4", KICKER_CLASS_NAME), children: kicker }),
15331
+ block.heading && !ownsHeading && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { id: headingId, children: block.heading }) }),
15332
+ ownsHeading ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15206
15333
  Renderer,
15207
15334
  {
15208
15335
  block,
@@ -15210,7 +15337,7 @@ function PageBlocks({
15210
15337
  embedHref,
15211
15338
  headingId
15212
15339
  }
15213
- ) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15340
+ ) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15214
15341
  Renderer,
15215
15342
  {
15216
15343
  block,
@@ -15218,7 +15345,7 @@ function PageBlocks({
15218
15345
  embedHref
15219
15346
  }
15220
15347
  ),
15221
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SectionCta2, { cta: block.cta })
15348
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SectionCta2, { cta: block.cta })
15222
15349
  ]
15223
15350
  },
15224
15351
  block.id
@@ -15226,12 +15353,12 @@ function PageBlocks({
15226
15353
  ];
15227
15354
  });
15228
15355
  if (sections.length === 0) return null;
15229
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: (0, import_utils15.cn)("space-y-12", className), "data-slot": "page-blocks", children: sections });
15356
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: (0, import_utils16.cn)("space-y-12", className), "data-slot": "page-blocks", children: sections });
15230
15357
  }
15231
15358
 
15232
15359
  // src/components/shop-filters.tsx
15233
- var import_utils16 = require("@reblu/site-ui/utils");
15234
- var import_jsx_runtime20 = require("react/jsx-runtime");
15360
+ var import_utils17 = require("@reblu/site-ui/utils");
15361
+ var import_jsx_runtime21 = require("react/jsx-runtime");
15235
15362
  var DEFAULT_SHOP_PRICE_BANDS = [
15236
15363
  { max: 2500 },
15237
15364
  { min: 2500, max: 5e3 },
@@ -15275,7 +15402,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
15275
15402
  return "";
15276
15403
  }
15277
15404
  function OptionLink({ href, active, label, onActivate }) {
15278
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15405
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15279
15406
  "a",
15280
15407
  {
15281
15408
  href,
@@ -15284,7 +15411,7 @@ function OptionLink({ href, active, label, onActivate }) {
15284
15411
  event.preventDefault();
15285
15412
  onActivate();
15286
15413
  } : void 0,
15287
- className: (0, import_utils16.cn)(
15414
+ className: (0, import_utils17.cn)(
15288
15415
  "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",
15289
15416
  active ? "border-transparent bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
15290
15417
  ),
@@ -15293,9 +15420,9 @@ function OptionLink({ href, active, label, onActivate }) {
15293
15420
  );
15294
15421
  }
15295
15422
  function FilterFieldset({ legend, children: children2 }) {
15296
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("fieldset", { className: "space-y-2", children: [
15297
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("legend", { className: "text-sm font-medium text-foreground", children: legend }),
15298
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex flex-wrap gap-2", children: children2 })
15423
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("fieldset", { className: "space-y-2", children: [
15424
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("legend", { className: "text-sm font-medium text-foreground", children: legend }),
15425
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex flex-wrap gap-2", children: children2 })
15299
15426
  ] });
15300
15427
  }
15301
15428
  function ShopFilters({
@@ -15318,11 +15445,11 @@ function ShopFilters({
15318
15445
  if (!shouldRenderShopFilters(facets, active)) {
15319
15446
  return null;
15320
15447
  }
15321
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: (0, import_utils16.cn)("space-y-6", className), "data-slot": "shop-filters", children: [
15448
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: (0, import_utils17.cn)("space-y-6", className), "data-slot": "shop-filters", children: [
15322
15449
  visibleTaxonomies.map((axis) => {
15323
15450
  const activeSlug = active.taxonomy?.[axis.key];
15324
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(FilterFieldset, { legend: axis.label, children: [
15325
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15451
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(FilterFieldset, { legend: axis.label, children: [
15452
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15326
15453
  OptionLink,
15327
15454
  {
15328
15455
  href: hrefs.taxonomy(axis.key, void 0),
@@ -15337,7 +15464,7 @@ function ShopFilters({
15337
15464
  ),
15338
15465
  axis.terms.map((term) => {
15339
15466
  const isActive = activeSlug === term.slug;
15340
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15467
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15341
15468
  OptionLink,
15342
15469
  {
15343
15470
  href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
@@ -15357,9 +15484,9 @@ function ShopFilters({
15357
15484
  }),
15358
15485
  visibleAttributes.map((attr) => {
15359
15486
  const activeValues = toValueArray(active.attr?.[attr.key]);
15360
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
15487
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
15361
15488
  const isActive = activeValues.includes(opt.value);
15362
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15489
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15363
15490
  OptionLink,
15364
15491
  {
15365
15492
  href: hrefs.attr(attr.key, opt.value),
@@ -15377,11 +15504,11 @@ function ShopFilters({
15377
15504
  );
15378
15505
  }) }, attr.key);
15379
15506
  }),
15380
- showPriceGroup && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
15507
+ showPriceGroup && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
15381
15508
  const isActive = active.priceMin === band.min && active.priceMax === band.max;
15382
15509
  const nextMin = isActive ? void 0 : band.min;
15383
15510
  const nextMax = isActive ? void 0 : band.max;
15384
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15511
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15385
15512
  OptionLink,
15386
15513
  {
15387
15514
  href: hrefs.price(nextMin, nextMax),
@@ -15392,7 +15519,7 @@ function ShopFilters({
15392
15519
  i
15393
15520
  );
15394
15521
  }) }),
15395
- hasOnSale && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15522
+ hasOnSale && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15396
15523
  OptionLink,
15397
15524
  {
15398
15525
  href: hrefs.onSale(!active.onSale),
@@ -15401,7 +15528,7 @@ function ShopFilters({
15401
15528
  onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
15402
15529
  }
15403
15530
  ),
15404
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15531
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15405
15532
  "a",
15406
15533
  {
15407
15534
  href: hrefs.clearAll(),
@@ -15417,8 +15544,8 @@ function ShopFilters({
15417
15544
  }
15418
15545
 
15419
15546
  // src/components/course-catalog-filters.tsx
15420
- var import_utils17 = require("@reblu/site-ui/utils");
15421
- var import_jsx_runtime21 = require("react/jsx-runtime");
15547
+ var import_utils18 = require("@reblu/site-ui/utils");
15548
+ var import_jsx_runtime22 = require("react/jsx-runtime");
15422
15549
  var DEFAULT_COURSE_PRICE_BANDS = [
15423
15550
  { max: 5e3 },
15424
15551
  { min: 5e3, max: 15e3 },
@@ -15471,9 +15598,9 @@ function CourseCatalogFilters({
15471
15598
  const showPrice = enabled.price !== false;
15472
15599
  const isFree = Boolean(active.free);
15473
15600
  if (!showCategories && !showInstructors && !showPrice) return null;
15474
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: (0, import_utils17.cn)("space-y-6", className), "data-slot": "course-catalog-filters", children: [
15475
- showCategories && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(FilterFieldset, { legend: t.category, children: [
15476
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15601
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: (0, import_utils18.cn)("space-y-6", className), "data-slot": "course-catalog-filters", children: [
15602
+ showCategories && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(FilterFieldset, { legend: t.category, children: [
15603
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15477
15604
  OptionLink,
15478
15605
  {
15479
15606
  href: categoryHref(void 0),
@@ -15485,7 +15612,7 @@ function CourseCatalogFilters({
15485
15612
  sortedCategories.map((category) => {
15486
15613
  const isActive = active.category === category.slug;
15487
15614
  const next2 = isActive ? void 0 : category.slug;
15488
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15615
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15489
15616
  OptionLink,
15490
15617
  {
15491
15618
  href: categoryHref(next2),
@@ -15497,8 +15624,8 @@ function CourseCatalogFilters({
15497
15624
  );
15498
15625
  })
15499
15626
  ] }),
15500
- showInstructors && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(FilterFieldset, { legend: t.instructor, children: [
15501
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15627
+ showInstructors && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(FilterFieldset, { legend: t.instructor, children: [
15628
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15502
15629
  OptionLink,
15503
15630
  {
15504
15631
  href: hrefs.instructor(void 0),
@@ -15510,7 +15637,7 @@ function CourseCatalogFilters({
15510
15637
  named.map((instructor) => {
15511
15638
  const isActive = active.instructor === instructor.id;
15512
15639
  const next2 = isActive ? void 0 : instructor.id;
15513
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15640
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15514
15641
  OptionLink,
15515
15642
  {
15516
15643
  href: hrefs.instructor(next2),
@@ -15522,8 +15649,8 @@ function CourseCatalogFilters({
15522
15649
  );
15523
15650
  })
15524
15651
  ] }),
15525
- showPrice && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(FilterFieldset, { legend: t.price, children: [
15526
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15652
+ showPrice && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(FilterFieldset, { legend: t.price, children: [
15653
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15527
15654
  OptionLink,
15528
15655
  {
15529
15656
  href: hrefs.free(!isFree),
@@ -15538,7 +15665,7 @@ function CourseCatalogFilters({
15538
15665
  const isActive = !isFree && active.priceMin === band.min && active.priceMax === band.max;
15539
15666
  const nextMin = isActive ? void 0 : band.min;
15540
15667
  const nextMax = isActive ? void 0 : band.max;
15541
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15668
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15542
15669
  OptionLink,
15543
15670
  {
15544
15671
  href: hrefs.price(nextMin, nextMax),
@@ -15550,7 +15677,7 @@ function CourseCatalogFilters({
15550
15677
  );
15551
15678
  })
15552
15679
  ] }),
15553
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15680
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15554
15681
  "a",
15555
15682
  {
15556
15683
  href: hrefs.clearAll(),
@@ -15572,8 +15699,8 @@ function CourseCatalogFilters({
15572
15699
  }
15573
15700
 
15574
15701
  // src/components/cart-line-list.tsx
15575
- var import_utils18 = require("@reblu/site-ui/utils");
15576
- var import_jsx_runtime22 = (
15702
+ var import_utils19 = require("@reblu/site-ui/utils");
15703
+ var import_jsx_runtime23 = (
15577
15704
  // eslint-disable-next-line react/no-array-index-key -- entries are positional, SITE-built rows
15578
15705
  require("react/jsx-runtime")
15579
15706
  );
@@ -15589,17 +15716,17 @@ var DEFAULT_LABELS2 = {
15589
15716
  function CartLineIncludes({ entries, note, className }) {
15590
15717
  const hasNote = note != null && note !== false && note !== "";
15591
15718
  if (entries.length === 0 && !hasNote) return null;
15592
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
15719
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
15593
15720
  "div",
15594
15721
  {
15595
- className: (0, import_utils18.cn)("mt-2 space-y-2 rounded-lg bg-muted px-4 py-3 text-sm", className),
15722
+ className: (0, import_utils19.cn)("mt-2 space-y-2 rounded-lg bg-muted px-4 py-3 text-sm", className),
15596
15723
  "data-slot": "cart-line-includes",
15597
15724
  children: [
15598
- entries.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.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_runtime22.jsxs)("div", { className: "contents", children: [
15599
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("dt", { className: "font-semibold text-muted-foreground", children: entry.label }),
15600
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("dd", { className: "m-0", children: entry.value })
15725
+ entries.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.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_runtime23.jsxs)("div", { className: "contents", children: [
15726
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("dt", { className: "font-semibold text-muted-foreground", children: entry.label }),
15727
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("dd", { className: "m-0", children: entry.value })
15601
15728
  ] }, idx)) }),
15602
- hasNote && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-muted-foreground", children: note })
15729
+ hasNote && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-muted-foreground", children: note })
15603
15730
  ]
15604
15731
  }
15605
15732
  );
@@ -15628,9 +15755,9 @@ function CartLineList({
15628
15755
  }) {
15629
15756
  const t = { ...DEFAULT_LABELS2, ...labels };
15630
15757
  const noticeContent = notice === true ? t.cancelledNotice : notice;
15631
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: (0, import_utils18.cn)("space-y-4", className), "data-slot": "cart-line-list", children: [
15632
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
15633
- noticeContent != null && noticeContent !== false && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15758
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: (0, import_utils19.cn)("space-y-4", className), "data-slot": "cart-line-list", children: [
15759
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
15760
+ noticeContent != null && noticeContent !== false && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15634
15761
  "div",
15635
15762
  {
15636
15763
  role: "status",
@@ -15639,34 +15766,34 @@ function CartLineList({
15639
15766
  children: noticeContent
15640
15767
  }
15641
15768
  ),
15642
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("ul", { className: "space-y-4", children: items.map((item) => {
15769
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("ul", { className: "space-y-4", children: items.map((item) => {
15643
15770
  const maxQty = item.maxStock ?? Infinity;
15644
15771
  const atMax = item.quantity >= maxQty;
15645
15772
  const atMin = item.quantity <= 1;
15646
15773
  const message = lineMessage?.(item);
15647
15774
  const includes = lineIncludes?.(item);
15648
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
15775
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
15649
15776
  "li",
15650
15777
  {
15651
15778
  className: "flex gap-4 rounded-xl border border-border bg-card p-4",
15652
15779
  children: [
15653
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
15654
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "min-w-0 flex-1", children: [
15655
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
15656
- item.variantName && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
15657
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("p", { className: "mt-1 text-sm text-muted-foreground", children: [
15780
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
15781
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "min-w-0 flex-1", children: [
15782
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
15783
+ item.variantName && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
15784
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { className: "mt-1 text-sm text-muted-foreground", children: [
15658
15785
  formatPrice(item.unitPrice, currencyCode, locale),
15659
15786
  " ",
15660
15787
  t.unitPriceSuffix
15661
15788
  ] }),
15662
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
15789
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
15663
15790
  "div",
15664
15791
  {
15665
15792
  role: "group",
15666
15793
  "aria-label": t.quantityLabel,
15667
15794
  className: "mt-3 flex items-center gap-3",
15668
15795
  children: [
15669
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15796
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15670
15797
  "button",
15671
15798
  {
15672
15799
  type: "button",
@@ -15677,8 +15804,8 @@ function CartLineList({
15677
15804
  children: "\u2212"
15678
15805
  }
15679
15806
  ),
15680
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
15681
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15807
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
15808
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15682
15809
  "button",
15683
15810
  {
15684
15811
  type: "button",
@@ -15689,7 +15816,7 @@ function CartLineList({
15689
15816
  children: "+"
15690
15817
  }
15691
15818
  ),
15692
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15819
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15693
15820
  "button",
15694
15821
  {
15695
15822
  type: "button",
@@ -15702,7 +15829,7 @@ function CartLineList({
15702
15829
  ]
15703
15830
  }
15704
15831
  ),
15705
- message != null && message !== false && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15832
+ message != null && message !== false && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15706
15833
  "p",
15707
15834
  {
15708
15835
  className: "mt-2 text-sm text-destructive",
@@ -15710,12 +15837,12 @@ function CartLineList({
15710
15837
  children: message
15711
15838
  }
15712
15839
  ),
15713
- includes != null && includes !== false && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("details", { className: "mt-2", "data-slot": "cart-line-list-includes", children: [
15714
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("summary", { className: "cursor-pointer text-sm font-semibold text-primary", children: t.includesSummary }),
15840
+ includes != null && includes !== false && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("details", { className: "mt-2", "data-slot": "cart-line-list-includes", children: [
15841
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("summary", { className: "cursor-pointer text-sm font-semibold text-primary", children: t.includesSummary }),
15715
15842
  includes
15716
15843
  ] })
15717
15844
  ] }),
15718
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
15845
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
15719
15846
  ]
15720
15847
  },
15721
15848
  lineKey(item.productId, item.variantId)
@@ -15725,8 +15852,8 @@ function CartLineList({
15725
15852
  }
15726
15853
 
15727
15854
  // src/components/cart-summary.tsx
15728
- var import_utils19 = require("@reblu/site-ui/utils");
15729
- var import_jsx_runtime23 = require("react/jsx-runtime");
15855
+ var import_utils20 = require("@reblu/site-ui/utils");
15856
+ var import_jsx_runtime24 = require("react/jsx-runtime");
15730
15857
  var DEFAULT_LABELS3 = {
15731
15858
  subtotal: "Subtotal",
15732
15859
  discountPrefix: "Descuento",
@@ -15756,37 +15883,37 @@ function CartSummary({
15756
15883
  const hasDiscount = Boolean(discountAmount && discountAmount > 0);
15757
15884
  const noticeContent = notice === true ? t.cancelledNotice : notice;
15758
15885
  const hasNotice = noticeContent != null && noticeContent !== false;
15759
- const breakdown = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
15886
+ const breakdown = /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
15760
15887
  "dl",
15761
15888
  {
15762
- className: (0, import_utils19.cn)("space-y-2 text-sm", !hasNotice && className),
15889
+ className: (0, import_utils20.cn)("space-y-2 text-sm", !hasNotice && className),
15763
15890
  "data-slot": "cart-summary",
15764
15891
  children: [
15765
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
15766
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("dt", { children: t.subtotal }),
15767
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("dd", { children: formatPrice(subtotal, currencyCode, locale) })
15892
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
15893
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("dt", { children: t.subtotal }),
15894
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("dd", { children: formatPrice(subtotal, currencyCode, locale) })
15768
15895
  ] }),
15769
- hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
15770
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("dt", { children: autoDiscount ? t.staffDiscountApplied : `${t.discountPrefix}${discountCode ? ` (${discountCode})` : ""}` }),
15771
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("dd", { children: [
15896
+ hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
15897
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("dt", { children: autoDiscount ? t.staffDiscountApplied : `${t.discountPrefix}${discountCode ? ` (${discountCode})` : ""}` }),
15898
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("dd", { children: [
15772
15899
  "-",
15773
15900
  formatPrice(discountAmount, currencyCode, locale)
15774
15901
  ] })
15775
15902
  ] }),
15776
- shippingEnabled && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
15777
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("dt", { children: t.shipping }),
15778
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
15903
+ shippingEnabled && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
15904
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("dt", { children: t.shipping }),
15905
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
15779
15906
  ] }),
15780
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
15781
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("dt", { children: t.total }),
15782
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("dd", { children: formatPrice(total, currencyCode, locale) })
15907
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
15908
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("dt", { children: t.total }),
15909
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("dd", { children: formatPrice(total, currencyCode, locale) })
15783
15910
  ] })
15784
15911
  ]
15785
15912
  }
15786
15913
  );
15787
15914
  if (!hasNotice) return breakdown;
15788
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: (0, import_utils19.cn)("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
15789
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15915
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: (0, import_utils20.cn)("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
15916
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
15790
15917
  "div",
15791
15918
  {
15792
15919
  role: "status",
@@ -15800,8 +15927,8 @@ function CartSummary({
15800
15927
  }
15801
15928
 
15802
15929
  // src/components/cart-adjustments-notice.tsx
15803
- var import_utils20 = require("@reblu/site-ui/utils");
15804
- var import_jsx_runtime24 = require("react/jsx-runtime");
15930
+ var import_utils21 = require("@reblu/site-ui/utils");
15931
+ var import_jsx_runtime25 = require("react/jsx-runtime");
15805
15932
  var DEFAULT_LABELS4 = {
15806
15933
  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.`,
15807
15934
  quantityChanged: (name, quantity) => `Hemos ajustado la cantidad de ${name} a ${quantity} por el stock disponible.`,
@@ -15835,20 +15962,20 @@ function CartAdjustmentsNotice({
15835
15962
  );
15836
15963
  }
15837
15964
  if (messages.length === 0) return null;
15838
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
15965
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15839
15966
  "div",
15840
15967
  {
15841
15968
  role: "status",
15842
- className: (0, import_utils20.cn)("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
15969
+ className: (0, import_utils21.cn)("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
15843
15970
  "data-slot": "cart-adjustments-notice",
15844
- children: messages.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { children: messages[0] }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("li", { children: message }, index)) })
15971
+ children: messages.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { children: messages[0] }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("li", { children: message }, index)) })
15845
15972
  }
15846
15973
  );
15847
15974
  }
15848
15975
 
15849
15976
  // src/components/added-to-cart-toast.tsx
15850
- var import_utils21 = require("@reblu/site-ui/utils");
15851
- var import_jsx_runtime25 = (
15977
+ var import_utils22 = require("@reblu/site-ui/utils");
15978
+ var import_jsx_runtime26 = (
15852
15979
  // eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
15853
15980
  require("react/jsx-runtime")
15854
15981
  );
@@ -15871,32 +15998,32 @@ function AddedToCartToast({
15871
15998
  const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
15872
15999
  const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
15873
16000
  const variant = status === "success" ? "success" : "error";
15874
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
16001
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
15875
16002
  "div",
15876
16003
  {
15877
16004
  "data-slot": "added-to-cart-toast",
15878
16005
  "data-variant": variant,
15879
- className: (0, import_utils21.cn)(
16006
+ className: (0, import_utils22.cn)(
15880
16007
  "flex items-center gap-3 rounded-xl border border-border bg-card p-3 text-sm shadow-lg",
15881
16008
  variant === "success" && "border-green-600/30 dark:border-green-400/30",
15882
16009
  variant === "error" && "border-destructive/30",
15883
16010
  className
15884
16011
  ),
15885
16012
  children: [
15886
- hasThumbnail && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
15887
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "min-w-0 flex-1", children: [
15888
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "truncate font-semibold text-foreground", children: productName }),
15889
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
16013
+ hasThumbnail && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
16014
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "min-w-0 flex-1", children: [
16015
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "truncate font-semibold text-foreground", children: productName }),
16016
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
15890
16017
  ] }),
15891
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
16018
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
15892
16019
  ]
15893
16020
  }
15894
16021
  );
15895
16022
  }
15896
16023
 
15897
16024
  // src/components/checkout-login-prompt.tsx
15898
- var import_utils22 = require("@reblu/site-ui/utils");
15899
- var import_jsx_runtime26 = require("react/jsx-runtime");
16025
+ var import_utils23 = require("@reblu/site-ui/utils");
16026
+ var import_jsx_runtime27 = require("react/jsx-runtime");
15900
16027
  var DEFAULT_LABELS6 = {
15901
16028
  title: "Identificaci\xF3n",
15902
16029
  description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
@@ -15923,26 +16050,26 @@ function CheckoutLoginPrompt({
15923
16050
  if (!open) return null;
15924
16051
  const t = { ...DEFAULT_LABELS6, ...labels };
15925
16052
  const isValidEmail = EMAIL_PATTERN.test(email.trim());
15926
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
15927
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
15928
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
16053
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
16054
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
16055
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
15929
16056
  "div",
15930
16057
  {
15931
16058
  role: "dialog",
15932
16059
  "aria-modal": "true",
15933
16060
  "aria-labelledby": "checkout-login-prompt-title",
15934
16061
  "data-slot": "checkout-login-prompt",
15935
- className: (0, import_utils22.cn)(
16062
+ className: (0, import_utils23.cn)(
15936
16063
  "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",
15937
16064
  className
15938
16065
  ),
15939
16066
  children: [
15940
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
15941
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { children: [
15942
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
15943
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
16067
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
16068
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { children: [
16069
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
16070
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
15944
16071
  ] }),
15945
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
16072
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
15946
16073
  "button",
15947
16074
  {
15948
16075
  type: "button",
@@ -15953,9 +16080,9 @@ function CheckoutLoginPrompt({
15953
16080
  }
15954
16081
  )
15955
16082
  ] }),
15956
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "space-y-2", children: [
15957
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
15958
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
16083
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "space-y-2", children: [
16084
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
16085
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
15959
16086
  "input",
15960
16087
  {
15961
16088
  id: "checkout-login-prompt-email",
@@ -15964,29 +16091,29 @@ function CheckoutLoginPrompt({
15964
16091
  value: email,
15965
16092
  onChange: (e) => onEmailChange(e.target.value),
15966
16093
  placeholder: t.emailPlaceholder,
15967
- className: (0, import_utils22.cn)(
16094
+ className: (0, import_utils23.cn)(
15968
16095
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
15969
16096
  error ? "border-destructive" : "border-border focus:border-primary"
15970
16097
  )
15971
16098
  }
15972
16099
  ),
15973
- error && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-xs text-destructive", children: error })
16100
+ error && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-xs text-destructive", children: error })
15974
16101
  ] }),
15975
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "space-y-2", children: [
15976
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
16102
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "space-y-2", children: [
16103
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
15977
16104
  "button",
15978
16105
  {
15979
16106
  type: "button",
15980
16107
  onClick: onSubmitEmail,
15981
16108
  disabled: checking || !isValidEmail,
15982
- className: (0, import_utils22.cn)(
16109
+ className: (0, import_utils23.cn)(
15983
16110
  "flex w-full cursor-pointer items-center justify-center gap-2 rounded-xl px-4 py-2.5 text-sm font-semibold transition-all",
15984
16111
  checking || !isValidEmail ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
15985
16112
  ),
15986
16113
  children: checking ? t.checking : t.continueWithEmail
15987
16114
  }
15988
16115
  ),
15989
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
16116
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
15990
16117
  "button",
15991
16118
  {
15992
16119
  type: "button",
@@ -16003,9 +16130,9 @@ function CheckoutLoginPrompt({
16003
16130
  }
16004
16131
 
16005
16132
  // src/components/checkout-form.tsx
16006
- var import_utils23 = require("@reblu/site-ui/utils");
16133
+ var import_utils24 = require("@reblu/site-ui/utils");
16007
16134
  var import_phone_input = require("@reblu/site-ui/phone-input");
16008
- var import_jsx_runtime27 = require("react/jsx-runtime");
16135
+ var import_jsx_runtime28 = require("react/jsx-runtime");
16009
16136
  var DEFAULT_LABELS7 = {
16010
16137
  contactTitle: "Datos de contacto",
16011
16138
  nameLabel: "Nombre completo",
@@ -16061,22 +16188,22 @@ function CheckoutForm({
16061
16188
  event.preventDefault();
16062
16189
  if (discountCode.trim() && !discountApplying) onApplyDiscount();
16063
16190
  }
16064
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
16191
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
16065
16192
  loginPrompt,
16066
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
16193
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
16067
16194
  "form",
16068
16195
  {
16069
16196
  "data-testid": "checkout-form",
16070
16197
  onSubmit,
16071
- className: (0, import_utils23.cn)("space-y-8", className),
16198
+ className: (0, import_utils24.cn)("space-y-8", className),
16072
16199
  "data-slot": "checkout-form",
16073
16200
  children: [
16074
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("section", { className: "space-y-4", children: [
16075
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
16076
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
16077
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "space-y-1", children: [
16078
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
16079
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
16201
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("section", { className: "space-y-4", children: [
16202
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
16203
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
16204
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-1", children: [
16205
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
16206
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
16080
16207
  "input",
16081
16208
  {
16082
16209
  id: "checkout-form-name",
@@ -16085,17 +16212,17 @@ function CheckoutForm({
16085
16212
  value: contact.name,
16086
16213
  onChange: (e) => patchContact({ name: e.target.value }),
16087
16214
  placeholder: t.namePlaceholder,
16088
- className: (0, import_utils23.cn)(
16215
+ className: (0, import_utils24.cn)(
16089
16216
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
16090
16217
  contactErrors?.name ? "border-destructive" : "border-border focus:border-primary"
16091
16218
  )
16092
16219
  }
16093
16220
  ),
16094
- contactErrors?.name && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.name })
16221
+ contactErrors?.name && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.name })
16095
16222
  ] }),
16096
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "space-y-1", children: [
16097
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
16098
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
16223
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-1", children: [
16224
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
16225
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
16099
16226
  "input",
16100
16227
  {
16101
16228
  id: "checkout-form-email",
@@ -16104,15 +16231,15 @@ function CheckoutForm({
16104
16231
  value: contact.email,
16105
16232
  onChange: (e) => patchContact({ email: e.target.value }),
16106
16233
  placeholder: t.emailPlaceholder,
16107
- className: (0, import_utils23.cn)(
16234
+ className: (0, import_utils24.cn)(
16108
16235
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
16109
16236
  contactErrors?.email ? "border-destructive" : "border-border focus:border-primary"
16110
16237
  )
16111
16238
  }
16112
16239
  ),
16113
- contactErrors?.email && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.email })
16240
+ contactErrors?.email && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.email })
16114
16241
  ] }),
16115
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
16242
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
16116
16243
  import_phone_input.PhoneInput,
16117
16244
  {
16118
16245
  id: "checkout-form-phone",
@@ -16126,26 +16253,26 @@ function CheckoutForm({
16126
16253
  ] })
16127
16254
  ] }),
16128
16255
  children2,
16129
- generalError ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
16130
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("section", { className: "space-y-3", children: [
16131
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
16132
- autoDiscount ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
16256
+ generalError ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
16257
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("section", { className: "space-y-3", children: [
16258
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
16259
+ autoDiscount ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
16133
16260
  "div",
16134
16261
  {
16135
16262
  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",
16136
16263
  "data-slot": "checkout-staff-discount",
16137
16264
  children: [
16138
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "font-semibold", children: t.staffDiscountApplied }),
16139
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(autoDiscount.amount, currencyCode, locale)) })
16265
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "font-semibold", children: t.staffDiscountApplied }),
16266
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(autoDiscount.amount, currencyCode, locale)) })
16140
16267
  ]
16141
16268
  }
16142
16269
  ) : null,
16143
- appliedDiscount && !autoDiscount ? /* @__PURE__ */ (0, import_jsx_runtime27.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: [
16144
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
16145
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "font-semibold", children: appliedDiscount.code }),
16146
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
16270
+ appliedDiscount && !autoDiscount ? /* @__PURE__ */ (0, import_jsx_runtime28.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: [
16271
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
16272
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "font-semibold", children: appliedDiscount.code }),
16273
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
16147
16274
  ] }),
16148
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
16275
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
16149
16276
  "button",
16150
16277
  {
16151
16278
  type: "button",
@@ -16155,9 +16282,9 @@ function CheckoutForm({
16155
16282
  children: t.removeDiscount
16156
16283
  }
16157
16284
  )
16158
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex gap-2", children: [
16159
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
16160
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
16285
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex gap-2", children: [
16286
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
16287
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
16161
16288
  "input",
16162
16289
  {
16163
16290
  id: "checkout-form-discount-code",
@@ -16169,7 +16296,7 @@ function CheckoutForm({
16169
16296
  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"
16170
16297
  }
16171
16298
  ),
16172
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
16299
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
16173
16300
  "button",
16174
16301
  {
16175
16302
  type: "button",
@@ -16180,14 +16307,14 @@ function CheckoutForm({
16180
16307
  }
16181
16308
  )
16182
16309
  ] }),
16183
- discountError && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-xs text-destructive", children: discountError })
16310
+ discountError && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-xs text-destructive", children: discountError })
16184
16311
  ] }),
16185
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
16312
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
16186
16313
  "button",
16187
16314
  {
16188
16315
  type: "submit",
16189
16316
  disabled: submitting || submitDisabled,
16190
- className: (0, import_utils23.cn)(
16317
+ className: (0, import_utils24.cn)(
16191
16318
  "flex w-full cursor-pointer items-center justify-center gap-2 rounded-xl px-4 py-3 font-semibold transition-all",
16192
16319
  submitting || submitDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
16193
16320
  ),
@@ -16201,11 +16328,11 @@ function CheckoutForm({
16201
16328
  }
16202
16329
 
16203
16330
  // src/components/order-confirmation.tsx
16204
- var import_utils25 = require("@reblu/site-ui/utils");
16331
+ var import_utils26 = require("@reblu/site-ui/utils");
16205
16332
 
16206
16333
  // src/components/order-invoice-link.tsx
16207
- var import_utils24 = require("@reblu/site-ui/utils");
16208
- var import_jsx_runtime28 = require("react/jsx-runtime");
16334
+ var import_utils25 = require("@reblu/site-ui/utils");
16335
+ var import_jsx_runtime29 = require("react/jsx-runtime");
16209
16336
  var DEFAULT_LABELS8 = {
16210
16337
  linkLabel: "Descargar la factura {number}",
16211
16338
  signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
@@ -16213,8 +16340,8 @@ var DEFAULT_LABELS8 = {
16213
16340
  function OrderInvoiceLink({ invoice, labels, className }) {
16214
16341
  if (!invoice) return null;
16215
16342
  const t = { ...DEFAULT_LABELS8, ...labels };
16216
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: (0, import_utils24.cn)("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
16217
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
16343
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: (0, import_utils25.cn)("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
16344
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
16218
16345
  "a",
16219
16346
  {
16220
16347
  href: invoice.url,
@@ -16222,12 +16349,12 @@ function OrderInvoiceLink({ invoice, labels, className }) {
16222
16349
  children: t.linkLabel.replace("{number}", invoice.number)
16223
16350
  }
16224
16351
  ),
16225
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-muted-foreground", children: t.signInHint })
16352
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-muted-foreground", children: t.signInHint })
16226
16353
  ] });
16227
16354
  }
16228
16355
 
16229
16356
  // src/components/order-confirmation.tsx
16230
- var import_jsx_runtime29 = require("react/jsx-runtime");
16357
+ var import_jsx_runtime30 = require("react/jsx-runtime");
16231
16358
  var DEFAULT_LABELS9 = {
16232
16359
  pollingTitle: "Confirmando tu pedido\u2026",
16233
16360
  pollingDescription: "Estamos procesando el pago, un momento\u2026",
@@ -16274,6 +16401,7 @@ function OrderConfirmation({
16274
16401
  sessionId,
16275
16402
  cartHref,
16276
16403
  onRecheck,
16404
+ showPurchaseTexts = true,
16277
16405
  labels,
16278
16406
  currencyCode,
16279
16407
  locale,
@@ -16301,43 +16429,60 @@ function OrderConfirmation({
16301
16429
  const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
16302
16430
  const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
16303
16431
  const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
16304
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: (0, import_utils25.cn)("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
16305
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("h1", { className: "text-3xl font-bold", children: title }),
16306
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-lg text-muted-foreground", children: description }),
16307
- showFullOrderSummary && order && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "space-y-6", children: [
16308
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
16309
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
16310
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
16432
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: (0, import_utils26.cn)("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
16433
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h1", { className: "text-3xl font-bold", children: title }),
16434
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-lg text-muted-foreground", children: description }),
16435
+ showFullOrderSummary && order && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "space-y-6", children: [
16436
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
16437
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
16438
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
16311
16439
  ] }),
16312
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
16313
- order.items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
16440
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
16441
+ order.items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
16314
16442
  "div",
16315
16443
  {
16316
16444
  className: "flex justify-between gap-4 text-sm",
16317
16445
  children: [
16318
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
16446
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
16319
16447
  item.product.name,
16320
16448
  item.variant ? ` (${item.variant.name})` : "",
16321
16449
  " x",
16322
16450
  item.quantity
16323
16451
  ] }),
16324
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: formatPrice(item.total, currencyCode, locale) })
16452
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: formatPrice(item.total, currencyCode, locale) })
16325
16453
  ]
16326
16454
  },
16327
16455
  idx
16328
16456
  )),
16329
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
16330
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: t.totalLabel }),
16331
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: formatPrice(order.total, currencyCode, locale) })
16457
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
16458
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: t.totalLabel }),
16459
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: formatPrice(order.total, currencyCode, locale) })
16332
16460
  ] }) })
16333
16461
  ] }),
16334
- t.foundDescription.includes("{email}") ? null : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
16462
+ showPurchaseTexts && order.purchaseTexts?.length ? /* @__PURE__ */ (0, import_jsx_runtime30.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_runtime30.jsxs)(
16463
+ "div",
16464
+ {
16465
+ className: "rounded-xl border border-border bg-card p-4",
16466
+ "data-slot": "order-confirmation-purchase-text",
16467
+ "data-kind": entry.kind,
16468
+ children: [
16469
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: entry.label }),
16470
+ entry.place ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("address", { className: "mb-2 text-sm not-italic", "data-slot": "order-confirmation-pickup-place", children: [
16471
+ entry.place.name ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "block font-medium", children: entry.place.name }) : null,
16472
+ entry.place.address.map((line) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "block", children: line }, line))
16473
+ ] }) : null,
16474
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "whitespace-pre-line text-sm", children: entry.text })
16475
+ ]
16476
+ },
16477
+ entry.kind
16478
+ )) }) : null,
16479
+ t.foundDescription.includes("{email}") ? null : /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
16335
16480
  t.confirmationEmailPrefix,
16336
16481
  " ",
16337
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "font-medium text-foreground", children: order.customerEmail }),
16482
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "font-medium text-foreground", children: order.customerEmail }),
16338
16483
  "."
16339
16484
  ] }),
16340
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
16485
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16341
16486
  OrderInvoiceLink,
16342
16487
  {
16343
16488
  invoice: order.invoice,
@@ -16345,11 +16490,11 @@ function OrderConfirmation({
16345
16490
  }
16346
16491
  )
16347
16492
  ] }),
16348
- showOrderReference && order && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
16349
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
16350
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
16493
+ showOrderReference && order && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
16494
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
16495
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
16351
16496
  ] }),
16352
- status === "failed" && cartHref && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
16497
+ status === "failed" && cartHref && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16353
16498
  "a",
16354
16499
  {
16355
16500
  href: cartHref,
@@ -16357,7 +16502,7 @@ function OrderConfirmation({
16357
16502
  children: t.backToCartLabel
16358
16503
  }
16359
16504
  ),
16360
- showRecheck && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
16505
+ showRecheck && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16361
16506
  "button",
16362
16507
  {
16363
16508
  type: "button",
@@ -16366,16 +16511,16 @@ function OrderConfirmation({
16366
16511
  children: t.recheckLabel
16367
16512
  }
16368
16513
  ),
16369
- showSessionReference && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
16370
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
16371
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
16514
+ showSessionReference && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
16515
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
16516
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
16372
16517
  ] })
16373
16518
  ] });
16374
16519
  }
16375
16520
 
16376
16521
  // src/components/full-invoice-fields.tsx
16377
- var import_utils26 = require("@reblu/site-ui/utils");
16378
- var import_jsx_runtime30 = require("react/jsx-runtime");
16522
+ var import_utils27 = require("@reblu/site-ui/utils");
16523
+ var import_jsx_runtime31 = require("react/jsx-runtime");
16379
16524
  var EMPTY_FULL_INVOICE_VALUE = {
16380
16525
  wantsFullInvoice: false,
16381
16526
  billingIdType: "NIF",
@@ -16492,12 +16637,12 @@ function FullInvoiceFields({
16492
16637
  const showFields = value.wantsFullInvoice || overCap;
16493
16638
  const isSpanishNif = value.billingIdType === "NIF";
16494
16639
  const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
16495
- const error = (key2) => errors[key2] ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
16640
+ const error = (key2) => errors[key2] ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
16496
16641
  const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
16497
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("section", { className: (0, import_utils26.cn)("space-y-4", className), "data-slot": "full-invoice-fields", children: [
16498
- overCap ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "space-y-1", children: [
16499
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
16500
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16642
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("section", { className: (0, import_utils27.cn)("space-y-4", className), "data-slot": "full-invoice-fields", children: [
16643
+ overCap ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "space-y-1", children: [
16644
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
16645
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16501
16646
  "input",
16502
16647
  {
16503
16648
  type: "checkbox",
@@ -16507,12 +16652,12 @@ function FullInvoiceFields({
16507
16652
  ),
16508
16653
  t.toggle
16509
16654
  ] }),
16510
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
16655
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
16511
16656
  ] }),
16512
- showFields && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
16513
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "space-y-1", children: [
16514
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
16515
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16657
+ showFields && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
16658
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "space-y-1", children: [
16659
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
16660
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16516
16661
  "select",
16517
16662
  {
16518
16663
  id: "full-invoice-id-type",
@@ -16521,14 +16666,14 @@ function FullInvoiceFields({
16521
16666
  value: value.billingIdType,
16522
16667
  onChange: (e) => set("billingIdType", e.target.value),
16523
16668
  ...invalid2("billingIdType"),
16524
- children: ID_TYPES.map((type) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("option", { value: type, children: t.idTypeOptions[type] }, type))
16669
+ children: ID_TYPES.map((type) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("option", { value: type, children: t.idTypeOptions[type] }, type))
16525
16670
  }
16526
16671
  ),
16527
16672
  error("billingIdType")
16528
16673
  ] }),
16529
- !isSpanishNif && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "space-y-1", children: [
16530
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
16531
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
16674
+ !isSpanishNif && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "space-y-1", children: [
16675
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
16676
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
16532
16677
  "select",
16533
16678
  {
16534
16679
  id: "full-invoice-id-country",
@@ -16538,16 +16683,16 @@ function FullInvoiceFields({
16538
16683
  onChange: (e) => set("billingIdCountry", e.target.value),
16539
16684
  ...invalid2("billingIdCountry"),
16540
16685
  children: [
16541
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("option", { value: "", disabled: true, children: t.chooseCountry }),
16542
- countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("option", { value: c.code, children: c.name }, c.code))
16686
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("option", { value: "", disabled: true, children: t.chooseCountry }),
16687
+ countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("option", { value: c.code, children: c.name }, c.code))
16543
16688
  ]
16544
16689
  }
16545
16690
  ),
16546
16691
  error("billingIdCountry")
16547
16692
  ] }),
16548
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "space-y-1", children: [
16549
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
16550
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16693
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "space-y-1", children: [
16694
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
16695
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16551
16696
  "input",
16552
16697
  {
16553
16698
  id: "full-invoice-nif",
@@ -16560,9 +16705,9 @@ function FullInvoiceFields({
16560
16705
  ),
16561
16706
  error("billingNif")
16562
16707
  ] }),
16563
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "space-y-1", children: [
16564
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
16565
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16708
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "space-y-1", children: [
16709
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
16710
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16566
16711
  "input",
16567
16712
  {
16568
16713
  id: "full-invoice-name",
@@ -16575,9 +16720,9 @@ function FullInvoiceFields({
16575
16720
  ),
16576
16721
  error("billingName")
16577
16722
  ] }),
16578
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "space-y-1 sm:col-span-2", children: [
16579
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
16580
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16723
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "space-y-1 sm:col-span-2", children: [
16724
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
16725
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16581
16726
  "input",
16582
16727
  {
16583
16728
  id: "full-invoice-street",
@@ -16589,9 +16734,9 @@ function FullInvoiceFields({
16589
16734
  }
16590
16735
  )
16591
16736
  ] }),
16592
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "space-y-1", children: [
16593
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
16594
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16737
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "space-y-1", children: [
16738
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
16739
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16595
16740
  "input",
16596
16741
  {
16597
16742
  id: "full-invoice-postal-code",
@@ -16602,9 +16747,9 @@ function FullInvoiceFields({
16602
16747
  }
16603
16748
  )
16604
16749
  ] }),
16605
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "space-y-1", children: [
16606
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
16607
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16750
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "space-y-1", children: [
16751
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
16752
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16608
16753
  "input",
16609
16754
  {
16610
16755
  id: "full-invoice-city",
@@ -16615,9 +16760,9 @@ function FullInvoiceFields({
16615
16760
  }
16616
16761
  )
16617
16762
  ] }),
16618
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "space-y-1", children: [
16619
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
16620
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16763
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "space-y-1", children: [
16764
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
16765
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16621
16766
  "select",
16622
16767
  {
16623
16768
  id: "full-invoice-country",
@@ -16625,18 +16770,18 @@ function FullInvoiceFields({
16625
16770
  required: true,
16626
16771
  value: value.country,
16627
16772
  onChange: (e) => set("country", e.target.value),
16628
- children: countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("option", { value: c.code, children: c.name }, c.code))
16773
+ children: countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("option", { value: c.code, children: c.name }, c.code))
16629
16774
  }
16630
16775
  )
16631
16776
  ] }),
16632
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "sm:col-span-2", children: error("address") })
16777
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "sm:col-span-2", children: error("address") })
16633
16778
  ] })
16634
16779
  ] });
16635
16780
  }
16636
16781
 
16637
16782
  // src/components/checkout-delivery-choice.tsx
16638
- var import_utils27 = require("@reblu/site-ui/utils");
16639
- var import_jsx_runtime31 = require("react/jsx-runtime");
16783
+ var import_utils28 = require("@reblu/site-ui/utils");
16784
+ var import_jsx_runtime32 = require("react/jsx-runtime");
16640
16785
  var EMPTY_CHECKOUT_ADDRESS = {
16641
16786
  firstName: "",
16642
16787
  lastName: "",
@@ -16699,17 +16844,17 @@ function CheckoutDeliveryChoice({
16699
16844
  const isPickup = value?.type === "PICKUP";
16700
16845
  const isShipping = value?.type === "SHIPPING";
16701
16846
  const errorId = `${uid}-delivery-error`;
16702
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
16847
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
16703
16848
  "fieldset",
16704
16849
  {
16705
16850
  "data-slot": "checkout-delivery",
16706
16851
  "aria-describedby": error ? errorId : void 0,
16707
- className: (0, import_utils27.cn)("space-y-4", className),
16852
+ className: (0, import_utils28.cn)("space-y-4", className),
16708
16853
  children: [
16709
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("legend", { className: "mb-2 text-lg font-semibold", children: t.legend }),
16710
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "grid gap-3 sm:grid-cols-2", children: [
16711
- homeDelivery ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("label", { className: "flex cursor-pointer items-start gap-3 rounded-xl border border-border p-4 has-[:checked]:border-primary", children: [
16712
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16854
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("legend", { className: "mb-2 text-lg font-semibold", children: t.legend }),
16855
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "grid gap-3 sm:grid-cols-2", children: [
16856
+ homeDelivery ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { className: "flex cursor-pointer items-start gap-3 rounded-xl border border-border p-4 has-[:checked]:border-primary", children: [
16857
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
16713
16858
  "input",
16714
16859
  {
16715
16860
  type: "radio",
@@ -16719,16 +16864,16 @@ function CheckoutDeliveryChoice({
16719
16864
  className: "mt-0.5 size-4 accent-primary"
16720
16865
  }
16721
16866
  ),
16722
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "flex-1 space-y-1", children: [
16723
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "flex justify-between gap-2 font-medium", children: [
16724
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: copy.shippingOptionLabel }),
16725
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "tabular-nums", children: homeCost })
16867
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "flex-1 space-y-1", children: [
16868
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "flex justify-between gap-2 font-medium", children: [
16869
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: copy.shippingOptionLabel }),
16870
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "tabular-nums", children: homeCost })
16726
16871
  ] }),
16727
- delivery.estimatedDeliveryText ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "block text-sm text-muted-foreground", children: delivery.estimatedDeliveryText }) : null
16872
+ delivery.estimatedDeliveryText ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "block text-sm text-muted-foreground", children: delivery.estimatedDeliveryText }) : null
16728
16873
  ] })
16729
16874
  ] }) : null,
16730
- pickup ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("label", { className: "flex cursor-pointer items-start gap-3 rounded-xl border border-border p-4 has-[:checked]:border-primary", children: [
16731
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16875
+ pickup ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { className: "flex cursor-pointer items-start gap-3 rounded-xl border border-border p-4 has-[:checked]:border-primary", children: [
16876
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
16732
16877
  "input",
16733
16878
  {
16734
16879
  type: "radio",
@@ -16738,23 +16883,23 @@ function CheckoutDeliveryChoice({
16738
16883
  className: "mt-0.5 size-4 accent-primary"
16739
16884
  }
16740
16885
  ),
16741
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "flex flex-1 justify-between gap-2 font-medium", children: [
16742
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: copy.pickupOptionLabel }),
16743
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: t.free })
16886
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "flex flex-1 justify-between gap-2 font-medium", children: [
16887
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: copy.pickupOptionLabel }),
16888
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: t.free })
16744
16889
  ] })
16745
16890
  ] }) : null
16746
16891
  ] }),
16747
- error ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { id: errorId, role: "alert", className: "text-sm text-destructive", children: error }) : null,
16748
- isPickup ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { role: "radiogroup", "aria-labelledby": `${uid}-points`, className: "space-y-2", children: [
16749
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { id: `${uid}-points`, className: "text-sm font-medium", children: t.pickupPointsLegend }),
16892
+ error ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { id: errorId, role: "alert", className: "text-sm text-destructive", children: error }) : null,
16893
+ isPickup ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { role: "radiogroup", "aria-labelledby": `${uid}-points`, className: "space-y-2", children: [
16894
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { id: `${uid}-points`, className: "text-sm font-medium", children: t.pickupPointsLegend }),
16750
16895
  delivery.pickupLocations.map((location2) => {
16751
16896
  const descId = `${uid}-point-${location2.id}`;
16752
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
16897
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
16753
16898
  "label",
16754
16899
  {
16755
16900
  className: "flex cursor-pointer items-start gap-3 rounded-lg border border-border p-3 has-[:checked]:border-primary",
16756
16901
  children: [
16757
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16902
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
16758
16903
  "input",
16759
16904
  {
16760
16905
  type: "radio",
@@ -16765,9 +16910,9 @@ function CheckoutDeliveryChoice({
16765
16910
  className: "mt-0.5 size-4 accent-primary"
16766
16911
  }
16767
16912
  ),
16768
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "space-y-0.5 text-sm", children: [
16769
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "block font-medium", children: location2.name }),
16770
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { id: descId, className: "block text-muted-foreground", children: pickupDescription(location2) })
16913
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "space-y-0.5 text-sm", children: [
16914
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "block font-medium", children: location2.name }),
16915
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { id: descId, className: "block text-muted-foreground", children: pickupDescription(location2) })
16771
16916
  ] })
16772
16917
  ]
16773
16918
  },
@@ -16775,14 +16920,14 @@ function CheckoutDeliveryChoice({
16775
16920
  );
16776
16921
  })
16777
16922
  ] }) : null,
16778
- isShipping ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("fieldset", { className: "space-y-3", children: [
16779
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("legend", { className: "mb-2 text-sm font-medium", children: t.addressLegend }),
16780
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: ADDRESS_FIELDS.map(({ key: key2, autoComplete, required, wide }) => {
16923
+ isShipping ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("fieldset", { className: "space-y-3", children: [
16924
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("legend", { className: "mb-2 text-sm font-medium", children: t.addressLegend }),
16925
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: ADDRESS_FIELDS.map(({ key: key2, autoComplete, required, wide }) => {
16781
16926
  const fieldId = `${uid}-${key2}`;
16782
16927
  const fieldError = addressErrors?.[key2];
16783
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: (0, import_utils27.cn)("space-y-1", wide && "sm:col-span-2"), children: [
16784
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("label", { htmlFor: fieldId, className: "text-sm font-medium", children: t[key2] }),
16785
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16928
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: (0, import_utils28.cn)("space-y-1", wide && "sm:col-span-2"), children: [
16929
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("label", { htmlFor: fieldId, className: "text-sm font-medium", children: t[key2] }),
16930
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
16786
16931
  "input",
16787
16932
  {
16788
16933
  id: fieldId,
@@ -16793,13 +16938,13 @@ function CheckoutDeliveryChoice({
16793
16938
  onChange: (e) => onAddressChange({ ...address, [key2]: e.target.value }),
16794
16939
  "aria-invalid": fieldError ? true : void 0,
16795
16940
  "aria-describedby": fieldError ? `${fieldId}-error` : void 0,
16796
- className: (0, import_utils27.cn)(
16941
+ className: (0, import_utils28.cn)(
16797
16942
  INPUT_CLASS,
16798
16943
  fieldError ? "border-destructive" : "border-border focus:border-primary"
16799
16944
  )
16800
16945
  }
16801
16946
  ),
16802
- fieldError ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { id: `${fieldId}-error`, className: "text-sm text-destructive", children: fieldError }) : null
16947
+ fieldError ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { id: `${fieldId}-error`, className: "text-sm text-destructive", children: fieldError }) : null
16803
16948
  ] }, key2);
16804
16949
  }) })
16805
16950
  ] }) : null
@@ -16841,8 +16986,8 @@ function toCheckoutFulfillmentFields(value, address, requiresDelivery = true) {
16841
16986
  }
16842
16987
 
16843
16988
  // src/components/checkout-quote-summary.tsx
16844
- var import_utils28 = require("@reblu/site-ui/utils");
16845
- var import_jsx_runtime32 = require("react/jsx-runtime");
16989
+ var import_utils29 = require("@reblu/site-ui/utils");
16990
+ var import_jsx_runtime33 = require("react/jsx-runtime");
16846
16991
  var DEFAULT_CHECKOUT_QUOTE_SUMMARY_LABELS = {
16847
16992
  subtotal: "Subtotal",
16848
16993
  discount: (codeOrLabel, isAutomatic) => isAutomatic ? codeOrLabel : `Descuento (${codeOrLabel})`,
@@ -16859,9 +17004,9 @@ function Row({
16859
17004
  value,
16860
17005
  className
16861
17006
  }) {
16862
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { "data-slot": "checkout-quote-row", className: (0, import_utils28.cn)("flex justify-between gap-4", className), children: [
16863
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("dt", { children: name }),
16864
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("dd", { className: "shrink-0 tabular-nums", children: value })
17007
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { "data-slot": "checkout-quote-row", className: (0, import_utils29.cn)("flex justify-between gap-4", className), children: [
17008
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("dt", { children: name }),
17009
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("dd", { className: "shrink-0 tabular-nums", children: value })
16865
17010
  ] });
16866
17011
  }
16867
17012
  function CheckoutQuoteSummary({
@@ -16877,22 +17022,22 @@ function CheckoutQuoteSummary({
16877
17022
  const price = (cents) => formatPrice(cents, currencyCode, locale);
16878
17023
  const { fulfillment, shipping, tax, discount } = quote;
16879
17024
  const Tag = `h${headingLevel}`;
16880
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("section", { "data-slot": "checkout-quote-summary", className: slotClassName("space-y-4", "", className), children: [
16881
- heading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Tag, { className: "text-lg font-semibold", children: heading }) : null,
16882
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("ul", { className: "space-y-3 text-sm", children: quote.lines.map((line) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("li", { className: "flex justify-between gap-4", children: [
16883
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "min-w-0 space-y-0.5", children: [
16884
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "font-medium", children: line.name }),
16885
- line.variantName ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-muted-foreground", children: line.variantName }) : null,
16886
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("p", { className: "flex flex-wrap items-center gap-2 text-muted-foreground", children: [
16887
- line.kindLabel ? /* @__PURE__ */ (0, import_jsx_runtime32.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,
16888
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: t.quantityTimesUnit(line.quantity, price(line.unitPrice)) })
17025
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("section", { "data-slot": "checkout-quote-summary", className: slotClassName("space-y-4", "", className), children: [
17026
+ heading ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Tag, { className: "text-lg font-semibold", children: heading }) : null,
17027
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("ul", { className: "space-y-3 text-sm", children: quote.lines.map((line) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("li", { className: "flex justify-between gap-4", children: [
17028
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "min-w-0 space-y-0.5", children: [
17029
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "font-medium", children: line.name }),
17030
+ line.variantName ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-muted-foreground", children: line.variantName }) : null,
17031
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("p", { className: "flex flex-wrap items-center gap-2 text-muted-foreground", children: [
17032
+ line.kindLabel ? /* @__PURE__ */ (0, import_jsx_runtime33.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,
17033
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: t.quantityTimesUnit(line.quantity, price(line.unitPrice)) })
16889
17034
  ] })
16890
17035
  ] }),
16891
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "shrink-0 tabular-nums", children: price(line.total) })
17036
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "shrink-0 tabular-nums", children: price(line.total) })
16892
17037
  ] }, `${line.productId}-${line.variantId ?? ""}`)) }),
16893
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("dl", { className: "space-y-2 border-t border-border pt-3 text-sm", children: [
16894
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Row, { name: t.subtotal, value: price(quote.subtotal) }),
16895
- discount && discount.amount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
17038
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("dl", { className: "space-y-2 border-t border-border pt-3 text-sm", children: [
17039
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Row, { name: t.subtotal, value: price(quote.subtotal) }),
17040
+ discount && discount.amount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
16896
17041
  Row,
16897
17042
  {
16898
17043
  className: "text-green-700 dark:text-green-400",
@@ -16900,17 +17045,17 @@ function CheckoutQuoteSummary({
16900
17045
  value: `\u2212${price(discount.amount)}`
16901
17046
  }
16902
17047
  ) : null,
16903
- fulfillment.type ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
17048
+ fulfillment.type ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
16904
17049
  Row,
16905
17050
  {
16906
- name: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
17051
+ name: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
16907
17052
  fulfillment.label ?? t.delivery,
16908
- fulfillment.type === "PICKUP" && fulfillment.pickupLocation ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "block text-muted-foreground", children: fulfillment.pickupLocation.name }) : null
17053
+ fulfillment.type === "PICKUP" && fulfillment.pickupLocation ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "block text-muted-foreground", children: fulfillment.pickupLocation.name }) : null
16909
17054
  ] }),
16910
17055
  value: fulfillment.type === "PICKUP" || shipping.isFree ? t.free : price(shipping.cost)
16911
17056
  }
16912
17057
  ) : null,
16913
- tax.isLineVisible ? tax.breakdown.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
17058
+ tax.isLineVisible ? tax.breakdown.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
16914
17059
  Row,
16915
17060
  {
16916
17061
  className: tax.isIncluded ? "text-muted-foreground" : void 0,
@@ -16919,13 +17064,13 @@ function CheckoutQuoteSummary({
16919
17064
  },
16920
17065
  entry.label
16921
17066
  )) : null,
16922
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Row, { className: "border-t border-border pt-2 text-base font-bold", name: t.total, value: price(quote.total) })
17067
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Row, { className: "border-t border-border pt-2 text-base font-bold", name: t.total, value: price(quote.total) })
16923
17068
  ] }),
16924
- tax.isIncluded ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-sm text-muted-foreground", children: t.taxesIncludedNote }) : null,
16925
- fulfillment.type === "SHIPPING" && !shipping.isFree && shipping.remainingForFree ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-sm text-muted-foreground", children: t.remainingForFree(price(shipping.remainingForFree)) }) : null,
16926
- fulfillment.type && quote.deliveryEstimateText ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { "data-slot": "checkout-quote-estimate", className: "text-sm text-muted-foreground", children: quote.deliveryEstimateText }) : null,
16927
- quote.discountError ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { role: "status", className: "text-sm text-destructive", children: quote.discountError.message }) : null,
16928
- quote.blockingReason ? /* @__PURE__ */ (0, import_jsx_runtime32.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
17069
+ tax.isIncluded ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-sm text-muted-foreground", children: t.taxesIncludedNote }) : null,
17070
+ fulfillment.type === "SHIPPING" && !shipping.isFree && shipping.remainingForFree ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-sm text-muted-foreground", children: t.remainingForFree(price(shipping.remainingForFree)) }) : null,
17071
+ fulfillment.type && quote.deliveryEstimateText ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { "data-slot": "checkout-quote-estimate", className: "text-sm text-muted-foreground", children: quote.deliveryEstimateText }) : null,
17072
+ quote.discountError ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { role: "status", className: "text-sm text-destructive", children: quote.discountError.message }) : null,
17073
+ quote.blockingReason ? /* @__PURE__ */ (0, import_jsx_runtime33.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
16929
17074
  ] });
16930
17075
  }
16931
17076
  var DEFAULT_CHECKOUT_QUOTE_NOTICE_LABELS = {
@@ -16943,7 +17088,7 @@ function checkoutQuoteNotice({
16943
17088
  function CheckoutQuoteNotice({ reason, labels, className }) {
16944
17089
  if (!reason) return null;
16945
17090
  const t = { ...DEFAULT_CHECKOUT_QUOTE_NOTICE_LABELS, ...labels };
16946
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
17091
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
16947
17092
  "p",
16948
17093
  {
16949
17094
  role: "status",
@@ -16955,8 +17100,8 @@ function CheckoutQuoteNotice({ reason, labels, className }) {
16955
17100
  }
16956
17101
 
16957
17102
  // src/components/checkout-terms-acceptance.tsx
16958
- var import_utils29 = require("@reblu/site-ui/utils");
16959
- var import_jsx_runtime33 = require("react/jsx-runtime");
17103
+ var import_utils30 = require("@reblu/site-ui/utils");
17104
+ var import_jsx_runtime34 = require("react/jsx-runtime");
16960
17105
  function splitTermsLabel(label) {
16961
17106
  const at = label.indexOf("{terms}");
16962
17107
  return at === -1 ? [`${label} `, ""] : [label.slice(0, at), label.slice(at + "{terms}".length)];
@@ -16978,9 +17123,9 @@ function CheckoutTermsAcceptance({
16978
17123
  (part) => part.replaceAll("{tenant}", copy.tenantName)
16979
17124
  );
16980
17125
  const newTab = copy.isTermsLinkNewTab;
16981
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { "data-slot": "checkout-terms", className: (0, import_utils29.cn)("space-y-1", className), children: [
16982
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-start gap-3", children: [
16983
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
17126
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { "data-slot": "checkout-terms", className: (0, import_utils30.cn)("space-y-1", className), children: [
17127
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-start gap-3", children: [
17128
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
16984
17129
  "input",
16985
17130
  {
16986
17131
  id: boxId,
@@ -16993,9 +17138,9 @@ function CheckoutTermsAcceptance({
16993
17138
  className: "mt-0.5 size-5 shrink-0 cursor-pointer accent-primary"
16994
17139
  }
16995
17140
  ),
16996
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { htmlFor: boxId, className: "text-sm leading-relaxed", children: [
17141
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("label", { htmlFor: boxId, className: "text-sm leading-relaxed", children: [
16997
17142
  before,
16998
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
17143
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
16999
17144
  "a",
17000
17145
  {
17001
17146
  href: copy.termsLinkUrl ?? termsHref,
@@ -17003,9 +17148,9 @@ function CheckoutTermsAcceptance({
17003
17148
  className: "font-medium underline underline-offset-2 hover:text-primary",
17004
17149
  children: [
17005
17150
  copy.termsLinkText,
17006
- newTab ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
17151
+ newTab ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
17007
17152
  " ",
17008
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "sr-only", children: newTabHint })
17153
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "sr-only", children: newTabHint })
17009
17154
  ] }) : null
17010
17155
  ]
17011
17156
  }
@@ -17013,7 +17158,7 @@ function CheckoutTermsAcceptance({
17013
17158
  after
17014
17159
  ] })
17015
17160
  ] }),
17016
- error ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { id: errorId, className: "pl-8 text-sm text-destructive", children: error }) : null
17161
+ error ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { id: errorId, className: "pl-8 text-sm text-destructive", children: error }) : null
17017
17162
  ] });
17018
17163
  }
17019
17164
  function toCheckoutTermsFields(copy, accepted) {
@@ -17022,8 +17167,8 @@ function toCheckoutTermsFields(copy, accepted) {
17022
17167
  }
17023
17168
 
17024
17169
  // src/components/checkout-pay-action.tsx
17025
- var import_utils30 = require("@reblu/site-ui/utils");
17026
- var import_jsx_runtime34 = require("react/jsx-runtime");
17170
+ var import_utils31 = require("@reblu/site-ui/utils");
17171
+ var import_jsx_runtime35 = require("react/jsx-runtime");
17027
17172
  function CheckoutPayAction({
17028
17173
  label,
17029
17174
  notice,
@@ -17037,22 +17182,22 @@ function CheckoutPayAction({
17037
17182
  }) {
17038
17183
  const noticeId = `${id}-notice`;
17039
17184
  const isDisabled = submitting || disabled;
17040
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { "data-slot": "checkout-pay-action", className: (0, import_utils30.cn)("space-y-3", className), children: [
17041
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
17185
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { "data-slot": "checkout-pay-action", className: (0, import_utils31.cn)("space-y-3", className), children: [
17186
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
17042
17187
  "button",
17043
17188
  {
17044
17189
  type: "submit",
17045
17190
  disabled: isDisabled,
17046
17191
  "aria-busy": submitting || void 0,
17047
17192
  "aria-describedby": notice ? noticeId : void 0,
17048
- className: buttonClassName ?? (0, import_utils30.cn)(
17193
+ className: buttonClassName ?? (0, import_utils31.cn)(
17049
17194
  "flex w-full items-center justify-center gap-2 rounded-xl px-4 py-3 text-base font-semibold transition-all",
17050
17195
  isDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "cursor-pointer bg-primary text-primary-foreground hover:bg-primary/90"
17051
17196
  ),
17052
17197
  children: submitting ? submittingLabel : label
17053
17198
  }
17054
17199
  ),
17055
- notice ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { id: noticeId, "data-slot": "checkout-pay-notice", className: noticeClassName ?? "text-sm text-muted-foreground", children: notice }) : null
17200
+ notice ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { id: noticeId, "data-slot": "checkout-pay-notice", className: noticeClassName ?? "text-sm text-muted-foreground", children: notice }) : null
17056
17201
  ] });
17057
17202
  }
17058
17203
 
@@ -17079,8 +17224,8 @@ function toAcademyCheckoutInvoiceFields(value, overCap, issuesInvoices = true) {
17079
17224
  }
17080
17225
 
17081
17226
  // src/components/contact-interest-field.tsx
17082
- var import_utils31 = require("@reblu/site-ui/utils");
17083
- var import_jsx_runtime35 = require("react/jsx-runtime");
17227
+ var import_utils32 = require("@reblu/site-ui/utils");
17228
+ var import_jsx_runtime36 = require("react/jsx-runtime");
17084
17229
  function ContactInterestField({
17085
17230
  interest,
17086
17231
  value,
@@ -17097,18 +17242,18 @@ function ContactInterestField({
17097
17242
  else next2.delete(option2);
17098
17243
  onChange(interest.options.filter((candidate) => next2.has(candidate)));
17099
17244
  };
17100
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("fieldset", { "data-slot": "contact-interest", className: (0, import_utils31.cn)("space-y-2", className), children: [
17101
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("legend", { className: "text-sm font-medium", children: interest.label }),
17102
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-col gap-2", children: interest.options.map((option2, index) => {
17245
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("fieldset", { "data-slot": "contact-interest", className: (0, import_utils32.cn)("space-y-2", className), children: [
17246
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("legend", { className: "text-sm font-medium", children: interest.label }),
17247
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex flex-col gap-2", children: interest.options.map((option2, index) => {
17103
17248
  const id = `${idPrefix}-${index}`;
17104
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
17249
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
17105
17250
  "label",
17106
17251
  {
17107
17252
  htmlFor: id,
17108
17253
  "data-slot": "contact-interest-option",
17109
17254
  className: "flex items-center gap-2 text-sm",
17110
17255
  children: [
17111
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
17256
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
17112
17257
  "input",
17113
17258
  {
17114
17259
  id,
@@ -17187,6 +17332,7 @@ var import_site_contracts = require("@reblu/site-contracts");
17187
17332
  ProductTrustItems,
17188
17333
  ProfessionalFields,
17189
17334
  ProfileCard,
17335
+ Reviews,
17190
17336
  SafeHtml,
17191
17337
  ShopFilters,
17192
17338
  Specialty,