@reblu/site-blocks 0.30.0 → 0.32.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.js CHANGED
@@ -14503,41 +14503,503 @@ function ArbitrationBadge({
14503
14503
  );
14504
14504
  }
14505
14505
 
14506
- // src/components/page-blocks.tsx
14506
+ // src/components/reviews.tsx
14507
14507
  import { cn as cn12 } from "@reblu/site-ui/utils";
14508
+ import { Fragment as Fragment4, jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
14509
+ function isHttps(value) {
14510
+ if (typeof value !== "string") return false;
14511
+ try {
14512
+ const url = new URL(value);
14513
+ return url.protocol === "https:" && url.hostname !== "";
14514
+ } catch {
14515
+ return false;
14516
+ }
14517
+ }
14518
+ function isUsable2(value) {
14519
+ if (typeof value !== "object" || value === null) return false;
14520
+ const review = value;
14521
+ 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);
14522
+ }
14523
+ function formatDay(day, locale) {
14524
+ if (!/^\d{4}-\d{2}-\d{2}$/.test(day)) return null;
14525
+ const date = /* @__PURE__ */ new Date(`${day}T00:00:00.000Z`);
14526
+ if (Number.isNaN(date.getTime())) return null;
14527
+ return new Intl.DateTimeFormat(locale, { dateStyle: "long", timeZone: "UTC" }).format(date);
14528
+ }
14529
+ 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";
14530
+ function Stars({ rating }) {
14531
+ return /* @__PURE__ */ jsx18("div", { role: "img", "aria-label": `${rating} de 5 estrellas`, className: "flex gap-0.5", children: [1, 2, 3, 4, 5].map((n) => /* @__PURE__ */ jsx18(
14532
+ "svg",
14533
+ {
14534
+ "aria-hidden": "true",
14535
+ viewBox: "0 0 24 24",
14536
+ width: "16",
14537
+ height: "16",
14538
+ "data-filled": n <= rating ? "true" : "false",
14539
+ className: n <= rating ? "fill-current" : "fill-none opacity-40",
14540
+ stroke: "currentColor",
14541
+ strokeWidth: "1.5",
14542
+ strokeLinejoin: "round",
14543
+ children: /* @__PURE__ */ jsx18("path", { d: STAR_PATH })
14544
+ },
14545
+ n
14546
+ )) });
14547
+ }
14548
+ function Reviews({
14549
+ reviews,
14550
+ heading,
14551
+ headingId = "reviews-heading",
14552
+ headingLevel = 2,
14553
+ notice,
14554
+ noticePosition = "below",
14555
+ linkLabel = (name) => `Ver en ${name}`,
14556
+ newWindowLabel = "(se abre en una pesta\xF1a nueva)",
14557
+ locale = "es-ES",
14558
+ className,
14559
+ headingClassName,
14560
+ gridClassName,
14561
+ cardClassName,
14562
+ noticeClassName
14563
+ }) {
14564
+ if (!Array.isArray(reviews) || reviews.length === 0) return null;
14565
+ const usable = reviews.filter(isUsable2);
14566
+ if (usable.length === 0) return null;
14567
+ const hasNotice = notice !== void 0 && notice !== null && notice !== "";
14568
+ const noticeNode = hasNotice ? /* @__PURE__ */ jsx18(
14569
+ "p",
14570
+ {
14571
+ "data-slot": "reviews-notice",
14572
+ className: slotClassName("", "text-sm text-muted-foreground", noticeClassName),
14573
+ children: notice
14574
+ }
14575
+ ) : null;
14576
+ const grid = /* @__PURE__ */ jsx18(
14577
+ "ul",
14578
+ {
14579
+ "data-slot": "reviews-grid",
14580
+ className: slotClassName("grid gap-6", "sm:grid-cols-2 lg:grid-cols-3", gridClassName),
14581
+ children: usable.map((review) => {
14582
+ const date = formatDay(review.reviewDate, locale);
14583
+ return /* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsxs17(
14584
+ "article",
14585
+ {
14586
+ "data-slot": "review",
14587
+ "data-source": review.source,
14588
+ className: cn12("flex h-full flex-col gap-3 rounded-lg border p-5", cardClassName),
14589
+ children: [
14590
+ /* @__PURE__ */ jsx18(Stars, { rating: review.rating }),
14591
+ review.text && review.text.trim() !== "" ? /* @__PURE__ */ jsx18("blockquote", { className: "flex-1", children: /* @__PURE__ */ jsx18("p", { children: review.text }) }) : null,
14592
+ /* @__PURE__ */ jsxs17("footer", { className: "mt-auto space-y-1 text-sm", children: [
14593
+ /* @__PURE__ */ jsx18("p", { className: "font-semibold", children: review.authorName }),
14594
+ date ? /* @__PURE__ */ jsx18("time", { dateTime: review.reviewDate, className: "block text-muted-foreground", children: date }) : null,
14595
+ /* @__PURE__ */ jsxs17(
14596
+ "a",
14597
+ {
14598
+ href: review.sourceUrl,
14599
+ target: "_blank",
14600
+ rel: "noopener nofollow",
14601
+ className: "inline-flex underline underline-offset-4",
14602
+ children: [
14603
+ linkLabel(review.sourceName),
14604
+ " ",
14605
+ /* @__PURE__ */ jsx18("span", { className: "sr-only", children: newWindowLabel })
14606
+ ]
14607
+ }
14608
+ )
14609
+ ] })
14610
+ ]
14611
+ }
14612
+ ) }, review.id);
14613
+ })
14614
+ }
14615
+ );
14616
+ const body3 = /* @__PURE__ */ jsxs17(Fragment4, { children: [
14617
+ noticePosition === "above" ? noticeNode : null,
14618
+ grid,
14619
+ noticePosition === "below" ? noticeNode : null
14620
+ ] });
14621
+ const hasHeading = heading !== void 0 && heading !== null && heading !== "";
14622
+ if (!hasHeading) {
14623
+ return /* @__PURE__ */ jsx18("div", { "data-slot": "reviews", className: cn12("space-y-4", className), children: body3 });
14624
+ }
14625
+ const Tag = `h${headingLevel}`;
14626
+ return /* @__PURE__ */ jsxs17("section", { "data-slot": "reviews", "aria-labelledby": headingId, className: cn12("space-y-4", className), children: [
14627
+ /* @__PURE__ */ jsx18(Tag, { id: headingId, className: slotClassName("", "text-xl font-semibold", headingClassName), children: heading }),
14628
+ body3
14629
+ ] });
14630
+ }
14631
+
14632
+ // src/components/page-blocks.tsx
14633
+ import { cn as cn14 } from "@reblu/site-ui/utils";
14508
14634
  import { buttonVariants as buttonVariants2 } from "@reblu/site-ui/button-variants";
14509
- import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
14635
+
14636
+ // src/components/content-blocks.tsx
14637
+ import { cn as cn13 } from "@reblu/site-ui/utils";
14638
+
14639
+ // src/components/_card-icons.ts
14640
+ var CARD_ICON_NODES = {
14641
+ check: [["path", { d: "M20 6 9 17l-5-5" }]],
14642
+ star: [
14643
+ [
14644
+ "path",
14645
+ {
14646
+ d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"
14647
+ }
14648
+ ]
14649
+ ],
14650
+ heart: [
14651
+ [
14652
+ "path",
14653
+ {
14654
+ d: "M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5"
14655
+ }
14656
+ ]
14657
+ ],
14658
+ "shield-check": [
14659
+ [
14660
+ "path",
14661
+ {
14662
+ d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"
14663
+ }
14664
+ ],
14665
+ ["path", { d: "m9 12 2 2 4-4" }]
14666
+ ],
14667
+ sparkles: [
14668
+ [
14669
+ "path",
14670
+ {
14671
+ d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z"
14672
+ }
14673
+ ],
14674
+ ["path", { d: "M20 2v4" }],
14675
+ ["path", { d: "M22 4h-4" }],
14676
+ ["circle", { cx: "4", cy: "20", r: "2" }]
14677
+ ],
14678
+ clock: [
14679
+ ["path", { d: "M12 6v6l4 2" }],
14680
+ ["circle", { cx: "12", cy: "12", r: "10" }]
14681
+ ],
14682
+ calendar: [
14683
+ ["path", { d: "M8 2v4" }],
14684
+ ["path", { d: "M16 2v4" }],
14685
+ ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2" }],
14686
+ ["path", { d: "M3 10h18" }]
14687
+ ],
14688
+ user: [
14689
+ ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }],
14690
+ ["circle", { cx: "12", cy: "7", r: "4" }]
14691
+ ],
14692
+ users: [
14693
+ ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }],
14694
+ ["path", { d: "M16 3.128a4 4 0 0 1 0 7.744" }],
14695
+ ["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87" }],
14696
+ ["circle", { cx: "9", cy: "7", r: "4" }]
14697
+ ],
14698
+ phone: [
14699
+ [
14700
+ "path",
14701
+ {
14702
+ d: "M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384"
14703
+ }
14704
+ ]
14705
+ ],
14706
+ mail: [
14707
+ ["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7" }],
14708
+ ["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2" }]
14709
+ ],
14710
+ "map-pin": [
14711
+ [
14712
+ "path",
14713
+ {
14714
+ d: "M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"
14715
+ }
14716
+ ],
14717
+ ["circle", { cx: "12", cy: "10", r: "3" }]
14718
+ ],
14719
+ leaf: [
14720
+ [
14721
+ "path",
14722
+ { d: "M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z" }
14723
+ ],
14724
+ ["path", { d: "M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12" }]
14725
+ ],
14726
+ droplet: [
14727
+ [
14728
+ "path",
14729
+ {
14730
+ d: "M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z"
14731
+ }
14732
+ ]
14733
+ ],
14734
+ sun: [
14735
+ ["circle", { cx: "12", cy: "12", r: "4" }],
14736
+ ["path", { d: "M12 2v2" }],
14737
+ ["path", { d: "M12 20v2" }],
14738
+ ["path", { d: "m4.93 4.93 1.41 1.41" }],
14739
+ ["path", { d: "m17.66 17.66 1.41 1.41" }],
14740
+ ["path", { d: "M2 12h2" }],
14741
+ ["path", { d: "M20 12h2" }],
14742
+ ["path", { d: "m6.34 17.66-1.41 1.41" }],
14743
+ ["path", { d: "m19.07 4.93-1.41 1.41" }]
14744
+ ],
14745
+ zap: [
14746
+ [
14747
+ "path",
14748
+ {
14749
+ d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"
14750
+ }
14751
+ ]
14752
+ ],
14753
+ award: [
14754
+ [
14755
+ "path",
14756
+ {
14757
+ d: "m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526"
14758
+ }
14759
+ ],
14760
+ ["circle", { cx: "12", cy: "8", r: "6" }]
14761
+ ],
14762
+ target: [
14763
+ ["circle", { cx: "12", cy: "12", r: "10" }],
14764
+ ["circle", { cx: "12", cy: "12", r: "6" }],
14765
+ ["circle", { cx: "12", cy: "12", r: "2" }]
14766
+ ],
14767
+ lightbulb: [
14768
+ [
14769
+ "path",
14770
+ {
14771
+ d: "M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"
14772
+ }
14773
+ ],
14774
+ ["path", { d: "M9 18h6" }],
14775
+ ["path", { d: "M10 22h4" }]
14776
+ ],
14777
+ smile: [
14778
+ ["circle", { cx: "12", cy: "12", r: "10" }],
14779
+ ["path", { d: "M8 14s1.5 2 4 2 4-2 4-2" }],
14780
+ ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9" }],
14781
+ ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9" }]
14782
+ ],
14783
+ "thumbs-up": [
14784
+ [
14785
+ "path",
14786
+ {
14787
+ d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z"
14788
+ }
14789
+ ],
14790
+ ["path", { d: "M7 10v12" }]
14791
+ ],
14792
+ info: [
14793
+ ["circle", { cx: "12", cy: "12", r: "10" }],
14794
+ ["path", { d: "M12 16v-4" }],
14795
+ ["path", { d: "M12 8h.01" }]
14796
+ ]
14797
+ };
14798
+
14799
+ // src/components/content-blocks.tsx
14800
+ import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
14801
+ var DEFAULT_BEFORE_AFTER_LABELS = Object.freeze({ before: "Antes", after: "Despu\xE9s" });
14802
+ function PairImage({ url, alt, label }) {
14803
+ return /* @__PURE__ */ jsxs18("figure", { className: "space-y-2", children: [
14804
+ /* @__PURE__ */ jsx19("div", { className: "relative aspect-[4/3] w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx19(
14805
+ "img",
14806
+ {
14807
+ src: url,
14808
+ alt,
14809
+ loading: "lazy",
14810
+ decoding: "async",
14811
+ className: "h-full w-full object-cover"
14812
+ }
14813
+ ) }),
14814
+ /* @__PURE__ */ jsx19("figcaption", { className: "text-sm font-semibold", children: label })
14815
+ ] });
14816
+ }
14817
+ function BeforeAfterPairs({
14818
+ pairs,
14819
+ showCaption = false,
14820
+ caption,
14821
+ labels = DEFAULT_BEFORE_AFTER_LABELS,
14822
+ className
14823
+ }) {
14824
+ const visibleCaption = showCaption && caption && caption.trim() !== "" ? caption : null;
14825
+ if (pairs.length === 0 && !visibleCaption) return null;
14826
+ return /* @__PURE__ */ jsxs18("div", { "data-slot": "before-after", className: cn13("space-y-4", className), children: [
14827
+ pairs.length > 0 && /* @__PURE__ */ jsx19("ul", { className: "grid gap-6 lg:grid-cols-2", children: pairs.map((pair, i) => /* @__PURE__ */ jsxs18(
14828
+ "li",
14829
+ {
14830
+ "data-slot": "before-after-pair",
14831
+ className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
14832
+ children: [
14833
+ /* @__PURE__ */ jsx19(PairImage, { url: pair.beforeUrl, alt: pair.alt ?? "", label: labels.before }),
14834
+ /* @__PURE__ */ jsx19(PairImage, { url: pair.afterUrl, alt: pair.alt ?? "", label: labels.after })
14835
+ ]
14836
+ },
14837
+ `${pair.beforeUrl}-${pair.afterUrl}-${i}`
14838
+ )) }),
14839
+ visibleCaption && /* @__PURE__ */ jsx19("p", { "data-slot": "before-after-caption", className: "whitespace-pre-line text-sm opacity-80", children: visibleCaption })
14840
+ ] });
14841
+ }
14842
+ function ChipList({ items, className }) {
14843
+ const visible = items.filter((item) => item.trim() !== "");
14844
+ if (visible.length === 0) return null;
14845
+ return /* @__PURE__ */ jsx19("ul", { "data-slot": "chip-list", className: cn13("flex flex-wrap gap-3", className), children: visible.map((item, i) => /* @__PURE__ */ jsx19(
14846
+ "li",
14847
+ {
14848
+ "data-slot": "chip",
14849
+ className: "rounded-full border border-primary/20 bg-primary/10 px-4 py-2 text-sm font-medium text-primary",
14850
+ children: item
14851
+ },
14852
+ `${item}-${i}`
14853
+ )) });
14854
+ }
14855
+ var CARD_ICON_NAMES = Object.freeze(Object.keys(CARD_ICON_NODES));
14856
+ function hasCardIcon(icon) {
14857
+ return Object.prototype.hasOwnProperty.call(CARD_ICON_NODES, icon);
14858
+ }
14859
+ function CardIconSvg({ icon, className }) {
14860
+ if (!hasCardIcon(icon)) return null;
14861
+ return /* @__PURE__ */ jsx19(
14862
+ "svg",
14863
+ {
14864
+ xmlns: "http://www.w3.org/2000/svg",
14865
+ viewBox: "0 0 24 24",
14866
+ fill: "none",
14867
+ stroke: "currentColor",
14868
+ strokeWidth: 2,
14869
+ strokeLinecap: "round",
14870
+ strokeLinejoin: "round",
14871
+ "aria-hidden": "true",
14872
+ focusable: "false",
14873
+ "data-icon": icon,
14874
+ className: cn13("h-5 w-5", className),
14875
+ children: CARD_ICON_NODES[icon].map(([Tag, attrs], i) => /* @__PURE__ */ jsx19(Tag, { ...attrs }, i))
14876
+ }
14877
+ );
14878
+ }
14879
+ function IconCardGrid({ items, intro, headingLevel = 3, className }) {
14880
+ const hasIntro = !!intro && intro.trim() !== "";
14881
+ if (items.length === 0 && !hasIntro) return null;
14882
+ return /* @__PURE__ */ jsxs18("div", { "data-slot": "icon-cards", className: cn13("space-y-6", className), children: [
14883
+ hasIntro && /* @__PURE__ */ jsx19("p", { className: "max-w-prose text-lg opacity-80", children: intro }),
14884
+ items.length > 0 && /* @__PURE__ */ jsx19(
14885
+ "ul",
14886
+ {
14887
+ "data-slot": "icon-card-grid",
14888
+ className: "grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3",
14889
+ children: items.map((item, i) => /* @__PURE__ */ jsxs18(
14890
+ "li",
14891
+ {
14892
+ "data-slot": "icon-card",
14893
+ className: "space-y-3 rounded-xl border border-border bg-card p-6 text-card-foreground",
14894
+ children: [
14895
+ hasCardIcon(item.icon) && /* @__PURE__ */ jsx19("span", { className: "inline-flex h-12 w-12 items-center justify-center rounded-xl bg-primary/10 text-primary", children: /* @__PURE__ */ jsx19(CardIconSvg, { icon: item.icon }) }),
14896
+ /* @__PURE__ */ jsx19(Heading, { level: headingLevel, className: "text-lg font-semibold", children: item.title }),
14897
+ item.text && /* @__PURE__ */ jsx19("p", { className: "text-muted-foreground", children: item.text })
14898
+ ]
14899
+ },
14900
+ `${item.title}-${i}`
14901
+ ))
14902
+ }
14903
+ )
14904
+ ] });
14905
+ }
14906
+ var KICKER_CLASS_NAME = "text-sm font-semibold uppercase tracking-wider opacity-80";
14907
+ function ImageTextSplit({
14908
+ imageUrl,
14909
+ alt,
14910
+ imageSide,
14911
+ mobileOrder = "image_first",
14912
+ html: html5,
14913
+ kicker,
14914
+ heading,
14915
+ headingLevel = 2,
14916
+ headingId,
14917
+ className
14918
+ }) {
14919
+ const textFirst = mobileOrder === "text_first";
14920
+ const imageRight = imageSide === "right";
14921
+ const hasKicker = !!kicker && kicker.trim() !== "";
14922
+ const bodyOffset = heading ? headingLevel : headingLevel - 1;
14923
+ return /* @__PURE__ */ jsxs18(
14924
+ "div",
14925
+ {
14926
+ "data-slot": "image-text",
14927
+ "data-image-side": imageRight ? "right" : "left",
14928
+ className: cn13("grid grid-cols-1 items-center gap-8 md:grid-cols-2", className),
14929
+ children: [
14930
+ /* @__PURE__ */ jsx19(
14931
+ "div",
14932
+ {
14933
+ "data-slot": "image-text-media",
14934
+ className: cn13(textFirst ? "order-2" : "order-1", imageRight ? "md:order-2" : "md:order-1"),
14935
+ children: /* @__PURE__ */ jsx19("div", { className: "relative aspect-[4/3] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ jsx19(
14936
+ "img",
14937
+ {
14938
+ src: imageUrl,
14939
+ alt: alt ?? "",
14940
+ loading: "lazy",
14941
+ decoding: "async",
14942
+ className: "h-full w-full object-cover"
14943
+ }
14944
+ ) })
14945
+ }
14946
+ ),
14947
+ /* @__PURE__ */ jsxs18(
14948
+ "div",
14949
+ {
14950
+ "data-slot": "image-text-body",
14951
+ className: cn13(
14952
+ "space-y-4",
14953
+ textFirst ? "order-1" : "order-2",
14954
+ imageRight ? "md:order-1" : "md:order-2"
14955
+ ),
14956
+ children: [
14957
+ (hasKicker || heading) && /* @__PURE__ */ jsxs18("div", { className: "space-y-2", children: [
14958
+ hasKicker && /* @__PURE__ */ jsx19("p", { "data-slot": "page-block-kicker", className: KICKER_CLASS_NAME, children: kicker }),
14959
+ heading && /* @__PURE__ */ jsx19(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ jsx19("span", { id: headingId, children: heading }) })
14960
+ ] }),
14961
+ html5 && /* @__PURE__ */ jsx19(SafeHtml, { html: sanitizeHtml(html5), headingOffset: bodyOffset })
14962
+ ]
14963
+ }
14964
+ )
14965
+ ]
14966
+ }
14967
+ );
14968
+ }
14969
+
14970
+ // src/components/page-blocks.tsx
14971
+ import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
14510
14972
  var ALIASES = {
14511
14973
  doctor_embed: "profile_embed",
14512
14974
  specialty_embed: "page_embed"
14513
14975
  };
14514
14976
  function HeroBlock({ block, headingLevel }) {
14515
14977
  const { title, subtitle, imageUrl } = block.data;
14516
- return /* @__PURE__ */ jsxs17("div", { className: "space-y-4", children: [
14517
- /* @__PURE__ */ jsx18(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
14518
- subtitle && /* @__PURE__ */ jsx18("p", { className: "text-lg opacity-80", children: subtitle }),
14519
- imageUrl && /* @__PURE__ */ jsx18("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ jsx18("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
14978
+ return /* @__PURE__ */ jsxs19("div", { className: "space-y-4", children: [
14979
+ /* @__PURE__ */ jsx20(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
14980
+ subtitle && /* @__PURE__ */ jsx20("p", { className: "text-lg opacity-80", children: subtitle }),
14981
+ imageUrl && /* @__PURE__ */ jsx20("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ jsx20("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
14520
14982
  ] });
14521
14983
  }
14522
14984
  function RichtextBlock({ block, headingLevel }) {
14523
- return /* @__PURE__ */ jsx18(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
14985
+ return /* @__PURE__ */ jsx20(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
14524
14986
  }
14525
14987
  function FaqBlock({ block }) {
14526
- return /* @__PURE__ */ jsx18(FaqAccordion, { items: block.data.items });
14988
+ return /* @__PURE__ */ jsx20(FaqAccordion, { items: block.data.items });
14527
14989
  }
14528
14990
  function StatsBlock({ block }) {
14529
- return /* @__PURE__ */ jsx18("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ jsxs17("div", { className: "flex flex-col-reverse gap-1", children: [
14530
- /* @__PURE__ */ jsx18("dt", { className: "text-sm opacity-80", children: item.label }),
14531
- /* @__PURE__ */ jsx18("dd", { className: "text-3xl font-bold", children: item.value })
14991
+ return /* @__PURE__ */ jsx20("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ jsxs19("div", { className: "flex flex-col-reverse gap-1", children: [
14992
+ /* @__PURE__ */ jsx20("dt", { className: "text-sm opacity-80", children: item.label }),
14993
+ /* @__PURE__ */ jsx20("dd", { className: "text-3xl font-bold", children: item.value })
14532
14994
  ] }, i)) });
14533
14995
  }
14534
14996
  function TestimonialBlock({ block }) {
14535
14997
  const { quote, author, role, avatarUrl } = block.data;
14536
- return /* @__PURE__ */ jsxs17("figure", { className: "space-y-4", children: [
14537
- /* @__PURE__ */ jsx18("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ jsx18("p", { children: quote }) }),
14538
- /* @__PURE__ */ jsxs17("figcaption", { className: "flex items-center gap-3", children: [
14998
+ return /* @__PURE__ */ jsxs19("figure", { className: "space-y-4", children: [
14999
+ /* @__PURE__ */ jsx20("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ jsx20("p", { children: quote }) }),
15000
+ /* @__PURE__ */ jsxs19("figcaption", { className: "flex items-center gap-3", children: [
14539
15001
  avatarUrl && // eslint-disable-next-line @next/next/no-img-element
14540
- /* @__PURE__ */ jsx18(
15002
+ /* @__PURE__ */ jsx20(
14541
15003
  "img",
14542
15004
  {
14543
15005
  src: avatarUrl,
@@ -14546,9 +15008,9 @@ function TestimonialBlock({ block }) {
14546
15008
  className: "h-10 w-10 rounded-full object-cover"
14547
15009
  }
14548
15010
  ),
14549
- /* @__PURE__ */ jsxs17("span", { children: [
14550
- /* @__PURE__ */ jsx18("span", { className: "font-semibold", children: author }),
14551
- role && /* @__PURE__ */ jsx18("span", { className: "block text-sm opacity-80", children: role })
15011
+ /* @__PURE__ */ jsxs19("span", { children: [
15012
+ /* @__PURE__ */ jsx20("span", { className: "font-semibold", children: author }),
15013
+ role && /* @__PURE__ */ jsx20("span", { className: "block text-sm opacity-80", children: role })
14552
15014
  ] })
14553
15015
  ] })
14554
15016
  ] });
@@ -14557,19 +15019,19 @@ function CtaSlotBlock(_props) {
14557
15019
  return null;
14558
15020
  }
14559
15021
  function FeatureListBlock({ block }) {
14560
- return /* @__PURE__ */ jsx18("ul", { className: "grid list-disc gap-2 pl-5 sm:grid-cols-2", children: block.data.items.map((item, i) => /* @__PURE__ */ jsx18("li", { children: item.text }, i)) });
15022
+ return /* @__PURE__ */ jsx20("ul", { className: "grid list-disc gap-2 pl-5 sm:grid-cols-2", children: block.data.items.map((item, i) => /* @__PURE__ */ jsx20("li", { children: item.text }, i)) });
14561
15023
  }
14562
15024
  function GalleryBlock({ block }) {
14563
15025
  const { images } = block.data;
14564
- return /* @__PURE__ */ jsx18(
15026
+ return /* @__PURE__ */ jsx20(
14565
15027
  "div",
14566
15028
  {
14567
- className: cn12(
15029
+ className: cn14(
14568
15030
  "grid gap-4",
14569
15031
  images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
14570
15032
  ),
14571
- children: images.map((img, i) => /* @__PURE__ */ jsxs17("figure", { className: "space-y-1", children: [
14572
- /* @__PURE__ */ jsx18("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx18(
15033
+ children: images.map((img, i) => /* @__PURE__ */ jsxs19("figure", { className: "space-y-1", children: [
15034
+ /* @__PURE__ */ jsx20("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx20(
14573
15035
  "img",
14574
15036
  {
14575
15037
  src: img.url,
@@ -14578,7 +15040,7 @@ function GalleryBlock({ block }) {
14578
15040
  className: "h-full w-full object-cover"
14579
15041
  }
14580
15042
  ) }),
14581
- img.caption && /* @__PURE__ */ jsx18("figcaption", { className: "text-sm opacity-80", children: img.caption })
15043
+ img.caption && /* @__PURE__ */ jsx20("figcaption", { className: "text-sm opacity-80", children: img.caption })
14582
15044
  ] }, `${img.url}-${i}`))
14583
15045
  }
14584
15046
  );
@@ -14588,13 +15050,13 @@ function EmbedCard({
14588
15050
  headingLevel,
14589
15051
  embedHref
14590
15052
  }) {
14591
- return /* @__PURE__ */ jsxs17(
15053
+ return /* @__PURE__ */ jsxs19(
14592
15054
  "a",
14593
15055
  {
14594
15056
  href: embedHref(resolved),
14595
15057
  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",
14596
15058
  children: [
14597
- resolved.coverImageUrl && /* @__PURE__ */ jsx18("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ jsx18(
15059
+ resolved.coverImageUrl && /* @__PURE__ */ jsx20("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ jsx20(
14598
15060
  "img",
14599
15061
  {
14600
15062
  src: resolved.coverImageUrl,
@@ -14603,24 +15065,51 @@ function EmbedCard({
14603
15065
  className: "h-full w-full object-cover"
14604
15066
  }
14605
15067
  ) }),
14606
- /* @__PURE__ */ jsxs17("div", { className: "space-y-1 p-4", children: [
14607
- /* @__PURE__ */ jsx18(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
14608
- resolved.role && /* @__PURE__ */ jsx18("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
14609
- resolved.excerpt && /* @__PURE__ */ jsx18("p", { className: "text-muted-foreground", children: resolved.excerpt })
15068
+ /* @__PURE__ */ jsxs19("div", { className: "space-y-1 p-4", children: [
15069
+ /* @__PURE__ */ jsx20(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
15070
+ resolved.role && /* @__PURE__ */ jsx20("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
15071
+ resolved.excerpt && /* @__PURE__ */ jsx20("p", { className: "text-muted-foreground", children: resolved.excerpt })
14610
15072
  ] })
14611
15073
  ]
14612
15074
  }
14613
15075
  );
14614
15076
  }
14615
15077
  function PageEmbedBlock({ block, headingLevel, embedHref }) {
14616
- return /* @__PURE__ */ jsx18(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
15078
+ return /* @__PURE__ */ jsx20(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
14617
15079
  }
14618
15080
  function ProfileEmbedBlock({
14619
15081
  block,
14620
15082
  headingLevel,
14621
15083
  embedHref
14622
15084
  }) {
14623
- return /* @__PURE__ */ jsx18(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
15085
+ return /* @__PURE__ */ jsx20(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
15086
+ }
15087
+ function BeforeAfterBlock({ block }) {
15088
+ const { pairs, showCaption, caption } = block.data;
15089
+ return /* @__PURE__ */ jsx20(BeforeAfterPairs, { pairs, showCaption, caption });
15090
+ }
15091
+ function ChipsBlock({ block }) {
15092
+ return /* @__PURE__ */ jsx20(ChipList, { items: block.data.items });
15093
+ }
15094
+ function ImageTextBlock({ block, headingLevel, headingId }) {
15095
+ const { kicker, imageUrl, alt, imageSide, mobileOrder, html: html5 } = block.data;
15096
+ return /* @__PURE__ */ jsx20(
15097
+ ImageTextSplit,
15098
+ {
15099
+ imageUrl,
15100
+ alt,
15101
+ imageSide,
15102
+ mobileOrder,
15103
+ html: html5,
15104
+ kicker,
15105
+ heading: block.heading,
15106
+ headingLevel,
15107
+ headingId
15108
+ }
15109
+ );
15110
+ }
15111
+ function IconCardsBlock({ block, headingLevel }) {
15112
+ return /* @__PURE__ */ jsx20(IconCardGrid, { items: block.data.items, intro: block.data.intro, headingLevel });
14624
15113
  }
14625
15114
  var DEFAULT_RENDERERS = {
14626
15115
  hero: HeroBlock,
@@ -14632,8 +15121,25 @@ var DEFAULT_RENDERERS = {
14632
15121
  feature_list: FeatureListBlock,
14633
15122
  gallery: GalleryBlock,
14634
15123
  page_embed: PageEmbedBlock,
14635
- profile_embed: ProfileEmbedBlock
15124
+ profile_embed: ProfileEmbedBlock,
15125
+ before_after: BeforeAfterBlock,
15126
+ chips: ChipsBlock,
15127
+ icon_cards: IconCardsBlock,
15128
+ image_text: ImageTextBlock
14636
15129
  };
15130
+ var KICKER_TYPES = /* @__PURE__ */ new Set([
15131
+ "before_after",
15132
+ "chips",
15133
+ "icon_cards"
15134
+ ]);
15135
+ var OWN_HEADING_TYPES = /* @__PURE__ */ new Set([
15136
+ "image_text"
15137
+ ]);
15138
+ function kickerOf(type, block) {
15139
+ if (!KICKER_TYPES.has(type)) return null;
15140
+ const kicker = block.data.kicker;
15141
+ return typeof kicker === "string" && kicker.trim() !== "" ? kicker : null;
15142
+ }
14637
15143
  var EMBED_TYPES = /* @__PURE__ */ new Set([
14638
15144
  "page_embed",
14639
15145
  "profile_embed"
@@ -14677,14 +15183,14 @@ function toIdFragment(value) {
14677
15183
  function SectionCta2({ cta }) {
14678
15184
  if (!hasUsableCta(cta)) return null;
14679
15185
  const variant = toButtonVariant(cta.variant);
14680
- return /* @__PURE__ */ jsx18("div", { className: "pt-2", children: /* @__PURE__ */ jsx18(
15186
+ return /* @__PURE__ */ jsx20("div", { className: "pt-2", children: /* @__PURE__ */ jsx20(
14681
15187
  "a",
14682
15188
  {
14683
15189
  href: cta.url,
14684
15190
  "data-slot": "button",
14685
15191
  "data-variant": variant,
14686
15192
  "data-size": "default",
14687
- className: cn12(buttonVariants2({ variant, size: "default" })),
15193
+ className: cn14(buttonVariants2({ variant, size: "default" })),
14688
15194
  ...cta.isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
14689
15195
  children: cta.label
14690
15196
  }
@@ -14709,18 +15215,29 @@ function PageBlocks({
14709
15215
  const Renderer = components?.[type] ?? DEFAULT_RENDERERS[type];
14710
15216
  const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
14711
15217
  const background = block.backgroundColor;
15218
+ const kicker = kickerOf(type, block);
15219
+ const ownsHeading = OWN_HEADING_TYPES.has(type);
14712
15220
  return [
14713
- /* @__PURE__ */ jsxs17(
15221
+ /* @__PURE__ */ jsxs19(
14714
15222
  "section",
14715
15223
  {
14716
15224
  "data-slot": "page-block",
14717
15225
  "data-block-type": type,
14718
15226
  "aria-labelledby": headingId,
14719
15227
  style: surfaceStyle(background),
14720
- className: cn12("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
15228
+ className: cn14("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
14721
15229
  children: [
14722
- block.heading && /* @__PURE__ */ jsx18(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ jsx18("span", { id: headingId, children: block.heading }) }),
14723
- /* @__PURE__ */ jsx18(
15230
+ kicker && /* @__PURE__ */ jsx20("p", { "data-slot": "page-block-kicker", className: cn14("-mb-4", KICKER_CLASS_NAME), children: kicker }),
15231
+ block.heading && !ownsHeading && /* @__PURE__ */ jsx20(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ jsx20("span", { id: headingId, children: block.heading }) }),
15232
+ ownsHeading ? /* @__PURE__ */ jsx20(
15233
+ Renderer,
15234
+ {
15235
+ block,
15236
+ headingLevel,
15237
+ embedHref,
15238
+ headingId
15239
+ }
15240
+ ) : /* @__PURE__ */ jsx20(
14724
15241
  Renderer,
14725
15242
  {
14726
15243
  block,
@@ -14728,7 +15245,7 @@ function PageBlocks({
14728
15245
  embedHref
14729
15246
  }
14730
15247
  ),
14731
- /* @__PURE__ */ jsx18(SectionCta2, { cta: block.cta })
15248
+ /* @__PURE__ */ jsx20(SectionCta2, { cta: block.cta })
14732
15249
  ]
14733
15250
  },
14734
15251
  block.id
@@ -14736,12 +15253,12 @@ function PageBlocks({
14736
15253
  ];
14737
15254
  });
14738
15255
  if (sections.length === 0) return null;
14739
- return /* @__PURE__ */ jsx18("div", { className: cn12("space-y-12", className), "data-slot": "page-blocks", children: sections });
15256
+ return /* @__PURE__ */ jsx20("div", { className: cn14("space-y-12", className), "data-slot": "page-blocks", children: sections });
14740
15257
  }
14741
15258
 
14742
15259
  // src/components/shop-filters.tsx
14743
- import { cn as cn13 } from "@reblu/site-ui/utils";
14744
- import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
15260
+ import { cn as cn15 } from "@reblu/site-ui/utils";
15261
+ import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
14745
15262
  var DEFAULT_SHOP_PRICE_BANDS = [
14746
15263
  { max: 2500 },
14747
15264
  { min: 2500, max: 5e3 },
@@ -14785,7 +15302,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
14785
15302
  return "";
14786
15303
  }
14787
15304
  function OptionLink({ href, active, label, onActivate }) {
14788
- return /* @__PURE__ */ jsx19(
15305
+ return /* @__PURE__ */ jsx21(
14789
15306
  "a",
14790
15307
  {
14791
15308
  href,
@@ -14794,7 +15311,7 @@ function OptionLink({ href, active, label, onActivate }) {
14794
15311
  event.preventDefault();
14795
15312
  onActivate();
14796
15313
  } : void 0,
14797
- className: cn13(
15314
+ className: cn15(
14798
15315
  "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",
14799
15316
  active ? "border-transparent bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
14800
15317
  ),
@@ -14803,9 +15320,9 @@ function OptionLink({ href, active, label, onActivate }) {
14803
15320
  );
14804
15321
  }
14805
15322
  function FilterFieldset({ legend, children: children2 }) {
14806
- return /* @__PURE__ */ jsxs18("fieldset", { className: "space-y-2", children: [
14807
- /* @__PURE__ */ jsx19("legend", { className: "text-sm font-medium text-foreground", children: legend }),
14808
- /* @__PURE__ */ jsx19("div", { className: "flex flex-wrap gap-2", children: children2 })
15323
+ return /* @__PURE__ */ jsxs20("fieldset", { className: "space-y-2", children: [
15324
+ /* @__PURE__ */ jsx21("legend", { className: "text-sm font-medium text-foreground", children: legend }),
15325
+ /* @__PURE__ */ jsx21("div", { className: "flex flex-wrap gap-2", children: children2 })
14809
15326
  ] });
14810
15327
  }
14811
15328
  function ShopFilters({
@@ -14828,11 +15345,11 @@ function ShopFilters({
14828
15345
  if (!shouldRenderShopFilters(facets, active)) {
14829
15346
  return null;
14830
15347
  }
14831
- return /* @__PURE__ */ jsxs18("div", { className: cn13("space-y-6", className), "data-slot": "shop-filters", children: [
15348
+ return /* @__PURE__ */ jsxs20("div", { className: cn15("space-y-6", className), "data-slot": "shop-filters", children: [
14832
15349
  visibleTaxonomies.map((axis) => {
14833
15350
  const activeSlug = active.taxonomy?.[axis.key];
14834
- return /* @__PURE__ */ jsxs18(FilterFieldset, { legend: axis.label, children: [
14835
- /* @__PURE__ */ jsx19(
15351
+ return /* @__PURE__ */ jsxs20(FilterFieldset, { legend: axis.label, children: [
15352
+ /* @__PURE__ */ jsx21(
14836
15353
  OptionLink,
14837
15354
  {
14838
15355
  href: hrefs.taxonomy(axis.key, void 0),
@@ -14847,7 +15364,7 @@ function ShopFilters({
14847
15364
  ),
14848
15365
  axis.terms.map((term) => {
14849
15366
  const isActive = activeSlug === term.slug;
14850
- return /* @__PURE__ */ jsx19(
15367
+ return /* @__PURE__ */ jsx21(
14851
15368
  OptionLink,
14852
15369
  {
14853
15370
  href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
@@ -14867,9 +15384,9 @@ function ShopFilters({
14867
15384
  }),
14868
15385
  visibleAttributes.map((attr) => {
14869
15386
  const activeValues = toValueArray(active.attr?.[attr.key]);
14870
- return /* @__PURE__ */ jsx19(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
15387
+ return /* @__PURE__ */ jsx21(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
14871
15388
  const isActive = activeValues.includes(opt.value);
14872
- return /* @__PURE__ */ jsx19(
15389
+ return /* @__PURE__ */ jsx21(
14873
15390
  OptionLink,
14874
15391
  {
14875
15392
  href: hrefs.attr(attr.key, opt.value),
@@ -14887,11 +15404,11 @@ function ShopFilters({
14887
15404
  );
14888
15405
  }) }, attr.key);
14889
15406
  }),
14890
- showPriceGroup && /* @__PURE__ */ jsx19(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
15407
+ showPriceGroup && /* @__PURE__ */ jsx21(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
14891
15408
  const isActive = active.priceMin === band.min && active.priceMax === band.max;
14892
15409
  const nextMin = isActive ? void 0 : band.min;
14893
15410
  const nextMax = isActive ? void 0 : band.max;
14894
- return /* @__PURE__ */ jsx19(
15411
+ return /* @__PURE__ */ jsx21(
14895
15412
  OptionLink,
14896
15413
  {
14897
15414
  href: hrefs.price(nextMin, nextMax),
@@ -14902,7 +15419,7 @@ function ShopFilters({
14902
15419
  i
14903
15420
  );
14904
15421
  }) }),
14905
- hasOnSale && /* @__PURE__ */ jsx19(
15422
+ hasOnSale && /* @__PURE__ */ jsx21(
14906
15423
  OptionLink,
14907
15424
  {
14908
15425
  href: hrefs.onSale(!active.onSale),
@@ -14911,7 +15428,7 @@ function ShopFilters({
14911
15428
  onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
14912
15429
  }
14913
15430
  ),
14914
- /* @__PURE__ */ jsx19(
15431
+ /* @__PURE__ */ jsx21(
14915
15432
  "a",
14916
15433
  {
14917
15434
  href: hrefs.clearAll(),
@@ -14927,8 +15444,8 @@ function ShopFilters({
14927
15444
  }
14928
15445
 
14929
15446
  // src/components/course-catalog-filters.tsx
14930
- import { cn as cn14 } from "@reblu/site-ui/utils";
14931
- import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
15447
+ import { cn as cn16 } from "@reblu/site-ui/utils";
15448
+ import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
14932
15449
  var DEFAULT_COURSE_PRICE_BANDS = [
14933
15450
  { max: 5e3 },
14934
15451
  { min: 5e3, max: 15e3 },
@@ -14981,9 +15498,9 @@ function CourseCatalogFilters({
14981
15498
  const showPrice = enabled.price !== false;
14982
15499
  const isFree = Boolean(active.free);
14983
15500
  if (!showCategories && !showInstructors && !showPrice) return null;
14984
- return /* @__PURE__ */ jsxs19("div", { className: cn14("space-y-6", className), "data-slot": "course-catalog-filters", children: [
14985
- showCategories && /* @__PURE__ */ jsxs19(FilterFieldset, { legend: t.category, children: [
14986
- /* @__PURE__ */ jsx20(
15501
+ return /* @__PURE__ */ jsxs21("div", { className: cn16("space-y-6", className), "data-slot": "course-catalog-filters", children: [
15502
+ showCategories && /* @__PURE__ */ jsxs21(FilterFieldset, { legend: t.category, children: [
15503
+ /* @__PURE__ */ jsx22(
14987
15504
  OptionLink,
14988
15505
  {
14989
15506
  href: categoryHref(void 0),
@@ -14995,7 +15512,7 @@ function CourseCatalogFilters({
14995
15512
  sortedCategories.map((category) => {
14996
15513
  const isActive = active.category === category.slug;
14997
15514
  const next2 = isActive ? void 0 : category.slug;
14998
- return /* @__PURE__ */ jsx20(
15515
+ return /* @__PURE__ */ jsx22(
14999
15516
  OptionLink,
15000
15517
  {
15001
15518
  href: categoryHref(next2),
@@ -15007,8 +15524,8 @@ function CourseCatalogFilters({
15007
15524
  );
15008
15525
  })
15009
15526
  ] }),
15010
- showInstructors && /* @__PURE__ */ jsxs19(FilterFieldset, { legend: t.instructor, children: [
15011
- /* @__PURE__ */ jsx20(
15527
+ showInstructors && /* @__PURE__ */ jsxs21(FilterFieldset, { legend: t.instructor, children: [
15528
+ /* @__PURE__ */ jsx22(
15012
15529
  OptionLink,
15013
15530
  {
15014
15531
  href: hrefs.instructor(void 0),
@@ -15020,7 +15537,7 @@ function CourseCatalogFilters({
15020
15537
  named.map((instructor) => {
15021
15538
  const isActive = active.instructor === instructor.id;
15022
15539
  const next2 = isActive ? void 0 : instructor.id;
15023
- return /* @__PURE__ */ jsx20(
15540
+ return /* @__PURE__ */ jsx22(
15024
15541
  OptionLink,
15025
15542
  {
15026
15543
  href: hrefs.instructor(next2),
@@ -15032,8 +15549,8 @@ function CourseCatalogFilters({
15032
15549
  );
15033
15550
  })
15034
15551
  ] }),
15035
- showPrice && /* @__PURE__ */ jsxs19(FilterFieldset, { legend: t.price, children: [
15036
- /* @__PURE__ */ jsx20(
15552
+ showPrice && /* @__PURE__ */ jsxs21(FilterFieldset, { legend: t.price, children: [
15553
+ /* @__PURE__ */ jsx22(
15037
15554
  OptionLink,
15038
15555
  {
15039
15556
  href: hrefs.free(!isFree),
@@ -15048,7 +15565,7 @@ function CourseCatalogFilters({
15048
15565
  const isActive = !isFree && active.priceMin === band.min && active.priceMax === band.max;
15049
15566
  const nextMin = isActive ? void 0 : band.min;
15050
15567
  const nextMax = isActive ? void 0 : band.max;
15051
- return /* @__PURE__ */ jsx20(
15568
+ return /* @__PURE__ */ jsx22(
15052
15569
  OptionLink,
15053
15570
  {
15054
15571
  href: hrefs.price(nextMin, nextMax),
@@ -15060,7 +15577,7 @@ function CourseCatalogFilters({
15060
15577
  );
15061
15578
  })
15062
15579
  ] }),
15063
- /* @__PURE__ */ jsx20(
15580
+ /* @__PURE__ */ jsx22(
15064
15581
  "a",
15065
15582
  {
15066
15583
  href: hrefs.clearAll(),
@@ -15082,8 +15599,8 @@ function CourseCatalogFilters({
15082
15599
  }
15083
15600
 
15084
15601
  // src/components/cart-line-list.tsx
15085
- import { cn as cn15 } from "@reblu/site-ui/utils";
15086
- import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
15602
+ import { cn as cn17 } from "@reblu/site-ui/utils";
15603
+ import { jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
15087
15604
  var DEFAULT_LABELS2 = {
15088
15605
  quantityLabel: "Cantidad",
15089
15606
  decrease: "Reducir cantidad",
@@ -15096,20 +15613,20 @@ var DEFAULT_LABELS2 = {
15096
15613
  function CartLineIncludes({ entries, note, className }) {
15097
15614
  const hasNote = note != null && note !== false && note !== "";
15098
15615
  if (entries.length === 0 && !hasNote) return null;
15099
- return /* @__PURE__ */ jsxs20(
15616
+ return /* @__PURE__ */ jsxs22(
15100
15617
  "div",
15101
15618
  {
15102
- className: cn15("mt-2 space-y-2 rounded-lg bg-muted px-4 py-3 text-sm", className),
15619
+ className: cn17("mt-2 space-y-2 rounded-lg bg-muted px-4 py-3 text-sm", className),
15103
15620
  "data-slot": "cart-line-includes",
15104
15621
  children: [
15105
- entries.length > 0 && /* @__PURE__ */ jsx21("dl", { className: "grid grid-cols-[max-content_1fr] gap-x-4 gap-y-1.5", children: entries.map((entry, idx) => (
15622
+ entries.length > 0 && /* @__PURE__ */ jsx23("dl", { className: "grid grid-cols-[max-content_1fr] gap-x-4 gap-y-1.5", children: entries.map((entry, idx) => (
15106
15623
  // eslint-disable-next-line react/no-array-index-key -- entries are positional, SITE-built rows
15107
- /* @__PURE__ */ jsxs20("div", { className: "contents", children: [
15108
- /* @__PURE__ */ jsx21("dt", { className: "font-semibold text-muted-foreground", children: entry.label }),
15109
- /* @__PURE__ */ jsx21("dd", { className: "m-0", children: entry.value })
15624
+ /* @__PURE__ */ jsxs22("div", { className: "contents", children: [
15625
+ /* @__PURE__ */ jsx23("dt", { className: "font-semibold text-muted-foreground", children: entry.label }),
15626
+ /* @__PURE__ */ jsx23("dd", { className: "m-0", children: entry.value })
15110
15627
  ] }, idx)
15111
15628
  )) }),
15112
- hasNote && /* @__PURE__ */ jsx21("p", { className: "text-muted-foreground", children: note })
15629
+ hasNote && /* @__PURE__ */ jsx23("p", { className: "text-muted-foreground", children: note })
15113
15630
  ]
15114
15631
  }
15115
15632
  );
@@ -15138,9 +15655,9 @@ function CartLineList({
15138
15655
  }) {
15139
15656
  const t = { ...DEFAULT_LABELS2, ...labels };
15140
15657
  const noticeContent = notice === true ? t.cancelledNotice : notice;
15141
- return /* @__PURE__ */ jsxs20("div", { className: cn15("space-y-4", className), "data-slot": "cart-line-list", children: [
15142
- /* @__PURE__ */ jsx21("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
15143
- noticeContent != null && noticeContent !== false && /* @__PURE__ */ jsx21(
15658
+ return /* @__PURE__ */ jsxs22("div", { className: cn17("space-y-4", className), "data-slot": "cart-line-list", children: [
15659
+ /* @__PURE__ */ jsx23("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
15660
+ noticeContent != null && noticeContent !== false && /* @__PURE__ */ jsx23(
15144
15661
  "div",
15145
15662
  {
15146
15663
  role: "status",
@@ -15149,34 +15666,34 @@ function CartLineList({
15149
15666
  children: noticeContent
15150
15667
  }
15151
15668
  ),
15152
- /* @__PURE__ */ jsx21("ul", { className: "space-y-4", children: items.map((item) => {
15669
+ /* @__PURE__ */ jsx23("ul", { className: "space-y-4", children: items.map((item) => {
15153
15670
  const maxQty = item.maxStock ?? Infinity;
15154
15671
  const atMax = item.quantity >= maxQty;
15155
15672
  const atMin = item.quantity <= 1;
15156
15673
  const message = lineMessage?.(item);
15157
15674
  const includes = lineIncludes?.(item);
15158
- return /* @__PURE__ */ jsxs20(
15675
+ return /* @__PURE__ */ jsxs22(
15159
15676
  "li",
15160
15677
  {
15161
15678
  className: "flex gap-4 rounded-xl border border-border bg-card p-4",
15162
15679
  children: [
15163
- /* @__PURE__ */ jsx21("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ jsx21("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
15164
- /* @__PURE__ */ jsxs20("div", { className: "min-w-0 flex-1", children: [
15165
- /* @__PURE__ */ jsx21("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
15166
- item.variantName && /* @__PURE__ */ jsx21("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
15167
- /* @__PURE__ */ jsxs20("p", { className: "mt-1 text-sm text-muted-foreground", children: [
15680
+ /* @__PURE__ */ jsx23("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ jsx23("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
15681
+ /* @__PURE__ */ jsxs22("div", { className: "min-w-0 flex-1", children: [
15682
+ /* @__PURE__ */ jsx23("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
15683
+ item.variantName && /* @__PURE__ */ jsx23("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
15684
+ /* @__PURE__ */ jsxs22("p", { className: "mt-1 text-sm text-muted-foreground", children: [
15168
15685
  formatPrice(item.unitPrice, currencyCode, locale),
15169
15686
  " ",
15170
15687
  t.unitPriceSuffix
15171
15688
  ] }),
15172
- /* @__PURE__ */ jsxs20(
15689
+ /* @__PURE__ */ jsxs22(
15173
15690
  "div",
15174
15691
  {
15175
15692
  role: "group",
15176
15693
  "aria-label": t.quantityLabel,
15177
15694
  className: "mt-3 flex items-center gap-3",
15178
15695
  children: [
15179
- /* @__PURE__ */ jsx21(
15696
+ /* @__PURE__ */ jsx23(
15180
15697
  "button",
15181
15698
  {
15182
15699
  type: "button",
@@ -15187,8 +15704,8 @@ function CartLineList({
15187
15704
  children: "\u2212"
15188
15705
  }
15189
15706
  ),
15190
- /* @__PURE__ */ jsx21("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
15191
- /* @__PURE__ */ jsx21(
15707
+ /* @__PURE__ */ jsx23("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
15708
+ /* @__PURE__ */ jsx23(
15192
15709
  "button",
15193
15710
  {
15194
15711
  type: "button",
@@ -15199,7 +15716,7 @@ function CartLineList({
15199
15716
  children: "+"
15200
15717
  }
15201
15718
  ),
15202
- onRemove && /* @__PURE__ */ jsx21(
15719
+ onRemove && /* @__PURE__ */ jsx23(
15203
15720
  "button",
15204
15721
  {
15205
15722
  type: "button",
@@ -15212,7 +15729,7 @@ function CartLineList({
15212
15729
  ]
15213
15730
  }
15214
15731
  ),
15215
- message != null && message !== false && /* @__PURE__ */ jsx21(
15732
+ message != null && message !== false && /* @__PURE__ */ jsx23(
15216
15733
  "p",
15217
15734
  {
15218
15735
  className: "mt-2 text-sm text-destructive",
@@ -15220,12 +15737,12 @@ function CartLineList({
15220
15737
  children: message
15221
15738
  }
15222
15739
  ),
15223
- includes != null && includes !== false && /* @__PURE__ */ jsxs20("details", { className: "mt-2", "data-slot": "cart-line-list-includes", children: [
15224
- /* @__PURE__ */ jsx21("summary", { className: "cursor-pointer text-sm font-semibold text-primary", children: t.includesSummary }),
15740
+ includes != null && includes !== false && /* @__PURE__ */ jsxs22("details", { className: "mt-2", "data-slot": "cart-line-list-includes", children: [
15741
+ /* @__PURE__ */ jsx23("summary", { className: "cursor-pointer text-sm font-semibold text-primary", children: t.includesSummary }),
15225
15742
  includes
15226
15743
  ] })
15227
15744
  ] }),
15228
- /* @__PURE__ */ jsx21("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ jsx21("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
15745
+ /* @__PURE__ */ jsx23("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ jsx23("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
15229
15746
  ]
15230
15747
  },
15231
15748
  lineKey(item.productId, item.variantId)
@@ -15235,8 +15752,8 @@ function CartLineList({
15235
15752
  }
15236
15753
 
15237
15754
  // src/components/cart-summary.tsx
15238
- import { cn as cn16 } from "@reblu/site-ui/utils";
15239
- import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
15755
+ import { cn as cn18 } from "@reblu/site-ui/utils";
15756
+ import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
15240
15757
  var DEFAULT_LABELS3 = {
15241
15758
  subtotal: "Subtotal",
15242
15759
  discountPrefix: "Descuento",
@@ -15266,37 +15783,37 @@ function CartSummary({
15266
15783
  const hasDiscount = Boolean(discountAmount && discountAmount > 0);
15267
15784
  const noticeContent = notice === true ? t.cancelledNotice : notice;
15268
15785
  const hasNotice = noticeContent != null && noticeContent !== false;
15269
- const breakdown = /* @__PURE__ */ jsxs21(
15786
+ const breakdown = /* @__PURE__ */ jsxs23(
15270
15787
  "dl",
15271
15788
  {
15272
- className: cn16("space-y-2 text-sm", !hasNotice && className),
15789
+ className: cn18("space-y-2 text-sm", !hasNotice && className),
15273
15790
  "data-slot": "cart-summary",
15274
15791
  children: [
15275
- /* @__PURE__ */ jsxs21("div", { className: "flex justify-between text-muted-foreground", children: [
15276
- /* @__PURE__ */ jsx22("dt", { children: t.subtotal }),
15277
- /* @__PURE__ */ jsx22("dd", { children: formatPrice(subtotal, currencyCode, locale) })
15792
+ /* @__PURE__ */ jsxs23("div", { className: "flex justify-between text-muted-foreground", children: [
15793
+ /* @__PURE__ */ jsx24("dt", { children: t.subtotal }),
15794
+ /* @__PURE__ */ jsx24("dd", { children: formatPrice(subtotal, currencyCode, locale) })
15278
15795
  ] }),
15279
- hasDiscount && /* @__PURE__ */ jsxs21("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
15280
- /* @__PURE__ */ jsx22("dt", { children: autoDiscount ? t.staffDiscountApplied : `${t.discountPrefix}${discountCode ? ` (${discountCode})` : ""}` }),
15281
- /* @__PURE__ */ jsxs21("dd", { children: [
15796
+ hasDiscount && /* @__PURE__ */ jsxs23("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
15797
+ /* @__PURE__ */ jsx24("dt", { children: autoDiscount ? t.staffDiscountApplied : `${t.discountPrefix}${discountCode ? ` (${discountCode})` : ""}` }),
15798
+ /* @__PURE__ */ jsxs23("dd", { children: [
15282
15799
  "-",
15283
15800
  formatPrice(discountAmount, currencyCode, locale)
15284
15801
  ] })
15285
15802
  ] }),
15286
- shippingEnabled && /* @__PURE__ */ jsxs21("div", { className: "flex justify-between text-muted-foreground", children: [
15287
- /* @__PURE__ */ jsx22("dt", { children: t.shipping }),
15288
- /* @__PURE__ */ jsx22("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
15803
+ shippingEnabled && /* @__PURE__ */ jsxs23("div", { className: "flex justify-between text-muted-foreground", children: [
15804
+ /* @__PURE__ */ jsx24("dt", { children: t.shipping }),
15805
+ /* @__PURE__ */ jsx24("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
15289
15806
  ] }),
15290
- /* @__PURE__ */ jsxs21("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
15291
- /* @__PURE__ */ jsx22("dt", { children: t.total }),
15292
- /* @__PURE__ */ jsx22("dd", { children: formatPrice(total, currencyCode, locale) })
15807
+ /* @__PURE__ */ jsxs23("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
15808
+ /* @__PURE__ */ jsx24("dt", { children: t.total }),
15809
+ /* @__PURE__ */ jsx24("dd", { children: formatPrice(total, currencyCode, locale) })
15293
15810
  ] })
15294
15811
  ]
15295
15812
  }
15296
15813
  );
15297
15814
  if (!hasNotice) return breakdown;
15298
- return /* @__PURE__ */ jsxs21("div", { className: cn16("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
15299
- /* @__PURE__ */ jsx22(
15815
+ return /* @__PURE__ */ jsxs23("div", { className: cn18("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
15816
+ /* @__PURE__ */ jsx24(
15300
15817
  "div",
15301
15818
  {
15302
15819
  role: "status",
@@ -15310,8 +15827,8 @@ function CartSummary({
15310
15827
  }
15311
15828
 
15312
15829
  // src/components/cart-adjustments-notice.tsx
15313
- import { cn as cn17 } from "@reblu/site-ui/utils";
15314
- import { jsx as jsx23 } from "react/jsx-runtime";
15830
+ import { cn as cn19 } from "@reblu/site-ui/utils";
15831
+ import { jsx as jsx25 } from "react/jsx-runtime";
15315
15832
  var DEFAULT_LABELS4 = {
15316
15833
  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.`,
15317
15834
  quantityChanged: (name, quantity) => `Hemos ajustado la cantidad de ${name} a ${quantity} por el stock disponible.`,
@@ -15345,20 +15862,20 @@ function CartAdjustmentsNotice({
15345
15862
  );
15346
15863
  }
15347
15864
  if (messages.length === 0) return null;
15348
- return /* @__PURE__ */ jsx23(
15865
+ return /* @__PURE__ */ jsx25(
15349
15866
  "div",
15350
15867
  {
15351
15868
  role: "status",
15352
- className: cn17("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
15869
+ className: cn19("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
15353
15870
  "data-slot": "cart-adjustments-notice",
15354
- children: messages.length === 1 ? /* @__PURE__ */ jsx23("p", { children: messages[0] }) : /* @__PURE__ */ jsx23("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ jsx23("li", { children: message }, index)) })
15871
+ children: messages.length === 1 ? /* @__PURE__ */ jsx25("p", { children: messages[0] }) : /* @__PURE__ */ jsx25("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ jsx25("li", { children: message }, index)) })
15355
15872
  }
15356
15873
  );
15357
15874
  }
15358
15875
 
15359
15876
  // src/components/added-to-cart-toast.tsx
15360
- import { cn as cn18 } from "@reblu/site-ui/utils";
15361
- import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
15877
+ import { cn as cn20 } from "@reblu/site-ui/utils";
15878
+ import { jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
15362
15879
  var DEFAULT_LABELS5 = {
15363
15880
  success: "A\xF1adido al carrito",
15364
15881
  error: "No se pudo a\xF1adir al carrito",
@@ -15378,12 +15895,12 @@ function AddedToCartToast({
15378
15895
  const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
15379
15896
  const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
15380
15897
  const variant = status === "success" ? "success" : "error";
15381
- return /* @__PURE__ */ jsxs22(
15898
+ return /* @__PURE__ */ jsxs24(
15382
15899
  "div",
15383
15900
  {
15384
15901
  "data-slot": "added-to-cart-toast",
15385
15902
  "data-variant": variant,
15386
- className: cn18(
15903
+ className: cn20(
15387
15904
  "flex items-center gap-3 rounded-xl border border-border bg-card p-3 text-sm shadow-lg",
15388
15905
  variant === "success" && "border-green-600/30 dark:border-green-400/30",
15389
15906
  variant === "error" && "border-destructive/30",
@@ -15391,20 +15908,20 @@ function AddedToCartToast({
15391
15908
  ),
15392
15909
  children: [
15393
15910
  hasThumbnail && // eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
15394
- /* @__PURE__ */ jsx24("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
15395
- /* @__PURE__ */ jsxs22("div", { className: "min-w-0 flex-1", children: [
15396
- /* @__PURE__ */ jsx24("p", { className: "truncate font-semibold text-foreground", children: productName }),
15397
- /* @__PURE__ */ jsx24("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
15911
+ /* @__PURE__ */ jsx26("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
15912
+ /* @__PURE__ */ jsxs24("div", { className: "min-w-0 flex-1", children: [
15913
+ /* @__PURE__ */ jsx26("p", { className: "truncate font-semibold text-foreground", children: productName }),
15914
+ /* @__PURE__ */ jsx26("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
15398
15915
  ] }),
15399
- /* @__PURE__ */ jsx24("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx24("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
15916
+ /* @__PURE__ */ jsx26("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx26("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
15400
15917
  ]
15401
15918
  }
15402
15919
  );
15403
15920
  }
15404
15921
 
15405
15922
  // src/components/checkout-login-prompt.tsx
15406
- import { cn as cn19 } from "@reblu/site-ui/utils";
15407
- import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
15923
+ import { cn as cn21 } from "@reblu/site-ui/utils";
15924
+ import { Fragment as Fragment5, jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
15408
15925
  var DEFAULT_LABELS6 = {
15409
15926
  title: "Identificaci\xF3n",
15410
15927
  description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
@@ -15431,26 +15948,26 @@ function CheckoutLoginPrompt({
15431
15948
  if (!open) return null;
15432
15949
  const t = { ...DEFAULT_LABELS6, ...labels };
15433
15950
  const isValidEmail = EMAIL_PATTERN.test(email.trim());
15434
- return /* @__PURE__ */ jsxs23(Fragment4, { children: [
15435
- /* @__PURE__ */ jsx25("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
15436
- /* @__PURE__ */ jsxs23(
15951
+ return /* @__PURE__ */ jsxs25(Fragment5, { children: [
15952
+ /* @__PURE__ */ jsx27("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
15953
+ /* @__PURE__ */ jsxs25(
15437
15954
  "div",
15438
15955
  {
15439
15956
  role: "dialog",
15440
15957
  "aria-modal": "true",
15441
15958
  "aria-labelledby": "checkout-login-prompt-title",
15442
15959
  "data-slot": "checkout-login-prompt",
15443
- className: cn19(
15960
+ className: cn21(
15444
15961
  "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",
15445
15962
  className
15446
15963
  ),
15447
15964
  children: [
15448
- /* @__PURE__ */ jsxs23("div", { className: "flex items-start justify-between gap-3", children: [
15449
- /* @__PURE__ */ jsxs23("div", { children: [
15450
- /* @__PURE__ */ jsx25("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
15451
- /* @__PURE__ */ jsx25("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
15965
+ /* @__PURE__ */ jsxs25("div", { className: "flex items-start justify-between gap-3", children: [
15966
+ /* @__PURE__ */ jsxs25("div", { children: [
15967
+ /* @__PURE__ */ jsx27("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
15968
+ /* @__PURE__ */ jsx27("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
15452
15969
  ] }),
15453
- /* @__PURE__ */ jsx25(
15970
+ /* @__PURE__ */ jsx27(
15454
15971
  "button",
15455
15972
  {
15456
15973
  type: "button",
@@ -15461,9 +15978,9 @@ function CheckoutLoginPrompt({
15461
15978
  }
15462
15979
  )
15463
15980
  ] }),
15464
- /* @__PURE__ */ jsxs23("div", { className: "space-y-2", children: [
15465
- /* @__PURE__ */ jsx25("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
15466
- /* @__PURE__ */ jsx25(
15981
+ /* @__PURE__ */ jsxs25("div", { className: "space-y-2", children: [
15982
+ /* @__PURE__ */ jsx27("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
15983
+ /* @__PURE__ */ jsx27(
15467
15984
  "input",
15468
15985
  {
15469
15986
  id: "checkout-login-prompt-email",
@@ -15472,29 +15989,29 @@ function CheckoutLoginPrompt({
15472
15989
  value: email,
15473
15990
  onChange: (e) => onEmailChange(e.target.value),
15474
15991
  placeholder: t.emailPlaceholder,
15475
- className: cn19(
15992
+ className: cn21(
15476
15993
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
15477
15994
  error ? "border-destructive" : "border-border focus:border-primary"
15478
15995
  )
15479
15996
  }
15480
15997
  ),
15481
- error && /* @__PURE__ */ jsx25("p", { className: "text-xs text-destructive", children: error })
15998
+ error && /* @__PURE__ */ jsx27("p", { className: "text-xs text-destructive", children: error })
15482
15999
  ] }),
15483
- /* @__PURE__ */ jsxs23("div", { className: "space-y-2", children: [
15484
- /* @__PURE__ */ jsx25(
16000
+ /* @__PURE__ */ jsxs25("div", { className: "space-y-2", children: [
16001
+ /* @__PURE__ */ jsx27(
15485
16002
  "button",
15486
16003
  {
15487
16004
  type: "button",
15488
16005
  onClick: onSubmitEmail,
15489
16006
  disabled: checking || !isValidEmail,
15490
- className: cn19(
16007
+ className: cn21(
15491
16008
  "flex w-full cursor-pointer items-center justify-center gap-2 rounded-xl px-4 py-2.5 text-sm font-semibold transition-all",
15492
16009
  checking || !isValidEmail ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
15493
16010
  ),
15494
16011
  children: checking ? t.checking : t.continueWithEmail
15495
16012
  }
15496
16013
  ),
15497
- /* @__PURE__ */ jsx25(
16014
+ /* @__PURE__ */ jsx27(
15498
16015
  "button",
15499
16016
  {
15500
16017
  type: "button",
@@ -15511,9 +16028,9 @@ function CheckoutLoginPrompt({
15511
16028
  }
15512
16029
 
15513
16030
  // src/components/checkout-form.tsx
15514
- import { cn as cn20 } from "@reblu/site-ui/utils";
16031
+ import { cn as cn22 } from "@reblu/site-ui/utils";
15515
16032
  import { PhoneInput } from "@reblu/site-ui/phone-input";
15516
- import { Fragment as Fragment5, jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
16033
+ import { Fragment as Fragment6, jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
15517
16034
  var DEFAULT_LABELS7 = {
15518
16035
  contactTitle: "Datos de contacto",
15519
16036
  nameLabel: "Nombre completo",
@@ -15569,22 +16086,22 @@ function CheckoutForm({
15569
16086
  event.preventDefault();
15570
16087
  if (discountCode.trim() && !discountApplying) onApplyDiscount();
15571
16088
  }
15572
- return /* @__PURE__ */ jsxs24(Fragment5, { children: [
16089
+ return /* @__PURE__ */ jsxs26(Fragment6, { children: [
15573
16090
  loginPrompt,
15574
- /* @__PURE__ */ jsxs24(
16091
+ /* @__PURE__ */ jsxs26(
15575
16092
  "form",
15576
16093
  {
15577
16094
  "data-testid": "checkout-form",
15578
16095
  onSubmit,
15579
- className: cn20("space-y-8", className),
16096
+ className: cn22("space-y-8", className),
15580
16097
  "data-slot": "checkout-form",
15581
16098
  children: [
15582
- /* @__PURE__ */ jsxs24("section", { className: "space-y-4", children: [
15583
- /* @__PURE__ */ jsx26("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
15584
- /* @__PURE__ */ jsxs24("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
15585
- /* @__PURE__ */ jsxs24("div", { className: "space-y-1", children: [
15586
- /* @__PURE__ */ jsx26("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
15587
- /* @__PURE__ */ jsx26(
16099
+ /* @__PURE__ */ jsxs26("section", { className: "space-y-4", children: [
16100
+ /* @__PURE__ */ jsx28("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
16101
+ /* @__PURE__ */ jsxs26("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
16102
+ /* @__PURE__ */ jsxs26("div", { className: "space-y-1", children: [
16103
+ /* @__PURE__ */ jsx28("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
16104
+ /* @__PURE__ */ jsx28(
15588
16105
  "input",
15589
16106
  {
15590
16107
  id: "checkout-form-name",
@@ -15593,17 +16110,17 @@ function CheckoutForm({
15593
16110
  value: contact.name,
15594
16111
  onChange: (e) => patchContact({ name: e.target.value }),
15595
16112
  placeholder: t.namePlaceholder,
15596
- className: cn20(
16113
+ className: cn22(
15597
16114
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
15598
16115
  contactErrors?.name ? "border-destructive" : "border-border focus:border-primary"
15599
16116
  )
15600
16117
  }
15601
16118
  ),
15602
- contactErrors?.name && /* @__PURE__ */ jsx26("p", { className: "text-xs text-destructive", children: contactErrors.name })
16119
+ contactErrors?.name && /* @__PURE__ */ jsx28("p", { className: "text-xs text-destructive", children: contactErrors.name })
15603
16120
  ] }),
15604
- /* @__PURE__ */ jsxs24("div", { className: "space-y-1", children: [
15605
- /* @__PURE__ */ jsx26("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
15606
- /* @__PURE__ */ jsx26(
16121
+ /* @__PURE__ */ jsxs26("div", { className: "space-y-1", children: [
16122
+ /* @__PURE__ */ jsx28("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
16123
+ /* @__PURE__ */ jsx28(
15607
16124
  "input",
15608
16125
  {
15609
16126
  id: "checkout-form-email",
@@ -15612,15 +16129,15 @@ function CheckoutForm({
15612
16129
  value: contact.email,
15613
16130
  onChange: (e) => patchContact({ email: e.target.value }),
15614
16131
  placeholder: t.emailPlaceholder,
15615
- className: cn20(
16132
+ className: cn22(
15616
16133
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
15617
16134
  contactErrors?.email ? "border-destructive" : "border-border focus:border-primary"
15618
16135
  )
15619
16136
  }
15620
16137
  ),
15621
- contactErrors?.email && /* @__PURE__ */ jsx26("p", { className: "text-xs text-destructive", children: contactErrors.email })
16138
+ contactErrors?.email && /* @__PURE__ */ jsx28("p", { className: "text-xs text-destructive", children: contactErrors.email })
15622
16139
  ] }),
15623
- /* @__PURE__ */ jsx26("div", { className: "space-y-1", children: /* @__PURE__ */ jsx26(
16140
+ /* @__PURE__ */ jsx28("div", { className: "space-y-1", children: /* @__PURE__ */ jsx28(
15624
16141
  PhoneInput,
15625
16142
  {
15626
16143
  id: "checkout-form-phone",
@@ -15634,26 +16151,26 @@ function CheckoutForm({
15634
16151
  ] })
15635
16152
  ] }),
15636
16153
  children2,
15637
- generalError ? /* @__PURE__ */ jsx26("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
15638
- /* @__PURE__ */ jsxs24("section", { className: "space-y-3", children: [
15639
- /* @__PURE__ */ jsx26("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
15640
- autoDiscount ? /* @__PURE__ */ jsxs24(
16154
+ generalError ? /* @__PURE__ */ jsx28("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
16155
+ /* @__PURE__ */ jsxs26("section", { className: "space-y-3", children: [
16156
+ /* @__PURE__ */ jsx28("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
16157
+ autoDiscount ? /* @__PURE__ */ jsxs26(
15641
16158
  "div",
15642
16159
  {
15643
16160
  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",
15644
16161
  "data-slot": "checkout-staff-discount",
15645
16162
  children: [
15646
- /* @__PURE__ */ jsx26("span", { className: "font-semibold", children: t.staffDiscountApplied }),
15647
- /* @__PURE__ */ jsx26("span", { children: t.discountAppliedSuffix(formatPrice(autoDiscount.amount, currencyCode, locale)) })
16163
+ /* @__PURE__ */ jsx28("span", { className: "font-semibold", children: t.staffDiscountApplied }),
16164
+ /* @__PURE__ */ jsx28("span", { children: t.discountAppliedSuffix(formatPrice(autoDiscount.amount, currencyCode, locale)) })
15648
16165
  ]
15649
16166
  }
15650
16167
  ) : null,
15651
- appliedDiscount && !autoDiscount ? /* @__PURE__ */ jsxs24("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: [
15652
- /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
15653
- /* @__PURE__ */ jsx26("span", { className: "font-semibold", children: appliedDiscount.code }),
15654
- /* @__PURE__ */ jsx26("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
16168
+ appliedDiscount && !autoDiscount ? /* @__PURE__ */ jsxs26("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: [
16169
+ /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
16170
+ /* @__PURE__ */ jsx28("span", { className: "font-semibold", children: appliedDiscount.code }),
16171
+ /* @__PURE__ */ jsx28("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
15655
16172
  ] }),
15656
- /* @__PURE__ */ jsx26(
16173
+ /* @__PURE__ */ jsx28(
15657
16174
  "button",
15658
16175
  {
15659
16176
  type: "button",
@@ -15663,9 +16180,9 @@ function CheckoutForm({
15663
16180
  children: t.removeDiscount
15664
16181
  }
15665
16182
  )
15666
- ] }) : /* @__PURE__ */ jsxs24("div", { className: "flex gap-2", children: [
15667
- /* @__PURE__ */ jsx26("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
15668
- /* @__PURE__ */ jsx26(
16183
+ ] }) : /* @__PURE__ */ jsxs26("div", { className: "flex gap-2", children: [
16184
+ /* @__PURE__ */ jsx28("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
16185
+ /* @__PURE__ */ jsx28(
15669
16186
  "input",
15670
16187
  {
15671
16188
  id: "checkout-form-discount-code",
@@ -15677,7 +16194,7 @@ function CheckoutForm({
15677
16194
  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"
15678
16195
  }
15679
16196
  ),
15680
- /* @__PURE__ */ jsx26(
16197
+ /* @__PURE__ */ jsx28(
15681
16198
  "button",
15682
16199
  {
15683
16200
  type: "button",
@@ -15688,14 +16205,14 @@ function CheckoutForm({
15688
16205
  }
15689
16206
  )
15690
16207
  ] }),
15691
- discountError && /* @__PURE__ */ jsx26("p", { className: "text-xs text-destructive", children: discountError })
16208
+ discountError && /* @__PURE__ */ jsx28("p", { className: "text-xs text-destructive", children: discountError })
15692
16209
  ] }),
15693
- /* @__PURE__ */ jsx26(
16210
+ /* @__PURE__ */ jsx28(
15694
16211
  "button",
15695
16212
  {
15696
16213
  type: "submit",
15697
16214
  disabled: submitting || submitDisabled,
15698
- className: cn20(
16215
+ className: cn22(
15699
16216
  "flex w-full cursor-pointer items-center justify-center gap-2 rounded-xl px-4 py-3 font-semibold transition-all",
15700
16217
  submitting || submitDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
15701
16218
  ),
@@ -15709,11 +16226,11 @@ function CheckoutForm({
15709
16226
  }
15710
16227
 
15711
16228
  // src/components/order-confirmation.tsx
15712
- import { cn as cn22 } from "@reblu/site-ui/utils";
16229
+ import { cn as cn24 } from "@reblu/site-ui/utils";
15713
16230
 
15714
16231
  // src/components/order-invoice-link.tsx
15715
- import { cn as cn21 } from "@reblu/site-ui/utils";
15716
- import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
16232
+ import { cn as cn23 } from "@reblu/site-ui/utils";
16233
+ import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
15717
16234
  var DEFAULT_LABELS8 = {
15718
16235
  linkLabel: "Descargar la factura {number}",
15719
16236
  signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
@@ -15721,8 +16238,8 @@ var DEFAULT_LABELS8 = {
15721
16238
  function OrderInvoiceLink({ invoice, labels, className }) {
15722
16239
  if (!invoice) return null;
15723
16240
  const t = { ...DEFAULT_LABELS8, ...labels };
15724
- return /* @__PURE__ */ jsxs25("div", { className: cn21("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
15725
- /* @__PURE__ */ jsx27(
16241
+ return /* @__PURE__ */ jsxs27("div", { className: cn23("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
16242
+ /* @__PURE__ */ jsx29(
15726
16243
  "a",
15727
16244
  {
15728
16245
  href: invoice.url,
@@ -15730,19 +16247,21 @@ function OrderInvoiceLink({ invoice, labels, className }) {
15730
16247
  children: t.linkLabel.replace("{number}", invoice.number)
15731
16248
  }
15732
16249
  ),
15733
- /* @__PURE__ */ jsx27("p", { className: "text-muted-foreground", children: t.signInHint })
16250
+ /* @__PURE__ */ jsx29("p", { className: "text-muted-foreground", children: t.signInHint })
15734
16251
  ] });
15735
16252
  }
15736
16253
 
15737
16254
  // src/components/order-confirmation.tsx
15738
- import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
16255
+ import { jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
15739
16256
  var DEFAULT_LABELS9 = {
15740
16257
  pollingTitle: "Confirmando tu pedido\u2026",
15741
16258
  pollingDescription: "Estamos procesando el pago, un momento\u2026",
15742
16259
  foundTitle: "\xA1Pedido confirmado!",
15743
- // REB-1085: every buyer gets a customer account; the order email carries
15744
- // the access link. Files are never served from this page.
15745
- foundDescription: "Te hemos enviado un email con tu acceso.",
16260
+ // REB-1200 (owner OK 6-Nov): no «con tu acceso» sentence — buyers who
16261
+ // already have an account (staff, returning clients) get no new access.
16262
+ // `{number}` and `{email}` come from the order. Files are never served here.
16263
+ foundDescription: "Tu pedido {number} est\xE1 confirmado. Te hemos enviado el resumen a {email}.",
16264
+ foundWithoutOrderDescription: "Tu pedido est\xE1 confirmado.",
15746
16265
  timeoutTitle: "Pago recibido",
15747
16266
  timeoutDescription: "Tu pago se ha procesado. Recibir\xE1s un email de confirmaci\xF3n en breve.",
15748
16267
  orderNumberLabel: "Pedido confirmado",
@@ -15768,6 +16287,12 @@ var DEFAULT_LABELS9 = {
15768
16287
  invoiceLinkLabel: "Descargar la factura {number}",
15769
16288
  invoiceSignInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
15770
16289
  };
16290
+ function foundDescription(t, order) {
16291
+ const template = t.foundDescription;
16292
+ if (!/\{(number|email)\}/.test(template)) return template;
16293
+ if (!order) return t.foundWithoutOrderDescription;
16294
+ return template.replaceAll("{number}", order.orderNumber).replaceAll("{email}", order.customerEmail);
16295
+ }
15771
16296
  function OrderConfirmation({
15772
16297
  status,
15773
16298
  order,
@@ -15794,50 +16319,50 @@ function OrderConfirmation({
15794
16319
  }
15795
16320
  if (status === "not_found") return { title: t.notFoundTitle, description: t.notFoundDescription };
15796
16321
  if (status === "error") return { title: t.errorTitle, description: t.errorDescription };
15797
- if (isFound || order) return { title: t.foundTitle, description: t.foundDescription };
16322
+ if (isFound || order) return { title: t.foundTitle, description: foundDescription(t, order) };
15798
16323
  return { title: t.timeoutTitle, description: t.timeoutDescription };
15799
16324
  })();
15800
16325
  const showFullOrderSummary = Boolean(order) && (isFound || status === "timeout");
15801
16326
  const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
15802
16327
  const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
15803
16328
  const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
15804
- return /* @__PURE__ */ jsxs26("div", { className: cn22("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
15805
- /* @__PURE__ */ jsx28("h1", { className: "text-3xl font-bold", children: title }),
15806
- /* @__PURE__ */ jsx28("p", { className: "text-lg text-muted-foreground", children: description }),
15807
- showFullOrderSummary && order && /* @__PURE__ */ jsxs26("div", { className: "space-y-6", children: [
15808
- /* @__PURE__ */ jsxs26("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15809
- /* @__PURE__ */ jsx28("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
15810
- /* @__PURE__ */ jsx28("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
16329
+ return /* @__PURE__ */ jsxs28("div", { className: cn24("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
16330
+ /* @__PURE__ */ jsx30("h1", { className: "text-3xl font-bold", children: title }),
16331
+ /* @__PURE__ */ jsx30("p", { className: "text-lg text-muted-foreground", children: description }),
16332
+ showFullOrderSummary && order && /* @__PURE__ */ jsxs28("div", { className: "space-y-6", children: [
16333
+ /* @__PURE__ */ jsxs28("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
16334
+ /* @__PURE__ */ jsx30("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
16335
+ /* @__PURE__ */ jsx30("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
15811
16336
  ] }),
15812
- /* @__PURE__ */ jsxs26("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
15813
- order.items.map((item, idx) => /* @__PURE__ */ jsxs26(
16337
+ /* @__PURE__ */ jsxs28("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
16338
+ order.items.map((item, idx) => /* @__PURE__ */ jsxs28(
15814
16339
  "div",
15815
16340
  {
15816
16341
  className: "flex justify-between gap-4 text-sm",
15817
16342
  children: [
15818
- /* @__PURE__ */ jsxs26("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
16343
+ /* @__PURE__ */ jsxs28("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
15819
16344
  item.product.name,
15820
16345
  item.variant ? ` (${item.variant.name})` : "",
15821
16346
  " x",
15822
16347
  item.quantity
15823
16348
  ] }),
15824
- /* @__PURE__ */ jsx28("span", { children: formatPrice(item.total, currencyCode, locale) })
16349
+ /* @__PURE__ */ jsx30("span", { children: formatPrice(item.total, currencyCode, locale) })
15825
16350
  ]
15826
16351
  },
15827
16352
  idx
15828
16353
  )),
15829
- /* @__PURE__ */ jsx28("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ jsxs26("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
15830
- /* @__PURE__ */ jsx28("span", { children: t.totalLabel }),
15831
- /* @__PURE__ */ jsx28("span", { children: formatPrice(order.total, currencyCode, locale) })
16354
+ /* @__PURE__ */ jsx30("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ jsxs28("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
16355
+ /* @__PURE__ */ jsx30("span", { children: t.totalLabel }),
16356
+ /* @__PURE__ */ jsx30("span", { children: formatPrice(order.total, currencyCode, locale) })
15832
16357
  ] }) })
15833
16358
  ] }),
15834
- /* @__PURE__ */ jsxs26("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
16359
+ t.foundDescription.includes("{email}") ? null : /* @__PURE__ */ jsxs28("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
15835
16360
  t.confirmationEmailPrefix,
15836
16361
  " ",
15837
- /* @__PURE__ */ jsx28("span", { className: "font-medium text-foreground", children: order.customerEmail }),
16362
+ /* @__PURE__ */ jsx30("span", { className: "font-medium text-foreground", children: order.customerEmail }),
15838
16363
  "."
15839
16364
  ] }),
15840
- /* @__PURE__ */ jsx28(
16365
+ /* @__PURE__ */ jsx30(
15841
16366
  OrderInvoiceLink,
15842
16367
  {
15843
16368
  invoice: order.invoice,
@@ -15845,11 +16370,11 @@ function OrderConfirmation({
15845
16370
  }
15846
16371
  )
15847
16372
  ] }),
15848
- showOrderReference && order && /* @__PURE__ */ jsxs26("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15849
- /* @__PURE__ */ jsx28("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
15850
- /* @__PURE__ */ jsx28("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
16373
+ showOrderReference && order && /* @__PURE__ */ jsxs28("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
16374
+ /* @__PURE__ */ jsx30("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
16375
+ /* @__PURE__ */ jsx30("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
15851
16376
  ] }),
15852
- status === "failed" && cartHref && /* @__PURE__ */ jsx28(
16377
+ status === "failed" && cartHref && /* @__PURE__ */ jsx30(
15853
16378
  "a",
15854
16379
  {
15855
16380
  href: cartHref,
@@ -15857,7 +16382,7 @@ function OrderConfirmation({
15857
16382
  children: t.backToCartLabel
15858
16383
  }
15859
16384
  ),
15860
- showRecheck && /* @__PURE__ */ jsx28(
16385
+ showRecheck && /* @__PURE__ */ jsx30(
15861
16386
  "button",
15862
16387
  {
15863
16388
  type: "button",
@@ -15866,16 +16391,16 @@ function OrderConfirmation({
15866
16391
  children: t.recheckLabel
15867
16392
  }
15868
16393
  ),
15869
- showSessionReference && /* @__PURE__ */ jsxs26("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15870
- /* @__PURE__ */ jsx28("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
15871
- /* @__PURE__ */ jsx28("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
16394
+ showSessionReference && /* @__PURE__ */ jsxs28("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
16395
+ /* @__PURE__ */ jsx30("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
16396
+ /* @__PURE__ */ jsx30("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
15872
16397
  ] })
15873
16398
  ] });
15874
16399
  }
15875
16400
 
15876
16401
  // src/components/full-invoice-fields.tsx
15877
- import { cn as cn23 } from "@reblu/site-ui/utils";
15878
- import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
16402
+ import { cn as cn25 } from "@reblu/site-ui/utils";
16403
+ import { jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
15879
16404
  var EMPTY_FULL_INVOICE_VALUE = {
15880
16405
  wantsFullInvoice: false,
15881
16406
  billingIdType: "NIF",
@@ -15992,12 +16517,12 @@ function FullInvoiceFields({
15992
16517
  const showFields = value.wantsFullInvoice || overCap;
15993
16518
  const isSpanishNif = value.billingIdType === "NIF";
15994
16519
  const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
15995
- const error = (key2) => errors[key2] ? /* @__PURE__ */ jsx29("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
16520
+ const error = (key2) => errors[key2] ? /* @__PURE__ */ jsx31("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
15996
16521
  const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
15997
- return /* @__PURE__ */ jsxs27("section", { className: cn23("space-y-4", className), "data-slot": "full-invoice-fields", children: [
15998
- overCap ? /* @__PURE__ */ jsx29("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ jsxs27("div", { className: "space-y-1", children: [
15999
- /* @__PURE__ */ jsxs27("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
16000
- /* @__PURE__ */ jsx29(
16522
+ return /* @__PURE__ */ jsxs29("section", { className: cn25("space-y-4", className), "data-slot": "full-invoice-fields", children: [
16523
+ overCap ? /* @__PURE__ */ jsx31("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ jsxs29("div", { className: "space-y-1", children: [
16524
+ /* @__PURE__ */ jsxs29("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
16525
+ /* @__PURE__ */ jsx31(
16001
16526
  "input",
16002
16527
  {
16003
16528
  type: "checkbox",
@@ -16007,12 +16532,12 @@ function FullInvoiceFields({
16007
16532
  ),
16008
16533
  t.toggle
16009
16534
  ] }),
16010
- /* @__PURE__ */ jsx29("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
16535
+ /* @__PURE__ */ jsx31("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
16011
16536
  ] }),
16012
- showFields && /* @__PURE__ */ jsxs27("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
16013
- /* @__PURE__ */ jsxs27("div", { className: "space-y-1", children: [
16014
- /* @__PURE__ */ jsx29("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
16015
- /* @__PURE__ */ jsx29(
16537
+ showFields && /* @__PURE__ */ jsxs29("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
16538
+ /* @__PURE__ */ jsxs29("div", { className: "space-y-1", children: [
16539
+ /* @__PURE__ */ jsx31("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
16540
+ /* @__PURE__ */ jsx31(
16016
16541
  "select",
16017
16542
  {
16018
16543
  id: "full-invoice-id-type",
@@ -16021,14 +16546,14 @@ function FullInvoiceFields({
16021
16546
  value: value.billingIdType,
16022
16547
  onChange: (e) => set("billingIdType", e.target.value),
16023
16548
  ...invalid2("billingIdType"),
16024
- children: ID_TYPES.map((type) => /* @__PURE__ */ jsx29("option", { value: type, children: t.idTypeOptions[type] }, type))
16549
+ children: ID_TYPES.map((type) => /* @__PURE__ */ jsx31("option", { value: type, children: t.idTypeOptions[type] }, type))
16025
16550
  }
16026
16551
  ),
16027
16552
  error("billingIdType")
16028
16553
  ] }),
16029
- !isSpanishNif && /* @__PURE__ */ jsxs27("div", { className: "space-y-1", children: [
16030
- /* @__PURE__ */ jsx29("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
16031
- /* @__PURE__ */ jsxs27(
16554
+ !isSpanishNif && /* @__PURE__ */ jsxs29("div", { className: "space-y-1", children: [
16555
+ /* @__PURE__ */ jsx31("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
16556
+ /* @__PURE__ */ jsxs29(
16032
16557
  "select",
16033
16558
  {
16034
16559
  id: "full-invoice-id-country",
@@ -16038,16 +16563,16 @@ function FullInvoiceFields({
16038
16563
  onChange: (e) => set("billingIdCountry", e.target.value),
16039
16564
  ...invalid2("billingIdCountry"),
16040
16565
  children: [
16041
- /* @__PURE__ */ jsx29("option", { value: "", disabled: true, children: t.chooseCountry }),
16042
- countries.map((c) => /* @__PURE__ */ jsx29("option", { value: c.code, children: c.name }, c.code))
16566
+ /* @__PURE__ */ jsx31("option", { value: "", disabled: true, children: t.chooseCountry }),
16567
+ countries.map((c) => /* @__PURE__ */ jsx31("option", { value: c.code, children: c.name }, c.code))
16043
16568
  ]
16044
16569
  }
16045
16570
  ),
16046
16571
  error("billingIdCountry")
16047
16572
  ] }),
16048
- /* @__PURE__ */ jsxs27("div", { className: "space-y-1", children: [
16049
- /* @__PURE__ */ jsx29("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
16050
- /* @__PURE__ */ jsx29(
16573
+ /* @__PURE__ */ jsxs29("div", { className: "space-y-1", children: [
16574
+ /* @__PURE__ */ jsx31("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
16575
+ /* @__PURE__ */ jsx31(
16051
16576
  "input",
16052
16577
  {
16053
16578
  id: "full-invoice-nif",
@@ -16060,9 +16585,9 @@ function FullInvoiceFields({
16060
16585
  ),
16061
16586
  error("billingNif")
16062
16587
  ] }),
16063
- /* @__PURE__ */ jsxs27("div", { className: "space-y-1", children: [
16064
- /* @__PURE__ */ jsx29("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
16065
- /* @__PURE__ */ jsx29(
16588
+ /* @__PURE__ */ jsxs29("div", { className: "space-y-1", children: [
16589
+ /* @__PURE__ */ jsx31("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
16590
+ /* @__PURE__ */ jsx31(
16066
16591
  "input",
16067
16592
  {
16068
16593
  id: "full-invoice-name",
@@ -16075,9 +16600,9 @@ function FullInvoiceFields({
16075
16600
  ),
16076
16601
  error("billingName")
16077
16602
  ] }),
16078
- /* @__PURE__ */ jsxs27("div", { className: "space-y-1 sm:col-span-2", children: [
16079
- /* @__PURE__ */ jsx29("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
16080
- /* @__PURE__ */ jsx29(
16603
+ /* @__PURE__ */ jsxs29("div", { className: "space-y-1 sm:col-span-2", children: [
16604
+ /* @__PURE__ */ jsx31("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
16605
+ /* @__PURE__ */ jsx31(
16081
16606
  "input",
16082
16607
  {
16083
16608
  id: "full-invoice-street",
@@ -16089,9 +16614,9 @@ function FullInvoiceFields({
16089
16614
  }
16090
16615
  )
16091
16616
  ] }),
16092
- /* @__PURE__ */ jsxs27("div", { className: "space-y-1", children: [
16093
- /* @__PURE__ */ jsx29("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
16094
- /* @__PURE__ */ jsx29(
16617
+ /* @__PURE__ */ jsxs29("div", { className: "space-y-1", children: [
16618
+ /* @__PURE__ */ jsx31("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
16619
+ /* @__PURE__ */ jsx31(
16095
16620
  "input",
16096
16621
  {
16097
16622
  id: "full-invoice-postal-code",
@@ -16102,9 +16627,9 @@ function FullInvoiceFields({
16102
16627
  }
16103
16628
  )
16104
16629
  ] }),
16105
- /* @__PURE__ */ jsxs27("div", { className: "space-y-1", children: [
16106
- /* @__PURE__ */ jsx29("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
16107
- /* @__PURE__ */ jsx29(
16630
+ /* @__PURE__ */ jsxs29("div", { className: "space-y-1", children: [
16631
+ /* @__PURE__ */ jsx31("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
16632
+ /* @__PURE__ */ jsx31(
16108
16633
  "input",
16109
16634
  {
16110
16635
  id: "full-invoice-city",
@@ -16115,9 +16640,9 @@ function FullInvoiceFields({
16115
16640
  }
16116
16641
  )
16117
16642
  ] }),
16118
- /* @__PURE__ */ jsxs27("div", { className: "space-y-1", children: [
16119
- /* @__PURE__ */ jsx29("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
16120
- /* @__PURE__ */ jsx29(
16643
+ /* @__PURE__ */ jsxs29("div", { className: "space-y-1", children: [
16644
+ /* @__PURE__ */ jsx31("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
16645
+ /* @__PURE__ */ jsx31(
16121
16646
  "select",
16122
16647
  {
16123
16648
  id: "full-invoice-country",
@@ -16125,18 +16650,18 @@ function FullInvoiceFields({
16125
16650
  required: true,
16126
16651
  value: value.country,
16127
16652
  onChange: (e) => set("country", e.target.value),
16128
- children: countries.map((c) => /* @__PURE__ */ jsx29("option", { value: c.code, children: c.name }, c.code))
16653
+ children: countries.map((c) => /* @__PURE__ */ jsx31("option", { value: c.code, children: c.name }, c.code))
16129
16654
  }
16130
16655
  )
16131
16656
  ] }),
16132
- /* @__PURE__ */ jsx29("div", { className: "sm:col-span-2", children: error("address") })
16657
+ /* @__PURE__ */ jsx31("div", { className: "sm:col-span-2", children: error("address") })
16133
16658
  ] })
16134
16659
  ] });
16135
16660
  }
16136
16661
 
16137
16662
  // src/components/checkout-delivery-choice.tsx
16138
- import { cn as cn24 } from "@reblu/site-ui/utils";
16139
- import { jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
16663
+ import { cn as cn26 } from "@reblu/site-ui/utils";
16664
+ import { jsx as jsx32, jsxs as jsxs30 } from "react/jsx-runtime";
16140
16665
  var EMPTY_CHECKOUT_ADDRESS = {
16141
16666
  firstName: "",
16142
16667
  lastName: "",
@@ -16199,17 +16724,17 @@ function CheckoutDeliveryChoice({
16199
16724
  const isPickup = value?.type === "PICKUP";
16200
16725
  const isShipping = value?.type === "SHIPPING";
16201
16726
  const errorId = `${uid}-delivery-error`;
16202
- return /* @__PURE__ */ jsxs28(
16727
+ return /* @__PURE__ */ jsxs30(
16203
16728
  "fieldset",
16204
16729
  {
16205
16730
  "data-slot": "checkout-delivery",
16206
16731
  "aria-describedby": error ? errorId : void 0,
16207
- className: cn24("space-y-4", className),
16732
+ className: cn26("space-y-4", className),
16208
16733
  children: [
16209
- /* @__PURE__ */ jsx30("legend", { className: "mb-2 text-lg font-semibold", children: t.legend }),
16210
- /* @__PURE__ */ jsxs28("div", { className: "grid gap-3 sm:grid-cols-2", children: [
16211
- homeDelivery ? /* @__PURE__ */ jsxs28("label", { className: "flex cursor-pointer items-start gap-3 rounded-xl border border-border p-4 has-[:checked]:border-primary", children: [
16212
- /* @__PURE__ */ jsx30(
16734
+ /* @__PURE__ */ jsx32("legend", { className: "mb-2 text-lg font-semibold", children: t.legend }),
16735
+ /* @__PURE__ */ jsxs30("div", { className: "grid gap-3 sm:grid-cols-2", children: [
16736
+ homeDelivery ? /* @__PURE__ */ jsxs30("label", { className: "flex cursor-pointer items-start gap-3 rounded-xl border border-border p-4 has-[:checked]:border-primary", children: [
16737
+ /* @__PURE__ */ jsx32(
16213
16738
  "input",
16214
16739
  {
16215
16740
  type: "radio",
@@ -16219,42 +16744,42 @@ function CheckoutDeliveryChoice({
16219
16744
  className: "mt-0.5 size-4 accent-primary"
16220
16745
  }
16221
16746
  ),
16222
- /* @__PURE__ */ jsxs28("span", { className: "flex-1 space-y-1", children: [
16223
- /* @__PURE__ */ jsxs28("span", { className: "flex justify-between gap-2 font-medium", children: [
16224
- /* @__PURE__ */ jsx30("span", { children: copy.shippingOptionLabel }),
16225
- /* @__PURE__ */ jsx30("span", { className: "tabular-nums", children: homeCost })
16747
+ /* @__PURE__ */ jsxs30("span", { className: "flex-1 space-y-1", children: [
16748
+ /* @__PURE__ */ jsxs30("span", { className: "flex justify-between gap-2 font-medium", children: [
16749
+ /* @__PURE__ */ jsx32("span", { children: copy.shippingOptionLabel }),
16750
+ /* @__PURE__ */ jsx32("span", { className: "tabular-nums", children: homeCost })
16226
16751
  ] }),
16227
- delivery.estimatedDeliveryText ? /* @__PURE__ */ jsx30("span", { className: "block text-sm text-muted-foreground", children: delivery.estimatedDeliveryText }) : null
16752
+ delivery.estimatedDeliveryText ? /* @__PURE__ */ jsx32("span", { className: "block text-sm text-muted-foreground", children: delivery.estimatedDeliveryText }) : null
16228
16753
  ] })
16229
16754
  ] }) : null,
16230
- pickup ? /* @__PURE__ */ jsxs28("label", { className: "flex cursor-pointer items-start gap-3 rounded-xl border border-border p-4 has-[:checked]:border-primary", children: [
16231
- /* @__PURE__ */ jsx30(
16755
+ pickup ? /* @__PURE__ */ jsxs30("label", { className: "flex cursor-pointer items-start gap-3 rounded-xl border border-border p-4 has-[:checked]:border-primary", children: [
16756
+ /* @__PURE__ */ jsx32(
16232
16757
  "input",
16233
16758
  {
16234
16759
  type: "radio",
16235
16760
  name: `${uid}-method`,
16236
16761
  checked: isPickup,
16237
- onChange: () => onChange({ type: "PICKUP" }),
16762
+ onChange: () => onChange(pickupFulfillment(delivery)),
16238
16763
  className: "mt-0.5 size-4 accent-primary"
16239
16764
  }
16240
16765
  ),
16241
- /* @__PURE__ */ jsxs28("span", { className: "flex flex-1 justify-between gap-2 font-medium", children: [
16242
- /* @__PURE__ */ jsx30("span", { children: copy.pickupOptionLabel }),
16243
- /* @__PURE__ */ jsx30("span", { children: t.free })
16766
+ /* @__PURE__ */ jsxs30("span", { className: "flex flex-1 justify-between gap-2 font-medium", children: [
16767
+ /* @__PURE__ */ jsx32("span", { children: copy.pickupOptionLabel }),
16768
+ /* @__PURE__ */ jsx32("span", { children: t.free })
16244
16769
  ] })
16245
16770
  ] }) : null
16246
16771
  ] }),
16247
- error ? /* @__PURE__ */ jsx30("p", { id: errorId, role: "alert", className: "text-sm text-destructive", children: error }) : null,
16248
- isPickup ? /* @__PURE__ */ jsxs28("div", { role: "radiogroup", "aria-labelledby": `${uid}-points`, className: "space-y-2", children: [
16249
- /* @__PURE__ */ jsx30("p", { id: `${uid}-points`, className: "text-sm font-medium", children: t.pickupPointsLegend }),
16772
+ error ? /* @__PURE__ */ jsx32("p", { id: errorId, role: "alert", className: "text-sm text-destructive", children: error }) : null,
16773
+ isPickup ? /* @__PURE__ */ jsxs30("div", { role: "radiogroup", "aria-labelledby": `${uid}-points`, className: "space-y-2", children: [
16774
+ /* @__PURE__ */ jsx32("p", { id: `${uid}-points`, className: "text-sm font-medium", children: t.pickupPointsLegend }),
16250
16775
  delivery.pickupLocations.map((location2) => {
16251
16776
  const descId = `${uid}-point-${location2.id}`;
16252
- return /* @__PURE__ */ jsxs28(
16777
+ return /* @__PURE__ */ jsxs30(
16253
16778
  "label",
16254
16779
  {
16255
16780
  className: "flex cursor-pointer items-start gap-3 rounded-lg border border-border p-3 has-[:checked]:border-primary",
16256
16781
  children: [
16257
- /* @__PURE__ */ jsx30(
16782
+ /* @__PURE__ */ jsx32(
16258
16783
  "input",
16259
16784
  {
16260
16785
  type: "radio",
@@ -16265,9 +16790,9 @@ function CheckoutDeliveryChoice({
16265
16790
  className: "mt-0.5 size-4 accent-primary"
16266
16791
  }
16267
16792
  ),
16268
- /* @__PURE__ */ jsxs28("span", { className: "space-y-0.5 text-sm", children: [
16269
- /* @__PURE__ */ jsx30("span", { className: "block font-medium", children: location2.name }),
16270
- /* @__PURE__ */ jsx30("span", { id: descId, className: "block text-muted-foreground", children: pickupDescription(location2) })
16793
+ /* @__PURE__ */ jsxs30("span", { className: "space-y-0.5 text-sm", children: [
16794
+ /* @__PURE__ */ jsx32("span", { className: "block font-medium", children: location2.name }),
16795
+ /* @__PURE__ */ jsx32("span", { id: descId, className: "block text-muted-foreground", children: pickupDescription(location2) })
16271
16796
  ] })
16272
16797
  ]
16273
16798
  },
@@ -16275,14 +16800,14 @@ function CheckoutDeliveryChoice({
16275
16800
  );
16276
16801
  })
16277
16802
  ] }) : null,
16278
- isShipping ? /* @__PURE__ */ jsxs28("fieldset", { className: "space-y-3", children: [
16279
- /* @__PURE__ */ jsx30("legend", { className: "mb-2 text-sm font-medium", children: t.addressLegend }),
16280
- /* @__PURE__ */ jsx30("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: ADDRESS_FIELDS.map(({ key: key2, autoComplete, required, wide }) => {
16803
+ isShipping ? /* @__PURE__ */ jsxs30("fieldset", { className: "space-y-3", children: [
16804
+ /* @__PURE__ */ jsx32("legend", { className: "mb-2 text-sm font-medium", children: t.addressLegend }),
16805
+ /* @__PURE__ */ jsx32("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: ADDRESS_FIELDS.map(({ key: key2, autoComplete, required, wide }) => {
16281
16806
  const fieldId = `${uid}-${key2}`;
16282
16807
  const fieldError = addressErrors?.[key2];
16283
- return /* @__PURE__ */ jsxs28("div", { className: cn24("space-y-1", wide && "sm:col-span-2"), children: [
16284
- /* @__PURE__ */ jsx30("label", { htmlFor: fieldId, className: "text-sm font-medium", children: t[key2] }),
16285
- /* @__PURE__ */ jsx30(
16808
+ return /* @__PURE__ */ jsxs30("div", { className: cn26("space-y-1", wide && "sm:col-span-2"), children: [
16809
+ /* @__PURE__ */ jsx32("label", { htmlFor: fieldId, className: "text-sm font-medium", children: t[key2] }),
16810
+ /* @__PURE__ */ jsx32(
16286
16811
  "input",
16287
16812
  {
16288
16813
  id: fieldId,
@@ -16293,13 +16818,13 @@ function CheckoutDeliveryChoice({
16293
16818
  onChange: (e) => onAddressChange({ ...address, [key2]: e.target.value }),
16294
16819
  "aria-invalid": fieldError ? true : void 0,
16295
16820
  "aria-describedby": fieldError ? `${fieldId}-error` : void 0,
16296
- className: cn24(
16821
+ className: cn26(
16297
16822
  INPUT_CLASS,
16298
16823
  fieldError ? "border-destructive" : "border-border focus:border-primary"
16299
16824
  )
16300
16825
  }
16301
16826
  ),
16302
- fieldError ? /* @__PURE__ */ jsx30("p", { id: `${fieldId}-error`, className: "text-sm text-destructive", children: fieldError }) : null
16827
+ fieldError ? /* @__PURE__ */ jsx32("p", { id: `${fieldId}-error`, className: "text-sm text-destructive", children: fieldError }) : null
16303
16828
  ] }, key2);
16304
16829
  }) })
16305
16830
  ] }) : null
@@ -16307,12 +16832,19 @@ function CheckoutDeliveryChoice({
16307
16832
  }
16308
16833
  );
16309
16834
  }
16835
+ function pickupFulfillment(delivery) {
16836
+ const [only, ...rest] = delivery.pickupLocations;
16837
+ return only && rest.length === 0 ? { type: "PICKUP", pickupLocationId: only.id } : { type: "PICKUP" };
16838
+ }
16310
16839
  function defaultCheckoutFulfillment(delivery) {
16311
16840
  if (!delivery) return null;
16312
16841
  if (delivery.methods.homeDelivery) return { type: "SHIPPING" };
16313
16842
  if (!delivery.methods.pickup) return null;
16314
- const [only, ...rest] = delivery.pickupLocations;
16315
- return only && rest.length === 0 ? { type: "PICKUP", pickupLocationId: only.id } : { type: "PICKUP" };
16843
+ return pickupFulfillment(delivery);
16844
+ }
16845
+ function isCheckoutDeliveryComplete(value, requiresDelivery = true) {
16846
+ if (!value || !requiresDelivery) return true;
16847
+ return value.type !== "PICKUP" || Boolean(value.pickupLocationId);
16316
16848
  }
16317
16849
  function quoteRequiresDelivery(quote) {
16318
16850
  return quote ? quote.lines.some((line) => line.isShippable) : true;
@@ -16334,8 +16866,8 @@ function toCheckoutFulfillmentFields(value, address, requiresDelivery = true) {
16334
16866
  }
16335
16867
 
16336
16868
  // src/components/checkout-quote-summary.tsx
16337
- import { cn as cn25 } from "@reblu/site-ui/utils";
16338
- import { Fragment as Fragment6, jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
16869
+ import { cn as cn27 } from "@reblu/site-ui/utils";
16870
+ import { Fragment as Fragment7, jsx as jsx33, jsxs as jsxs31 } from "react/jsx-runtime";
16339
16871
  var DEFAULT_CHECKOUT_QUOTE_SUMMARY_LABELS = {
16340
16872
  subtotal: "Subtotal",
16341
16873
  discount: (codeOrLabel, isAutomatic) => isAutomatic ? codeOrLabel : `Descuento (${codeOrLabel})`,
@@ -16352,9 +16884,9 @@ function Row({
16352
16884
  value,
16353
16885
  className
16354
16886
  }) {
16355
- return /* @__PURE__ */ jsxs29("div", { "data-slot": "checkout-quote-row", className: cn25("flex justify-between gap-4", className), children: [
16356
- /* @__PURE__ */ jsx31("dt", { children: name }),
16357
- /* @__PURE__ */ jsx31("dd", { className: "shrink-0 tabular-nums", children: value })
16887
+ return /* @__PURE__ */ jsxs31("div", { "data-slot": "checkout-quote-row", className: cn27("flex justify-between gap-4", className), children: [
16888
+ /* @__PURE__ */ jsx33("dt", { children: name }),
16889
+ /* @__PURE__ */ jsx33("dd", { className: "shrink-0 tabular-nums", children: value })
16358
16890
  ] });
16359
16891
  }
16360
16892
  function CheckoutQuoteSummary({
@@ -16370,22 +16902,22 @@ function CheckoutQuoteSummary({
16370
16902
  const price = (cents) => formatPrice(cents, currencyCode, locale);
16371
16903
  const { fulfillment, shipping, tax, discount } = quote;
16372
16904
  const Tag = `h${headingLevel}`;
16373
- return /* @__PURE__ */ jsxs29("section", { "data-slot": "checkout-quote-summary", className: slotClassName("space-y-4", "", className), children: [
16374
- heading ? /* @__PURE__ */ jsx31(Tag, { className: "text-lg font-semibold", children: heading }) : null,
16375
- /* @__PURE__ */ jsx31("ul", { className: "space-y-3 text-sm", children: quote.lines.map((line) => /* @__PURE__ */ jsxs29("li", { className: "flex justify-between gap-4", children: [
16376
- /* @__PURE__ */ jsxs29("div", { className: "min-w-0 space-y-0.5", children: [
16377
- /* @__PURE__ */ jsx31("p", { className: "font-medium", children: line.name }),
16378
- line.variantName ? /* @__PURE__ */ jsx31("p", { className: "text-muted-foreground", children: line.variantName }) : null,
16379
- /* @__PURE__ */ jsxs29("p", { className: "flex flex-wrap items-center gap-2 text-muted-foreground", children: [
16380
- line.kindLabel ? /* @__PURE__ */ jsx31("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,
16381
- /* @__PURE__ */ jsx31("span", { children: t.quantityTimesUnit(line.quantity, price(line.unitPrice)) })
16905
+ return /* @__PURE__ */ jsxs31("section", { "data-slot": "checkout-quote-summary", className: slotClassName("space-y-4", "", className), children: [
16906
+ heading ? /* @__PURE__ */ jsx33(Tag, { className: "text-lg font-semibold", children: heading }) : null,
16907
+ /* @__PURE__ */ jsx33("ul", { className: "space-y-3 text-sm", children: quote.lines.map((line) => /* @__PURE__ */ jsxs31("li", { className: "flex justify-between gap-4", children: [
16908
+ /* @__PURE__ */ jsxs31("div", { className: "min-w-0 space-y-0.5", children: [
16909
+ /* @__PURE__ */ jsx33("p", { className: "font-medium", children: line.name }),
16910
+ line.variantName ? /* @__PURE__ */ jsx33("p", { className: "text-muted-foreground", children: line.variantName }) : null,
16911
+ /* @__PURE__ */ jsxs31("p", { className: "flex flex-wrap items-center gap-2 text-muted-foreground", children: [
16912
+ line.kindLabel ? /* @__PURE__ */ jsx33("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,
16913
+ /* @__PURE__ */ jsx33("span", { children: t.quantityTimesUnit(line.quantity, price(line.unitPrice)) })
16382
16914
  ] })
16383
16915
  ] }),
16384
- /* @__PURE__ */ jsx31("span", { className: "shrink-0 tabular-nums", children: price(line.total) })
16916
+ /* @__PURE__ */ jsx33("span", { className: "shrink-0 tabular-nums", children: price(line.total) })
16385
16917
  ] }, `${line.productId}-${line.variantId ?? ""}`)) }),
16386
- /* @__PURE__ */ jsxs29("dl", { className: "space-y-2 border-t border-border pt-3 text-sm", children: [
16387
- /* @__PURE__ */ jsx31(Row, { name: t.subtotal, value: price(quote.subtotal) }),
16388
- discount && discount.amount > 0 ? /* @__PURE__ */ jsx31(
16918
+ /* @__PURE__ */ jsxs31("dl", { className: "space-y-2 border-t border-border pt-3 text-sm", children: [
16919
+ /* @__PURE__ */ jsx33(Row, { name: t.subtotal, value: price(quote.subtotal) }),
16920
+ discount && discount.amount > 0 ? /* @__PURE__ */ jsx33(
16389
16921
  Row,
16390
16922
  {
16391
16923
  className: "text-green-700 dark:text-green-400",
@@ -16393,17 +16925,17 @@ function CheckoutQuoteSummary({
16393
16925
  value: `\u2212${price(discount.amount)}`
16394
16926
  }
16395
16927
  ) : null,
16396
- fulfillment.type ? /* @__PURE__ */ jsx31(
16928
+ fulfillment.type ? /* @__PURE__ */ jsx33(
16397
16929
  Row,
16398
16930
  {
16399
- name: /* @__PURE__ */ jsxs29(Fragment6, { children: [
16931
+ name: /* @__PURE__ */ jsxs31(Fragment7, { children: [
16400
16932
  fulfillment.label ?? t.delivery,
16401
- fulfillment.type === "PICKUP" && fulfillment.pickupLocation ? /* @__PURE__ */ jsx31("span", { className: "block text-muted-foreground", children: fulfillment.pickupLocation.name }) : null
16933
+ fulfillment.type === "PICKUP" && fulfillment.pickupLocation ? /* @__PURE__ */ jsx33("span", { className: "block text-muted-foreground", children: fulfillment.pickupLocation.name }) : null
16402
16934
  ] }),
16403
16935
  value: fulfillment.type === "PICKUP" || shipping.isFree ? t.free : price(shipping.cost)
16404
16936
  }
16405
16937
  ) : null,
16406
- tax.isLineVisible ? tax.breakdown.map((entry) => /* @__PURE__ */ jsx31(
16938
+ tax.isLineVisible ? tax.breakdown.map((entry) => /* @__PURE__ */ jsx33(
16407
16939
  Row,
16408
16940
  {
16409
16941
  className: tax.isIncluded ? "text-muted-foreground" : void 0,
@@ -16412,19 +16944,44 @@ function CheckoutQuoteSummary({
16412
16944
  },
16413
16945
  entry.label
16414
16946
  )) : null,
16415
- /* @__PURE__ */ jsx31(Row, { className: "border-t border-border pt-2 text-base font-bold", name: t.total, value: price(quote.total) })
16947
+ /* @__PURE__ */ jsx33(Row, { className: "border-t border-border pt-2 text-base font-bold", name: t.total, value: price(quote.total) })
16416
16948
  ] }),
16417
- tax.isIncluded ? /* @__PURE__ */ jsx31("p", { className: "text-sm text-muted-foreground", children: t.taxesIncludedNote }) : null,
16418
- fulfillment.type === "SHIPPING" && !shipping.isFree && shipping.remainingForFree ? /* @__PURE__ */ jsx31("p", { className: "text-sm text-muted-foreground", children: t.remainingForFree(price(shipping.remainingForFree)) }) : null,
16419
- fulfillment.type && quote.deliveryEstimateText ? /* @__PURE__ */ jsx31("p", { "data-slot": "checkout-quote-estimate", className: "text-sm text-muted-foreground", children: quote.deliveryEstimateText }) : null,
16420
- quote.discountError ? /* @__PURE__ */ jsx31("p", { role: "status", className: "text-sm text-destructive", children: quote.discountError.message }) : null,
16421
- quote.blockingReason ? /* @__PURE__ */ jsx31("p", { role: "alert", className: "rounded-lg border border-destructive/50 bg-destructive/10 p-3 text-sm text-destructive", children: quote.blockingReason.message }) : null
16949
+ tax.isIncluded ? /* @__PURE__ */ jsx33("p", { className: "text-sm text-muted-foreground", children: t.taxesIncludedNote }) : null,
16950
+ fulfillment.type === "SHIPPING" && !shipping.isFree && shipping.remainingForFree ? /* @__PURE__ */ jsx33("p", { className: "text-sm text-muted-foreground", children: t.remainingForFree(price(shipping.remainingForFree)) }) : null,
16951
+ fulfillment.type && quote.deliveryEstimateText ? /* @__PURE__ */ jsx33("p", { "data-slot": "checkout-quote-estimate", className: "text-sm text-muted-foreground", children: quote.deliveryEstimateText }) : null,
16952
+ quote.discountError ? /* @__PURE__ */ jsx33("p", { role: "status", className: "text-sm text-destructive", children: quote.discountError.message }) : null,
16953
+ quote.blockingReason ? /* @__PURE__ */ jsx33("p", { role: "alert", className: "rounded-lg border border-destructive/50 bg-destructive/10 p-3 text-sm text-destructive", children: quote.blockingReason.message }) : null
16422
16954
  ] });
16423
16955
  }
16956
+ var DEFAULT_CHECKOUT_QUOTE_NOTICE_LABELS = {
16957
+ pickupLocationRequired: "Elige un punto de recogida"
16958
+ };
16959
+ function checkoutQuoteNotice({
16960
+ fulfillment,
16961
+ requiresDelivery = true,
16962
+ error
16963
+ }) {
16964
+ if (!isCheckoutDeliveryComplete(fulfillment, requiresDelivery)) return "PICKUP_LOCATION_REQUIRED";
16965
+ if (error?.code === "PICKUP_LOCATION_INVALID") return "PICKUP_LOCATION_REQUIRED";
16966
+ return null;
16967
+ }
16968
+ function CheckoutQuoteNotice({ reason, labels, className }) {
16969
+ if (!reason) return null;
16970
+ const t = { ...DEFAULT_CHECKOUT_QUOTE_NOTICE_LABELS, ...labels };
16971
+ return /* @__PURE__ */ jsx33(
16972
+ "p",
16973
+ {
16974
+ role: "status",
16975
+ "data-slot": "checkout-quote-notice",
16976
+ className: slotClassName("rounded-lg border border-border bg-muted p-3 text-sm", "", className),
16977
+ children: t.pickupLocationRequired
16978
+ }
16979
+ );
16980
+ }
16424
16981
 
16425
16982
  // src/components/checkout-terms-acceptance.tsx
16426
- import { cn as cn26 } from "@reblu/site-ui/utils";
16427
- import { Fragment as Fragment7, jsx as jsx32, jsxs as jsxs30 } from "react/jsx-runtime";
16983
+ import { cn as cn28 } from "@reblu/site-ui/utils";
16984
+ import { Fragment as Fragment8, jsx as jsx34, jsxs as jsxs32 } from "react/jsx-runtime";
16428
16985
  function splitTermsLabel(label) {
16429
16986
  const at = label.indexOf("{terms}");
16430
16987
  return at === -1 ? [`${label} `, ""] : [label.slice(0, at), label.slice(at + "{terms}".length)];
@@ -16446,9 +17003,9 @@ function CheckoutTermsAcceptance({
16446
17003
  (part) => part.replaceAll("{tenant}", copy.tenantName)
16447
17004
  );
16448
17005
  const newTab = copy.isTermsLinkNewTab;
16449
- return /* @__PURE__ */ jsxs30("div", { "data-slot": "checkout-terms", className: cn26("space-y-1", className), children: [
16450
- /* @__PURE__ */ jsxs30("div", { className: "flex items-start gap-3", children: [
16451
- /* @__PURE__ */ jsx32(
17006
+ return /* @__PURE__ */ jsxs32("div", { "data-slot": "checkout-terms", className: cn28("space-y-1", className), children: [
17007
+ /* @__PURE__ */ jsxs32("div", { className: "flex items-start gap-3", children: [
17008
+ /* @__PURE__ */ jsx34(
16452
17009
  "input",
16453
17010
  {
16454
17011
  id: boxId,
@@ -16461,9 +17018,9 @@ function CheckoutTermsAcceptance({
16461
17018
  className: "mt-0.5 size-5 shrink-0 cursor-pointer accent-primary"
16462
17019
  }
16463
17020
  ),
16464
- /* @__PURE__ */ jsxs30("label", { htmlFor: boxId, className: "text-sm leading-relaxed", children: [
17021
+ /* @__PURE__ */ jsxs32("label", { htmlFor: boxId, className: "text-sm leading-relaxed", children: [
16465
17022
  before,
16466
- /* @__PURE__ */ jsxs30(
17023
+ /* @__PURE__ */ jsxs32(
16467
17024
  "a",
16468
17025
  {
16469
17026
  href: copy.termsLinkUrl ?? termsHref,
@@ -16471,9 +17028,9 @@ function CheckoutTermsAcceptance({
16471
17028
  className: "font-medium underline underline-offset-2 hover:text-primary",
16472
17029
  children: [
16473
17030
  copy.termsLinkText,
16474
- newTab ? /* @__PURE__ */ jsxs30(Fragment7, { children: [
17031
+ newTab ? /* @__PURE__ */ jsxs32(Fragment8, { children: [
16475
17032
  " ",
16476
- /* @__PURE__ */ jsx32("span", { className: "sr-only", children: newTabHint })
17033
+ /* @__PURE__ */ jsx34("span", { className: "sr-only", children: newTabHint })
16477
17034
  ] }) : null
16478
17035
  ]
16479
17036
  }
@@ -16481,7 +17038,7 @@ function CheckoutTermsAcceptance({
16481
17038
  after
16482
17039
  ] })
16483
17040
  ] }),
16484
- error ? /* @__PURE__ */ jsx32("p", { id: errorId, className: "pl-8 text-sm text-destructive", children: error }) : null
17041
+ error ? /* @__PURE__ */ jsx34("p", { id: errorId, className: "pl-8 text-sm text-destructive", children: error }) : null
16485
17042
  ] });
16486
17043
  }
16487
17044
  function toCheckoutTermsFields(copy, accepted) {
@@ -16490,8 +17047,8 @@ function toCheckoutTermsFields(copy, accepted) {
16490
17047
  }
16491
17048
 
16492
17049
  // src/components/checkout-pay-action.tsx
16493
- import { cn as cn27 } from "@reblu/site-ui/utils";
16494
- import { jsx as jsx33, jsxs as jsxs31 } from "react/jsx-runtime";
17050
+ import { cn as cn29 } from "@reblu/site-ui/utils";
17051
+ import { jsx as jsx35, jsxs as jsxs33 } from "react/jsx-runtime";
16495
17052
  function CheckoutPayAction({
16496
17053
  label,
16497
17054
  notice,
@@ -16505,28 +17062,50 @@ function CheckoutPayAction({
16505
17062
  }) {
16506
17063
  const noticeId = `${id}-notice`;
16507
17064
  const isDisabled = submitting || disabled;
16508
- return /* @__PURE__ */ jsxs31("div", { "data-slot": "checkout-pay-action", className: cn27("space-y-3", className), children: [
16509
- /* @__PURE__ */ jsx33(
17065
+ return /* @__PURE__ */ jsxs33("div", { "data-slot": "checkout-pay-action", className: cn29("space-y-3", className), children: [
17066
+ /* @__PURE__ */ jsx35(
16510
17067
  "button",
16511
17068
  {
16512
17069
  type: "submit",
16513
17070
  disabled: isDisabled,
16514
17071
  "aria-busy": submitting || void 0,
16515
17072
  "aria-describedby": notice ? noticeId : void 0,
16516
- className: buttonClassName ?? cn27(
17073
+ className: buttonClassName ?? cn29(
16517
17074
  "flex w-full items-center justify-center gap-2 rounded-xl px-4 py-3 text-base font-semibold transition-all",
16518
17075
  isDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "cursor-pointer bg-primary text-primary-foreground hover:bg-primary/90"
16519
17076
  ),
16520
17077
  children: submitting ? submittingLabel : label
16521
17078
  }
16522
17079
  ),
16523
- notice ? /* @__PURE__ */ jsx33("p", { id: noticeId, "data-slot": "checkout-pay-notice", className: noticeClassName ?? "text-sm text-muted-foreground", children: notice }) : null
17080
+ notice ? /* @__PURE__ */ jsx35("p", { id: noticeId, "data-slot": "checkout-pay-notice", className: noticeClassName ?? "text-sm text-muted-foreground", children: notice }) : null
16524
17081
  ] });
16525
17082
  }
16526
17083
 
17084
+ // src/lib/course-guest-checkout.ts
17085
+ function courseSellsAsGuest(course) {
17086
+ return course.salesEnabled && !course.requiresValidation && course.priceCents > 0;
17087
+ }
17088
+ function toAcademyCheckoutInvoiceFields(value, overCap, issuesInvoices = true) {
17089
+ if (!issuesInvoices) return {};
17090
+ if (!value.wantsFullInvoice && !overCap) return {};
17091
+ const billing = {
17092
+ billingName: value.billingName.trim(),
17093
+ billingNif: value.billingNif.trim(),
17094
+ billingIdType: value.billingIdType,
17095
+ ...value.billingIdType === "NIF" ? {} : { billingIdCountry: value.billingIdCountry },
17096
+ billingAddress: {
17097
+ street: value.street.trim(),
17098
+ postalCode: value.postalCode.trim(),
17099
+ city: value.city.trim(),
17100
+ country: value.country
17101
+ }
17102
+ };
17103
+ return { ...value.wantsFullInvoice ? { wantsFullInvoice: true } : {}, billing };
17104
+ }
17105
+
16527
17106
  // src/components/contact-interest-field.tsx
16528
- import { cn as cn28 } from "@reblu/site-ui/utils";
16529
- import { jsx as jsx34, jsxs as jsxs32 } from "react/jsx-runtime";
17107
+ import { cn as cn30 } from "@reblu/site-ui/utils";
17108
+ import { jsx as jsx36, jsxs as jsxs34 } from "react/jsx-runtime";
16530
17109
  function ContactInterestField({
16531
17110
  interest,
16532
17111
  value,
@@ -16543,18 +17122,18 @@ function ContactInterestField({
16543
17122
  else next2.delete(option2);
16544
17123
  onChange(interest.options.filter((candidate) => next2.has(candidate)));
16545
17124
  };
16546
- return /* @__PURE__ */ jsxs32("fieldset", { "data-slot": "contact-interest", className: cn28("space-y-2", className), children: [
16547
- /* @__PURE__ */ jsx34("legend", { className: "text-sm font-medium", children: interest.label }),
16548
- /* @__PURE__ */ jsx34("div", { className: "flex flex-col gap-2", children: interest.options.map((option2, index) => {
17125
+ return /* @__PURE__ */ jsxs34("fieldset", { "data-slot": "contact-interest", className: cn30("space-y-2", className), children: [
17126
+ /* @__PURE__ */ jsx36("legend", { className: "text-sm font-medium", children: interest.label }),
17127
+ /* @__PURE__ */ jsx36("div", { className: "flex flex-col gap-2", children: interest.options.map((option2, index) => {
16549
17128
  const id = `${idPrefix}-${index}`;
16550
- return /* @__PURE__ */ jsxs32(
17129
+ return /* @__PURE__ */ jsxs34(
16551
17130
  "label",
16552
17131
  {
16553
17132
  htmlFor: id,
16554
17133
  "data-slot": "contact-interest-option",
16555
17134
  className: "flex items-center gap-2 text-sm",
16556
17135
  children: [
16557
- /* @__PURE__ */ jsx34(
17136
+ /* @__PURE__ */ jsx36(
16558
17137
  "input",
16559
17138
  {
16560
17139
  id,
@@ -16579,6 +17158,9 @@ export {
16579
17158
  ALLOWED_YOUTUBE_HOSTS,
16580
17159
  AddedToCartToast,
16581
17160
  ArbitrationBadge,
17161
+ BeforeAfterPairs,
17162
+ CARD_ICON_NAMES,
17163
+ CardIconSvg,
16582
17164
  CartAdjustmentsNotice,
16583
17165
  CartLineIncludes,
16584
17166
  CartLineList,
@@ -16587,14 +17169,18 @@ export {
16587
17169
  CheckoutForm,
16588
17170
  CheckoutLoginPrompt,
16589
17171
  CheckoutPayAction,
17172
+ CheckoutQuoteNotice,
16590
17173
  CheckoutQuoteSummary,
16591
17174
  CheckoutTermsAcceptance,
17175
+ ChipList,
16592
17176
  ContactInterestField,
16593
17177
  CourseCatalogFilters,
16594
17178
  CourseDescription,
16595
17179
  CoursePurchaseTerms,
16596
17180
  DATA_REQUEST_TYPES,
17181
+ DEFAULT_BEFORE_AFTER_LABELS,
16597
17182
  DEFAULT_CHECKOUT_DELIVERY_CHOICE_LABELS,
17183
+ DEFAULT_CHECKOUT_QUOTE_NOTICE_LABELS,
16598
17184
  DEFAULT_CHECKOUT_QUOTE_SUMMARY_LABELS,
16599
17185
  DEFAULT_COURSE_CATALOG_FILTERS_LABELS,
16600
17186
  DEFAULT_COURSE_PRICE_BANDS,
@@ -16611,6 +17197,8 @@ export {
16611
17197
  EMPTY_FULL_INVOICE_VALUE,
16612
17198
  FaqAccordion,
16613
17199
  FullInvoiceFields,
17200
+ IconCardGrid,
17201
+ ImageTextSplit,
16614
17202
  LegalDocument,
16615
17203
  LessonPreview,
16616
17204
  MarkdownRenderer,
@@ -16623,6 +17211,7 @@ export {
16623
17211
  ProductTrustItems,
16624
17212
  ProfessionalFields,
16625
17213
  ProfileCard,
17214
+ Reviews,
16626
17215
  SafeHtml,
16627
17216
  ShopFilters,
16628
17217
  Specialty,
@@ -16631,11 +17220,14 @@ export {
16631
17220
  buildFaqPageJsonLd,
16632
17221
  buildShareUrls,
16633
17222
  bundleComponentsToIncludes,
17223
+ checkoutQuoteNotice,
16634
17224
  collectFaqItems,
17225
+ courseSellsAsGuest,
16635
17226
  defaultCheckoutFulfillment,
16636
17227
  formatPrice,
16637
17228
  getShopErrorMessage,
16638
17229
  isAllowedYouTubeHost,
17230
+ isCheckoutDeliveryComplete,
16639
17231
  isOverSimplifiedInvoiceCap,
16640
17232
  markdownToPlainText,
16641
17233
  markdownToSafeHtml,
@@ -16644,6 +17236,7 @@ export {
16644
17236
  sanitizeHtml,
16645
17237
  shopIssuesInvoices,
16646
17238
  shouldRenderShopFilters,
17239
+ toAcademyCheckoutInvoiceFields,
16647
17240
  toCheckoutFulfillmentFields,
16648
17241
  toCheckoutInvoiceFields,
16649
17242
  toCheckoutTermsFields