efficient-storefront-blocks 0.89.0 → 0.91.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.
Files changed (142) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/chunks/{EditorPreviewCheckout-R7XG75DW.js → EditorPreviewCheckout-NFLTZCIQ.js} +1 -1
  3. package/dist/chunks/{SiteEditorProvider-YNUCDQ2D.js → SiteEditorProvider-UWRLDKJS.js} +1 -1
  4. package/dist/chunks/chunk-4VRLGKYU.js +387 -0
  5. package/dist/chunks/chunk-HRTZ7SYX.js +1 -0
  6. package/dist/chunks/chunk-PHQQRGQZ.js +1 -0
  7. package/dist/chunks/{chunk-E54FFOUS.js → chunk-YL2HPWVT.js} +1 -1
  8. package/dist/chunks/{fitment-data-URBK335I.js → fitment-data-6KHIA3AT.js} +1 -1
  9. package/dist/contract.js +3 -11
  10. package/dist/editor/components/GalleryPicturesSource.d.ts +33 -0
  11. package/dist/editor/components/GalleryPicturesSource.js +1 -0
  12. package/dist/editor/components/GalleryShowcaseSource.js +1 -1
  13. package/dist/editor/components/ProductSourceRows.d.ts +35 -0
  14. package/dist/editor/components/ProductSourceRows.js +1 -0
  15. package/dist/editor/components/ReviewsProductSource.js +1 -1
  16. package/dist/editor/lib/document/block-align-row.js +1 -1
  17. package/dist/editor/lib/document/blocks/commerce/GalleryB/fields.js +1 -1
  18. package/dist/editor/lib/document/blocks/commerce/GalleryItem/fields.js +1 -1
  19. package/dist/editor/lib/document/blocks/service/FooterDivider/fields.js +1 -1
  20. package/dist/editor/lib/document/blocks/service/index.d.ts +1 -1
  21. package/dist/editor/lib/document/config.d.ts +1 -0
  22. package/dist/editor/lib/document/config.js +1 -1
  23. package/dist/editor/lib/efficient-block-sources.js +1 -1
  24. package/dist/editor/lib/storefront-editor-words-kept.js +1 -0
  25. package/dist/editor/lib/storefront-editor-words.d.ts +7 -0
  26. package/dist/editor/lib/storefront-editor-words.js +1 -1
  27. package/dist/editor.css +1 -1
  28. package/dist/index.js +62 -43
  29. package/dist/links.js +1 -1
  30. package/dist/render/app/globals.css +10 -1
  31. package/dist/render/built-with.json +1 -1
  32. package/dist/render/components/AppointmentBooking.js +1 -1
  33. package/dist/render/components/ArticleBody.js +1 -1
  34. package/dist/render/components/BoxHeaderBar.js +1 -1
  35. package/dist/render/components/CollectionCard.d.ts +1 -1
  36. package/dist/render/components/CollectionCard.js +1 -1
  37. package/dist/render/components/ContactRouting.js +1 -1
  38. package/dist/render/components/EuTyreLabels.d.ts +2 -1
  39. package/dist/render/components/EuTyreLabels.js +1 -1
  40. package/dist/render/components/Events.js +1 -1
  41. package/dist/render/components/FooterDivider.d.ts +1 -2
  42. package/dist/render/components/FooterDivider.js +1 -1
  43. package/dist/render/components/FooterEmailSignup.js +1 -1
  44. package/dist/render/components/FooterGroup.js +1 -1
  45. package/dist/render/components/FooterLogo.js +1 -1
  46. package/dist/render/components/FooterMenu.d.ts +3 -1
  47. package/dist/render/components/FooterMenu.js +1 -1
  48. package/dist/render/components/FooterMessaging.js +1 -1
  49. package/dist/render/components/FooterPayment.js +1 -1
  50. package/dist/render/components/FooterSection.js +1 -1
  51. package/dist/render/components/FooterSocial.js +1 -1
  52. package/dist/render/components/FooterText.js +1 -1
  53. package/dist/render/components/GalleryCard.js +1 -1
  54. package/dist/render/components/GalleryGrid.d.ts +3 -1
  55. package/dist/render/components/GalleryGrid.js +3 -1
  56. package/dist/render/components/GalleryItem.d.ts +1 -0
  57. package/dist/render/components/GalleryItem.js +1 -1
  58. package/dist/render/components/GalleryShowcase.js +1 -1
  59. package/dist/render/components/GridCardTemplate.js +1 -1
  60. package/dist/render/components/HeaderNavItem.d.ts +1 -1
  61. package/dist/render/components/HeaderNavItem.js +1 -1
  62. package/dist/render/components/HeaderToolBlocks.js +1 -1
  63. package/dist/render/components/HeaderTools.d.ts +5 -3
  64. package/dist/render/components/HeaderTools.js +1 -1
  65. package/dist/render/components/LegalLine.js +1 -1
  66. package/dist/render/components/MenuLinkBlock.js +1 -1
  67. package/dist/render/components/MenuPlaceholderLabel.js +1 -1
  68. package/dist/render/components/ProductGallery.d.ts +2 -1
  69. package/dist/render/components/ProductGallery.js +1 -1
  70. package/dist/render/components/ProductRef.js +1 -1
  71. package/dist/render/components/PublishedFooter.js +1 -1
  72. package/dist/render/components/QuoteLink.d.ts +2 -1
  73. package/dist/render/components/QuoteLink.js +1 -1
  74. package/dist/render/components/RatingStars.js +1 -1
  75. package/dist/render/components/ReviewForm.js +1 -1
  76. package/dist/render/components/SectionBand.js +1 -1
  77. package/dist/render/components/SectionFootnote.d.ts +2 -1
  78. package/dist/render/components/SectionFootnote.js +1 -1
  79. package/dist/render/components/SectionGroupBody.js +1 -1
  80. package/dist/render/components/SectionNotice.js +1 -1
  81. package/dist/render/components/TyreFitVerdicts.js +1 -1
  82. package/dist/render/components/booking/BookingBox.js +1 -1
  83. package/dist/render/components/booking/BookingRegions.js +1 -1
  84. package/dist/render/components/card-pieces/CardBuyButton.d.ts +3 -1
  85. package/dist/render/components/card-pieces/CardBuyButton.js +1 -1
  86. package/dist/render/components/card-pieces/CardEyebrow.js +1 -1
  87. package/dist/render/components/card-pieces/CardName.js +1 -1
  88. package/dist/render/components/card-pieces/CardPrice.js +1 -1
  89. package/dist/render/components/card-pieces/CardProductPicture.js +1 -1
  90. package/dist/render/components/card-pieces/CardSpecs.js +1 -1
  91. package/dist/render/components/card-pieces/HostPart.js +1 -1
  92. package/dist/render/components/card-pieces/card-row.js +1 -1
  93. package/dist/render/components/catalog/ShopperChips.js +1 -1
  94. package/dist/render/components/catalog/ShopperFilters.js +1 -1
  95. package/dist/render/components/fitment/FitmentPickerGrid.js +1 -1
  96. package/dist/render/components/fitment/StockFitmentCard.js +1 -1
  97. package/dist/render/components/fitment/StockFitmentPart.js +1 -1
  98. package/dist/render/components/pdp-dynamic/DynamicEuTyreLabel.d.ts +4 -0
  99. package/dist/render/components/pdp-dynamic/DynamicEuTyreLabel.js +1 -1
  100. package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.js +1 -1
  101. package/dist/render/components/pdp-dynamic/DynamicProductGallery.js +1 -1
  102. package/dist/render/components/pdp-dynamic/RecordPhotoGallery.d.ts +2 -1
  103. package/dist/render/components/pdp-dynamic/RecordPhotoGallery.js +1 -1
  104. package/dist/render/components/submit/SubmitBox.js +1 -1
  105. package/dist/render/lib/content/menu-card-seed.d.ts +4 -0
  106. package/dist/render/lib/content/menu-card-seed.js +1 -1
  107. package/dist/render/lib/content/menu-entry-type.d.ts +2 -0
  108. package/dist/render/lib/content/menu-entry-type.js +1 -0
  109. package/dist/render/lib/content/served-lists.d.ts +8 -0
  110. package/dist/render/lib/content/served-lists.js +1 -0
  111. package/dist/render/lib/document/blocks/commerce/GalleryB/render.js +1 -1
  112. package/dist/render/lib/document/blocks/commerce/ProductHero/render.js +1 -1
  113. package/dist/render/lib/document/blocks/commerce/ProductPrice/render.js +1 -1
  114. package/dist/render/lib/document/blocks/service/Events/render.js +1 -1
  115. package/dist/render/lib/document/blocks/service/FooterDivider/meta.js +1 -1
  116. package/dist/render/lib/document/blocks/service/FooterDivider/render.js +1 -1
  117. package/dist/render/lib/document/blocks/service/RatingBlock/render.js +1 -1
  118. package/dist/render/lib/document/card-templates.d.ts +2 -0
  119. package/dist/render/lib/document/card-templates.js +1 -1
  120. package/dist/render/lib/document/footer-page-blocks.js +1 -1
  121. package/dist/render/lib/document/lazy-draws.js +1 -1
  122. package/dist/render/lib/document/render-config.d.ts +1 -0
  123. package/dist/render/lib/document/render-config.js +1 -1
  124. package/dist/render/lib/document/section-to-box-rows-productgrid.d.ts +1 -0
  125. package/dist/render/lib/document/section-to-box-rows-productgrid.js +1 -0
  126. package/dist/render/lib/sections/product-pictures.d.ts +26 -0
  127. package/dist/render/lib/sections/product-pictures.js +1 -0
  128. package/dist/render/lib/sections/product-source.d.ts +8 -0
  129. package/dist/render/lib/sections/product-source.js +1 -0
  130. package/dist/render/lib/sections/reviews.js +1 -1
  131. package/dist/words.d.ts +18 -0
  132. package/dist/words.js +5 -5
  133. package/package.json +4 -3
  134. package/dist/chunks/chunk-BYBBZS7L.js +0 -1
  135. package/dist/chunks/chunk-G4Y7XXRV.js +0 -1
  136. package/dist/chunks/chunk-WRDUOJZO.js +0 -382
  137. package/dist/editor/lib/editor-words-kept.js +0 -1
  138. package/dist/render/lib/content/legacy-block-align.d.ts +0 -2
  139. package/dist/render/lib/content/legacy-block-align.js +0 -1
  140. /package/dist/chunks/{chunk-WRDUOJZO.js.LEGAL.txt → chunk-4VRLGKYU.js.LEGAL.txt} +0 -0
  141. /package/dist/chunks/{chunk-ZA3ULZOA.js → chunk-XMTQMRA3.js} +0 -0
  142. /package/dist/editor/lib/{editor-words-kept.d.ts → storefront-editor-words-kept.d.ts} +0 -0
@@ -1,10 +1,12 @@
1
1
  import type { SlotComponent } from "efficient-easel/blocks";
2
+ import type { ProductPictureTile } from "../lib/sections/product-pictures.js";
2
3
  export interface GalleryGridProps {
3
4
  omitHead?: boolean;
4
5
  padTop?: number;
5
6
  padBottom?: number;
6
7
  editing?: boolean;
7
8
  items?: SlotComponent;
9
+ sourced?: readonly ProductPictureTile[];
8
10
  num?: string;
9
11
  title?: string;
10
12
  linkText?: string;
@@ -21,4 +23,4 @@ export interface GalleryGridProps {
21
23
  gap?: number | string;
22
24
  gapPhone?: unknown;
23
25
  }
24
- export default function GalleryGrid({ items: Items, num, title, linkText, linkHref, galleryHref, submitHref, previewHover, display, displayPhone, styleOwner, layout, columns, columnsMobile, gap: gapProp, gapPhone, omitHead, padTop, padBottom, editing, }: GalleryGridProps): import("react").JSX.Element;
26
+ export default function GalleryGrid({ items: Items, sourced, num, title, linkText, linkHref, galleryHref, submitHref, previewHover, display, displayPhone, styleOwner, layout, columns, columnsMobile, gap: gapProp, gapPhone, omitHead, padTop, padBottom, editing, }: GalleryGridProps): import("react").JSX.Element;
@@ -1 +1,3 @@
1
- "use client";import{jsx as t,jsxs as Y}from"react/jsx-runtime";import{useCallback as q,useMemo as g,useState as H}from"react";import{usePathname as J}from"next/navigation";import{containerGapProps as Q}from"efficient-web-builder/format/lib/content/container-gap";import Z from"efficient-web-builder/render/components/Btn";import{GALLERY_GRID_ATTR as ee,GalleryLinksContext as se,GalleryTilesContext as re}from"./GalleryItem.js";import{useShopperGallery as te}from"./catalog/ShopperScope.js";import{galleryShownIds as le,galleryToolbarIdle as oe,WALL_PLACED_CELL as ne,WALL_PLACED_CSS as ae,wallSpanAt as ie}from"../lib/sections/gallery-toolbar.js";import{useSiteSells as de}from"./SiteRecordContext.js";import{SharedPartKinds as ce}from"efficient-web-builder/render/components/PublishedPartStylesContext";import{renderHeadline as me}from"efficient-web-builder/render/components/goldPhrases";import pe from"efficient-web-builder/render/components/SectionHeader";import{headIsEmpty as fe,ownPadding as ge}from"../lib/sections/own-padding.js";import{resolveGridColumns as ue,resolveGridMobileColumns as ye}from"efficient-web-builder/format/lib/content/grid-span";import{galleryLayoutClass as xe,galleryLayoutCss as he,resolveGalleryLayout as we}from"efficient-web-builder/format/lib/content/gallery-layout";const ve="relative z-[2] bg-bg py-[120px] max-view-wide:py-[70px]",Le="relative z-[2] bg-bg pt-0 pb-[120px] max-view-wide:pt-0 max-view-wide:pb-[70px]",Se="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";function Ne({items:p,num:u,title:f,linkText:y,linkHref:G,galleryHref:i="/gallery",submitHref:C="/contact",previewHover:P,display:E,displayPhone:A,styleOwner:I,layout:x,columns:d,columnsMobile:M,gap:R,gapPhone:k,omitHead:h=!1,padTop:O,padBottom:T,editing:j=!1}){const z=J(),$=de(),B=i!==z&&($||i!=="/gallery"),w=we(x),o=w?x:null,D=!w&&d!=null&&d!=="",n=Q("GalleryB",R,"both",k),W=o?{className:`sf-card-grid sf-gallery-zone ${xe(o)} grid${n.className}`,style:n.style}:D?{className:`sf-card-grid sf-grid-zone grid${n.className}`,style:{...n.style,"--sf-grid-cols":String(ue(d)),"--sf-grid-cols-phone":String(ye(M,d))}}:{className:`sf-card-grid grid grid-cols-4${n.className} max-[1500px]:grid-cols-3 max-view-wide:grid-cols-1`,style:n.style},v=y?{text:y,href:G||"#"}:void 0,F=f?me(f,!1):void 0,[L,K]=H({}),S=q((s,r)=>{K(e=>{const m=e[s.id];if(r){if(!m)return e;const{[s.id]:_e,...X}=e;return X}return m&&m.tag===s.tag&&m.name===s.name?e:{...e,[s.id]:s}})},[]),N=p?.blockIds,c=g(()=>(N??[]).map(s=>L[s]).filter(s=>!!s),[N,L]),{ref:U,toolbar:a}=te(c),_=a!==null&&!oe(a,c),l=g(()=>_&&a?le(c,a):null,[_,a,c]),V=g(()=>{const s=new Map((l??[]).map((r,e)=>[r,e]));return{report:S,positionOf:r=>{const e=l?s.get(r):void 0;return e===void 0?null:{index:e+1,total:l.length}}}},[S,l]),b=l?s=>{const r=l.indexOf(s);if(r<0)return{style:{display:"none"}};if(!o)return{style:{order:r}};const e=ie(o,r,l.length);return{className:ne,style:{order:r,"--sf-wall-c":e.col,"--sf-wall-r":e.row,"--sf-wall-cp":e.colPhone,"--sf-wall-rp":e.rowPhone}}}:void 0;return t("section",{ref:U,className:h?Le:ve,style:ge(O,T),children:Y("div",{className:Se,children:[h||!j&&fe(u,f,v?.text)?null:t(pe,{num:u,title:F,link:v}),o&&t("style",{dangerouslySetInnerHTML:{__html:he(o)+(l?ae:"")}}),p&&t(se.Provider,{value:{galleryHref:i,submitHref:C,previewHover:P,display:E,displayPhone:A,styleOwner:I},children:t(re.Provider,{value:V,children:t(ce,{children:t("div",{[ee]:"",style:{display:"contents"},children:t(p,{...W,minEmptyHeight:320,...b?{cell:b}:{}})})})})}),B&&t("div",{className:"mt-12 flex flex-col items-center gap-3",children:t(Z,{href:i,variant:"ghost",children:"See Gallery"})})]})})}export{Ne as default};
1
+ "use client";import{jsx as r,jsxs as q}from"react/jsx-runtime";import{useCallback as J,useMemo as u,useState as Q}from"react";import{usePathname as Z}from"next/navigation";import{containerGapProps as ee}from"efficient-web-builder/format/lib/content/container-gap";import se from"efficient-web-builder/render/components/Btn";import re,{GALLERY_GRID_ATTR as te,GalleryLinksContext as le,GalleryTilesContext as ne}from"./GalleryItem.js";import{useShopperGallery as oe}from"./catalog/ShopperScope.js";import{galleryShownIds as ae,galleryToolbarIdle as ie,WALL_PLACED_CELL as de,WALL_PLACED_CSS as ce,wallSpanAt as me}from"../lib/sections/gallery-toolbar.js";import{useSiteSells as pe}from"./SiteRecordContext.js";import{SharedPartKinds as fe}from"efficient-web-builder/render/components/PublishedPartStylesContext";import{renderHeadline as ge}from"efficient-web-builder/render/components/goldPhrases";import ue from"efficient-web-builder/render/components/SectionHeader";import{headIsEmpty as ye,ownPadding as xe}from"../lib/sections/own-padding.js";import{resolveGridColumns as he,resolveGridMobileColumns as we}from"efficient-web-builder/format/lib/content/grid-span";import{galleryLayoutClass as ve,galleryLayoutCss as Le,resolveGalleryLayout as Ne}from"efficient-web-builder/format/lib/content/gallery-layout";import{HideTaker as Se}from"efficient-web-builder/render/components/ViewHideRoot";const be="relative z-[2] bg-bg py-[120px] max-view-wide:py-[70px]",_e="relative z-[2] bg-bg pt-0 pb-[120px] max-view-wide:pt-0 max-view-wide:pb-[70px]",Ge="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";function Ce({items:i,sourced:d,num:h,title:y,linkText:w,linkHref:E,galleryHref:m="/gallery",submitHref:I="/contact",previewHover:k,display:R,displayPhone:M,styleOwner:T,layout:v,columns:p,columnsMobile:j,gap:O,gapPhone:z,omitHead:L=!1,padTop:$,padBottom:B,editing:N=!1}){const D=Z(),W=pe(),F=m!==D&&(W||m!=="/gallery"),S=Ne(v),o=S?v:null,K=!S&&p!=null&&p!=="",a=ee("GalleryB",O,"both",z),b=o?{className:`sf-card-grid sf-gallery-zone ${ve(o)} grid${a.className}`,style:a.style}:K?{className:`sf-card-grid sf-grid-zone grid${a.className}`,style:{...a.style,"--sf-grid-cols":String(he(p)),"--sf-grid-cols-phone":String(we(j,p))}}:{className:`sf-card-grid grid grid-cols-4${a.className} max-[1500px]:grid-cols-3 max-view-wide:grid-cols-1`,style:a.style},_=w?{text:w,href:E||"#"}:void 0,H=y?ge(y,!1):void 0,[G,U]=Q({}),C=J((e,t)=>{U(s=>{const n=s[e.id];if(t){if(!n)return s;const{[e.id]:Pe,...Y}=s;return Y}return n&&n.tag===e.tag&&n.name===e.name?s:{...s,[e.id]:e}})},[]),f=d?.map(e=>e.tile.id).join(`
2
+ `),P=u(()=>f!==void 0?f?f.split(`
3
+ `):[]:i?.blockIds,[f,i?.blockIds]),g=u(()=>(P??[]).map(e=>G[e]).filter(e=>!!e),[P,G]),{ref:V,toolbar:c}=oe(g),A=c!==null&&!ie(c,g),l=u(()=>A&&c?ae(g,c):null,[A,c,g]),X=u(()=>{const e=new Map((l??[]).map((t,s)=>[t,s]));return{report:C,positionOf:t=>{const s=l?e.get(t):void 0;return s===void 0?null:{index:s+1,total:l.length}}}},[C,l]),x=l?e=>{const t=l.indexOf(e);if(t<0)return{style:{display:"none"}};if(!o)return{style:{order:t}};const s=me(o,t,l.length);return{className:de,style:{order:t,"--sf-wall-c":s.col,"--sf-wall-r":s.row,"--sf-wall-cp":s.colPhone,"--sf-wall-rp":s.rowPhone}}}:void 0;return r(Se,{as:"section",ref:V,className:L?_e:be,style:xe($,B),children:q("div",{className:Ge,children:[L||!N&&ye(h,y,_?.text)?null:r(ue,{num:h,title:H,link:_}),o&&r("style",{dangerouslySetInnerHTML:{__html:Le(o)+(l?ce:"")}}),(i||d)&&r(le.Provider,{value:{galleryHref:m,submitHref:I,previewHover:k,display:R,displayPhone:M,styleOwner:T,wordsAtRest:!!d},children:r(ne.Provider,{value:X,children:r(fe,{children:r("div",{[te]:"",style:{display:"contents"},children:d?r("div",{...b,children:d.map(({tile:e,...t})=>{const s=r(re,{...t,tile:e,editing:N},e.id),n=x?.(e.id);return n?r("div",{className:n.className,style:n.style,children:s},e.id):s})}):i?r(i,{...b,minEmptyHeight:320,...x?{cell:x}:{}}):null})})})}),F&&r("div",{className:"mt-12 flex flex-col items-center gap-3",children:r(se,{href:m,variant:"ghost",children:"See Gallery"})})]})})}export{Ce as default};
@@ -8,6 +8,7 @@ export declare const GalleryLinksContext: import("react").Context<{
8
8
  displayPhone?: unknown;
9
9
  styleOwner?: string;
10
10
  photosOnly?: boolean;
11
+ wordsAtRest?: boolean;
11
12
  }>;
12
13
  export declare const GALLERY_TILE_PARTS: readonly [{
13
14
  readonly id: "tag";
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as n,Fragment as m}from"react/jsx-runtime";import{createContext as R,useCallback as U,useContext as M,useEffect as X,useRef as Z,useState as C}from"react";import _ from"next/link";import{slugify as J}from"efficient-shell/format";import K from"./GalleryCard.js";import Q,{LightboxClose as ee,LIGHTBOX_CLOSE_TINT as te}from"./Lightbox.js";import{useSiteSells as re}from"./SiteRecordContext.js";import{renderGold as p,renderHeadline as Y}from"efficient-web-builder/render/components/goldPhrases";import{sizedImage as oe}from"efficient-web-builder/format/lib/sized-image";import{useIsoLayoutEffect as ne}from"./catalog/ShopperScope.js";const le="(max-width: 1100px) 100vw, min(59vw, 1050px)",se=R({}),Ce=[{id:"tag",label:"Tag"},{id:"eyebrow",label:"Eyebrow"},{id:"title",label:"Title"},{id:"meta",label:"Meta"},{id:"number",label:"Card number"}],ae=R(null),ie="data-gallery-grid",P="data-gallery-tile";function ce(t,o){const[l,a]=C(null);return X(()=>{const i=t.current,s=i?.closest(`[${ie}]`);if(!i||!s)return;const b=()=>{const y=Array.from(s.querySelectorAll(`[${P}]`)),w=y.indexOf(i),f=w>=0?{index:w+1,total:y.length}:null;a(x=>x?.index===f?.index&&x?.total===f?.total?x:f)};if(b(),!o)return;const v=new MutationObserver(b);return v.observe(s,{childList:!0,subtree:!0}),()=>v.disconnect()},[t,o]),l}const _e={process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},de=()=>({image:"",href:"#",process:"",eyebrow:"",name:"",meta:""}),Pe=Array.from({length:6},de);function pe(t){const o=(t.photos??[]).map(s=>s?.src).filter(s=>!!s),l=t.image||o[0]||"",a=[l,...o].filter(s=>!!s),i=J(t.name)||"gallery-item";return{car:t.eyebrow??"",wheel:t.name??"",process:t.process??"",finish:t.meta??"",imageLabel:`${i}.jpg`,detailLabel:`${i}-detail.jpg`,imageSrc:l||void 0,detailSrc:o[0]||l||void 0,photos:a,href:t.href}}function me({editing:t=!1,previewHover:o,ratio:l,captionPlace:a,tile:i,...s}){const{galleryHref:b="/gallery",submitHref:v="/contact",previewHover:y,display:w,displayPhone:f,styleOwner:x,photosOnly:D=!1}=M(se),e=pe(s),h=re()&&!D,T=!h&&!fe(e),d=e.photos??(e.imageSrc?[e.imageSrc]:[]),z=Z(null),E=U(c=>{z.current=c},[]),F=ce(z,t),O=M(ae),N=O?.report,u=i?.id,j=i?.tag??"",I=i?.name??"";ne(()=>{if(!N||!u)return;const c={id:u,tag:j,name:I};return N(c),()=>N(c,!0)},[N,u,j,I]);const $=(u?O?.positionOf(u):null)??F,V=t&&(!!o||!!y),[q,g]=C(!1),[k,L]=C(0),A=()=>L(c=>(c-1+d.length)%d.length),G=()=>L(c=>(c+1)%d.length),S=d[k]??e.imageSrc??"",H=r(K,{build:e,forceHover:V,index:$?.index,total:$?.total,ratio:l,captionPlace:a,display:w,displayPhone:f,styleOwner:x,editing:t});return n(m,{children:[t?r("div",{ref:E,[P]:"",className:"block w-full text-left",children:H}):r("button",{ref:E,[P]:"",type:"button","aria-label":h?`Open ${e.car||"build"} on ${e.wheel||"wheel"}`:W(e),onClick:()=>{L(0),g(!0)},className:"block w-full cursor-pointer text-left focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2",children:H}),r(Q,{open:q,onClose:()=>g(!1),label:h?`${e.car} on ${e.wheel}`:W(e),onPrev:d.length>1?A:void 0,onNext:d.length>1?G:void 0,className:"flex items-center justify-center p-6 max-[700px]:p-3",children:n("div",{onClick:c=>c.stopPropagation(),className:`relative grid w-[min(1800px,100%)] max-h-[calc(100vh-48px)] ${T?"grid-cols-1":"grid-cols-[1.4fr_1fr]"} overflow-hidden border border-line bg-bg max-view-desktop:grid-cols-1 max-view-desktop:overflow-auto`,style:{boxShadow:"0 60px 120px -20px color-mix(in srgb, var(--sf-shadow-color, #141416) 70%, transparent)"},children:[r(ee,{label:"Close popup",className:"absolute right-[24px] top-[24px] z-[5] flex h-[56px] w-[56px] items-center justify-center border border-line font-mono text-[length:var(--size-label,21px)] text-fg-dim transition-colors hover:border-accent hover:text-fg",style:{background:te},children:"✕"}),n("div",{className:"relative flex min-h-[690px] items-center justify-center overflow-hidden bg-surface-2 max-view-desktop:min-h-[450px]",children:[S&&r("img",{...oe(S,{fallbackWidth:1280}),sizes:le,alt:`${(h?e.car:e.wheel||e.car)||"Photo"} — ${k+1} of ${d.length}`,className:"block h-full max-h-[88vh] w-full object-cover"},S),d.length>1&&n(m,{children:[r("button",{type:"button","aria-label":"Previous photo",onClick:A,className:"absolute left-4 top-1/2 flex h-16 w-16 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 font-mono text-[length:var(--size-label,24px)] text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"◁"}),r("button",{type:"button","aria-label":"Next photo",onClick:G,className:"absolute right-4 top-1/2 flex h-16 w-16 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 font-mono text-[length:var(--size-label,24px)] text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"▷"}),n("span",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 border border-fg-dim/30 bg-overlay-scrim/50 px-4 py-1.5 font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.22em] text-fg-dim backdrop-blur-[4px]",children:[k+1," / ",d.length]})]})]}),h?n("div",{className:"flex flex-col gap-[30px] px-[60px] py-[72px] max-view-desktop:px-9 max-view-desktop:py-[54px]",children:[e.process&&r("span",{className:"font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.3em] text-accent",children:p(e.process)}),e.wheel&&r("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(42px,4.5vw,60px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.95] tracking-[-0.025em]",children:Y(e.wheel,!1)}),e.car&&n("div",{className:"font-heading3 text-[length:var(--size-headingSmall,27px)] leading-[1.4] text-fg",children:["on ",r("em",{className:"font-serif font-normal italic text-accent tracking-[-0.01em]",children:p(e.car,!0)})]}),n("dl",{className:"mt-3 grid grid-cols-[auto_1fr] gap-x-7 gap-y-[18px] border-y border-line py-[30px] font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.22em]",children:[e.wheel&&n(m,{children:[r("dt",{className:"text-fg-dim",children:"Wheel"}),r("dd",{className:"text-fg",children:p(e.wheel)})]}),e.process&&n(m,{children:[r("dt",{className:"text-fg-dim",children:"Process"}),r("dd",{className:"text-fg",children:p(e.process)})]}),e.finish&&n(m,{children:[r("dt",{className:"text-fg-dim",children:"Finish"}),r("dd",{className:"text-fg",children:p(e.finish)})]}),e.car&&n(m,{children:[r("dt",{className:"text-fg-dim",children:"Vehicle"}),r("dd",{className:"text-fg",children:p(e.car)})]})]}),n("div",{className:"mt-auto flex flex-col gap-3.5 pt-6",children:[n(_,{href:e.href||"/wheels",onClick:()=>g(!1),className:"group flex items-center justify-between gap-6 border border-btn bg-btn px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-btn-ink transition-colors hover:border-fg hover:bg-fg",children:[r("span",{children:"View product"}),r("span",{className:"transition-transform group-hover:translate-x-[6px]",children:"→"})]}),n(_,{href:b,onClick:()=>g(!1),className:"flex items-center justify-between gap-6 border border-line px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:[r("span",{children:"See more builds"}),r("span",{children:"→"})]}),n(_,{href:v,onClick:()=>g(!1),className:"flex items-center justify-between gap-6 border border-line px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:[r("span",{children:"Submit your build"}),r("span",{children:"→"})]})]})]}):!T&&r(xe,{build:e})]})})]})}function B(t){return[t.process,t.car,t.finish].filter((o,l,a)=>!!o&&o!==t.wheel&&a.indexOf(o)===l)}function fe(t){return!!t.wheel||B(t).length>0}function W(t){const o=t.wheel||t.car;return o?`Open photo of ${o}`:"Open photo"}function xe({build:t}){const o=t.wheel,l=B(t);return n("div",{className:"flex flex-col gap-[24px] px-[60px] py-[72px] max-view-desktop:px-9 max-view-desktop:py-[54px]",children:[o&&r("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(42px,4.5vw,60px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.95] tracking-[-0.025em]",children:Y(o,!1)}),l.map(a=>r("p",{className:"text-[length:var(--size-body,18px)] leading-[1.5] text-fg",children:p(a)},a))]})}export{ie as GALLERY_GRID_ATTR,_e as GALLERY_ITEM_HINTS,Pe as GALLERY_ITEM_SEEDS,P as GALLERY_TILE_ATTR,Ce as GALLERY_TILE_PARTS,se as GalleryLinksContext,ae as GalleryTilesContext,me as default};
1
+ "use client";import{jsx as r,jsxs as n,Fragment as m}from"react/jsx-runtime";import{createContext as G,useCallback as Z,useContext as M,useEffect as J,useRef as K,useState as C}from"react";import _ from"next/link";import{slugify as Q}from"efficient-shell/format";import ee from"./GalleryCard.js";import te,{LightboxClose as re,LIGHTBOX_CLOSE_TINT as oe}from"./Lightbox.js";import{useSiteSells as ne}from"./SiteRecordContext.js";import{renderGold as p,renderHeadline as Y}from"efficient-web-builder/render/components/goldPhrases";import{sizedImage as le}from"efficient-web-builder/format/lib/sized-image";import{useIsoLayoutEffect as ae}from"./catalog/ShopperScope.js";import{HideTaker as B}from"efficient-web-builder/render/components/ViewHideRoot";const se="(max-width: 1100px) 100vw, min(59vw, 1050px)",ie=G({}),Oe=[{id:"tag",label:"Tag"},{id:"eyebrow",label:"Eyebrow"},{id:"title",label:"Title"},{id:"meta",label:"Meta"},{id:"number",label:"Card number"}],ce=G(null),de="data-gallery-grid",T="data-gallery-tile";function pe(t,o){const[l,s]=C(null);return J(()=>{const i=t.current,a=i?.closest(`[${de}]`);if(!i||!a)return;const b=()=>{const y=Array.from(a.querySelectorAll(`[${T}]`)),w=y.indexOf(i),f=w>=0?{index:w+1,total:y.length}:null;s(h=>h?.index===f?.index&&h?.total===f?.total?h:f)};if(b(),!o)return;const v=new MutationObserver(b);return v.observe(a,{childList:!0,subtree:!0}),()=>v.disconnect()},[t,o]),l}const Pe={process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},me=()=>({image:"",href:"#",process:"",eyebrow:"",name:"",meta:""}),ze=Array.from({length:6},me);function fe(t){const o=(t.photos??[]).map(a=>a?.src).filter(a=>!!a),l=t.image||o[0]||"",s=[l,...o].filter(a=>!!a),i=Q(t.name)||"gallery-item";return{car:t.eyebrow??"",wheel:t.name??"",process:t.process??"",finish:t.meta??"",imageLabel:`${i}.jpg`,detailLabel:`${i}-detail.jpg`,imageSrc:l||void 0,detailSrc:o[0]||l||void 0,photos:s,href:t.href}}function he({editing:t=!1,previewHover:o,ratio:l,captionPlace:s,tile:i,...a}){const{galleryHref:b="/gallery",submitHref:v="/contact",previewHover:y,display:w,displayPhone:f,styleOwner:h,photosOnly:F=!1,wordsAtRest:V=!1}=M(ie),e=fe(a),x=ne()&&!F,O=!x&&!xe(e),d=e.photos??(e.imageSrc?[e.imageSrc]:[]),P=K(null),z=Z(c=>{P.current=c},[]),q=pe(P,t),E=M(ce),N=E?.report,u=i?.id,j=i?.tag??"",I=i?.name??"";ae(()=>{if(!N||!u)return;const c={id:u,tag:j,name:I};return N(c),()=>N(c,!0)},[N,u,j,I]);const A=(u?E?.positionOf(u):null)??q,U=t&&(!!o||!!y),[X,g]=C(!1),[k,L]=C(0),H=()=>L(c=>(c-1+d.length)%d.length),R=()=>L(c=>(c+1)%d.length),S=d[k]??e.imageSrc??"",$=r(ee,{build:e,forceHover:U,alwaysShowOverlay:V,index:A?.index,total:A?.total,ratio:l,captionPlace:s,display:w,displayPhone:f,styleOwner:h,editing:t});return n(m,{children:[t?r(B,{as:"div",ref:z,[T]:"",className:"block w-full text-left",children:$}):r(B,{as:"button",ref:z,[T]:"",type:"button","aria-label":x?`Open ${e.car||"build"} on ${e.wheel||"wheel"}`:D(e),onClick:()=>{L(0),g(!0)},className:"block w-full cursor-pointer text-left focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2",children:$}),r(te,{open:X,onClose:()=>g(!1),label:x?`${e.car} on ${e.wheel}`:D(e),onPrev:d.length>1?H:void 0,onNext:d.length>1?R:void 0,className:"flex items-center justify-center p-6 max-[700px]:p-3",children:n("div",{onClick:c=>c.stopPropagation(),className:`relative grid w-[min(1800px,100%)] max-h-[calc(100vh-48px)] ${O?"grid-cols-1":"grid-cols-[1.4fr_1fr]"} overflow-hidden border border-line bg-bg max-view-desktop:grid-cols-1 max-view-desktop:overflow-auto`,style:{boxShadow:"0 60px 120px -20px color-mix(in srgb, var(--sf-shadow-color, #141416) 70%, transparent)"},children:[r(re,{label:"Close popup",className:"absolute right-[24px] top-[24px] z-[5] flex h-[56px] w-[56px] items-center justify-center border border-line font-mono text-[length:var(--size-label,21px)] text-fg-dim transition-colors hover:border-accent hover:text-fg",style:{background:oe},children:"✕"}),n("div",{className:"relative flex min-h-[690px] items-center justify-center overflow-hidden bg-surface-2 max-view-desktop:min-h-[450px]",children:[S&&r("img",{...le(S,{fallbackWidth:1280}),sizes:se,alt:`${(x?e.car:e.wheel||e.car)||"Photo"} — ${k+1} of ${d.length}`,className:"block h-full max-h-[88vh] w-full object-cover"},S),d.length>1&&n(m,{children:[r("button",{type:"button","aria-label":"Previous photo",onClick:H,className:"absolute left-4 top-1/2 flex h-16 w-16 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 font-mono text-[length:var(--size-label,24px)] text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"◁"}),r("button",{type:"button","aria-label":"Next photo",onClick:R,className:"absolute right-4 top-1/2 flex h-16 w-16 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 font-mono text-[length:var(--size-label,24px)] text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"▷"}),n("span",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 border border-fg-dim/30 bg-overlay-scrim/50 px-4 py-1.5 font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.22em] text-fg-dim backdrop-blur-[4px]",children:[k+1," / ",d.length]})]})]}),x?n("div",{className:"flex flex-col gap-[30px] px-[60px] py-[72px] max-view-desktop:px-9 max-view-desktop:py-[54px]",children:[e.process&&r("span",{className:"font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.3em] text-accent",children:p(e.process)}),e.wheel&&r("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(42px,4.5vw,60px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.95] tracking-[-0.025em]",children:Y(e.wheel,!1)}),e.car&&n("div",{className:"font-heading3 text-[length:var(--size-headingSmall,27px)] leading-[1.4] text-fg",children:["on ",r("em",{className:"font-serif font-normal italic text-accent tracking-[-0.01em]",children:p(e.car,!0)})]}),n("dl",{className:"mt-3 grid grid-cols-[auto_1fr] gap-x-7 gap-y-[18px] border-y border-line py-[30px] font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.22em]",children:[e.wheel&&n(m,{children:[r("dt",{className:"text-fg-dim",children:"Wheel"}),r("dd",{className:"text-fg",children:p(e.wheel)})]}),e.process&&n(m,{children:[r("dt",{className:"text-fg-dim",children:"Process"}),r("dd",{className:"text-fg",children:p(e.process)})]}),e.finish&&n(m,{children:[r("dt",{className:"text-fg-dim",children:"Finish"}),r("dd",{className:"text-fg",children:p(e.finish)})]}),e.car&&n(m,{children:[r("dt",{className:"text-fg-dim",children:"Vehicle"}),r("dd",{className:"text-fg",children:p(e.car)})]})]}),n("div",{className:"mt-auto flex flex-col gap-3.5 pt-6",children:[n(_,{href:e.href||"/wheels",onClick:()=>g(!1),className:"group flex items-center justify-between gap-6 border border-btn bg-btn px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-btn-ink transition-colors hover:border-fg hover:bg-fg",children:[r("span",{children:"View product"}),r("span",{className:"transition-transform group-hover:translate-x-[6px]",children:"→"})]}),n(_,{href:b,onClick:()=>g(!1),className:"flex items-center justify-between gap-6 border border-line px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:[r("span",{children:"See more builds"}),r("span",{children:"→"})]}),n(_,{href:v,onClick:()=>g(!1),className:"flex items-center justify-between gap-6 border border-line px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:[r("span",{children:"Submit your build"}),r("span",{children:"→"})]})]})]}):!O&&r(ue,{build:e})]})})]})}function W(t){return[t.process,t.car,t.finish].filter((o,l,s)=>!!o&&o!==t.wheel&&s.indexOf(o)===l)}function xe(t){return!!t.wheel||W(t).length>0}function D(t){const o=t.wheel||t.car;return o?`Open photo of ${o}`:"Open photo"}function ue({build:t}){const o=t.wheel,l=W(t);return n("div",{className:"flex flex-col gap-[24px] px-[60px] py-[72px] max-view-desktop:px-9 max-view-desktop:py-[54px]",children:[o&&r("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(42px,4.5vw,60px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.95] tracking-[-0.025em]",children:Y(o,!1)}),l.map(s=>r("p",{className:"text-[length:var(--size-body,18px)] leading-[1.5] text-fg",children:p(s)},s))]})}export{de as GALLERY_GRID_ATTR,Pe as GALLERY_ITEM_HINTS,ze as GALLERY_ITEM_SEEDS,T as GALLERY_TILE_ATTR,Oe as GALLERY_TILE_PARTS,ie as GalleryLinksContext,ce as GalleryTilesContext,he as default};
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as r,Fragment as y}from"react/jsx-runtime";import $e from"next/link";import{useMemo as W,useState as N}from"react";import{slugify as F}from"efficient-shell/format";import{stripMarkup as T}from"efficient-web-builder/format/lib/markup";import{renderChrome as k,renderGold as i,renderHeadline as Ce}from"efficient-web-builder/render/components/goldPhrases";import G from"efficient-web-builder/render/components/Placeholder";import je,{LightboxClose as Se}from"./Lightbox.js";import ze from"./ThemedSelect.js";import{say as $}from"efficient-web-builder/format/lib/editor-words";const l={bodyUpTo720:"max-view-tablet:text-[length:var(--size-body,15px)]",labelUpTo720:"max-view-tablet:text-[length:var(--size-label,11px)]",body:"text-[length:var(--size-body,17px)]",labelXs:"text-[length:var(--size-label,11px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]",labelXl:"text-[length:var(--size-label,14px)]"};function Y(x){const g=[x.image,...(x.photos??[]).map(u=>u?.src)].filter(u=>!!u);return g.length?g:[""]}const O=6,Le=()=>Array.from({length:O},(x,g)=>({image:"",process:$("Tag"),eyebrow:$("Category"),name:$("Item name"),meta:$("{n} photos",{n:`0${g+1}`})}));function _e({mode:x="both",kicker:g,breadcrumbLabel:u,vehicleTabLabel:X="Gallery A",vehicleTitle:ee,vehicleBody1:te,vehicleBody2:ae,vehicleStats:re,vehicleCards:B,wheelTabLabel:U="Gallery B",wheelTitle:le,wheelBody1:ne,wheelBody2:se,wheelStats:oe,wheelCards:E,othersTitle:ie,othersBody1:ce,othersBody2:me,othersStats:pe,othersCards:de,showBreadcrumb:xe=!0,showStats:ge=!0,showIntro:ue=!0,showTabs:fe=!0,showFilters:H=!0,showCount:M=!0,showSort:I=!0,previewTab:C,previewHover:be=!1,editing:h=!1}){const j=x==="both",v=j?["vehicles","wheels"]:x==="wheels"?["wheels"]:x==="others"?["others"]:["vehicles"],[Z,he]=N(v[0]),w=(h&&j&&C&&v.includes(C)?C:null)??(v.includes(Z)?Z:v[0]),ve=h&&be,[S,D]=N("all"),[z,we]=N("newest"),[L,b]=N(null),n=w==="vehicles"?{title:ee,body1:te,body2:ae,stats:re??[],cards:B??[],unit:"items",word:X}:w==="others"?{title:ie,body1:ce,body2:me,stats:pe??[],cards:de??[],unit:"items",word:"Others"}:{title:le,body1:ne,body2:se,stats:oe??[],cards:E??[],unit:"items",word:U},V=W(()=>{const e=[];for(const a of n.cards)a.process&&!e.includes(a.process)&&e.push(a.process);return e},[n.cards]),_=S!=="all"&&V.includes(S)?S:"all",q=_==="all"?n.cards:n.cards.filter(e=>e.process===_),J=W(()=>{const e=[...q];return z==="name"&&e.sort((a,o)=>(a.name??"").localeCompare(o.name??"")),e},[q,z]),K=n.cards.length===0,A=h&&K,P=A?Le():J,ye=A?O:n.cards.length,Ne=A?O:J.length,Q=g?`${g} · ${T(n.word)}`:void 0;function ke(e){e!==w&&(he(e),D("all"))}return r("section",{className:"relative z-[2] bg-bg",children:[xe&&r("nav",{className:`mx-auto flex max-w-[var(--sf-site-width,1600px)] items-center gap-4 border-b border-line px-[var(--sf-site-gutter,40px)] py-6 font-mono ${l.labelLarge} uppercase tracking-[0.2em] text-fg-dim max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))] max-view-tablet:py-4`,children:[t("span",{className:"hover:text-fg",children:"Home"}),t("span",{className:"opacity-40",children:"/"}),t("span",{className:"text-fg",children:u?k(u):"Gallery"})]}),r("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[auto_1fr_auto] items-end gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] pt-[100px] pb-[60px] max-view-desktop:grid-cols-1 max-view-desktop:gap-5 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-desktop:pt-[60px]",children:[t("span",{className:`pb-4 font-mono ${l.labelXl} uppercase tracking-[0.3em] text-accent`,children:Q?i(Q):null}),t("h2",{className:"font-display text-[length:min(var(--size-headingLarge,clamp(64px,9vw,140px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.9] tracking-[-0.04em]",children:n.title?Ce(n.title,!0):null}),t("div",{className:`pb-4 text-right font-mono ${l.labelLarge} uppercase leading-[1.8] tracking-[0.18em] text-fg-dim max-view-desktop:text-left`,children:ge&&n.stats.map((e,a)=>r("div",{children:[e.value?t("strong",{className:"font-normal text-fg",children:i(e.value)}):null," ",e.label?i(e.label):null]},a))})]}),ue&&(n.body1||n.body2)&&r("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-2 gap-[60px] px-[var(--sf-site-gutter,40px)] pt-8 max-view-desktop:grid-cols-1 max-view-desktop:gap-4 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]",children:[n.body1&&t("p",{className:`max-w-[540px] font-display ${l.body} leading-[1.6] text-fg-dim`,children:i(n.body1)}),n.body2&&t("p",{className:`max-w-[540px] font-display ${l.body} leading-[1.6] text-fg-dim`,children:i(n.body2)})]}),j&&fe&&t("div",{className:"mx-auto mt-10 flex max-w-[var(--sf-site-width,1600px)] items-stretch border-y border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-tablet:px-3",children:["vehicles","wheels"].map((e,a)=>{const o=w===e,c=e==="vehicles"?X:U,f=e==="vehicles"?(B??[]).length:(E??[]).length,m=(c||"").trim().split(/\s+/),p=m.slice(0,-1).join(" "),s=m.slice(-1)[0]??"";return r("button",{type:"button",onClick:()=>ke(e),className:["group relative grid flex-1 cursor-pointer grid-cols-[auto_1fr_auto] items-end gap-5 px-6 py-8 text-left transition-colors",a===0?"border-r border-line":"","max-view-tablet:grid-cols-[auto_1fr] max-view-tablet:items-center max-view-tablet:gap-2 max-view-tablet:px-3 max-view-tablet:py-3",o?"bg-surface":"hover:bg-fg/[0.04]"].join(" "),children:[t("span",{className:[`pb-2 font-mono ${l.labelLarge} tracking-[0.3em] max-view-tablet:pb-0 ${l.labelUpTo720} max-view-tablet:tracking-[0.24em]`,o?"text-accent":"text-fg-dim group-hover:text-accent"].join(" "),children:a===0?"A":"B"}),r("span",{className:`font-heading2 text-[length:min(var(--size-headingMedium,clamp(28px,3.6vw,48px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.02em] ${l.bodyUpTo720}`,children:[p?r(y,{children:[k(p)," "]}):null,t("em",{className:"font-normal italic text-accent",children:k(s)})]}),r("span",{className:`pb-2 text-right font-mono ${l.labelSmall} uppercase leading-[1.7] tracking-[0.24em] text-fg-dim max-view-tablet:hidden`,children:[t("strong",{className:"font-normal text-fg",children:f})," ","items",t("br",{}),e==="vehicles"?"Community photos":"Featured photos"]}),o&&t("span",{className:"pointer-events-none absolute inset-x-0 -bottom-px h-0.5 bg-accent"})]},e)})}),(H||M||I)&&r("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[auto_1fr_auto] items-center gap-8 border-b border-line px-[var(--sf-site-gutter,40px)] py-5 max-view-tablet:grid-cols-1 max-view-tablet:gap-4 max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))] max-view-tablet:py-3",style:{background:"color-mix(in oklab, var(--bg) 92%, transparent)"},children:[t("div",{className:"flex flex-wrap gap-1",children:H&&["all",...V].map(e=>{const a=_===e,o=e==="all"?"All":e;return t("button",{type:"button",onClick:()=>D(e),className:[`cursor-pointer border px-4 py-3 font-mono ${l.labelLarge} uppercase tracking-[0.2em] transition-colors`,a?"border-fg bg-fg text-bg":"border-transparent text-fg-dim hover:text-fg"].join(" "),children:k(o)},e)})}),M?r("div",{className:`text-center font-mono ${l.labelLarge} uppercase tracking-[0.2em] text-fg-dim`,children:[t("strong",{className:"font-normal text-accent",children:Ne})," / ",ye," ",n.unit]}):t("div",{}),I?r("div",{className:`flex items-center gap-3 font-mono ${l.labelLarge} uppercase tracking-[0.18em] text-fg-dim`,children:[t("span",{children:"Sort"}),r(ze,{value:z,onChange:e=>we(e.target.value),className:`cursor-pointer border border-line bg-bg px-3 py-2 font-mono ${l.labelLarge} uppercase tracking-[0.18em] text-fg`,children:[t("option",{value:"newest",children:"Newest"}),t("option",{value:"featured",children:"Featured"}),t("option",{value:"name",children:"Name A–Z"})]})]}):t("div",{})]}),t("div",{className:"mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-5 pb-20 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))]",children:P.length>0?t("div",{className:"grid grid-cols-6 gap-2 max-view-desktop:grid-cols-2 max-view-tablet:grid-cols-1",children:P.map((e,a)=>{const o=Y(e)[0],f=`group relative block aspect-[4/3] w-full overflow-hidden bg-surface-2 text-left ${a<2?"col-span-3 max-view-desktop:col-span-1":"col-span-2 max-view-desktop:col-span-1"}`,m=`${e.name??"card"}-${a}`,p=r(y,{children:[t(G,{label:F(e.name)||`gallery-card-${a+1}`,src:o||void 0,alt:T(e.name??""),sizes:"(max-width: 720px) 100vw, (max-width: 1100px) 50vw, 33vw",className:`transition-transform duration-700 ${ve?"scale-[1.04]":"group-hover:scale-[1.04]"}`}),r("div",{className:"pointer-events-none absolute inset-0 z-10 flex flex-col justify-between p-6 max-view-tablet:p-3",style:{background:"linear-gradient(180deg, rgba(10,10,10,.55) 0%, transparent 35%, transparent 55%, rgba(10,10,10,.92) 100%)"},children:[r("div",{className:`flex items-start justify-between font-mono ${l.labelSmall} uppercase tracking-[0.24em]`,children:[e.process?t("span",{className:"text-accent",children:i(e.process)}):t("span",{}),r("span",{className:"text-overlay-fg/70",children:[String(a+1).padStart(2,"0")," / ",String(P.length).padStart(2,"0")]})]}),r("div",{className:"flex flex-col gap-2",children:[e.eyebrow&&t("div",{className:`font-mono ${l.labelSmall} uppercase tracking-[0.24em] text-accent`,children:i(e.eyebrow)}),e.name&&t("div",{className:"font-heading3 text-[length:var(--size-headingSmall,clamp(22px,2.4vw,32px))] font-medium uppercase leading-none tracking-[-0.02em] text-overlay-fg",children:i(e.name)}),e.meta&&t("div",{className:`flex flex-wrap gap-3 pt-1 font-mono ${l.labelXs} uppercase tracking-[0.2em] text-overlay-fg/70`,children:t("span",{children:i(e.meta)})})]})]})]});return h?t("div",{className:f,children:p},m):t("button",{type:"button",onClick:()=>b({card:e,index:0}),"aria-label":`Open ${e.name??"gallery item"}`,className:`${f} cursor-pointer focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2`,children:p},m)})}):t("div",{className:`py-20 text-center font-mono ${l.labelXl} uppercase tracking-[0.2em] text-fg-dim`,children:K?"No items in this gallery yet.":"No items match this filter."})}),L&&(()=>{const e=Y(L.card),{card:a,index:o}=L,c=e.length,f=e[o]??e[0]??"",m=s=>b(d=>d&&{...d,index:(d.index+s+c)%c}),p=[a.process,a.meta].filter(Boolean).join(" · ");return r(je,{open:!0,onClose:()=>b(null),label:a.name??"Gallery item",onPrev:c>1?()=>m(-1):void 0,onNext:c>1?()=>m(1):void 0,className:"flex cursor-zoom-out flex-col items-center justify-center p-6 max-view-tablet:p-3",children:[r("div",{className:"relative flex w-full flex-1 items-center justify-center",children:[t("div",{className:"relative h-full max-h-[72vh] w-full max-w-[92vw]",children:t(G,{label:F(a.name)||"gallery-photo",src:f||void 0,alt:T(a.name??""),objectFit:"contain",sizes:"92vw"})}),c>1&&r(y,{children:[t("button",{type:"button","aria-label":"Previous photo",onClick:s=>{s.stopPropagation(),m(-1)},className:"absolute left-2 top-1/2 flex h-12 w-12 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"◁"}),t("button",{type:"button","aria-label":"Next photo",onClick:s=>{s.stopPropagation(),m(1)},className:"absolute right-2 top-1/2 flex h-12 w-12 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"▷"})]})]}),r("div",{className:`mt-5 flex flex-col items-center gap-3 text-center font-mono ${l.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,onClick:s=>s.stopPropagation(),children:[r("div",{className:"flex flex-col items-center gap-1",children:[a.name&&t("span",{className:"text-accent",children:i(a.name)}),a.eyebrow&&t("span",{children:i(a.eyebrow)}),r("span",{className:"text-fg-dim/70",children:[p?r(y,{children:[i(p)," · "]}):null,o+1," / ",c]})]}),a.href&&t($e,{href:a.href,onClick:()=>b(null),className:`cursor-pointer border border-btn bg-btn/[0.08] px-5 py-3 font-mono ${l.labelLarge} uppercase tracking-[0.28em] text-btn transition-colors hover:bg-btn hover:text-btn-ink`,children:"View Product →"})]}),c>1&&t("div",{onClick:s=>s.stopPropagation(),className:"mt-5 flex max-w-[92vw] gap-2 overflow-x-auto pb-1",children:e.map((s,d)=>t("button",{type:"button","aria-label":`Photo ${d+1}`,onClick:()=>b(R=>R&&{...R,index:d}),className:["relative h-16 w-24 shrink-0 cursor-pointer overflow-hidden border transition-colors max-view-tablet:h-12 max-view-tablet:w-16",d===o?"border-accent":"border-line opacity-60 hover:border-fg-dim hover:opacity-100"].join(" "),children:t(G,{label:F(a.name)||"gallery-photo",src:s||void 0,alt:"",sizes:"120px"})},`${s}-${d}`))}),t(Se,{})]})})()]})}export{_e as default};
1
+ "use client";import{jsx as t,jsxs as r,Fragment as y}from"react/jsx-runtime";import $e from"next/link";import{useMemo as W,useState as N}from"react";import{slugify as F}from"efficient-shell/format";import{stripMarkup as T}from"efficient-web-builder/format/lib/markup";import{renderChrome as k,renderGold as i,renderHeadline as Ce}from"efficient-web-builder/render/components/goldPhrases";import G from"efficient-web-builder/render/components/Placeholder";import je,{LightboxClose as Se}from"./Lightbox.js";import ze from"./ThemedSelect.js";import{say as $}from"efficient-web-builder/format/lib/editor-words";import{HideTaker as Le}from"efficient-web-builder/render/components/ViewHideRoot";const l={bodyUpTo720:"max-view-tablet:text-[length:var(--size-body,15px)]",labelUpTo720:"max-view-tablet:text-[length:var(--size-label,11px)]",body:"text-[length:var(--size-body,17px)]",labelXs:"text-[length:var(--size-label,11px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]",labelXl:"text-[length:var(--size-label,14px)]"};function Y(x){const g=[x.image,...(x.photos??[]).map(f=>f?.src)].filter(f=>!!f);return g.length?g:[""]}const O=6,_e=()=>Array.from({length:O},(x,g)=>({image:"",process:$("Tag"),eyebrow:$("Category"),name:$("Item name"),meta:$("{n} photos",{n:`0${g+1}`})}));function Ae({mode:x="both",kicker:g,breadcrumbLabel:f,vehicleTabLabel:X="Gallery A",vehicleTitle:ee,vehicleBody1:te,vehicleBody2:ae,vehicleStats:re,vehicleCards:B,wheelTabLabel:U="Gallery B",wheelTitle:le,wheelBody1:ne,wheelBody2:se,wheelStats:oe,wheelCards:H,othersTitle:ie,othersBody1:ce,othersBody2:me,othersStats:pe,othersCards:de,showBreadcrumb:xe=!0,showStats:ge=!0,showIntro:fe=!0,showTabs:ue=!0,showFilters:E=!0,showCount:M=!0,showSort:I=!0,previewTab:C,previewHover:be=!1,editing:h=!1}){const j=x==="both",v=j?["vehicles","wheels"]:x==="wheels"?["wheels"]:x==="others"?["others"]:["vehicles"],[Z,he]=N(v[0]),w=(h&&j&&C&&v.includes(C)?C:null)??(v.includes(Z)?Z:v[0]),ve=h&&be,[S,D]=N("all"),[z,we]=N("newest"),[L,b]=N(null),n=w==="vehicles"?{title:ee,body1:te,body2:ae,stats:re??[],cards:B??[],unit:"items",word:X}:w==="others"?{title:ie,body1:ce,body2:me,stats:pe??[],cards:de??[],unit:"items",word:"Others"}:{title:le,body1:ne,body2:se,stats:oe??[],cards:H??[],unit:"items",word:U},V=W(()=>{const e=[];for(const a of n.cards)a.process&&!e.includes(a.process)&&e.push(a.process);return e},[n.cards]),_=S!=="all"&&V.includes(S)?S:"all",q=_==="all"?n.cards:n.cards.filter(e=>e.process===_),J=W(()=>{const e=[...q];return z==="name"&&e.sort((a,o)=>(a.name??"").localeCompare(o.name??"")),e},[q,z]),K=n.cards.length===0,A=h&&K,P=A?_e():J,ye=A?O:n.cards.length,Ne=A?O:J.length,Q=g?`${g} · ${T(n.word)}`:void 0;function ke(e){e!==w&&(he(e),D("all"))}return r(Le,{as:"section",className:"relative z-[2] bg-bg",children:[xe&&r("nav",{className:`mx-auto flex max-w-[var(--sf-site-width,1600px)] items-center gap-4 border-b border-line px-[var(--sf-site-gutter,40px)] py-6 font-mono ${l.labelLarge} uppercase tracking-[0.2em] text-fg-dim max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))] max-view-tablet:py-4`,children:[t("span",{className:"hover:text-fg",children:"Home"}),t("span",{className:"opacity-40",children:"/"}),t("span",{className:"text-fg",children:f?k(f):"Gallery"})]}),r("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[auto_1fr_auto] items-end gap-[60px] border-b border-line px-[var(--sf-site-gutter,40px)] pt-[100px] pb-[60px] max-view-desktop:grid-cols-1 max-view-desktop:gap-5 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-desktop:pt-[60px]",children:[t("span",{className:`pb-4 font-mono ${l.labelXl} uppercase tracking-[0.3em] text-accent`,children:Q?i(Q):null}),t("h2",{className:"font-display text-[length:min(var(--size-headingLarge,clamp(64px,9vw,140px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.9] tracking-[-0.04em]",children:n.title?Ce(n.title,!0):null}),t("div",{className:`pb-4 text-right font-mono ${l.labelLarge} uppercase leading-[1.8] tracking-[0.18em] text-fg-dim max-view-desktop:text-left`,children:ge&&n.stats.map((e,a)=>r("div",{children:[e.value?t("strong",{className:"font-normal text-fg",children:i(e.value)}):null," ",e.label?i(e.label):null]},a))})]}),fe&&(n.body1||n.body2)&&r("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-2 gap-[60px] px-[var(--sf-site-gutter,40px)] pt-8 max-view-desktop:grid-cols-1 max-view-desktop:gap-4 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]",children:[n.body1&&t("p",{className:`max-w-[540px] font-display ${l.body} leading-[1.6] text-fg-dim`,children:i(n.body1)}),n.body2&&t("p",{className:`max-w-[540px] font-display ${l.body} leading-[1.6] text-fg-dim`,children:i(n.body2)})]}),j&&ue&&t("div",{className:"mx-auto mt-10 flex max-w-[var(--sf-site-width,1600px)] items-stretch border-y border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-tablet:px-3",children:["vehicles","wheels"].map((e,a)=>{const o=w===e,c=e==="vehicles"?X:U,u=e==="vehicles"?(B??[]).length:(H??[]).length,m=(c||"").trim().split(/\s+/),p=m.slice(0,-1).join(" "),s=m.slice(-1)[0]??"";return r("button",{type:"button",onClick:()=>ke(e),className:["group relative grid flex-1 cursor-pointer grid-cols-[auto_1fr_auto] items-end gap-5 px-6 py-8 text-left transition-colors",a===0?"border-r border-line":"","max-view-tablet:grid-cols-[auto_1fr] max-view-tablet:items-center max-view-tablet:gap-2 max-view-tablet:px-3 max-view-tablet:py-3",o?"bg-surface":"hover:bg-fg/[0.04]"].join(" "),children:[t("span",{className:[`pb-2 font-mono ${l.labelLarge} tracking-[0.3em] max-view-tablet:pb-0 ${l.labelUpTo720} max-view-tablet:tracking-[0.24em]`,o?"text-accent":"text-fg-dim group-hover:text-accent"].join(" "),children:a===0?"A":"B"}),r("span",{className:`font-heading2 text-[length:min(var(--size-headingMedium,clamp(28px,3.6vw,48px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.02em] ${l.bodyUpTo720}`,children:[p?r(y,{children:[k(p)," "]}):null,t("em",{className:"font-normal italic text-accent",children:k(s)})]}),r("span",{className:`pb-2 text-right font-mono ${l.labelSmall} uppercase leading-[1.7] tracking-[0.24em] text-fg-dim max-view-tablet:hidden`,children:[t("strong",{className:"font-normal text-fg",children:u})," ","items",t("br",{}),e==="vehicles"?"Community photos":"Featured photos"]}),o&&t("span",{className:"pointer-events-none absolute inset-x-0 -bottom-px h-0.5 bg-accent"})]},e)})}),(E||M||I)&&r("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[auto_1fr_auto] items-center gap-8 border-b border-line px-[var(--sf-site-gutter,40px)] py-5 max-view-tablet:grid-cols-1 max-view-tablet:gap-4 max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))] max-view-tablet:py-3",style:{background:"color-mix(in oklab, var(--bg) 92%, transparent)"},children:[t("div",{className:"flex flex-wrap gap-1",children:E&&["all",...V].map(e=>{const a=_===e,o=e==="all"?"All":e;return t("button",{type:"button",onClick:()=>D(e),className:[`cursor-pointer border px-4 py-3 font-mono ${l.labelLarge} uppercase tracking-[0.2em] transition-colors`,a?"border-fg bg-fg text-bg":"border-transparent text-fg-dim hover:text-fg"].join(" "),children:k(o)},e)})}),M?r("div",{className:`text-center font-mono ${l.labelLarge} uppercase tracking-[0.2em] text-fg-dim`,children:[t("strong",{className:"font-normal text-accent",children:Ne})," / ",ye," ",n.unit]}):t("div",{}),I?r("div",{className:`flex items-center gap-3 font-mono ${l.labelLarge} uppercase tracking-[0.18em] text-fg-dim`,children:[t("span",{children:"Sort"}),r(ze,{value:z,onChange:e=>we(e.target.value),className:`cursor-pointer border border-line bg-bg px-3 py-2 font-mono ${l.labelLarge} uppercase tracking-[0.18em] text-fg`,children:[t("option",{value:"newest",children:"Newest"}),t("option",{value:"featured",children:"Featured"}),t("option",{value:"name",children:"Name A–Z"})]})]}):t("div",{})]}),t("div",{className:"mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-5 pb-20 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))]",children:P.length>0?t("div",{className:"grid grid-cols-6 gap-2 max-view-desktop:grid-cols-2 max-view-tablet:grid-cols-1",children:P.map((e,a)=>{const o=Y(e)[0],u=`group relative block aspect-[4/3] w-full overflow-hidden bg-surface-2 text-left ${a<2?"col-span-3 max-view-desktop:col-span-1":"col-span-2 max-view-desktop:col-span-1"}`,m=`${e.name??"card"}-${a}`,p=r(y,{children:[t(G,{label:F(e.name)||`gallery-card-${a+1}`,src:o||void 0,alt:T(e.name??""),sizes:"(max-width: 720px) 100vw, (max-width: 1100px) 50vw, 33vw",className:`transition-transform duration-700 ${ve?"scale-[1.04]":"group-hover:scale-[1.04]"}`}),r("div",{className:"pointer-events-none absolute inset-0 z-10 flex flex-col justify-between p-6 max-view-tablet:p-3",style:{background:"linear-gradient(180deg, rgba(10,10,10,.55) 0%, transparent 35%, transparent 55%, rgba(10,10,10,.92) 100%)"},children:[r("div",{className:`flex items-start justify-between font-mono ${l.labelSmall} uppercase tracking-[0.24em]`,children:[e.process?t("span",{className:"text-accent",children:i(e.process)}):t("span",{}),r("span",{className:"text-overlay-fg/70",children:[String(a+1).padStart(2,"0")," / ",String(P.length).padStart(2,"0")]})]}),r("div",{className:"flex flex-col gap-2",children:[e.eyebrow&&t("div",{className:`font-mono ${l.labelSmall} uppercase tracking-[0.24em] text-accent`,children:i(e.eyebrow)}),e.name&&t("div",{className:"font-heading3 text-[length:var(--size-headingSmall,clamp(22px,2.4vw,32px))] font-medium uppercase leading-none tracking-[-0.02em] text-overlay-fg",children:i(e.name)}),e.meta&&t("div",{className:`flex flex-wrap gap-3 pt-1 font-mono ${l.labelXs} uppercase tracking-[0.2em] text-overlay-fg/70`,children:t("span",{children:i(e.meta)})})]})]})]});return h?t("div",{className:u,children:p},m):t("button",{type:"button",onClick:()=>b({card:e,index:0}),"aria-label":`Open ${e.name??"gallery item"}`,className:`${u} cursor-pointer focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2`,children:p},m)})}):t("div",{className:`py-20 text-center font-mono ${l.labelXl} uppercase tracking-[0.2em] text-fg-dim`,children:K?"No items in this gallery yet.":"No items match this filter."})}),L&&(()=>{const e=Y(L.card),{card:a,index:o}=L,c=e.length,u=e[o]??e[0]??"",m=s=>b(d=>d&&{...d,index:(d.index+s+c)%c}),p=[a.process,a.meta].filter(Boolean).join(" · ");return r(je,{open:!0,onClose:()=>b(null),label:a.name??"Gallery item",onPrev:c>1?()=>m(-1):void 0,onNext:c>1?()=>m(1):void 0,className:"flex cursor-zoom-out flex-col items-center justify-center p-6 max-view-tablet:p-3",children:[r("div",{className:"relative flex w-full flex-1 items-center justify-center",children:[t("div",{className:"relative h-full max-h-[72vh] w-full max-w-[92vw]",children:t(G,{label:F(a.name)||"gallery-photo",src:u||void 0,alt:T(a.name??""),objectFit:"contain",sizes:"92vw"})}),c>1&&r(y,{children:[t("button",{type:"button","aria-label":"Previous photo",onClick:s=>{s.stopPropagation(),m(-1)},className:"absolute left-2 top-1/2 flex h-12 w-12 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"◁"}),t("button",{type:"button","aria-label":"Next photo",onClick:s=>{s.stopPropagation(),m(1)},className:"absolute right-2 top-1/2 flex h-12 w-12 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"▷"})]})]}),r("div",{className:`mt-5 flex flex-col items-center gap-3 text-center font-mono ${l.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,onClick:s=>s.stopPropagation(),children:[r("div",{className:"flex flex-col items-center gap-1",children:[a.name&&t("span",{className:"text-accent",children:i(a.name)}),a.eyebrow&&t("span",{children:i(a.eyebrow)}),r("span",{className:"text-fg-dim/70",children:[p?r(y,{children:[i(p)," · "]}):null,o+1," / ",c]})]}),a.href&&t($e,{href:a.href,onClick:()=>b(null),className:`cursor-pointer border border-btn bg-btn/[0.08] px-5 py-3 font-mono ${l.labelLarge} uppercase tracking-[0.28em] text-btn transition-colors hover:bg-btn hover:text-btn-ink`,children:"View Product →"})]}),c>1&&t("div",{onClick:s=>s.stopPropagation(),className:"mt-5 flex max-w-[92vw] gap-2 overflow-x-auto pb-1",children:e.map((s,d)=>t("button",{type:"button","aria-label":`Photo ${d+1}`,onClick:()=>b(R=>R&&{...R,index:d}),className:["relative h-16 w-24 shrink-0 cursor-pointer overflow-hidden border transition-colors max-view-tablet:h-12 max-view-tablet:w-16",d===o?"border-accent":"border-line opacity-60 hover:border-fg-dim hover:opacity-100"].join(" "),children:t(G,{label:F(a.name)||"gallery-photo",src:s||void 0,alt:"",sizes:"120px"})},`${s}-${d}`))}),t(Se,{})]})})()]})}export{Ae as default};
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as c,Fragment as b}from"react/jsx-runtime";import v from"next/link";import{createContext as h,useContext as g}from"react";import{CardTemplateRows as m}from"efficient-web-builder/render/components/CardRowContext";import{InsideSiteColumn as w}from"efficient-web-builder/render/components/SiteGutterFrame";import{cardHoverOf as S}from"efficient-web-builder/format/lib/animation/hover";import{NO_FIELD_ANSWERS as _}from"../lib/content/field-usage.js";import{CARD_IMAGE_SIZES as y}from"../lib/sections/card-image-sizes.js";import{CardLookContext as f}from"./card-pieces/card-row.js";import{CardBuyDialog as I}from"./card-pieces/CardBuyButton.js";import{BundleCardStateProvider as R,useWheelCardState as E,WheelCardStateProvider as P}from"./card-pieces/ProductCardState.js";import{say as G}from"efficient-web-builder/format/lib/editor-words";import{CARD_INDEX_OPTIONS as T,cardIndexCss as A}from"efficient-web-builder/format/lib/sections/product-card-style";import{SHARED_ROWS_LIST_CLASS as N}from"efficient-web-builder/render/lib/content/box-shared-columns";import{GAP_ZONE_CLASS as D}from"efficient-web-builder/format/lib/content/container-gap";import{CARD_ROWS_GRID_CLASS as L,cardRowsGap as O,cardRowsGridStyle as $}from"./WheelCardFrame.js";function ce(e){return T.map(({value:r})=>r==="off"?"":A(e,r).replace(".sf-card-index::before",`.sf-card-index[data-format="${r}"]::before`)).join("")}function me(e){return e.className.includes(D)?{className:`${e.className} ${L} ${N}`,style:{...e.style,...$(O(e))}}:e}const F={ownerId:"",Template:void 0,hover:S({},"ProductGrid"),imageSizes:y,fieldUsage:_,reserveEyebrow:!1,editing:!1},p=h(F);function d(){return g(p)}function fe({value:e,children:r}){return t(p.Provider,{value:e,children:r})}function k(e){return{name:e.name??"",eyebrow:e.process??"",note:"",href:e.slug?`/wheels/${e.slug}`:""}}const u=e=>`/bundles/${e.slug}`;function W(e){return{name:e.name,eyebrow:"",note:e.subtitle??"",href:u(e)}}const j="sf-card sf-card-fill group relative flex flex-col bg-[var(--card-bg)] transition-colors duration-200 hover:bg-[var(--card-bg-hover)] [.sf-card-rows>&]:mb-[var(--sf-card-row-gap)]",z="sf-card group relative flex flex-col border border-line bg-bg transition-colors hover:border-accent",B="col-span-2 max-view-wide:col-span-1 @max-[720px]:col-span-1 [&:has([data-set-picture=one])]:col-span-1",U="relative z-[2] flex flex-1 flex-col pointer-events-none [&_a]:pointer-events-auto [&_button]:pointer-events-auto [&_input]:pointer-events-auto [&_select]:pointer-events-auto [&_label]:pointer-events-auto",H="relative flex flex-1 flex-col";function x({copy:e,href:r,label:o,wide:n=!1,kit:a=!1,probes:l}){const{editing:i}=d(),s=a?z:j;return c("article",{className:n?`${s} ${B}`:s,children:[l,!i&&r?t(v,{href:r,"aria-label":o,className:"absolute inset-0 z-[1]"}):null,t("div",{className:i?H:U,children:t(w,{children:e})})]})}function Y({copy:e}){const{wheel:r,sel:o,isSet:n}=E();return c(b,{children:[t(x,{copy:e,href:r.slug?`/wheels/${r.slug}`:"",label:r.name,wide:n,probes:o.probes}),t(I,{})]})}function K(e,r,o){const n=r.item;return t(P,{wheel:n,defaultFinish:o?.[r.index],children:t(f.Provider,{value:"catalog",children:t(Y,{copy:e})})})}function pe({wheels:e,finishes:r,children:o}){const{ownerId:n,Template:a,editing:l}=d();return t(m,{ownerId:n,ownerType:"ProductGrid",Template:a,rows:e.map(k),items:e,fallback:l?t(C,{}):null,wrapCopy:(i,s)=>K(i,s,r),children:o})}function M(e,r){const o=r.item;return t(R,{bundle:o,children:t(f.Provider,{value:"catalog",children:t(x,{copy:e,href:u(o),label:o.name,kit:!0})})})}function ue({bundles:e,children:r}){const{ownerId:o,Template:n,editing:a}=d();return t(m,{ownerId:o,ownerType:"ProductGrid",Template:n,rows:e.map(W),items:e,fallback:a?t(C,{}):null,wrapCopy:M,children:r})}function C(){return t("div",{"data-grid-card-empty":"",className:"p-4 text-center font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:G("The card is empty. Add parts to its card template in Layers.")})}export{ue as GridBundleCards,fe as GridCardProvider,pe as GridCards,W as bundleCardRow,u as bundlePagePath,me as cardRowsGrid,ce as gridIndexCss,k as productCardRow,d as useGridCard};
1
+ "use client";import{jsx as t,jsxs as c,Fragment as b}from"react/jsx-runtime";import v from"next/link";import{createContext as h,useContext as g}from"react";import{CardTemplateRows as m}from"efficient-web-builder/render/components/CardRowContext";import{InsideSiteColumn as w}from"efficient-web-builder/render/components/SiteGutterFrame";import{HideTaker as S}from"efficient-web-builder/render/components/ViewHideRoot";import{cardHoverOf as _}from"efficient-web-builder/format/lib/animation/hover";import{NO_FIELD_ANSWERS as y}from"../lib/content/field-usage.js";import{CARD_IMAGE_SIZES as I}from"../lib/sections/card-image-sizes.js";import{CardLookContext as f}from"./card-pieces/card-row.js";import{CardBuyDialog as R}from"./card-pieces/CardBuyButton.js";import{BundleCardStateProvider as E,useWheelCardState as P,WheelCardStateProvider as T}from"./card-pieces/ProductCardState.js";import{say as G}from"efficient-web-builder/format/lib/editor-words";import{CARD_INDEX_OPTIONS as A,cardIndexCss as N}from"efficient-web-builder/format/lib/sections/product-card-style";import{SHARED_ROWS_LIST_CLASS as D}from"efficient-web-builder/render/lib/content/box-shared-columns";import{GAP_ZONE_CLASS as L}from"efficient-web-builder/format/lib/content/container-gap";import{CARD_ROWS_GRID_CLASS as O,cardRowsGap as $,cardRowsGridStyle as k}from"./WheelCardFrame.js";function fe(e){return A.map(({value:r})=>r==="off"?"":N(e,r).replace(".sf-card-index::before",`.sf-card-index[data-format="${r}"]::before`)).join("")}function pe(e){return e.className.includes(L)?{className:`${e.className} ${O} ${D}`,style:{...e.style,...k($(e))}}:e}const F={ownerId:"",Template:void 0,hover:_({},"ProductGrid"),imageSizes:I,fieldUsage:y,reserveEyebrow:!1,editing:!1},p=h(F);function d(){return g(p)}function ue({value:e,children:r}){return t(p.Provider,{value:e,children:r})}function W(e){return{name:e.name??"",eyebrow:e.process??"",note:"",href:e.slug?`/wheels/${e.slug}`:""}}const u=e=>`/bundles/${e.slug}`;function j(e){return{name:e.name,eyebrow:"",note:e.subtitle??"",href:u(e)}}const z="sf-card sf-card-fill group relative flex flex-col bg-[var(--card-bg)] transition-colors duration-200 hover:bg-[var(--card-bg-hover)] [.sf-card-rows>&]:mb-[var(--sf-card-row-gap)]",B="sf-card group relative flex flex-col border border-line bg-bg transition-colors hover:border-accent",H="col-span-2 max-view-wide:col-span-1 @max-[720px]:col-span-1 [&:has([data-set-picture=one])]:col-span-1",U="relative z-[2] flex flex-1 flex-col pointer-events-none [&_a]:pointer-events-auto [&_button]:pointer-events-auto [&_input]:pointer-events-auto [&_select]:pointer-events-auto [&_label]:pointer-events-auto",Y="relative flex flex-1 flex-col";function x({copy:e,href:r,label:o,wide:n=!1,kit:a=!1,probes:l}){const{editing:i}=d(),s=a?B:z;return c(S,{as:"article",className:n?`${s} ${H}`:s,children:[l,!i&&r?t(v,{href:r,"aria-label":o,className:"absolute inset-0 z-[1]"}):null,t("div",{className:i?Y:U,children:t(w,{children:e})})]})}function K({copy:e}){const{wheel:r,sel:o,isSet:n}=P();return c(b,{children:[t(x,{copy:e,href:r.slug?`/wheels/${r.slug}`:"",label:r.name,wide:n,probes:o.probes}),t(R,{})]})}function M(e,r,o){const n=r.item;return t(T,{wheel:n,defaultFinish:o?.[r.index],children:t(f.Provider,{value:"catalog",children:t(K,{copy:e})})})}function xe({wheels:e,finishes:r,children:o}){const{ownerId:n,Template:a,editing:l}=d();return t(m,{ownerId:n,ownerType:"ProductGrid",Template:a,rows:e.map(W),items:e,fallback:l?t(C,{}):null,wrapCopy:(i,s)=>M(i,s,r),children:o})}function V(e,r){const o=r.item;return t(E,{bundle:o,children:t(f.Provider,{value:"catalog",children:t(x,{copy:e,href:u(o),label:o.name,kit:!0})})})}function Ce({bundles:e,children:r}){const{ownerId:o,Template:n,editing:a}=d();return t(m,{ownerId:o,ownerType:"ProductGrid",Template:n,rows:e.map(j),items:e,fallback:a?t(C,{}):null,wrapCopy:V,children:r})}function C(){return t("div",{"data-grid-card-empty":"",className:"p-4 text-center font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:G("The card is empty. Add parts to its card template in Layers.")})}export{Ce as GridBundleCards,ue as GridCardProvider,xe as GridCards,j as bundleCardRow,u as bundlePagePath,pe as cardRowsGrid,fe as gridIndexCss,W as productCardRow,d as useGridCard};
@@ -14,4 +14,4 @@ export default function HeaderNavItem({ item, mobile, onNavigate, dropdownAlign,
14
14
  mobile?: boolean;
15
15
  onNavigate?: () => void;
16
16
  dropdownAlign?: "start" | "center" | "end";
17
- }): import("react").JSX.Element;
17
+ }): ReactNode;
@@ -1 +1 @@
1
- "use client";import{jsx as n,jsxs as d}from"react/jsx-runtime";import l from"next/link";import{useEffect as w,useId as N,useRef as m,useState as k}from"react";import{isLabelOnlyMenuUrl as p}from"../lib/menu-link.js";function $({item:s,mobile:a=!1,onNavigate:x,dropdownAlign:h="start"}){const[r,i]=k(!1),f=N(),c=m(null),b=m(null),g=s.dropdownItems.length>0,u=!p(s.href);w(()=>{if(!r)return;const e=c.current?.ownerDocument??document,t=y=>{c.current?.contains(y.target)||i(!1)};return e.addEventListener("pointerdown",t),()=>e.removeEventListener("pointerdown",t)},[r]);const o=()=>{i(!1),x?.()};if(!g)return u?n(l,{href:s.href,onClick:o,className:a?"flex min-h-11 items-center font-display text-3xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent":"whitespace-nowrap opacity-80 transition-opacity hover:opacity-100 focus-visible:rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:s.label}):n("span",{className:a?"flex min-h-11 items-center font-display text-3xl":"whitespace-nowrap opacity-80",children:s.label});const v=n("button",{ref:b,type:"button","aria-label":`${r?"Close":"Open"} ${s.plainLabel} menu`,"aria-expanded":r,"aria-controls":f,onClick:()=>i(e=>!e),className:a?"flex h-11 w-11 shrink-0 items-center justify-center rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent":"flex h-8 w-8 shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:n("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5","aria-hidden":"true",className:`transition-transform ${r?"rotate-180":""}`,children:n("path",{d:"m3 5 4 4 4-4"})})});return a?d("div",{ref:c,children:[d("div",{className:"flex min-h-11 items-center justify-between gap-3",children:[u?n(l,{href:s.href,onClick:o,className:"min-w-0 flex-1 font-display text-3xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:s.label}):n("span",{className:"min-w-0 flex-1 font-display text-3xl",children:s.label}),v]}),r?n("div",{id:f,className:"mt-3 flex flex-col border-l border-line pl-5",children:s.dropdownItems.map((e,t)=>p(e.href)?n("span",{className:"flex min-h-11 items-center text-base opacity-80",children:e.label},`${e.href}-${t}`):n(l,{href:e.href,onClick:o,className:"flex min-h-11 items-center text-base opacity-80 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:e.label},`${e.href}-${t}`))}):null]}):d("div",{ref:c,className:"relative flex items-center whitespace-nowrap",onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onBlurCapture:e=>{e.currentTarget.contains(e.relatedTarget)||i(!1)},onKeyDown:e=>{e.key==="Escape"&&(i(!1),b.current?.focus())},children:[u?n(l,{href:s.href,onClick:o,onFocus:()=>i(!0),className:"opacity-80 transition-opacity hover:opacity-100 focus-visible:rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:s.label}):n("span",{className:"opacity-80",children:s.label}),v,r?n("div",{id:f,className:`absolute top-full z-[60] w-72 pt-3 text-fg ${h==="end"?"right-0":h==="center"?"left-1/2 -translate-x-1/2":"left-0"}`,children:n("div",{className:"overflow-hidden rounded-lg border border-line bg-bg p-2 shadow-xl",children:s.dropdownItems.map((e,t)=>p(e.href)?n("span",{className:"flex min-h-11 items-center rounded-md px-4 py-2 text-sm opacity-80",children:e.label},`${e.href}-${t}`):n(l,{href:e.href,onClick:o,className:"flex min-h-11 items-center rounded-md px-4 py-2 text-sm opacity-80 transition-[background,opacity] hover:bg-[var(--card-bg)] hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:e.label},`${e.href}-${t}`))})}):null]})}export{$ as default};
1
+ "use client";import{jsx as n,jsxs as p}from"react/jsx-runtime";import l from"next/link";import{useEffect as k,useId as $,useRef as g,useState as C}from"react";import{isLabelOnlyMenuUrl as h}from"../lib/menu-link.js";import{useTakeViewHide as j,withViewHide as m}from"efficient-web-builder/render/components/ViewHideRoot";function L({item:s,mobile:c=!1,onNavigate:y,dropdownAlign:b="start"}){const[o,t]=C(!1),u=$(),f=g(null),v=g(null),w=s.dropdownItems.length>0,d=!h(s.href),i=j();k(()=>{if(!o)return;const e=f.current?.ownerDocument??document,r=N=>{f.current?.contains(N.target)||t(!1)};return e.addEventListener("pointerdown",r),()=>e.removeEventListener("pointerdown",r)},[o]);const a=()=>{t(!1),y?.()};if(!w)return d?i.scope(n(l,{href:s.href,onClick:a,className:m(c?"flex min-h-11 items-center font-display text-3xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent":"whitespace-nowrap opacity-80 transition-opacity hover:opacity-100 focus-visible:rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",i.className),...i.attrs,children:s.label})):i.scope(n("span",{className:m(c?"flex min-h-11 items-center font-display text-3xl":"whitespace-nowrap opacity-80",i.className),...i.attrs,children:s.label}));const x=n("button",{ref:v,type:"button","aria-label":`${o?"Close":"Open"} ${s.plainLabel} menu`,"aria-expanded":o,"aria-controls":u,onClick:()=>t(e=>!e),className:c?"flex h-11 w-11 shrink-0 items-center justify-center rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent":"flex h-8 w-8 shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:n("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5","aria-hidden":"true",className:`transition-transform ${o?"rotate-180":""}`,children:n("path",{d:"m3 5 4 4 4-4"})})});return c?i.scope(p("div",{ref:f,className:i.className||void 0,...i.attrs,children:[p("div",{className:"flex min-h-11 items-center justify-between gap-3",children:[d?n(l,{href:s.href,onClick:a,className:"min-w-0 flex-1 font-display text-3xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:s.label}):n("span",{className:"min-w-0 flex-1 font-display text-3xl",children:s.label}),x]}),o?n("div",{id:u,className:"mt-3 flex flex-col border-l border-line pl-5",children:s.dropdownItems.map((e,r)=>h(e.href)?n("span",{className:"flex min-h-11 items-center text-base opacity-80",children:e.label},`${e.href}-${r}`):n(l,{href:e.href,onClick:a,className:"flex min-h-11 items-center text-base opacity-80 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:e.label},`${e.href}-${r}`))}):null]})):i.scope(p("div",{ref:f,className:m("relative flex items-center whitespace-nowrap",i.className),...i.attrs,onMouseEnter:()=>t(!0),onMouseLeave:()=>t(!1),onBlurCapture:e=>{e.currentTarget.contains(e.relatedTarget)||t(!1)},onKeyDown:e=>{e.key==="Escape"&&(t(!1),v.current?.focus())},children:[d?n(l,{href:s.href,onClick:a,onFocus:()=>t(!0),className:"opacity-80 transition-opacity hover:opacity-100 focus-visible:rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:s.label}):n("span",{className:"opacity-80",children:s.label}),x,o?n("div",{id:u,className:`absolute top-full z-[60] w-72 pt-3 text-fg ${b==="end"?"right-0":b==="center"?"left-1/2 -translate-x-1/2":"left-0"}`,children:n("div",{className:"overflow-hidden rounded-lg border border-line bg-bg p-2 shadow-xl",children:s.dropdownItems.map((e,r)=>h(e.href)?n("span",{className:"flex min-h-11 items-center rounded-md px-4 py-2 text-sm opacity-80",children:e.label},`${e.href}-${r}`):n(l,{href:e.href,onClick:a,className:"flex min-h-11 items-center rounded-md px-4 py-2 text-sm opacity-80 transition-[background,opacity] hover:bg-[var(--card-bg)] hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:e.label},`${e.href}-${r}`))})}):null]}))}export{L as default};
@@ -1 +1 @@
1
- "use client";import{jsx as o}from"react/jsx-runtime";import{useCart as u}from"./CartContext.js";import c,{useCountrySelectShows as i}from"./CountrySelect.js";import{AccountButton as a,CartButton as m,SearchButton as h}from"./HeaderTools.js";import f from"./ThemeToggle.js";import{useOfferToPhoneMenu as r}from"efficient-web-builder/render/components/PhoneMenuTools";import{useSearch as p}from"./SearchContext.js";import{useSiteSells as l,useSiteThemeSwitchShown as x}from"./SiteRecordContext.js";function N({style:t="icon",editing:e=!1}){const{open:s}=p(),n=l();return r(n?"search":null),n?o("span",{"data-phone-menu-tool":"search",className:"contents",children:o(h,{onClick:e?void 0:s,asText:t==="text"})}):null}function j({style:t="icon",editing:e=!1}){const{open:s,totals:n}=u();return l()?o(m,{onClick:e?()=>{}:s,count:n.sets,asText:t==="text"}):null}function k({style:t="icon"}){const e=l();return r(e?"account":null),e?o(a,{asText:t==="text"}):null}function M(){const t=x();return r(t?"theme":null),t?o("span",{"data-phone-menu-tool":"theme",className:"contents",children:o(f,{})}):null}function O({showAs:t}){const e=i();return r(e?"region":null),e?o("span",{"data-phone-menu-tool":"region",className:"contents",children:o(c,{showAs:t})}):null}export{k as AccountTool,j as CartTool,O as CountrySwitchTool,N as SearchTool,M as ThemeSwitchTool};
1
+ "use client";import{jsx as o}from"react/jsx-runtime";import{useCart as c}from"./CartContext.js";import i,{useCountrySelectShows as a}from"./CountrySelect.js";import{AccountButton as m,CartButton as h,SearchButton as f}from"./HeaderTools.js";import p from"./ThemeToggle.js";import{useOfferToPhoneMenu as r}from"efficient-web-builder/render/components/PhoneMenuTools";import{useSearch as T}from"./SearchContext.js";import{useSiteSells as l,useSiteThemeSwitchShown as x}from"./SiteRecordContext.js";import{HideTaker as u}from"efficient-web-builder/render/components/ViewHideRoot";function N({style:e="icon",editing:t=!1}){const{open:s}=T(),n=l();return r(n?"search":null),n?o(u,{as:"span","data-phone-menu-tool":"search",className:"contents",children:o(f,{onClick:t?void 0:s,asText:e==="text"})}):null}function j({style:e="icon",editing:t=!1}){const{open:s,totals:n}=c();return l()?o(h,{onClick:t?()=>{}:s,count:n.sets,asText:e==="text",takesViewHide:!0}):null}function V({style:e="icon"}){const t=l();return r(t?"account":null),t?o(m,{asText:e==="text",takesViewHide:!0}):null}function M(){const e=x();return r(e?"theme":null),e?o(u,{as:"span","data-phone-menu-tool":"theme",className:"contents",children:o(p,{})}):null}function O({showAs:e}){const t=a();return r(t?"region":null),t?o(u,{as:"span","data-phone-menu-tool":"region",className:"contents",children:o(i,{showAs:e})}):null}export{V as AccountTool,j as CartTool,O as CountrySwitchTool,N as SearchTool,M as ThemeSwitchTool};
@@ -4,16 +4,18 @@ export declare const UTIL_WORDS: {
4
4
  readonly cart: "Bag";
5
5
  };
6
6
  export declare const UTIL_WORD_CLASS = "whitespace-nowrap";
7
- export declare function CartButton({ onClick, count, asText, className, }: {
7
+ export declare function CartButton({ onClick, count, asText, className, takesViewHide, }: {
8
8
  onClick: () => void;
9
9
  count: number;
10
10
  asText?: boolean;
11
11
  className?: string;
12
+ takesViewHide?: boolean;
12
13
  }): import("react").JSX.Element;
13
- export declare function AccountButton({ asText, className }: {
14
+ export declare function AccountButton({ asText, className, takesViewHide, }: {
14
15
  asText?: boolean;
15
16
  className?: string;
16
- }): import("react").JSX.Element;
17
+ takesViewHide?: boolean;
18
+ }): import("react").ReactNode;
17
19
  export declare function SearchButton({ onClick, asText, className, }: {
18
20
  onClick?: () => void;
19
21
  asText?: boolean;
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as i}from"react/jsx-runtime";import d from"next/link";import{useEffect as p,useRef as l}from"react";import{CART_GLYPH as h}from"efficient-web-builder/render/components/cartGlyph";import m from"efficient-easel/screen/components/UiIcon";import{prefersReducedMotion as f}from"efficient-web-builder/render/components/useReducedMotion";const a={search:"Search",account:"Account",cart:"Bag"},o="whitespace-nowrap";function x(t){return t>99?"99+":String(t)}function b({count:t,ref:e}){return r("span",{ref:e,"data-cart-badge":"","aria-hidden":"true",className:"pointer-events-none absolute -top-[7px] -right-[9px] inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-current px-1 text-[10px] leading-none font-semibold tabular-nums",style:{letterSpacing:0},children:r("span",{style:{color:"var(--sf-header-ground, var(--bg))"},children:x(t)})})}function S({onClick:t,count:e,asText:n,className:u}){const c=l(null),s=l(e);return p(()=>{s.current!==e&&(s.current=e,!f()&&c.current?.animate([{transform:"scale(0.6)"},{transform:"scale(1)"}],{duration:180,easing:"ease-out"}))},[e]),r("button",{type:"button",onClick:t,"aria-label":`Open cart, ${e} item${e===1?"":"s"}`,className:`mono-eyebrow-ctl inline-flex items-center gap-2 opacity-80 transition-opacity hover:opacity-100 ${u??""}`,children:n?i("span",{className:o,children:[a.cart,e>0?` ${e}`:""]}):i("span",{className:"relative inline-flex",children:[r("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:h}),e>0?r(b,{count:e,ref:c}):null]})})}function C({asText:t,className:e}){return r(d,{href:"/account","aria-label":"Account",className:`mono-eyebrow-ctl inline-flex items-center opacity-80 transition-opacity hover:opacity-100 ${e??""}`,children:t?r("span",{className:o,children:a.account}):i("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[r("circle",{cx:"12",cy:"8",r:"3.4"}),r("path",{d:"M5 20a7 7 0 0 1 14 0"})]})})}function N({onClick:t,asText:e,className:n}){return r("button",{type:"button",onClick:t,"aria-label":"Search",title:"Search (⌘K)",className:`mono-eyebrow-ctl inline-flex items-center opacity-80 transition-opacity hover:opacity-100 ${n??""}`,children:e?r("span",{className:o,children:a.search}):r(m,{name:"search",size:18,strokeWidth:1.6,rounded:!0})})}export{C as AccountButton,S as CartButton,N as SearchButton,a as UTIL_WORDS,o as UTIL_WORD_CLASS};
1
+ "use client";import{jsx as t,jsxs as o}from"react/jsx-runtime";import p from"next/link";import{useEffect as h,useRef as d}from"react";import{CART_GLYPH as m}from"efficient-web-builder/render/components/cartGlyph";import f from"efficient-easel/screen/components/UiIcon";import{prefersReducedMotion as x}from"efficient-web-builder/render/components/useReducedMotion";import{HideTaker as b,NO_HIDE as g,useTakeViewHide as y,withViewHide as k}from"efficient-web-builder/render/components/ViewHideRoot";const s={search:"Search",account:"Account",cart:"Bag"},c="whitespace-nowrap";function w(r){return r>99?"99+":String(r)}function v({count:r,ref:e}){return t("span",{ref:e,"data-cart-badge":"","aria-hidden":"true",className:"pointer-events-none absolute -top-[7px] -right-[9px] inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-current px-1 text-[10px] leading-none font-semibold tabular-nums",style:{letterSpacing:0},children:t("span",{style:{color:"var(--sf-header-ground, var(--bg))"},children:w(r)})})}function R({onClick:r,count:e,asText:n,className:i,takesViewHide:a=!1}){const l=d(null),u=d(e);return h(()=>{u.current!==e&&(u.current=e,!x()&&l.current?.animate([{transform:"scale(0.6)"},{transform:"scale(1)"}],{duration:180,easing:"ease-out"}))},[e]),t(b,{as:"button",takes:a,type:"button",onClick:r,"aria-label":`Open cart, ${e} item${e===1?"":"s"}`,className:`mono-eyebrow-ctl inline-flex items-center gap-2 opacity-80 transition-opacity hover:opacity-100 ${i??""}`,children:n?o("span",{className:c,children:[s.cart,e>0?` ${e}`:""]}):o("span",{className:"relative inline-flex",children:[t("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:m}),e>0?t(v,{count:e,ref:l}):null]})})}function $({asText:r,className:e,takesViewHide:n=!1}){const i=y(),a=n?i:g;return a.scope(t(p,{href:"/account","aria-label":"Account",className:k(`mono-eyebrow-ctl inline-flex items-center opacity-80 transition-opacity hover:opacity-100 ${e??""}`,a.className),...a.attrs,children:r?t("span",{className:c,children:s.account}):o("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t("circle",{cx:"12",cy:"8",r:"3.4"}),t("path",{d:"M5 20a7 7 0 0 1 14 0"})]})}))}function A({onClick:r,asText:e,className:n}){return t("button",{type:"button",onClick:r,"aria-label":"Search",title:"Search (⌘K)",className:`mono-eyebrow-ctl inline-flex items-center opacity-80 transition-opacity hover:opacity-100 ${n??""}`,children:e?t("span",{className:c,children:s.search}):t(f,{name:"search",size:18,strokeWidth:1.6,rounded:!0})})}export{$ as AccountButton,R as CartButton,A as SearchButton,s as UTIL_WORDS,c as UTIL_WORD_CLASS};
@@ -1 +1 @@
1
- "use client";import{jsx as e,Fragment as l,jsxs as n}from"react/jsx-runtime";import{readHidable as s}from"efficient-easel/screen/lib/document/hidable";import{useSiteCopyright as p}from"./SiteRecordContext.js";import{useConsentControls as c}from"./ConsentContext.js";import{CONSENT_TEXT_BUTTON as d}from"./ConsentBanner.js";function m({copyright:i}={}){const o=p(),r=s(i),a=r.hidden?null:r.text.trim()||o,t=c();return n("div",{className:"flex flex-wrap justify-between gap-x-6 gap-y-3 border-t border-line pt-6 font-mono text-[13px] uppercase tracking-[0.15em] text-fg-dim max-view-tablet:flex-col max-view-tablet:gap-3",children:[a!==null&&e("span",{children:a}),n("span",{className:"flex flex-wrap items-center gap-3 view-tablet:ml-auto",children:[e("span",{children:"Privacy"}),e("span",{"aria-hidden":!0,children:"·"}),e("span",{children:"Terms"}),e("span",{"aria-hidden":!0,children:"·"}),e("span",{children:"Cookies"}),t?.ready&&n(l,{children:[e("span",{"aria-hidden":!0,children:"·"}),e("button",{type:"button",className:`${d} text-left`,onClick:t.openPanel,children:t.rule.footerLink})]})]})]})}export{m as default};
1
+ "use client";import{jsx as e,Fragment as s,jsxs as r}from"react/jsx-runtime";import{readHidable as l}from"efficient-easel/screen/lib/document/hidable";import{useSiteCopyright as p}from"./SiteRecordContext.js";import{useConsentControls as c}from"./ConsentContext.js";import{CONSENT_TEXT_BUTTON as d}from"./ConsentBanner.js";import{HideTaker as m}from"efficient-web-builder/render/components/ViewHideRoot";function u({copyright:i}={}){const o=p(),n=l(i),a=n.hidden?null:n.text.trim()||o,t=c();return r(m,{as:"div",className:"flex flex-wrap justify-between gap-x-6 gap-y-3 border-t border-line pt-6 font-mono text-[13px] uppercase tracking-[0.15em] text-fg-dim max-view-tablet:flex-col max-view-tablet:gap-3",children:[a!==null&&e("span",{children:a}),r("span",{className:"flex flex-wrap items-center gap-3 view-tablet:ml-auto",children:[e("span",{children:"Privacy"}),e("span",{"aria-hidden":!0,children:"·"}),e("span",{children:"Terms"}),e("span",{"aria-hidden":!0,children:"·"}),e("span",{children:"Cookies"}),t?.ready&&r(s,{children:[e("span",{"aria-hidden":!0,children:"·"}),e("button",{type:"button",className:`${d} text-left`,onClick:t.openPanel,children:t.rule.footerLink})]})]})]})}export{u as default};
@@ -1 +1 @@
1
- "use client";import{jsx as n,jsxs as u}from"react/jsx-runtime";import{createContext as p,useContext as d}from"react";import b from"next/link";import h from"./HeaderNavItem.js";import x from"./MenuPlaceholderLabel.js";import{useCardRow as k}from"efficient-web-builder/render/components/CardRowContext";import{renderGold as o}from"efficient-web-builder/render/components/goldPhrases";import{isLabelOnlyMenuUrl as L,menuLinkKind as N}from"../lib/menu-link.js";import{CURRENT_LINE as s,TAB_CELLS as f}from"../lib/content/tab-strip.js";const w=p(null),m="opacity-80 transition-opacity hover:opacity-100";function i({item:e,label:l,link:r,onNavigate:t,current:c=!1,children:a}){return L(e.url)?n("span",{className:l,children:o(e.label)}):N(e.url)==="off-site"?u("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:r,onClick:t,children:[o(e.label),a]}):u(b,{href:e.url,className:r,onClick:t,"aria-current":c?"page":void 0,children:[o(e.label),a]})}function C(){const e=k(),l=d(w);if(!e||!l)return null;if(l.placeholder)return n(x,{});const r={label:e.row.label??"",url:e.row.href??""},t=!!l.current&&l.current.index===e.index&&l.current.href===r.url;if(l.place==="tab"){const a=f.tab(e.index===0,t);return n(i,{item:r,label:a,link:a,current:t,children:t?n("span",{className:f.underline}):null})}if(l.place==="column")return n(i,{item:r,label:"text-fg",link:"text-fg transition-colors hover:text-accent",current:t});if(l.place==="panel")return n(i,{item:r,label:"",link:` ${m}`,onNavigate:l.onNavigate,current:t});const c=e.item?.dropdown_items??[];return c.length?n(h,{item:{href:r.url,label:o(r.label),plainLabel:r.label,dropdownItems:c.map(a=>({href:a.url,label:o(a.label),plainLabel:a.label}))}}):t?n(i,{item:r,label:"",link:s.rowLink,current:!0,children:n("span",{"aria-hidden":"true",className:s.row})}):n(i,{item:r,label:"",link:` ${m}`})}export{w as MenuPlaceContext,C as default};
1
+ "use client";import{jsx as n,jsxs as m}from"react/jsx-runtime";import{createContext as b,useContext as h}from"react";import k from"next/link";import x from"./HeaderNavItem.js";import L from"./MenuPlaceholderLabel.js";import{useCardRow as N}from"efficient-web-builder/render/components/CardRowContext";import{renderGold as i}from"efficient-web-builder/render/components/goldPhrases";import{useTakeViewHide as w,withViewHide as u}from"efficient-web-builder/render/components/ViewHideRoot";import{isLabelOnlyMenuUrl as C,menuLinkKind as _}from"../lib/menu-link.js";import{CURRENT_LINE as f,TAB_CELLS as p}from"../lib/content/tab-strip.js";const g=b(null),d="opacity-80 transition-opacity hover:opacity-100";function c({item:e,label:l,link:r,onNavigate:t,current:s=!1,children:a}){const o=w();return C(e.url)?o.scope(n("span",{className:u(l,o.className),...o.attrs,children:i(e.label)})):o.scope(_(e.url)==="off-site"?m("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:u(r,o.className),onClick:t,...o.attrs,children:[i(e.label),a]}):m(k,{href:e.url,className:u(r,o.className),onClick:t,"aria-current":s?"page":void 0,...o.attrs,children:[i(e.label),a]}))}function y(){const e=N(),l=h(g);if(!e||!l)return null;if(l.placeholder)return n(L,{});const r={label:e.row.label??"",url:e.row.href??""},t=!!l.current&&l.current.index===e.index&&l.current.href===r.url;if(l.place==="tab"){const a=p.tab(e.index===0,t);return n(c,{item:r,label:a,link:a,current:t,children:t?n("span",{className:p.underline}):null})}if(l.place==="column")return n(c,{item:r,label:"text-fg",link:"text-fg transition-colors hover:text-accent",current:t});if(l.place==="panel")return n(c,{item:r,label:"",link:` ${d}`,onNavigate:l.onNavigate,current:t});const s=e.item?.dropdown_items??[];return s.length?n(x,{item:{href:r.url,label:i(r.label),plainLabel:r.label,dropdownItems:s.map(a=>({href:a.url,label:i(a.label),plainLabel:a.label}))}}):t?n(c,{item:r,label:"",link:f.rowLink,current:!0,children:n("span",{"aria-hidden":"true",className:f.row})}):n(c,{item:r,label:"",link:` ${d}`})}export{g as MenuPlaceContext,y as default};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{MENU_PLACEHOLDER_LABEL as o}from"../lib/content/menu-placeholder.js";import{say as a}from"efficient-web-builder/format/lib/editor-words";function e(){return r("span",{className:"opacity-50",children:a(o)})}export{e as default};
1
+ import{jsx as r}from"react/jsx-runtime";import{MENU_PLACEHOLDER_LABEL as o}from"../lib/content/menu-placeholder.js";import{say as a}from"efficient-web-builder/format/lib/editor-words";import{HideTaker as e}from"efficient-web-builder/render/components/ViewHideRoot";function m(){return r(e,{as:"span",className:"opacity-50",children:a(o)})}export{m as default};
@@ -2,7 +2,7 @@ import type { CSSProperties } from "react";
2
2
  import { type HeroView } from "./product-hero/hero-view.js";
3
3
  import type { StoreProduct } from "../lib/catalog/store-product.js";
4
4
  import { type HeroGalleryMode, type HeroImageFit } from "../lib/sections/hero-gallery.js";
5
- export default function ProductGallery({ product, view, angleIdx, onSelect, isLight, onLightbox, galleryMode, imageFit, style, }: {
5
+ export default function ProductGallery({ product, view, angleIdx, onSelect, isLight, onLightbox, galleryMode, imageFit, style, takesViewHide, }: {
6
6
  product: StoreProduct;
7
7
  view: HeroView;
8
8
  angleIdx: number;
@@ -12,4 +12,5 @@ export default function ProductGallery({ product, view, angleIdx, onSelect, isLi
12
12
  galleryMode?: HeroGalleryMode;
13
13
  imageFit?: HeroImageFit;
14
14
  style?: CSSProperties;
15
+ takesViewHide?: boolean;
15
16
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as s,Fragment as u}from"react/jsx-runtime";import{photoLabel as f}from"./product-hero/hero-view.js";import{stageControls as C,useHeldStagePhoto as H}from"./product-hero/stage-photo.js";import{DEFAULT_HERO_GALLERY_MODE as w,DEFAULT_HERO_IMAGE_FIT as L,parseHeroGalleryMode as M,parseHeroImageFit as S,resolveHeroImageFit as $}from"../lib/sections/hero-gallery.js";import{productHasComposedRender as F}from"../lib/wheels/set-mode.js";function k({product:a,view:e,angleIdx:r,onSelect:c,isLight:m,onLightbox:d,galleryMode:i=w,imageFit:h=L,style:l}){const o=M(i),p=$(S(h),F(a));return s("div",{"data-hero-gallery":o,"data-hero-fit":p,className:o==="tiled"?"flex items-start gap-3 max-view-tablet:gap-2":void 0,style:l,children:[t("div",{className:o==="tiled"?"min-w-0 flex-1":void 0,children:t(A,{name:a.name,view:e,angleIdx:r,onSelect:c,isLight:m,onLightbox:d,fit:p})}),o!=="main"&&t(E,{name:a.name,view:e,angleIdx:r,onSelect:c,isLight:m,tiled:o==="tiled"})]})}function y(a){return a.photos.length>0?a.photos.length:a.thumbFallbackCells}const z=6;function A({name:a,view:e,angleIdx:r,onSelect:c,isLight:m,onLightbox:d,fit:i}){const h=e.photos[Math.min(r,e.photos.length-1)],l=H(e.photos,h),o=y(e),p=o>=2,N=String(o).padStart(2,"0"),b=Math.min(r,Math.max(e.photos.length-1,0)),v=p||e.captions[b]?f(e,b):"",x=[a,e.metaValue,v].filter(Boolean).join(" — "),g="max-view-tablet:static",_=["relative flex aspect-square items-center justify-center overflow-hidden max-view-tablet:col-span-2",m?"bg-bg":""].join(" ");return s("div",{className:"relative max-view-tablet:grid max-view-tablet:grid-cols-[minmax(0,1fr)_auto] max-view-tablet:items-start max-view-tablet:gap-x-3 max-view-tablet:gap-y-2",style:{color:e.tint},children:[s("div",{className:`absolute left-0 top-0 z-10 flex items-center gap-3 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.2em] text-fg ${g} max-view-tablet:min-w-0 max-view-tablet:flex-wrap max-view-tablet:gap-x-2 max-view-tablet:gap-y-1`,children:[p&&s(u,{children:[s("span",{className:"text-accent",children:[String(r+1).padStart(2,"0")," / ",N]}),t("span",{className:"text-fg-dim",children:"·"})]}),t("span",{children:a}),e.metaValue&&s(u,{children:[t("span",{className:"text-fg-dim",children:"·"}),t("span",{className:"text-accent",children:e.metaValue})]})]}),p&&t("div",{className:`absolute right-5 top-5 z-10 flex gap-1 ${g}`,children:C(r,o,c).map(n=>t("button",{type:"button","aria-label":n.label,title:n.label,onClick:n.onClick,className:"flex h-7 w-7 items-center justify-center border border-fg-dim/60 text-fg transition-colors hover:border-accent hover:text-accent",children:n.glyph},n.label))}),s("div",{className:_,children:[["top-3 left-3","top-3 right-3","bottom-3 left-3","bottom-3 right-3"].map((n,j)=>t("span",{className:`absolute ${n} h-3 w-3 border border-fg-dim/40`,style:{borderTop:n.includes("top")?"1px solid var(--site-line)":"none",borderBottom:n.includes("bottom")?"1px solid var(--site-line)":"none",borderLeft:n.includes("left")?"1px solid var(--site-line)":"none",borderRight:n.includes("right")?"1px solid var(--site-line)":"none"}},j)),e.stageImage({photo:l,alt:x,label:`Open ${[a,e.metaValue].filter(Boolean).join(" ")} at full resolution`,onZoom:()=>d(l,x),fit:i})]}),s("div",{className:`absolute bottom-0 left-0 right-0 z-10 flex items-end justify-between gap-3 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim ${g} max-view-tablet:col-span-2 max-view-tablet:flex-wrap`,children:[s("span",{className:"flex min-w-0 flex-col gap-1",children:[e.specCaption&&t("span",{children:e.specCaption}),e.referenceNote&&t("span",{"data-hero-reference-note":!0,children:e.referenceNote}),e.galleryHint&&t("span",{"data-hero-gallery-hint":!0,children:e.galleryHint})]}),t("span",{children:e.originCaption})]})]})}function E({name:a,view:e,angleIdx:r,onSelect:c,isLight:m,tiled:d=!1}){const i=y(e);return i<2?null:t("div",{className:d?"order-[-1] flex w-16 flex-col gap-2 max-view-tablet:w-12 max-view-tablet:gap-1":"mt-2 grid grid-cols-4 gap-2 max-view-tablet:gap-1",style:!d&&i>4?{gridTemplateColumns:`repeat(${Math.min(i,z)}, minmax(0, 1fr))`}:void 0,children:Array.from({length:i}).map((h,l)=>{const o=e.photos[l];return s("button",{type:"button",onClick:()=>c(l),"aria-label":`View ${f(e,l)}`,"aria-pressed":l===r,className:["relative flex aspect-square items-center justify-center overflow-hidden transition-colors",m?"bg-bg":"",l===r?"border border-accent":"border border-transparent hover:border-fg-dim"].join(" "),style:{color:e.tint},children:[t("span",{className:"absolute top-1.5 left-2 z-10 font-mono text-[length:var(--size-label,8px)] uppercase tracking-[0.18em] text-fg-dim",children:String(l+1).padStart(2,"0")}),e.thumbImage({photo:o,alt:`${a} — ${f(e,l)}`})]},l)})})}export{k as default};
1
+ "use client";import{jsx as t,jsxs as n,Fragment as y}from"react/jsx-runtime";import{photoLabel as b}from"./product-hero/hero-view.js";import{stageControls as C,useHeldStagePhoto as H}from"./product-hero/stage-photo.js";import{DEFAULT_HERO_GALLERY_MODE as k,DEFAULT_HERO_IMAGE_FIT as w,parseHeroGalleryMode as L,parseHeroImageFit as M,resolveHeroImageFit as S}from"../lib/sections/hero-gallery.js";import{productHasComposedRender as $}from"../lib/wheels/set-mode.js";import{HideTaker as F}from"efficient-web-builder/render/components/ViewHideRoot";function T({product:a,view:e,angleIdx:r,onSelect:c,isLight:d,onLightbox:p,galleryMode:i=k,imageFit:h=w,style:l,takesViewHide:m=!1}){const s=L(i),f=S(M(h),$(a));return n(F,{as:"div",takes:m,"data-hero-gallery":s,"data-hero-fit":f,className:s==="tiled"?"flex items-start gap-3 max-view-tablet:gap-2":void 0,style:l,children:[t("div",{className:s==="tiled"?"min-w-0 flex-1":void 0,children:t(A,{name:a.name,view:e,angleIdx:r,onSelect:c,isLight:d,onLightbox:p,fit:f})}),s!=="main"&&t(E,{name:a.name,view:e,angleIdx:r,onSelect:c,isLight:d,tiled:s==="tiled"})]})}function N(a){return a.photos.length>0?a.photos.length:a.thumbFallbackCells}const z=6;function A({name:a,view:e,angleIdx:r,onSelect:c,isLight:d,onLightbox:p,fit:i}){const h=e.photos[Math.min(r,e.photos.length-1)],l=H(e.photos,h),m=N(e),s=m>=2,f=String(m).padStart(2,"0"),x=Math.min(r,Math.max(e.photos.length-1,0)),v=s||e.captions[x]?b(e,x):"",u=[a,e.metaValue,v].filter(Boolean).join(" — "),g="max-view-tablet:static",_=["relative flex aspect-square items-center justify-center overflow-hidden max-view-tablet:col-span-2",d?"bg-bg":""].join(" ");return n("div",{className:"relative max-view-tablet:grid max-view-tablet:grid-cols-[minmax(0,1fr)_auto] max-view-tablet:items-start max-view-tablet:gap-x-3 max-view-tablet:gap-y-2",style:{color:e.tint},children:[n("div",{className:`absolute left-0 top-0 z-10 flex items-center gap-3 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.2em] text-fg ${g} max-view-tablet:min-w-0 max-view-tablet:flex-wrap max-view-tablet:gap-x-2 max-view-tablet:gap-y-1`,children:[s&&n(y,{children:[n("span",{className:"text-accent",children:[String(r+1).padStart(2,"0")," / ",f]}),t("span",{className:"text-fg-dim",children:"·"})]}),t("span",{children:a}),e.metaValue&&n(y,{children:[t("span",{className:"text-fg-dim",children:"·"}),t("span",{className:"text-accent",children:e.metaValue})]})]}),s&&t("div",{className:`absolute right-5 top-5 z-10 flex gap-1 ${g}`,children:C(r,m,c).map(o=>t("button",{type:"button","aria-label":o.label,title:o.label,onClick:o.onClick,className:"flex h-7 w-7 items-center justify-center border border-fg-dim/60 text-fg transition-colors hover:border-accent hover:text-accent",children:o.glyph},o.label))}),n("div",{className:_,children:[["top-3 left-3","top-3 right-3","bottom-3 left-3","bottom-3 right-3"].map((o,j)=>t("span",{className:`absolute ${o} h-3 w-3 border border-fg-dim/40`,style:{borderTop:o.includes("top")?"1px solid var(--site-line)":"none",borderBottom:o.includes("bottom")?"1px solid var(--site-line)":"none",borderLeft:o.includes("left")?"1px solid var(--site-line)":"none",borderRight:o.includes("right")?"1px solid var(--site-line)":"none"}},j)),e.stageImage({photo:l,alt:u,label:`Open ${[a,e.metaValue].filter(Boolean).join(" ")} at full resolution`,onZoom:()=>p(l,u),fit:i})]}),n("div",{className:`absolute bottom-0 left-0 right-0 z-10 flex items-end justify-between gap-3 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim ${g} max-view-tablet:col-span-2 max-view-tablet:flex-wrap`,children:[n("span",{className:"flex min-w-0 flex-col gap-1",children:[e.specCaption&&t("span",{children:e.specCaption}),e.referenceNote&&t("span",{"data-hero-reference-note":!0,children:e.referenceNote}),e.galleryHint&&t("span",{"data-hero-gallery-hint":!0,children:e.galleryHint})]}),t("span",{children:e.originCaption})]})]})}function E({name:a,view:e,angleIdx:r,onSelect:c,isLight:d,tiled:p=!1}){const i=N(e);return i<2?null:t("div",{className:p?"order-[-1] flex w-16 flex-col gap-2 max-view-tablet:w-12 max-view-tablet:gap-1":"mt-2 grid grid-cols-4 gap-2 max-view-tablet:gap-1",style:!p&&i>4?{gridTemplateColumns:`repeat(${Math.min(i,z)}, minmax(0, 1fr))`}:void 0,children:Array.from({length:i}).map((h,l)=>{const m=e.photos[l];return n("button",{type:"button",onClick:()=>c(l),"aria-label":`View ${b(e,l)}`,"aria-pressed":l===r,className:["relative flex aspect-square items-center justify-center overflow-hidden transition-colors",d?"bg-bg":"",l===r?"border border-accent":"border border-transparent hover:border-fg-dim"].join(" "),style:{color:e.tint},children:[t("span",{className:"absolute top-1.5 left-2 z-10 font-mono text-[length:var(--size-label,8px)] uppercase tracking-[0.18em] text-fg-dim",children:String(l+1).padStart(2,"0")}),e.thumbImage({photo:m,alt:`${a} — ${b(e,l)}`})]},l)})})}export{T as default};
@@ -1 +1 @@
1
- "use client";import{jsx as d}from"react/jsx-runtime";import{createContext as P,useContext as b,useEffect as p,useId as B,useMemo as v,useState as x}from"react";import{GridCards as k}from"./GridCardTemplate.js";import{useCatalogFilter as z}from"./catalog/CatalogFilterContext.js";import{loadProductCatalog as F}from"./useProductCatalog.js";import{itemKind as h}from"../lib/catalog/plp-item.js";import{applyCatalogFilters as S}from"../lib/wheels/catalog-filters.js";import{finishFamiliesOf as j}from"../lib/wheels/finish-defaults.js";import{lugCountsOf as L}from"../lib/wheels/lug-count.js";import{diametersOf as N}from"../lib/wheels/size-range.js";import{say as C}from"efficient-web-builder/format/lib/editor-words";const g=P({wheels:[],loading:!1,live:!1,obeysBar:!1,currency:""});function O(e,r,t,n,a){return h(e)==="tyre"?!0:S([y(e,r)],{...t,process:null},n,a).length>0}function y(e,r){const t=r?e.finishes?.find(n=>n.name===r):void 0;return t?{...e,finishes:[t]}:e}function M(e,r){return e.find(t=>t.designCode===r)??e.find(t=>t.slug===r)}function Q({wheels:e,currency:r="",children:t}){return d(g.Provider,{value:{wheels:e??[],loading:!1,live:!0,obeysBar:!0,currency:r},children:t})}function T({currency:e="",children:r}){const[t,n]=x([]),[a,i]=x(!0);return p(()=>{let o=!1;return F().then(l=>{o||(n(l),i(!1))}).catch(()=>{o||i(!1)}),()=>{o=!0}},[]),d(g.Provider,{value:{wheels:t,loading:a,live:!1,obeysBar:!0,currency:e},children:r})}function W({code:e,finish:r,wheel:t}){const{wheels:n,loading:a,live:i,obeysBar:o,currency:l}=b(g),u=t??(e?M(n,e):void 0),s=$(o?u:void 0,r,l);if(u){const c=d(k,{wheels:[u],finishes:[r],children:f=>f},`${u.slug}:${r??""}`);return s?c:i?null:d("div",{"data-bar-hidden":"",className:"opacity-40",children:c})}return i?null:d("div",{className:"sf-card flex aspect-square w-full items-center justify-center bg-surface-2 p-4 text-center",children:d("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:a?C("Loading…"):e||C("Set a design code")})})}function $(e,r,t){const{filters:n,vehicle:a,reportCount:i,reportSizes:o,reportLugs:l,reportFinishes:u}=z(),s=B(),c=v(()=>!e||O(e,r,n,t,a.fit),[e,r,n,t,a.fit]);p(()=>{if(e)return i(s,c?1:0),()=>i(s,0)},[e,c,i,s]);const f=v(()=>{if(!e||h(e)==="tyre")return null;const m=y(e,r);return{sizes:N([m]),lugs:L([m]),finishes:j([m])}},[e,r]);return p(()=>{if(f)return o(s,f.sizes),l(s,f.lugs),u(s,f.finishes),()=>{o(s,[]),l(s,[]),u(s,[])}},[f,o,l,u,s]),c}export{T as ProductCatalogProvider,Q as SectionWheelsProvider,W as default,O as handPickedMatchesBar,M as wheelForCode};
1
+ "use client";import{jsx as d}from"react/jsx-runtime";import{createContext as b,useContext as B,useEffect as p,useId as k,useMemo as v,useState as x}from"react";import{GridCards as z}from"./GridCardTemplate.js";import{useCatalogFilter as F}from"./catalog/CatalogFilterContext.js";import{loadProductCatalog as S}from"./useProductCatalog.js";import{itemKind as h}from"../lib/catalog/plp-item.js";import{applyCatalogFilters as j}from"../lib/wheels/catalog-filters.js";import{finishFamiliesOf as L}from"../lib/wheels/finish-defaults.js";import{lugCountsOf as N}from"../lib/wheels/lug-count.js";import{diametersOf as O}from"../lib/wheels/size-range.js";import{say as C}from"efficient-web-builder/format/lib/editor-words";import{HideTaker as y}from"efficient-web-builder/render/components/ViewHideRoot";const g=b({wheels:[],loading:!1,live:!1,obeysBar:!1,currency:""});function M(e,r,t,n,a){return h(e)==="tyre"?!0:j([P(e,r)],{...t,process:null},n,a).length>0}function P(e,r){const t=r?e.finishes?.find(n=>n.name===r):void 0;return t?{...e,finishes:[t]}:e}function W(e,r){return e.find(t=>t.designCode===r)??e.find(t=>t.slug===r)}function U({wheels:e,currency:r="",children:t}){return d(g.Provider,{value:{wheels:e??[],loading:!1,live:!0,obeysBar:!0,currency:r},children:t})}function V({currency:e="",children:r}){const[t,n]=x([]),[a,i]=x(!0);return p(()=>{let o=!1;return S().then(l=>{o||(n(l),i(!1))}).catch(()=>{o||i(!1)}),()=>{o=!0}},[]),d(g.Provider,{value:{wheels:t,loading:a,live:!1,obeysBar:!0,currency:e},children:r})}function $({code:e,finish:r,wheel:t}){const{wheels:n,loading:a,live:i,obeysBar:o,currency:l}=B(g),u=t??(e?W(n,e):void 0),s=q(o?u:void 0,r,l);if(u){const c=d(z,{wheels:[u],finishes:[r],children:f=>f},`${u.slug}:${r??""}`);return s?c:i?null:d(y,{as:"div","data-bar-hidden":"",className:"opacity-40",children:c})}return i?null:d(y,{as:"div",className:"sf-card flex aspect-square w-full items-center justify-center bg-surface-2 p-4 text-center",children:d("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:a?C("Loading…"):e||C("Set a design code")})})}function q(e,r,t){const{filters:n,vehicle:a,reportCount:i,reportSizes:o,reportLugs:l,reportFinishes:u}=F(),s=k(),c=v(()=>!e||M(e,r,n,t,a.fit),[e,r,n,t,a.fit]);p(()=>{if(e)return i(s,c?1:0),()=>i(s,0)},[e,c,i,s]);const f=v(()=>{if(!e||h(e)==="tyre")return null;const m=P(e,r);return{sizes:O([m]),lugs:N([m]),finishes:L([m])}},[e,r]);return p(()=>{if(f)return o(s,f.sizes),l(s,f.lugs),u(s,f.finishes),()=>{o(s,[]),l(s,[]),u(s,[])}},[f,o,l,u,s]),c}export{V as ProductCatalogProvider,U as SectionWheelsProvider,$ as default,M as handPickedMatchesBar,W as wheelForCode};
@@ -1 +1 @@
1
- "use client";import{jsx as r}from"react/jsx-runtime";import{Render as a}from"efficient-easel/render";import{renderConfig as d}from"../lib/document/render-config.js";import{migrateRenamedProps as u}from"efficient-web-builder/format/lib/document/renamed-props";import{SITE_FOOTER_KIND as f}from"efficient-web-builder/format/lib/content/footer";import{PublishedFooterContext as p}from"efficient-web-builder/render/components/PublishedFooterContext";import{EMPTY_SOCIAL_LINKS as g}from"efficient-web-builder/format/lib/content/social-links";function I({footerBlock:l,rootProps:e,headerSettings:o,siteName:n,legalName:t,foundedYear:i,socialLinks:m}){const s=u({root:{props:{...e??{},kind:f}},content:[l],zones:{}});return r(p.Provider,{value:{logoUrl:o?.logoUrl??null,logoReversed:o?.logoReversed??null,logoInkIsDark:o?.logoInkIsDark??null,siteName:n,legalName:t??null,foundedYear:i??null,socialLinks:m??g},children:r(a,{config:d(),data:s})})}export{I as default};
1
+ "use client";import{jsx as r}from"react/jsx-runtime";import{Render as s}from"efficient-easel/render";import{renderConfig as d}from"../lib/document/render-config.js";import{migrateRenamedProps as p}from"efficient-web-builder/format/lib/document/renamed-props";import{dropEmptySourcedBoxes as f}from"efficient-web-builder/render/lib/document/head-core-boxes";import{markWallLabels as u}from"efficient-web-builder/render/lib/document/wall-labels";import{SITE_FOOTER_KIND as c}from"efficient-web-builder/format/lib/content/footer";import{PublishedFooterContext as g}from"efficient-web-builder/render/components/PublishedFooterContext";import{EMPTY_SOCIAL_LINKS as I}from"efficient-web-builder/format/lib/content/social-links";function k({footerBlock:l,rootProps:e,headerSettings:o,siteName:m,legalName:n,foundedYear:t,socialLinks:i}){const a=u(f(p({root:{props:{...e??{},kind:c}},content:[l],zones:{}})));return r(g.Provider,{value:{logoUrl:o?.logoUrl??null,logoReversed:o?.logoReversed??null,logoInkIsDark:o?.logoInkIsDark??null,siteName:m,legalName:n??null,foundedYear:t??null,socialLinks:i??I},children:r(s,{config:d(),data:a})})}export{k as default};
@@ -1,4 +1,5 @@
1
1
  export declare const QUOTE_HREF = "/contact";
2
- export default function QuoteLink({ className }: {
2
+ export default function QuoteLink({ className, attrs, }: {
3
3
  className: string;
4
+ attrs?: Record<string, string>;
4
5
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import t from"next/link";import{SET_QUOTE_LABEL as e}from"../lib/wheels/price-display.js";const n="/contact";function i({className:o}){return r(t,{href:n,className:o,children:e})}export{n as QUOTE_HREF,i as default};
1
+ import{jsx as t}from"react/jsx-runtime";import e from"next/link";import{SET_QUOTE_LABEL as n}from"../lib/wheels/price-display.js";const i="/contact";function m({className:o,attrs:r}){return t(e,{href:i,className:o,...r,children:n})}export{i as QUOTE_HREF,m as default};
@@ -1 +1 @@
1
- import{jsx as n}from"react/jsx-runtime";const o={body:"text-[length:var(--size-body,17px)]"},t=5;function s({rating:r}){const a=Math.min(t,Math.max(0,Math.round(r)));return n("div",{role:"img","aria-label":`${a} out of ${t} stars`,className:`flex gap-1 ${o.body} leading-none`,children:Array.from({length:t}).map((i,e)=>n("span",{"aria-hidden":!0,className:e<a?"text-accent":"text-fg-dim/30",children:"★"},e))})}export{t as RATING_STARS,s as default};
1
+ import{jsx as r}from"react/jsx-runtime";import{HideTaker as o}from"efficient-web-builder/render/components/ViewHideRoot";const i={body:"text-[length:var(--size-body,17px)]"},t=5;function s({rating:n}){const a=Math.min(t,Math.max(0,Math.round(n)));return r(o,{role:"img","aria-label":`${a} out of ${t} stars`,className:`flex gap-1 ${i.body} leading-none`,children:Array.from({length:t}).map((l,e)=>r("span",{"aria-hidden":!0,className:e<a?"text-accent":"text-fg-dim/30",children:"★"},e))})}export{t as RATING_STARS,s as default};
@@ -1 +1 @@
1
- "use client";import{jsx as e,Fragment as _,jsxs as r}from"react/jsx-runtime";import{useState as a}from"react";import{products as k}from"../lib/api/index.js";import j from"efficient-web-builder/render/components/SectionEyebrow";import n,{FieldCaption as q}from"./WebFormField.js";import{renderHeadline as z}from"efficient-web-builder/render/components/goldPhrases";import{FIELD_INPUT_CLASS as l}from"../lib/field-input.js";const A="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] py-[84px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",I="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-0 pb-[84px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]";function M({eyebrow:u,title:p,designCode:x,omitHead:d=!1,editing:g=!1}={}){const[f,w]=a(""),[o,N]=a(""),[i,y]=a(0),[m,S]=a(""),[h,F]=a(""),[c,v]=a(!1),[R,C]=a(!1),[b,s]=a(null);async function E(t){if(t.preventDefault(),!(g||c)){if(i<1){s("Choose a star rating.");return}v(!0),s(null);try{await k.submitReview({authorName:f.trim(),...o.trim()?{email:o.trim()}:{},rating:i,...m.trim()?{title:m.trim()}:{},body:h.trim(),...x?.trim()?{designCode:x.trim()}:{}}),C(!0)}catch{s("Something went wrong — your review wasn't sent. Please try again.")}finally{v(!1)}}}return e("section",{className:"relative z-[2] border-t border-line bg-surface",children:r("div",{className:d?I:A,children:[d?null:r(_,{children:[(u??"").trim()&&e(j,{text:u??"",scaled:!1,className:"mb-4 block"}),(p??"").trim()&&e("h2",{className:"mb-12 font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.02em] text-fg max-view-wide:mb-8 max-view-wide:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:z(p??"",!1)})]}),R?e("p",{role:"status",className:"max-w-[560px] font-serif text-[19px] italic leading-[1.6] text-fg-dim",children:"Thanks — your review will appear once approved."}):r("form",{className:"flex max-w-[720px] flex-col gap-5",onSubmit:E,children:[r("div",{className:"grid grid-cols-2 gap-3 max-[640px]:grid-cols-1",children:[e(n,{label:"Name",required:!0,children:e("input",{type:"text",required:!0,value:f,onChange:t=>w(t.target.value),className:l})}),e(n,{label:"Email — never shown publicly",children:e("input",{type:"email",value:o,onChange:t=>N(t.target.value),className:l})})]}),r("div",{className:"flex flex-col gap-2",children:[e(q,{required:!0,children:"Rating"}),e("div",{role:"group","aria-label":"Rating",className:"flex gap-1",children:[1,2,3,4,5].map(t=>e("button",{type:"button","aria-pressed":i>=t,"aria-label":`${t} star${t===1?"":"s"}`,onClick:()=>{y(t),s(null)},className:["cursor-pointer text-[30px] leading-none transition-colors",i>=t?"text-accent":"text-fg-dim/30 hover:text-fg-dim"].join(" "),children:"★"},t))})]}),e(n,{label:"Review title (optional)",children:e("input",{type:"text",value:m,onChange:t=>S(t.target.value),className:l})}),e(n,{label:"Your review",required:!0,children:e("textarea",{required:!0,rows:5,value:h,onChange:t=>F(t.target.value),className:l+" resize-y"})}),b&&e("p",{role:"alert",className:"font-mono text-[12px] uppercase tracking-[0.18em] text-alert",children:b}),e("button",{type:g?"button":"submit",disabled:c,className:"cursor-pointer self-start bg-btn px-8 py-4 font-mono text-[14px] uppercase tracking-[0.32em] text-btn-ink transition-colors hover:bg-fg hover:text-bg disabled:cursor-wait disabled:opacity-60",children:c?"Sending…":"Submit review →"})]})]})})}export{M as default};
1
+ "use client";import{jsx as e,Fragment as E,jsxs as r}from"react/jsx-runtime";import{useState as a}from"react";import{products as _}from"../lib/api/index.js";import j from"efficient-web-builder/render/components/SectionEyebrow";import n,{FieldCaption as q}from"./WebFormField.js";import{renderHeadline as T}from"efficient-web-builder/render/components/goldPhrases";import{FIELD_INPUT_CLASS as l}from"../lib/field-input.js";import{HideTaker as z}from"efficient-web-builder/render/components/ViewHideRoot";const A="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] py-[84px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",I="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-0 pb-[84px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]";function M({eyebrow:p,title:u,designCode:d,omitHead:x=!1,editing:g=!1}={}){const[f,w]=a(""),[o,N]=a(""),[i,y]=a(0),[m,S]=a(""),[h,F]=a(""),[c,v]=a(!1),[R,k]=a(!1),[b,s]=a(null);async function C(t){if(t.preventDefault(),!(g||c)){if(i<1){s("Choose a star rating.");return}v(!0),s(null);try{await _.submitReview({authorName:f.trim(),...o.trim()?{email:o.trim()}:{},rating:i,...m.trim()?{title:m.trim()}:{},body:h.trim(),...d?.trim()?{designCode:d.trim()}:{}}),k(!0)}catch{s("Something went wrong — your review wasn't sent. Please try again.")}finally{v(!1)}}}return e(z,{as:"section",className:"relative z-[2] border-t border-line bg-surface",children:r("div",{className:x?I:A,children:[x?null:r(E,{children:[(p??"").trim()&&e(j,{text:p??"",scaled:!1,className:"mb-4 block"}),(u??"").trim()&&e("h2",{className:"mb-12 font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.02em] text-fg max-view-wide:mb-8 max-view-wide:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:T(u??"",!1)})]}),R?e("p",{role:"status",className:"max-w-[560px] font-serif text-[19px] italic leading-[1.6] text-fg-dim",children:"Thanks — your review will appear once approved."}):r("form",{className:"flex max-w-[720px] flex-col gap-5",onSubmit:C,children:[r("div",{className:"grid grid-cols-2 gap-3 max-[640px]:grid-cols-1",children:[e(n,{label:"Name",required:!0,children:e("input",{type:"text",required:!0,value:f,onChange:t=>w(t.target.value),className:l})}),e(n,{label:"Email — never shown publicly",children:e("input",{type:"email",value:o,onChange:t=>N(t.target.value),className:l})})]}),r("div",{className:"flex flex-col gap-2",children:[e(q,{required:!0,children:"Rating"}),e("div",{role:"group","aria-label":"Rating",className:"flex gap-1",children:[1,2,3,4,5].map(t=>e("button",{type:"button","aria-pressed":i>=t,"aria-label":`${t} star${t===1?"":"s"}`,onClick:()=>{y(t),s(null)},className:["cursor-pointer text-[30px] leading-none transition-colors",i>=t?"text-accent":"text-fg-dim/30 hover:text-fg-dim"].join(" "),children:"★"},t))})]}),e(n,{label:"Review title (optional)",children:e("input",{type:"text",value:m,onChange:t=>S(t.target.value),className:l})}),e(n,{label:"Your review",required:!0,children:e("textarea",{required:!0,rows:5,value:h,onChange:t=>F(t.target.value),className:l+" resize-y"})}),b&&e("p",{role:"alert",className:"font-mono text-[12px] uppercase tracking-[0.18em] text-alert",children:b}),e("button",{type:g?"button":"submit",disabled:c,className:"cursor-pointer self-start bg-btn px-8 py-4 font-mono text-[14px] uppercase tracking-[0.32em] text-btn-ink transition-colors hover:bg-fg hover:text-bg disabled:cursor-wait disabled:opacity-60",children:c?"Sending…":"Submit review →"})]})]})})}export{M as default};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{EDITORIAL_COLUMN as C}from"efficient-web-builder/format/lib/content/page-width";import{BAND_CAP as N,bandClassesInBox as f}from"../lib/sections/section-band.js";import _ from"./SectionBandChoice.js";import{BAND_CAP as y}from"../lib/sections/section-band.js";function u({className:t,capped:p=!1,column:n=C,style:i,defaults:s,id:a,attrs:r,rootRef:c,inAnyBox:l=!1,children:e}){const m=f(t),d=n===null?"":f(n),x=o("section",{ref:c,...r,className:m||void 0,style:i,id:a,children:d?o("div",{className:d,children:e}):e}),B=s?{...s,...i}:i,A=o("section",{ref:c,...r,className:p?`${N} ${t}`:t,style:B,id:a,children:n===null?e:o("div",{className:n,children:e})});return o(_,{inBox:x,atTop:A,anyBox:l})}export{y as BAND_CAP,u as default};
1
+ import{jsx as o}from"react/jsx-runtime";import{EDITORIAL_COLUMN as N}from"efficient-web-builder/format/lib/content/page-width";import{BAND_CAP as T,bandClassesInBox as f}from"../lib/sections/section-band.js";import _ from"./SectionBandChoice.js";import{HideTaker as m}from"efficient-web-builder/render/components/ViewHideRoot";import{BAND_CAP as L}from"../lib/sections/section-band.js";function u({className:i,capped:p=!1,column:n=N,style:s,defaults:t,id:a,attrs:r,rootRef:c,inAnyBox:l=!1,children:e}){const x=f(i),d=n===null?"":f(n),B=o(m,{as:"section",ref:c,...r,className:x||void 0,style:s,id:a,children:d?o("div",{className:d,children:e}):e}),A=t?{...t,...s}:s,C=o(m,{as:"section",ref:c,...r,className:p?`${T} ${i}`:i,style:A,id:a,children:n===null?e:o("div",{className:n,children:e})});return o(_,{inBox:B,atTop:C,anyBox:l})}export{L as BAND_CAP,u as default};
@@ -1,5 +1,6 @@
1
- export default function SectionFootnote({ text, linkText, linkHref, }: {
1
+ export default function SectionFootnote({ text, linkText, linkHref, viewHide, }: {
2
2
  text?: string;
3
3
  linkText?: string;
4
4
  linkHref?: string;
5
+ viewHide?: string;
5
6
  }): import("react").JSX.Element | null;
@@ -1 +1 @@
1
- import{jsxs as e}from"react/jsx-runtime";import m from"next/link";import{renderGold as l}from"efficient-web-builder/render/components/goldPhrases";function a({text:t,linkText:i,linkHref:s}){const r=(i??"").trim(),o=(s??"").trim(),n=!!r&&!!o;return!t&&!n?null:e("p",{className:"mt-5 font-mono text-[length:var(--size-label,13px)] tracking-[0.06em] text-fg-dim",children:[t?l(t):null,t&&n?" ":null,n&&e(m,{href:o,className:"text-accent transition-colors hover:text-fg",children:[l(r)," →"]})]})}export{a as default};
1
+ import{jsxs as n}from"react/jsx-runtime";import a from"next/link";import{renderGold as i}from"efficient-web-builder/render/components/goldPhrases";import{withViewHide as c}from"efficient-web-builder/render/components/ViewHideRoot";function f({text:t,linkText:l,linkHref:m,viewHide:s=""}){const o=(l??"").trim(),e=(m??"").trim(),r=!!o&&!!e;return!t&&!r?null:n("p",{className:c("mt-5 font-mono text-[length:var(--size-label,13px)] tracking-[0.06em] text-fg-dim",s),children:[t?i(t):null,t&&r?" ":null,r&&n(a,{href:e,className:"text-accent transition-colors hover:text-fg",children:[i(o)," →"]})]})}export{f as default};
@@ -1 +1 @@
1
- "use client";import{jsx as e}from"react/jsx-runtime";import{PhoneMenuToolsProvider as m}from"efficient-web-builder/render/components/PhoneMenuTools";import{SectionGroupWidthsProvider as h}from"efficient-web-builder/render/components/SiteGutterFrame";import{chromeOwnWidth as p}from"efficient-web-builder/format/lib/content/section-width";import{centredCap as g,SITE_WIDTH_CAP as v}from"efficient-web-builder/format/lib/content/page-width";import{resolveMenuRow as x,resolveNavTextCase as b}from"../lib/content/header-bar.js";function w({place:o,sections:d,editing:l=!1,widths:c,navTextCase:u,menuRow:i}){const a=o==="footer"?"footer":"div",n=p(c),t=n.content==="full"?"100vw":n.contentMax===null?null:`${n.contentMax}px`,r=o==="footer"&&n.background==="content"?g(v):null,f=t===null&&r===null?void 0:{...r,...t===null?null:{"--sf-site-width":t}},s=e(a,{"data-section-group":o,...o==="header"?{"data-header-nav-case":b(u),"data-header-menu-row":x(i)??"top"}:null,className:l&&o==="footer"?"sf-theme-surfaces bg-bg text-fg":void 0,style:f,children:e(h,{value:{background:n.background,content:n.content==="content"?"content":null},children:e(d,{minEmptyHeight:120})})});return o==="header"?e(m,{children:s}):s}export{w as default};
1
+ "use client";import{jsx as n}from"react/jsx-runtime";import{PhoneMenuToolsProvider as m}from"efficient-web-builder/render/components/PhoneMenuTools";import{SectionGroupWidthsProvider as h}from"efficient-web-builder/render/components/SiteGutterFrame";import{chromeOwnWidth as p}from"efficient-web-builder/format/lib/content/section-width";import{centredCap as g,SITE_WIDTH_CAP as v}from"efficient-web-builder/format/lib/content/page-width";import{resolveMenuRow as x,resolveNavTextCase as b}from"../lib/content/header-bar.js";import{HideTaker as w}from"efficient-web-builder/render/components/ViewHideRoot";function T({place:o,sections:d,editing:i=!1,widths:l,navTextCase:a,menuRow:c}){const u=o==="footer"?"footer":"div",e=p(l),t=e.content==="full"?"100vw":e.contentMax===null?null:`${e.contentMax}px`,r=o==="footer"&&e.background==="content"?g(v):null,f=t===null&&r===null?void 0:{...r,...t===null?null:{"--sf-site-width":t}},s=n(w,{as:u,"data-section-group":o,...o==="header"?{"data-header-nav-case":b(a),"data-header-menu-row":x(c)??"top"}:null,className:i&&o==="footer"?"sf-theme-surfaces bg-bg text-fg":void 0,style:f,children:n(h,{value:{background:e.background,content:e.content==="content"?"content":null},children:n(d,{minEmptyHeight:120})})});return o==="header"?n(m,{children:s}):s}export{T as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";const r="font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim";function a({size:s,children:t}){return s==="tall"?e("section",{className:"grid min-h-[70vh] place-items-center border-b border-line px-[var(--sf-site-gutter,40px)] pt-[104px] pb-14 text-center",style:{background:"var(--section-bg)"},children:e("p",{className:r,children:t})}):e("section",{className:"relative z-[2] border-t border-line bg-surface",children:e("div",{className:"mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] py-[84px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",children:e("p",{className:r,children:t})})})}export{r as SECTION_NOTICE_TEXT_CLASS,a as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{HideTaker as r}from"efficient-web-builder/render/components/ViewHideRoot";const a="font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim";function i({size:s,children:t}){return s==="tall"?e(r,{as:"section",className:"grid min-h-[70vh] place-items-center border-b border-line px-[var(--sf-site-gutter,40px)] pt-[104px] pb-14 text-center",style:{background:"var(--section-bg)"},children:e("p",{className:a,children:t})}):e(r,{as:"section",className:"relative z-[2] border-t border-line bg-surface",children:e("div",{className:"mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] py-[84px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",children:e("p",{className:a,children:t})})})}export{a as SECTION_NOTICE_TEXT_CLASS,i as default};
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as i}from"react/jsx-runtime";import{TYRE_FIT_LABEL as d,tyreFitHeadline as g}from"../lib/tyres/tyre-fit-copy.js";import{variantFitStatus as p}from"../lib/tyres/tyre-vehicle-fitment.js";const t={body:"text-[length:var(--size-body,18px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"},u={fits:{className:"font-medium",style:{color:"var(--green)"}},doesNotFit:{className:"text-fg-dim"},unknown:{className:"text-fg-dim"}};function f({variants:c,answer:l,loading:o=!1,onRetry:s,headline:m}){return l?i("div",{className:"mt-10",children:[e("p",{className:`max-w-[68ch] font-serif ${t.body} italic leading-[1.55] text-fg-dim`,children:m??g(l)}),l.failed&&s?e("button",{type:"button",onClick:s,className:`mt-4 cursor-pointer font-mono ${t.labelLarge} uppercase tracking-[0.18em] text-accent underline-offset-4 hover:underline`,children:"Try again"}):null,e("ul",{className:"mt-6 grid gap-[2px] border border-line bg-line",children:c.map(a=>{const r=p(l,a.sku),n=u[r];return i("li",{className:"flex items-baseline justify-between gap-6 bg-bg px-5 py-4",children:[e("span",{className:`font-mono ${t.labelLarge} uppercase tracking-[0.14em] text-fg`,children:a.size}),e("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.24em] ${n.className}`,style:n.style,children:d[r]})]},a.sku)})})]}):o?e("p",{className:`mt-10 border border-line bg-bg p-6 font-mono ${t.labelLarge} uppercase tracking-[0.24em] text-fg-dim`,children:"Checking your car…"}):null}export{f as default};
1
+ "use client";import{jsx as e,jsxs as i}from"react/jsx-runtime";import{HideTaker as o}from"efficient-web-builder/render/components/ViewHideRoot";import{TYRE_FIT_LABEL as p,tyreFitHeadline as g}from"../lib/tyres/tyre-fit-copy.js";import{variantFitStatus as u}from"../lib/tyres/tyre-vehicle-fitment.js";const t={body:"text-[length:var(--size-body,18px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"},f={fits:{className:"font-medium",style:{color:"var(--green)"}},doesNotFit:{className:"text-fg-dim"},unknown:{className:"text-fg-dim"}};function b({variants:c,answer:a,loading:m=!1,onRetry:s,headline:d}){return a?i(o,{className:"mt-10",children:[e("p",{className:`max-w-[68ch] font-serif ${t.body} italic leading-[1.55] text-fg-dim`,children:d??g(a)}),a.failed&&s?e("button",{type:"button",onClick:s,className:`mt-4 cursor-pointer font-mono ${t.labelLarge} uppercase tracking-[0.18em] text-accent underline-offset-4 hover:underline`,children:"Try again"}):null,e("ul",{className:"mt-6 grid gap-[2px] border border-line bg-line",children:c.map(l=>{const r=u(a,l.sku),n=f[r];return i("li",{className:"flex items-baseline justify-between gap-6 bg-bg px-5 py-4",children:[e("span",{className:`font-mono ${t.labelLarge} uppercase tracking-[0.14em] text-fg`,children:l.size}),e("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.24em] ${n.className}`,style:n.style,children:p[r]})]},l.sku)})})]}):m?e(o,{as:"p",className:`mt-10 border border-line bg-bg p-6 font-mono ${t.labelLarge} uppercase tracking-[0.24em] text-fg-dim`,children:"Checking your car…"}):null}export{b as default};
@@ -1 +1 @@
1
- "use client";import{jsx as o}from"react/jsx-runtime";import{BookingChoose as m,BookingConfirmed as u,BookingDetails as d,BookingHead as g}from"./BookingRegions.js";import{useBookingForm as k}from"./BookingFormState.js";import{bookingKindStyle as p}from"../../lib/booking/text-kinds.js";const N=["head","booking","details","confirm"],O={head:"Head",booking:"Booking",details:"Your details",confirm:"Confirmation"};function B({region:n,eyebrow:r,heading:s,intro:l,buttonLabel:a,successMessage:c,...f}){const{confirmation:i,services:t}=k(),e=p(f);return n==="head"?o("div",{className:"min-[960px]:col-span-2",style:e,children:o(g,{eyebrow:r,heading:s,intro:l})}):n==="confirm"?i?o("div",{className:"min-[960px]:col-span-2",style:e,children:o(u,{successMessage:c})}):null:i||!t||t.length===0?null:n==="booking"?o(m,{style:e}):n==="details"?o(d,{buttonLabel:a,style:e}):null}export{N as BOOKING_REGIONS,O as BOOKING_REGION_NAMES,B as default};
1
+ "use client";import{jsx as o}from"react/jsx-runtime";import{BookingChoose as u,BookingConfirmed as d,BookingDetails as k,BookingHead as p}from"./BookingRegions.js";import{useBookingForm as g}from"./BookingFormState.js";import{HideTaker as t}from"efficient-web-builder/render/components/ViewHideRoot";import{bookingKindStyle as B}from"../../lib/booking/text-kinds.js";const G=["head","booking","details","confirm"],I={head:"Head",booking:"Booking",details:"Your details",confirm:"Confirmation"};function h({region:e,eyebrow:s,heading:l,intro:a,buttonLabel:m,successMessage:f,...c}){const{confirmation:i,services:r}=g(),n=B(c);return e==="head"?o(t,{className:"min-[960px]:col-span-2",style:n,children:o(p,{eyebrow:s,heading:l,intro:a})}):e==="confirm"?i?o(t,{className:"min-[960px]:col-span-2",style:n,children:o(d,{successMessage:f})}):null:i||!r||r.length===0?null:e==="booking"?o(u,{style:n}):e==="details"?o(k,{buttonLabel:m,style:n}):null}export{G as BOOKING_REGIONS,I as BOOKING_REGION_NAMES,h as default};