@reblu/site-blocks 0.14.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -32,6 +32,8 @@ __export(src_exports, {
32
32
  DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE: () => DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
33
33
  DEFAULT_SHOP_ERROR_MESSAGES: () => DEFAULT_SHOP_ERROR_MESSAGES,
34
34
  DEFAULT_SHOP_PRICE_BANDS: () => DEFAULT_SHOP_PRICE_BANDS,
35
+ DEFAULT_TRUST_BADGE_HEADINGS: () => DEFAULT_TRUST_BADGE_HEADINGS,
36
+ DEFAULT_TRUST_BADGE_TYPE_ORDER: () => DEFAULT_TRUST_BADGE_TYPE_ORDER,
35
37
  DEFAULT_TRUST_ICONS: () => DEFAULT_TRUST_ICONS,
36
38
  EMPTY_FULL_INVOICE_VALUE: () => EMPTY_FULL_INVOICE_VALUE,
37
39
  FaqAccordion: () => FaqAccordion,
@@ -49,6 +51,7 @@ __export(src_exports, {
49
51
  ShopFilters: () => ShopFilters,
50
52
  Specialty: () => Specialty,
51
53
  Treatment: () => Treatment,
54
+ TrustBadges: () => TrustBadges,
52
55
  buildFaqPageJsonLd: () => buildFaqPageJsonLd,
53
56
  buildShareUrls: () => buildShareUrls,
54
57
  collectFaqItems: () => collectFaqItems,
@@ -13169,8 +13172,24 @@ function markdownToPlainText(markdown, { maxLength } = {}) {
13169
13172
  }
13170
13173
 
13171
13174
  // src/components/markdown-renderer.tsx
13172
- var import_utils = require("@reblu/site-ui/utils");
13173
13175
  var import_html_react_parser = require("html-react-parser");
13176
+
13177
+ // src/lib/slot-class-name.ts
13178
+ var import_utils = require("@reblu/site-ui/utils");
13179
+ var MERGE_SAFE_TEXT = /(?:^|:)!?text-(?:left|center|right|justify|start|end|wrap|nowrap|balance|pretty|ellipsis|clip)$/;
13180
+ var TEXT_UTILITY = /(?:^|:)!?-?text-/;
13181
+ function bypassesMerge(token) {
13182
+ return TEXT_UTILITY.test(token) && !MERGE_SAFE_TEXT.test(token);
13183
+ }
13184
+ function slotClassName(structural, defaults, consumer) {
13185
+ if (consumer === void 0 || consumer.trim() === "") return (0, import_utils.cn)(structural, defaults);
13186
+ const tokens = consumer.split(/\s+/).filter(Boolean);
13187
+ const verbatim = tokens.filter(bypassesMerge);
13188
+ const merged = (0, import_utils.cn)(structural, tokens.filter((token) => !bypassesMerge(token)));
13189
+ return [merged, ...verbatim].filter(Boolean).join(" ");
13190
+ }
13191
+
13192
+ // src/components/markdown-renderer.tsx
13174
13193
  var import_jsx_runtime = require("react/jsx-runtime");
13175
13194
  var HTML_TO_DOM_OPTIONS = { lowerCaseAttributeNames: false };
13176
13195
  function parse3(html5, options) {
@@ -13333,15 +13352,14 @@ function buildOptions(headingOffset) {
13333
13352
  function MarkdownRenderer({ content, className, headingOffset = 0 }) {
13334
13353
  const html5 = markdownToSafeHtml(content);
13335
13354
  if (!html5) return null;
13336
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_utils.cn)("max-w-none", className), "data-slot": "markdown", children: parse3(html5, buildOptions(headingOffset)) });
13355
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: slotClassName("max-w-none", "", className), "data-slot": "markdown", children: parse3(html5, buildOptions(headingOffset)) });
13337
13356
  }
13338
13357
  function SafeHtml({ html: html5, className, headingOffset = 0 }) {
13339
13358
  if (!html5) return null;
13340
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_utils.cn)("max-w-none", className), "data-slot": "safe-html", children: parse3(html5, buildOptions(headingOffset)) });
13359
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: slotClassName("max-w-none", "", className), "data-slot": "safe-html", children: parse3(html5, buildOptions(headingOffset)) });
13341
13360
  }
13342
13361
 
13343
13362
  // src/components/course-description.tsx
13344
- var import_utils2 = require("@reblu/site-ui/utils");
13345
13363
  var import_jsx_runtime2 = require("react/jsx-runtime");
13346
13364
  function isVisiblyEmpty(html5) {
13347
13365
  if (/<(img|iframe|hr)\b/i.test(html5)) return false;
@@ -13366,7 +13384,7 @@ function CourseDescription({
13366
13384
  {
13367
13385
  html: html5,
13368
13386
  headingOffset: offset,
13369
- className: (0, import_utils2.cn)("text-muted-foreground", contentClassName)
13387
+ className: slotClassName("", "text-muted-foreground", contentClassName)
13370
13388
  }
13371
13389
  );
13372
13390
  if (!hasHeading) {
@@ -13378,9 +13396,9 @@ function CourseDescription({
13378
13396
  {
13379
13397
  "data-slot": "course-description",
13380
13398
  "aria-labelledby": headingId,
13381
- className: (0, import_utils2.cn)("space-y-3", className),
13399
+ className: slotClassName("space-y-3", "", className),
13382
13400
  children: [
13383
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Tag, { id: headingId, className: (0, import_utils2.cn)("text-xl font-semibold", headingClassName), children: heading }),
13401
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Tag, { id: headingId, className: slotClassName("", "text-xl font-semibold", headingClassName), children: heading }),
13384
13402
  body3
13385
13403
  ]
13386
13404
  }
@@ -13388,10 +13406,10 @@ function CourseDescription({
13388
13406
  }
13389
13407
 
13390
13408
  // src/components/treatment.tsx
13391
- var import_utils4 = require("@reblu/site-ui/utils");
13409
+ var import_utils3 = require("@reblu/site-ui/utils");
13392
13410
 
13393
13411
  // src/components/_page-parts.tsx
13394
- var import_utils3 = require("@reblu/site-ui/utils");
13412
+ var import_utils2 = require("@reblu/site-ui/utils");
13395
13413
  var import_button_variants = require("@reblu/site-ui/button-variants");
13396
13414
  var import_jsx_runtime3 = require("react/jsx-runtime");
13397
13415
  var KNOWN_BUTTON_VARIANTS = /* @__PURE__ */ new Set([
@@ -13431,7 +13449,7 @@ function SectionCta({ section }) {
13431
13449
  "data-slot": "button",
13432
13450
  "data-variant": variant,
13433
13451
  "data-size": "default",
13434
- className: (0, import_utils3.cn)((0, import_button_variants.buttonVariants)({ variant, size: "default" })),
13452
+ className: (0, import_utils2.cn)((0, import_button_variants.buttonVariants)({ variant, size: "default" })),
13435
13453
  ...section.ctaIsExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
13436
13454
  children: section.ctaLabel
13437
13455
  }
@@ -13439,7 +13457,7 @@ function SectionCta({ section }) {
13439
13457
  }
13440
13458
  function SectionImages({ section }) {
13441
13459
  if (section.images.length === 0) return null;
13442
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: (0, import_utils3.cn)("grid gap-4", section.images.length > 1 ? "sm:grid-cols-2" : "grid-cols-1"), children: section.images.map((img) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("figure", { className: "space-y-1", children: [
13460
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: (0, import_utils2.cn)("grid gap-4", section.images.length > 1 ? "sm:grid-cols-2" : "grid-cols-1"), children: section.images.map((img) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("figure", { className: "space-y-1", children: [
13443
13461
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("img", { src: img.url, alt: img.alt, loading: "lazy", className: "h-full w-full object-cover" }) }),
13444
13462
  img.caption && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("figcaption", { className: "text-sm text-muted-foreground", children: img.caption })
13445
13463
  ] }, `${img.url}-${img.order}`)) });
@@ -13476,17 +13494,17 @@ function PageSectionList({ sections }) {
13476
13494
  // src/components/treatment.tsx
13477
13495
  var import_jsx_runtime4 = require("react/jsx-runtime");
13478
13496
  function Treatment({ page, className }) {
13479
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("article", { className: (0, import_utils4.cn)("space-y-12", className), "data-slot": "treatment", children: [
13497
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("article", { className: (0, import_utils3.cn)("space-y-12", className), "data-slot": "treatment", children: [
13480
13498
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(PageHero, { page }),
13481
13499
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(PageSectionList, { sections: page.sections })
13482
13500
  ] });
13483
13501
  }
13484
13502
 
13485
13503
  // src/components/parent-page.tsx
13486
- var import_utils6 = require("@reblu/site-ui/utils");
13504
+ var import_utils5 = require("@reblu/site-ui/utils");
13487
13505
 
13488
13506
  // src/components/page-card-grid.tsx
13489
- var import_utils5 = require("@reblu/site-ui/utils");
13507
+ var import_utils4 = require("@reblu/site-ui/utils");
13490
13508
  var import_jsx_runtime5 = require("react/jsx-runtime");
13491
13509
  var defaultPageHref = (page) => `/${page.slug}`;
13492
13510
  var pageKey = (page) => `${page.category?.slug ?? ""}/${page.slug}`;
@@ -13502,7 +13520,7 @@ function PageCardGridSection({
13502
13520
  }) {
13503
13521
  if (pages.length === 0) return null;
13504
13522
  const showHeading = keepEmptyHeading ? heading !== void 0 : !!heading;
13505
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: (0, import_utils5.cn)("space-y-6", className), children: [
13523
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: (0, import_utils4.cn)("space-y-6", className), children: [
13506
13524
  showHeading && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "text-2xl font-bold", children: heading }),
13507
13525
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("ul", { className: "grid list-none grid-cols-1 gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3", children: pages.map((page) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
13508
13526
  "a",
@@ -13545,7 +13563,7 @@ function ParentPage({
13545
13563
  const pages = childPages ?? treatments ?? [];
13546
13564
  const hrefFor = childPageHref ?? treatmentHref ?? defaultChildPageHref;
13547
13565
  const label = childPagesLabel ?? treatmentsLabel ?? "Treatments";
13548
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("article", { className: (0, import_utils6.cn)("space-y-12", className), "data-slot": "specialty", children: [
13566
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("article", { className: (0, import_utils5.cn)("space-y-12", className), "data-slot": "specialty", children: [
13549
13567
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PageHero, { page }),
13550
13568
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PageSectionList, { sections: page.sections }),
13551
13569
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
@@ -13564,7 +13582,7 @@ function ParentPage({
13564
13582
  var Specialty = ParentPage;
13565
13583
 
13566
13584
  // src/components/profile-card.tsx
13567
- var import_utils7 = require("@reblu/site-ui/utils");
13585
+ var import_utils6 = require("@reblu/site-ui/utils");
13568
13586
  var import_jsx_runtime7 = require("react/jsx-runtime");
13569
13587
  function initials(name) {
13570
13588
  return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
@@ -13574,7 +13592,7 @@ function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, classN
13574
13592
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
13575
13593
  "article",
13576
13594
  {
13577
- className: (0, import_utils7.cn)(
13595
+ className: (0, import_utils6.cn)(
13578
13596
  "flex flex-col items-center gap-3 rounded-lg border bg-card p-6 text-center",
13579
13597
  className
13580
13598
  ),
@@ -13606,7 +13624,7 @@ function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, classN
13606
13624
  }
13607
13625
 
13608
13626
  // src/components/product-card.tsx
13609
- var import_utils8 = require("@reblu/site-ui/utils");
13627
+ var import_utils7 = require("@reblu/site-ui/utils");
13610
13628
  var import_jsx_runtime8 = require("react/jsx-runtime");
13611
13629
  function ProductCard({ product, href, currencyCode = "EUR", locale, className }) {
13612
13630
  const image = product.images.find((i) => i.isPrimary) ?? product.images[0];
@@ -13614,7 +13632,7 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
13614
13632
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
13615
13633
  "article",
13616
13634
  {
13617
- className: (0, import_utils8.cn)(
13635
+ className: (0, import_utils7.cn)(
13618
13636
  "group flex flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
13619
13637
  className
13620
13638
  ),
@@ -13837,7 +13855,6 @@ var __iconNode8 = [
13837
13855
  var Truck = createLucideIcon("truck", __iconNode8);
13838
13856
 
13839
13857
  // src/components/product-trust-items.tsx
13840
- var import_utils11 = require("@reblu/site-ui/utils");
13841
13858
  var import_jsx_runtime9 = require("react/jsx-runtime");
13842
13859
  var DEFAULT_TRUST_ICONS = Object.freeze({
13843
13860
  shipping: Truck,
@@ -13872,14 +13889,14 @@ function ProductTrustItems({
13872
13889
  return [{ key: `${index}-${icon}`, Icon: Icon2, text: text3 }];
13873
13890
  });
13874
13891
  if (rows.length === 0) return null;
13875
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(List, { "data-slot": "product-trust-items", className: (0, import_utils11.cn)("space-y-2.5", className), children: rows.map(({ key: key2, Icon: Icon2, text: text3 }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("li", { className: (0, import_utils11.cn)("flex items-center gap-3 text-sm text-muted-foreground", itemClassName), children: [
13892
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(List, { "data-slot": "product-trust-items", className: slotClassName("space-y-2.5", "", className), children: rows.map(({ key: key2, Icon: Icon2, text: text3 }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("li", { className: slotClassName("flex items-center gap-3", "text-sm text-muted-foreground", itemClassName), children: [
13876
13893
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-foreground/60" }),
13877
13894
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: text3 })
13878
13895
  ] }, key2)) });
13879
13896
  }
13880
13897
 
13881
13898
  // src/components/faq-accordion.tsx
13882
- var import_utils12 = require("@reblu/site-ui/utils");
13899
+ var import_utils10 = require("@reblu/site-ui/utils");
13883
13900
 
13884
13901
  // src/components/_heading.tsx
13885
13902
  var import_jsx_runtime10 = require("react/jsx-runtime");
@@ -13907,7 +13924,7 @@ function FaqAccordion({
13907
13924
  }) {
13908
13925
  const visible = items.map((item, index) => ({ item, index })).filter(({ item }) => item.q.trim() !== "");
13909
13926
  if (visible.length === 0) return null;
13910
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: (0, import_utils12.cn)("space-y-4", className), "data-slot": "faq-accordion", children: [
13927
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: (0, import_utils10.cn)("space-y-4", className), "data-slot": "faq-accordion", children: [
13911
13928
  heading && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Heading, { level: headingLevel, className: "text-2xl font-semibold tracking-tight", children: heading }),
13912
13929
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "divide-y divide-border rounded-xl border border-border", children: visible.map(({ item, index }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
13913
13930
  "details",
@@ -13935,41 +13952,151 @@ function FaqAccordion({
13935
13952
  ] });
13936
13953
  }
13937
13954
 
13955
+ // src/components/trust-badges.tsx
13956
+ var import_utils11 = require("@reblu/site-ui/utils");
13957
+ var import_jsx_runtime12 = (
13958
+ // eslint-disable-next-line @next/next/no-img-element -- framework-agnostic SDK; the SITE owns image optimisation
13959
+ require("react/jsx-runtime")
13960
+ );
13961
+ var DEFAULT_TRUST_BADGE_HEADINGS = Object.freeze(
13962
+ {
13963
+ PARTNER: "Colaboradores",
13964
+ INSURANCE: "Aseguradoras",
13965
+ SUBVENTION: "Financiaci\xF3n",
13966
+ CERTIFICATION: "Certificaciones",
13967
+ AWARD: "Premios"
13968
+ }
13969
+ );
13970
+ var DEFAULT_TRUST_BADGE_TYPE_ORDER = Object.freeze([
13971
+ "SUBVENTION",
13972
+ "CERTIFICATION",
13973
+ "AWARD",
13974
+ "PARTNER",
13975
+ "INSURANCE"
13976
+ ]);
13977
+ var KNOWN_TYPES = new Set(DEFAULT_TRUST_BADGE_TYPE_ORDER);
13978
+ function isUsable(value) {
13979
+ if (typeof value !== "object" || value === null) return false;
13980
+ const entry = value;
13981
+ return typeof entry.type === "string" && KNOWN_TYPES.has(entry.type) && typeof entry.name === "string" && entry.name.trim() !== "";
13982
+ }
13983
+ function safeHref(url) {
13984
+ if (typeof url !== "string") return null;
13985
+ try {
13986
+ const parsed = new URL(url);
13987
+ return parsed.protocol === "https:" || parsed.protocol === "http:" ? url : null;
13988
+ } catch {
13989
+ return null;
13990
+ }
13991
+ }
13992
+ function BadgeContent({ badge, logoClassName }) {
13993
+ if (badge.logoUrl) {
13994
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
13995
+ "img",
13996
+ {
13997
+ src: badge.logoUrl,
13998
+ alt: badge.name,
13999
+ loading: "lazy",
14000
+ className: (0, import_utils11.cn)("h-12 w-auto object-contain", logoClassName)
14001
+ }
14002
+ );
14003
+ }
14004
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-sm font-medium", children: badge.name });
14005
+ }
14006
+ function TrustBadges({
14007
+ badges,
14008
+ headings,
14009
+ types = DEFAULT_TRUST_BADGE_TYPE_ORDER,
14010
+ headingLevel = 2,
14011
+ newWindowLabel = "(se abre en una ventana nueva)",
14012
+ className,
14013
+ groupClassName,
14014
+ headingClassName,
14015
+ listClassName,
14016
+ logoClassName
14017
+ }) {
14018
+ if (!Array.isArray(badges) || badges.length === 0) return null;
14019
+ const usable = badges.filter(isUsable);
14020
+ const groups = types.flatMap((type) => {
14021
+ const items = usable.filter((b2) => b2.type === type).map((b2, index) => ({ b: b2, index })).sort((x2, y2) => (x2.b.sortOrder ?? 0) - (y2.b.sortOrder ?? 0) || x2.index - y2.index).map(({ b: b2 }) => b2);
14022
+ if (items.length === 0) return [];
14023
+ const heading = headings && Object.prototype.hasOwnProperty.call(headings, type) ? headings[type] : DEFAULT_TRUST_BADGE_HEADINGS[type];
14024
+ return [{ type, heading, items }];
14025
+ });
14026
+ if (groups.length === 0) return null;
14027
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { "data-slot": "trust-badges", className: (0, import_utils11.cn)("space-y-6", className), children: groups.map(({ type, heading, items }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
14028
+ "div",
14029
+ {
14030
+ "data-slot": "trust-badge-group",
14031
+ "data-type": type,
14032
+ className: (0, import_utils11.cn)("space-y-3", groupClassName),
14033
+ children: [
14034
+ heading ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14035
+ Heading,
14036
+ {
14037
+ level: headingLevel,
14038
+ className: (0, import_utils11.cn)("text-sm font-semibold uppercase tracking-widest", headingClassName),
14039
+ children: heading
14040
+ }
14041
+ ) : null,
14042
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ul", { className: (0, import_utils11.cn)("flex flex-wrap items-center gap-6", listClassName), children: items.map((badge) => {
14043
+ const href = safeHref(badge.url);
14044
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: href ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
14045
+ "a",
14046
+ {
14047
+ href,
14048
+ target: "_blank",
14049
+ rel: "noopener noreferrer",
14050
+ className: "inline-flex",
14051
+ children: [
14052
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(BadgeContent, { badge, logoClassName }),
14053
+ " ",
14054
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "sr-only", children: newWindowLabel })
14055
+ ]
14056
+ }
14057
+ ) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(BadgeContent, { badge, logoClassName }) }, badge.id);
14058
+ }) })
14059
+ ]
14060
+ },
14061
+ type
14062
+ )) });
14063
+ }
14064
+
13938
14065
  // src/components/page-blocks.tsx
13939
- var import_utils13 = require("@reblu/site-ui/utils");
14066
+ var import_utils12 = require("@reblu/site-ui/utils");
13940
14067
  var import_button_variants2 = require("@reblu/site-ui/button-variants");
13941
- var import_jsx_runtime12 = require("react/jsx-runtime");
14068
+ var import_jsx_runtime13 = require("react/jsx-runtime");
13942
14069
  var ALIASES = {
13943
14070
  doctor_embed: "profile_embed",
13944
14071
  specialty_embed: "page_embed"
13945
14072
  };
13946
14073
  function HeroBlock({ block, headingLevel }) {
13947
14074
  const { title, subtitle, imageUrl } = block.data;
13948
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "space-y-4", children: [
13949
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
13950
- subtitle && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-lg opacity-80", children: subtitle }),
13951
- imageUrl && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
14075
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "space-y-4", children: [
14076
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
14077
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-lg opacity-80", children: subtitle }),
14078
+ imageUrl && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
13952
14079
  ] });
13953
14080
  }
13954
14081
  function RichtextBlock({ block, headingLevel }) {
13955
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
14082
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
13956
14083
  }
13957
14084
  function FaqBlock({ block }) {
13958
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FaqAccordion, { items: block.data.items });
14085
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FaqAccordion, { items: block.data.items });
13959
14086
  }
13960
14087
  function StatsBlock({ block }) {
13961
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col-reverse gap-1", children: [
13962
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("dt", { className: "text-sm opacity-80", children: item.label }),
13963
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("dd", { className: "text-3xl font-bold", children: item.value })
14088
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col-reverse gap-1", children: [
14089
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { className: "text-sm opacity-80", children: item.label }),
14090
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dd", { className: "text-3xl font-bold", children: item.value })
13964
14091
  ] }, i)) });
13965
14092
  }
13966
14093
  function TestimonialBlock({ block }) {
13967
14094
  const { quote, author, role, avatarUrl } = block.data;
13968
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("figure", { className: "space-y-4", children: [
13969
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: quote }) }),
13970
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("figcaption", { className: "flex items-center gap-3", children: [
14095
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("figure", { className: "space-y-4", children: [
14096
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { children: quote }) }),
14097
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("figcaption", { className: "flex items-center gap-3", children: [
13971
14098
  avatarUrl && // eslint-disable-next-line @next/next/no-img-element
13972
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14099
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
13973
14100
  "img",
13974
14101
  {
13975
14102
  src: avatarUrl,
@@ -13978,9 +14105,9 @@ function TestimonialBlock({ block }) {
13978
14105
  className: "h-10 w-10 rounded-full object-cover"
13979
14106
  }
13980
14107
  ),
13981
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { children: [
13982
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "font-semibold", children: author }),
13983
- role && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "block text-sm opacity-80", children: role })
14108
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14109
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "font-semibold", children: author }),
14110
+ role && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "block text-sm opacity-80", children: role })
13984
14111
  ] })
13985
14112
  ] })
13986
14113
  ] });
@@ -13989,19 +14116,19 @@ function CtaSlotBlock(_props) {
13989
14116
  return null;
13990
14117
  }
13991
14118
  function FeatureListBlock({ block }) {
13992
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ul", { className: "grid list-disc gap-2 pl-5 sm:grid-cols-2", children: block.data.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: item.text }, i)) });
14119
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ul", { className: "grid list-disc gap-2 pl-5 sm:grid-cols-2", children: block.data.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { children: item.text }, i)) });
13993
14120
  }
13994
14121
  function GalleryBlock({ block }) {
13995
14122
  const { images } = block.data;
13996
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14123
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
13997
14124
  "div",
13998
14125
  {
13999
- className: (0, import_utils13.cn)(
14126
+ className: (0, import_utils12.cn)(
14000
14127
  "grid gap-4",
14001
14128
  images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
14002
14129
  ),
14003
- children: images.map((img, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("figure", { className: "space-y-1", children: [
14004
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14130
+ children: images.map((img, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("figure", { className: "space-y-1", children: [
14131
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14005
14132
  "img",
14006
14133
  {
14007
14134
  src: img.url,
@@ -14010,7 +14137,7 @@ function GalleryBlock({ block }) {
14010
14137
  className: "h-full w-full object-cover"
14011
14138
  }
14012
14139
  ) }),
14013
- img.caption && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("figcaption", { className: "text-sm opacity-80", children: img.caption })
14140
+ img.caption && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("figcaption", { className: "text-sm opacity-80", children: img.caption })
14014
14141
  ] }, `${img.url}-${i}`))
14015
14142
  }
14016
14143
  );
@@ -14020,13 +14147,13 @@ function EmbedCard({
14020
14147
  headingLevel,
14021
14148
  embedHref
14022
14149
  }) {
14023
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
14150
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
14024
14151
  "a",
14025
14152
  {
14026
14153
  href: embedHref(resolved),
14027
14154
  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",
14028
14155
  children: [
14029
- resolved.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14156
+ resolved.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14030
14157
  "img",
14031
14158
  {
14032
14159
  src: resolved.coverImageUrl,
@@ -14035,24 +14162,24 @@ function EmbedCard({
14035
14162
  className: "h-full w-full object-cover"
14036
14163
  }
14037
14164
  ) }),
14038
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "space-y-1 p-4", children: [
14039
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
14040
- resolved.role && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
14041
- resolved.excerpt && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-muted-foreground", children: resolved.excerpt })
14165
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "space-y-1 p-4", children: [
14166
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
14167
+ resolved.role && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
14168
+ resolved.excerpt && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-muted-foreground", children: resolved.excerpt })
14042
14169
  ] })
14043
14170
  ]
14044
14171
  }
14045
14172
  );
14046
14173
  }
14047
14174
  function PageEmbedBlock({ block, headingLevel, embedHref }) {
14048
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
14175
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
14049
14176
  }
14050
14177
  function ProfileEmbedBlock({
14051
14178
  block,
14052
14179
  headingLevel,
14053
14180
  embedHref
14054
14181
  }) {
14055
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
14182
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
14056
14183
  }
14057
14184
  var DEFAULT_RENDERERS = {
14058
14185
  hero: HeroBlock,
@@ -14109,14 +14236,14 @@ function toIdFragment(value) {
14109
14236
  function SectionCta2({ cta }) {
14110
14237
  if (!hasUsableCta(cta)) return null;
14111
14238
  const variant = toButtonVariant(cta.variant);
14112
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14239
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14113
14240
  "a",
14114
14241
  {
14115
14242
  href: cta.url,
14116
14243
  "data-slot": "button",
14117
14244
  "data-variant": variant,
14118
14245
  "data-size": "default",
14119
- className: (0, import_utils13.cn)((0, import_button_variants2.buttonVariants)({ variant, size: "default" })),
14246
+ className: (0, import_utils12.cn)((0, import_button_variants2.buttonVariants)({ variant, size: "default" })),
14120
14247
  ...cta.isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
14121
14248
  children: cta.label
14122
14249
  }
@@ -14142,17 +14269,17 @@ function PageBlocks({
14142
14269
  const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
14143
14270
  const background = block.backgroundColor;
14144
14271
  return [
14145
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
14272
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
14146
14273
  "section",
14147
14274
  {
14148
14275
  "data-slot": "page-block",
14149
14276
  "data-block-type": type,
14150
14277
  "aria-labelledby": headingId,
14151
14278
  style: surfaceStyle(background),
14152
- className: (0, import_utils13.cn)("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
14279
+ className: (0, import_utils12.cn)("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
14153
14280
  children: [
14154
- block.heading && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { id: headingId, children: block.heading }) }),
14155
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14281
+ block.heading && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { id: headingId, children: block.heading }) }),
14282
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14156
14283
  Renderer,
14157
14284
  {
14158
14285
  block,
@@ -14160,7 +14287,7 @@ function PageBlocks({
14160
14287
  embedHref
14161
14288
  }
14162
14289
  ),
14163
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SectionCta2, { cta: block.cta })
14290
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SectionCta2, { cta: block.cta })
14164
14291
  ]
14165
14292
  },
14166
14293
  block.id
@@ -14168,12 +14295,12 @@ function PageBlocks({
14168
14295
  ];
14169
14296
  });
14170
14297
  if (sections.length === 0) return null;
14171
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: (0, import_utils13.cn)("space-y-12", className), "data-slot": "page-blocks", children: sections });
14298
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: (0, import_utils12.cn)("space-y-12", className), "data-slot": "page-blocks", children: sections });
14172
14299
  }
14173
14300
 
14174
14301
  // src/components/shop-filters.tsx
14175
- var import_utils14 = require("@reblu/site-ui/utils");
14176
- var import_jsx_runtime13 = require("react/jsx-runtime");
14302
+ var import_utils13 = require("@reblu/site-ui/utils");
14303
+ var import_jsx_runtime14 = require("react/jsx-runtime");
14177
14304
  var DEFAULT_SHOP_PRICE_BANDS = [
14178
14305
  { max: 2500 },
14179
14306
  { min: 2500, max: 5e3 },
@@ -14217,7 +14344,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
14217
14344
  return "";
14218
14345
  }
14219
14346
  function OptionLink({ href, active, label, onActivate }) {
14220
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14347
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14221
14348
  "a",
14222
14349
  {
14223
14350
  href,
@@ -14226,7 +14353,7 @@ function OptionLink({ href, active, label, onActivate }) {
14226
14353
  event.preventDefault();
14227
14354
  onActivate();
14228
14355
  } : void 0,
14229
- className: (0, import_utils14.cn)(
14356
+ className: (0, import_utils13.cn)(
14230
14357
  "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",
14231
14358
  active ? "border-transparent bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
14232
14359
  ),
@@ -14235,9 +14362,9 @@ function OptionLink({ href, active, label, onActivate }) {
14235
14362
  );
14236
14363
  }
14237
14364
  function FilterFieldset({ legend, children: children2 }) {
14238
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("fieldset", { className: "space-y-2", children: [
14239
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("legend", { className: "text-sm font-medium text-foreground", children: legend }),
14240
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex flex-wrap gap-2", children: children2 })
14365
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("fieldset", { className: "space-y-2", children: [
14366
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("legend", { className: "text-sm font-medium text-foreground", children: legend }),
14367
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex flex-wrap gap-2", children: children2 })
14241
14368
  ] });
14242
14369
  }
14243
14370
  function ShopFilters({
@@ -14260,11 +14387,11 @@ function ShopFilters({
14260
14387
  if (!shouldRenderShopFilters(facets, active)) {
14261
14388
  return null;
14262
14389
  }
14263
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: (0, import_utils14.cn)("space-y-6", className), "data-slot": "shop-filters", children: [
14390
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: (0, import_utils13.cn)("space-y-6", className), "data-slot": "shop-filters", children: [
14264
14391
  visibleTaxonomies.map((axis) => {
14265
14392
  const activeSlug = active.taxonomy?.[axis.key];
14266
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(FilterFieldset, { legend: axis.label, children: [
14267
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14393
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FilterFieldset, { legend: axis.label, children: [
14394
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14268
14395
  OptionLink,
14269
14396
  {
14270
14397
  href: hrefs.taxonomy(axis.key, void 0),
@@ -14279,7 +14406,7 @@ function ShopFilters({
14279
14406
  ),
14280
14407
  axis.terms.map((term) => {
14281
14408
  const isActive = activeSlug === term.slug;
14282
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14409
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14283
14410
  OptionLink,
14284
14411
  {
14285
14412
  href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
@@ -14299,9 +14426,9 @@ function ShopFilters({
14299
14426
  }),
14300
14427
  visibleAttributes.map((attr) => {
14301
14428
  const activeValues = toValueArray(active.attr?.[attr.key]);
14302
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
14429
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
14303
14430
  const isActive = activeValues.includes(opt.value);
14304
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14431
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14305
14432
  OptionLink,
14306
14433
  {
14307
14434
  href: hrefs.attr(attr.key, opt.value),
@@ -14319,11 +14446,11 @@ function ShopFilters({
14319
14446
  );
14320
14447
  }) }, attr.key);
14321
14448
  }),
14322
- showPriceGroup && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
14449
+ showPriceGroup && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
14323
14450
  const isActive = active.priceMin === band.min && active.priceMax === band.max;
14324
14451
  const nextMin = isActive ? void 0 : band.min;
14325
14452
  const nextMax = isActive ? void 0 : band.max;
14326
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14453
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14327
14454
  OptionLink,
14328
14455
  {
14329
14456
  href: hrefs.price(nextMin, nextMax),
@@ -14334,7 +14461,7 @@ function ShopFilters({
14334
14461
  i
14335
14462
  );
14336
14463
  }) }),
14337
- hasOnSale && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14464
+ hasOnSale && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14338
14465
  OptionLink,
14339
14466
  {
14340
14467
  href: hrefs.onSale(!active.onSale),
@@ -14343,7 +14470,7 @@ function ShopFilters({
14343
14470
  onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
14344
14471
  }
14345
14472
  ),
14346
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14473
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14347
14474
  "a",
14348
14475
  {
14349
14476
  href: hrefs.clearAll(),
@@ -14359,8 +14486,8 @@ function ShopFilters({
14359
14486
  }
14360
14487
 
14361
14488
  // src/components/cart-line-list.tsx
14362
- var import_utils15 = require("@reblu/site-ui/utils");
14363
- var import_jsx_runtime14 = require("react/jsx-runtime");
14489
+ var import_utils14 = require("@reblu/site-ui/utils");
14490
+ var import_jsx_runtime15 = require("react/jsx-runtime");
14364
14491
  var DEFAULT_LABELS2 = {
14365
14492
  quantityLabel: "Cantidad",
14366
14493
  decrease: "Reducir cantidad",
@@ -14386,9 +14513,9 @@ function CartLineList({
14386
14513
  }) {
14387
14514
  const t = { ...DEFAULT_LABELS2, ...labels };
14388
14515
  const noticeContent = notice === true ? t.cancelledNotice : notice;
14389
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: (0, import_utils15.cn)("space-y-4", className), "data-slot": "cart-line-list", children: [
14390
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
14391
- noticeContent != null && noticeContent !== false && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14516
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: (0, import_utils14.cn)("space-y-4", className), "data-slot": "cart-line-list", children: [
14517
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
14518
+ noticeContent != null && noticeContent !== false && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
14392
14519
  "div",
14393
14520
  {
14394
14521
  role: "status",
@@ -14397,33 +14524,33 @@ function CartLineList({
14397
14524
  children: noticeContent
14398
14525
  }
14399
14526
  ),
14400
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "space-y-4", children: items.map((item) => {
14527
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "space-y-4", children: items.map((item) => {
14401
14528
  const maxQty = item.maxStock ?? Infinity;
14402
14529
  const atMax = item.quantity >= maxQty;
14403
14530
  const atMin = item.quantity <= 1;
14404
14531
  const message = lineMessage?.(item);
14405
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
14532
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
14406
14533
  "li",
14407
14534
  {
14408
14535
  className: "flex gap-4 rounded-xl border border-border bg-card p-4",
14409
14536
  children: [
14410
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
14411
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "min-w-0 flex-1", children: [
14412
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
14413
- item.variantName && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
14414
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "mt-1 text-sm text-muted-foreground", children: [
14537
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
14538
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "min-w-0 flex-1", children: [
14539
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
14540
+ item.variantName && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
14541
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { className: "mt-1 text-sm text-muted-foreground", children: [
14415
14542
  formatPrice(item.unitPrice, currencyCode, locale),
14416
14543
  " ",
14417
14544
  t.unitPriceSuffix
14418
14545
  ] }),
14419
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
14546
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
14420
14547
  "div",
14421
14548
  {
14422
14549
  role: "group",
14423
14550
  "aria-label": t.quantityLabel,
14424
14551
  className: "mt-3 flex items-center gap-3",
14425
14552
  children: [
14426
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14553
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
14427
14554
  "button",
14428
14555
  {
14429
14556
  type: "button",
@@ -14434,8 +14561,8 @@ function CartLineList({
14434
14561
  children: "\u2212"
14435
14562
  }
14436
14563
  ),
14437
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
14438
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14564
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
14565
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
14439
14566
  "button",
14440
14567
  {
14441
14568
  type: "button",
@@ -14446,7 +14573,7 @@ function CartLineList({
14446
14573
  children: "+"
14447
14574
  }
14448
14575
  ),
14449
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14576
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
14450
14577
  "button",
14451
14578
  {
14452
14579
  type: "button",
@@ -14459,7 +14586,7 @@ function CartLineList({
14459
14586
  ]
14460
14587
  }
14461
14588
  ),
14462
- message != null && message !== false && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14589
+ message != null && message !== false && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
14463
14590
  "p",
14464
14591
  {
14465
14592
  className: "mt-2 text-sm text-destructive",
@@ -14468,7 +14595,7 @@ function CartLineList({
14468
14595
  }
14469
14596
  )
14470
14597
  ] }),
14471
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
14598
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
14472
14599
  ]
14473
14600
  },
14474
14601
  lineKey(item.productId, item.variantId)
@@ -14478,8 +14605,8 @@ function CartLineList({
14478
14605
  }
14479
14606
 
14480
14607
  // src/components/cart-summary.tsx
14481
- var import_utils16 = require("@reblu/site-ui/utils");
14482
- var import_jsx_runtime15 = require("react/jsx-runtime");
14608
+ var import_utils15 = require("@reblu/site-ui/utils");
14609
+ var import_jsx_runtime16 = require("react/jsx-runtime");
14483
14610
  var DEFAULT_LABELS3 = {
14484
14611
  subtotal: "Subtotal",
14485
14612
  discountPrefix: "Descuento",
@@ -14506,40 +14633,40 @@ function CartSummary({
14506
14633
  const hasDiscount = Boolean(discount && discount > 0);
14507
14634
  const noticeContent = notice === true ? t.cancelledNotice : notice;
14508
14635
  const hasNotice = noticeContent != null && noticeContent !== false;
14509
- const breakdown = /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
14636
+ const breakdown = /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
14510
14637
  "dl",
14511
14638
  {
14512
- className: (0, import_utils16.cn)("space-y-2 text-sm", !hasNotice && className),
14639
+ className: (0, import_utils15.cn)("space-y-2 text-sm", !hasNotice && className),
14513
14640
  "data-slot": "cart-summary",
14514
14641
  children: [
14515
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
14516
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t.subtotal }),
14517
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: formatPrice(subtotal, currencyCode, locale) })
14642
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
14643
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("dt", { children: t.subtotal }),
14644
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("dd", { children: formatPrice(subtotal, currencyCode, locale) })
14518
14645
  ] }),
14519
- hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
14520
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("dt", { children: [
14646
+ hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
14647
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("dt", { children: [
14521
14648
  t.discountPrefix,
14522
14649
  discountCode ? ` (${discountCode})` : ""
14523
14650
  ] }),
14524
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("dd", { children: [
14651
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("dd", { children: [
14525
14652
  "-",
14526
14653
  formatPrice(discount, currencyCode, locale)
14527
14654
  ] })
14528
14655
  ] }),
14529
- shippingEnabled && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
14530
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t.shipping }),
14531
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
14656
+ shippingEnabled && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
14657
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("dt", { children: t.shipping }),
14658
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
14532
14659
  ] }),
14533
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
14534
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t.total }),
14535
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: formatPrice(total, currencyCode, locale) })
14660
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
14661
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("dt", { children: t.total }),
14662
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("dd", { children: formatPrice(total, currencyCode, locale) })
14536
14663
  ] })
14537
14664
  ]
14538
14665
  }
14539
14666
  );
14540
14667
  if (!hasNotice) return breakdown;
14541
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: (0, import_utils16.cn)("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
14542
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
14668
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: (0, import_utils15.cn)("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
14669
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
14543
14670
  "div",
14544
14671
  {
14545
14672
  role: "status",
@@ -14553,8 +14680,8 @@ function CartSummary({
14553
14680
  }
14554
14681
 
14555
14682
  // src/components/cart-adjustments-notice.tsx
14556
- var import_utils17 = require("@reblu/site-ui/utils");
14557
- var import_jsx_runtime16 = require("react/jsx-runtime");
14683
+ var import_utils16 = require("@reblu/site-ui/utils");
14684
+ var import_jsx_runtime17 = require("react/jsx-runtime");
14558
14685
  var DEFAULT_LABELS4 = {
14559
14686
  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.`,
14560
14687
  quantityChanged: (name, quantity) => `Hemos ajustado la cantidad de ${name} a ${quantity} por el stock disponible.`,
@@ -14588,20 +14715,20 @@ function CartAdjustmentsNotice({
14588
14715
  );
14589
14716
  }
14590
14717
  if (messages.length === 0) return null;
14591
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
14718
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14592
14719
  "div",
14593
14720
  {
14594
14721
  role: "status",
14595
- className: (0, import_utils17.cn)("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
14722
+ className: (0, import_utils16.cn)("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
14596
14723
  "data-slot": "cart-adjustments-notice",
14597
- children: messages.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { children: messages[0] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { children: message }, index)) })
14724
+ children: messages.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: messages[0] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { children: message }, index)) })
14598
14725
  }
14599
14726
  );
14600
14727
  }
14601
14728
 
14602
14729
  // src/components/added-to-cart-toast.tsx
14603
- var import_utils18 = require("@reblu/site-ui/utils");
14604
- var import_jsx_runtime17 = (
14730
+ var import_utils17 = require("@reblu/site-ui/utils");
14731
+ var import_jsx_runtime18 = (
14605
14732
  // eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
14606
14733
  require("react/jsx-runtime")
14607
14734
  );
@@ -14624,32 +14751,32 @@ function AddedToCartToast({
14624
14751
  const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
14625
14752
  const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
14626
14753
  const variant = status === "success" ? "success" : "error";
14627
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
14754
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
14628
14755
  "div",
14629
14756
  {
14630
14757
  "data-slot": "added-to-cart-toast",
14631
14758
  "data-variant": variant,
14632
- className: (0, import_utils18.cn)(
14759
+ className: (0, import_utils17.cn)(
14633
14760
  "flex items-center gap-3 rounded-xl border border-border bg-card p-3 text-sm shadow-lg",
14634
14761
  variant === "success" && "border-green-600/30 dark:border-green-400/30",
14635
14762
  variant === "error" && "border-destructive/30",
14636
14763
  className
14637
14764
  ),
14638
14765
  children: [
14639
- hasThumbnail && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
14640
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "min-w-0 flex-1", children: [
14641
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "truncate font-semibold text-foreground", children: productName }),
14642
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
14766
+ hasThumbnail && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
14767
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "min-w-0 flex-1", children: [
14768
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "truncate font-semibold text-foreground", children: productName }),
14769
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
14643
14770
  ] }),
14644
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
14771
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
14645
14772
  ]
14646
14773
  }
14647
14774
  );
14648
14775
  }
14649
14776
 
14650
14777
  // src/components/checkout-login-prompt.tsx
14651
- var import_utils19 = require("@reblu/site-ui/utils");
14652
- var import_jsx_runtime18 = require("react/jsx-runtime");
14778
+ var import_utils18 = require("@reblu/site-ui/utils");
14779
+ var import_jsx_runtime19 = require("react/jsx-runtime");
14653
14780
  var DEFAULT_LABELS6 = {
14654
14781
  title: "Identificaci\xF3n",
14655
14782
  description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
@@ -14676,26 +14803,26 @@ function CheckoutLoginPrompt({
14676
14803
  if (!open) return null;
14677
14804
  const t = { ...DEFAULT_LABELS6, ...labels };
14678
14805
  const isValidEmail = EMAIL_PATTERN.test(email.trim());
14679
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
14680
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
14681
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
14806
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
14807
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
14808
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
14682
14809
  "div",
14683
14810
  {
14684
14811
  role: "dialog",
14685
14812
  "aria-modal": "true",
14686
14813
  "aria-labelledby": "checkout-login-prompt-title",
14687
14814
  "data-slot": "checkout-login-prompt",
14688
- className: (0, import_utils19.cn)(
14815
+ className: (0, import_utils18.cn)(
14689
14816
  "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",
14690
14817
  className
14691
14818
  ),
14692
14819
  children: [
14693
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
14694
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
14695
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
14696
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
14820
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
14821
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
14822
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
14823
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
14697
14824
  ] }),
14698
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14825
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14699
14826
  "button",
14700
14827
  {
14701
14828
  type: "button",
@@ -14706,9 +14833,9 @@ function CheckoutLoginPrompt({
14706
14833
  }
14707
14834
  )
14708
14835
  ] }),
14709
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-2", children: [
14710
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
14711
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14836
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "space-y-2", children: [
14837
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
14838
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14712
14839
  "input",
14713
14840
  {
14714
14841
  id: "checkout-login-prompt-email",
@@ -14717,29 +14844,29 @@ function CheckoutLoginPrompt({
14717
14844
  value: email,
14718
14845
  onChange: (e) => onEmailChange(e.target.value),
14719
14846
  placeholder: t.emailPlaceholder,
14720
- className: (0, import_utils19.cn)(
14847
+ className: (0, import_utils18.cn)(
14721
14848
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
14722
14849
  error ? "border-destructive" : "border-border focus:border-primary"
14723
14850
  )
14724
14851
  }
14725
14852
  ),
14726
- error && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-xs text-destructive", children: error })
14853
+ error && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-xs text-destructive", children: error })
14727
14854
  ] }),
14728
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-2", children: [
14729
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14855
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "space-y-2", children: [
14856
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14730
14857
  "button",
14731
14858
  {
14732
14859
  type: "button",
14733
14860
  onClick: onSubmitEmail,
14734
14861
  disabled: checking || !isValidEmail,
14735
- className: (0, import_utils19.cn)(
14862
+ className: (0, import_utils18.cn)(
14736
14863
  "flex w-full items-center justify-center gap-2 rounded-xl px-4 py-2.5 text-sm font-semibold transition-all",
14737
14864
  checking || !isValidEmail ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
14738
14865
  ),
14739
14866
  children: checking ? t.checking : t.continueWithEmail
14740
14867
  }
14741
14868
  ),
14742
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14869
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14743
14870
  "button",
14744
14871
  {
14745
14872
  type: "button",
@@ -14756,9 +14883,9 @@ function CheckoutLoginPrompt({
14756
14883
  }
14757
14884
 
14758
14885
  // src/components/checkout-form.tsx
14759
- var import_utils20 = require("@reblu/site-ui/utils");
14886
+ var import_utils19 = require("@reblu/site-ui/utils");
14760
14887
  var import_phone_input = require("@reblu/site-ui/phone-input");
14761
- var import_jsx_runtime19 = require("react/jsx-runtime");
14888
+ var import_jsx_runtime20 = require("react/jsx-runtime");
14762
14889
  var DEFAULT_LABELS7 = {
14763
14890
  contactTitle: "Datos de contacto",
14764
14891
  nameLabel: "Nombre completo",
@@ -14812,22 +14939,22 @@ function CheckoutForm({
14812
14939
  event.preventDefault();
14813
14940
  if (discountCode.trim() && !discountApplying) onApplyDiscount();
14814
14941
  }
14815
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
14942
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
14816
14943
  loginPrompt,
14817
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
14944
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
14818
14945
  "form",
14819
14946
  {
14820
14947
  "data-testid": "checkout-form",
14821
14948
  onSubmit,
14822
- className: (0, import_utils20.cn)("space-y-8", className),
14949
+ className: (0, import_utils19.cn)("space-y-8", className),
14823
14950
  "data-slot": "checkout-form",
14824
14951
  children: [
14825
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { className: "space-y-4", children: [
14826
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
14827
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
14828
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "space-y-1", children: [
14829
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
14830
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14952
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("section", { className: "space-y-4", children: [
14953
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
14954
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
14955
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "space-y-1", children: [
14956
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
14957
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14831
14958
  "input",
14832
14959
  {
14833
14960
  id: "checkout-form-name",
@@ -14836,17 +14963,17 @@ function CheckoutForm({
14836
14963
  value: contact.name,
14837
14964
  onChange: (e) => patchContact({ name: e.target.value }),
14838
14965
  placeholder: t.namePlaceholder,
14839
- className: (0, import_utils20.cn)(
14966
+ className: (0, import_utils19.cn)(
14840
14967
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
14841
14968
  contactErrors?.name ? "border-destructive" : "border-border focus:border-primary"
14842
14969
  )
14843
14970
  }
14844
14971
  ),
14845
- contactErrors?.name && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.name })
14972
+ contactErrors?.name && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.name })
14846
14973
  ] }),
14847
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "space-y-1", children: [
14848
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
14849
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14974
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "space-y-1", children: [
14975
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
14976
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14850
14977
  "input",
14851
14978
  {
14852
14979
  id: "checkout-form-email",
@@ -14855,15 +14982,15 @@ function CheckoutForm({
14855
14982
  value: contact.email,
14856
14983
  onChange: (e) => patchContact({ email: e.target.value }),
14857
14984
  placeholder: t.emailPlaceholder,
14858
- className: (0, import_utils20.cn)(
14985
+ className: (0, import_utils19.cn)(
14859
14986
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
14860
14987
  contactErrors?.email ? "border-destructive" : "border-border focus:border-primary"
14861
14988
  )
14862
14989
  }
14863
14990
  ),
14864
- contactErrors?.email && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.email })
14991
+ contactErrors?.email && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.email })
14865
14992
  ] }),
14866
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14993
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14867
14994
  import_phone_input.PhoneInput,
14868
14995
  {
14869
14996
  id: "checkout-form-phone",
@@ -14877,15 +15004,15 @@ function CheckoutForm({
14877
15004
  ] })
14878
15005
  ] }),
14879
15006
  children2,
14880
- generalError ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
14881
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { className: "space-y-3", children: [
14882
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
14883
- appliedDiscount ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center justify-between rounded-lg border border-green-200 bg-green-50 px-4 py-3 dark:border-green-800 dark:bg-green-900/20", children: [
14884
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
14885
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "font-semibold", children: appliedDiscount.code }),
14886
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
15007
+ generalError ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
15008
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("section", { className: "space-y-3", children: [
15009
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
15010
+ appliedDiscount ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center justify-between rounded-lg border border-green-200 bg-green-50 px-4 py-3 dark:border-green-800 dark:bg-green-900/20", children: [
15011
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
15012
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "font-semibold", children: appliedDiscount.code }),
15013
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
14887
15014
  ] }),
14888
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15015
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14889
15016
  "button",
14890
15017
  {
14891
15018
  type: "button",
@@ -14895,9 +15022,9 @@ function CheckoutForm({
14895
15022
  children: t.removeDiscount
14896
15023
  }
14897
15024
  )
14898
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex gap-2", children: [
14899
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
14900
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15025
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex gap-2", children: [
15026
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
15027
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14901
15028
  "input",
14902
15029
  {
14903
15030
  id: "checkout-form-discount-code",
@@ -14909,7 +15036,7 @@ function CheckoutForm({
14909
15036
  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"
14910
15037
  }
14911
15038
  ),
14912
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15039
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14913
15040
  "button",
14914
15041
  {
14915
15042
  type: "button",
@@ -14920,14 +15047,14 @@ function CheckoutForm({
14920
15047
  }
14921
15048
  )
14922
15049
  ] }),
14923
- discountError && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-xs text-destructive", children: discountError })
15050
+ discountError && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-xs text-destructive", children: discountError })
14924
15051
  ] }),
14925
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15052
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14926
15053
  "button",
14927
15054
  {
14928
15055
  type: "submit",
14929
15056
  disabled: submitting || submitDisabled,
14930
- className: (0, import_utils20.cn)(
15057
+ className: (0, import_utils19.cn)(
14931
15058
  "flex w-full items-center justify-center gap-2 rounded-xl px-4 py-3 font-semibold transition-all",
14932
15059
  submitting || submitDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
14933
15060
  ),
@@ -14941,11 +15068,11 @@ function CheckoutForm({
14941
15068
  }
14942
15069
 
14943
15070
  // src/components/order-confirmation.tsx
14944
- var import_utils22 = require("@reblu/site-ui/utils");
15071
+ var import_utils21 = require("@reblu/site-ui/utils");
14945
15072
 
14946
15073
  // src/components/order-invoice-link.tsx
14947
- var import_utils21 = require("@reblu/site-ui/utils");
14948
- var import_jsx_runtime20 = require("react/jsx-runtime");
15074
+ var import_utils20 = require("@reblu/site-ui/utils");
15075
+ var import_jsx_runtime21 = require("react/jsx-runtime");
14949
15076
  var DEFAULT_LABELS8 = {
14950
15077
  linkLabel: "Descargar la factura {number}",
14951
15078
  signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
@@ -14953,8 +15080,8 @@ var DEFAULT_LABELS8 = {
14953
15080
  function OrderInvoiceLink({ invoice, labels, className }) {
14954
15081
  if (!invoice) return null;
14955
15082
  const t = { ...DEFAULT_LABELS8, ...labels };
14956
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: (0, import_utils21.cn)("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
14957
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15083
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: (0, import_utils20.cn)("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
15084
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
14958
15085
  "a",
14959
15086
  {
14960
15087
  href: invoice.url,
@@ -14962,12 +15089,12 @@ function OrderInvoiceLink({ invoice, labels, className }) {
14962
15089
  children: t.linkLabel.replace("{number}", invoice.number)
14963
15090
  }
14964
15091
  ),
14965
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-muted-foreground", children: t.signInHint })
15092
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-muted-foreground", children: t.signInHint })
14966
15093
  ] });
14967
15094
  }
14968
15095
 
14969
15096
  // src/components/order-confirmation.tsx
14970
- var import_jsx_runtime21 = require("react/jsx-runtime");
15097
+ var import_jsx_runtime22 = require("react/jsx-runtime");
14971
15098
  var DEFAULT_LABELS9 = {
14972
15099
  pollingTitle: "Confirmando tu pedido\u2026",
14973
15100
  pollingDescription: "Estamos procesando el pago, un momento\u2026",
@@ -15031,43 +15158,43 @@ function OrderConfirmation({
15031
15158
  const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
15032
15159
  const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
15033
15160
  const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
15034
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: (0, import_utils22.cn)("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
15035
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h1", { className: "text-3xl font-bold", children: title }),
15036
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-lg text-muted-foreground", children: description }),
15037
- showFullOrderSummary && order && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "space-y-6", children: [
15038
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15039
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
15040
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
15161
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: (0, import_utils21.cn)("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
15162
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h1", { className: "text-3xl font-bold", children: title }),
15163
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-lg text-muted-foreground", children: description }),
15164
+ showFullOrderSummary && order && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-6", children: [
15165
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15166
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
15167
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
15041
15168
  ] }),
15042
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
15043
- order.items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
15169
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
15170
+ order.items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
15044
15171
  "div",
15045
15172
  {
15046
15173
  className: "flex justify-between gap-4 text-sm",
15047
15174
  children: [
15048
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
15175
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
15049
15176
  item.product.name,
15050
15177
  item.variant ? ` (${item.variant.name})` : "",
15051
15178
  " x",
15052
15179
  item.quantity
15053
15180
  ] }),
15054
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: formatPrice(item.total, currencyCode, locale) })
15181
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: formatPrice(item.total, currencyCode, locale) })
15055
15182
  ]
15056
15183
  },
15057
15184
  idx
15058
15185
  )),
15059
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
15060
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: t.totalLabel }),
15061
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: formatPrice(order.total, currencyCode, locale) })
15186
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
15187
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: t.totalLabel }),
15188
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: formatPrice(order.total, currencyCode, locale) })
15062
15189
  ] }) })
15063
15190
  ] }),
15064
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
15191
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
15065
15192
  t.confirmationEmailPrefix,
15066
15193
  " ",
15067
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "font-medium text-foreground", children: order.customerEmail }),
15194
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "font-medium text-foreground", children: order.customerEmail }),
15068
15195
  "."
15069
15196
  ] }),
15070
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15197
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15071
15198
  OrderInvoiceLink,
15072
15199
  {
15073
15200
  invoice: order.invoice,
@@ -15075,11 +15202,11 @@ function OrderConfirmation({
15075
15202
  }
15076
15203
  )
15077
15204
  ] }),
15078
- showOrderReference && order && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15079
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
15080
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
15205
+ showOrderReference && order && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15206
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
15207
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
15081
15208
  ] }),
15082
- status === "failed" && cartHref && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15209
+ status === "failed" && cartHref && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15083
15210
  "a",
15084
15211
  {
15085
15212
  href: cartHref,
@@ -15087,7 +15214,7 @@ function OrderConfirmation({
15087
15214
  children: t.backToCartLabel
15088
15215
  }
15089
15216
  ),
15090
- showRecheck && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15217
+ showRecheck && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15091
15218
  "button",
15092
15219
  {
15093
15220
  type: "button",
@@ -15096,16 +15223,16 @@ function OrderConfirmation({
15096
15223
  children: t.recheckLabel
15097
15224
  }
15098
15225
  ),
15099
- showSessionReference && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15100
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
15101
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
15226
+ showSessionReference && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15227
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
15228
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
15102
15229
  ] })
15103
15230
  ] });
15104
15231
  }
15105
15232
 
15106
15233
  // src/components/full-invoice-fields.tsx
15107
- var import_utils23 = require("@reblu/site-ui/utils");
15108
- var import_jsx_runtime22 = require("react/jsx-runtime");
15234
+ var import_utils22 = require("@reblu/site-ui/utils");
15235
+ var import_jsx_runtime23 = require("react/jsx-runtime");
15109
15236
  var EMPTY_FULL_INVOICE_VALUE = {
15110
15237
  wantsFullInvoice: false,
15111
15238
  billingIdType: "NIF",
@@ -15222,12 +15349,12 @@ function FullInvoiceFields({
15222
15349
  const showFields = value.wantsFullInvoice || overCap;
15223
15350
  const isSpanishNif = value.billingIdType === "NIF";
15224
15351
  const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
15225
- const error = (key2) => errors[key2] ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
15352
+ const error = (key2) => errors[key2] ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
15226
15353
  const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
15227
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("section", { className: (0, import_utils23.cn)("space-y-4", className), "data-slot": "full-invoice-fields", children: [
15228
- overCap ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1", children: [
15229
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
15230
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15354
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("section", { className: (0, import_utils22.cn)("space-y-4", className), "data-slot": "full-invoice-fields", children: [
15355
+ overCap ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1", children: [
15356
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
15357
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15231
15358
  "input",
15232
15359
  {
15233
15360
  type: "checkbox",
@@ -15237,12 +15364,12 @@ function FullInvoiceFields({
15237
15364
  ),
15238
15365
  t.toggle
15239
15366
  ] }),
15240
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
15367
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
15241
15368
  ] }),
15242
- showFields && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
15243
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1", children: [
15244
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
15245
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15369
+ showFields && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
15370
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1", children: [
15371
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
15372
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15246
15373
  "select",
15247
15374
  {
15248
15375
  id: "full-invoice-id-type",
@@ -15251,14 +15378,14 @@ function FullInvoiceFields({
15251
15378
  value: value.billingIdType,
15252
15379
  onChange: (e) => set("billingIdType", e.target.value),
15253
15380
  ...invalid2("billingIdType"),
15254
- children: ID_TYPES.map((type) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: type, children: t.idTypeOptions[type] }, type))
15381
+ children: ID_TYPES.map((type) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: type, children: t.idTypeOptions[type] }, type))
15255
15382
  }
15256
15383
  ),
15257
15384
  error("billingIdType")
15258
15385
  ] }),
15259
- !isSpanishNif && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1", children: [
15260
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
15261
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
15386
+ !isSpanishNif && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1", children: [
15387
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
15388
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
15262
15389
  "select",
15263
15390
  {
15264
15391
  id: "full-invoice-id-country",
@@ -15268,16 +15395,16 @@ function FullInvoiceFields({
15268
15395
  onChange: (e) => set("billingIdCountry", e.target.value),
15269
15396
  ...invalid2("billingIdCountry"),
15270
15397
  children: [
15271
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: "", disabled: true, children: t.chooseCountry }),
15272
- countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: c.code, children: c.name }, c.code))
15398
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "", disabled: true, children: t.chooseCountry }),
15399
+ countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: c.code, children: c.name }, c.code))
15273
15400
  ]
15274
15401
  }
15275
15402
  ),
15276
15403
  error("billingIdCountry")
15277
15404
  ] }),
15278
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1", children: [
15279
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
15280
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15405
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1", children: [
15406
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
15407
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15281
15408
  "input",
15282
15409
  {
15283
15410
  id: "full-invoice-nif",
@@ -15290,9 +15417,9 @@ function FullInvoiceFields({
15290
15417
  ),
15291
15418
  error("billingNif")
15292
15419
  ] }),
15293
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1", children: [
15294
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
15295
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15420
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1", children: [
15421
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
15422
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15296
15423
  "input",
15297
15424
  {
15298
15425
  id: "full-invoice-name",
@@ -15305,9 +15432,9 @@ function FullInvoiceFields({
15305
15432
  ),
15306
15433
  error("billingName")
15307
15434
  ] }),
15308
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1 sm:col-span-2", children: [
15309
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
15310
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15435
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1 sm:col-span-2", children: [
15436
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
15437
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15311
15438
  "input",
15312
15439
  {
15313
15440
  id: "full-invoice-street",
@@ -15319,9 +15446,9 @@ function FullInvoiceFields({
15319
15446
  }
15320
15447
  )
15321
15448
  ] }),
15322
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1", children: [
15323
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
15324
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15449
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1", children: [
15450
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
15451
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15325
15452
  "input",
15326
15453
  {
15327
15454
  id: "full-invoice-postal-code",
@@ -15332,9 +15459,9 @@ function FullInvoiceFields({
15332
15459
  }
15333
15460
  )
15334
15461
  ] }),
15335
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1", children: [
15336
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
15337
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15462
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1", children: [
15463
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
15464
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15338
15465
  "input",
15339
15466
  {
15340
15467
  id: "full-invoice-city",
@@ -15345,9 +15472,9 @@ function FullInvoiceFields({
15345
15472
  }
15346
15473
  )
15347
15474
  ] }),
15348
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1", children: [
15349
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
15350
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15475
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1", children: [
15476
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
15477
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15351
15478
  "select",
15352
15479
  {
15353
15480
  id: "full-invoice-country",
@@ -15355,11 +15482,11 @@ function FullInvoiceFields({
15355
15482
  required: true,
15356
15483
  value: value.country,
15357
15484
  onChange: (e) => set("country", e.target.value),
15358
- children: countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: c.code, children: c.name }, c.code))
15485
+ children: countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: c.code, children: c.name }, c.code))
15359
15486
  }
15360
15487
  )
15361
15488
  ] }),
15362
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "sm:col-span-2", children: error("address") })
15489
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "sm:col-span-2", children: error("address") })
15363
15490
  ] })
15364
15491
  ] });
15365
15492
  }
@@ -15377,6 +15504,8 @@ function FullInvoiceFields({
15377
15504
  DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
15378
15505
  DEFAULT_SHOP_ERROR_MESSAGES,
15379
15506
  DEFAULT_SHOP_PRICE_BANDS,
15507
+ DEFAULT_TRUST_BADGE_HEADINGS,
15508
+ DEFAULT_TRUST_BADGE_TYPE_ORDER,
15380
15509
  DEFAULT_TRUST_ICONS,
15381
15510
  EMPTY_FULL_INVOICE_VALUE,
15382
15511
  FaqAccordion,
@@ -15394,6 +15523,7 @@ function FullInvoiceFields({
15394
15523
  ShopFilters,
15395
15524
  Specialty,
15396
15525
  Treatment,
15526
+ TrustBadges,
15397
15527
  buildFaqPageJsonLd,
15398
15528
  buildShareUrls,
15399
15529
  collectFaqItems,