efficient-storefront-blocks 0.125.4 → 0.125.6

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 (145) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/chunks/CustomHtmlCodeWindow-KAHNIUZO.js +26 -0
  3. package/dist/chunks/{EditorPreviewCheckout-3ZX2DIIL.js → EditorPreviewCheckout-M5LLO3H2.js} +1 -1
  4. package/dist/chunks/SiteEditorProvider-6P7LYLL2.js +1 -0
  5. package/dist/chunks/{chunk-5SWY36EZ.js → chunk-4SIPG47B.js} +1 -1
  6. package/dist/chunks/chunk-7ARO3R4C.js +9 -0
  7. package/dist/chunks/chunk-7SLHEYYR.js +337 -0
  8. package/dist/chunks/chunk-COR5IL6E.js +2 -0
  9. package/dist/chunks/{chunk-4WRJWM6K.js → chunk-FD3ICZTF.js} +1 -1
  10. package/dist/chunks/{chunk-RGLTNGJH.js → chunk-L6MXM22Q.js} +1 -1
  11. package/dist/chunks/chunk-SB3V6PTJ.js +1 -0
  12. package/dist/chunks/chunk-SQ6D33WV.js +96 -0
  13. package/dist/chunks/{chunk-ACYEMD5J.js → chunk-UREPZPIT.js} +1 -1
  14. package/dist/chunks/{fitment-data-CFDAFXJB.js → fitment-data-BQFU5HN3.js} +1 -1
  15. package/dist/chunks/section-css-style-VF2FOE3B.js +1 -0
  16. package/dist/editor/lib/document/blocks/commerce/AccountBlock/fields.js +1 -1
  17. package/dist/editor/lib/document/blocks/commerce/CartBlock/fields.js +1 -1
  18. package/dist/editor/lib/document/blocks/commerce/CountrySwitchBlock/fields.js +1 -1
  19. package/dist/editor/lib/document/blocks/commerce/SearchBlock/fields.js +1 -1
  20. package/dist/editor/lib/document/blocks/commerce/ThemeSwitchBlock/fields.js +1 -1
  21. package/dist/editor/lib/document/blocks/service/ContactRouting/fields.js +1 -1
  22. package/dist/editor/lib/document/blocks/service/Form/fields.js +1 -1
  23. package/dist/editor/lib/document/blocks/service/index.d.ts +1 -1
  24. package/dist/editor/lib/storefront-editor-words.d.ts +1 -0
  25. package/dist/editor/lib/storefront-editor-words.js +1 -1
  26. package/dist/editor.css +1 -1
  27. package/dist/index.d.ts +29 -2
  28. package/dist/index.js +33 -33
  29. package/dist/render/built-with.json +1 -1
  30. package/dist/render/components/AppointmentBooking.js +1 -1
  31. package/dist/render/components/CheckoutCTA.js +1 -1
  32. package/dist/render/components/CollectionCard.js +1 -1
  33. package/dist/render/components/Collections.js +1 -1
  34. package/dist/render/components/ContactRouting.d.ts +5 -1
  35. package/dist/render/components/ContactRouting.js +1 -1
  36. package/dist/render/components/DeliveryOptions.js +1 -1
  37. package/dist/render/components/Events.js +1 -1
  38. package/dist/render/components/FitmentTable.js +1 -1
  39. package/dist/render/components/FooterMenu.js +1 -1
  40. package/dist/render/components/FooterSection.js +1 -1
  41. package/dist/render/components/FormBlock.d.ts +9 -2
  42. package/dist/render/components/FormBlock.js +1 -1
  43. package/dist/render/components/GalleryGrid.js +3 -3
  44. package/dist/render/components/GalleryItem.js +1 -1
  45. package/dist/render/components/GalleryShowcase.js +1 -1
  46. package/dist/render/components/HeaderToolBlocks.d.ts +11 -5
  47. package/dist/render/components/HeaderToolBlocks.js +1 -1
  48. package/dist/render/components/HeaderTools.d.ts +1 -0
  49. package/dist/render/components/HeaderTools.js +1 -1
  50. package/dist/render/components/PhoneMenuAccount.d.ts +6 -0
  51. package/dist/render/components/PhoneMenuAccount.js +1 -0
  52. package/dist/render/components/PhoneSheet.js +1 -1
  53. package/dist/render/components/ProductGridSection.js +1 -1
  54. package/dist/render/components/ProductHeroPanel.js +1 -1
  55. package/dist/render/components/ReviewForm.js +1 -1
  56. package/dist/render/components/Reviews.js +1 -1
  57. package/dist/render/components/SectionBand.d.ts +2 -1
  58. package/dist/render/components/SectionBand.js +1 -1
  59. package/dist/render/components/SectionGroupBody.js +1 -1
  60. package/dist/render/components/SectionNotice.js +1 -1
  61. package/dist/render/components/SectionPadScope.d.ts +23 -0
  62. package/dist/render/components/SectionPadScope.js +1 -0
  63. package/dist/render/components/ThanksCard.d.ts +9 -0
  64. package/dist/render/components/ThanksCard.js +1 -0
  65. package/dist/render/components/catalog/CatalogFilterBar.js +1 -1
  66. package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.js +1 -1
  67. package/dist/render/components/wheels-plp/AlloyWheelsListing.js +1 -1
  68. package/dist/render/lib/content/block-own-pads.d.ts +27 -0
  69. package/dist/render/lib/content/block-own-pads.js +1 -0
  70. package/dist/render/lib/content/thanks-slot.d.ts +12 -0
  71. package/dist/render/lib/content/thanks-slot.js +1 -0
  72. package/dist/render/lib/document/blocks/commerce/AccountBlock/render.js +1 -1
  73. package/dist/render/lib/document/blocks/commerce/AlloyWheelsListing/meta.js +1 -1
  74. package/dist/render/lib/document/blocks/commerce/AlloyWheelsListing/render.js +1 -1
  75. package/dist/render/lib/document/blocks/commerce/BundleOffer/meta.js +1 -1
  76. package/dist/render/lib/document/blocks/commerce/BundleOffer/render.js +1 -1
  77. package/dist/render/lib/document/blocks/commerce/CartBlock/render.js +1 -1
  78. package/dist/render/lib/document/blocks/commerce/CatalogFilterBar/meta.js +1 -1
  79. package/dist/render/lib/document/blocks/commerce/CatalogFilterBar/render.js +1 -1
  80. package/dist/render/lib/document/blocks/commerce/CheckoutCTA/meta.js +1 -1
  81. package/dist/render/lib/document/blocks/commerce/CheckoutCTA/render.js +1 -1
  82. package/dist/render/lib/document/blocks/commerce/Collections/meta.js +1 -1
  83. package/dist/render/lib/document/blocks/commerce/Collections/render.js +1 -1
  84. package/dist/render/lib/document/blocks/commerce/CompatibleTyres/meta.js +1 -1
  85. package/dist/render/lib/document/blocks/commerce/CompatibleTyres/render.js +1 -1
  86. package/dist/render/lib/document/blocks/commerce/CountrySwitchBlock/render.js +1 -1
  87. package/dist/render/lib/document/blocks/commerce/DeliveryOptions/meta.js +1 -1
  88. package/dist/render/lib/document/blocks/commerce/DeliveryOptions/render.js +1 -1
  89. package/dist/render/lib/document/blocks/commerce/EuTyreLabel/meta.js +1 -1
  90. package/dist/render/lib/document/blocks/commerce/EuTyreLabel/render.js +1 -1
  91. package/dist/render/lib/document/blocks/commerce/FitmentFinder/meta.js +1 -1
  92. package/dist/render/lib/document/blocks/commerce/FitmentFinder/render.js +1 -1
  93. package/dist/render/lib/document/blocks/commerce/FitmentTable/meta.js +1 -1
  94. package/dist/render/lib/document/blocks/commerce/FitmentTable/render.js +1 -1
  95. package/dist/render/lib/document/blocks/commerce/Gallery/meta.js +1 -1
  96. package/dist/render/lib/document/blocks/commerce/Gallery/render.js +1 -1
  97. package/dist/render/lib/document/blocks/commerce/ProductHero/meta.js +1 -1
  98. package/dist/render/lib/document/blocks/commerce/ProductHero/render.js +1 -1
  99. package/dist/render/lib/document/blocks/commerce/RelatedProducts/meta.js +1 -1
  100. package/dist/render/lib/document/blocks/commerce/RelatedProducts/render.js +1 -1
  101. package/dist/render/lib/document/blocks/commerce/SearchBlock/render.js +1 -1
  102. package/dist/render/lib/document/blocks/commerce/SpecTable/meta.js +1 -1
  103. package/dist/render/lib/document/blocks/commerce/SpecTable/render.js +1 -1
  104. package/dist/render/lib/document/blocks/commerce/ThemeSwitchBlock/render.js +1 -1
  105. package/dist/render/lib/document/blocks/commerce/TyreFitment/meta.js +1 -1
  106. package/dist/render/lib/document/blocks/commerce/TyreFitment/render.js +1 -1
  107. package/dist/render/lib/document/blocks/commerce/TyreSizes/meta.js +1 -1
  108. package/dist/render/lib/document/blocks/commerce/TyreSizes/render.js +1 -1
  109. package/dist/render/lib/document/blocks/service/AppointmentBooking/meta.js +1 -1
  110. package/dist/render/lib/document/blocks/service/AppointmentBooking/render.js +1 -1
  111. package/dist/render/lib/document/blocks/service/ContactRouting/meta.d.ts +4 -0
  112. package/dist/render/lib/document/blocks/service/ContactRouting/meta.js +1 -1
  113. package/dist/render/lib/document/blocks/service/ContactRouting/render.js +1 -1
  114. package/dist/render/lib/document/blocks/service/Form/meta.d.ts +6 -0
  115. package/dist/render/lib/document/blocks/service/Form/meta.js +1 -1
  116. package/dist/render/lib/document/blocks/service/Form/render.js +1 -1
  117. package/dist/render/lib/document/blocks/service/ReviewForm/meta.js +1 -1
  118. package/dist/render/lib/document/blocks/service/ReviewForm/render.js +1 -1
  119. package/dist/render/lib/document/blocks/service/Reviews/meta.js +1 -1
  120. package/dist/render/lib/document/blocks/service/Reviews/render.js +1 -1
  121. package/dist/render/lib/document/blocks/service/SubmitBuild/meta.js +1 -1
  122. package/dist/render/lib/document/blocks/service/SubmitBuild/render.js +1 -1
  123. package/dist/render/lib/document/blocks/service/Subscribe/meta.js +1 -1
  124. package/dist/render/lib/document/blocks/service/Subscribe/render.js +1 -1
  125. package/dist/render/lib/document/blocks/service/SubscribeBlogs/meta.js +1 -1
  126. package/dist/render/lib/document/blocks/service/SubscribeBlogs/render.js +1 -1
  127. package/dist/render/lib/document/card-templates.js +1 -1
  128. package/dist/render/lib/document/pads-itself.d.ts +16 -0
  129. package/dist/render/lib/document/pads-itself.js +1 -0
  130. package/dist/routine-index.json +1 -1
  131. package/dist/value-index.json +1 -1
  132. package/dist/words.d.ts +1 -0
  133. package/dist/words.js +1 -1
  134. package/package.json +2 -2
  135. package/dist/chunks/CustomHtmlCodeWindow-KB7QEJAG.js +0 -26
  136. package/dist/chunks/SiteEditorProvider-TYNFV3WZ.js +0 -1
  137. package/dist/chunks/chunk-4M7WJPOZ.js +0 -7
  138. package/dist/chunks/chunk-AEBQM5LZ.js +0 -2
  139. package/dist/chunks/chunk-DHKJAYUG.js +0 -337
  140. package/dist/chunks/chunk-HKL2EKLO.js +0 -96
  141. package/dist/chunks/section-css-style-TKWJ7WU2.js +0 -1
  142. /package/dist/chunks/{chunk-DHKJAYUG.js.LEGAL.txt → chunk-7SLHEYYR.js.LEGAL.txt} +0 -0
  143. /package/dist/chunks/{chunk-3DCSW3PN.js → chunk-ECMYL3O7.js} +0 -0
  144. /package/dist/chunks/{chunk-ACYEMD5J.js.LEGAL.txt → chunk-UREPZPIT.js.LEGAL.txt} +0 -0
  145. /package/dist/chunks/{chunk-5NGS7VFJ.js → chunk-VYXOE5FY.js} +0 -0
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as n,Fragment as x}from"react/jsx-runtime";import{createContext as V,useCallback as le,useContext as X,useEffect as q,useRef as ae,useState as P}from"react";import z from"next/link";import{slugify as se}from"efficient-shell/format";import{CardTemplateRows as ie}from"efficient-web-builder/render/components/CardRowContext";import{BOX_HOLDS_NO_GUTTER_CLASS as ce}from"efficient-web-builder/format/lib/content/page-width";import pe,{galleryTileNumber as de}from"./GalleryCard.js";import me,{LightboxClose as fe,LIGHTBOX_CLOSE_TINT as he}from"./Lightbox.js";import{useSiteSells as xe}from"./SiteRecordContext.js";import{renderGold as f,renderHeadline as Z}from"efficient-web-builder/render/components/goldPhrases";import{sizedImage as ue}from"efficient-web-builder/format/lib/sized-image";import{useBrowserLayoutEffect as ge}from"efficient-shell/hooks";import{HideTaker as J}from"efficient-web-builder/render/components/ViewHideRoot";const be="(max-width: 1100px) 100vw, min(59vw, 1050px)",ve=V({}),Ye=[{id:"tag",label:"Tag"},{id:"eyebrow",label:"Eyebrow"},{id:"title",label:"Title"},{id:"meta",label:"Meta"},{id:"number",label:"Card number"}],we=V(null),ye="data-gallery-grid",I="data-gallery-tile";function ke(t,o){const[a,i]=P(null);return q(()=>{const c=t.current,s=c?.closest(`[${ye}]`);if(!c||!s)return;const w=()=>{const k=Array.from(s.querySelectorAll(`[${I}]`)),N=k.indexOf(c),u=N>=0?{index:N+1,total:k.length}:null;i(g=>g?.index===u?.index&&g?.total===u?.total?g:u)};if(w(),!o)return;const y=new MutationObserver(w);return y.observe(s,{childList:!0,subtree:!0}),()=>y.disconnect()},[t,o]),a}const De={process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},Ne=()=>({image:"",href:"#",process:"",eyebrow:"",name:"",meta:""}),We=Array.from({length:6},Ne);function Se(t){const o=(t.photos??[]).map(s=>s?.src).filter(s=>!!s),a=t.image||o[0]||"",i=[a,...o].filter(s=>!!s),c=se(t.name)||"gallery-item";return{car:t.eyebrow??"",wheel:t.name??"",process:t.process??"",finish:t.meta??"",imageLabel:`${c}.jpg`,detailLabel:`${c}-detail.jpg`,imageSrc:a||void 0,detailSrc:o[0]||a||void 0,photos:i,href:t.href}}function Le({editing:t=!1,previewHover:o,ratio:a,captionPlace:i,tile:c,...s}){const{galleryHref:w="/gallery",submitHref:y="/contact",previewHover:k,display:N,displayPhone:u,styleOwner:g,photosOnly:ee=!1,wordsAtRest:te=!1,Template:j,ownerId:re}=X(ve),e=Se(s),b=xe()&&!ee,A=!b&&!Te(e),p=e.photos??(e.imageSrc?[e.imageSrc]:[]),G=ae(null),H=le(l=>{G.current=l},[]),oe=ke(G,t),h=X(we),S=h?.report,d=c?.id,R=c?.tag??"",$=c?.name??"";ge(()=>{if(!S||!d)return;const l={id:d,tag:R,name:$};return S(l),()=>S(l,!0)},[S,d,R,$]);const v=(d?h?.positionOf(d):null)??oe,B=t&&(!!o||!!k),[ne,m]=P(!1),[L,C]=P(0),M=!!d&&!!h&&h.walkCount>1,Y=l=>{const E=L+l;if(M&&(E<0||E>=p.length)){m(!1),h.walk(d,l);return}C((E+p.length)%p.length)},D=()=>Y(-1),W=()=>Y(1),_=p.length>1||M,T=h?.opening;q(()=>{!T||T.id!==d||(C(T.at==="last"?Math.max(0,p.length-1):0),m(!0))},[T,d]);const O=p[L]??e.imageSrc??"",F=p.slice(1),U=j?r("div",{className:`block w-full min-w-0 ${ce}`,children:r(ie,{ownerId:re??"GalleryB",ownerType:"GalleryB",Template:j,rows:[{key:d??e.imageSrc??"tile",image:e.imageSrc??"",tag:e.process,number:v?de(v.index,v.total):"",eyebrow:e.car,name:e.wheel,meta:e.finish,href:e.href??""}],items:[{hoverMedia:F.length?{photos:[{finish:"",items:F.map(l=>({url:l,kind:"image"}))}]}:null}],previewHover:B,fallback:null,children:l=>l})}):r(pe,{build:e,forceHover:B,alwaysShowOverlay:te,index:v?.index,total:v?.total,ratio:a,captionPlace:i,display:N,displayPhone:u,styleOwner:g,editing:t});return n(x,{children:[t?r(J,{as:"div",ref:H,[I]:"",className:"block w-full text-left",children:U}):r(J,{as:"button",ref:H,[I]:"",type:"button","aria-label":b?`Open ${e.car||"build"} on ${e.wheel||"wheel"}`:Q(e),onClick:()=>{C(0),m(!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:U}),r(me,{open:ne,onClose:()=>m(!1),label:b?`${e.car} on ${e.wheel}`:Q(e),onPrev:_?D:void 0,onNext:_?W:void 0,className:"flex items-center justify-center p-6 max-[700px]:p-3",children:n("div",{onClick:l=>l.stopPropagation(),className:`relative grid w-[min(1800px,100%)] max-h-[calc(100vh-48px)] ${A?"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(fe,{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:he},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:[O&&r("img",{...ue(O,{fallbackWidth:1280}),sizes:be,alt:`${(b?e.car:e.wheel||e.car)||"Photo"} — ${L+1} of ${p.length}`,className:"block h-full max-h-[88vh] w-full object-cover"},O),_&&n(x,{children:[r("button",{type:"button","aria-label":"Previous photo",onClick:D,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:W,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:"▷"}),p.length>1&&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:[L+1," / ",p.length]})]})]}),b?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:f(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:Z(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:f(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(x,{children:[r("dt",{className:"text-fg-dim",children:"Wheel"}),r("dd",{className:"text-fg",children:f(e.wheel)})]}),e.process&&n(x,{children:[r("dt",{className:"text-fg-dim",children:"Process"}),r("dd",{className:"text-fg",children:f(e.process)})]}),e.finish&&n(x,{children:[r("dt",{className:"text-fg-dim",children:"Finish"}),r("dd",{className:"text-fg",children:f(e.finish)})]}),e.car&&n(x,{children:[r("dt",{className:"text-fg-dim",children:"Vehicle"}),r("dd",{className:"text-fg",children:f(e.car)})]})]}),n("div",{className:"mt-auto flex flex-col gap-3.5 pt-6",children:[n(z,{href:e.href||"/wheels",onClick:()=>m(!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(z,{href:w,onClick:()=>m(!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(z,{href:y,onClick:()=>m(!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:"→"})]})]})]}):!A&&r(Ce,{build:e})]})})]})}function K(t){return[t.process,t.car,t.finish].filter((o,a,i)=>!!o&&o!==t.wheel&&i.indexOf(o)===a)}function Te(t){return!!t.wheel||K(t).length>0}function Q(t){const o=t.wheel||t.car;return o?`Open photo of ${o}`:"Open photo"}function Ce({build:t}){const o=t.wheel,a=K(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:Z(o,!1)}),a.map(i=>r("p",{className:"text-[length:var(--size-body,18px)] leading-[1.5] text-fg",children:f(i)},i))]})}export{ye as GALLERY_GRID_ATTR,De as GALLERY_ITEM_HINTS,We as GALLERY_ITEM_SEEDS,I as GALLERY_TILE_ATTR,Ye as GALLERY_TILE_PARTS,ve as GalleryLinksContext,we as GalleryTilesContext,Le as default};
1
+ "use client";import{jsx as r,jsxs as n,Fragment as x}from"react/jsx-runtime";import{createContext as V,useCallback as ae,useContext as X,useEffect as q,useRef as se,useState as I}from"react";import P from"next/link";import{slugify as ie}from"efficient-shell/format";import{CardTemplateRows as ce}from"efficient-web-builder/render/components/CardRowContext";import{BOX_HOLDS_NO_GUTTER_CLASS as pe,SIDE_ONCE_HOLDS_CLASS as de}from"efficient-web-builder/format/lib/content/page-width";import me,{galleryTileNumber as fe}from"./GalleryCard.js";import he,{LightboxClose as xe,LIGHTBOX_CLOSE_TINT as ue}from"./Lightbox.js";import{useSiteSells as ge}from"./SiteRecordContext.js";import{renderGold as f,renderHeadline as Z}from"efficient-web-builder/render/components/goldPhrases";import{sizedImage as be}from"efficient-web-builder/format/lib/sized-image";import{useBrowserLayoutEffect as ve}from"efficient-shell/hooks";import{HideTaker as J}from"efficient-web-builder/render/components/ViewHideRoot";import{useSideSpaceOnce as we}from"efficient-web-builder/render/components/SideSpaceOnce";const ye="(max-width: 1100px) 100vw, min(59vw, 1050px)",ke=V({}),Ue=[{id:"tag",label:"Tag"},{id:"eyebrow",label:"Eyebrow"},{id:"title",label:"Title"},{id:"meta",label:"Meta"},{id:"number",label:"Card number"}],Ne=V(null),Se="data-gallery-grid",z="data-gallery-tile";function Le(t,o){const[a,i]=I(null);return q(()=>{const c=t.current,s=c?.closest(`[${Se}]`);if(!c||!s)return;const w=()=>{const k=Array.from(s.querySelectorAll(`[${z}]`)),N=k.indexOf(c),u=N>=0?{index:N+1,total:k.length}:null;i(g=>g?.index===u?.index&&g?.total===u?.total?g:u)};if(w(),!o)return;const y=new MutationObserver(w);return y.observe(s,{childList:!0,subtree:!0}),()=>y.disconnect()},[t,o]),a}const Ve={process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},_e=()=>({image:"",href:"#",process:"",eyebrow:"",name:"",meta:""}),Xe=Array.from({length:6},_e);function Ce(t){const o=(t.photos??[]).map(s=>s?.src).filter(s=>!!s),a=t.image||o[0]||"",i=[a,...o].filter(s=>!!s),c=ie(t.name)||"gallery-item";return{car:t.eyebrow??"",wheel:t.name??"",process:t.process??"",finish:t.meta??"",imageLabel:`${c}.jpg`,detailLabel:`${c}-detail.jpg`,imageSrc:a||void 0,detailSrc:o[0]||a||void 0,photos:i,href:t.href}}function Te({editing:t=!1,previewHover:o,ratio:a,captionPlace:i,tile:c,...s}){const w=we(),{galleryHref:y="/gallery",submitHref:k="/contact",previewHover:N,display:u,displayPhone:g,styleOwner:ee,photosOnly:te=!1,wordsAtRest:re=!1,Template:A,ownerId:oe}=X(ke),e=Ce(s),b=ge()&&!te,H=!b&&!Oe(e),p=e.photos??(e.imageSrc?[e.imageSrc]:[]),$=se(null),j=ae(l=>{$.current=l},[]),ne=Le($,t),h=X(Ne),S=h?.report,d=c?.id,G=c?.tag??"",R=c?.name??"";ve(()=>{if(!S||!d)return;const l={id:d,tag:G,name:R};return S(l),()=>S(l,!0)},[S,d,G,R]);const v=(d?h?.positionOf(d):null)??ne,B=t&&(!!o||!!N),[le,m]=I(!1),[L,C]=I(0),M=!!d&&!!h&&h.walkCount>1,D=l=>{const E=L+l;if(M&&(E<0||E>=p.length)){m(!1),h.walk(d,l);return}C((E+p.length)%p.length)},Y=()=>D(-1),W=()=>D(1),T=p.length>1||M,_=h?.opening;q(()=>{!_||_.id!==d||(C(_.at==="last"?Math.max(0,p.length-1):0),m(!0))},[_,d]);const O=p[L]??e.imageSrc??"",F=p.slice(1),U=A?r("div",{className:`block w-full min-w-0 ${pe}${w?` ${de}`:""}`,children:r(ce,{ownerId:oe??"GalleryB",ownerType:"GalleryB",Template:A,rows:[{key:d??e.imageSrc??"tile",image:e.imageSrc??"",tag:e.process,number:v?fe(v.index,v.total):"",eyebrow:e.car,name:e.wheel,meta:e.finish,href:e.href??""}],items:[{hoverMedia:F.length?{photos:[{finish:"",items:F.map(l=>({url:l,kind:"image"}))}]}:null}],previewHover:B,fallback:null,children:l=>l})}):r(me,{build:e,forceHover:B,alwaysShowOverlay:re,index:v?.index,total:v?.total,ratio:a,captionPlace:i,display:u,displayPhone:g,styleOwner:ee,editing:t});return n(x,{children:[t?r(J,{as:"div",ref:j,[z]:"",className:"block w-full text-left",children:U}):r(J,{as:"button",ref:j,[z]:"",type:"button","aria-label":b?`Open ${e.car||"build"} on ${e.wheel||"wheel"}`:Q(e),onClick:()=>{C(0),m(!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:U}),r(he,{open:le,onClose:()=>m(!1),label:b?`${e.car} on ${e.wheel}`:Q(e),onPrev:T?Y:void 0,onNext:T?W:void 0,className:"flex items-center justify-center p-6 max-[700px]:p-3",children:n("div",{onClick:l=>l.stopPropagation(),className:`relative grid w-[min(1800px,100%)] max-h-[calc(100vh-48px)] ${H?"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(xe,{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:ue},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:[O&&r("img",{...be(O,{fallbackWidth:1280}),sizes:ye,alt:`${(b?e.car:e.wheel||e.car)||"Photo"} — ${L+1} of ${p.length}`,className:"block h-full max-h-[88vh] w-full object-cover"},O),T&&n(x,{children:[r("button",{type:"button","aria-label":"Previous photo",onClick:Y,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:W,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:"▷"}),p.length>1&&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:[L+1," / ",p.length]})]})]}),b?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:f(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:Z(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:f(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(x,{children:[r("dt",{className:"text-fg-dim",children:"Wheel"}),r("dd",{className:"text-fg",children:f(e.wheel)})]}),e.process&&n(x,{children:[r("dt",{className:"text-fg-dim",children:"Process"}),r("dd",{className:"text-fg",children:f(e.process)})]}),e.finish&&n(x,{children:[r("dt",{className:"text-fg-dim",children:"Finish"}),r("dd",{className:"text-fg",children:f(e.finish)})]}),e.car&&n(x,{children:[r("dt",{className:"text-fg-dim",children:"Vehicle"}),r("dd",{className:"text-fg",children:f(e.car)})]})]}),n("div",{className:"mt-auto flex flex-col gap-3.5 pt-6",children:[n(P,{href:e.href||"/wheels",onClick:()=>m(!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(P,{href:y,onClick:()=>m(!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(P,{href:k,onClick:()=>m(!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:"→"})]})]})]}):!H&&r(Ee,{build:e})]})})]})}function K(t){return[t.process,t.car,t.finish].filter((o,a,i)=>!!o&&o!==t.wheel&&i.indexOf(o)===a)}function Oe(t){return!!t.wheel||K(t).length>0}function Q(t){const o=t.wheel||t.car;return o?`Open photo of ${o}`:"Open photo"}function Ee({build:t}){const o=t.wheel,a=K(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:Z(o,!1)}),a.map(i=>r("p",{className:"text-[length:var(--size-body,18px)] leading-[1.5] text-fg",children:f(i)},i))]})}export{Se as GALLERY_GRID_ATTR,Ve as GALLERY_ITEM_HINTS,Xe as GALLERY_ITEM_SEEDS,z as GALLERY_TILE_ATTR,Ue as GALLERY_TILE_PARTS,ke as GalleryLinksContext,Ne as GalleryTilesContext,Te 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 R,useState as N}from"react";import{slugify as F,parseOption as Ce}from"efficient-shell/format";import{stripMarkup as T}from"efficient-web-builder/format/lib/markup";import{renderChrome as k,renderGold as i,renderHeadline as je}from"efficient-web-builder/render/components/goldPhrases";import O from"efficient-web-builder/render/components/Placeholder";import Se,{LightboxClose as ze}from"./Lightbox.js";import Le from"./ThemedSelect.js";import{say as $}from"efficient-web-builder/format/lib/editor-words";import{HideTaker as _e}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 W(x){const g=[x.image,...(x.photos??[]).map(f=>f?.src)].filter(f=>!!f);return g.length?g:[""]}const G=6,Ae=()=>Array.from({length:G},(x,g)=>({image:"",process:$("Tag"),eyebrow:$("Category"),name:$("Item name"),meta:$("{n} photos",{n:`0${g+1}`})}));function Pe({mode:x="both",kicker:g,breadcrumbLabel:f,vehicleTabLabel:X="Gallery A",vehicleTitle:Y,vehicleBody1:ee,vehicleBody2:te,vehicleStats:ae,vehicleCards:B,wheelTabLabel:U="Gallery B",wheelTitle:re,wheelBody1:le,wheelBody2:ne,wheelStats:se,wheelCards:H,othersTitle:oe,othersBody1:ie,othersBody2:ce,othersStats:pe,othersCards:me,showBreadcrumb:de=!0,showStats:xe=!0,showIntro:ge=!0,showTabs:fe=!0,showFilters:E=!0,showCount:M=!0,showSort:I=!0,previewTab:C,previewHover:ue=!1,editing:h=!1}){const j=x==="both",v=j?["vehicles","wheels"]:x==="wheels"?["wheels"]:x==="others"?["others"]:["vehicles"],[be,he]=N(v[0]),w=(h&&j&&C&&v.includes(C)?C:null)??Ce(v,v[0],be),ve=h&&ue,[S,Z]=N("all"),[z,we]=N("newest"),[L,b]=N(null),n=w==="vehicles"?{title:Y,body1:ee,body2:te,stats:ae??[],cards:B??[],unit:"items",word:X}:w==="others"?{title:oe,body1:ie,body2:ce,stats:pe??[],cards:me??[],unit:"items",word:"Others"}:{title:re,body1:le,body2:ne,stats:se??[],cards:H??[],unit:"items",word:U},D=R(()=>{const e=[];for(const a of n.cards)a.process&&!e.includes(a.process)&&e.push(a.process);return e},[n.cards]),_=S!=="all"&&D.includes(S)?S:"all",V=_==="all"?n.cards:n.cards.filter(e=>e.process===_),q=R(()=>{const e=[...V];return z==="name"&&e.sort((a,o)=>(a.name??"").localeCompare(o.name??"")),e},[V,z]),J=n.cards.length===0,A=h&&J,P=A?Ae():q,ye=A?G:n.cards.length,Ne=A?G:q.length,K=g?`${g} · ${T(n.word)}`:void 0;function ke(e){e!==w&&(he(e),Z("all"))}return r(_e,{as:"section",className:"relative z-[2] bg-bg",children:[de&&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:K?i(K):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?je(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:xe&&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))})]}),ge&&(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,u=e==="vehicles"?(B??[]).length:(H??[]).length,p=(c||"").trim().split(/\s+/),m=p.slice(0,-1).join(" "),s=p.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:[m?r(y,{children:[k(m)," "]}):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",...D].map(e=>{const a=_===e,o=e==="all"?"All":e;return t("button",{type:"button",onClick:()=>Z(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(Le,{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=W(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"}`,p=`${e.name??"card"}-${a}`,m=r(y,{children:[t(O,{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:m},p):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:m},p)})}):t("div",{className:`py-20 text-center font-mono ${l.labelXl} uppercase tracking-[0.2em] text-fg-dim`,children:J?"No items in this gallery yet.":"No items match this filter."})}),L&&(()=>{const e=W(L.card),{card:a,index:o}=L,c=e.length,u=e[o]??e[0]??"",p=s=>b(d=>d&&{...d,index:(d.index+s+c)%c}),m=[a.process,a.meta].filter(Boolean).join(" · ");return r(Se,{open:!0,onClose:()=>b(null),label:a.name??"Gallery item",onPrev:c>1?()=>p(-1):void 0,onNext:c>1?()=>p(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(O,{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(),p(-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(),p(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:[m?r(y,{children:[i(m)," · "]}):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(Q=>Q&&{...Q,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(O,{label:F(a.name)||"gallery-photo",src:s||void 0,alt:"",sizes:"120px"})},`${s}-${d}`))}),t(ze,{})]})})()]})}export{Pe as default};
1
+ "use client";import{jsx as t,jsxs as r,Fragment as $}from"react/jsx-runtime";import ze from"next/link";import{useMemo as ae,useState as S}from"react";import{slugify as G,parseOption as Le}from"efficient-shell/format";import{stripMarkup as X}from"efficient-web-builder/format/lib/markup";import{renderChrome as C,renderGold as i,renderHeadline as _e}from"efficient-web-builder/render/components/goldPhrases";import U from"efficient-web-builder/render/components/Placeholder";import Oe,{LightboxClose as Pe}from"./Lightbox.js";import Ae from"./ThemedSelect.js";import{say as j}from"efficient-web-builder/format/lib/editor-words";import{HideTaker as Te}from"efficient-web-builder/render/components/ViewHideRoot";import{withSideOnce as h}from"efficient-web-builder/format/lib/content/page-width";import{useSideSpaceOnce as Fe}from"efficient-web-builder/render/components/SideSpaceOnce";import{withRootPad as Ge}from"efficient-web-builder/render/lib/content/section-own-pads";import{useSectionPad as Xe}from"./SectionPadScope.js";const n={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 re(x){const g=[x.image,...(x.photos??[]).map(f=>f?.src)].filter(f=>!!f);return g.length?g:[""]}const B=6,Ue=()=>Array.from({length:B},(x,g)=>({image:"",process:j("Tag"),eyebrow:j("Category"),name:j("Item name"),meta:j("{n} photos",{n:`0${g+1}`})}));function Be({mode:x="both",kicker:g,breadcrumbLabel:f,vehicleTabLabel:H="Gallery A",vehicleTitle:ne,vehicleBody1:le,vehicleBody2:oe,vehicleStats:se,vehicleCards:E,wheelTabLabel:M="Gallery B",wheelTitle:ie,wheelBody1:ce,wheelBody2:pe,wheelStats:me,wheelCards:I,othersTitle:de,othersBody1:xe,othersBody2:ge,othersStats:fe,othersCards:ue,showBreadcrumb:Z=!0,showStats:be=!0,showIntro:he=!0,showTabs:ve=!0,showFilters:D=!0,showCount:R=!0,showSort:V=!0,previewTab:z,previewHover:we=!1,editing:y=!1}){const u=Fe(),v=Xe(),q=!!v&&!Z,L=x==="both",N=L?["vehicles","wheels"]:x==="wheels"?["wheels"]:x==="others"?["others"]:["vehicles"],[ye,Ne]=S(N[0]),k=(y&&L&&z&&N.includes(z)?z:null)??Le(N,N[0],ye),ke=y&&we,[_,J]=S("all"),[O,$e]=S("newest"),[P,w]=S(null),l=k==="vehicles"?{title:ne,body1:le,body2:oe,stats:se??[],cards:E??[],unit:"items",word:H}:k==="others"?{title:de,body1:xe,body2:ge,stats:fe??[],cards:ue??[],unit:"items",word:"Others"}:{title:ie,body1:ce,body2:pe,stats:me??[],cards:I??[],unit:"items",word:M},K=ae(()=>{const e=[];for(const a of l.cards)a.process&&!e.includes(a.process)&&e.push(a.process);return e},[l.cards]),A=_!=="all"&&K.includes(_)?_:"all",Q=A==="all"?l.cards:l.cards.filter(e=>e.process===A),W=ae(()=>{const e=[...Q];return O==="name"&&e.sort((a,s)=>(a.name??"").localeCompare(s.name??"")),e},[Q,O]),Y=l.cards.length===0,T=y&&Y,F=T?Ue():W,Se=T?B:l.cards.length,Ce=T?B:W.length,ee=g?`${g} · ${X(l.word)}`:void 0;function je(e){e!==k&&(Ne(e),J("all"))}return r(Te,{as:"section",...Ge("relative z-[2] bg-bg",v),children:[Z&&r("nav",{className:h(`mx-auto flex max-w-[var(--sf-site-width,1600px)] items-center gap-4 border-b border-line px-[var(--sf-site-gutter,40px)] ${v?"pb-6":"py-6"} font-mono ${n.labelLarge} uppercase tracking-[0.2em] text-fg-dim max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))] ${v?"max-view-tablet:pb-4":"max-view-tablet:py-4"}`,u),children:[t("span",{className:"hover:text-fg",children:"Home"}),t("span",{className:"opacity-40",children:"/"}),t("span",{className:"text-fg",children:f?C(f):"Gallery"})]}),r("div",{className:h(`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)]${q?"":" 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))]${q?"":" max-view-desktop:pt-[60px]"}`,u),children:[t("span",{className:`pb-4 font-mono ${n.labelXl} uppercase tracking-[0.3em] text-accent`,children:ee?i(ee):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:l.title?_e(l.title,!0):null}),t("div",{className:`pb-4 text-right font-mono ${n.labelLarge} uppercase leading-[1.8] tracking-[0.18em] text-fg-dim max-view-desktop:text-left`,children:be&&l.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))})]}),he&&(l.body1||l.body2)&&r("div",{className:h("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))]",u),children:[l.body1&&t("p",{className:`max-w-[540px] font-display ${n.body} leading-[1.6] text-fg-dim`,children:i(l.body1)}),l.body2&&t("p",{className:`max-w-[540px] font-display ${n.body} leading-[1.6] text-fg-dim`,children:i(l.body2)})]}),L&&ve&&t("div",{className:h("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",u),children:["vehicles","wheels"].map((e,a)=>{const s=k===e,c=e==="vehicles"?H:M,b=e==="vehicles"?(E??[]).length:(I??[]).length,p=(c||"").trim().split(/\s+/),m=p.slice(0,-1).join(" "),o=p.slice(-1)[0]??"";return r("button",{type:"button",onClick:()=>je(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",s?"bg-surface":"hover:bg-fg/[0.04]"].join(" "),children:[t("span",{className:[`pb-2 font-mono ${n.labelLarge} tracking-[0.3em] max-view-tablet:pb-0 ${n.labelUpTo720} max-view-tablet:tracking-[0.24em]`,s?"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] ${n.bodyUpTo720}`,children:[m?r($,{children:[C(m)," "]}):null,t("em",{className:"font-normal italic text-accent",children:C(o)})]}),r("span",{className:`pb-2 text-right font-mono ${n.labelSmall} uppercase leading-[1.7] tracking-[0.24em] text-fg-dim max-view-tablet:hidden`,children:[t("strong",{className:"font-normal text-fg",children:b})," ","items",t("br",{}),e==="vehicles"?"Community photos":"Featured photos"]}),s&&t("span",{className:"pointer-events-none absolute inset-x-0 -bottom-px h-0.5 bg-accent"})]},e)})}),(D||R||V)&&r("div",{className:h("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",u),style:{background:"color-mix(in oklab, var(--bg) 92%, transparent)"},children:[t("div",{className:"flex flex-wrap gap-1",children:D&&["all",...K].map(e=>{const a=A===e,s=e==="all"?"All":e;return t("button",{type:"button",onClick:()=>J(e),className:[`cursor-pointer border px-4 py-3 font-mono ${n.labelLarge} uppercase tracking-[0.2em] transition-colors`,a?"border-fg bg-fg text-bg":"border-transparent text-fg-dim hover:text-fg"].join(" "),children:C(s)},e)})}),R?r("div",{className:`text-center font-mono ${n.labelLarge} uppercase tracking-[0.2em] text-fg-dim`,children:[t("strong",{className:"font-normal text-accent",children:Ce})," / ",Se," ",l.unit]}):t("div",{}),V?r("div",{className:`flex items-center gap-3 font-mono ${n.labelLarge} uppercase tracking-[0.18em] text-fg-dim`,children:[t("span",{children:"Sort"}),r(Ae,{value:O,onChange:e=>$e(e.target.value),className:`cursor-pointer border border-line bg-bg px-3 py-2 font-mono ${n.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:h(`mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-5${v?"":" pb-20"} max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))]`,u),children:F.length>0?t("div",{className:"grid grid-cols-6 gap-2 max-view-desktop:grid-cols-2 max-view-tablet:grid-cols-1",children:F.map((e,a)=>{const s=re(e)[0],b=`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"}`,p=`${e.name??"card"}-${a}`,m=r($,{children:[t(U,{label:G(e.name)||`gallery-card-${a+1}`,src:s||void 0,alt:X(e.name??""),sizes:"(max-width: 720px) 100vw, (max-width: 1100px) 50vw, 33vw",className:`transition-transform duration-700 ${ke?"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 ${n.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(F.length).padStart(2,"0")]})]}),r("div",{className:"flex flex-col gap-2",children:[e.eyebrow&&t("div",{className:`font-mono ${n.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 ${n.labelXs} uppercase tracking-[0.2em] text-overlay-fg/70`,children:t("span",{children:i(e.meta)})})]})]})]});return y?t("div",{className:b,children:m},p):t("button",{type:"button",onClick:()=>w({card:e,index:0}),"aria-label":`Open ${e.name??"gallery item"}`,className:`${b} cursor-pointer focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2`,children:m},p)})}):t("div",{className:`py-20 text-center font-mono ${n.labelXl} uppercase tracking-[0.2em] text-fg-dim`,children:Y?"No items in this gallery yet.":"No items match this filter."})}),P&&(()=>{const e=re(P.card),{card:a,index:s}=P,c=e.length,b=e[s]??e[0]??"",p=o=>w(d=>d&&{...d,index:(d.index+o+c)%c}),m=[a.process,a.meta].filter(Boolean).join(" · ");return r(Oe,{open:!0,onClose:()=>w(null),label:a.name??"Gallery item",onPrev:c>1?()=>p(-1):void 0,onNext:c>1?()=>p(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(U,{label:G(a.name)||"gallery-photo",src:b||void 0,alt:X(a.name??""),objectFit:"contain",sizes:"92vw"})}),c>1&&r($,{children:[t("button",{type:"button","aria-label":"Previous photo",onClick:o=>{o.stopPropagation(),p(-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:o=>{o.stopPropagation(),p(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 ${n.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,onClick:o=>o.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:[m?r($,{children:[i(m)," · "]}):null,s+1," / ",c]})]}),a.href&&t(ze,{href:a.href,onClick:()=>w(null),className:`cursor-pointer border border-btn bg-btn/[0.08] px-5 py-3 font-mono ${n.labelLarge} uppercase tracking-[0.28em] text-btn transition-colors hover:bg-btn hover:text-btn-ink`,children:"View Product →"})]}),c>1&&t("div",{onClick:o=>o.stopPropagation(),className:"mt-5 flex max-w-[92vw] gap-2 overflow-x-auto pb-1",children:e.map((o,d)=>t("button",{type:"button","aria-label":`Photo ${d+1}`,onClick:()=>w(te=>te&&{...te,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===s?"border-accent":"border-line opacity-60 hover:border-fg-dim hover:opacity-100"].join(" "),children:t(U,{label:G(a.name)||"gallery-photo",src:o||void 0,alt:"",sizes:"120px"})},`${o}-${d}`))}),t(Pe,{})]})})()]})}export{Be as default};
@@ -3,19 +3,25 @@ import type { HeaderUtilStyle } from "../lib/content/header-bar.js";
3
3
  export type ToolStyle = HeaderUtilStyle;
4
4
  export declare const SEARCH_STYLES: readonly ["icon", "text", "icon_text"];
5
5
  export type SearchStyle = (typeof SEARCH_STYLES)[number];
6
- export declare function SearchTool({ style, stylePhone, editing }: {
6
+ export declare function SearchTool({ style, stylePhone, phonePlace, editing }: {
7
7
  style?: SearchStyle;
8
8
  stylePhone?: SearchStyle;
9
+ phonePlace?: unknown;
9
10
  editing?: boolean;
10
11
  }): import("react").JSX.Element | null;
11
- export declare function CartTool({ style, editing }: {
12
+ export declare function CartTool({ style, phonePlace, editing }: {
12
13
  style?: ToolStyle;
14
+ phonePlace?: unknown;
13
15
  editing?: boolean;
14
16
  }): import("react").JSX.Element | null;
15
- export declare function AccountTool({ style }: {
17
+ export declare function AccountTool({ style, phonePlace }: {
16
18
  style?: ToolStyle;
19
+ phonePlace?: unknown;
17
20
  }): import("react").JSX.Element | null;
18
- export declare function ThemeSwitchTool(): import("react").JSX.Element | null;
19
- export declare function CountrySwitchTool({ showAs, }: {
21
+ export declare function ThemeSwitchTool({ phonePlace }: {
22
+ phonePlace?: unknown;
23
+ }): import("react").JSX.Element | null;
24
+ export declare function CountrySwitchTool({ showAs, phonePlace, }: {
20
25
  showAs?: CountryShowAs;
26
+ phonePlace?: unknown;
21
27
  }): import("react").JSX.Element | null;
@@ -1 +1 @@
1
- "use client";import{jsx as t}from"react/jsx-runtime";import{useCart as m}from"./CartContext.js";import h,{useCountrySelectShows as p}from"./CountrySelect.js";import{AccountButton as f,CartButton as x,SearchButton as a}from"./HeaderTools.js";import d from"./ThemeToggle.js";import{useOfferToPhoneMenu as s}from"efficient-web-builder/render/components/PhoneMenuTools";import{useSearch as S}from"./SearchContext.js";import{useSiteSells as u,useSiteThemeSwitchShown as T}from"./SiteRecordContext.js";import{HideTaker as c}from"efficient-web-builder/render/components/ViewHideRoot";import{parseOption as w}from"efficient-shell/format";const C=["icon","text","icon_text"];function O({style:e="icon",stylePhone:o,editing:n=!1}){const{open:r}=S(),i=u(),l=w(C,"",o)||void 0;return s(i&&!l?"search":null),i?l?t(c,{as:"span",className:"contents",children:t(a,{onClick:n?void 0:r,asText:e==="text",withWord:e==="icon_text",phoneLook:l})}):t(c,{as:"span","data-phone-menu-tool":"search",className:"contents",children:t(a,{onClick:n?void 0:r,asText:e==="text",withWord:e==="icon_text"})}):null}function V({style:e="icon",editing:o=!1}){const{open:n,totals:r}=m();return u()?t(x,{onClick:o?()=>{}:n,count:r.sets,asText:e==="text",takesViewHide:!0}):null}function W({style:e="icon"}){const o=u();return s(o?"account":null),o?t(f,{asText:e==="text",takesViewHide:!0}):null}function M(){const e=T();return s(e?"theme":null),e?t(c,{as:"span","data-phone-menu-tool":"theme",className:"contents",children:t(d,{})}):null}function P({showAs:e}){const o=p();return s(o?"region":null),o?t(c,{as:"span","data-phone-menu-tool":"region",className:"contents",children:t(h,{showAs:e})}):null}export{W as AccountTool,V as CartTool,P as CountrySwitchTool,C as SEARCH_STYLES,O as SearchTool,M as ThemeSwitchTool};
1
+ "use client";import{jsx as t}from"react/jsx-runtime";import{useCart as T}from"./CartContext.js";import S,{useCountrySelectShows as w}from"./CountrySelect.js";import{AccountButton as p,CartButton as f,SearchButton as d}from"./HeaderTools.js";import C from"./ThemeToggle.js";import{useOfferToPhoneMenu as i}from"efficient-web-builder/render/components/PhoneMenuTools";import{useMoveAccountToPhoneMenu as k}from"./PhoneMenuAccount.js";import{useSearch as N}from"./SearchContext.js";import{useSiteSells as m,useSiteThemeSwitchShown as A}from"./SiteRecordContext.js";import{HideTaker as s}from"efficient-web-builder/render/components/ViewHideRoot";import{parseOption as x}from"efficient-shell/format";const B=["header","menu"];function l(e){return x(B,"",e)||void 0}const _=["icon","text","icon_text"];function R({style:e="icon",stylePhone:r,phonePlace:n,editing:o=!1}){const{open:c}=N(),u=m(),a=x(_,"",r)||void 0,h=!!a||l(n)==="header";return i(u&&!h?"search":null),u?h?t(s,{as:"span",className:"contents",children:t(d,{onClick:o?void 0:c,asText:e==="text",withWord:e==="icon_text",phoneLook:a})}):t(s,{as:"span","data-phone-menu-tool":"search",className:"contents",children:t(d,{onClick:o?void 0:c,asText:e==="text",withWord:e==="icon_text"})}):null}function Y({style:e="icon",phonePlace:r,editing:n=!1}){const{open:o,totals:c}=T(),u=m(),a=l(r)==="menu";return i(u&&a?"cart":null),u?a?t(s,{as:"span","data-phone-menu-tool":"cart",className:"contents",children:t(f,{onClick:n?()=>{}:o,count:c.sets,asText:e==="text"})}):t(f,{onClick:n?()=>{}:o,count:c.sets,asText:e==="text",takesViewHide:!0}):null}function b({style:e="icon",phonePlace:r}){const n=m(),o=l(r)==="menu";return i(n?"account":null),k(n&&o),n?o?t(s,{as:"span","data-phone-menu-tool":"account",className:"contents",children:t(p,{asText:e==="text"})}):t(p,{asText:e==="text",takesViewHide:!0}):null}function q({phonePlace:e}){const r=A(),n=l(e)==="header";return i(r&&!n?"theme":null),r?t(s,{as:"span",...n?null:{"data-phone-menu-tool":"theme"},className:"contents",children:t(C,{})}):null}function z({showAs:e,phonePlace:r}){const n=w(),o=l(r)==="header";return i(n&&!o?"region":null),n?t(s,{as:"span",...o?null:{"data-phone-menu-tool":"region"},className:"contents",children:t(S,{showAs:e})}):null}export{b as AccountTool,Y as CartTool,z as CountrySwitchTool,_ as SEARCH_STYLES,R as SearchTool,q as ThemeSwitchTool};
@@ -8,6 +8,7 @@ export declare const UTIL_WORDS: {
8
8
  readonly close: "Close";
9
9
  };
10
10
  export declare const UTIL_WORD_CLASS = "whitespace-nowrap";
11
+ export declare function cartLabel(count: number): string;
11
12
  export declare function CartButton({ onClick, count, asText, className, takesViewHide, }: {
12
13
  onClick: () => void;
13
14
  count: number;
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as o,Fragment as y}from"react/jsx-runtime";import N from"next/link";import{useEffect as k,useRef as w}from"react";import{CartAltIcon as v}from"efficient-shell/icons/efficient-looks";import h from"efficient-easel/screen/components/UiIcon";import{prefersReducedMotion as $}from"efficient-web-builder/render/components/useReducedMotion";import{HideTaker as _,NO_HIDE as S,useTakeViewHide as C,withViewHide as j}from"efficient-web-builder/render/components/ViewHideRoot";const l={search:"Search",account:"Account",cart:"Bag",menu:"Menu",close:"Close"},d="whitespace-nowrap";function B(n){return n>99?"99+":String(n)}function W({count:n,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:B(n)})})}function M({onClick:n,count:e,asText:s,className:r,takesViewHide:a=!1}){const c=w(null),i=w(e);return k(()=>{i.current!==e&&(i.current=e,!$()&&c.current?.animate([{transform:"scale(0.6)"},{transform:"scale(1)"}],{duration:180,easing:"ease-out"}))},[e]),t(_,{as:"button",takes:a,type:"button",onClick:n,"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 ${r??""}`,children:s?o("span",{className:d,children:[l.cart,e>0?` ${e}`:""]}):o("span",{className:"relative inline-flex",children:[t(v,{size:18,strokeWidth:"1.6","aria-hidden":"true"}),e>0?t(W,{count:e,ref:c}):null]})})}function T({asText:n,className:e,takesViewHide:s=!1}){const r=C(),a=s?r:S;return a.scope(t(N,{href:"/account","aria-label":"Account",className:j(`mono-eyebrow-ctl inline-flex items-center opacity-80 transition-opacity hover:opacity-100 ${e??""}`,a.className),...a.attrs,children:n?t("span",{className:d,children:l.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 U({onClick:n,asText:e,withWord:s,phoneLook:r,className:a}){let c=!1,i;if(r){const u=e?"text":s?"icon_text":"icon",m=(b,g)=>b&&g?"":b?"max-view-tablet:hidden":g?"view-tablet:hidden":null,p=m(u!=="text",r!=="text"),f=m(u!=="icon",r!=="icon"),x=u==="icon_text"||r==="icon_text";c=!0,i=o(y,{children:[p===null?null:t("span",{className:`inline-flex ${p}`,children:t(h,{name:"search",size:x?20:18,strokeWidth:x?1.5:1.6,rounded:!0})}),f===null?null:t("span",{className:`${d} ${f}`,children:l.search})]})}else s?(c=!0,i=o(y,{children:[t(h,{name:"search",size:20,strokeWidth:1.5,rounded:!0}),t("span",{className:`${d} max-view-tablet:hidden`,children:l.search})]})):i=e?t("span",{className:d,children:l.search}):t(h,{name:"search",size:18,strokeWidth:1.6,rounded:!0});return t("button",{type:"button",onClick:n,"aria-label":"Search",title:"Search (⌘K)",className:`mono-eyebrow-ctl inline-flex items-center ${c?"gap-2 ":""}opacity-80 transition-opacity hover:opacity-100 ${a??""}`,children:i})}export{T as AccountButton,M as CartButton,U as SearchButton,l as UTIL_WORDS,d as UTIL_WORD_CLASS};
1
+ "use client";import{jsx as e,jsxs as o,Fragment as y}from"react/jsx-runtime";import N from"next/link";import{useEffect as k,useRef as w}from"react";import{CartAltIcon as v}from"efficient-shell/icons/efficient-looks";import h from"efficient-easel/screen/components/UiIcon";import{prefersReducedMotion as $}from"efficient-web-builder/render/components/useReducedMotion";import{HideTaker as _,NO_HIDE as S,useTakeViewHide as C,withViewHide as j}from"efficient-web-builder/render/components/ViewHideRoot";const l={search:"Search",account:"Account",cart:"Bag",menu:"Menu",close:"Close"},d="whitespace-nowrap";function B(n){return n>99?"99+":String(n)}function W({count:n,ref:t}){return e("span",{ref:t,"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:e("span",{style:{color:"var(--sf-header-ground, var(--bg))"},children:B(n)})})}function A(n){return`Open cart, ${n} item${n===1?"":"s"}`}function T({onClick:n,count:t,asText:s,className:r,takesViewHide:a=!1}){const c=w(null),i=w(t);return k(()=>{i.current!==t&&(i.current=t,!$()&&c.current?.animate([{transform:"scale(0.6)"},{transform:"scale(1)"}],{duration:180,easing:"ease-out"}))},[t]),e(_,{as:"button",takes:a,type:"button",onClick:n,"aria-label":A(t),className:`mono-eyebrow-ctl inline-flex items-center gap-2 opacity-80 transition-opacity hover:opacity-100 ${r??""}`,children:s?o("span",{className:d,children:[l.cart,t>0?` ${t}`:""]}):o("span",{className:"relative inline-flex",children:[e(v,{size:18,strokeWidth:"1.6","aria-hidden":"true"}),t>0?e(W,{count:t,ref:c}):null]})})}function U({asText:n,className:t,takesViewHide:s=!1}){const r=C(),a=s?r:S;return a.scope(e(N,{href:"/account","aria-label":"Account",className:j(`mono-eyebrow-ctl inline-flex items-center opacity-80 transition-opacity hover:opacity-100 ${t??""}`,a.className),...a.attrs,children:n?e("span",{className:d,children:l.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:[e("circle",{cx:"12",cy:"8",r:"3.4"}),e("path",{d:"M5 20a7 7 0 0 1 14 0"})]})}))}function D({onClick:n,asText:t,withWord:s,phoneLook:r,className:a}){let c=!1,i;if(r){const u=t?"text":s?"icon_text":"icon",m=(b,g)=>b&&g?"":b?"max-view-tablet:hidden":g?"view-tablet:hidden":null,p=m(u!=="text",r!=="text"),f=m(u!=="icon",r!=="icon"),x=u==="icon_text"||r==="icon_text";c=!0,i=o(y,{children:[p===null?null:e("span",{className:`inline-flex ${p}`,children:e(h,{name:"search",size:x?20:18,strokeWidth:x?1.5:1.6,rounded:!0})}),f===null?null:e("span",{className:`${d} ${f}`,children:l.search})]})}else s?(c=!0,i=o(y,{children:[e(h,{name:"search",size:20,strokeWidth:1.5,rounded:!0}),e("span",{className:`${d} max-view-tablet:hidden`,children:l.search})]})):i=t?e("span",{className:d,children:l.search}):e(h,{name:"search",size:18,strokeWidth:1.6,rounded:!0});return e("button",{type:"button",onClick:n,"aria-label":"Search",title:"Search (⌘K)",className:`mono-eyebrow-ctl inline-flex items-center ${c?"gap-2 ":""}opacity-80 transition-opacity hover:opacity-100 ${a??""}`,children:i})}export{U as AccountButton,T as CartButton,D as SearchButton,l as UTIL_WORDS,d as UTIL_WORD_CLASS,A as cartLabel};
@@ -0,0 +1,6 @@
1
+ import { type ReactNode } from "react";
2
+ export declare function AccountInPhoneMenuProvider({ children }: {
3
+ children: ReactNode;
4
+ }): import("react").JSX.Element;
5
+ export declare function useMoveAccountToPhoneMenu(moved: boolean): void;
6
+ export declare function useAccountInPhoneMenu(): boolean;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as s}from"react/jsx-runtime";import{createContext as c,useContext as o,useEffect as f,useMemo as i,useState as l}from"react";const t=c(null);function a({children:n}){const[e,u]=l(!1),r=i(()=>({moved:e,setMoved:u}),[e]);return s(t.Provider,{value:r,children:n})}function x(n){const e=o(t)?.setMoved;f(()=>{if(!(!e||!n))return e(!0),()=>e(!1)},[e,n])}function d(){return o(t)?.moved??!1}export{a as AccountInPhoneMenuProvider,d as useAccountInPhoneMenu,x as useMoveAccountToPhoneMenu};
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import h from"next/link";import p from"efficient-easel/screen/components/UiIcon";import b from"./CountrySelect.js";import g from"./ThemeToggle.js";import{UTIL_WORDS as y}from"./HeaderTools.js";import{UNDER_HEADER_SHEET_CLASS as N}from"../lib/content/header-bar.js";function k({role:o,panelRef:c,name:s,entries:m,tools:n,withAccount:r,editing:d,onClose:a,onSearch:f,phoneOnly:u=!1,marker:i,listStyle:x}){const l=n&&(n.search||n.region||r&&n.account||n.theme)?n:null;return t("div",{ref:c,role:o,"aria-modal":"true","aria-label":s,tabIndex:-1,...i?{"data-menu-panel":i}:null,className:`${N} z-[60] flex flex-col overflow-y-auto bg-bg text-fg${u?" view-tablet:hidden":""}`,children:[e("ul",{className:"m-0 flex list-none flex-col px-5 py-3 font-mono text-[16px] uppercase tracking-[0.18em]",style:x,children:m}),l?t("div",{className:"mt-auto flex flex-col gap-4 border-t border-line bg-surface p-5",children:[l.search?t("button",{type:"button",className:"flex h-12 items-center gap-3 border border-line bg-bg px-4 text-left text-[15px]",onClick:d?void 0:()=>{a(),f()},children:[e(p,{name:"search",size:18,strokeWidth:1.6,rounded:!0}),y.search]}):null,r&&l.account?t("div",{className:"flex items-center justify-between",children:[e("span",{className:"mono-eyebrow text-fg-dim",children:"Account"}),e(h,{href:"/account",onClick:a,className:"mono-eyebrow underline",children:"Your account"})]}):null,l.region?t("div",{className:"flex items-center justify-between",children:[e("span",{className:"mono-eyebrow text-fg-dim",children:"Region"}),e(b,{})]}):null,l.theme?t("div",{className:"flex items-center justify-between",children:[e("span",{className:"mono-eyebrow text-fg-dim",children:"Theme"}),e(g,{})]}):null]}):null]})}export{k as PhoneSheet};
1
+ "use client";import{jsx as t,jsxs as n}from"react/jsx-runtime";import b from"next/link";import g from"efficient-easel/screen/components/UiIcon";import N from"./CountrySelect.js";import y from"./ThemeToggle.js";import{CartAltIcon as w}from"efficient-shell/icons/efficient-looks";import{useCart as j}from"./CartContext.js";import{cartLabel as v,UTIL_WORDS as u}from"./HeaderTools.js";import{UNDER_HEADER_SHEET_CLASS as C}from"../lib/content/header-bar.js";const f="flex h-12 items-center gap-3 border border-line bg-bg px-4 text-left text-[15px]";function z({role:l,panelRef:a,name:o,entries:c,tools:e,withAccount:s,editing:m,onClose:i,onSearch:h,phoneOnly:p=!1,marker:d,listStyle:x}){const r=e&&(e.search||e.cart||e.region||s&&e.account||e.theme)?e:null;return n("div",{ref:a,role:l,"aria-modal":"true","aria-label":o,tabIndex:-1,...d?{"data-menu-panel":d}:null,className:`${C} z-[60] flex flex-col overflow-y-auto bg-bg text-fg${p?" view-tablet:hidden":""}`,children:[t("ul",{className:"m-0 flex list-none flex-col px-5 py-3 font-mono text-[16px] uppercase tracking-[0.18em]",style:x,children:c}),r?n("div",{className:"mt-auto flex flex-col gap-4 border-t border-line bg-surface p-5",children:[r.search?n("button",{type:"button",className:f,onClick:m?void 0:()=>{i(),h()},children:[t(g,{name:"search",size:18,strokeWidth:1.6,rounded:!0}),u.search]}):null,r.cart?t(T,{editing:m,onClose:i}):null,s&&r.account?n("div",{className:"flex items-center justify-between",children:[t("span",{className:"mono-eyebrow text-fg-dim",children:"Account"}),t(b,{href:"/account",onClick:i,className:"mono-eyebrow underline",children:"Your account"})]}):null,r.region?n("div",{className:"flex items-center justify-between",children:[t("span",{className:"mono-eyebrow text-fg-dim",children:"Region"}),t(N,{})]}):null,r.theme?n("div",{className:"flex items-center justify-between",children:[t("span",{className:"mono-eyebrow text-fg-dim",children:"Theme"}),t(y,{})]}):null]}):null]})}function T({editing:l,onClose:a}){const{open:o,totals:c}=j(),e=c.sets;return n("button",{type:"button",className:f,"aria-label":v(e),onClick:l?void 0:()=>{a(),o()},children:[t(w,{size:18,strokeWidth:"1.6","aria-hidden":"true"}),u.cart,e>0?` ${e}`:""]})}export{z as PhoneSheet};
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as w,Fragment as dt}from"react/jsx-runtime";import{useScopeClass as ct}from"../lib/use-scope-class.js";import{useEffect as B,useMemo as g,useState as ge}from"react";import{cardHoverOf as pt}from"efficient-web-builder/format/lib/animation/hover";import{containerGapProps as gt}from"efficient-web-builder/format/lib/content/container-gap";import ut from"next/link";import{cardRowsGrid as ft,GridCardProvider as ht,GridMixedCards as xt,gridIndexCss as wt}from"./GridCardTemplate.js";import{gridClassImageSizes as vt}from"../lib/sections/card-image-sizes.js";import{fillRowCss as ue}from"../lib/sections/fill-row.js";import{hiddenCardsRule as fe,noHoleBands as he,noHoleCss as xe,ONE_WHEEL_MARK as yt,oneWheelScope as we,pairScope as bt,showsASetCard as ve}from"../lib/sections/grid-no-hole.js";import{setIsWide as Ct,summarySetBuild as St}from"../lib/wheels/set-mode.js";import{answersForKind as ye,NO_FIELD_ANSWERS as be}from"../lib/content/field-usage.js";import{wheelCardEyebrowShows as Mt}from"./ProductCardEyebrow.js";import Pt from"./NoCurrencyNote.js";import{SITE_WIDTH_CAP as Tt,centredCap as _t}from"efficient-web-builder/format/lib/content/page-width";import{ProductCatalogProvider as Et,SectionWheelsProvider as Nt}from"./ProductRef.js";import{useCurrency as Ot}from"./CurrencyContext.js";import{FRAME_ROOM_PRODUCT_GRID as Rt,FRAME_ROOM_PRODUCT_GRID_PHONE as $t,framedBandPad as It,PRODUCT_GRID_ROOM as zt,withBandClasses as Lt}from"../lib/sections/band-padding.js";import{COLLECTION_ATTR as At,useCatalogFilter as Bt}from"./catalog/CatalogFilterContext.js";import{useShopperMember as Gt}from"./catalog/ShopperScope.js";import{useBrowserLayoutEffect as Ht}from"efficient-shell/hooks";import Dt from"./wheels-plp/PlpPagination.js";import{CATALOG_TEXT_SIZE as Ft}from"../lib/sections/catalog-text-size.js";import{applyShopperFilters as kt,hasActivePlpFilters as Ut,plpPricedAmounts as Wt}from"../lib/wheels/plp-filters.js";import jt from"./catalog/ClearAllButton.js";import{GRID_TOP_UP_SPARE as Kt,gridPagingOf as Xt,gridShownOf as Zt}from"../lib/sections/product-grid-pages.js";import qt from"./SectionBand.js";import{useInsideBox as Yt,useInsideSiteGutter as Vt}from"efficient-web-builder/render/components/SiteGutterFrame";import{productGridColumnsClass as Jt}from"../lib/sections/product-grid-columns.js";import{renderGold as re,renderHeadline as Qt}from"efficient-web-builder/render/components/goldPhrases";import{applyCatalogFilters as er}from"../lib/wheels/catalog-filters.js";import{normalizeCatalogRows as tr}from"../lib/wheels/wheel-summary-casing.js";import{itemKind as G,plpKindNoun as Ce}from"../lib/catalog/plp-item.js";import{filterBarCategoryOf as rr,gridKindsOf as Se,gridRowsOf as nr}from"../lib/wheels/grid-source.js";import{useUnifiedProductCatalog as ir}from"./useProductCatalog.js";import{STICKY_UNDERHEADER_CLASS as sr}from"efficient-web-builder/render/lib/document/header-clearance";import{finishFamiliesOf as or}from"../lib/wheels/finish-defaults.js";import{lugCountsOf as ar}from"../lib/wheels/lug-count.js";import{diametersOf as lr}from"../lib/wheels/size-range.js";import{say as mr}from"efficient-web-builder/format/lib/editor-words";import{DEFAULT_TITLE_SIZE as dr}from"../lib/sections/product-grid-title.js";import{blockParts as cr}from"../lib/block-parts.js";import{PRODUCT_GRID_TYPE as pr}from"../lib/document/document-nodes.js";const m=cr(pr),gr=pt({},"ProductGrid"),i={headingMediumUpTo800Xs:"max-view-wide:text-[length:var(--size-headingMedium,28px)]",headingMediumUpTo800Small:"max-view-wide:text-[length:var(--size-headingMedium,32px)]",headingMediumUpTo800Large:"max-view-wide:text-[length:var(--size-headingMedium,36px)]",headingMediumUpTo800Xl:"max-view-wide:text-[length:var(--size-headingMedium,40px)]",body:"text-[length:var(--size-body,13px)]",headingMedium1:"text-[length:var(--size-headingMedium,40px)]",headingMedium2:"text-[length:var(--size-headingMedium,48px)]",headingMedium3:"text-[length:var(--size-headingMedium,56px)]",headingMedium4:"text-[length:var(--size-headingMedium,64px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"},Me=[{value:"para",label:"Paragraph size — 13px",cls:`font-mono font-normal uppercase tracking-[0.22em] ${i.labelLarge}`},{value:"sm",label:"Small — 40px",cls:`font-heading2 font-medium tracking-[-0.03em] ${i.headingMedium1} ${i.headingMediumUpTo800Xs}`},{value:"md",label:"Medium — 48px",cls:`font-heading2 font-medium tracking-[-0.03em] ${i.headingMedium2} ${i.headingMediumUpTo800Small}`},{value:"lg",label:"Large — 56px",cls:`font-heading2 font-medium tracking-[-0.03em] ${i.headingMedium3} ${i.headingMediumUpTo800Large}`},{value:"xl",label:"Extra large — 64px",cls:`font-heading2 font-medium tracking-[-0.03em] ${i.headingMedium4} ${i.headingMediumUpTo800Xl}`}];function ur(P){return(Me.find(v=>v.value===P)??Me.find(v=>v.value===dr)).cls}function fr({num:P,catalog:v,catalogTotal:Pe,firstCountInChips:Te=!1,kinds:N,title:H,titleSize:_e,pads:Ee,noTop:ne=!1,description:O,link:T,products:Ne,wheels:Oe,source:p,columns:Re,columnsPhone:$e,columnsTablet:Ie,limit:ze,moreProducts:Le,perPage:Ae,editing:_,contentCapped:Be=!1,hover:Ge,fieldUsage:y,ownerId:He="",template:De,gap:Fe,gapPhone:ke}){const D=g(()=>y?ye(y,"alloy-wheel"):void 0,[y]),Ue=g(()=>y?ye(y,"tyre"):void 0,[y]),e=ct("pg"),{paged:b,per:C,limit:a,cap:u}=Xt({moreProducts:Le,perPage:Ae,limit:ze}),d=Jt(Re,$e,Ie),ie=Be,We=Vt(),je=Yt(),Ke=We||je,F=ir(_===!0&&!!p),s=g(()=>p?tr(nr(p,N,F??v??[])):null,[v,F,p,N]),k=Gt("grid",s),l=s?k.scope:null,f=rr(p),S=f!==null&&!l,{filters:R,reportCount:U,reportLugs:W,reportSizes:j,reportFinishes:K,reportCategories:X,reportPrices:Z,vehicle:se}=Bt(),{currency:h}=Ot(),q=S&&!!R.process&&R.process!==f,Y=l?.state,r=g(()=>s?Y?kt(s,Y,h):S?er(s,R,h,se.fit):s:null,[s,Y,S,R,h,se.fit]),[Xe,Ze]=ge(1),V=b&&r?Math.max(1,Math.ceil(r.length/C)):1,M=Math.min(V,Math.max(1,l?l.state.page:Xe)),{reportShown:J}=k,oe=l!==null;Ht(()=>{if(!oe||!r)return J(null);J(Zt(r.length,{paged:b,per:C,cap:u},M))},[oe,r,J,b,M,C,u]);const qe=n=>l?l.update({page:n}):Ze(n),o=g(()=>r&&(b?r.slice((M-1)*C,M*C):u?r.slice(0,Math.ceil(a)+Kt):r),[b,u,a,r,M,C]);B(()=>(X(e,f===null?[]:[f]),()=>X(e,[])),[f,X,e]),B(()=>{if(S)return U(e,q?0:r?.length??0),()=>U(e,0)},[S,q,r,U,e]);const E=g(()=>({lugs:ar(s??[]),sizes:lr(s??[]),finishes:or(s??[]),prices:Wt((s??[]).filter(n=>G(n)!=="tyre"),h)}),[s,h]);B(()=>(W(e,E.lugs),j(e,E.sizes),K(e,E.finishes),Z(e,E.prices),()=>{W(e,[]),j(e,[]),K(e,[]),Z(e,[])}),[E,W,j,K,Z,e]);const Q=gt("ProductGrid",Fe,"both",ke),Ye=`${e} grid${Q.className} bg-[var(--catalog-grid-bg)] ${d}`,ae=ft(Q),Ve=`${e} grid${ae.className} bg-[var(--catalog-grid-bg)] ${d}`,Je=ae.style,Qe=g(()=>{const n=(r??[]).filter(c=>G(c)!=="tyre");if(n.length===0)return!1;const x=n.some(c=>!!c.process);return n.some(c=>!!c.setWords)||Mt({kind:!1,brand:!1,process:x},D??[])},[r,D]),et=o?o.length>0?t("div",{className:Ve,style:Je,...m("grid"),children:t(xt,{items:o,tyreOf:n=>G(n)==="tyre"?n:null})}):l&&Ut(l.state)?w("div",{className:"flex min-h-[320px] flex-col items-center justify-center gap-4 bg-surface-2 p-4 text-center",...m("grid-empty"),children:[t("span",{className:`font-mono ${i.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:`No ${Ce(Se(p,N)).many} match those filters`}),t(jt,{onClick:l.clear})]}):_?t("div",{className:"flex min-h-[320px] items-center justify-center rounded bg-surface-2 p-4 text-center",...m("grid-empty"),children:t("span",{className:`font-mono ${i.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:mr("No products in “{name}” yet",{name:p?.name??""})})}):null:t(Ne,{className:Ye,style:Q.style,minEmptyHeight:320}),tt=l?l.countInChips:Te,$=r&&!tt?r===s&&!F?Pe??r.length:r.length:null,le=Ce(Se(p,N)),rt=P||H||O||T?w("div",{className:`${sr} sticky top-[var(--sf-header-h,88px)] z-30 mb-5 flex items-center justify-between gap-4 max-view-wide:flex-wrap max-view-wide:gap-y-2 border-b border-line bg-bg/95 py-3 backdrop-blur-md ${ie||Ke?"":"-mx-[var(--sf-site-gutter,40px)] px-[var(--sf-site-gutter,40px)] max-view-wide:-mx-[min(20px,var(--sf-site-gutter,40px))] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]"}`,...m("grid-head"),children:[w("div",{className:"flex min-w-0 items-end gap-6 max-view-wide:flex-col max-view-wide:items-stretch max-view-wide:gap-3",children:[P&&t("span",{className:`font-mono ${i.labelLarge} leading-none uppercase tracking-[0.22em] text-fg-dim`,...m("grid-number"),children:re(P)}),H&&t("h2",{className:`${ur(_e)} leading-none text-fg max-view-wide:leading-[1] [&>span]:block`,...m("heading"),children:Qt(H,!1)})]}),(O||T||$!==null)&&w("div",{className:"flex items-center gap-5 max-view-wide:gap-3 view-wide:grow view-wide:justify-end",children:[O&&t("span",{className:`max-w-[340px] truncate font-display ${i.body} leading-[1.4] text-fg-dim max-view-wide:hidden view-wide:w-0 view-wide:grow view-wide:text-right`,...m("description"),children:re(O)}),T&&w(ut,{href:T.href,className:`inline-flex items-center gap-2 whitespace-nowrap font-mono ${i.labelLarge} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,...m("view-all"),children:[re(T.text),t("span",{"aria-hidden":!0,children:"→"})]}),$!==null&&w("span",{className:`whitespace-nowrap font-mono ${i.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,...m("count"),children:[$," ",$===1?le.one:le.many]})]})]}):null,I=It(Ee,zt,{noTop:ne}),{paddingTop:nt,...it}=I.style,z=ne?0:nt,st={...z===void 0?{}:{"--pg-pt":typeof z=="number"?`${z}px`:z},...it},L=g(()=>{if(!o)return null;const n=o.map(x=>G(x)!=="tyre"&&Ct(St(x))?2:1);return ve(n,a)?he(d,n,a):null},[o,d,a]),[ot,at]=ge("");B(()=>{if(o)return;const n=document.querySelector(`.${e}`);if(!n)return;const x=()=>{const c=[...n.children].map(pe=>pe.classList.contains("col-span-2")&&!pe.querySelector(yt)?2:1);at(ve(c,a)?xe(e,he(d,c,a,!1),c.length):"")};x();const te=new MutationObserver(x);return te.observe(n,{childList:!0}),()=>te.disconnect()},[o,e,d,a]);const lt=L?L[0].tracks:o?u?Math.min(o.length,a):o.length:void 0,A=L?xe(bt(e),L,o.length)+(u?fe(we(e),a+1):"")+ue(we(e),d,{limit:a,cards:o.length}):ot,me=A?"":ue(e,d,{limit:a,cards:o?.length}),de=wt(e),ce=w(dt,{children:[u&&!A&&t("style",{children:fe(e,a+1)}),A&&t("style",{children:A}),me&&t("style",{children:me}),de&&t("style",{children:de}),rt,et,b&&V>1&&t(Dt,{textSize:Ft.labelSmall,page:M,pageCount:V,onPage:qe}),t(Pt,{editing:_})]});if(q)return null;const ee=t(qt,{rootRef:k.ref,attrs:{...S&&f!==null?{...I.attrs,[At]:f}:I.attrs,...m("product-grid-block")},className:Lt(`relative z-[2] bg-bg px-[var(--sf-site-gutter,40px)] ${Rt} max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))] ${$t}`,I),column:null,inAnyBox:!0,style:st,defaults:{"--pg-pt":"120px"},children:ie?t("div",{style:_t(Tt),children:ce}):ce}),mt=s?ee:_?t(Et,{currency:h,children:ee}):t(Nt,{wheels:Oe,currency:h,children:ee});return t(ht,{value:{ownerId:He,Template:De,hover:Ge??gr,imageSizes:vt(d,lt),fieldUsage:D??be,tyreFieldUsage:Ue??be,reserveEyebrow:Qe,editing:_===!0},children:mt})}export{Me as TITLE_SIZES,fr as default};
1
+ "use client";import{jsx as t,jsxs as w,Fragment as pt}from"react/jsx-runtime";import{useScopeClass as gt}from"../lib/use-scope-class.js";import{useEffect as B,useMemo as g,useState as ue}from"react";import{cardHoverOf as ut}from"efficient-web-builder/format/lib/animation/hover";import{containerGapProps as ft}from"efficient-web-builder/format/lib/content/container-gap";import ht from"next/link";import{cardRowsGrid as xt,GridCardProvider as wt,GridMixedCards as vt,gridIndexCss as yt}from"./GridCardTemplate.js";import{gridClassImageSizes as bt}from"../lib/sections/card-image-sizes.js";import{fillRowCss as fe}from"../lib/sections/fill-row.js";import{hiddenCardsRule as he,noHoleBands as xe,noHoleCss as we,ONE_WHEEL_MARK as Ct,oneWheelScope as ve,pairScope as St,showsASetCard as ye}from"../lib/sections/grid-no-hole.js";import{setIsWide as Mt,summarySetBuild as Pt}from"../lib/wheels/set-mode.js";import{answersForKind as be,NO_FIELD_ANSWERS as Ce}from"../lib/content/field-usage.js";import{wheelCardEyebrowShows as Ot}from"./ProductCardEyebrow.js";import Tt from"./NoCurrencyNote.js";import{SITE_WIDTH_CAP as _t,centredCap as Et,withSideOnce as Se}from"efficient-web-builder/format/lib/content/page-width";import{ProductCatalogProvider as Nt,SectionWheelsProvider as Rt}from"./ProductRef.js";import{useCurrency as $t}from"./CurrencyContext.js";import{FRAME_ROOM_PRODUCT_GRID as It,FRAME_ROOM_PRODUCT_GRID_PHONE as zt,framedBandPad as Lt,PRODUCT_GRID_ROOM as At,withBandClasses as Bt}from"../lib/sections/band-padding.js";import{COLLECTION_ATTR as Gt,useCatalogFilter as Ht}from"./catalog/CatalogFilterContext.js";import{useShopperMember as Dt}from"./catalog/ShopperScope.js";import{useBrowserLayoutEffect as Ft}from"efficient-shell/hooks";import kt from"./wheels-plp/PlpPagination.js";import{CATALOG_TEXT_SIZE as Ut}from"../lib/sections/catalog-text-size.js";import{applyShopperFilters as Wt,hasActivePlpFilters as jt,plpPricedAmounts as Kt}from"../lib/wheels/plp-filters.js";import Xt from"./catalog/ClearAllButton.js";import{GRID_TOP_UP_SPARE as Zt,gridPagingOf as qt,gridShownOf as Yt}from"../lib/sections/product-grid-pages.js";import Vt from"./SectionBand.js";import{useInsideBox as Jt,useInsideSiteGutter as Qt}from"efficient-web-builder/render/components/SiteGutterFrame";import{productGridColumnsClass as er}from"../lib/sections/product-grid-columns.js";import{renderGold as re,renderHeadline as tr}from"efficient-web-builder/render/components/goldPhrases";import{applyCatalogFilters as rr}from"../lib/wheels/catalog-filters.js";import{normalizeCatalogRows as nr}from"../lib/wheels/wheel-summary-casing.js";import{itemKind as G,plpKindNoun as Me}from"../lib/catalog/plp-item.js";import{filterBarCategoryOf as ir,gridKindsOf as Pe,gridRowsOf as sr}from"../lib/wheels/grid-source.js";import{useUnifiedProductCatalog as or}from"./useProductCatalog.js";import{STICKY_UNDERHEADER_CLASS as ar}from"efficient-web-builder/render/lib/document/header-clearance";import{finishFamiliesOf as lr}from"../lib/wheels/finish-defaults.js";import{lugCountsOf as dr}from"../lib/wheels/lug-count.js";import{diametersOf as mr}from"../lib/wheels/size-range.js";import{say as cr}from"efficient-web-builder/format/lib/editor-words";import{DEFAULT_TITLE_SIZE as pr}from"../lib/sections/product-grid-title.js";import{blockParts as gr}from"../lib/block-parts.js";import{PRODUCT_GRID_TYPE as ur}from"../lib/document/document-nodes.js";import{useSideSpaceOnce as fr}from"efficient-web-builder/render/components/SideSpaceOnce";const d=gr(ur),hr=ut({},"ProductGrid"),i={headingMediumUpTo800Xs:"max-view-wide:text-[length:var(--size-headingMedium,28px)]",headingMediumUpTo800Small:"max-view-wide:text-[length:var(--size-headingMedium,32px)]",headingMediumUpTo800Large:"max-view-wide:text-[length:var(--size-headingMedium,36px)]",headingMediumUpTo800Xl:"max-view-wide:text-[length:var(--size-headingMedium,40px)]",body:"text-[length:var(--size-body,13px)]",headingMedium1:"text-[length:var(--size-headingMedium,40px)]",headingMedium2:"text-[length:var(--size-headingMedium,48px)]",headingMedium3:"text-[length:var(--size-headingMedium,56px)]",headingMedium4:"text-[length:var(--size-headingMedium,64px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"},Oe=[{value:"para",label:"Paragraph size — 13px",cls:`font-mono font-normal uppercase tracking-[0.22em] ${i.labelLarge}`},{value:"sm",label:"Small — 40px",cls:`font-heading2 font-medium tracking-[-0.03em] ${i.headingMedium1} ${i.headingMediumUpTo800Xs}`},{value:"md",label:"Medium — 48px",cls:`font-heading2 font-medium tracking-[-0.03em] ${i.headingMedium2} ${i.headingMediumUpTo800Small}`},{value:"lg",label:"Large — 56px",cls:`font-heading2 font-medium tracking-[-0.03em] ${i.headingMedium3} ${i.headingMediumUpTo800Large}`},{value:"xl",label:"Extra large — 64px",cls:`font-heading2 font-medium tracking-[-0.03em] ${i.headingMedium4} ${i.headingMediumUpTo800Xl}`}];function xr(P){return(Oe.find(v=>v.value===P)??Oe.find(v=>v.value===pr)).cls}function wr({num:P,catalog:v,catalogTotal:Te,firstCountInChips:_e=!1,kinds:E,title:H,titleSize:Ee,pads:Ne,noTop:ne=!1,description:N,link:O,products:Re,wheels:$e,source:p,columns:Ie,columnsPhone:ze,columnsTablet:Le,limit:Ae,moreProducts:Be,perPage:Ge,editing:T,contentCapped:He=!1,hover:De,fieldUsage:y,ownerId:Fe="",template:ke,gap:Ue,gapPhone:We}){const ie=fr(),D=g(()=>y?be(y,"alloy-wheel"):void 0,[y]),je=g(()=>y?be(y,"tyre"):void 0,[y]),e=gt("pg"),{paged:b,per:C,limit:a,cap:u}=qt({moreProducts:Be,perPage:Ge,limit:Ae}),m=er(Ie,ze,Le),se=He,Ke=Qt(),Xe=Jt(),Ze=Ke||Xe,F=or(T===!0&&!!p),s=g(()=>p?nr(sr(p,E,F??v??[])):null,[v,F,p,E]),k=Dt("grid",s),l=s?k.scope:null,f=ir(p),S=f!==null&&!l,{filters:R,reportCount:U,reportLugs:W,reportSizes:j,reportFinishes:K,reportCategories:X,reportPrices:Z,vehicle:oe}=Ht(),{currency:h}=$t(),q=S&&!!R.process&&R.process!==f,Y=l?.state,r=g(()=>s?Y?Wt(s,Y,h):S?rr(s,R,h,oe.fit):s:null,[s,Y,S,R,h,oe.fit]),[qe,Ye]=ue(1),V=b&&r?Math.max(1,Math.ceil(r.length/C)):1,M=Math.min(V,Math.max(1,l?l.state.page:qe)),{reportShown:J}=k,ae=l!==null;Ft(()=>{if(!ae||!r)return J(null);J(Yt(r.length,{paged:b,per:C,cap:u},M))},[ae,r,J,b,M,C,u]);const Ve=n=>l?l.update({page:n}):Ye(n),o=g(()=>r&&(b?r.slice((M-1)*C,M*C):u?r.slice(0,Math.ceil(a)+Zt):r),[b,u,a,r,M,C]);B(()=>(X(e,f===null?[]:[f]),()=>X(e,[])),[f,X,e]),B(()=>{if(S)return U(e,q?0:r?.length??0),()=>U(e,0)},[S,q,r,U,e]);const _=g(()=>({lugs:dr(s??[]),sizes:mr(s??[]),finishes:lr(s??[]),prices:Kt((s??[]).filter(n=>G(n)!=="tyre"),h)}),[s,h]);B(()=>(W(e,_.lugs),j(e,_.sizes),K(e,_.finishes),Z(e,_.prices),()=>{W(e,[]),j(e,[]),K(e,[]),Z(e,[])}),[_,W,j,K,Z,e]);const Q=ft("ProductGrid",Ue,"both",We),Je=`${e} grid${Q.className} bg-[var(--catalog-grid-bg)] ${m}`,le=xt(Q),Qe=`${e} grid${le.className} bg-[var(--catalog-grid-bg)] ${m}`,et=le.style,tt=g(()=>{const n=(r??[]).filter(c=>G(c)!=="tyre");if(n.length===0)return!1;const x=n.some(c=>!!c.process);return n.some(c=>!!c.setWords)||Ot({kind:!1,brand:!1,process:x},D??[])},[r,D]),rt=o?o.length>0?t("div",{className:Qe,style:et,...d("grid"),children:t(vt,{items:o,tyreOf:n=>G(n)==="tyre"?n:null})}):l&&jt(l.state)?w("div",{className:"flex min-h-[320px] flex-col items-center justify-center gap-4 bg-surface-2 p-4 text-center",...d("grid-empty"),children:[t("span",{className:`font-mono ${i.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:`No ${Me(Pe(p,E)).many} match those filters`}),t(Xt,{onClick:l.clear})]}):T?t("div",{className:"flex min-h-[320px] items-center justify-center rounded bg-surface-2 p-4 text-center",...d("grid-empty"),children:t("span",{className:`font-mono ${i.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:cr("No products in “{name}” yet",{name:p?.name??""})})}):null:t(Re,{className:Je,style:Q.style,minEmptyHeight:320}),nt=l?l.countInChips:_e,$=r&&!nt?r===s&&!F?Te??r.length:r.length:null,de=Me(Pe(p,E)),it=P||H||N||O?w("div",{className:Se(`${ar} sticky top-[var(--sf-header-h,88px)] z-30 mb-5 flex items-center justify-between gap-4 max-view-wide:flex-wrap max-view-wide:gap-y-2 border-b border-line bg-bg/95 py-3 backdrop-blur-md ${se||Ze?"":"-mx-[var(--sf-site-gutter,40px)] px-[var(--sf-site-gutter,40px)] max-view-wide:-mx-[min(20px,var(--sf-site-gutter,40px))] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]"}`,ie),...d("grid-head"),children:[w("div",{className:"flex min-w-0 items-end gap-6 max-view-wide:flex-col max-view-wide:items-stretch max-view-wide:gap-3",children:[P&&t("span",{className:`font-mono ${i.labelLarge} leading-none uppercase tracking-[0.22em] text-fg-dim`,...d("grid-number"),children:re(P)}),H&&t("h2",{className:`${xr(Ee)} leading-none text-fg max-view-wide:leading-[1] [&>span]:block`,...d("heading"),children:tr(H,!1)})]}),(N||O||$!==null)&&w("div",{className:"flex items-center gap-5 max-view-wide:gap-3 view-wide:grow view-wide:justify-end",children:[N&&t("span",{className:`max-w-[340px] truncate font-display ${i.body} leading-[1.4] text-fg-dim max-view-wide:hidden view-wide:w-0 view-wide:grow view-wide:text-right`,...d("description"),children:re(N)}),O&&w(ht,{href:O.href,className:`inline-flex items-center gap-2 whitespace-nowrap font-mono ${i.labelLarge} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,...d("view-all"),children:[re(O.text),t("span",{"aria-hidden":!0,children:"→"})]}),$!==null&&w("span",{className:`whitespace-nowrap font-mono ${i.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,...d("count"),children:[$," ",$===1?de.one:de.many]})]})]}):null,I=Lt(Ne,At,{noTop:ne}),{paddingTop:st,...ot}=I.style,z=ne?0:st,at={...z===void 0?{}:{"--pg-pt":typeof z=="number"?`${z}px`:z},...ot},L=g(()=>{if(!o)return null;const n=o.map(x=>G(x)!=="tyre"&&Mt(Pt(x))?2:1);return ye(n,a)?xe(m,n,a):null},[o,m,a]),[lt,dt]=ue("");B(()=>{if(o)return;const n=document.querySelector(`.${e}`);if(!n)return;const x=()=>{const c=[...n.children].map(ge=>ge.classList.contains("col-span-2")&&!ge.querySelector(Ct)?2:1);dt(ye(c,a)?we(e,xe(m,c,a,!1),c.length):"")};x();const te=new MutationObserver(x);return te.observe(n,{childList:!0}),()=>te.disconnect()},[o,e,m,a]);const mt=L?L[0].tracks:o?u?Math.min(o.length,a):o.length:void 0,A=L?we(St(e),L,o.length)+(u?he(ve(e),a+1):"")+fe(ve(e),m,{limit:a,cards:o.length}):lt,me=A?"":fe(e,m,{limit:a,cards:o?.length}),ce=yt(e),pe=w(pt,{children:[u&&!A&&t("style",{children:he(e,a+1)}),A&&t("style",{children:A}),me&&t("style",{children:me}),ce&&t("style",{children:ce}),it,rt,b&&V>1&&t(kt,{textSize:Ut.labelSmall,page:M,pageCount:V,onPage:Ve}),t(Tt,{editing:T})]});if(q)return null;const ee=t(Vt,{rootRef:k.ref,attrs:{...S&&f!==null?{...I.attrs,[Gt]:f}:I.attrs,...d("product-grid-block")},className:Bt(Se(`relative z-[2] bg-bg px-[var(--sf-site-gutter,40px)] ${It} max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))] ${zt}`,ie),I),column:null,inAnyBox:!0,style:at,defaults:{"--pg-pt":"120px"},children:se?t("div",{style:Et(_t),children:pe}):pe}),ct=s?ee:T?t(Nt,{currency:h,children:ee}):t(Rt,{wheels:$e,currency:h,children:ee});return t(wt,{value:{ownerId:Fe,Template:ke,hover:De??hr,imageSizes:bt(m,mt),fieldUsage:D??Ce,tyreFieldUsage:je??Ce,reserveEyebrow:tt,editing:T===!0},children:ct})}export{Oe as TITLE_SIZES,wr as default};
@@ -1 +1 @@
1
- "use client";import{jsx as t,Fragment as g,jsxs as c}from"react/jsx-runtime";import{partSkus as Le}from"../lib/catalog/part-skus.js";import ee from"next/link";import{useEffect as te,useRef as ae,useState as Ie}from"react";import{useCart as Pe}from"./CartContext.js";import{useSiteTakesOrders as $e}from"./SiteRecordContext.js";import He from"./EmailCaptureForm.js";import{useEnglish as le}from"./EnglishVariant.js";import{MarkedLabel as ne,heroView as Me}from"./product-hero/hero-view.js";import{useRootIsDark as Ue}from"efficient-shell/theme";import{useStockAlertSignup as je}from"./useStockAlertSignup.js";import{SPARE_WORDS as ze,productCartLine as De}from"../lib/catalog/purchase.js";import{OPTION_ROW_ATTR as Be}from"../lib/catalog/store-product.js";import{resolvingRowsAnswered as Ve}from"../lib/catalog/product-options.js";import{trackViewItem as Fe}from"../lib/google-tag.js";import{DEFAULT_HERO_LAYOUT as Ye,DEFAULT_HERO_RATIO as Ke,DEFAULT_HERO_TEXT_ALIGN as Qe,parseHeroLayout as We,parseHeroRatio as Xe,parseHeroTextAlign as Ge}from"../lib/sections/hero-arrangement.js";import{MAX_SPARES as qe,UNITS_PER_SET as re,formatPrice as se}from"../lib/commerce.js";import{formatSelectionPrice as Je,setPriceLabel as Ze}from"../lib/wheels/price-display.js";import{productIsDually as et,productIsTwoObjects as tt,setSuppressesRow as at}from"../lib/wheels/set-mode.js";import{CONTENT_CAP_GUTTER as ie}from"../lib/sections/content-cap-gutter.js";import{STICKY_COLUMNS_CLASS as lt,STICKY_SECTION_ATTR as nt}from"../lib/sections/hero-sticky.js";import{useStickyColumns as rt}from"./useStickyColumns.js";import{BLOCK_ALIGN_TEXT as st}from"efficient-web-builder/format/lib/content/block-align";import{CardTemplateRows as I}from"efficient-web-builder/render/components/CardRowContext";import{InsideSiteColumn as P}from"efficient-web-builder/render/components/SiteGutterFrame";import{cardRow as it}from"efficient-web-builder/format/lib/content/card-template";import{optionCardRows as ot}from"../lib/sections/filter-option-rows.js";import{HERO_OPTION_SLOT as ct}from"../lib/content/hero-option-seed.js";import{HERO_BUY_SLOT as mt,HERO_QUANTITY_PART as pt,HERO_SAVE_PART as dt}from"../lib/content/hero-buy-seed.js";import{HERO_PART as f}from"../lib/content/hero-seed.js";import ut from"./card-pieces/CardQuantity.js";import ft from"./card-pieces/CardSave.js";import ht from"./card-pieces/CardStatedFacts.js";import{HeroStateProvider as bt}from"./card-pieces/ProductCardState.js";import{PRODUCT_HERO_TYPE as $}from"../lib/document/document-nodes.js";const gt=4e3;function xt(e){return e?[e.year,e.make,e.model,e.modification].join("-"):""}const oe=[{}],vt=(e,r)=>r===pt?t(ut,{}):r===dt?t(ft,{}):null,kt="[&>[data-sf-repeat]]:contents [&>[data-sf-repeat]>div]:contents";function Tt({product:e,selection:r,onLightbox:o,editing:s=!1,showVehicleFitment:i=!0,heroLayout:l=Ye,imageRatio:n=Ke,textAlign:y=Qe,showSpecTable:me=!0,stickyColumns:pe=!1,nodeId:S,template:de,optionTemplate:ue,optionPressTitles:fe,buyTemplate:he}){const be=le(),x=We(l),H=Ge(y),k=Xe(n),N=pe===!0&&x!=="stacked",M=ae(null);rt(M,N);const ge=x==="imageRight"?`${100-k}fr ${k}fr`:`${k}fr ${100-k}fr`,{picked:xe,pick:U,qty:j,setQty:ve,choice:z,setChoice:ke,angleIdx:Nt,setAngleIdx:wt,showValidation:Te,setShowValidation:w,manualMode:D,vehicle:_,rows:B,facts:ye,part:d,outOfStock:V,offer:F,preOrder:O,canAddToCart:Y,currency:h,price:p,set:K,msrpLabel:Se}=r,m=Me(e,r,s),R=et(e),Ne=tt(e),C=i?m.vehicle:null,we=i?m.vehicleMemory:null,Q=!Ue({whenUnset:!0}),{warmCatalog:W}=Pe(),T=$e();te(()=>{!s&&T&&W(e.kind,e.slug)},[s,T,e.kind,e.slug,W]);const X=B.filter(a=>!O||a.values.length>0),G=X.filter(a=>a.role==="resolves"),A=X.filter(a=>a.role==="describes"&&!at(Ne,a.key)),q=A.findIndex(a=>a.chosen===null),J=(!C||!m.vehicleAnswersSpecs||r.fitmentSet)&&Ve(B,O)?q===-1?A:A.slice(0,q+1):[],_e=[...G,...J];function Oe(){return Y?(w(!1),s?null:De(e,d,xe,{choice:z,qty:j},{fitmentLabel:D?m.specCaption:_.appliedName?`For ${_.appliedName}`:"",fitmentKey:D?`manual|${m.specCaption}`:`vehicle|${xt(_.applied?.vehicle)}`})):(w(!0),window.setTimeout(()=>w(!1),gt),null)}const Re={kind:"hero",msrpLabel:Se||null,amount:R?Ze(p,h):Je(p,h),unitLabel:p.priced?m.unitLabel:null,packBadge:p.setTotal!=null?`${F.quantityLabel}: ${se(K,h)}`:null,buy:{isSet:R,priced:p.priced,outOfStock:V,canAdd:Y,totalLabel:p.setTotal!=null?se(K,h):null,lineToAdd:Oe},qty:j,setQty:ve,takesQty:T&&!(R&&!p.priced),save:{slug:e.slug,name:e.name},facts:me?ye:null,title:{eyebrow:e.eyebrow,name:m.heading,badge:e.badge||null},product:e,selection:r,openLightbox:o,sku:Le(d)},E={nodeId:S??"",template:ue,pressTitles:fe,editing:s},u=!!(O&&m.preOrder),Ce={[f.fitmentLine]:we,[f.options]:c(g,{children:[G.map(a=>t(ce,{row:a,onPick:U,options:E},a.key)),!u&&C,!u&&J.map(a=>t(ce,{row:a,onPick:U,options:E},a.key))]}),[f.facts]:u?null:t(ht,{}),[f.howMany]:u?null:t(yt,{offer:F,takesOrders:T,choice:z,setChoice:ke,options:E}),[f.buy]:u?m.preOrder:t(P,{children:t(I,{ownerId:S??"",ownerType:$,slot:mt,Template:he,rows:oe,fallback:null,hostParts:vt,children:a=>a})}),[f.notify]:!u&&V&&d?t(St,{partNumbers:d.components.map(a=>a.partNumber),productSlug:e.slug},d.id):null,[f.reminder]:!u&&Te?Ee():null},Ae=(a,b)=>Ce[b]??null;function Ee(){const a=_e.filter(L=>L.chosen===null).map(L=>be(L.prompt).replace(/^Select\s+/i,""));if(C&&m.vehicleAnswersSpecs&&!r.fitmentSet&&a.push("vehicle fitment"),a.length===0)return null;const b=a.length===1?a[0]:a.length===2?`${a[0]} and ${a[1]}`:`${a.slice(0,-1).join(", ")}, and ${a.at(-1)}`;return c("p",{role:"alert",className:"-mt-1 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em]",style:{color:"var(--alert)"},children:["Please select ",b," first."]})}const Z=ae(null);return te(()=>{s||Z.current===e.slug||(Z.current=e.slug,Fe({itemId:d?`${e.slug}|${d.id}`:e.slug,itemName:e.name,variant:m.metaValue,pricePerSet:p.setTotal??p.fromSetTotal??0,currency:h}))},[s,e.slug,e.name,m.metaValue,d,p,h]),c(g,{children:[t("nav",{className:`border-b border-line ${ie} pt-4 pb-4 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))]`,style:Q?void 0:{background:"var(--section-bg)"},children:e.crumbs.map((a,b)=>c("span",{children:[b>0&&c(g,{children:[t("span",{className:"mx-3 text-accent",children:"/"}),t("wbr",{})]}),a.href?t(ee,{href:a.href,className:"hover:text-fg",children:t(ne,{text:a.label})}):t("span",{className:"text-fg",children:t(ne,{text:a.label})})]},`${a.label}-${b}`))}),t("section",{ref:M,"data-hero-layout":x,"data-hero-align":H,...N?{[nt]:""}:{},className:[`grid gap-10 ${ie} py-14 max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))] max-view-tablet:py-8 ${kt}`,H==="center"?st.center:"",x==="stacked"?"grid-cols-1":"[grid-template-columns:var(--hero-cols)] max-view-desktop:[grid-template-columns:minmax(0,1fr)]",N?lt:""].filter(Boolean).join(" "),style:{...Q?{}:{background:"var(--section-bg)"},...x==="stacked"?{}:{"--hero-cols":ge}},children:t(bt,{value:Re,children:t(P,{children:t(I,{ownerId:S??"",ownerType:$,Template:de,rows:oe,fallback:null,hostParts:Ae,children:a=>a})})})})]})}function yt({offer:e,takesOrders:r,choice:o,setChoice:s,options:i}){return e.packs.length>0||r&&(e.extra||e.spareCounts.length>0)?c("div",{className:"border-b border-line pb-[26px]",children:[e.packs.length>0&&c(g,{children:[t("div",{className:"mb-3.5 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.22em] text-fg",children:"How many"}),t("div",{className:"flex flex-wrap gap-1.5",children:t(v,{hero:i,values:e.packs,item:l=>({label:l.label}),picked:l=>o.unit===l.value,press:l=>()=>s(n=>({...n,unit:l.value}))})})]}),r&&e.extra&&c("label",{className:`${e.packs.length>0?"mt-3.5 ":""}flex cursor-pointer items-center gap-3 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.16em] text-fg`,children:[t("input",{type:"checkbox",checked:o.spares>0,onChange:l=>s(n=>({...n,spares:l.target.checked?qe:0})),className:"h-4 w-4 cursor-pointer accent-[var(--accent)]"}),e.extra.label]}),r&&e.spareCounts.length>0&&c(g,{children:[t("div",{className:"mb-3.5 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.22em] text-fg",children:ze.howMany}),t("div",{className:"flex flex-col gap-1.5 sm:flex-row sm:flex-wrap",children:t(v,{hero:i,values:e.spareCounts,item:l=>({label:`${l.value} · ${l.label}`}),picked:l=>o.spares===l.value-re,press:l=>()=>s(n=>({...n,spares:l.value-re}))})})]}),r&&e.spareSide&&c(g,{children:[t("div",{className:"mb-3.5 mt-[26px] font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.22em] text-fg",children:e.spareSide.label}),t("div",{className:"flex flex-wrap gap-1.5",children:t(v,{hero:i,values:e.spareSide.options,item:l=>({label:l.label}),picked:l=>o.spareSide===l.value,press:l=>()=>s(n=>({...n,spareSide:l.value}))})})]})]}):null}function ce({row:e,onPick:r,options:o}){const s=le();if(e.values.length===0&&!e.empty)return null;const i=e.values.find(n=>n.value===e.chosen),l=i&&[i.label,i.note].filter(Boolean).join(" · ");return c("div",{className:"border-b border-line pb-[26px]",[Be]:e.key,children:[c("div",{className:"mb-3.5 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.22em] text-fg",children:[s(e.label)," · ",t("span",{className:"text-accent",children:l??s(e.prompt)})]}),e.values.length===0?c("p",{className:"font-mono text-[length:var(--size-body,12px)] leading-relaxed tracking-[0.1em] text-fg-dim",children:[e.empty.text," ",t(ee,{href:e.empty.href,className:"text-accent hover:underline",children:e.empty.linkText})]}):e.display==="swatch"?t("div",{className:"flex flex-wrap gap-2 [&>*]:max-w-full",children:t(v,{hero:o,values:e.values,item:n=>({swatch:n.swatch??"",name:n.label}),picked:n=>n.value===e.chosen,press:n=>()=>r(e.key,n.value)})}):t("div",{className:"flex flex-wrap gap-1.5",children:t(v,{hero:o,values:e.values,item:n=>({label:n.label,note:n.note??""}),picked:n=>n.value===e.chosen,press:n=>()=>r(e.key,n.value)})})]})}function v({hero:e,values:r,item:o,picked:s,press:i}){const l=ot(r,{item:o,selected:s,press:i});return t(P,{children:t(I,{ownerId:e.nodeId,ownerType:$,slot:ct,Template:e.template,rows:l.items.map(it),items:l.items,states:l.states,actions:e.editing?void 0:l.actions,pressTitles:e.pressTitles,fallback:null,children:n=>n})})}function St({partNumbers:e,productSlug:r}){const[o,s]=Ie(""),{status:i,submit:l,reset:n}=je();function y(){l({partNumbers:e,email:o,productSlug:r})}return i==="sent"?t("p",{className:"-mt-1 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-accent",children:"We'll email you when it's back."}):t(He,{className:"-mt-1",email:o,onEmailChange:s,status:i,onResetVerdict:n,onSubmit:y,inputAriaLabel:"Email for the back-in-stock alert",submitLabel:"Notify me when back",buttonClassName:"cursor-pointer whitespace-nowrap border-2 border-btn px-4 font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.22em] text-btn transition-colors hover:bg-btn hover:text-btn-ink disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-btn",errorMessage:"Couldn't save that — please try again."})}export{Tt as default};
1
+ "use client";import{jsx as t,Fragment as g,jsxs as c}from"react/jsx-runtime";import{partSkus as He}from"../lib/catalog/part-skus.js";import ae from"next/link";import{useEffect as le,useRef as re,useState as Me}from"react";import{useCart as Ue}from"./CartContext.js";import{useSiteTakesOrders as je}from"./SiteRecordContext.js";import ze from"./EmailCaptureForm.js";import{useEnglish as ne}from"./EnglishVariant.js";import{MarkedLabel as se,heroView as De}from"./product-hero/hero-view.js";import{useRootIsDark as Be}from"efficient-shell/theme";import{useStockAlertSignup as Ve}from"./useStockAlertSignup.js";import{SPARE_WORDS as Fe,productCartLine as Ye}from"../lib/catalog/purchase.js";import{OPTION_ROW_ATTR as Ke}from"../lib/catalog/store-product.js";import{resolvingRowsAnswered as Qe}from"../lib/catalog/product-options.js";import{trackViewItem as We}from"../lib/google-tag.js";import{DEFAULT_HERO_LAYOUT as Xe,DEFAULT_HERO_RATIO as Ge,DEFAULT_HERO_TEXT_ALIGN as qe,parseHeroLayout as Je,parseHeroRatio as Ze,parseHeroTextAlign as et}from"../lib/sections/hero-arrangement.js";import{MAX_SPARES as tt,UNITS_PER_SET as oe,formatPrice as ie}from"../lib/commerce.js";import{formatSelectionPrice as at,setPriceLabel as lt}from"../lib/wheels/price-display.js";import{productIsDually as rt,productIsTwoObjects as nt,setSuppressesRow as st}from"../lib/wheels/set-mode.js";import{CONTENT_CAP_GUTTER as ce}from"../lib/sections/content-cap-gutter.js";import{STICKY_COLUMNS_CLASS as ot,STICKY_SECTION_ATTR as it}from"../lib/sections/hero-sticky.js";import{useStickyColumns as ct}from"./useStickyColumns.js";import{BLOCK_ALIGN_TEXT as mt}from"efficient-web-builder/format/lib/content/block-align";import{CardTemplateRows as I}from"efficient-web-builder/render/components/CardRowContext";import{InsideSiteColumn as P}from"efficient-web-builder/render/components/SiteGutterFrame";import{cardRow as pt}from"efficient-web-builder/format/lib/content/card-template";import{optionCardRows as dt}from"../lib/sections/filter-option-rows.js";import{HERO_OPTION_SLOT as ut}from"../lib/content/hero-option-seed.js";import{HERO_BUY_SLOT as ft,HERO_QUANTITY_PART as ht,HERO_SAVE_PART as bt}from"../lib/content/hero-buy-seed.js";import{HERO_PART as f}from"../lib/content/hero-seed.js";import gt from"./card-pieces/CardQuantity.js";import xt from"./card-pieces/CardSave.js";import vt from"./card-pieces/CardStatedFacts.js";import{HeroStateProvider as kt}from"./card-pieces/ProductCardState.js";import{PRODUCT_HERO_TYPE as $}from"../lib/document/document-nodes.js";import{withSideOnce as me}from"efficient-web-builder/format/lib/content/page-width";import{useSideSpaceOnce as Tt}from"efficient-web-builder/render/components/SideSpaceOnce";import{withRootPad as pe}from"efficient-web-builder/render/lib/content/section-own-pads";import{useSplitPads as St}from"./SectionPadScope.js";const yt=4e3;function wt(e){return e?[e.year,e.make,e.model,e.modification].join("-"):""}const de=[{}],_t=(e,n)=>n===ht?t(gt,{}):n===bt?t(xt,{}):null,Nt="[&>[data-sf-repeat]]:contents [&>[data-sf-repeat]>div]:contents";function Ot({product:e,selection:n,onLightbox:i,editing:s=!1,showVehicleFitment:o=!0,heroLayout:l=Xe,imageRatio:r=Ge,textAlign:S=qe,showSpecTable:fe=!0,stickyColumns:he=!1,nodeId:y,template:be,optionTemplate:ge,optionPressTitles:xe,buyTemplate:ve}){const H=Tt(),ke=ne(),x=Je(l),M=et(S),k=Ze(r),w=he===!0&&x!=="stacked",U=re(null);ct(U,w);const Te=x==="imageRight"?`${100-k}fr ${k}fr`:`${k}fr ${100-k}fr`,{picked:Se,pick:j,qty:z,setQty:ye,choice:D,setChoice:we,angleIdx:At,setAngleIdx:Et,showValidation:_e,setShowValidation:_,manualMode:B,vehicle:N,rows:V,facts:Ne,part:d,outOfStock:F,offer:Y,preOrder:O,canAddToCart:K,currency:h,price:p,set:Q,msrpLabel:Oe}=n,m=De(e,n,s),R=rt(e),Re=nt(e),C=o?m.vehicle:null,Ce=o?m.vehicleMemory:null,W=!Be({whenUnset:!0}),{warmCatalog:X}=Ue(),T=je();le(()=>{!s&&T&&X(e.kind,e.slug)},[s,T,e.kind,e.slug,X]);const G=V.filter(a=>!O||a.values.length>0),q=G.filter(a=>a.role==="resolves"),A=G.filter(a=>a.role==="describes"&&!st(Re,a.key)),J=A.findIndex(a=>a.chosen===null),Z=(!C||!m.vehicleAnswersSpecs||n.fitmentSet)&&Qe(V,O)?J===-1?A:A.slice(0,J+1):[],Ae=[...q,...Z];function Ee(){return K?(_(!1),s?null:Ye(e,d,Se,{choice:D,qty:z},{fitmentLabel:B?m.specCaption:N.appliedName?`For ${N.appliedName}`:"",fitmentKey:B?`manual|${m.specCaption}`:`vehicle|${wt(N.applied?.vehicle)}`})):(_(!0),window.setTimeout(()=>_(!1),yt),null)}const Le={kind:"hero",msrpLabel:Oe||null,amount:R?lt(p,h):at(p,h),unitLabel:p.priced?m.unitLabel:null,packBadge:p.setTotal!=null?`${Y.quantityLabel}: ${ie(Q,h)}`:null,buy:{isSet:R,priced:p.priced,outOfStock:F,canAdd:K,totalLabel:p.setTotal!=null?ie(Q,h):null,lineToAdd:Ee},qty:z,setQty:ye,takesQty:T&&!(R&&!p.priced),save:{slug:e.slug,name:e.name},facts:fe?Ne:null,title:{eyebrow:e.eyebrow,name:m.heading,badge:e.badge||null},product:e,selection:n,openLightbox:i,sku:He(d)},E={nodeId:y??"",template:ge,pressTitles:xe,editing:s},u=!!(O&&m.preOrder),Ie={[f.fitmentLine]:Ce,[f.options]:c(g,{children:[q.map(a=>t(ue,{row:a,onPick:j,options:E},a.key)),!u&&C,!u&&Z.map(a=>t(ue,{row:a,onPick:j,options:E},a.key))]}),[f.facts]:u?null:t(vt,{}),[f.howMany]:u?null:t(Rt,{offer:Y,takesOrders:T,choice:D,setChoice:we,options:E}),[f.buy]:u?m.preOrder:t(P,{children:t(I,{ownerId:y??"",ownerType:$,slot:ft,Template:ve,rows:de,fallback:null,hostParts:_t,children:a=>a})}),[f.notify]:!u&&F&&d?t(Ct,{partNumbers:d.components.map(a=>a.partNumber),productSlug:e.slug},d.id):null,[f.reminder]:!u&&_e?$e():null},Pe=(a,b)=>Ie[b]??null;function $e(){const a=Ae.filter(L=>L.chosen===null).map(L=>ke(L.prompt).replace(/^Select\s+/i,""));if(C&&m.vehicleAnswersSpecs&&!n.fitmentSet&&a.push("vehicle fitment"),a.length===0)return null;const b=a.length===1?a[0]:a.length===2?`${a[0]} and ${a[1]}`:`${a.slice(0,-1).join(", ")}, and ${a.at(-1)}`;return c("p",{role:"alert",className:"-mt-1 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em]",style:{color:"var(--alert)"},children:["Please select ",b," first."]})}const ee=re(null);le(()=>{s||ee.current===e.slug||(ee.current=e.slug,We({itemId:d?`${e.slug}|${d.id}`:e.slug,itemName:e.name,variant:m.metaValue,pricePerSet:p.setTotal??p.fromSetTotal??0,currency:h}))},[s,e.slug,e.name,m.metaValue,d,p,h]);const te=St();return c(g,{children:[t("nav",{...pe(me(`border-b border-line ${ce} pt-4 pb-4 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))]`,H),te?.first?.atTop,W?void 0:{background:"var(--section-bg)"}),children:e.crumbs.map((a,b)=>c("span",{children:[b>0&&c(g,{children:[t("span",{className:"mx-3 text-accent",children:"/"}),t("wbr",{})]}),a.href?t(ae,{href:a.href,className:"hover:text-fg",children:t(se,{text:a.label})}):t("span",{className:"text-fg",children:t(se,{text:a.label})})]},`${a.label}-${b}`))}),t("section",{ref:U,"data-hero-layout":x,"data-hero-align":M,...w?{[it]:""}:{},...pe([me(`grid gap-10 ${ce} py-14 max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))] max-view-tablet:py-8 ${Nt}`,H),M==="center"?mt.center:"",x==="stacked"?"grid-cols-1":"[grid-template-columns:var(--hero-cols)] max-view-desktop:[grid-template-columns:minmax(0,1fr)]",w?ot:""].filter(Boolean).join(" "),te?.second?.atTop,{...W?{}:{background:"var(--section-bg)"},...x==="stacked"?{}:{"--hero-cols":Te}}),children:t(kt,{value:Le,children:t(P,{children:t(I,{ownerId:y??"",ownerType:$,Template:be,rows:de,fallback:null,hostParts:Pe,children:a=>a})})})})]})}function Rt({offer:e,takesOrders:n,choice:i,setChoice:s,options:o}){return e.packs.length>0||n&&(e.extra||e.spareCounts.length>0)?c("div",{className:"border-b border-line pb-[26px]",children:[e.packs.length>0&&c(g,{children:[t("div",{className:"mb-3.5 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.22em] text-fg",children:"How many"}),t("div",{className:"flex flex-wrap gap-1.5",children:t(v,{hero:o,values:e.packs,item:l=>({label:l.label}),picked:l=>i.unit===l.value,press:l=>()=>s(r=>({...r,unit:l.value}))})})]}),n&&e.extra&&c("label",{className:`${e.packs.length>0?"mt-3.5 ":""}flex cursor-pointer items-center gap-3 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.16em] text-fg`,children:[t("input",{type:"checkbox",checked:i.spares>0,onChange:l=>s(r=>({...r,spares:l.target.checked?tt:0})),className:"h-4 w-4 cursor-pointer accent-[var(--accent)]"}),e.extra.label]}),n&&e.spareCounts.length>0&&c(g,{children:[t("div",{className:"mb-3.5 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.22em] text-fg",children:Fe.howMany}),t("div",{className:"flex flex-col gap-1.5 sm:flex-row sm:flex-wrap",children:t(v,{hero:o,values:e.spareCounts,item:l=>({label:`${l.value} · ${l.label}`}),picked:l=>i.spares===l.value-oe,press:l=>()=>s(r=>({...r,spares:l.value-oe}))})})]}),n&&e.spareSide&&c(g,{children:[t("div",{className:"mb-3.5 mt-[26px] font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.22em] text-fg",children:e.spareSide.label}),t("div",{className:"flex flex-wrap gap-1.5",children:t(v,{hero:o,values:e.spareSide.options,item:l=>({label:l.label}),picked:l=>i.spareSide===l.value,press:l=>()=>s(r=>({...r,spareSide:l.value}))})})]})]}):null}function ue({row:e,onPick:n,options:i}){const s=ne();if(e.values.length===0&&!e.empty)return null;const o=e.values.find(r=>r.value===e.chosen),l=o&&[o.label,o.note].filter(Boolean).join(" · ");return c("div",{className:"border-b border-line pb-[26px]",[Ke]:e.key,children:[c("div",{className:"mb-3.5 font-mono text-[length:var(--size-label,13px)] font-semibold uppercase tracking-[0.22em] text-fg",children:[s(e.label)," · ",t("span",{className:"text-accent",children:l??s(e.prompt)})]}),e.values.length===0?c("p",{className:"font-mono text-[length:var(--size-body,12px)] leading-relaxed tracking-[0.1em] text-fg-dim",children:[e.empty.text," ",t(ae,{href:e.empty.href,className:"text-accent hover:underline",children:e.empty.linkText})]}):e.display==="swatch"?t("div",{className:"flex flex-wrap gap-2 [&>*]:max-w-full",children:t(v,{hero:i,values:e.values,item:r=>({swatch:r.swatch??"",name:r.label}),picked:r=>r.value===e.chosen,press:r=>()=>n(e.key,r.value)})}):t("div",{className:"flex flex-wrap gap-1.5",children:t(v,{hero:i,values:e.values,item:r=>({label:r.label,note:r.note??""}),picked:r=>r.value===e.chosen,press:r=>()=>n(e.key,r.value)})})]})}function v({hero:e,values:n,item:i,picked:s,press:o}){const l=dt(n,{item:i,selected:s,press:o});return t(P,{children:t(I,{ownerId:e.nodeId,ownerType:$,slot:ut,Template:e.template,rows:l.items.map(pt),items:l.items,states:l.states,actions:e.editing?void 0:l.actions,pressTitles:e.pressTitles,fallback:null,children:r=>r})})}function Ct({partNumbers:e,productSlug:n}){const[i,s]=Me(""),{status:o,submit:l,reset:r}=Ve();function S(){l({partNumbers:e,email:i,productSlug:n})}return o==="sent"?t("p",{className:"-mt-1 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-accent",children:"We'll email you when it's back."}):t(ze,{className:"-mt-1",email:i,onEmailChange:s,status:o,onResetVerdict:r,onSubmit:S,inputAriaLabel:"Email for the back-in-stock alert",submitLabel:"Notify me when back",buttonClassName:"cursor-pointer whitespace-nowrap border-2 border-btn px-4 font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.22em] text-btn transition-colors hover:bg-btn hover:text-btn-ink disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-btn",errorMessage:"Couldn't save that — please try again."})}export{Ot as default};
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as s}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 z}from"efficient-web-builder/render/components/goldPhrases";import{FIELD_INPUT_CLASS as l}from"../lib/field-input.js";import{HideTaker as T}from"efficient-web-builder/render/components/ViewHideRoot";import A from"./SectionBand.js";const I="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))]",M="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 B({eyebrow:u,title:p,designCode:d,omitHead:w=!1,editing:x=!1}={}){const[g,N]=a(""),[o,y]=a(""),[r,S]=a(0),[m,R]=a(""),[f,k]=a(""),[c,h]=a(!1),[C,E]=a(!1),[v,i]=a(null);async function F(t){if(t.preventDefault(),!(x||c)){if(r<1){i("Choose a star rating.");return}h(!0),i(null);try{await _.submitReview({authorName:g.trim(),...o.trim()?{email:o.trim()}:{},rating:r,...m.trim()?{title:m.trim()}:{},body:f.trim(),...d?.trim()?{designCode:d.trim()}:{}}),E(!0)}catch{i("Something went wrong — your review wasn't sent. Please try again.")}finally{h(!1)}}}const b=C?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."}):s("form",{className:"flex max-w-[720px] flex-col gap-5",onSubmit:F,children:[s("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:g,onChange:t=>N(t.target.value),className:l})}),e(n,{label:"Email — never shown publicly",children:e("input",{type:"email",value:o,onChange:t=>y(t.target.value),className:l})})]}),s("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":r>=t,"aria-label":`${t} star${t===1?"":"s"}`,onClick:()=>{S(t),i(null)},className:["cursor-pointer text-[30px] leading-none transition-colors",r>=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=>R(t.target.value),className:l})}),e(n,{label:"Your review",required:!0,children:e("textarea",{required:!0,rows:5,value:f,onChange:t=>k(t.target.value),className:l+" resize-y"})}),v&&e("p",{role:"alert",className:"font-mono text-[12px] uppercase tracking-[0.18em] text-alert",children:v}),e("button",{type:x?"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 →"})]});return w?e(A,{className:"relative z-[2] border-t border-line bg-surface",column:M,children:b}):e(T,{as:"section",className:"relative z-[2] border-t border-line bg-surface",children:s("div",{className:I,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)}),b]})})}export{B as default};
1
+ "use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import{useState as r}from"react";import{products as j}from"../lib/api/index.js";import q from"efficient-web-builder/render/components/SectionEyebrow";import s,{FieldCaption as z}from"./WebFormField.js";import{renderHeadline as T}from"efficient-web-builder/render/components/goldPhrases";import{FIELD_INPUT_CLASS as o}from"../lib/field-input.js";import{HideTaker as A}from"efficient-web-builder/render/components/ViewHideRoot";import I from"./SectionBand.js";import{withSideOnce as M}from"efficient-web-builder/format/lib/content/page-width";import{useSideSpaceOnce as P}from"efficient-web-builder/render/components/SideSpaceOnce";import{withRootPad as B}from"efficient-web-builder/render/lib/content/section-own-pads";import{useSectionPad as D}from"./SectionPadScope.js";const L="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))]",H="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 W({eyebrow:p,title:u,designCode:d,omitHead:w=!1,editing:x=!1}={}){const N=P(),y=D(),[f,S]=r(""),[l,R]=r(""),[a,C]=r(0),[m,k]=r(""),[g,E]=r(""),[c,h]=r(!1),[F,_]=r(!1),[v,i]=r(null);async function O(t){if(t.preventDefault(),!(x||c)){if(a<1){i("Choose a star rating.");return}h(!0),i(null);try{await j.submitReview({authorName:f.trim(),...l.trim()?{email:l.trim()}:{},rating:a,...m.trim()?{title:m.trim()}:{},body:g.trim(),...d?.trim()?{designCode:d.trim()}:{}}),_(!0)}catch{i("Something went wrong — your review wasn't sent. Please try again.")}finally{h(!1)}}}const b=F?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."}):n("form",{className:"flex max-w-[720px] flex-col gap-5",onSubmit:O,children:[n("div",{className:"grid grid-cols-2 gap-3 max-[640px]:grid-cols-1",children:[e(s,{label:"Name",required:!0,children:e("input",{type:"text",required:!0,value:f,onChange:t=>S(t.target.value),className:o})}),e(s,{label:"Email — never shown publicly",children:e("input",{type:"email",value:l,onChange:t=>R(t.target.value),className:o})})]}),n("div",{className:"flex flex-col gap-2",children:[e(z,{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":a>=t,"aria-label":`${t} star${t===1?"":"s"}`,onClick:()=>{C(t),i(null)},className:["cursor-pointer text-[30px] leading-none transition-colors",a>=t?"text-accent":"text-fg-dim/30 hover:text-fg-dim"].join(" "),children:"★"},t))})]}),e(s,{label:"Review title (optional)",children:e("input",{type:"text",value:m,onChange:t=>k(t.target.value),className:o})}),e(s,{label:"Your review",required:!0,children:e("textarea",{required:!0,rows:5,value:g,onChange:t=>E(t.target.value),className:o+" resize-y"})}),v&&e("p",{role:"alert",className:"font-mono text-[12px] uppercase tracking-[0.18em] text-alert",children:v}),e("button",{type:x?"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 →"})]});return w?e(I,{className:"relative z-[2] border-t border-line bg-surface",column:H,padOnColumn:!0,children:b}):e(A,{as:"section",className:"relative z-[2] border-t border-line bg-surface",children:n("div",{...B(M(L,N),y),children:[(p??"").trim()&&e(q,{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)}),b]})})}export{W as default};
@@ -1 +1 @@
1
- import{jsx as e,Fragment as h,jsxs as i}from"react/jsx-runtime";import u from"efficient-web-builder/render/components/SectionEyebrow";import{renderHeadline as b,splitParagraphs as v}from"efficient-web-builder/render/components/goldPhrases";import N from"./RatingStars.js";import y from"./SectionBand.js";const t={headingMediumUpTo800:"max-view-wide:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",headingMedium:"text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))]",bodySmall:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,19px)]",label:"text-[length:var(--size-label,12px)]"},w="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))]",M="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 k({look:d,eyebrow:n,title:r,columns:p,rows:s=[],editing:o=!1,sample:x=!1,cards:g,omitHead:l=!1}){const c=Math.min(3,Math.max(1,p??3));return!o&&s.length===0?null:i(y,{className:"relative z-[2] border-t border-line bg-surface",column:l?M:w,children:[l?null:i(h,{children:[(n??"").trim()&&e(u,{text:n??"",look:d,className:"mb-4 block"}),(r??"").trim()&&e("h2",{className:`mb-12 font-heading2 ${t.headingMedium} font-medium uppercase leading-none tracking-[-0.02em] text-fg max-view-wide:mb-8 ${t.headingMediumUpTo800}`,children:b(r??"",!1)})]}),e("div",{className:"sf-card grid grid-cols-1 gap-px border border-line bg-line min-[700px]:[grid-template-columns:repeat(var(--rv-cols),minmax(0,1fr))]",style:{"--rv-cols":String(c)},children:g??s.map(a=>i("article",{className:["flex flex-col gap-4 bg-bg p-10 max-view-wide:p-8",x?"opacity-60":""].join(" "),children:[a.rating!==void 0&&e(N,{rating:a.rating}),(a.title??"").trim()&&e("h3",{className:`font-display ${t.bodyLarge} font-medium uppercase leading-[1.2] tracking-[-0.01em] text-fg`,children:a.title}),e("div",{className:`flex-1 font-serif ${t.bodySmall} leading-[1.65] text-fg-dim`,children:v(a.quote).map((f,m)=>e("p",{className:m?"mt-3":"",children:f},m))}),i("footer",{className:"flex items-baseline justify-between gap-4 border-t border-line pt-5",children:[e("span",{className:`font-mono ${t.label} uppercase tracking-[0.22em] text-fg`,children:a.name}),e("span",{className:`font-mono ${t.label} uppercase tracking-[0.18em] text-fg-dim`,children:a.meta??""})]})]},a.key))})]})}export{M as FRAME_OWN_BOX,k as default};
1
+ import{jsx as e,Fragment as h,jsxs as i}from"react/jsx-runtime";import u from"efficient-web-builder/render/components/SectionEyebrow";import{renderHeadline as b,splitParagraphs as v}from"efficient-web-builder/render/components/goldPhrases";import N from"./RatingStars.js";import y from"./SectionBand.js";const t={headingMediumUpTo800:"max-view-wide:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",headingMedium:"text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))]",bodySmall:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,19px)]",label:"text-[length:var(--size-label,12px)]"},w="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))]",M="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 k({look:d,eyebrow:n,title:r,columns:p,rows:s=[],editing:o=!1,sample:x=!1,cards:g,omitHead:l=!1}){const c=Math.min(3,Math.max(1,p??3));return!o&&s.length===0?null:i(y,{className:"relative z-[2] border-t border-line bg-surface",column:l?M:w,padOnColumn:!0,children:[l?null:i(h,{children:[(n??"").trim()&&e(u,{text:n??"",look:d,className:"mb-4 block"}),(r??"").trim()&&e("h2",{className:`mb-12 font-heading2 ${t.headingMedium} font-medium uppercase leading-none tracking-[-0.02em] text-fg max-view-wide:mb-8 ${t.headingMediumUpTo800}`,children:b(r??"",!1)})]}),e("div",{className:"sf-card grid grid-cols-1 gap-px border border-line bg-line min-[700px]:[grid-template-columns:repeat(var(--rv-cols),minmax(0,1fr))]",style:{"--rv-cols":String(c)},children:g??s.map(a=>i("article",{className:["flex flex-col gap-4 bg-bg p-10 max-view-wide:p-8",x?"opacity-60":""].join(" "),children:[a.rating!==void 0&&e(N,{rating:a.rating}),(a.title??"").trim()&&e("h3",{className:`font-display ${t.bodyLarge} font-medium uppercase leading-[1.2] tracking-[-0.01em] text-fg`,children:a.title}),e("div",{className:`flex-1 font-serif ${t.bodySmall} leading-[1.65] text-fg-dim`,children:v(a.quote).map((f,m)=>e("p",{className:m?"mt-3":"",children:f},m))}),i("footer",{className:"flex items-baseline justify-between gap-4 border-t border-line pt-5",children:[e("span",{className:`font-mono ${t.label} uppercase tracking-[0.22em] text-fg`,children:a.name}),e("span",{className:`font-mono ${t.label} uppercase tracking-[0.18em] text-fg-dim`,children:a.meta??""})]})]},a.key))})]})}export{M as FRAME_OWN_BOX,k as default};
@@ -1,6 +1,6 @@
1
1
  import type { CSSProperties, ReactNode, Ref } from "react";
2
2
  export { BAND_CAP } from "../lib/sections/section-band.js";
3
- export default function SectionBand({ className, capped, column, style, defaults, id, attrs, rootRef, inAnyBox, children, }: {
3
+ export default function SectionBand({ className, capped, column, style, defaults, id, attrs, rootRef, inAnyBox, padOnColumn, children, }: {
4
4
  className: string;
5
5
  capped?: boolean;
6
6
  column?: string | null;
@@ -10,5 +10,6 @@ export default function SectionBand({ className, capped, column, style, defaults
10
10
  attrs?: Record<string, string>;
11
11
  rootRef?: Ref<HTMLElement>;
12
12
  inAnyBox?: boolean;
13
+ padOnColumn?: boolean;
13
14
  children?: ReactNode;
14
15
  }): import("react").JSX.Element;
@@ -1 +1 @@
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
+ import{jsx as o}from"react/jsx-runtime";import{EDITORIAL_COLUMN as I,withSideOnce as j}from"efficient-web-builder/format/lib/content/page-width";import{BAND_CAP as k,bandClassesInBox as f}from"../lib/sections/section-band.js";import v from"./SectionBandChoice.js";import{HideTaker as x}from"efficient-web-builder/render/components/ViewHideRoot";import{useSideSpaceOnce as L}from"efficient-web-builder/render/components/SideSpaceOnce";import{withRootPad as i}from"efficient-web-builder/render/lib/content/section-own-pads";import{useSectionPads as $}from"./SectionPadScope.js";import{BAND_CAP as K}from"../lib/sections/section-band.js";function E({className:s,capped:B=!1,column:t=I,style:e,defaults:r,id:c,attrs:d,rootRef:l,inAnyBox:S=!1,padOnColumn:m=!1,children:n}){const u=L(),a=$(),A=f(s),p=t===null?"":f(t),{className:y,style:C,...N}=i(A,a.inBox,e),P=o(x,{as:"section",ref:l,...d,...N,className:y||void 0,style:C,id:c,children:p?o("div",{className:p,children:n}):n}),T=r?{...r,...e}:e,b=m?null:a.atTop,h=m?a.atTop:null,{className:O,style:_,...w}=i(B?`${k} ${s}`:s,b,T),D=o(x,{as:"section",ref:l,...d,...w,className:O,style:_,id:c,children:t===null?n:o("div",{...i(j(t,u),h),children:n})});return o(v,{inBox:P,atTop:D,anyBox:S})}export{K as BAND_CAP,E as default};
@@ -1 +1 @@
1
- "use client";import{jsx as n}from"react/jsx-runtime";import{PhoneMenuToolsProvider as p}from"efficient-web-builder/render/components/PhoneMenuTools";import{SectionGroupWidthsProvider as v}from"efficient-web-builder/render/components/SiteGutterFrame";import{chromeOwnWidth as T}from"efficient-web-builder/format/lib/content/section-width";import{centredCap as b,SITE_WIDTH_CAP as x}from"efficient-web-builder/format/lib/content/page-width";import{resolveMenuRow as S,resolveNavTextCase as y}from"../lib/content/header-bar.js";import{HideTaker as P}from"efficient-web-builder/render/components/ViewHideRoot";import{textKindVars as _}from"../lib/content/text-kind-vars.js";import{blockParts as i}from"../lib/block-parts.js";const k=i("SiteHeader")("header-content"),w=i("SiteFooter")("footer"),E={font:"--sf-header-tool-font",size:"--sf-header-tool-size"};function O(o){const e=_(o,E);return Object.keys(e).length?e:null}function R({place:o,sections:e,editing:c=!1,widths:u,navTextCase:f,menuRow:m,toolTextStyle:l}){const h=o==="footer"?"footer":"div",t=T(u),r=t.content==="full"?"100vw":t.contentMax===null?null:`${t.contentMax}px`,a=o==="footer"&&t.background==="content"?b(x):null,s=o==="header"?O(l):null,g=r===null&&a===null&&s===null?void 0:{...a,...r===null?null:{"--sf-site-width":r},...s},d=n(P,{as:h,"data-section-group":o,...o==="header"?{"data-header-nav-case":y(f),"data-header-menu-row":S(m)??"top",...s?{"data-header-tool-style":String(l)}:null}:null,className:c&&o==="footer"?"sf-theme-surfaces bg-bg text-fg":void 0,style:g,...o==="header"?k:w,children:n(v,{value:{background:t.background,content:t.content==="content"?"content":null},children:n(e,{minEmptyHeight:120})})});return o==="header"?n(p,{children:d}):d}export{R as default};
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import{PhoneMenuToolsProvider as g}from"efficient-web-builder/render/components/PhoneMenuTools";import{AccountInPhoneMenuProvider as v}from"./PhoneMenuAccount.js";import{SectionGroupWidthsProvider as T}from"efficient-web-builder/render/components/SiteGutterFrame";import{chromeOwnWidth as b}from"efficient-web-builder/format/lib/content/section-width";import{centredCap as P,SITE_WIDTH_CAP as x}from"efficient-web-builder/format/lib/content/page-width";import{resolveMenuRow as S,resolveNavTextCase as y}from"../lib/content/header-bar.js";import{HideTaker as _}from"efficient-web-builder/render/components/ViewHideRoot";import{textKindVars as k}from"../lib/content/text-kind-vars.js";import{blockParts as a}from"../lib/block-parts.js";const w=a("SiteHeader")("header-content"),A=a("SiteFooter")("footer"),E={font:"--sf-header-tool-font",size:"--sf-header-tool-size"};function O(o){const n=k(o,E);return Object.keys(n).length?n:null}function R({place:o,sections:n,editing:c=!1,widths:u,navTextCase:f,menuRow:m,toolTextStyle:l}){const h=o==="footer"?"footer":"div",t=b(u),r=t.content==="full"?"100vw":t.contentMax===null?null:`${t.contentMax}px`,d=o==="footer"&&t.background==="content"?P(x):null,s=o==="header"?O(l):null,p=r===null&&d===null&&s===null?void 0:{...d,...r===null?null:{"--sf-site-width":r},...s},i=e(_,{as:h,"data-section-group":o,...o==="header"?{"data-header-nav-case":y(f),"data-header-menu-row":S(m)??"top",...s?{"data-header-tool-style":String(l)}:null}:null,className:c&&o==="footer"?"sf-theme-surfaces bg-bg text-fg":void 0,style:p,...o==="header"?w:A,children:e(T,{value:{background:t.background,content:t.content==="content"?"content":null},children:e(n,{minEmptyHeight:120})})});return o==="header"?e(g,{children:e(v,{children:i})}):i}export{R as default};
@@ -1 +1 @@
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
+ import{jsx as e}from"react/jsx-runtime";import{HideTaker as r}from"efficient-web-builder/render/components/ViewHideRoot";import{withSideOnce as n}from"efficient-web-builder/format/lib/content/page-width";import{useSideSpaceOnce as p}from"efficient-web-builder/render/components/SideSpaceOnce";import{withRootPad as c}from"efficient-web-builder/render/lib/content/section-own-pads";import{useSectionPad as m}from"./SectionPadScope.js";const i="font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim";function x({size:o,children:t}){const s=p(),a=m();return o==="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:i,children:t})}):e(r,{as:"section",className:"relative z-[2] border-t border-line bg-surface",children:e("div",{...c(n("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))]",s),a),children:e("p",{className:i,children:t})})})}export{i as SECTION_NOTICE_TEXT_CLASS,x as default};
@@ -0,0 +1,23 @@
1
+ import { type ReactNode } from "react";
2
+ import type { RootPadAttrs } from "efficient-web-builder/render/lib/content/section-padding";
3
+ export type SectionPad = {
4
+ atTop: RootPadAttrs | null;
5
+ inBox: RootPadAttrs | null;
6
+ };
7
+ export declare function SectionPadScope({ pad, children }: {
8
+ pad: SectionPad;
9
+ children: ReactNode;
10
+ }): import("react").JSX.Element;
11
+ export declare const useSectionPad: () => RootPadAttrs | null;
12
+ export declare const useSectionPads: () => SectionPad;
13
+ export type SplitPads = {
14
+ first: SectionPad | null;
15
+ second: SectionPad | null;
16
+ firstOnly: SectionPad | null;
17
+ secondOnly: SectionPad | null;
18
+ };
19
+ export declare function SplitPadScope({ pads, children }: {
20
+ pads: SplitPads | undefined;
21
+ children: ReactNode;
22
+ }): import("react").JSX.Element;
23
+ export declare const useSplitPads: () => SplitPads | undefined;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as o,Fragment as s}from"react/jsx-runtime";import{createContext as c,useContext as n}from"react";const p={atTop:null,inBox:null},r=c(p);function l({pad:e,children:t}){return o(r.Provider,{value:e,children:t})}const d=()=>n(r).atTop,x=()=>n(r),i=c(void 0);function S({pads:e,children:t}){return e?o(i.Provider,{value:e,children:t}):o(s,{children:t})}const P=()=>n(i);export{l as SectionPadScope,S as SplitPadScope,d as useSectionPad,x as useSectionPads,P as useSplitPads};
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from "react";
2
+ import type { SlotComponent } from "efficient-easel/blocks";
3
+ export declare function ThanksCard({ ownerId, ownerType, Template, message, children, }: {
4
+ ownerId: string;
5
+ ownerType: string;
6
+ Template: SlotComponent | undefined;
7
+ message: ReactNode;
8
+ children: (parts: ReactNode) => ReactNode;
9
+ }): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as a}from"react/jsx-runtime";import{CardTemplateRows as m}from"efficient-web-builder/render/components/CardRowContext";import{THANKS_SLOT as l}from"../lib/content/thanks-slot.js";const p=[{}];function f({ownerId:r,ownerType:o,Template:e,message:t,children:n}){return a(m,{ownerId:r,ownerType:o,slot:l,Template:e,rows:p,fallback:t,children:s=>n(s)})}export{f as ThanksCard};