@reblu/site-blocks 0.26.0 → 0.28.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,6 +22,7 @@ var src_exports = {};
22
22
  __export(src_exports, {
23
23
  ALLOWED_YOUTUBE_HOSTS: () => ALLOWED_YOUTUBE_HOSTS,
24
24
  AddedToCartToast: () => AddedToCartToast,
25
+ ArbitrationBadge: () => ArbitrationBadge,
25
26
  CartAdjustmentsNotice: () => CartAdjustmentsNotice,
26
27
  CartLineList: () => CartLineList,
27
28
  CartSummary: () => CartSummary,
@@ -13548,6 +13549,8 @@ function CourseDescription({
13548
13549
  var import_jsx_runtime3 = require("react/jsx-runtime");
13549
13550
  var DEFAULT_COURSE_PURCHASE_TERMS_LABELS = {
13550
13551
  withdrawalWaiver: "El acceso empieza al comprar: al pagar pides el acceso inmediato y renuncias al derecho de desistimiento de 14 d\xEDas.",
13552
+ serviceStartRequest: "Al pagar pides expresamente que la formaci\xF3n empiece dentro del plazo de desistimiento de 14 d\xEDas.",
13553
+ consentText: (text3) => ` Texto de la casilla: \xAB${text3}\xBB`,
13551
13554
  accessDuration: (months) => `Acceso durante ${months} ${months === 1 ? "mes" : "meses"} desde la inscripci\xF3n.`,
13552
13555
  refundGuarantee: ({ basis, thresholdPercent, windowDays }) => {
13553
13556
  const period = windowDays != null ? ` durante ${windowDays} d\xEDas desde el pago` : "";
@@ -13568,7 +13571,21 @@ function CoursePurchaseTerms({
13568
13571
  }) {
13569
13572
  const text3 = { ...DEFAULT_COURSE_PURCHASE_TERMS_LABELS, ...labels };
13570
13573
  const items = [];
13571
- if (course.withdrawalWaiverRequired === true) {
13574
+ if (course.withdrawalConsent !== void 0) {
13575
+ const consent = course.withdrawalConsent;
13576
+ if (consent) {
13577
+ const line = consent.kind === "SERVICE_START_REQUEST" ? text3.serviceStartRequest : text3.withdrawalWaiver;
13578
+ items.push({
13579
+ // The waiver keeps its REB-1199 slot (existing SITE styles target it).
13580
+ key: consent.kind === "SERVICE_START_REQUEST" ? "service-start-request" : "withdrawal-waiver",
13581
+ kind: consent.kind,
13582
+ node: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
13583
+ line,
13584
+ text3.consentText(consent.text)
13585
+ ] })
13586
+ });
13587
+ }
13588
+ } else if (course.withdrawalWaiverRequired === true) {
13572
13589
  items.push({ key: "withdrawal-waiver", node: text3.withdrawalWaiver });
13573
13590
  }
13574
13591
  if (typeof course.accessDurationMonths === "number") {
@@ -13579,7 +13596,7 @@ function CoursePurchaseTerms({
13579
13596
  }
13580
13597
  if (items.length === 0) return null;
13581
13598
  const hasHeading = heading !== void 0 && heading !== null && heading !== "";
13582
- const list = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ul", { className: slotClassName("list-disc space-y-1 pl-5", "text-sm text-muted-foreground", listClassName), children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { "data-slot": `course-purchase-terms-${item.key}`, children: item.node }, item.key)) });
13599
+ const list = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ul", { className: slotClassName("list-disc space-y-1 pl-5", "text-sm text-muted-foreground", listClassName), children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { "data-slot": `course-purchase-terms-${item.key}`, "data-kind": item.kind, children: item.node }, item.key)) });
13583
13600
  const Tag = `h${headingLevel}`;
13584
13601
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
13585
13602
  "section",
@@ -14353,6 +14370,33 @@ function FaqAccordion({
14353
14370
 
14354
14371
  // src/components/trust-badges.tsx
14355
14372
  var import_utils12 = require("@reblu/site-ui/utils");
14373
+
14374
+ // src/lib/trust-badge-media.ts
14375
+ var DEFAULT_ADHESION_NUMBER_LABEL = "N.\xBA de adhesi\xF3n";
14376
+ function safeHref(url) {
14377
+ if (typeof url !== "string") return null;
14378
+ try {
14379
+ const parsed = new URL(url);
14380
+ return parsed.protocol === "https:" || parsed.protocol === "http:" ? url : null;
14381
+ } catch {
14382
+ return null;
14383
+ }
14384
+ }
14385
+ function safeLogoSrc(url) {
14386
+ if (typeof url !== "string" || url === "") return null;
14387
+ if (url.startsWith("/")) return url.startsWith("//") || url.startsWith("/\\") ? null : url;
14388
+ return safeHref(url);
14389
+ }
14390
+ function adhesionNumberOf(badge) {
14391
+ const value = badge.adhesionNumber;
14392
+ return typeof value === "string" && value.trim() !== "" ? value.trim() : null;
14393
+ }
14394
+ function trustBadgeAlt(badge, numberLabel = DEFAULT_ADHESION_NUMBER_LABEL) {
14395
+ const number2 = adhesionNumberOf(badge);
14396
+ return number2 ? `${badge.name}. ${numberLabel} ${number2}` : badge.name;
14397
+ }
14398
+
14399
+ // src/components/trust-badges.tsx
14356
14400
  var import_jsx_runtime16 = (
14357
14401
  // eslint-disable-next-line @next/next/no-img-element -- framework-agnostic SDK; the SITE owns image optimisation
14358
14402
  require("react/jsx-runtime")
@@ -14363,7 +14407,8 @@ var DEFAULT_TRUST_BADGE_HEADINGS = Object.freeze(
14363
14407
  INSURANCE: "Aseguradoras",
14364
14408
  SUBVENTION: "Financiaci\xF3n",
14365
14409
  CERTIFICATION: "Certificaciones",
14366
- AWARD: "Premios"
14410
+ AWARD: "Premios",
14411
+ CONSUMER_ARBITRATION: "Arbitraje de consumo"
14367
14412
  }
14368
14413
  );
14369
14414
  var DEFAULT_TRUST_BADGE_TYPE_ORDER = Object.freeze([
@@ -14373,26 +14418,12 @@ var DEFAULT_TRUST_BADGE_TYPE_ORDER = Object.freeze([
14373
14418
  "PARTNER",
14374
14419
  "INSURANCE"
14375
14420
  ]);
14376
- var KNOWN_TYPES = new Set(DEFAULT_TRUST_BADGE_TYPE_ORDER);
14421
+ var KNOWN_TYPES = new Set(Object.keys(DEFAULT_TRUST_BADGE_HEADINGS));
14377
14422
  function isUsable(value) {
14378
14423
  if (typeof value !== "object" || value === null) return false;
14379
14424
  const entry = value;
14380
14425
  return typeof entry.type === "string" && KNOWN_TYPES.has(entry.type) && typeof entry.name === "string" && entry.name.trim() !== "";
14381
14426
  }
14382
- function safeHref(url) {
14383
- if (typeof url !== "string") return null;
14384
- try {
14385
- const parsed = new URL(url);
14386
- return parsed.protocol === "https:" || parsed.protocol === "http:" ? url : null;
14387
- } catch {
14388
- return null;
14389
- }
14390
- }
14391
- function safeLogoSrc(url) {
14392
- if (typeof url !== "string" || url === "") return null;
14393
- if (url.startsWith("/")) return url.startsWith("//") || url.startsWith("/\\") ? null : url;
14394
- return safeHref(url);
14395
- }
14396
14427
  function BadgeContent({ badge, logoClassName }) {
14397
14428
  const src = safeLogoSrc(badge.logoUrl);
14398
14429
  if (src) {
@@ -14400,7 +14431,7 @@ function BadgeContent({ badge, logoClassName }) {
14400
14431
  "img",
14401
14432
  {
14402
14433
  src,
14403
- alt: badge.name,
14434
+ alt: trustBadgeAlt(badge),
14404
14435
  loading: "lazy",
14405
14436
  className: (0, import_utils12.cn)("h-12 w-auto object-contain", logoClassName)
14406
14437
  }
@@ -14490,41 +14521,96 @@ function TrustBadges({
14490
14521
  );
14491
14522
  }
14492
14523
 
14493
- // src/components/page-blocks.tsx
14524
+ // src/components/arbitration-badge.tsx
14494
14525
  var import_utils13 = require("@reblu/site-ui/utils");
14495
- var import_button_variants2 = require("@reblu/site-ui/button-variants");
14496
14526
  var import_jsx_runtime17 = require("react/jsx-runtime");
14527
+ function isArbitrationBadge(value) {
14528
+ if (typeof value !== "object" || value === null) return false;
14529
+ const entry = value;
14530
+ return entry.type === "CONSUMER_ARBITRATION" && typeof entry.name === "string" && entry.name.trim() !== "";
14531
+ }
14532
+ function ArbitrationBadge({
14533
+ badges,
14534
+ numberLabel = DEFAULT_ADHESION_NUMBER_LABEL,
14535
+ showNumber = true,
14536
+ newWindowLabel = "(se abre en una ventana nueva)",
14537
+ className,
14538
+ logoClassName,
14539
+ numberClassName
14540
+ }) {
14541
+ if (!Array.isArray(badges)) return null;
14542
+ const items = badges.filter(isArbitrationBadge);
14543
+ if (items.length === 0) return null;
14544
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14545
+ "ul",
14546
+ {
14547
+ "data-slot": "arbitration-badges",
14548
+ className: (0, import_utils13.cn)("flex flex-wrap items-start gap-6", className),
14549
+ children: items.map((badge) => {
14550
+ const src = safeLogoSrc(badge.logoUrl);
14551
+ const href = safeHref(badge.url);
14552
+ const number2 = adhesionNumberOf(badge);
14553
+ const caption = number2 && (showNumber || !src) ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: (0, import_utils13.cn)("text-xs", numberClassName), "aria-hidden": src ? "true" : void 0, children: `${numberLabel} ${number2}` }) : null;
14554
+ const content = /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "inline-flex flex-col items-center gap-1 text-center", children: [
14555
+ src ? (
14556
+ // eslint-disable-next-line @next/next/no-img-element -- framework-agnostic SDK; the SITE owns image optimisation
14557
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14558
+ "img",
14559
+ {
14560
+ src,
14561
+ alt: trustBadgeAlt(badge, numberLabel),
14562
+ loading: "lazy",
14563
+ className: (0, import_utils13.cn)("h-16 w-auto object-contain", logoClassName)
14564
+ }
14565
+ )
14566
+ ) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-sm font-medium", children: badge.name }),
14567
+ caption
14568
+ ] });
14569
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { "data-slot": "arbitration-badge", children: href ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("a", { href, target: "_blank", rel: "noopener noreferrer", className: "inline-flex", children: [
14570
+ content,
14571
+ " ",
14572
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "sr-only", children: newWindowLabel })
14573
+ ] }) : content }, badge.id);
14574
+ })
14575
+ }
14576
+ );
14577
+ }
14578
+
14579
+ // src/components/page-blocks.tsx
14580
+ var import_utils14 = require("@reblu/site-ui/utils");
14581
+ var import_button_variants2 = require("@reblu/site-ui/button-variants");
14582
+ var import_jsx_runtime18 = require("react/jsx-runtime");
14497
14583
  var ALIASES = {
14498
14584
  doctor_embed: "profile_embed",
14499
14585
  specialty_embed: "page_embed"
14500
14586
  };
14501
14587
  function HeroBlock({ block, headingLevel }) {
14502
14588
  const { title, subtitle, imageUrl } = block.data;
14503
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "space-y-4", children: [
14504
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
14505
- subtitle && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-lg opacity-80", children: subtitle }),
14506
- imageUrl && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
14589
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-4", children: [
14590
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
14591
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-lg opacity-80", children: subtitle }),
14592
+ imageUrl && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
14507
14593
  ] });
14508
14594
  }
14509
14595
  function RichtextBlock({ block, headingLevel }) {
14510
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
14596
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
14511
14597
  }
14512
14598
  function FaqBlock({ block }) {
14513
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FaqAccordion, { items: block.data.items });
14599
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FaqAccordion, { items: block.data.items });
14514
14600
  }
14515
14601
  function StatsBlock({ block }) {
14516
- return /* @__PURE__ */ (0, import_jsx_runtime17.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_runtime17.jsxs)("div", { className: "flex flex-col-reverse gap-1", children: [
14517
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("dt", { className: "text-sm opacity-80", children: item.label }),
14518
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("dd", { className: "text-3xl font-bold", children: item.value })
14602
+ return /* @__PURE__ */ (0, import_jsx_runtime18.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_runtime18.jsxs)("div", { className: "flex flex-col-reverse gap-1", children: [
14603
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("dt", { className: "text-sm opacity-80", children: item.label }),
14604
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("dd", { className: "text-3xl font-bold", children: item.value })
14519
14605
  ] }, i)) });
14520
14606
  }
14521
14607
  function TestimonialBlock({ block }) {
14522
14608
  const { quote, author, role, avatarUrl } = block.data;
14523
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("figure", { className: "space-y-4", children: [
14524
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: quote }) }),
14525
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("figcaption", { className: "flex items-center gap-3", children: [
14609
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("figure", { className: "space-y-4", children: [
14610
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: quote }) }),
14611
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("figcaption", { className: "flex items-center gap-3", children: [
14526
14612
  avatarUrl && // eslint-disable-next-line @next/next/no-img-element
14527
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14613
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14528
14614
  "img",
14529
14615
  {
14530
14616
  src: avatarUrl,
@@ -14533,9 +14619,9 @@ function TestimonialBlock({ block }) {
14533
14619
  className: "h-10 w-10 rounded-full object-cover"
14534
14620
  }
14535
14621
  ),
14536
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { children: [
14537
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "font-semibold", children: author }),
14538
- role && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "block text-sm opacity-80", children: role })
14622
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
14623
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "font-semibold", children: author }),
14624
+ role && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "block text-sm opacity-80", children: role })
14539
14625
  ] })
14540
14626
  ] })
14541
14627
  ] });
@@ -14544,19 +14630,19 @@ function CtaSlotBlock(_props) {
14544
14630
  return null;
14545
14631
  }
14546
14632
  function FeatureListBlock({ block }) {
14547
- return /* @__PURE__ */ (0, import_jsx_runtime17.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_runtime17.jsx)("li", { children: item.text }, i)) });
14633
+ return /* @__PURE__ */ (0, import_jsx_runtime18.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_runtime18.jsx)("li", { children: item.text }, i)) });
14548
14634
  }
14549
14635
  function GalleryBlock({ block }) {
14550
14636
  const { images } = block.data;
14551
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14637
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14552
14638
  "div",
14553
14639
  {
14554
- className: (0, import_utils13.cn)(
14640
+ className: (0, import_utils14.cn)(
14555
14641
  "grid gap-4",
14556
14642
  images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
14557
14643
  ),
14558
- children: images.map((img, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("figure", { className: "space-y-1", children: [
14559
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14644
+ children: images.map((img, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("figure", { className: "space-y-1", children: [
14645
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14560
14646
  "img",
14561
14647
  {
14562
14648
  src: img.url,
@@ -14565,7 +14651,7 @@ function GalleryBlock({ block }) {
14565
14651
  className: "h-full w-full object-cover"
14566
14652
  }
14567
14653
  ) }),
14568
- img.caption && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("figcaption", { className: "text-sm opacity-80", children: img.caption })
14654
+ img.caption && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("figcaption", { className: "text-sm opacity-80", children: img.caption })
14569
14655
  ] }, `${img.url}-${i}`))
14570
14656
  }
14571
14657
  );
@@ -14575,13 +14661,13 @@ function EmbedCard({
14575
14661
  headingLevel,
14576
14662
  embedHref
14577
14663
  }) {
14578
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
14664
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
14579
14665
  "a",
14580
14666
  {
14581
14667
  href: embedHref(resolved),
14582
14668
  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",
14583
14669
  children: [
14584
- resolved.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14670
+ resolved.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14585
14671
  "img",
14586
14672
  {
14587
14673
  src: resolved.coverImageUrl,
@@ -14590,24 +14676,24 @@ function EmbedCard({
14590
14676
  className: "h-full w-full object-cover"
14591
14677
  }
14592
14678
  ) }),
14593
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "space-y-1 p-4", children: [
14594
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
14595
- resolved.role && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
14596
- resolved.excerpt && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-muted-foreground", children: resolved.excerpt })
14679
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-1 p-4", children: [
14680
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
14681
+ resolved.role && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
14682
+ resolved.excerpt && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-muted-foreground", children: resolved.excerpt })
14597
14683
  ] })
14598
14684
  ]
14599
14685
  }
14600
14686
  );
14601
14687
  }
14602
14688
  function PageEmbedBlock({ block, headingLevel, embedHref }) {
14603
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
14689
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
14604
14690
  }
14605
14691
  function ProfileEmbedBlock({
14606
14692
  block,
14607
14693
  headingLevel,
14608
14694
  embedHref
14609
14695
  }) {
14610
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
14696
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
14611
14697
  }
14612
14698
  var DEFAULT_RENDERERS = {
14613
14699
  hero: HeroBlock,
@@ -14664,14 +14750,14 @@ function toIdFragment(value) {
14664
14750
  function SectionCta2({ cta }) {
14665
14751
  if (!hasUsableCta(cta)) return null;
14666
14752
  const variant = toButtonVariant(cta.variant);
14667
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14753
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14668
14754
  "a",
14669
14755
  {
14670
14756
  href: cta.url,
14671
14757
  "data-slot": "button",
14672
14758
  "data-variant": variant,
14673
14759
  "data-size": "default",
14674
- className: (0, import_utils13.cn)((0, import_button_variants2.buttonVariants)({ variant, size: "default" })),
14760
+ className: (0, import_utils14.cn)((0, import_button_variants2.buttonVariants)({ variant, size: "default" })),
14675
14761
  ...cta.isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
14676
14762
  children: cta.label
14677
14763
  }
@@ -14697,17 +14783,17 @@ function PageBlocks({
14697
14783
  const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
14698
14784
  const background = block.backgroundColor;
14699
14785
  return [
14700
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
14786
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
14701
14787
  "section",
14702
14788
  {
14703
14789
  "data-slot": "page-block",
14704
14790
  "data-block-type": type,
14705
14791
  "aria-labelledby": headingId,
14706
14792
  style: surfaceStyle(background),
14707
- className: (0, import_utils13.cn)("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
14793
+ className: (0, import_utils14.cn)("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
14708
14794
  children: [
14709
- block.heading && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { id: headingId, children: block.heading }) }),
14710
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14795
+ block.heading && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { id: headingId, children: block.heading }) }),
14796
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14711
14797
  Renderer,
14712
14798
  {
14713
14799
  block,
@@ -14715,7 +14801,7 @@ function PageBlocks({
14715
14801
  embedHref
14716
14802
  }
14717
14803
  ),
14718
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SectionCta2, { cta: block.cta })
14804
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SectionCta2, { cta: block.cta })
14719
14805
  ]
14720
14806
  },
14721
14807
  block.id
@@ -14723,12 +14809,12 @@ function PageBlocks({
14723
14809
  ];
14724
14810
  });
14725
14811
  if (sections.length === 0) return null;
14726
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: (0, import_utils13.cn)("space-y-12", className), "data-slot": "page-blocks", children: sections });
14812
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: (0, import_utils14.cn)("space-y-12", className), "data-slot": "page-blocks", children: sections });
14727
14813
  }
14728
14814
 
14729
14815
  // src/components/shop-filters.tsx
14730
- var import_utils14 = require("@reblu/site-ui/utils");
14731
- var import_jsx_runtime18 = require("react/jsx-runtime");
14816
+ var import_utils15 = require("@reblu/site-ui/utils");
14817
+ var import_jsx_runtime19 = require("react/jsx-runtime");
14732
14818
  var DEFAULT_SHOP_PRICE_BANDS = [
14733
14819
  { max: 2500 },
14734
14820
  { min: 2500, max: 5e3 },
@@ -14772,7 +14858,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
14772
14858
  return "";
14773
14859
  }
14774
14860
  function OptionLink({ href, active, label, onActivate }) {
14775
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14861
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14776
14862
  "a",
14777
14863
  {
14778
14864
  href,
@@ -14781,7 +14867,7 @@ function OptionLink({ href, active, label, onActivate }) {
14781
14867
  event.preventDefault();
14782
14868
  onActivate();
14783
14869
  } : void 0,
14784
- className: (0, import_utils14.cn)(
14870
+ className: (0, import_utils15.cn)(
14785
14871
  "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",
14786
14872
  active ? "border-transparent bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
14787
14873
  ),
@@ -14790,9 +14876,9 @@ function OptionLink({ href, active, label, onActivate }) {
14790
14876
  );
14791
14877
  }
14792
14878
  function FilterFieldset({ legend, children: children2 }) {
14793
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("fieldset", { className: "space-y-2", children: [
14794
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("legend", { className: "text-sm font-medium text-foreground", children: legend }),
14795
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex flex-wrap gap-2", children: children2 })
14879
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("fieldset", { className: "space-y-2", children: [
14880
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("legend", { className: "text-sm font-medium text-foreground", children: legend }),
14881
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "flex flex-wrap gap-2", children: children2 })
14796
14882
  ] });
14797
14883
  }
14798
14884
  function ShopFilters({
@@ -14815,11 +14901,11 @@ function ShopFilters({
14815
14901
  if (!shouldRenderShopFilters(facets, active)) {
14816
14902
  return null;
14817
14903
  }
14818
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: (0, import_utils14.cn)("space-y-6", className), "data-slot": "shop-filters", children: [
14904
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: (0, import_utils15.cn)("space-y-6", className), "data-slot": "shop-filters", children: [
14819
14905
  visibleTaxonomies.map((axis) => {
14820
14906
  const activeSlug = active.taxonomy?.[axis.key];
14821
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(FilterFieldset, { legend: axis.label, children: [
14822
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14907
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(FilterFieldset, { legend: axis.label, children: [
14908
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14823
14909
  OptionLink,
14824
14910
  {
14825
14911
  href: hrefs.taxonomy(axis.key, void 0),
@@ -14834,7 +14920,7 @@ function ShopFilters({
14834
14920
  ),
14835
14921
  axis.terms.map((term) => {
14836
14922
  const isActive = activeSlug === term.slug;
14837
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14923
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14838
14924
  OptionLink,
14839
14925
  {
14840
14926
  href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
@@ -14854,9 +14940,9 @@ function ShopFilters({
14854
14940
  }),
14855
14941
  visibleAttributes.map((attr) => {
14856
14942
  const activeValues = toValueArray(active.attr?.[attr.key]);
14857
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
14943
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
14858
14944
  const isActive = activeValues.includes(opt.value);
14859
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14945
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14860
14946
  OptionLink,
14861
14947
  {
14862
14948
  href: hrefs.attr(attr.key, opt.value),
@@ -14874,11 +14960,11 @@ function ShopFilters({
14874
14960
  );
14875
14961
  }) }, attr.key);
14876
14962
  }),
14877
- showPriceGroup && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
14963
+ showPriceGroup && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
14878
14964
  const isActive = active.priceMin === band.min && active.priceMax === band.max;
14879
14965
  const nextMin = isActive ? void 0 : band.min;
14880
14966
  const nextMax = isActive ? void 0 : band.max;
14881
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14967
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14882
14968
  OptionLink,
14883
14969
  {
14884
14970
  href: hrefs.price(nextMin, nextMax),
@@ -14889,7 +14975,7 @@ function ShopFilters({
14889
14975
  i
14890
14976
  );
14891
14977
  }) }),
14892
- hasOnSale && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14978
+ hasOnSale && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14893
14979
  OptionLink,
14894
14980
  {
14895
14981
  href: hrefs.onSale(!active.onSale),
@@ -14898,7 +14984,7 @@ function ShopFilters({
14898
14984
  onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
14899
14985
  }
14900
14986
  ),
14901
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14987
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14902
14988
  "a",
14903
14989
  {
14904
14990
  href: hrefs.clearAll(),
@@ -14914,8 +15000,8 @@ function ShopFilters({
14914
15000
  }
14915
15001
 
14916
15002
  // src/components/course-catalog-filters.tsx
14917
- var import_utils15 = require("@reblu/site-ui/utils");
14918
- var import_jsx_runtime19 = require("react/jsx-runtime");
15003
+ var import_utils16 = require("@reblu/site-ui/utils");
15004
+ var import_jsx_runtime20 = require("react/jsx-runtime");
14919
15005
  var DEFAULT_COURSE_PRICE_BANDS = [
14920
15006
  { max: 5e3 },
14921
15007
  { min: 5e3, max: 15e3 },
@@ -14968,9 +15054,9 @@ function CourseCatalogFilters({
14968
15054
  const showPrice = enabled.price !== false;
14969
15055
  const isFree = Boolean(active.free);
14970
15056
  if (!showCategories && !showInstructors && !showPrice) return null;
14971
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: (0, import_utils15.cn)("space-y-6", className), "data-slot": "course-catalog-filters", children: [
14972
- showCategories && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(FilterFieldset, { legend: t.category, children: [
14973
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15057
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: (0, import_utils16.cn)("space-y-6", className), "data-slot": "course-catalog-filters", children: [
15058
+ showCategories && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(FilterFieldset, { legend: t.category, children: [
15059
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14974
15060
  OptionLink,
14975
15061
  {
14976
15062
  href: categoryHref(void 0),
@@ -14982,7 +15068,7 @@ function CourseCatalogFilters({
14982
15068
  sortedCategories.map((category) => {
14983
15069
  const isActive = active.category === category.slug;
14984
15070
  const next2 = isActive ? void 0 : category.slug;
14985
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15071
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14986
15072
  OptionLink,
14987
15073
  {
14988
15074
  href: categoryHref(next2),
@@ -14994,8 +15080,8 @@ function CourseCatalogFilters({
14994
15080
  );
14995
15081
  })
14996
15082
  ] }),
14997
- showInstructors && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(FilterFieldset, { legend: t.instructor, children: [
14998
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15083
+ showInstructors && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(FilterFieldset, { legend: t.instructor, children: [
15084
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14999
15085
  OptionLink,
15000
15086
  {
15001
15087
  href: hrefs.instructor(void 0),
@@ -15007,7 +15093,7 @@ function CourseCatalogFilters({
15007
15093
  named.map((instructor) => {
15008
15094
  const isActive = active.instructor === instructor.id;
15009
15095
  const next2 = isActive ? void 0 : instructor.id;
15010
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15096
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15011
15097
  OptionLink,
15012
15098
  {
15013
15099
  href: hrefs.instructor(next2),
@@ -15019,8 +15105,8 @@ function CourseCatalogFilters({
15019
15105
  );
15020
15106
  })
15021
15107
  ] }),
15022
- showPrice && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(FilterFieldset, { legend: t.price, children: [
15023
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15108
+ showPrice && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(FilterFieldset, { legend: t.price, children: [
15109
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15024
15110
  OptionLink,
15025
15111
  {
15026
15112
  href: hrefs.free(!isFree),
@@ -15035,7 +15121,7 @@ function CourseCatalogFilters({
15035
15121
  const isActive = !isFree && active.priceMin === band.min && active.priceMax === band.max;
15036
15122
  const nextMin = isActive ? void 0 : band.min;
15037
15123
  const nextMax = isActive ? void 0 : band.max;
15038
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15124
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15039
15125
  OptionLink,
15040
15126
  {
15041
15127
  href: hrefs.price(nextMin, nextMax),
@@ -15047,7 +15133,7 @@ function CourseCatalogFilters({
15047
15133
  );
15048
15134
  })
15049
15135
  ] }),
15050
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15136
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15051
15137
  "a",
15052
15138
  {
15053
15139
  href: hrefs.clearAll(),
@@ -15069,8 +15155,8 @@ function CourseCatalogFilters({
15069
15155
  }
15070
15156
 
15071
15157
  // src/components/cart-line-list.tsx
15072
- var import_utils16 = require("@reblu/site-ui/utils");
15073
- var import_jsx_runtime20 = require("react/jsx-runtime");
15158
+ var import_utils17 = require("@reblu/site-ui/utils");
15159
+ var import_jsx_runtime21 = require("react/jsx-runtime");
15074
15160
  var DEFAULT_LABELS2 = {
15075
15161
  quantityLabel: "Cantidad",
15076
15162
  decrease: "Reducir cantidad",
@@ -15096,9 +15182,9 @@ function CartLineList({
15096
15182
  }) {
15097
15183
  const t = { ...DEFAULT_LABELS2, ...labels };
15098
15184
  const noticeContent = notice === true ? t.cancelledNotice : notice;
15099
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: (0, import_utils16.cn)("space-y-4", className), "data-slot": "cart-line-list", children: [
15100
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
15101
- noticeContent != null && noticeContent !== false && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15185
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: (0, import_utils17.cn)("space-y-4", className), "data-slot": "cart-line-list", children: [
15186
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
15187
+ noticeContent != null && noticeContent !== false && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15102
15188
  "div",
15103
15189
  {
15104
15190
  role: "status",
@@ -15107,33 +15193,33 @@ function CartLineList({
15107
15193
  children: noticeContent
15108
15194
  }
15109
15195
  ),
15110
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("ul", { className: "space-y-4", children: items.map((item) => {
15196
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("ul", { className: "space-y-4", children: items.map((item) => {
15111
15197
  const maxQty = item.maxStock ?? Infinity;
15112
15198
  const atMax = item.quantity >= maxQty;
15113
15199
  const atMin = item.quantity <= 1;
15114
15200
  const message = lineMessage?.(item);
15115
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
15201
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
15116
15202
  "li",
15117
15203
  {
15118
15204
  className: "flex gap-4 rounded-xl border border-border bg-card p-4",
15119
15205
  children: [
15120
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
15121
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "min-w-0 flex-1", children: [
15122
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
15123
- item.variantName && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
15124
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("p", { className: "mt-1 text-sm text-muted-foreground", children: [
15206
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
15207
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "min-w-0 flex-1", children: [
15208
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
15209
+ item.variantName && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
15210
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("p", { className: "mt-1 text-sm text-muted-foreground", children: [
15125
15211
  formatPrice(item.unitPrice, currencyCode, locale),
15126
15212
  " ",
15127
15213
  t.unitPriceSuffix
15128
15214
  ] }),
15129
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
15215
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
15130
15216
  "div",
15131
15217
  {
15132
15218
  role: "group",
15133
15219
  "aria-label": t.quantityLabel,
15134
15220
  className: "mt-3 flex items-center gap-3",
15135
15221
  children: [
15136
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15222
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15137
15223
  "button",
15138
15224
  {
15139
15225
  type: "button",
@@ -15144,8 +15230,8 @@ function CartLineList({
15144
15230
  children: "\u2212"
15145
15231
  }
15146
15232
  ),
15147
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
15148
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15233
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
15234
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15149
15235
  "button",
15150
15236
  {
15151
15237
  type: "button",
@@ -15156,7 +15242,7 @@ function CartLineList({
15156
15242
  children: "+"
15157
15243
  }
15158
15244
  ),
15159
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15245
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15160
15246
  "button",
15161
15247
  {
15162
15248
  type: "button",
@@ -15169,7 +15255,7 @@ function CartLineList({
15169
15255
  ]
15170
15256
  }
15171
15257
  ),
15172
- message != null && message !== false && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15258
+ message != null && message !== false && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15173
15259
  "p",
15174
15260
  {
15175
15261
  className: "mt-2 text-sm text-destructive",
@@ -15178,7 +15264,7 @@ function CartLineList({
15178
15264
  }
15179
15265
  )
15180
15266
  ] }),
15181
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
15267
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
15182
15268
  ]
15183
15269
  },
15184
15270
  lineKey(item.productId, item.variantId)
@@ -15188,8 +15274,8 @@ function CartLineList({
15188
15274
  }
15189
15275
 
15190
15276
  // src/components/cart-summary.tsx
15191
- var import_utils17 = require("@reblu/site-ui/utils");
15192
- var import_jsx_runtime21 = require("react/jsx-runtime");
15277
+ var import_utils18 = require("@reblu/site-ui/utils");
15278
+ var import_jsx_runtime22 = require("react/jsx-runtime");
15193
15279
  var DEFAULT_LABELS3 = {
15194
15280
  subtotal: "Subtotal",
15195
15281
  discountPrefix: "Descuento",
@@ -15219,37 +15305,37 @@ function CartSummary({
15219
15305
  const hasDiscount = Boolean(discountAmount && discountAmount > 0);
15220
15306
  const noticeContent = notice === true ? t.cancelledNotice : notice;
15221
15307
  const hasNotice = noticeContent != null && noticeContent !== false;
15222
- const breakdown = /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
15308
+ const breakdown = /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
15223
15309
  "dl",
15224
15310
  {
15225
- className: (0, import_utils17.cn)("space-y-2 text-sm", !hasNotice && className),
15311
+ className: (0, import_utils18.cn)("space-y-2 text-sm", !hasNotice && className),
15226
15312
  "data-slot": "cart-summary",
15227
15313
  children: [
15228
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
15229
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("dt", { children: t.subtotal }),
15230
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("dd", { children: formatPrice(subtotal, currencyCode, locale) })
15314
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
15315
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("dt", { children: t.subtotal }),
15316
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("dd", { children: formatPrice(subtotal, currencyCode, locale) })
15231
15317
  ] }),
15232
- hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
15233
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("dt", { children: autoDiscount ? t.staffDiscountApplied : `${t.discountPrefix}${discountCode ? ` (${discountCode})` : ""}` }),
15234
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("dd", { children: [
15318
+ hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
15319
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("dt", { children: autoDiscount ? t.staffDiscountApplied : `${t.discountPrefix}${discountCode ? ` (${discountCode})` : ""}` }),
15320
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("dd", { children: [
15235
15321
  "-",
15236
15322
  formatPrice(discountAmount, currencyCode, locale)
15237
15323
  ] })
15238
15324
  ] }),
15239
- shippingEnabled && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
15240
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("dt", { children: t.shipping }),
15241
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
15325
+ shippingEnabled && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
15326
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("dt", { children: t.shipping }),
15327
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
15242
15328
  ] }),
15243
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
15244
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("dt", { children: t.total }),
15245
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("dd", { children: formatPrice(total, currencyCode, locale) })
15329
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
15330
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("dt", { children: t.total }),
15331
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("dd", { children: formatPrice(total, currencyCode, locale) })
15246
15332
  ] })
15247
15333
  ]
15248
15334
  }
15249
15335
  );
15250
15336
  if (!hasNotice) return breakdown;
15251
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: (0, import_utils17.cn)("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
15252
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15337
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: (0, import_utils18.cn)("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
15338
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15253
15339
  "div",
15254
15340
  {
15255
15341
  role: "status",
@@ -15263,8 +15349,8 @@ function CartSummary({
15263
15349
  }
15264
15350
 
15265
15351
  // src/components/cart-adjustments-notice.tsx
15266
- var import_utils18 = require("@reblu/site-ui/utils");
15267
- var import_jsx_runtime22 = require("react/jsx-runtime");
15352
+ var import_utils19 = require("@reblu/site-ui/utils");
15353
+ var import_jsx_runtime23 = require("react/jsx-runtime");
15268
15354
  var DEFAULT_LABELS4 = {
15269
15355
  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.`,
15270
15356
  quantityChanged: (name, quantity) => `Hemos ajustado la cantidad de ${name} a ${quantity} por el stock disponible.`,
@@ -15298,20 +15384,20 @@ function CartAdjustmentsNotice({
15298
15384
  );
15299
15385
  }
15300
15386
  if (messages.length === 0) return null;
15301
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15387
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15302
15388
  "div",
15303
15389
  {
15304
15390
  role: "status",
15305
- className: (0, import_utils18.cn)("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
15391
+ className: (0, import_utils19.cn)("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
15306
15392
  "data-slot": "cart-adjustments-notice",
15307
- children: messages.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { children: messages[0] }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("li", { children: message }, index)) })
15393
+ children: messages.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { children: messages[0] }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("li", { children: message }, index)) })
15308
15394
  }
15309
15395
  );
15310
15396
  }
15311
15397
 
15312
15398
  // src/components/added-to-cart-toast.tsx
15313
- var import_utils19 = require("@reblu/site-ui/utils");
15314
- var import_jsx_runtime23 = (
15399
+ var import_utils20 = require("@reblu/site-ui/utils");
15400
+ var import_jsx_runtime24 = (
15315
15401
  // eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
15316
15402
  require("react/jsx-runtime")
15317
15403
  );
@@ -15334,32 +15420,32 @@ function AddedToCartToast({
15334
15420
  const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
15335
15421
  const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
15336
15422
  const variant = status === "success" ? "success" : "error";
15337
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
15423
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
15338
15424
  "div",
15339
15425
  {
15340
15426
  "data-slot": "added-to-cart-toast",
15341
15427
  "data-variant": variant,
15342
- className: (0, import_utils19.cn)(
15428
+ className: (0, import_utils20.cn)(
15343
15429
  "flex items-center gap-3 rounded-xl border border-border bg-card p-3 text-sm shadow-lg",
15344
15430
  variant === "success" && "border-green-600/30 dark:border-green-400/30",
15345
15431
  variant === "error" && "border-destructive/30",
15346
15432
  className
15347
15433
  ),
15348
15434
  children: [
15349
- hasThumbnail && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
15350
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "min-w-0 flex-1", children: [
15351
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "truncate font-semibold text-foreground", children: productName }),
15352
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
15435
+ hasThumbnail && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
15436
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "min-w-0 flex-1", children: [
15437
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "truncate font-semibold text-foreground", children: productName }),
15438
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
15353
15439
  ] }),
15354
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
15440
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
15355
15441
  ]
15356
15442
  }
15357
15443
  );
15358
15444
  }
15359
15445
 
15360
15446
  // src/components/checkout-login-prompt.tsx
15361
- var import_utils20 = require("@reblu/site-ui/utils");
15362
- var import_jsx_runtime24 = require("react/jsx-runtime");
15447
+ var import_utils21 = require("@reblu/site-ui/utils");
15448
+ var import_jsx_runtime25 = require("react/jsx-runtime");
15363
15449
  var DEFAULT_LABELS6 = {
15364
15450
  title: "Identificaci\xF3n",
15365
15451
  description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
@@ -15386,26 +15472,26 @@ function CheckoutLoginPrompt({
15386
15472
  if (!open) return null;
15387
15473
  const t = { ...DEFAULT_LABELS6, ...labels };
15388
15474
  const isValidEmail = EMAIL_PATTERN.test(email.trim());
15389
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
15390
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
15391
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
15475
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
15476
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
15477
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
15392
15478
  "div",
15393
15479
  {
15394
15480
  role: "dialog",
15395
15481
  "aria-modal": "true",
15396
15482
  "aria-labelledby": "checkout-login-prompt-title",
15397
15483
  "data-slot": "checkout-login-prompt",
15398
- className: (0, import_utils20.cn)(
15484
+ className: (0, import_utils21.cn)(
15399
15485
  "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",
15400
15486
  className
15401
15487
  ),
15402
15488
  children: [
15403
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
15404
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { children: [
15405
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
15406
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
15489
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
15490
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { children: [
15491
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
15492
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
15407
15493
  ] }),
15408
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
15494
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15409
15495
  "button",
15410
15496
  {
15411
15497
  type: "button",
@@ -15416,9 +15502,9 @@ function CheckoutLoginPrompt({
15416
15502
  }
15417
15503
  )
15418
15504
  ] }),
15419
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "space-y-2", children: [
15420
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
15421
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
15505
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "space-y-2", children: [
15506
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
15507
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15422
15508
  "input",
15423
15509
  {
15424
15510
  id: "checkout-login-prompt-email",
@@ -15427,29 +15513,29 @@ function CheckoutLoginPrompt({
15427
15513
  value: email,
15428
15514
  onChange: (e) => onEmailChange(e.target.value),
15429
15515
  placeholder: t.emailPlaceholder,
15430
- className: (0, import_utils20.cn)(
15516
+ className: (0, import_utils21.cn)(
15431
15517
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
15432
15518
  error ? "border-destructive" : "border-border focus:border-primary"
15433
15519
  )
15434
15520
  }
15435
15521
  ),
15436
- error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-xs text-destructive", children: error })
15522
+ error && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-xs text-destructive", children: error })
15437
15523
  ] }),
15438
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "space-y-2", children: [
15439
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
15524
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "space-y-2", children: [
15525
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15440
15526
  "button",
15441
15527
  {
15442
15528
  type: "button",
15443
15529
  onClick: onSubmitEmail,
15444
15530
  disabled: checking || !isValidEmail,
15445
- className: (0, import_utils20.cn)(
15531
+ className: (0, import_utils21.cn)(
15446
15532
  "flex w-full cursor-pointer items-center justify-center gap-2 rounded-xl px-4 py-2.5 text-sm font-semibold transition-all",
15447
15533
  checking || !isValidEmail ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
15448
15534
  ),
15449
15535
  children: checking ? t.checking : t.continueWithEmail
15450
15536
  }
15451
15537
  ),
15452
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
15538
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15453
15539
  "button",
15454
15540
  {
15455
15541
  type: "button",
@@ -15466,9 +15552,9 @@ function CheckoutLoginPrompt({
15466
15552
  }
15467
15553
 
15468
15554
  // src/components/checkout-form.tsx
15469
- var import_utils21 = require("@reblu/site-ui/utils");
15555
+ var import_utils22 = require("@reblu/site-ui/utils");
15470
15556
  var import_phone_input = require("@reblu/site-ui/phone-input");
15471
- var import_jsx_runtime25 = require("react/jsx-runtime");
15557
+ var import_jsx_runtime26 = require("react/jsx-runtime");
15472
15558
  var DEFAULT_LABELS7 = {
15473
15559
  contactTitle: "Datos de contacto",
15474
15560
  nameLabel: "Nombre completo",
@@ -15524,22 +15610,22 @@ function CheckoutForm({
15524
15610
  event.preventDefault();
15525
15611
  if (discountCode.trim() && !discountApplying) onApplyDiscount();
15526
15612
  }
15527
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
15613
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
15528
15614
  loginPrompt,
15529
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
15615
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
15530
15616
  "form",
15531
15617
  {
15532
15618
  "data-testid": "checkout-form",
15533
15619
  onSubmit,
15534
- className: (0, import_utils21.cn)("space-y-8", className),
15620
+ className: (0, import_utils22.cn)("space-y-8", className),
15535
15621
  "data-slot": "checkout-form",
15536
15622
  children: [
15537
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("section", { className: "space-y-4", children: [
15538
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
15539
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
15540
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "space-y-1", children: [
15541
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
15542
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15623
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("section", { className: "space-y-4", children: [
15624
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
15625
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
15626
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "space-y-1", children: [
15627
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
15628
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
15543
15629
  "input",
15544
15630
  {
15545
15631
  id: "checkout-form-name",
@@ -15548,17 +15634,17 @@ function CheckoutForm({
15548
15634
  value: contact.name,
15549
15635
  onChange: (e) => patchContact({ name: e.target.value }),
15550
15636
  placeholder: t.namePlaceholder,
15551
- className: (0, import_utils21.cn)(
15637
+ className: (0, import_utils22.cn)(
15552
15638
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
15553
15639
  contactErrors?.name ? "border-destructive" : "border-border focus:border-primary"
15554
15640
  )
15555
15641
  }
15556
15642
  ),
15557
- contactErrors?.name && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.name })
15643
+ contactErrors?.name && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.name })
15558
15644
  ] }),
15559
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "space-y-1", children: [
15560
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
15561
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15645
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "space-y-1", children: [
15646
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
15647
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
15562
15648
  "input",
15563
15649
  {
15564
15650
  id: "checkout-form-email",
@@ -15567,15 +15653,15 @@ function CheckoutForm({
15567
15653
  value: contact.email,
15568
15654
  onChange: (e) => patchContact({ email: e.target.value }),
15569
15655
  placeholder: t.emailPlaceholder,
15570
- className: (0, import_utils21.cn)(
15656
+ className: (0, import_utils22.cn)(
15571
15657
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
15572
15658
  contactErrors?.email ? "border-destructive" : "border-border focus:border-primary"
15573
15659
  )
15574
15660
  }
15575
15661
  ),
15576
- contactErrors?.email && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.email })
15662
+ contactErrors?.email && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.email })
15577
15663
  ] }),
15578
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15664
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
15579
15665
  import_phone_input.PhoneInput,
15580
15666
  {
15581
15667
  id: "checkout-form-phone",
@@ -15589,26 +15675,26 @@ function CheckoutForm({
15589
15675
  ] })
15590
15676
  ] }),
15591
15677
  children2,
15592
- generalError ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
15593
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("section", { className: "space-y-3", children: [
15594
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
15595
- autoDiscount ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
15678
+ generalError ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
15679
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("section", { className: "space-y-3", children: [
15680
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
15681
+ autoDiscount ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
15596
15682
  "div",
15597
15683
  {
15598
15684
  className: "flex items-center gap-2 rounded-lg border border-green-200 bg-green-50 px-4 py-3 text-sm text-green-700 dark:border-green-800 dark:bg-green-900/20 dark:text-green-400",
15599
15685
  "data-slot": "checkout-staff-discount",
15600
15686
  children: [
15601
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "font-semibold", children: t.staffDiscountApplied }),
15602
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(autoDiscount.amount, currencyCode, locale)) })
15687
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "font-semibold", children: t.staffDiscountApplied }),
15688
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(autoDiscount.amount, currencyCode, locale)) })
15603
15689
  ]
15604
15690
  }
15605
15691
  ) : null,
15606
- appliedDiscount && !autoDiscount ? /* @__PURE__ */ (0, import_jsx_runtime25.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: [
15607
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
15608
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "font-semibold", children: appliedDiscount.code }),
15609
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
15692
+ appliedDiscount && !autoDiscount ? /* @__PURE__ */ (0, import_jsx_runtime26.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: [
15693
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
15694
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "font-semibold", children: appliedDiscount.code }),
15695
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
15610
15696
  ] }),
15611
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15697
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
15612
15698
  "button",
15613
15699
  {
15614
15700
  type: "button",
@@ -15618,9 +15704,9 @@ function CheckoutForm({
15618
15704
  children: t.removeDiscount
15619
15705
  }
15620
15706
  )
15621
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex gap-2", children: [
15622
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
15623
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15707
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex gap-2", children: [
15708
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
15709
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
15624
15710
  "input",
15625
15711
  {
15626
15712
  id: "checkout-form-discount-code",
@@ -15632,7 +15718,7 @@ function CheckoutForm({
15632
15718
  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"
15633
15719
  }
15634
15720
  ),
15635
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15721
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
15636
15722
  "button",
15637
15723
  {
15638
15724
  type: "button",
@@ -15643,14 +15729,14 @@ function CheckoutForm({
15643
15729
  }
15644
15730
  )
15645
15731
  ] }),
15646
- discountError && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-xs text-destructive", children: discountError })
15732
+ discountError && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-xs text-destructive", children: discountError })
15647
15733
  ] }),
15648
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
15734
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
15649
15735
  "button",
15650
15736
  {
15651
15737
  type: "submit",
15652
15738
  disabled: submitting || submitDisabled,
15653
- className: (0, import_utils21.cn)(
15739
+ className: (0, import_utils22.cn)(
15654
15740
  "flex w-full cursor-pointer items-center justify-center gap-2 rounded-xl px-4 py-3 font-semibold transition-all",
15655
15741
  submitting || submitDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
15656
15742
  ),
@@ -15664,11 +15750,11 @@ function CheckoutForm({
15664
15750
  }
15665
15751
 
15666
15752
  // src/components/order-confirmation.tsx
15667
- var import_utils23 = require("@reblu/site-ui/utils");
15753
+ var import_utils24 = require("@reblu/site-ui/utils");
15668
15754
 
15669
15755
  // src/components/order-invoice-link.tsx
15670
- var import_utils22 = require("@reblu/site-ui/utils");
15671
- var import_jsx_runtime26 = require("react/jsx-runtime");
15756
+ var import_utils23 = require("@reblu/site-ui/utils");
15757
+ var import_jsx_runtime27 = require("react/jsx-runtime");
15672
15758
  var DEFAULT_LABELS8 = {
15673
15759
  linkLabel: "Descargar la factura {number}",
15674
15760
  signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
@@ -15676,8 +15762,8 @@ var DEFAULT_LABELS8 = {
15676
15762
  function OrderInvoiceLink({ invoice, labels, className }) {
15677
15763
  if (!invoice) return null;
15678
15764
  const t = { ...DEFAULT_LABELS8, ...labels };
15679
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: (0, import_utils22.cn)("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
15680
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
15765
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: (0, import_utils23.cn)("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
15766
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
15681
15767
  "a",
15682
15768
  {
15683
15769
  href: invoice.url,
@@ -15685,12 +15771,12 @@ function OrderInvoiceLink({ invoice, labels, className }) {
15685
15771
  children: t.linkLabel.replace("{number}", invoice.number)
15686
15772
  }
15687
15773
  ),
15688
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-muted-foreground", children: t.signInHint })
15774
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-muted-foreground", children: t.signInHint })
15689
15775
  ] });
15690
15776
  }
15691
15777
 
15692
15778
  // src/components/order-confirmation.tsx
15693
- var import_jsx_runtime27 = require("react/jsx-runtime");
15779
+ var import_jsx_runtime28 = require("react/jsx-runtime");
15694
15780
  var DEFAULT_LABELS9 = {
15695
15781
  pollingTitle: "Confirmando tu pedido\u2026",
15696
15782
  pollingDescription: "Estamos procesando el pago, un momento\u2026",
@@ -15756,43 +15842,43 @@ function OrderConfirmation({
15756
15842
  const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
15757
15843
  const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
15758
15844
  const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
15759
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: (0, import_utils23.cn)("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
15760
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h1", { className: "text-3xl font-bold", children: title }),
15761
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-lg text-muted-foreground", children: description }),
15762
- showFullOrderSummary && order && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "space-y-6", children: [
15763
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15764
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
15765
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
15845
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: (0, import_utils24.cn)("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
15846
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("h1", { className: "text-3xl font-bold", children: title }),
15847
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-lg text-muted-foreground", children: description }),
15848
+ showFullOrderSummary && order && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-6", children: [
15849
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15850
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
15851
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
15766
15852
  ] }),
15767
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
15768
- order.items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
15853
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
15854
+ order.items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
15769
15855
  "div",
15770
15856
  {
15771
15857
  className: "flex justify-between gap-4 text-sm",
15772
15858
  children: [
15773
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
15859
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
15774
15860
  item.product.name,
15775
15861
  item.variant ? ` (${item.variant.name})` : "",
15776
15862
  " x",
15777
15863
  item.quantity
15778
15864
  ] }),
15779
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: formatPrice(item.total, currencyCode, locale) })
15865
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: formatPrice(item.total, currencyCode, locale) })
15780
15866
  ]
15781
15867
  },
15782
15868
  idx
15783
15869
  )),
15784
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
15785
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: t.totalLabel }),
15786
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: formatPrice(order.total, currencyCode, locale) })
15870
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
15871
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: t.totalLabel }),
15872
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: formatPrice(order.total, currencyCode, locale) })
15787
15873
  ] }) })
15788
15874
  ] }),
15789
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
15875
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
15790
15876
  t.confirmationEmailPrefix,
15791
15877
  " ",
15792
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "font-medium text-foreground", children: order.customerEmail }),
15878
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "font-medium text-foreground", children: order.customerEmail }),
15793
15879
  "."
15794
15880
  ] }),
15795
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
15881
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
15796
15882
  OrderInvoiceLink,
15797
15883
  {
15798
15884
  invoice: order.invoice,
@@ -15800,11 +15886,11 @@ function OrderConfirmation({
15800
15886
  }
15801
15887
  )
15802
15888
  ] }),
15803
- showOrderReference && order && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15804
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
15805
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
15889
+ showOrderReference && order && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15890
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
15891
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
15806
15892
  ] }),
15807
- status === "failed" && cartHref && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
15893
+ status === "failed" && cartHref && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
15808
15894
  "a",
15809
15895
  {
15810
15896
  href: cartHref,
@@ -15812,7 +15898,7 @@ function OrderConfirmation({
15812
15898
  children: t.backToCartLabel
15813
15899
  }
15814
15900
  ),
15815
- showRecheck && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
15901
+ showRecheck && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
15816
15902
  "button",
15817
15903
  {
15818
15904
  type: "button",
@@ -15821,16 +15907,16 @@ function OrderConfirmation({
15821
15907
  children: t.recheckLabel
15822
15908
  }
15823
15909
  ),
15824
- showSessionReference && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15825
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
15826
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
15910
+ showSessionReference && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15911
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
15912
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
15827
15913
  ] })
15828
15914
  ] });
15829
15915
  }
15830
15916
 
15831
15917
  // src/components/full-invoice-fields.tsx
15832
- var import_utils24 = require("@reblu/site-ui/utils");
15833
- var import_jsx_runtime28 = require("react/jsx-runtime");
15918
+ var import_utils25 = require("@reblu/site-ui/utils");
15919
+ var import_jsx_runtime29 = require("react/jsx-runtime");
15834
15920
  var EMPTY_FULL_INVOICE_VALUE = {
15835
15921
  wantsFullInvoice: false,
15836
15922
  billingIdType: "NIF",
@@ -15947,12 +16033,12 @@ function FullInvoiceFields({
15947
16033
  const showFields = value.wantsFullInvoice || overCap;
15948
16034
  const isSpanishNif = value.billingIdType === "NIF";
15949
16035
  const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
15950
- const error = (key2) => errors[key2] ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
16036
+ const error = (key2) => errors[key2] ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
15951
16037
  const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
15952
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("section", { className: (0, import_utils24.cn)("space-y-4", className), "data-slot": "full-invoice-fields", children: [
15953
- overCap ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-1", children: [
15954
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
15955
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
16038
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("section", { className: (0, import_utils25.cn)("space-y-4", className), "data-slot": "full-invoice-fields", children: [
16039
+ overCap ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "space-y-1", children: [
16040
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
16041
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
15956
16042
  "input",
15957
16043
  {
15958
16044
  type: "checkbox",
@@ -15962,12 +16048,12 @@ function FullInvoiceFields({
15962
16048
  ),
15963
16049
  t.toggle
15964
16050
  ] }),
15965
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
16051
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
15966
16052
  ] }),
15967
- showFields && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
15968
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-1", children: [
15969
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
15970
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
16053
+ showFields && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
16054
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "space-y-1", children: [
16055
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
16056
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
15971
16057
  "select",
15972
16058
  {
15973
16059
  id: "full-invoice-id-type",
@@ -15976,14 +16062,14 @@ function FullInvoiceFields({
15976
16062
  value: value.billingIdType,
15977
16063
  onChange: (e) => set("billingIdType", e.target.value),
15978
16064
  ...invalid2("billingIdType"),
15979
- children: ID_TYPES.map((type) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("option", { value: type, children: t.idTypeOptions[type] }, type))
16065
+ children: ID_TYPES.map((type) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("option", { value: type, children: t.idTypeOptions[type] }, type))
15980
16066
  }
15981
16067
  ),
15982
16068
  error("billingIdType")
15983
16069
  ] }),
15984
- !isSpanishNif && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-1", children: [
15985
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
15986
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
16070
+ !isSpanishNif && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "space-y-1", children: [
16071
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
16072
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
15987
16073
  "select",
15988
16074
  {
15989
16075
  id: "full-invoice-id-country",
@@ -15993,16 +16079,16 @@ function FullInvoiceFields({
15993
16079
  onChange: (e) => set("billingIdCountry", e.target.value),
15994
16080
  ...invalid2("billingIdCountry"),
15995
16081
  children: [
15996
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("option", { value: "", disabled: true, children: t.chooseCountry }),
15997
- countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("option", { value: c.code, children: c.name }, c.code))
16082
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("option", { value: "", disabled: true, children: t.chooseCountry }),
16083
+ countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("option", { value: c.code, children: c.name }, c.code))
15998
16084
  ]
15999
16085
  }
16000
16086
  ),
16001
16087
  error("billingIdCountry")
16002
16088
  ] }),
16003
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-1", children: [
16004
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
16005
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
16089
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "space-y-1", children: [
16090
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
16091
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
16006
16092
  "input",
16007
16093
  {
16008
16094
  id: "full-invoice-nif",
@@ -16015,9 +16101,9 @@ function FullInvoiceFields({
16015
16101
  ),
16016
16102
  error("billingNif")
16017
16103
  ] }),
16018
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-1", children: [
16019
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
16020
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
16104
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "space-y-1", children: [
16105
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
16106
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
16021
16107
  "input",
16022
16108
  {
16023
16109
  id: "full-invoice-name",
@@ -16030,9 +16116,9 @@ function FullInvoiceFields({
16030
16116
  ),
16031
16117
  error("billingName")
16032
16118
  ] }),
16033
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-1 sm:col-span-2", children: [
16034
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
16035
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
16119
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "space-y-1 sm:col-span-2", children: [
16120
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
16121
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
16036
16122
  "input",
16037
16123
  {
16038
16124
  id: "full-invoice-street",
@@ -16044,9 +16130,9 @@ function FullInvoiceFields({
16044
16130
  }
16045
16131
  )
16046
16132
  ] }),
16047
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-1", children: [
16048
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
16049
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
16133
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "space-y-1", children: [
16134
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
16135
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
16050
16136
  "input",
16051
16137
  {
16052
16138
  id: "full-invoice-postal-code",
@@ -16057,9 +16143,9 @@ function FullInvoiceFields({
16057
16143
  }
16058
16144
  )
16059
16145
  ] }),
16060
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-1", children: [
16061
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
16062
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
16146
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "space-y-1", children: [
16147
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
16148
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
16063
16149
  "input",
16064
16150
  {
16065
16151
  id: "full-invoice-city",
@@ -16070,9 +16156,9 @@ function FullInvoiceFields({
16070
16156
  }
16071
16157
  )
16072
16158
  ] }),
16073
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-1", children: [
16074
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
16075
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
16159
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "space-y-1", children: [
16160
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
16161
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
16076
16162
  "select",
16077
16163
  {
16078
16164
  id: "full-invoice-country",
@@ -16080,18 +16166,18 @@ function FullInvoiceFields({
16080
16166
  required: true,
16081
16167
  value: value.country,
16082
16168
  onChange: (e) => set("country", e.target.value),
16083
- children: countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("option", { value: c.code, children: c.name }, c.code))
16169
+ children: countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("option", { value: c.code, children: c.name }, c.code))
16084
16170
  }
16085
16171
  )
16086
16172
  ] }),
16087
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "sm:col-span-2", children: error("address") })
16173
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "sm:col-span-2", children: error("address") })
16088
16174
  ] })
16089
16175
  ] });
16090
16176
  }
16091
16177
 
16092
16178
  // src/components/contact-interest-field.tsx
16093
- var import_utils25 = require("@reblu/site-ui/utils");
16094
- var import_jsx_runtime29 = require("react/jsx-runtime");
16179
+ var import_utils26 = require("@reblu/site-ui/utils");
16180
+ var import_jsx_runtime30 = require("react/jsx-runtime");
16095
16181
  function ContactInterestField({
16096
16182
  interest,
16097
16183
  value,
@@ -16108,18 +16194,18 @@ function ContactInterestField({
16108
16194
  else next2.delete(option2);
16109
16195
  onChange(interest.options.filter((candidate) => next2.has(candidate)));
16110
16196
  };
16111
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("fieldset", { "data-slot": "contact-interest", className: (0, import_utils25.cn)("space-y-2", className), children: [
16112
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("legend", { className: "text-sm font-medium", children: interest.label }),
16113
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex flex-col gap-2", children: interest.options.map((option2, index) => {
16197
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("fieldset", { "data-slot": "contact-interest", className: (0, import_utils26.cn)("space-y-2", className), children: [
16198
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("legend", { className: "text-sm font-medium", children: interest.label }),
16199
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex flex-col gap-2", children: interest.options.map((option2, index) => {
16114
16200
  const id = `${idPrefix}-${index}`;
16115
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
16201
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
16116
16202
  "label",
16117
16203
  {
16118
16204
  htmlFor: id,
16119
16205
  "data-slot": "contact-interest-option",
16120
16206
  className: "flex items-center gap-2 text-sm",
16121
16207
  children: [
16122
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
16208
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16123
16209
  "input",
16124
16210
  {
16125
16211
  id,
@@ -16144,6 +16230,7 @@ var import_site_contracts = require("@reblu/site-contracts");
16144
16230
  0 && (module.exports = {
16145
16231
  ALLOWED_YOUTUBE_HOSTS,
16146
16232
  AddedToCartToast,
16233
+ ArbitrationBadge,
16147
16234
  CartAdjustmentsNotice,
16148
16235
  CartLineList,
16149
16236
  CartSummary,