@reblu/site-blocks 0.13.0 → 0.14.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
@@ -22,10 +22,12 @@ var src_exports = {};
22
22
  __export(src_exports, {
23
23
  ALLOWED_YOUTUBE_HOSTS: () => ALLOWED_YOUTUBE_HOSTS,
24
24
  AddedToCartToast: () => AddedToCartToast,
25
+ CartAdjustmentsNotice: () => CartAdjustmentsNotice,
25
26
  CartLineList: () => CartLineList,
26
27
  CartSummary: () => CartSummary,
27
28
  CheckoutForm: () => CheckoutForm,
28
29
  CheckoutLoginPrompt: () => CheckoutLoginPrompt,
30
+ CourseDescription: () => CourseDescription,
29
31
  DEFAULT_INVOICE_COUNTRIES: () => DEFAULT_INVOICE_COUNTRIES,
30
32
  DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE: () => DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
31
33
  DEFAULT_SHOP_ERROR_MESSAGES: () => DEFAULT_SHOP_ERROR_MESSAGES,
@@ -54,6 +56,7 @@ __export(src_exports, {
54
56
  getShopErrorMessage: () => getShopErrorMessage,
55
57
  isAllowedYouTubeHost: () => isAllowedYouTubeHost,
56
58
  isOverSimplifiedInvoiceCap: () => isOverSimplifiedInvoiceCap,
59
+ markdownToPlainText: () => markdownToPlainText,
57
60
  markdownToSafeHtml: () => markdownToSafeHtml,
58
61
  readingTime: () => readingTime,
59
62
  sanitizeHtml: () => sanitizeHtml,
@@ -13119,6 +13122,52 @@ function markdownToSafeHtml(markdown) {
13119
13122
  return sanitizeHtml(rawHtml);
13120
13123
  }
13121
13124
 
13125
+ // src/lib/markdown-plain-text.ts
13126
+ var INLINE_TAGS = /* @__PURE__ */ new Set([
13127
+ "a",
13128
+ "abbr",
13129
+ "b",
13130
+ "code",
13131
+ "del",
13132
+ "em",
13133
+ "i",
13134
+ "ins",
13135
+ "kbd",
13136
+ "mark",
13137
+ "s",
13138
+ "small",
13139
+ "span",
13140
+ "strong",
13141
+ "sub",
13142
+ "sup",
13143
+ "u"
13144
+ ]);
13145
+ function collectText(nodes, out) {
13146
+ for (const node of nodes) {
13147
+ if (node.type === "text") {
13148
+ out.push(node.value);
13149
+ } else if (node.type === "element") {
13150
+ const block = !INLINE_TAGS.has(node.tagName);
13151
+ if (block) out.push(" ");
13152
+ collectText(node.children, out);
13153
+ if (block) out.push(" ");
13154
+ }
13155
+ }
13156
+ }
13157
+ function markdownToPlainText(markdown, { maxLength } = {}) {
13158
+ const html5 = markdownToSafeHtml(markdown);
13159
+ if (!html5) return "";
13160
+ const tree = fromParse5(parseFragment(html5));
13161
+ const parts = [];
13162
+ collectText(tree.children, parts);
13163
+ const text3 = parts.join("").replace(/\s+/g, " ").trim();
13164
+ if (maxLength === void 0 || text3.length <= maxLength) return text3;
13165
+ let cut = text3.slice(0, Math.max(0, maxLength - 1));
13166
+ const lastSpace = cut.lastIndexOf(" ");
13167
+ if (lastSpace > 0) cut = cut.slice(0, lastSpace);
13168
+ return `${cut.trimEnd()}\u2026`;
13169
+ }
13170
+
13122
13171
  // src/components/markdown-renderer.tsx
13123
13172
  var import_utils = require("@reblu/site-ui/utils");
13124
13173
  var import_html_react_parser = require("html-react-parser");
@@ -13291,13 +13340,60 @@ function SafeHtml({ html: html5, className, headingOffset = 0 }) {
13291
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)) });
13292
13341
  }
13293
13342
 
13343
+ // src/components/course-description.tsx
13344
+ var import_utils2 = require("@reblu/site-ui/utils");
13345
+ var import_jsx_runtime2 = require("react/jsx-runtime");
13346
+ function isVisiblyEmpty(html5) {
13347
+ if (/<(img|iframe|hr)\b/i.test(html5)) return false;
13348
+ return html5.replace(/<[^>]*>/g, "").trim() === "";
13349
+ }
13350
+ function CourseDescription({
13351
+ description,
13352
+ heading,
13353
+ headingLevel = 2,
13354
+ headingId = "course-description-heading",
13355
+ headingOffset,
13356
+ className,
13357
+ headingClassName,
13358
+ contentClassName
13359
+ }) {
13360
+ const html5 = markdownToSafeHtml(typeof description === "string" ? description : null);
13361
+ if (!html5 || isVisiblyEmpty(html5)) return null;
13362
+ const hasHeading = heading !== void 0 && heading !== null && heading !== "";
13363
+ const offset = headingOffset ?? (hasHeading ? headingLevel - 1 : 0);
13364
+ const body3 = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
13365
+ SafeHtml,
13366
+ {
13367
+ html: html5,
13368
+ headingOffset: offset,
13369
+ className: (0, import_utils2.cn)("text-muted-foreground", contentClassName)
13370
+ }
13371
+ );
13372
+ if (!hasHeading) {
13373
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { "data-slot": "course-description", className, children: body3 });
13374
+ }
13375
+ const Tag = `h${headingLevel}`;
13376
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
13377
+ "section",
13378
+ {
13379
+ "data-slot": "course-description",
13380
+ "aria-labelledby": headingId,
13381
+ className: (0, import_utils2.cn)("space-y-3", className),
13382
+ children: [
13383
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Tag, { id: headingId, className: (0, import_utils2.cn)("text-xl font-semibold", headingClassName), children: heading }),
13384
+ body3
13385
+ ]
13386
+ }
13387
+ );
13388
+ }
13389
+
13294
13390
  // src/components/treatment.tsx
13295
- var import_utils3 = require("@reblu/site-ui/utils");
13391
+ var import_utils4 = require("@reblu/site-ui/utils");
13296
13392
 
13297
13393
  // src/components/_page-parts.tsx
13298
- var import_utils2 = require("@reblu/site-ui/utils");
13394
+ var import_utils3 = require("@reblu/site-ui/utils");
13299
13395
  var import_button_variants = require("@reblu/site-ui/button-variants");
13300
- var import_jsx_runtime2 = require("react/jsx-runtime");
13396
+ var import_jsx_runtime3 = require("react/jsx-runtime");
13301
13397
  var KNOWN_BUTTON_VARIANTS = /* @__PURE__ */ new Set([
13302
13398
  "default",
13303
13399
  "destructive",
@@ -13310,11 +13406,11 @@ function toButtonVariant(variant) {
13310
13406
  return variant && KNOWN_BUTTON_VARIANTS.has(variant) ? variant : "default";
13311
13407
  }
13312
13408
  function PageHero({ page }) {
13313
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("header", { className: "space-y-4", children: [
13314
- page.category && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "inline-flex items-center rounded-full bg-secondary px-3 py-1 text-sm font-medium text-secondary-foreground", children: page.category.name }),
13315
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h1", { className: "text-4xl font-bold tracking-tight", children: page.title }),
13316
- page.subtitle && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-lg text-muted-foreground", children: page.subtitle }),
13317
- page.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
13409
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("header", { className: "space-y-4", children: [
13410
+ page.category && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "inline-flex items-center rounded-full bg-secondary px-3 py-1 text-sm font-medium text-secondary-foreground", children: page.category.name }),
13411
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h1", { className: "text-4xl font-bold tracking-tight", children: page.title }),
13412
+ page.subtitle && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-lg text-muted-foreground", children: page.subtitle }),
13413
+ page.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
13318
13414
  "img",
13319
13415
  {
13320
13416
  src: page.coverImageUrl,
@@ -13328,14 +13424,14 @@ function PageHero({ page }) {
13328
13424
  function SectionCta({ section }) {
13329
13425
  if (!section.ctaLabel || !section.ctaUrl) return null;
13330
13426
  const variant = toButtonVariant(section.ctaVariant);
13331
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
13427
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
13332
13428
  "a",
13333
13429
  {
13334
13430
  href: section.ctaUrl,
13335
13431
  "data-slot": "button",
13336
13432
  "data-variant": variant,
13337
13433
  "data-size": "default",
13338
- className: (0, import_utils2.cn)((0, import_button_variants.buttonVariants)({ variant, size: "default" })),
13434
+ className: (0, import_utils3.cn)((0, import_button_variants.buttonVariants)({ variant, size: "default" })),
13339
13435
  ...section.ctaIsExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
13340
13436
  children: section.ctaLabel
13341
13437
  }
@@ -13343,59 +13439,59 @@ function SectionCta({ section }) {
13343
13439
  }
13344
13440
  function SectionImages({ section }) {
13345
13441
  if (section.images.length === 0) return null;
13346
- return /* @__PURE__ */ (0, import_jsx_runtime2.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_runtime2.jsxs)("figure", { className: "space-y-1", children: [
13347
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("img", { src: img.url, alt: img.alt, loading: "lazy", className: "h-full w-full object-cover" }) }),
13348
- img.caption && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("figcaption", { className: "text-sm text-muted-foreground", children: img.caption })
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: [
13443
+ /* @__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
+ img.caption && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("figcaption", { className: "text-sm text-muted-foreground", children: img.caption })
13349
13445
  ] }, `${img.url}-${img.order}`)) });
13350
13446
  }
13351
13447
  function PageSectionBlock({ section }) {
13352
13448
  const imageFirst = section.layout === "IMAGE_TEXT";
13353
13449
  const sideBySide = section.layout === "TEXT_IMAGE" || section.layout === "IMAGE_TEXT";
13354
13450
  const hasImages = section.images.length > 0;
13355
- const body3 = /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "space-y-4", children: [
13356
- section.heading && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h2", { className: "text-2xl font-bold", children: section.heading }),
13357
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SafeHtml, { html: sanitizeHtml(section.contentHtml), headingOffset: 2 }),
13358
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SectionCta, { section })
13451
+ const body3 = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "space-y-4", children: [
13452
+ section.heading && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: "text-2xl font-bold", children: section.heading }),
13453
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SafeHtml, { html: sanitizeHtml(section.contentHtml), headingOffset: 2 }),
13454
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SectionCta, { section })
13359
13455
  ] });
13360
13456
  if (sideBySide && hasImages) {
13361
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("section", { className: "grid items-center gap-8 md:grid-cols-2", children: imageFirst ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
13362
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SectionImages, { section }),
13457
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("section", { className: "grid items-center gap-8 md:grid-cols-2", children: imageFirst ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
13458
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SectionImages, { section }),
13363
13459
  body3
13364
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
13460
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
13365
13461
  body3,
13366
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SectionImages, { section })
13462
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SectionImages, { section })
13367
13463
  ] }) });
13368
13464
  }
13369
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { className: "space-y-4", children: [
13465
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: "space-y-4", children: [
13370
13466
  body3,
13371
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SectionImages, { section })
13467
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SectionImages, { section })
13372
13468
  ] });
13373
13469
  }
13374
13470
  function PageSectionList({ sections }) {
13375
13471
  if (sections.length === 0) return null;
13376
13472
  const ordered = sections.slice().sort((a, b2) => a.order - b2.order);
13377
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "space-y-12", children: ordered.map((section) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PageSectionBlock, { section }, section.id)) });
13473
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "space-y-12", children: ordered.map((section) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PageSectionBlock, { section }, section.id)) });
13378
13474
  }
13379
13475
 
13380
13476
  // src/components/treatment.tsx
13381
- var import_jsx_runtime3 = require("react/jsx-runtime");
13477
+ var import_jsx_runtime4 = require("react/jsx-runtime");
13382
13478
  function Treatment({ page, className }) {
13383
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("article", { className: (0, import_utils3.cn)("space-y-12", className), "data-slot": "treatment", children: [
13384
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PageHero, { page }),
13385
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PageSectionList, { sections: page.sections })
13479
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("article", { className: (0, import_utils4.cn)("space-y-12", className), "data-slot": "treatment", children: [
13480
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(PageHero, { page }),
13481
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(PageSectionList, { sections: page.sections })
13386
13482
  ] });
13387
13483
  }
13388
13484
 
13389
13485
  // src/components/parent-page.tsx
13390
- var import_utils5 = require("@reblu/site-ui/utils");
13486
+ var import_utils6 = require("@reblu/site-ui/utils");
13391
13487
 
13392
13488
  // src/components/page-card-grid.tsx
13393
- var import_utils4 = require("@reblu/site-ui/utils");
13394
- var import_jsx_runtime4 = require("react/jsx-runtime");
13489
+ var import_utils5 = require("@reblu/site-ui/utils");
13490
+ var import_jsx_runtime5 = require("react/jsx-runtime");
13395
13491
  var defaultPageHref = (page) => `/${page.slug}`;
13396
13492
  var pageKey = (page) => `${page.category?.slug ?? ""}/${page.slug}`;
13397
13493
  function PageCardGrid(props) {
13398
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(PageCardGridSection, { ...props });
13494
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PageCardGridSection, { ...props });
13399
13495
  }
13400
13496
  function PageCardGridSection({
13401
13497
  pages,
@@ -13406,15 +13502,15 @@ function PageCardGridSection({
13406
13502
  }) {
13407
13503
  if (pages.length === 0) return null;
13408
13504
  const showHeading = keepEmptyHeading ? heading !== void 0 : !!heading;
13409
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: (0, import_utils4.cn)("space-y-6", className), children: [
13410
- showHeading && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h2", { className: "text-2xl font-bold", children: heading }),
13411
- /* @__PURE__ */ (0, import_jsx_runtime4.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_runtime4.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
13505
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: (0, import_utils5.cn)("space-y-6", className), children: [
13506
+ showHeading && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "text-2xl font-bold", children: heading }),
13507
+ /* @__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)(
13412
13508
  "a",
13413
13509
  {
13414
13510
  href: pageHref(page),
13415
13511
  className: "group flex h-full flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
13416
13512
  children: [
13417
- page.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "relative aspect-video overflow-hidden bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
13513
+ page.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "relative aspect-video overflow-hidden bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
13418
13514
  "img",
13419
13515
  {
13420
13516
  src: page.coverImageUrl,
@@ -13423,9 +13519,9 @@ function PageCardGridSection({
13423
13519
  className: "h-full w-full object-cover transition-transform group-hover:scale-105"
13424
13520
  }
13425
13521
  ) }),
13426
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
13427
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h3", { className: "font-semibold leading-tight transition-colors group-hover:text-primary", children: page.title }),
13428
- page.excerpt && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: page.excerpt })
13522
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
13523
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h3", { className: "font-semibold leading-tight transition-colors group-hover:text-primary", children: page.title }),
13524
+ page.excerpt && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: page.excerpt })
13429
13525
  ] })
13430
13526
  ]
13431
13527
  }
@@ -13434,7 +13530,7 @@ function PageCardGridSection({
13434
13530
  }
13435
13531
 
13436
13532
  // src/components/parent-page.tsx
13437
- var import_jsx_runtime5 = require("react/jsx-runtime");
13533
+ var import_jsx_runtime6 = require("react/jsx-runtime");
13438
13534
  var defaultChildPageHref = (slug) => `/${slug}`;
13439
13535
  function ParentPage({
13440
13536
  page,
@@ -13449,10 +13545,10 @@ function ParentPage({
13449
13545
  const pages = childPages ?? treatments ?? [];
13450
13546
  const hrefFor = childPageHref ?? treatmentHref ?? defaultChildPageHref;
13451
13547
  const label = childPagesLabel ?? treatmentsLabel ?? "Treatments";
13452
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("article", { className: (0, import_utils5.cn)("space-y-12", className), "data-slot": "specialty", children: [
13453
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PageHero, { page }),
13454
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PageSectionList, { sections: page.sections }),
13455
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
13548
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("article", { className: (0, import_utils6.cn)("space-y-12", className), "data-slot": "specialty", children: [
13549
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PageHero, { page }),
13550
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PageSectionList, { sections: page.sections }),
13551
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
13456
13552
  PageCardGridSection,
13457
13553
  {
13458
13554
  pages,
@@ -13468,34 +13564,34 @@ function ParentPage({
13468
13564
  var Specialty = ParentPage;
13469
13565
 
13470
13566
  // src/components/profile-card.tsx
13471
- var import_utils6 = require("@reblu/site-ui/utils");
13472
- var import_jsx_runtime6 = require("react/jsx-runtime");
13567
+ var import_utils7 = require("@reblu/site-ui/utils");
13568
+ var import_jsx_runtime7 = require("react/jsx-runtime");
13473
13569
  function initials(name) {
13474
13570
  return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
13475
13571
  }
13476
13572
  function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, className }) {
13477
13573
  const NameTag = href ? "a" : "span";
13478
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
13574
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
13479
13575
  "article",
13480
13576
  {
13481
- className: (0, import_utils6.cn)(
13577
+ className: (0, import_utils7.cn)(
13482
13578
  "flex flex-col items-center gap-3 rounded-lg border bg-card p-6 text-center",
13483
13579
  className
13484
13580
  ),
13485
13581
  "data-slot": "profile-card",
13486
13582
  children: [
13487
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "relative h-24 w-24 overflow-hidden rounded-full bg-muted", children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("img", { src: imageUrl, alt: name, loading: "lazy", className: "h-full w-full object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "flex h-full w-full items-center justify-center text-2xl font-semibold text-muted-foreground", "aria-hidden": "true", children: initials(name) }) }),
13488
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "space-y-1", children: [
13489
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: "text-lg font-semibold leading-tight", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
13583
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "relative h-24 w-24 overflow-hidden rounded-full bg-muted", children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("img", { src: imageUrl, alt: name, loading: "lazy", className: "h-full w-full object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "flex h-full w-full items-center justify-center text-2xl font-semibold text-muted-foreground", "aria-hidden": "true", children: initials(name) }) }),
13584
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "space-y-1", children: [
13585
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h3", { className: "text-lg font-semibold leading-tight", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
13490
13586
  NameTag,
13491
13587
  {
13492
13588
  ...href ? { href, className: "transition-colors hover:text-primary" } : {},
13493
13589
  children: name
13494
13590
  }
13495
13591
  ) }),
13496
- role && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-sm text-muted-foreground", children: role })
13592
+ role && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-sm text-muted-foreground", children: role })
13497
13593
  ] }),
13498
- specialties.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("ul", { className: "flex flex-wrap justify-center gap-1.5 p-0", children: specialties.map((s2) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
13594
+ specialties.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { className: "flex flex-wrap justify-center gap-1.5 p-0", children: specialties.map((s2) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
13499
13595
  "li",
13500
13596
  {
13501
13597
  className: "inline-flex items-center rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium text-secondary-foreground",
@@ -13503,28 +13599,28 @@ function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, classN
13503
13599
  },
13504
13600
  s2
13505
13601
  )) }),
13506
- bio && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-sm text-muted-foreground", children: bio })
13602
+ bio && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-sm text-muted-foreground", children: bio })
13507
13603
  ]
13508
13604
  }
13509
13605
  );
13510
13606
  }
13511
13607
 
13512
13608
  // src/components/product-card.tsx
13513
- var import_utils7 = require("@reblu/site-ui/utils");
13514
- var import_jsx_runtime7 = require("react/jsx-runtime");
13609
+ var import_utils8 = require("@reblu/site-ui/utils");
13610
+ var import_jsx_runtime8 = require("react/jsx-runtime");
13515
13611
  function ProductCard({ product, href, currencyCode = "EUR", locale, className }) {
13516
13612
  const image = product.images.find((i) => i.isPrimary) ?? product.images[0];
13517
13613
  const hasDiscount = product.comparePrice != null && product.comparePrice > product.price;
13518
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
13614
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
13519
13615
  "article",
13520
13616
  {
13521
- className: (0, import_utils7.cn)(
13617
+ className: (0, import_utils8.cn)(
13522
13618
  "group flex flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
13523
13619
  className
13524
13620
  ),
13525
13621
  "data-slot": "product-card",
13526
13622
  children: [
13527
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "relative aspect-square overflow-hidden bg-muted", children: image ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
13623
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "relative aspect-square overflow-hidden bg-muted", children: image ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
13528
13624
  "img",
13529
13625
  {
13530
13626
  src: image.url,
@@ -13532,14 +13628,14 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
13532
13628
  loading: "lazy",
13533
13629
  className: "h-full w-full object-cover transition-transform group-hover:scale-105"
13534
13630
  }
13535
- ) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex h-full items-center justify-center text-4xl text-muted-foreground/30", "aria-hidden": "true", children: "\u{1F6CD}\uFE0F" }) }),
13536
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
13537
- product.category && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "inline-flex w-fit items-center rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium text-secondary-foreground", children: product.category.name }),
13538
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h3", { className: "text-base font-semibold leading-tight", children: href ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("a", { href, className: "transition-colors hover:text-primary", children: product.name }) : product.name }),
13539
- product.shortDescription && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: product.shortDescription }),
13540
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "mt-auto flex items-baseline gap-2 pt-2", children: [
13541
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-lg font-bold text-foreground", children: formatPrice(product.price, currencyCode, locale) }),
13542
- hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-sm text-muted-foreground line-through", children: formatPrice(product.comparePrice, currencyCode, locale) })
13631
+ ) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex h-full items-center justify-center text-4xl text-muted-foreground/30", "aria-hidden": "true", children: "\u{1F6CD}\uFE0F" }) }),
13632
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
13633
+ product.category && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "inline-flex w-fit items-center rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium text-secondary-foreground", children: product.category.name }),
13634
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h3", { className: "text-base font-semibold leading-tight", children: href ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("a", { href, className: "transition-colors hover:text-primary", children: product.name }) : product.name }),
13635
+ product.shortDescription && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: product.shortDescription }),
13636
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "mt-auto flex items-baseline gap-2 pt-2", children: [
13637
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-lg font-bold text-foreground", children: formatPrice(product.price, currencyCode, locale) }),
13638
+ hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-sm text-muted-foreground line-through", children: formatPrice(product.comparePrice, currencyCode, locale) })
13543
13639
  ] })
13544
13640
  ] })
13545
13641
  ]
@@ -13741,8 +13837,8 @@ var __iconNode8 = [
13741
13837
  var Truck = createLucideIcon("truck", __iconNode8);
13742
13838
 
13743
13839
  // src/components/product-trust-items.tsx
13744
- var import_utils10 = require("@reblu/site-ui/utils");
13745
- var import_jsx_runtime8 = require("react/jsx-runtime");
13840
+ var import_utils11 = require("@reblu/site-ui/utils");
13841
+ var import_jsx_runtime9 = require("react/jsx-runtime");
13746
13842
  var DEFAULT_TRUST_ICONS = Object.freeze({
13747
13843
  shipping: Truck,
13748
13844
  returns: RotateCcw,
@@ -13776,17 +13872,17 @@ function ProductTrustItems({
13776
13872
  return [{ key: `${index}-${icon}`, Icon: Icon2, text: text3 }];
13777
13873
  });
13778
13874
  if (rows.length === 0) return null;
13779
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(List, { "data-slot": "product-trust-items", className: (0, import_utils10.cn)("space-y-2.5", className), children: rows.map(({ key: key2, Icon: Icon2, text: text3 }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("li", { className: (0, import_utils10.cn)("flex items-center gap-3 text-sm text-muted-foreground", itemClassName), children: [
13780
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-foreground/60" }),
13781
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: text3 })
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: [
13876
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-foreground/60" }),
13877
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: text3 })
13782
13878
  ] }, key2)) });
13783
13879
  }
13784
13880
 
13785
13881
  // src/components/faq-accordion.tsx
13786
- var import_utils11 = require("@reblu/site-ui/utils");
13882
+ var import_utils12 = require("@reblu/site-ui/utils");
13787
13883
 
13788
13884
  // src/components/_heading.tsx
13789
- var import_jsx_runtime9 = require("react/jsx-runtime");
13885
+ var import_jsx_runtime10 = require("react/jsx-runtime");
13790
13886
  function nextHeadingLevel(level) {
13791
13887
  return Math.min(level + 1, 6);
13792
13888
  }
@@ -13796,11 +13892,11 @@ function Heading({
13796
13892
  children: children2
13797
13893
  }) {
13798
13894
  const Tag = `h${level}`;
13799
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Tag, { className, children: children2 });
13895
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Tag, { className, children: children2 });
13800
13896
  }
13801
13897
 
13802
13898
  // src/components/faq-accordion.tsx
13803
- var import_jsx_runtime10 = require("react/jsx-runtime");
13899
+ var import_jsx_runtime11 = require("react/jsx-runtime");
13804
13900
  function FaqAccordion({
13805
13901
  items,
13806
13902
  heading,
@@ -13811,18 +13907,18 @@ function FaqAccordion({
13811
13907
  }) {
13812
13908
  const visible = items.map((item, index) => ({ item, index })).filter(({ item }) => item.q.trim() !== "");
13813
13909
  if (visible.length === 0) return null;
13814
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: (0, import_utils11.cn)("space-y-4", className), "data-slot": "faq-accordion", children: [
13815
- heading && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Heading, { level: headingLevel, className: "text-2xl font-semibold tracking-tight", children: heading }),
13816
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "divide-y divide-border rounded-xl border border-border", children: visible.map(({ item, index }) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
13910
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: (0, import_utils12.cn)("space-y-4", className), "data-slot": "faq-accordion", children: [
13911
+ heading && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Heading, { level: headingLevel, className: "text-2xl font-semibold tracking-tight", children: heading }),
13912
+ /* @__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)(
13817
13913
  "details",
13818
13914
  {
13819
13915
  className: "group px-4",
13820
13916
  "data-slot": "faq-item",
13821
13917
  ...defaultOpen.includes(index) ? { open: true } : {},
13822
13918
  children: [
13823
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4 py-4 font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring [&::-webkit-details-marker]:hidden", children: [
13824
- questionHeadingLevel ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Heading, { level: questionHeadingLevel, className: "text-base font-medium", children: item.q }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: item.q }),
13825
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
13919
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4 py-4 font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring [&::-webkit-details-marker]:hidden", children: [
13920
+ questionHeadingLevel ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Heading, { level: questionHeadingLevel, className: "text-base font-medium", children: item.q }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: item.q }),
13921
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
13826
13922
  "span",
13827
13923
  {
13828
13924
  "aria-hidden": "true",
@@ -13831,7 +13927,7 @@ function FaqAccordion({
13831
13927
  }
13832
13928
  )
13833
13929
  ] }),
13834
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "whitespace-pre-line pb-4 text-muted-foreground", children: item.a })
13930
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "whitespace-pre-line pb-4 text-muted-foreground", children: item.a })
13835
13931
  ]
13836
13932
  },
13837
13933
  index
@@ -13840,40 +13936,40 @@ function FaqAccordion({
13840
13936
  }
13841
13937
 
13842
13938
  // src/components/page-blocks.tsx
13843
- var import_utils12 = require("@reblu/site-ui/utils");
13939
+ var import_utils13 = require("@reblu/site-ui/utils");
13844
13940
  var import_button_variants2 = require("@reblu/site-ui/button-variants");
13845
- var import_jsx_runtime11 = require("react/jsx-runtime");
13941
+ var import_jsx_runtime12 = require("react/jsx-runtime");
13846
13942
  var ALIASES = {
13847
13943
  doctor_embed: "profile_embed",
13848
13944
  specialty_embed: "page_embed"
13849
13945
  };
13850
13946
  function HeroBlock({ block, headingLevel }) {
13851
13947
  const { title, subtitle, imageUrl } = block.data;
13852
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "space-y-4", children: [
13853
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
13854
- subtitle && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "text-lg opacity-80", children: subtitle }),
13855
- imageUrl && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
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" }) })
13856
13952
  ] });
13857
13953
  }
13858
13954
  function RichtextBlock({ block, headingLevel }) {
13859
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
13955
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
13860
13956
  }
13861
13957
  function FaqBlock({ block }) {
13862
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FaqAccordion, { items: block.data.items });
13958
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FaqAccordion, { items: block.data.items });
13863
13959
  }
13864
13960
  function StatsBlock({ block }) {
13865
- return /* @__PURE__ */ (0, import_jsx_runtime11.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_runtime11.jsxs)("div", { className: "flex flex-col-reverse gap-1", children: [
13866
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("dt", { className: "text-sm opacity-80", children: item.label }),
13867
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("dd", { className: "text-3xl font-bold", children: item.value })
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 })
13868
13964
  ] }, i)) });
13869
13965
  }
13870
13966
  function TestimonialBlock({ block }) {
13871
13967
  const { quote, author, role, avatarUrl } = block.data;
13872
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("figure", { className: "space-y-4", children: [
13873
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { children: quote }) }),
13874
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("figcaption", { className: "flex items-center gap-3", children: [
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: [
13875
13971
  avatarUrl && // eslint-disable-next-line @next/next/no-img-element
13876
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
13972
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
13877
13973
  "img",
13878
13974
  {
13879
13975
  src: avatarUrl,
@@ -13882,9 +13978,9 @@ function TestimonialBlock({ block }) {
13882
13978
  className: "h-10 w-10 rounded-full object-cover"
13883
13979
  }
13884
13980
  ),
13885
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { children: [
13886
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "font-semibold", children: author }),
13887
- role && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "block text-sm opacity-80", children: role })
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 })
13888
13984
  ] })
13889
13985
  ] })
13890
13986
  ] });
@@ -13893,19 +13989,19 @@ function CtaSlotBlock(_props) {
13893
13989
  return null;
13894
13990
  }
13895
13991
  function FeatureListBlock({ block }) {
13896
- return /* @__PURE__ */ (0, import_jsx_runtime11.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_runtime11.jsx)("li", { children: item.text }, i)) });
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)) });
13897
13993
  }
13898
13994
  function GalleryBlock({ block }) {
13899
13995
  const { images } = block.data;
13900
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
13996
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
13901
13997
  "div",
13902
13998
  {
13903
- className: (0, import_utils12.cn)(
13999
+ className: (0, import_utils13.cn)(
13904
14000
  "grid gap-4",
13905
14001
  images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
13906
14002
  ),
13907
- children: images.map((img, i) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("figure", { className: "space-y-1", children: [
13908
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
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)(
13909
14005
  "img",
13910
14006
  {
13911
14007
  src: img.url,
@@ -13914,7 +14010,7 @@ function GalleryBlock({ block }) {
13914
14010
  className: "h-full w-full object-cover"
13915
14011
  }
13916
14012
  ) }),
13917
- img.caption && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("figcaption", { className: "text-sm opacity-80", children: img.caption })
14013
+ img.caption && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("figcaption", { className: "text-sm opacity-80", children: img.caption })
13918
14014
  ] }, `${img.url}-${i}`))
13919
14015
  }
13920
14016
  );
@@ -13924,13 +14020,13 @@ function EmbedCard({
13924
14020
  headingLevel,
13925
14021
  embedHref
13926
14022
  }) {
13927
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
14023
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
13928
14024
  "a",
13929
14025
  {
13930
14026
  href: embedHref(resolved),
13931
14027
  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",
13932
14028
  children: [
13933
- resolved.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
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)(
13934
14030
  "img",
13935
14031
  {
13936
14032
  src: resolved.coverImageUrl,
@@ -13939,24 +14035,24 @@ function EmbedCard({
13939
14035
  className: "h-full w-full object-cover"
13940
14036
  }
13941
14037
  ) }),
13942
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "space-y-1 p-4", children: [
13943
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
13944
- resolved.role && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
13945
- resolved.excerpt && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "text-muted-foreground", children: resolved.excerpt })
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 })
13946
14042
  ] })
13947
14043
  ]
13948
14044
  }
13949
14045
  );
13950
14046
  }
13951
14047
  function PageEmbedBlock({ block, headingLevel, embedHref }) {
13952
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
14048
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
13953
14049
  }
13954
14050
  function ProfileEmbedBlock({
13955
14051
  block,
13956
14052
  headingLevel,
13957
14053
  embedHref
13958
14054
  }) {
13959
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
14055
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
13960
14056
  }
13961
14057
  var DEFAULT_RENDERERS = {
13962
14058
  hero: HeroBlock,
@@ -14013,14 +14109,14 @@ function toIdFragment(value) {
14013
14109
  function SectionCta2({ cta }) {
14014
14110
  if (!hasUsableCta(cta)) return null;
14015
14111
  const variant = toButtonVariant(cta.variant);
14016
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
14112
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14017
14113
  "a",
14018
14114
  {
14019
14115
  href: cta.url,
14020
14116
  "data-slot": "button",
14021
14117
  "data-variant": variant,
14022
14118
  "data-size": "default",
14023
- className: (0, import_utils12.cn)((0, import_button_variants2.buttonVariants)({ variant, size: "default" })),
14119
+ className: (0, import_utils13.cn)((0, import_button_variants2.buttonVariants)({ variant, size: "default" })),
14024
14120
  ...cta.isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
14025
14121
  children: cta.label
14026
14122
  }
@@ -14046,17 +14142,17 @@ function PageBlocks({
14046
14142
  const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
14047
14143
  const background = block.backgroundColor;
14048
14144
  return [
14049
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
14145
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
14050
14146
  "section",
14051
14147
  {
14052
14148
  "data-slot": "page-block",
14053
14149
  "data-block-type": type,
14054
14150
  "aria-labelledby": headingId,
14055
14151
  style: surfaceStyle(background),
14056
- className: (0, import_utils12.cn)("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
14152
+ className: (0, import_utils13.cn)("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
14057
14153
  children: [
14058
- block.heading && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { id: headingId, children: block.heading }) }),
14059
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
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)(
14060
14156
  Renderer,
14061
14157
  {
14062
14158
  block,
@@ -14064,7 +14160,7 @@ function PageBlocks({
14064
14160
  embedHref
14065
14161
  }
14066
14162
  ),
14067
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SectionCta2, { cta: block.cta })
14163
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SectionCta2, { cta: block.cta })
14068
14164
  ]
14069
14165
  },
14070
14166
  block.id
@@ -14072,12 +14168,12 @@ function PageBlocks({
14072
14168
  ];
14073
14169
  });
14074
14170
  if (sections.length === 0) return null;
14075
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: (0, import_utils12.cn)("space-y-12", className), "data-slot": "page-blocks", children: sections });
14171
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: (0, import_utils13.cn)("space-y-12", className), "data-slot": "page-blocks", children: sections });
14076
14172
  }
14077
14173
 
14078
14174
  // src/components/shop-filters.tsx
14079
- var import_utils13 = require("@reblu/site-ui/utils");
14080
- var import_jsx_runtime12 = require("react/jsx-runtime");
14175
+ var import_utils14 = require("@reblu/site-ui/utils");
14176
+ var import_jsx_runtime13 = require("react/jsx-runtime");
14081
14177
  var DEFAULT_SHOP_PRICE_BANDS = [
14082
14178
  { max: 2500 },
14083
14179
  { min: 2500, max: 5e3 },
@@ -14121,7 +14217,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
14121
14217
  return "";
14122
14218
  }
14123
14219
  function OptionLink({ href, active, label, onActivate }) {
14124
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14220
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14125
14221
  "a",
14126
14222
  {
14127
14223
  href,
@@ -14130,7 +14226,7 @@ function OptionLink({ href, active, label, onActivate }) {
14130
14226
  event.preventDefault();
14131
14227
  onActivate();
14132
14228
  } : void 0,
14133
- className: (0, import_utils13.cn)(
14229
+ className: (0, import_utils14.cn)(
14134
14230
  "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",
14135
14231
  active ? "border-transparent bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
14136
14232
  ),
@@ -14139,9 +14235,9 @@ function OptionLink({ href, active, label, onActivate }) {
14139
14235
  );
14140
14236
  }
14141
14237
  function FilterFieldset({ legend, children: children2 }) {
14142
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("fieldset", { className: "space-y-2", children: [
14143
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("legend", { className: "text-sm font-medium text-foreground", children: legend }),
14144
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-wrap gap-2", 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 })
14145
14241
  ] });
14146
14242
  }
14147
14243
  function ShopFilters({
@@ -14164,11 +14260,11 @@ function ShopFilters({
14164
14260
  if (!shouldRenderShopFilters(facets, active)) {
14165
14261
  return null;
14166
14262
  }
14167
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: (0, import_utils13.cn)("space-y-6", className), "data-slot": "shop-filters", children: [
14263
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: (0, import_utils14.cn)("space-y-6", className), "data-slot": "shop-filters", children: [
14168
14264
  visibleTaxonomies.map((axis) => {
14169
14265
  const activeSlug = active.taxonomy?.[axis.key];
14170
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(FilterFieldset, { legend: axis.label, children: [
14171
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14266
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(FilterFieldset, { legend: axis.label, children: [
14267
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14172
14268
  OptionLink,
14173
14269
  {
14174
14270
  href: hrefs.taxonomy(axis.key, void 0),
@@ -14183,7 +14279,7 @@ function ShopFilters({
14183
14279
  ),
14184
14280
  axis.terms.map((term) => {
14185
14281
  const isActive = activeSlug === term.slug;
14186
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14282
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14187
14283
  OptionLink,
14188
14284
  {
14189
14285
  href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
@@ -14203,9 +14299,9 @@ function ShopFilters({
14203
14299
  }),
14204
14300
  visibleAttributes.map((attr) => {
14205
14301
  const activeValues = toValueArray(active.attr?.[attr.key]);
14206
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
14302
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
14207
14303
  const isActive = activeValues.includes(opt.value);
14208
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14304
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14209
14305
  OptionLink,
14210
14306
  {
14211
14307
  href: hrefs.attr(attr.key, opt.value),
@@ -14223,11 +14319,11 @@ function ShopFilters({
14223
14319
  );
14224
14320
  }) }, attr.key);
14225
14321
  }),
14226
- showPriceGroup && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
14322
+ showPriceGroup && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
14227
14323
  const isActive = active.priceMin === band.min && active.priceMax === band.max;
14228
14324
  const nextMin = isActive ? void 0 : band.min;
14229
14325
  const nextMax = isActive ? void 0 : band.max;
14230
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14326
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14231
14327
  OptionLink,
14232
14328
  {
14233
14329
  href: hrefs.price(nextMin, nextMax),
@@ -14238,7 +14334,7 @@ function ShopFilters({
14238
14334
  i
14239
14335
  );
14240
14336
  }) }),
14241
- hasOnSale && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14337
+ hasOnSale && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14242
14338
  OptionLink,
14243
14339
  {
14244
14340
  href: hrefs.onSale(!active.onSale),
@@ -14247,7 +14343,7 @@ function ShopFilters({
14247
14343
  onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
14248
14344
  }
14249
14345
  ),
14250
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14346
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14251
14347
  "a",
14252
14348
  {
14253
14349
  href: hrefs.clearAll(),
@@ -14263,8 +14359,8 @@ function ShopFilters({
14263
14359
  }
14264
14360
 
14265
14361
  // src/components/cart-line-list.tsx
14266
- var import_utils14 = require("@reblu/site-ui/utils");
14267
- var import_jsx_runtime13 = require("react/jsx-runtime");
14362
+ var import_utils15 = require("@reblu/site-ui/utils");
14363
+ var import_jsx_runtime14 = require("react/jsx-runtime");
14268
14364
  var DEFAULT_LABELS2 = {
14269
14365
  quantityLabel: "Cantidad",
14270
14366
  decrease: "Reducir cantidad",
@@ -14282,6 +14378,7 @@ function CartLineList({
14282
14378
  onRemove,
14283
14379
  liveMessage,
14284
14380
  notice,
14381
+ lineMessage,
14285
14382
  labels,
14286
14383
  currencyCode,
14287
14384
  locale,
@@ -14289,9 +14386,9 @@ function CartLineList({
14289
14386
  }) {
14290
14387
  const t = { ...DEFAULT_LABELS2, ...labels };
14291
14388
  const noticeContent = notice === true ? t.cancelledNotice : notice;
14292
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: (0, import_utils14.cn)("space-y-4", className), "data-slot": "cart-line-list", children: [
14293
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
14294
- noticeContent != null && noticeContent !== false && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
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)(
14295
14392
  "div",
14296
14393
  {
14297
14394
  role: "status",
@@ -14300,32 +14397,33 @@ function CartLineList({
14300
14397
  children: noticeContent
14301
14398
  }
14302
14399
  ),
14303
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ul", { className: "space-y-4", children: items.map((item) => {
14400
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "space-y-4", children: items.map((item) => {
14304
14401
  const maxQty = item.maxStock ?? Infinity;
14305
14402
  const atMax = item.quantity >= maxQty;
14306
14403
  const atMin = item.quantity <= 1;
14307
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
14404
+ const message = lineMessage?.(item);
14405
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
14308
14406
  "li",
14309
14407
  {
14310
14408
  className: "flex gap-4 rounded-xl border border-border bg-card p-4",
14311
14409
  children: [
14312
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
14313
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "min-w-0 flex-1", children: [
14314
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
14315
- item.variantName && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
14316
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "mt-1 text-sm text-muted-foreground", 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: [
14317
14415
  formatPrice(item.unitPrice, currencyCode, locale),
14318
14416
  " ",
14319
14417
  t.unitPriceSuffix
14320
14418
  ] }),
14321
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
14419
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
14322
14420
  "div",
14323
14421
  {
14324
14422
  role: "group",
14325
14423
  "aria-label": t.quantityLabel,
14326
14424
  className: "mt-3 flex items-center gap-3",
14327
14425
  children: [
14328
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14426
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14329
14427
  "button",
14330
14428
  {
14331
14429
  type: "button",
@@ -14336,8 +14434,8 @@ function CartLineList({
14336
14434
  children: "\u2212"
14337
14435
  }
14338
14436
  ),
14339
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
14340
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
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)(
14341
14439
  "button",
14342
14440
  {
14343
14441
  type: "button",
@@ -14348,7 +14446,7 @@ function CartLineList({
14348
14446
  children: "+"
14349
14447
  }
14350
14448
  ),
14351
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14449
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14352
14450
  "button",
14353
14451
  {
14354
14452
  type: "button",
@@ -14360,9 +14458,17 @@ function CartLineList({
14360
14458
  )
14361
14459
  ]
14362
14460
  }
14461
+ ),
14462
+ message != null && message !== false && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14463
+ "p",
14464
+ {
14465
+ className: "mt-2 text-sm text-destructive",
14466
+ "data-slot": "cart-line-list-line-message",
14467
+ children: message
14468
+ }
14363
14469
  )
14364
14470
  ] }),
14365
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
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) }) })
14366
14472
  ]
14367
14473
  },
14368
14474
  lineKey(item.productId, item.variantId)
@@ -14372,8 +14478,8 @@ function CartLineList({
14372
14478
  }
14373
14479
 
14374
14480
  // src/components/cart-summary.tsx
14375
- var import_utils15 = require("@reblu/site-ui/utils");
14376
- var import_jsx_runtime14 = require("react/jsx-runtime");
14481
+ var import_utils16 = require("@reblu/site-ui/utils");
14482
+ var import_jsx_runtime15 = require("react/jsx-runtime");
14377
14483
  var DEFAULT_LABELS3 = {
14378
14484
  subtotal: "Subtotal",
14379
14485
  discountPrefix: "Descuento",
@@ -14400,40 +14506,40 @@ function CartSummary({
14400
14506
  const hasDiscount = Boolean(discount && discount > 0);
14401
14507
  const noticeContent = notice === true ? t.cancelledNotice : notice;
14402
14508
  const hasNotice = noticeContent != null && noticeContent !== false;
14403
- const breakdown = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
14509
+ const breakdown = /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
14404
14510
  "dl",
14405
14511
  {
14406
- className: (0, import_utils15.cn)("space-y-2 text-sm", !hasNotice && className),
14512
+ className: (0, import_utils16.cn)("space-y-2 text-sm", !hasNotice && className),
14407
14513
  "data-slot": "cart-summary",
14408
14514
  children: [
14409
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
14410
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dt", { children: t.subtotal }),
14411
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dd", { children: formatPrice(subtotal, currencyCode, locale) })
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) })
14412
14518
  ] }),
14413
- hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
14414
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("dt", { children: [
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: [
14415
14521
  t.discountPrefix,
14416
14522
  discountCode ? ` (${discountCode})` : ""
14417
14523
  ] }),
14418
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("dd", { children: [
14524
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("dd", { children: [
14419
14525
  "-",
14420
14526
  formatPrice(discount, currencyCode, locale)
14421
14527
  ] })
14422
14528
  ] }),
14423
- shippingEnabled && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
14424
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dt", { children: t.shipping }),
14425
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
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) })
14426
14532
  ] }),
14427
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
14428
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dt", { children: t.total }),
14429
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dd", { children: formatPrice(total, currencyCode, locale) })
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) })
14430
14536
  ] })
14431
14537
  ]
14432
14538
  }
14433
14539
  );
14434
14540
  if (!hasNotice) return breakdown;
14435
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: (0, import_utils15.cn)("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
14436
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
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)(
14437
14543
  "div",
14438
14544
  {
14439
14545
  role: "status",
@@ -14446,13 +14552,60 @@ function CartSummary({
14446
14552
  ] });
14447
14553
  }
14448
14554
 
14555
+ // src/components/cart-adjustments-notice.tsx
14556
+ var import_utils17 = require("@reblu/site-ui/utils");
14557
+ var import_jsx_runtime16 = require("react/jsx-runtime");
14558
+ var DEFAULT_LABELS4 = {
14559
+ 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
+ quantityChanged: (name, quantity) => `Hemos ajustado la cantidad de ${name} a ${quantity} por el stock disponible.`,
14561
+ priceChanged: (name, from, to) => `El precio de ${name} ha cambiado: antes ${from}, ahora ${to}.`
14562
+ };
14563
+ function displayName(line) {
14564
+ return line.variantName ? `${line.name} (${line.variantName})` : line.name;
14565
+ }
14566
+ function CartAdjustmentsNotice({
14567
+ removed = [],
14568
+ quantityChanges = [],
14569
+ priceChanges = [],
14570
+ labels,
14571
+ currencyCode,
14572
+ locale,
14573
+ className
14574
+ }) {
14575
+ const t = { ...DEFAULT_LABELS4, ...labels };
14576
+ const messages = [];
14577
+ if (removed.length > 0) messages.push(t.removed(removed.map(displayName)));
14578
+ for (const change of quantityChanges) {
14579
+ messages.push(t.quantityChanged(displayName(change), change.to));
14580
+ }
14581
+ for (const change of priceChanges) {
14582
+ messages.push(
14583
+ t.priceChanged(
14584
+ displayName(change),
14585
+ formatPrice(change.from, currencyCode, locale),
14586
+ formatPrice(change.to, currencyCode, locale)
14587
+ )
14588
+ );
14589
+ }
14590
+ if (messages.length === 0) return null;
14591
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
14592
+ "div",
14593
+ {
14594
+ role: "status",
14595
+ className: (0, import_utils17.cn)("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
14596
+ "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)) })
14598
+ }
14599
+ );
14600
+ }
14601
+
14449
14602
  // src/components/added-to-cart-toast.tsx
14450
- var import_utils16 = require("@reblu/site-ui/utils");
14451
- var import_jsx_runtime15 = (
14603
+ var import_utils18 = require("@reblu/site-ui/utils");
14604
+ var import_jsx_runtime17 = (
14452
14605
  // eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
14453
14606
  require("react/jsx-runtime")
14454
14607
  );
14455
- var DEFAULT_LABELS4 = {
14608
+ var DEFAULT_LABELS5 = {
14456
14609
  success: "A\xF1adido al carrito",
14457
14610
  error: "No se pudo a\xF1adir al carrito",
14458
14611
  outOfStock: "Producto agotado",
@@ -14467,37 +14620,37 @@ function AddedToCartToast({
14467
14620
  labels,
14468
14621
  className
14469
14622
  }) {
14470
- const t = { ...DEFAULT_LABELS4, ...labels };
14623
+ const t = { ...DEFAULT_LABELS5, ...labels };
14471
14624
  const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
14472
14625
  const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
14473
14626
  const variant = status === "success" ? "success" : "error";
14474
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
14627
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
14475
14628
  "div",
14476
14629
  {
14477
14630
  "data-slot": "added-to-cart-toast",
14478
14631
  "data-variant": variant,
14479
- className: (0, import_utils16.cn)(
14632
+ className: (0, import_utils18.cn)(
14480
14633
  "flex items-center gap-3 rounded-xl border border-border bg-card p-3 text-sm shadow-lg",
14481
14634
  variant === "success" && "border-green-600/30 dark:border-green-400/30",
14482
14635
  variant === "error" && "border-destructive/30",
14483
14636
  className
14484
14637
  ),
14485
14638
  children: [
14486
- hasThumbnail && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
14487
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "min-w-0 flex-1", children: [
14488
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "truncate font-semibold text-foreground", children: productName }),
14489
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
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 })
14490
14643
  ] }),
14491
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
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 }) })
14492
14645
  ]
14493
14646
  }
14494
14647
  );
14495
14648
  }
14496
14649
 
14497
14650
  // src/components/checkout-login-prompt.tsx
14498
- var import_utils17 = require("@reblu/site-ui/utils");
14499
- var import_jsx_runtime16 = require("react/jsx-runtime");
14500
- var DEFAULT_LABELS5 = {
14651
+ var import_utils19 = require("@reblu/site-ui/utils");
14652
+ var import_jsx_runtime18 = require("react/jsx-runtime");
14653
+ var DEFAULT_LABELS6 = {
14501
14654
  title: "Identificaci\xF3n",
14502
14655
  description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
14503
14656
  emailLabel: "Email",
@@ -14521,28 +14674,28 @@ function CheckoutLoginPrompt({
14521
14674
  className
14522
14675
  }) {
14523
14676
  if (!open) return null;
14524
- const t = { ...DEFAULT_LABELS5, ...labels };
14677
+ const t = { ...DEFAULT_LABELS6, ...labels };
14525
14678
  const isValidEmail = EMAIL_PATTERN.test(email.trim());
14526
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
14527
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
14528
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
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)(
14529
14682
  "div",
14530
14683
  {
14531
14684
  role: "dialog",
14532
14685
  "aria-modal": "true",
14533
14686
  "aria-labelledby": "checkout-login-prompt-title",
14534
14687
  "data-slot": "checkout-login-prompt",
14535
- className: (0, import_utils17.cn)(
14688
+ className: (0, import_utils19.cn)(
14536
14689
  "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",
14537
14690
  className
14538
14691
  ),
14539
14692
  children: [
14540
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
14541
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
14542
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
14543
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
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 })
14544
14697
  ] }),
14545
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
14698
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14546
14699
  "button",
14547
14700
  {
14548
14701
  type: "button",
@@ -14553,9 +14706,9 @@ function CheckoutLoginPrompt({
14553
14706
  }
14554
14707
  )
14555
14708
  ] }),
14556
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "space-y-2", children: [
14557
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
14558
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
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)(
14559
14712
  "input",
14560
14713
  {
14561
14714
  id: "checkout-login-prompt-email",
@@ -14564,29 +14717,29 @@ function CheckoutLoginPrompt({
14564
14717
  value: email,
14565
14718
  onChange: (e) => onEmailChange(e.target.value),
14566
14719
  placeholder: t.emailPlaceholder,
14567
- className: (0, import_utils17.cn)(
14720
+ className: (0, import_utils19.cn)(
14568
14721
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
14569
14722
  error ? "border-destructive" : "border-border focus:border-primary"
14570
14723
  )
14571
14724
  }
14572
14725
  ),
14573
- error && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-xs text-destructive", children: error })
14726
+ error && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-xs text-destructive", children: error })
14574
14727
  ] }),
14575
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "space-y-2", children: [
14576
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
14728
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-2", children: [
14729
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14577
14730
  "button",
14578
14731
  {
14579
14732
  type: "button",
14580
14733
  onClick: onSubmitEmail,
14581
14734
  disabled: checking || !isValidEmail,
14582
- className: (0, import_utils17.cn)(
14735
+ className: (0, import_utils19.cn)(
14583
14736
  "flex w-full items-center justify-center gap-2 rounded-xl px-4 py-2.5 text-sm font-semibold transition-all",
14584
14737
  checking || !isValidEmail ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
14585
14738
  ),
14586
14739
  children: checking ? t.checking : t.continueWithEmail
14587
14740
  }
14588
14741
  ),
14589
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
14742
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14590
14743
  "button",
14591
14744
  {
14592
14745
  type: "button",
@@ -14603,10 +14756,10 @@ function CheckoutLoginPrompt({
14603
14756
  }
14604
14757
 
14605
14758
  // src/components/checkout-form.tsx
14606
- var import_utils18 = require("@reblu/site-ui/utils");
14759
+ var import_utils20 = require("@reblu/site-ui/utils");
14607
14760
  var import_phone_input = require("@reblu/site-ui/phone-input");
14608
- var import_jsx_runtime17 = require("react/jsx-runtime");
14609
- var DEFAULT_LABELS6 = {
14761
+ var import_jsx_runtime19 = require("react/jsx-runtime");
14762
+ var DEFAULT_LABELS7 = {
14610
14763
  contactTitle: "Datos de contacto",
14611
14764
  nameLabel: "Nombre completo",
14612
14765
  namePlaceholder: "Tu nombre",
@@ -14645,7 +14798,7 @@ function CheckoutForm({
14645
14798
  locale,
14646
14799
  className
14647
14800
  }) {
14648
- const t = { ...DEFAULT_LABELS6, ...labels };
14801
+ const t = { ...DEFAULT_LABELS7, ...labels };
14649
14802
  const details = checkoutError?.details;
14650
14803
  const rejectedPhone = checkoutError?.code === "INVALID_INPUT" && typeof details === "object" && details !== null && !Array.isArray(details) && "field" in details && details.field === "customerPhone" && typeof checkoutError.error === "string" && checkoutError.error.trim().length > 0;
14651
14804
  const phoneError = contactErrors?.phone ?? (rejectedPhone ? checkoutError.error : void 0);
@@ -14659,22 +14812,22 @@ function CheckoutForm({
14659
14812
  event.preventDefault();
14660
14813
  if (discountCode.trim() && !discountApplying) onApplyDiscount();
14661
14814
  }
14662
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
14815
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
14663
14816
  loginPrompt,
14664
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
14817
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
14665
14818
  "form",
14666
14819
  {
14667
14820
  "data-testid": "checkout-form",
14668
14821
  onSubmit,
14669
- className: (0, import_utils18.cn)("space-y-8", className),
14822
+ className: (0, import_utils20.cn)("space-y-8", className),
14670
14823
  "data-slot": "checkout-form",
14671
14824
  children: [
14672
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("section", { className: "space-y-4", children: [
14673
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
14674
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
14675
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "space-y-1", children: [
14676
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
14677
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
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)(
14678
14831
  "input",
14679
14832
  {
14680
14833
  id: "checkout-form-name",
@@ -14683,17 +14836,17 @@ function CheckoutForm({
14683
14836
  value: contact.name,
14684
14837
  onChange: (e) => patchContact({ name: e.target.value }),
14685
14838
  placeholder: t.namePlaceholder,
14686
- className: (0, import_utils18.cn)(
14839
+ className: (0, import_utils20.cn)(
14687
14840
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
14688
14841
  contactErrors?.name ? "border-destructive" : "border-border focus:border-primary"
14689
14842
  )
14690
14843
  }
14691
14844
  ),
14692
- contactErrors?.name && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.name })
14845
+ contactErrors?.name && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.name })
14693
14846
  ] }),
14694
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "space-y-1", children: [
14695
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
14696
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
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)(
14697
14850
  "input",
14698
14851
  {
14699
14852
  id: "checkout-form-email",
@@ -14702,15 +14855,15 @@ function CheckoutForm({
14702
14855
  value: contact.email,
14703
14856
  onChange: (e) => patchContact({ email: e.target.value }),
14704
14857
  placeholder: t.emailPlaceholder,
14705
- className: (0, import_utils18.cn)(
14858
+ className: (0, import_utils20.cn)(
14706
14859
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
14707
14860
  contactErrors?.email ? "border-destructive" : "border-border focus:border-primary"
14708
14861
  )
14709
14862
  }
14710
14863
  ),
14711
- contactErrors?.email && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.email })
14864
+ contactErrors?.email && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.email })
14712
14865
  ] }),
14713
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14866
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14714
14867
  import_phone_input.PhoneInput,
14715
14868
  {
14716
14869
  id: "checkout-form-phone",
@@ -14724,15 +14877,15 @@ function CheckoutForm({
14724
14877
  ] })
14725
14878
  ] }),
14726
14879
  children2,
14727
- generalError ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
14728
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("section", { className: "space-y-3", children: [
14729
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
14730
- appliedDiscount ? /* @__PURE__ */ (0, import_jsx_runtime17.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: [
14731
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
14732
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "font-semibold", children: appliedDiscount.code }),
14733
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
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)) })
14734
14887
  ] }),
14735
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14888
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14736
14889
  "button",
14737
14890
  {
14738
14891
  type: "button",
@@ -14742,9 +14895,9 @@ function CheckoutForm({
14742
14895
  children: t.removeDiscount
14743
14896
  }
14744
14897
  )
14745
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex gap-2", children: [
14746
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
14747
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
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)(
14748
14901
  "input",
14749
14902
  {
14750
14903
  id: "checkout-form-discount-code",
@@ -14756,7 +14909,7 @@ function CheckoutForm({
14756
14909
  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"
14757
14910
  }
14758
14911
  ),
14759
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14912
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14760
14913
  "button",
14761
14914
  {
14762
14915
  type: "button",
@@ -14767,14 +14920,14 @@ function CheckoutForm({
14767
14920
  }
14768
14921
  )
14769
14922
  ] }),
14770
- discountError && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-xs text-destructive", children: discountError })
14923
+ discountError && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-xs text-destructive", children: discountError })
14771
14924
  ] }),
14772
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14925
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14773
14926
  "button",
14774
14927
  {
14775
14928
  type: "submit",
14776
14929
  disabled: submitting || submitDisabled,
14777
- className: (0, import_utils18.cn)(
14930
+ className: (0, import_utils20.cn)(
14778
14931
  "flex w-full items-center justify-center gap-2 rounded-xl px-4 py-3 font-semibold transition-all",
14779
14932
  submitting || submitDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
14780
14933
  ),
@@ -14788,20 +14941,20 @@ function CheckoutForm({
14788
14941
  }
14789
14942
 
14790
14943
  // src/components/order-confirmation.tsx
14791
- var import_utils20 = require("@reblu/site-ui/utils");
14944
+ var import_utils22 = require("@reblu/site-ui/utils");
14792
14945
 
14793
14946
  // src/components/order-invoice-link.tsx
14794
- var import_utils19 = require("@reblu/site-ui/utils");
14795
- var import_jsx_runtime18 = require("react/jsx-runtime");
14796
- var DEFAULT_LABELS7 = {
14947
+ var import_utils21 = require("@reblu/site-ui/utils");
14948
+ var import_jsx_runtime20 = require("react/jsx-runtime");
14949
+ var DEFAULT_LABELS8 = {
14797
14950
  linkLabel: "Descargar la factura {number}",
14798
14951
  signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
14799
14952
  };
14800
14953
  function OrderInvoiceLink({ invoice, labels, className }) {
14801
14954
  if (!invoice) return null;
14802
- const t = { ...DEFAULT_LABELS7, ...labels };
14803
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: (0, import_utils19.cn)("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
14804
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14955
+ 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)(
14805
14958
  "a",
14806
14959
  {
14807
14960
  href: invoice.url,
@@ -14809,13 +14962,13 @@ function OrderInvoiceLink({ invoice, labels, className }) {
14809
14962
  children: t.linkLabel.replace("{number}", invoice.number)
14810
14963
  }
14811
14964
  ),
14812
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-muted-foreground", children: t.signInHint })
14965
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-muted-foreground", children: t.signInHint })
14813
14966
  ] });
14814
14967
  }
14815
14968
 
14816
14969
  // src/components/order-confirmation.tsx
14817
- var import_jsx_runtime19 = require("react/jsx-runtime");
14818
- var DEFAULT_LABELS8 = {
14970
+ var import_jsx_runtime21 = require("react/jsx-runtime");
14971
+ var DEFAULT_LABELS9 = {
14819
14972
  pollingTitle: "Confirmando tu pedido\u2026",
14820
14973
  pollingDescription: "Estamos procesando el pago, un momento\u2026",
14821
14974
  foundTitle: "\xA1Pedido confirmado!",
@@ -14856,7 +15009,7 @@ function OrderConfirmation({
14856
15009
  locale,
14857
15010
  className
14858
15011
  }) {
14859
- const t = { ...DEFAULT_LABELS8, ...labels };
15012
+ const t = { ...DEFAULT_LABELS9, ...labels };
14860
15013
  const isPolling = status === "polling" || status === "loading";
14861
15014
  const isFound = status === "found" || status === "paid";
14862
15015
  const { title, description } = (() => {
@@ -14878,43 +15031,43 @@ function OrderConfirmation({
14878
15031
  const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
14879
15032
  const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
14880
15033
  const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
14881
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: (0, import_utils20.cn)("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
14882
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h1", { className: "text-3xl font-bold", children: title }),
14883
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-lg text-muted-foreground", children: description }),
14884
- showFullOrderSummary && order && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "space-y-6", children: [
14885
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
14886
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
14887
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
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 })
14888
15041
  ] }),
14889
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
14890
- order.items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
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)(
14891
15044
  "div",
14892
15045
  {
14893
15046
  className: "flex justify-between gap-4 text-sm",
14894
15047
  children: [
14895
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
15048
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
14896
15049
  item.product.name,
14897
15050
  item.variant ? ` (${item.variant.name})` : "",
14898
15051
  " x",
14899
15052
  item.quantity
14900
15053
  ] }),
14901
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: formatPrice(item.total, currencyCode, locale) })
15054
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: formatPrice(item.total, currencyCode, locale) })
14902
15055
  ]
14903
15056
  },
14904
15057
  idx
14905
15058
  )),
14906
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
14907
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: t.totalLabel }),
14908
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: formatPrice(order.total, currencyCode, locale) })
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) })
14909
15062
  ] }) })
14910
15063
  ] }),
14911
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
15064
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
14912
15065
  t.confirmationEmailPrefix,
14913
15066
  " ",
14914
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "font-medium text-foreground", children: order.customerEmail }),
15067
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "font-medium text-foreground", children: order.customerEmail }),
14915
15068
  "."
14916
15069
  ] }),
14917
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15070
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
14918
15071
  OrderInvoiceLink,
14919
15072
  {
14920
15073
  invoice: order.invoice,
@@ -14922,11 +15075,11 @@ function OrderConfirmation({
14922
15075
  }
14923
15076
  )
14924
15077
  ] }),
14925
- showOrderReference && order && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
14926
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
14927
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
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 })
14928
15081
  ] }),
14929
- status === "failed" && cartHref && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15082
+ status === "failed" && cartHref && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
14930
15083
  "a",
14931
15084
  {
14932
15085
  href: cartHref,
@@ -14934,7 +15087,7 @@ function OrderConfirmation({
14934
15087
  children: t.backToCartLabel
14935
15088
  }
14936
15089
  ),
14937
- showRecheck && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15090
+ showRecheck && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
14938
15091
  "button",
14939
15092
  {
14940
15093
  type: "button",
@@ -14943,16 +15096,16 @@ function OrderConfirmation({
14943
15096
  children: t.recheckLabel
14944
15097
  }
14945
15098
  ),
14946
- showSessionReference && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
14947
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
14948
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
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 })
14949
15102
  ] })
14950
15103
  ] });
14951
15104
  }
14952
15105
 
14953
15106
  // src/components/full-invoice-fields.tsx
14954
- var import_utils21 = require("@reblu/site-ui/utils");
14955
- var import_jsx_runtime20 = require("react/jsx-runtime");
15107
+ var import_utils23 = require("@reblu/site-ui/utils");
15108
+ var import_jsx_runtime22 = require("react/jsx-runtime");
14956
15109
  var EMPTY_FULL_INVOICE_VALUE = {
14957
15110
  wantsFullInvoice: false,
14958
15111
  billingIdType: "NIF",
@@ -14964,7 +15117,7 @@ var EMPTY_FULL_INVOICE_VALUE = {
14964
15117
  city: "",
14965
15118
  country: "ES"
14966
15119
  };
14967
- var DEFAULT_LABELS9 = {
15120
+ var DEFAULT_LABELS10 = {
14968
15121
  toggle: "\xBFQuieres factura completa?",
14969
15122
  underCapNotice: "Para una factura completa necesitas tu NIF/NIE o un documento de identificaci\xF3n. Si no, recibir\xE1s una factura simplificada.",
14970
15123
  overCapNotice: "El importe del pedido supera el m\xE1ximo de la factura simplificada: para completar la compra, indica tu NIF/NIE o un documento de identificaci\xF3n, tu nombre y tu direcci\xF3n de facturaci\xF3n.",
@@ -15065,16 +15218,16 @@ function FullInvoiceFields({
15065
15218
  className
15066
15219
  }) {
15067
15220
  if (!issuesInvoices) return null;
15068
- const t = { ...DEFAULT_LABELS9, ...labels };
15221
+ const t = { ...DEFAULT_LABELS10, ...labels };
15069
15222
  const showFields = value.wantsFullInvoice || overCap;
15070
15223
  const isSpanishNif = value.billingIdType === "NIF";
15071
15224
  const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
15072
- const error = (key2) => errors[key2] ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
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;
15073
15226
  const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
15074
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("section", { className: (0, import_utils21.cn)("space-y-4", className), "data-slot": "full-invoice-fields", children: [
15075
- overCap ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "space-y-1", children: [
15076
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
15077
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
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)(
15078
15231
  "input",
15079
15232
  {
15080
15233
  type: "checkbox",
@@ -15084,12 +15237,12 @@ function FullInvoiceFields({
15084
15237
  ),
15085
15238
  t.toggle
15086
15239
  ] }),
15087
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
15240
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
15088
15241
  ] }),
15089
- showFields && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
15090
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "space-y-1", children: [
15091
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
15092
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
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)(
15093
15246
  "select",
15094
15247
  {
15095
15248
  id: "full-invoice-id-type",
@@ -15098,14 +15251,14 @@ function FullInvoiceFields({
15098
15251
  value: value.billingIdType,
15099
15252
  onChange: (e) => set("billingIdType", e.target.value),
15100
15253
  ...invalid2("billingIdType"),
15101
- children: ID_TYPES.map((type) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: type, children: t.idTypeOptions[type] }, type))
15254
+ children: ID_TYPES.map((type) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: type, children: t.idTypeOptions[type] }, type))
15102
15255
  }
15103
15256
  ),
15104
15257
  error("billingIdType")
15105
15258
  ] }),
15106
- !isSpanishNif && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "space-y-1", children: [
15107
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
15108
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
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)(
15109
15262
  "select",
15110
15263
  {
15111
15264
  id: "full-invoice-id-country",
@@ -15115,16 +15268,16 @@ function FullInvoiceFields({
15115
15268
  onChange: (e) => set("billingIdCountry", e.target.value),
15116
15269
  ...invalid2("billingIdCountry"),
15117
15270
  children: [
15118
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: "", disabled: true, children: t.chooseCountry }),
15119
- countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: c.code, children: c.name }, c.code))
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))
15120
15273
  ]
15121
15274
  }
15122
15275
  ),
15123
15276
  error("billingIdCountry")
15124
15277
  ] }),
15125
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "space-y-1", children: [
15126
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
15127
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
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)(
15128
15281
  "input",
15129
15282
  {
15130
15283
  id: "full-invoice-nif",
@@ -15137,9 +15290,9 @@ function FullInvoiceFields({
15137
15290
  ),
15138
15291
  error("billingNif")
15139
15292
  ] }),
15140
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "space-y-1", children: [
15141
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
15142
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
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)(
15143
15296
  "input",
15144
15297
  {
15145
15298
  id: "full-invoice-name",
@@ -15152,9 +15305,9 @@ function FullInvoiceFields({
15152
15305
  ),
15153
15306
  error("billingName")
15154
15307
  ] }),
15155
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "space-y-1 sm:col-span-2", children: [
15156
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
15157
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
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)(
15158
15311
  "input",
15159
15312
  {
15160
15313
  id: "full-invoice-street",
@@ -15166,9 +15319,9 @@ function FullInvoiceFields({
15166
15319
  }
15167
15320
  )
15168
15321
  ] }),
15169
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "space-y-1", children: [
15170
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
15171
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
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)(
15172
15325
  "input",
15173
15326
  {
15174
15327
  id: "full-invoice-postal-code",
@@ -15179,9 +15332,9 @@ function FullInvoiceFields({
15179
15332
  }
15180
15333
  )
15181
15334
  ] }),
15182
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "space-y-1", children: [
15183
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
15184
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
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)(
15185
15338
  "input",
15186
15339
  {
15187
15340
  id: "full-invoice-city",
@@ -15192,9 +15345,9 @@ function FullInvoiceFields({
15192
15345
  }
15193
15346
  )
15194
15347
  ] }),
15195
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "space-y-1", children: [
15196
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
15197
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
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)(
15198
15351
  "select",
15199
15352
  {
15200
15353
  id: "full-invoice-country",
@@ -15202,11 +15355,11 @@ function FullInvoiceFields({
15202
15355
  required: true,
15203
15356
  value: value.country,
15204
15357
  onChange: (e) => set("country", e.target.value),
15205
- children: countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: c.code, children: c.name }, c.code))
15358
+ children: countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: c.code, children: c.name }, c.code))
15206
15359
  }
15207
15360
  )
15208
15361
  ] }),
15209
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "sm:col-span-2", children: error("address") })
15362
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "sm:col-span-2", children: error("address") })
15210
15363
  ] })
15211
15364
  ] });
15212
15365
  }
@@ -15214,10 +15367,12 @@ function FullInvoiceFields({
15214
15367
  0 && (module.exports = {
15215
15368
  ALLOWED_YOUTUBE_HOSTS,
15216
15369
  AddedToCartToast,
15370
+ CartAdjustmentsNotice,
15217
15371
  CartLineList,
15218
15372
  CartSummary,
15219
15373
  CheckoutForm,
15220
15374
  CheckoutLoginPrompt,
15375
+ CourseDescription,
15221
15376
  DEFAULT_INVOICE_COUNTRIES,
15222
15377
  DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
15223
15378
  DEFAULT_SHOP_ERROR_MESSAGES,
@@ -15246,6 +15401,7 @@ function FullInvoiceFields({
15246
15401
  getShopErrorMessage,
15247
15402
  isAllowedYouTubeHost,
15248
15403
  isOverSimplifiedInvoiceCap,
15404
+ markdownToPlainText,
15249
15405
  markdownToSafeHtml,
15250
15406
  readingTime,
15251
15407
  sanitizeHtml,