efficient-storefront-blocks 0.111.0 → 0.113.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/chunks/{EditorPreviewCheckout-C42GCC3T.js → EditorPreviewCheckout-QJWDGMO7.js} +4 -4
  3. package/dist/chunks/{SiteEditorProvider-P4HVFXUX.js → SiteEditorProvider-6V6EJFTL.js} +1 -1
  4. package/dist/chunks/{chunk-FRCI3FAV.js → chunk-7UBABYIY.js} +1 -1
  5. package/dist/chunks/{chunk-RFFTWKCU.js → chunk-7ZIXVUD7.js} +20 -20
  6. package/dist/chunks/{chunk-MVJVIU2F.js → chunk-IY3JZXIQ.js} +1 -1
  7. package/dist/chunks/chunk-TNITUVMH.js +1 -0
  8. package/dist/chunks/{fitment-data-EGBXHTFW.js → fitment-data-7BV7JBDK.js} +1 -1
  9. package/dist/editor/lib/document/blocks/commerce/ProductHero/fields.js +1 -1
  10. package/dist/editor/lib/document/blocks/commerce/index.d.ts +1 -1
  11. package/dist/editor/lib/document/blocks/service/index.d.ts +1 -1
  12. package/dist/editor/lib/storefront-editor-words.d.ts +2 -0
  13. package/dist/editor/lib/storefront-editor-words.js +1 -1
  14. package/dist/index.js +31 -29
  15. package/dist/links.js +1 -1
  16. package/dist/render/built-with.json +1 -1
  17. package/dist/render/components/CartDrawer.js +1 -1
  18. package/dist/render/components/CartLineThumbnail.d.ts +3 -2
  19. package/dist/render/components/ConsentProvider.js +1 -1
  20. package/dist/render/components/DefaultProductHero.js +1 -1
  21. package/dist/render/components/DetailRows.d.ts +1 -0
  22. package/dist/render/components/DetailRows.js +1 -1
  23. package/dist/render/components/Events.js +1 -1
  24. package/dist/render/components/OpeningHours.js +1 -1
  25. package/dist/render/components/ProductHeroPanel.d.ts +2 -1
  26. package/dist/render/components/ProductHeroPanel.js +1 -1
  27. package/dist/render/components/booking/BookingFormState.js +1 -1
  28. package/dist/render/components/booking/BookingRegions.js +1 -1
  29. package/dist/render/components/card-pieces/CardBuyButton.js +1 -1
  30. package/dist/render/components/card-pieces/CardSave.js +1 -1
  31. package/dist/render/components/cart/drawer-parts.d.ts +3 -3
  32. package/dist/render/components/catalog/ShopperChips.js +1 -1
  33. package/dist/render/components/checkout/CheckoutPageClient.js +1 -1
  34. package/dist/render/components/pdp-dynamic/DynamicProductHero.js +1 -1
  35. package/dist/render/components/useTyreCatalog.d.ts +2 -1
  36. package/dist/render/components/useTyreCatalog.js +3 -1
  37. package/dist/render/lib/booking/appointment-time.d.ts +2 -2
  38. package/dist/render/lib/booking/appointment-time.js +1 -1
  39. package/dist/render/lib/checkout/hold-time.d.ts +1 -0
  40. package/dist/render/lib/checkout/hold-time.js +1 -0
  41. package/dist/render/lib/content/article-page-seed.js +1 -1
  42. package/dist/render/lib/content/booking-card-seed.js +1 -1
  43. package/dist/render/lib/content/contact-card-seed.js +1 -1
  44. package/dist/render/lib/content/event-post.js +1 -1
  45. package/dist/render/lib/content/facet-row-seed.js +1 -1
  46. package/dist/render/lib/content/filter-card-seed.js +1 -1
  47. package/dist/render/lib/content/hero-buy-seed.d.ts +11 -0
  48. package/dist/render/lib/content/hero-buy-seed.js +1 -0
  49. package/dist/render/lib/content/hero-option-seed.js +1 -1
  50. package/dist/render/lib/content/hero-price-seed.js +1 -1
  51. package/dist/render/lib/content/host-part-seed.d.ts +2 -0
  52. package/dist/render/lib/content/host-part-seed.js +1 -0
  53. package/dist/render/lib/content/menu-card-seed.js +1 -1
  54. package/dist/render/lib/content/product-card-seed.js +1 -1
  55. package/dist/render/lib/content/rail-row-seed.js +1 -1
  56. package/dist/render/lib/content/seed-ids.d.ts +6 -0
  57. package/dist/render/lib/content/seed-ids.js +1 -0
  58. package/dist/render/lib/document/blocks/commerce/ProductBuyButton/meta.js +1 -1
  59. package/dist/render/lib/document/blocks/commerce/ProductHero/meta.d.ts +4 -0
  60. package/dist/render/lib/document/blocks/commerce/ProductHero/meta.js +1 -1
  61. package/dist/render/lib/document/blocks/commerce/ProductHero/render.js +1 -1
  62. package/dist/render/lib/document/blocks/service/subscribe.js +1 -1
  63. package/dist/render/lib/document/card-templates.js +1 -1
  64. package/dist/render/lib/document/current-record.d.ts +1 -0
  65. package/dist/render/lib/document/current-record.js +1 -1
  66. package/dist/render/lib/document/document-nodes.d.ts +6 -10
  67. package/dist/render/lib/document/document-nodes.js +1 -1
  68. package/dist/render/lib/reader-zone.d.ts +1 -0
  69. package/dist/render/lib/reader-zone.js +1 -0
  70. package/dist/render/lib/sections/opening-hours.d.ts +1 -1
  71. package/dist/render/lib/sections/opening-hours.js +1 -1
  72. package/dist/render/lib/sections/product-grid-pages.d.ts +1 -0
  73. package/dist/render/lib/wheels/shopper-first-paint.d.ts +2 -2
  74. package/dist/render/lib/zone.d.ts +2 -0
  75. package/dist/render/lib/zone.js +1 -0
  76. package/dist/words.d.ts +2 -0
  77. package/dist/words.js +1 -1
  78. package/package.json +2 -2
  79. package/dist/chunks/chunk-CPAF23MT.js +0 -1
  80. package/dist/render/lib/content/article-body-seed.d.ts +0 -9
  81. package/dist/render/lib/content/article-body-seed.js +0 -1
  82. /package/dist/chunks/{chunk-GB6OHYUY.js → chunk-37WWMI27.js} +0 -0
  83. /package/dist/chunks/{chunk-RFFTWKCU.js.LEGAL.txt → chunk-7ZIXVUD7.js.LEGAL.txt} +0 -0
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as r,Fragment as f}from"react/jsx-runtime";import R from"next/link";import{useEffect as O,useMemo as Y,useRef as j,useState as v}from"react";import{stripeAppearance as J}from"../../lib/checkout/stripe-appearance.js";import{Elements as ee,PaymentElement as te,useElements as re,useStripe as ne}from"@stripe/react-stripe-js";import{loadStripe as ae}from"@stripe/stripe-js";import{useCurrency as E}from"../CurrencyContext.js";import{Notice as _}from"../Notice.js";import{resolveCopyright as ie}from"../../lib/content/site.js";import{ApiError as L,products as T}from"../../lib/api/index.js";import oe,{WORDMARK_FIT_FLOOR_PX as ce}from"efficient-web-builder/render/components/Logo";import{NOT_CHECKED as q,orderReference as se}from"../../lib/checkout/pay-first.js";import{CheckoutStateProvider as le,useCheckout as de}from"./checkout-state.js";import{CheckoutContact as me,CheckoutOrderSummary as pe,CheckoutPayment as ue,CheckoutShippingAddress as fe,CheckoutShippingMethod as xe,FormLock as M,LeaveLink as z}from"./checkout-parts.js";function ge(t){return e(le,{...t,children:e(be,{})})}function he({order:t,paid:n}){const{formatMoney:i}=E();if(!t.grandTotal||!t.currency)return null;const m=c=>i(Number(c),t.currency),h=Number(t.freightCharge??0),p=Number(t.discountAmount??0);return r("dl",{className:"grid w-full max-w-sm grid-cols-[1fr_auto] gap-x-6 gap-y-1 border-y border-line py-3 text-left text-sm",children:[(t.shippingMethod||h>0)&&r(f,{children:[r("dt",{className:"text-fg-dim",children:["Delivery",t.shippingMethod?` · ${t.shippingMethod}`:""]}),e("dd",{className:"text-right font-mono",children:m(t.freightCharge??"0")})]}),p>0&&r(f,{children:[r("dt",{className:"text-fg-dim",children:["Discount",t.couponCode?` · ${t.couponCode}`:""]}),r("dd",{className:"text-right font-mono",children:["−",m(t.discountAmount??"0")]})]}),e("dt",{className:"text-fg",children:n?"Total paid":"Order total"}),e("dd",{className:"text-right font-mono text-fg",children:m(t.grandTotal)})]})}function ye({result:t,lostChangeNote:n=null}){const i=e("span",{className:"font-mono text-fg",children:t.checkoutNumber});return r("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[e("h1",{className:"font-display text-3xl",children:t.kind==="refunded"||t.kind==="expired"?"Order not placed":t.kind==="processing"?"Payment processing":"Payment received"}),e("p",{className:"text-fg-dim",children:t.kind==="refunded"?r(f,{children:["An item sold out or an offer ended while you paid for checkout ",i,". Your payment goes back to your card."]}):t.kind==="expired"?r(f,{children:["The hold on checkout ",i," ran out before your payment arrived. Your payment goes back to your card."]}):t.kind==="processing"?r(f,{children:["Your payment for checkout ",i," is being processed. When it goes through, we will email your order confirmation."]}):r(f,{children:["Thank you — your payment",t.checkoutNumber?r(f,{children:[" for checkout ",i]}):null," has gone through. We will email you the order number shortly."]})}),n&&t.kind!=="refunded"&&t.kind!=="expired"&&e("p",{className:"text-sm text-fg-dim",children:n}),e(R,{href:"/wheels",className:"mt-2 border-2 border-line px-6 py-3 font-mono text-[12px] uppercase tracking-[0.24em] hover:border-accent",children:"Continue browsing"})]})}function be(){const{site:t,logo:n,items:i,placing:m,formLocked:h,email:p,me:c,addressSaveNote:x,lostChangeNote:d,idemKey:u,confirmation:o,setConfirmation:b,payment:g,paypalStep:k,squareStep:N,pendingConf:l,paid:y,setPaid:C,payNote:s,afterpayConfirming:a,gocardlessConfirming:w,zipConfirming:P,klarnaConfirming:K,cardConfirming:U,checkoutResult:D,confirmCardPayment:W,cardStillProcessing:H,renewCardPayment:G,holdRenewed:Q,leaveCardPayment:V,checkoutRootRef:X,setCheckoutHeaderEl:Z}=de();return o?r("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[e("h1",{className:"font-display text-3xl",children:y?"Payment received":"Order received"}),r("p",{className:"text-fg-dim",children:[y?r(f,{children:["Thank you — your payment for order"," ",e("span",{className:"font-mono text-fg",children:o.orderNumber})," has gone through."," "]}):r(f,{children:["Thank you — your order ",e("span",{className:"font-mono text-fg",children:o.orderNumber})," is being reviewed by our team."," "]}),c?r(f,{children:["Track it under"," ",e(R,{href:"/account/orders",className:"text-accent underline",children:"your orders"}),"."]}):e(f,{children:"We’ve emailed you a link to set a password and track it."})]}),e(he,{order:o,paid:y}),d&&e("p",{className:"text-sm text-fg-dim",children:d}),s&&e("p",{className:"text-sm text-fg-dim",children:s}),x&&e("p",{className:"text-sm text-fg-dim",children:x}),!c&&r("p",{className:"text-sm text-fg-dim",children:["You can also"," ",e(R,{href:`/track?order=${encodeURIComponent(o.orderNumber)}`,className:"text-accent underline",children:"track this order"})," ","anytime with just your order number and email — no password needed."]}),e(R,{href:"/wheels",className:"mt-2 border-2 border-line px-6 py-3 font-mono text-[12px] uppercase tracking-[0.24em] hover:border-accent",children:"Continue browsing"})]}):D?e(ye,{result:D,lostChangeNote:d}):U?r("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[e("h1",{className:"font-display text-3xl",children:"Confirming your payment…"}),e("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Placing your order — one moment."})]}):a?r("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[e("h1",{className:"font-display text-3xl",children:"Confirming your payment…"}),e("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Afterpay — one moment."})]}):w?r("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[e("h1",{className:"font-display text-3xl",children:"Setting up your direct debit…"}),e("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Confirming with GoCardless — one moment."})]}):P?r("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[e("h1",{className:"font-display text-3xl",children:"Confirming your payment…"}),e("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Zip — one moment."})]}):K?r("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[e("h1",{className:"font-display text-3xl",children:"Confirming your payment…"}),e("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Klarna — one moment."})]}):g&&l?e(ke,{payment:g,checkout:l,holdRenewed:Q,onPaid:W,onProcessing:H,onRenew:G,onBack:V}):k&&l?e(ve,{confirmation:l,clientId:t.paypalClientId??"",idemKey:u,onPaid:()=>{C(!0),b(l)},onSkip:()=>b(l)}):N&&l?e(Se,{confirmation:l,applicationId:t.squareApplicationId??"",locationId:t.squareLocationId??"",environment:t.squareEnvironment??"production",idemKey:u,onPaid:()=>{C(!0),b(l)},onSkip:()=>b(l)}):r("div",{ref:X,className:"bg-bg text-fg",children:[r("header",{ref:Z,className:"sticky top-0 z-30 grid grid-cols-[1fr_auto_1fr] items-center gap-8 max-[640px]:grid-cols-[auto_minmax(0,1fr)_auto] max-[640px]:gap-3 border-b border-line px-[var(--sf-site-gutter,40px)] py-6 backdrop-blur-md max-[640px]:px-[min(20px,var(--sf-site-gutter,40px))] max-[640px]:py-4",style:{background:"color-mix(in oklab, var(--bg) 92%, transparent)"},children:[r(z,{href:"/",className:"inline-flex items-center gap-3 font-mono text-[14px] uppercase tracking-[0.26em] text-fg-dim transition-colors hover:text-accent",children:["←",e("span",{className:"max-[640px]:hidden",children:"Back to shop"})]}),e("div",{className:"flex min-w-0 justify-center max-[640px]:[container-type:inline-size]",children:e(z,{href:"/","aria-label":`${t.name} home`,className:"inline-flex max-w-full items-center justify-center overflow-x-clip",children:e(oe,{variant:"header",scrolled:!0,src:n?.url??null,reverse:n?.reverse??!1,reversedSrc:n?.reversed??null,inkIsDark:n?.inkIsDark??null,size:n?.size??"medium",sizePx:n?.sizePx??null,sizeUnit:n?.sizeUnit??null,siteName:t.name,fitWordmarkToContainer:!0,fitFloorPx:ce})})}),t.cardPayments?r("span",{className:"flex items-center justify-end gap-3 font-mono text-[12px] uppercase tracking-[0.26em] text-fg-dim",children:[e("span",{className:"text-green",children:"●"}),e("span",{className:"max-[640px]:hidden",children:"Encrypted ·"})," Stripe"]}):e("span",{})]}),r("section",{className:"mx-auto flex max-w-[var(--sf-site-width,1600px)] flex-wrap items-center justify-between gap-x-8 gap-y-3 border-b border-line bg-surface px-[var(--sf-site-gutter,40px)] py-4 font-mono text-[13px] font-medium uppercase tracking-[0.24em] text-fg max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]",children:[e("span",{className:"inline-flex items-center bg-accent px-3 py-1 font-bold text-bg",children:"Checkout"}),e("nav",{"aria-label":"Checkout steps",className:"flex flex-wrap items-center gap-5",children:[{n:"01",label:"Cart",state:"done"},{n:"02",label:"Ship & pay",state:"active"},{n:"03",label:"Confirmed",state:"pending"}].map(S=>r("span",{className:["relative flex items-center gap-2 transition-colors",S.state==="pending"?"text-fg-dim":"text-fg",S.state==="active"?"font-bold after:absolute after:inset-x-0 after:-bottom-1 after:h-[2px] after:bg-accent":""].join(" "),children:[e("span",{className:S.state==="done"?"text-accent font-bold":"",children:S.n}),e("span",{children:S.label})]},S.n))})]}),r("main",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[1fr_420px] items-start gap-16 px-[var(--sf-site-gutter,40px)] pt-10 pb-[100px] max-view-desktop:grid-cols-1 max-view-desktop:gap-10 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-desktop:pt-8 max-view-desktop:pb-20",children:[r("div",{children:[r(M,{locked:h,children:[e(me,{}),e(fe,{}),e(xe,{})]}),e(M,{locked:m,children:e(ue,{})})]}),e(pe,{})]}),e("footer",{className:"flex flex-wrap items-center justify-between gap-4 border-t border-line px-[var(--sf-site-gutter,40px)] py-6 font-mono text-[12px] uppercase tracking-[0.22em] text-fg-dim max-[640px]:px-[min(20px,var(--sf-site-gutter,40px))]",children:e("span",{children:ie({legalName:t.legalName,foundedYear:t.foundedYear,siteName:t.name})})})]})}function ke({payment:t,checkout:n,holdRenewed:i,onPaid:m,onProcessing:h,onRenew:p,onBack:c}){const{formatMoney:x}=E(),d=e("span",{className:"text-fg",children:x(Number(t.amount),t.currency)}),u=Y(()=>ae(t.publishableKey),[t.publishableKey]),o=Y(()=>J(),[]);return e("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:r("div",{className:"w-full max-w-xl border border-line bg-bg",children:[r("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[e("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:se(n)}),e("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"Payment"})]}),r("div",{className:"flex flex-col gap-4 px-6 py-6",children:[e("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:n.orderNumber?r(f,{children:["Your order is placed. Pay ",d," by card to confirm it now."]}):i?r(f,{children:["Your hold ran out, so your items are held again",n.expiresAt?` until ${B(n.expiresAt)}`:"",". Enter your card again, then pay ",d,"."]}):r(f,{children:["Your items are held",n.expiresAt?` until ${B(n.expiresAt)}`:"",". Pay ",d," by card to place your order."]})}),e(ee,{stripe:u,options:{clientSecret:t.clientSecret,appearance:o},children:e(we,{payment:t,checkout:n,onPaid:m,onProcessing:h,onRenew:p,onBack:c})},t.clientSecret)]})]})})}function B(t){return new Date(t).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}const Ne=5;function we({payment:t,checkout:n,onPaid:i,onProcessing:m,onRenew:h,onBack:p}){const{formatMoney:c}=E(),x=ne(),d=re(),[u,o]=v(!1),[b,g]=v(null),k=j(!1);async function N(){try{return(await x.retrievePaymentIntent(t.clientSecret)).paymentIntent?.status}catch{return}}async function l(s){let a=s;for(let w=0;a==="processing"&&w<Ne;w+=1)await new Promise(P=>setTimeout(P,1e3)),a=await N()??a;if(a==="succeeded"){i();return}if(a==="processing"){m();return}g("Payment did not complete. Please try again."),o(!1)}async function y(){if(!x||!d||u)return;o(!0),g(null),k.current=!0;const s=await x.confirmPayment({elements:d,redirect:"if_required"}).catch(()=>null);if(!s){const a=await N();if(a==="succeeded"||a==="processing"){await l(a);return}g(a===void 0?q:"Payment failed. Please try again."),o(!1);return}if(s.error){if(!n.orderNumber&&s.error.code==="payment_intent_unexpected_state"){const a=await N();if(a==="succeeded"||a==="processing"){await l(a);return}if(a===void 0){g(q),o(!1);return}await h(a==="canceled"),o(!1);return}g(s.error.message??"Payment failed. Please try again."),o(!1);return}await l(s.paymentIntent?.status)}async function C(){if(u)return;if(!k.current){p();return}o(!0),g(null);const s=await N();if(s==="succeeded"||s==="processing"){await l(s);return}if(o(!1),s===void 0){g(q);return}p()}return r("div",{className:"flex flex-col gap-4",children:[e(te,{}),b&&e(_,{role:"alert",children:b}),e("button",{type:"button",onClick:y,disabled:!x||!d||u,className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all",!x||!d||u?"cursor-not-allowed border-line bg-surface text-fg-dim":"border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg"].join(" "),children:u?r(f,{children:["Processing… ",e("span",{children:"·"})]}):r(f,{children:["Pay ",c(Number(t.amount),t.currency),e("span",{className:"transition-transform group-hover:translate-x-1",children:"→"})]})}),!n.orderNumber&&!u&&r("button",{type:"button",onClick:C,className:"inline-flex items-center gap-3 self-start font-mono text-[12px] uppercase tracking-[0.26em] text-fg-dim transition-colors hover:text-accent",children:["←",e("span",{children:"Back to checkout"})]})]})}const F="paypal-sdk-js";let I=null;function Pe(t,n){const i=`${t}|${n}`;if(I?.key===i)return I.promise;const m=new Promise((h,p)=>{document.getElementById(F)?.remove();const c=document.createElement("script");c.id=F;const x=new URLSearchParams({"client-id":t,currency:n,intent:"capture"});c.src=`https://www.paypal.com/sdk/js?${x}`,c.onload=()=>{const d=window.paypal;d?h(d):p(new Error("PayPal SDK loaded without its namespace"))},c.onerror=()=>p(new Error("PayPal SDK failed to load")),document.head.appendChild(c)});return I={key:i,promise:m},m}function ve({confirmation:t,clientId:n,idemKey:i,onPaid:m,onSkip:h}){const{formatMoney:p}=E(),c=j(null),[x,d]=v(!1),[u,o]=v(null),b=j(m);return b.current=m,O(()=>{let g=!1,k=null;return Pe(n,t.currency).then(N=>{if(!(g||!c.current))return k=N.Buttons({style:{layout:"vertical",color:"gold",shape:"rect",label:"paypal"},createOrder:async()=>(await T.createPaypalOrder({idempotencyKey:i})).paypalOrderId,onApprove:async l=>{try{if((await T.capturePaypalOrder({idempotencyKey:i,paypalOrderId:l.orderID})).status==="paid"){b.current();return}o("PayPal did not complete the payment. Please try again.")}catch(y){o(y instanceof L?y.message:"PayPal payment failed. Please try again.")}},onError:()=>{o("PayPal could not process the payment. Please try again.")}}),k.render(c.current).then(()=>{g||d(!0)})}).catch(()=>{g||o("PayPal could not be loaded. You can pay later — your order stands either way.")}),()=>{g=!0,k?.close?.()}},[n,t.currency,i]),e("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:r("div",{className:"w-full max-w-xl border border-line bg-bg",children:[r("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[e("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:t.orderNumber}),e("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"PayPal"})]}),r("div",{className:"flex flex-col gap-4 px-6 py-6",children:[r("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:["Your order is placed. Pay"," ",e("span",{className:"text-fg",children:p(Number(t.grandTotal),t.currency)})," ","with PayPal to confirm it now."]}),!x&&!u&&e("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Loading PayPal…"}),e("div",{ref:c}),u&&e(_,{role:"alert",children:u}),e("button",{type:"button",onClick:h,className:"self-center font-mono text-[11px] uppercase tracking-[0.24em] text-fg-dim underline-offset-4 transition-colors hover:text-accent hover:underline",children:"Pay later — our team will be in touch"})]})]})})}const $="square-web-sdk";let A=null;function Ce(t){const n=t==="sandbox"?"sandbox":"production";if(A?.key===n)return A.promise;const i=new Promise((m,h)=>{document.getElementById($)?.remove();const p=document.createElement("script");p.id=$,p.src=n==="sandbox"?"https://sandbox.web.squarecdn.com/v1/square.js":"https://web.squarecdn.com/v1/square.js",p.onload=()=>{const c=window.Square;c?m(c):h(new Error("Square SDK loaded without its namespace"))},p.onerror=()=>h(new Error("Square SDK failed to load")),document.head.appendChild(p)});return A={key:n,promise:i},i}function Se({confirmation:t,applicationId:n,locationId:i,environment:m,idemKey:h,onPaid:p,onSkip:c}){const{formatMoney:x}=E(),d=j(null),u=j(null),o=j(null),[b,g]=v(!1),[k,N]=v(!1),[l,y]=v(null);O(()=>{let s=!1,a=null;return Ce(m).then(async w=>{if(s||!d.current)return;const P=w.payments(n,i);o.current=P,a=await P.card(),await a.attach(d.current),u.current=a,s||g(!0)}).catch(()=>{s||y("Square could not be loaded. You can pay later — your order stands either way.")}),()=>{s=!0,a?.destroy?.()}},[n,i,m]);async function C(){const s=u.current;if(!(!s||k)){N(!0),y(null);try{const a=await s.tokenize();if(a.status!=="OK"||!a.token){y(a.errors?.[0]?.message??"Please check the card details and try again."),N(!1);return}let w;try{w=(await o.current?.verifyBuyer?.(a.token,{amount:String(t.grandTotal),currencyCode:t.currency,intent:"CHARGE"}))?.token}catch{}if((await T.chargeSquare({idempotencyKey:h,sourceId:a.token,...w?{verificationToken:w}:{}})).status==="paid"){p();return}y("Square did not complete the payment. Please try again.")}catch(a){y(a instanceof L?a.message:"Square payment failed. Please try again.")}N(!1)}}return e("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:r("div",{className:"w-full max-w-xl border border-line bg-bg",children:[r("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[e("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:t.orderNumber}),e("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"Card"})]}),r("div",{className:"flex flex-col gap-4 px-6 py-6",children:[r("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:["Your order is placed. Pay"," ",e("span",{className:"text-fg",children:x(Number(t.grandTotal),t.currency)})," ","by card to confirm it now."]}),!b&&!l&&e("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Loading card form…"}),e("div",{ref:d}),l&&e(_,{role:"alert",children:l}),e("button",{type:"button",onClick:C,disabled:!b||k,className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all",!b||k?"cursor-not-allowed border-line bg-surface text-fg-dim":"border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg"].join(" "),children:k?r(f,{children:["Processing… ",e("span",{children:"·"})]}):r(f,{children:["Pay ",x(Number(t.grandTotal),t.currency),e("span",{className:"transition-transform group-hover:translate-x-1",children:"→"})]})}),e("button",{type:"button",onClick:c,disabled:k,className:"self-center font-mono text-[11px] uppercase tracking-[0.24em] text-fg-dim underline-offset-4 transition-colors hover:text-accent hover:underline",children:"Pay later — our team will be in touch"})]})]})})}export{ye as PayFirstResultView,ge as default};
1
+ "use client";import{jsx as e,jsxs as r,Fragment as x}from"react/jsx-runtime";import R from"next/link";import{useEffect as D,useMemo as Y,useRef as j,useState as v}from"react";import{holdTime as X}from"../../lib/checkout/hold-time.js";import{stripeAppearance as J}from"../../lib/checkout/stripe-appearance.js";import{readerTimeZone as ee}from"../../lib/reader-zone.js";import{Elements as te,PaymentElement as re,useElements as ne,useStripe as ae}from"@stripe/react-stripe-js";import{loadStripe as ie}from"@stripe/stripe-js";import{useCurrency as E}from"../CurrencyContext.js";import{Notice as _}from"../Notice.js";import{resolveCopyright as oe}from"../../lib/content/site.js";import{ApiError as L,products as T}from"../../lib/api/index.js";import ce,{WORDMARK_FIT_FLOOR_PX as se}from"efficient-web-builder/render/components/Logo";import{NOT_CHECKED as q,orderReference as le}from"../../lib/checkout/pay-first.js";import{CheckoutStateProvider as de,useCheckout as me}from"./checkout-state.js";import{CheckoutContact as pe,CheckoutOrderSummary as ue,CheckoutPayment as fe,CheckoutShippingAddress as xe,CheckoutShippingMethod as ge,FormLock as M,LeaveLink as z}from"./checkout-parts.js";function he(t){return e(de,{...t,children:e(ke,{})})}function ye({order:t,paid:n}){const{formatMoney:i}=E();if(!t.grandTotal||!t.currency)return null;const m=c=>i(Number(c),t.currency),y=Number(t.freightCharge??0),p=Number(t.discountAmount??0);return r("dl",{className:"grid w-full max-w-sm grid-cols-[1fr_auto] gap-x-6 gap-y-1 border-y border-line py-3 text-left text-sm",children:[(t.shippingMethod||y>0)&&r(x,{children:[r("dt",{className:"text-fg-dim",children:["Delivery",t.shippingMethod?` · ${t.shippingMethod}`:""]}),e("dd",{className:"text-right font-mono",children:m(t.freightCharge??"0")})]}),p>0&&r(x,{children:[r("dt",{className:"text-fg-dim",children:["Discount",t.couponCode?` · ${t.couponCode}`:""]}),r("dd",{className:"text-right font-mono",children:["−",m(t.discountAmount??"0")]})]}),e("dt",{className:"text-fg",children:n?"Total paid":"Order total"}),e("dd",{className:"text-right font-mono text-fg",children:m(t.grandTotal)})]})}function be({result:t,lostChangeNote:n=null}){const i=e("span",{className:"font-mono text-fg",children:t.checkoutNumber});return r("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[e("h1",{className:"font-display text-3xl",children:t.kind==="refunded"||t.kind==="expired"?"Order not placed":t.kind==="processing"?"Payment processing":"Payment received"}),e("p",{className:"text-fg-dim",children:t.kind==="refunded"?r(x,{children:["An item sold out or an offer ended while you paid for checkout ",i,". Your payment goes back to your card."]}):t.kind==="expired"?r(x,{children:["The hold on checkout ",i," ran out before your payment arrived. Your payment goes back to your card."]}):t.kind==="processing"?r(x,{children:["Your payment for checkout ",i," is being processed. When it goes through, we will email your order confirmation."]}):r(x,{children:["Thank you — your payment",t.checkoutNumber?r(x,{children:[" for checkout ",i]}):null," has gone through. We will email you the order number shortly."]})}),n&&t.kind!=="refunded"&&t.kind!=="expired"&&e("p",{className:"text-sm text-fg-dim",children:n}),e(R,{href:"/wheels",className:"mt-2 border-2 border-line px-6 py-3 font-mono text-[12px] uppercase tracking-[0.24em] hover:border-accent",children:"Continue browsing"})]})}function ke(){const{site:t,logo:n,items:i,placing:m,formLocked:y,email:p,me:c,addressSaveNote:g,lostChangeNote:d,idemKey:f,confirmation:o,setConfirmation:u,payment:h,paypalStep:k,squareStep:N,pendingConf:l,paid:b,setPaid:C,payNote:s,afterpayConfirming:a,gocardlessConfirming:w,zipConfirming:P,klarnaConfirming:O,cardConfirming:$,checkoutResult:A,confirmCardPayment:U,cardStillProcessing:W,renewCardPayment:H,holdRenewed:G,leaveCardPayment:Z,checkoutRootRef:Q,setCheckoutHeaderEl:V}=me();return o?r("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[e("h1",{className:"font-display text-3xl",children:b?"Payment received":"Order received"}),r("p",{className:"text-fg-dim",children:[b?r(x,{children:["Thank you — your payment for order"," ",e("span",{className:"font-mono text-fg",children:o.orderNumber})," has gone through."," "]}):r(x,{children:["Thank you — your order ",e("span",{className:"font-mono text-fg",children:o.orderNumber})," is being reviewed by our team."," "]}),c?r(x,{children:["Track it under"," ",e(R,{href:"/account/orders",className:"text-accent underline",children:"your orders"}),"."]}):e(x,{children:"We’ve emailed you a link to set a password and track it."})]}),e(ye,{order:o,paid:b}),d&&e("p",{className:"text-sm text-fg-dim",children:d}),s&&e("p",{className:"text-sm text-fg-dim",children:s}),g&&e("p",{className:"text-sm text-fg-dim",children:g}),!c&&r("p",{className:"text-sm text-fg-dim",children:["You can also"," ",e(R,{href:`/track?order=${encodeURIComponent(o.orderNumber)}`,className:"text-accent underline",children:"track this order"})," ","anytime with just your order number and email — no password needed."]}),e(R,{href:"/wheels",className:"mt-2 border-2 border-line px-6 py-3 font-mono text-[12px] uppercase tracking-[0.24em] hover:border-accent",children:"Continue browsing"})]}):A?e(be,{result:A,lostChangeNote:d}):$?r("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[e("h1",{className:"font-display text-3xl",children:"Confirming your payment…"}),e("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Placing your order — one moment."})]}):a?r("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[e("h1",{className:"font-display text-3xl",children:"Confirming your payment…"}),e("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Afterpay — one moment."})]}):w?r("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[e("h1",{className:"font-display text-3xl",children:"Setting up your direct debit…"}),e("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Confirming with GoCardless — one moment."})]}):P?r("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[e("h1",{className:"font-display text-3xl",children:"Confirming your payment…"}),e("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Zip — one moment."})]}):O?r("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[e("h1",{className:"font-display text-3xl",children:"Confirming your payment…"}),e("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Klarna — one moment."})]}):h&&l?e(Ne,{payment:h,checkout:l,holdRenewed:G,onPaid:U,onProcessing:W,onRenew:H,onBack:Z}):k&&l?e(Ce,{confirmation:l,clientId:t.paypalClientId??"",idemKey:f,onPaid:()=>{C(!0),u(l)},onSkip:()=>u(l)}):N&&l?e(je,{confirmation:l,applicationId:t.squareApplicationId??"",locationId:t.squareLocationId??"",environment:t.squareEnvironment??"production",idemKey:f,onPaid:()=>{C(!0),u(l)},onSkip:()=>u(l)}):r("div",{ref:Q,className:"bg-bg text-fg",children:[r("header",{ref:V,className:"sticky top-0 z-30 grid grid-cols-[1fr_auto_1fr] items-center gap-8 max-[640px]:grid-cols-[auto_minmax(0,1fr)_auto] max-[640px]:gap-3 border-b border-line px-[var(--sf-site-gutter,40px)] py-6 backdrop-blur-md max-[640px]:px-[min(20px,var(--sf-site-gutter,40px))] max-[640px]:py-4",style:{background:"color-mix(in oklab, var(--bg) 92%, transparent)"},children:[r(z,{href:"/",className:"inline-flex items-center gap-3 font-mono text-[14px] uppercase tracking-[0.26em] text-fg-dim transition-colors hover:text-accent",children:["←",e("span",{className:"max-[640px]:hidden",children:"Back to shop"})]}),e("div",{className:"flex min-w-0 justify-center max-[640px]:[container-type:inline-size]",children:e(z,{href:"/","aria-label":`${t.name} home`,className:"inline-flex max-w-full items-center justify-center overflow-x-clip",children:e(ce,{variant:"header",scrolled:!0,src:n?.url??null,reverse:n?.reverse??!1,reversedSrc:n?.reversed??null,inkIsDark:n?.inkIsDark??null,size:n?.size??"medium",sizePx:n?.sizePx??null,sizeUnit:n?.sizeUnit??null,siteName:t.name,fitWordmarkToContainer:!0,fitFloorPx:se})})}),t.cardPayments?r("span",{className:"flex items-center justify-end gap-3 font-mono text-[12px] uppercase tracking-[0.26em] text-fg-dim",children:[e("span",{className:"text-green",children:"●"}),e("span",{className:"max-[640px]:hidden",children:"Encrypted ·"})," Stripe"]}):e("span",{})]}),r("section",{className:"mx-auto flex max-w-[var(--sf-site-width,1600px)] flex-wrap items-center justify-between gap-x-8 gap-y-3 border-b border-line bg-surface px-[var(--sf-site-gutter,40px)] py-4 font-mono text-[13px] font-medium uppercase tracking-[0.24em] text-fg max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]",children:[e("span",{className:"inline-flex items-center bg-accent px-3 py-1 font-bold text-bg",children:"Checkout"}),e("nav",{"aria-label":"Checkout steps",className:"flex flex-wrap items-center gap-5",children:[{n:"01",label:"Cart",state:"done"},{n:"02",label:"Ship & pay",state:"active"},{n:"03",label:"Confirmed",state:"pending"}].map(S=>r("span",{className:["relative flex items-center gap-2 transition-colors",S.state==="pending"?"text-fg-dim":"text-fg",S.state==="active"?"font-bold after:absolute after:inset-x-0 after:-bottom-1 after:h-[2px] after:bg-accent":""].join(" "),children:[e("span",{className:S.state==="done"?"text-accent font-bold":"",children:S.n}),e("span",{children:S.label})]},S.n))})]}),r("main",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[1fr_420px] items-start gap-16 px-[var(--sf-site-gutter,40px)] pt-10 pb-[100px] max-view-desktop:grid-cols-1 max-view-desktop:gap-10 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-desktop:pt-8 max-view-desktop:pb-20",children:[r("div",{children:[r(M,{locked:y,children:[e(pe,{}),e(xe,{}),e(ge,{})]}),e(M,{locked:m,children:e(fe,{})})]}),e(ue,{})]}),e("footer",{className:"flex flex-wrap items-center justify-between gap-4 border-t border-line px-[var(--sf-site-gutter,40px)] py-6 font-mono text-[12px] uppercase tracking-[0.22em] text-fg-dim max-[640px]:px-[min(20px,var(--sf-site-gutter,40px))]",children:e("span",{children:oe({legalName:t.legalName,foundedYear:t.foundedYear,siteName:t.name})})})]})}function Ne({payment:t,checkout:n,holdRenewed:i,onPaid:m,onProcessing:y,onRenew:p,onBack:c}){const{formatMoney:g}=E(),d=e("span",{className:"text-fg",children:g(Number(t.amount),t.currency)}),f=Y(()=>ie(t.publishableKey),[t.publishableKey]),o=Y(()=>J(),[]),u=X(n.expiresAt??"",ee());return e("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:r("div",{className:"w-full max-w-xl border border-line bg-bg",children:[r("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[e("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:le(n)}),e("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"Payment"})]}),r("div",{className:"flex flex-col gap-4 px-6 py-6",children:[e("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:n.orderNumber?r(x,{children:["Your order is placed. Pay ",d," by card to confirm it now."]}):i?r(x,{children:["Your hold ran out, so your items are held again",u?` until ${u}`:"",". Enter your card again, then pay ",d,"."]}):r(x,{children:["Your items are held",u?` until ${u}`:"",". Pay ",d," by card to place your order."]})}),e(te,{stripe:f,options:{clientSecret:t.clientSecret,appearance:o},children:e(Pe,{payment:t,checkout:n,onPaid:m,onProcessing:y,onRenew:p,onBack:c})},t.clientSecret)]})]})})}const we=5;function Pe({payment:t,checkout:n,onPaid:i,onProcessing:m,onRenew:y,onBack:p}){const{formatMoney:c}=E(),g=ae(),d=ne(),[f,o]=v(!1),[u,h]=v(null),k=j(!1);async function N(){try{return(await g.retrievePaymentIntent(t.clientSecret)).paymentIntent?.status}catch{return}}async function l(s){let a=s;for(let w=0;a==="processing"&&w<we;w+=1)await new Promise(P=>setTimeout(P,1e3)),a=await N()??a;if(a==="succeeded"){i();return}if(a==="processing"){m();return}h("Payment did not complete. Please try again."),o(!1)}async function b(){if(!g||!d||f)return;o(!0),h(null),k.current=!0;const s=await g.confirmPayment({elements:d,redirect:"if_required"}).catch(()=>null);if(!s){const a=await N();if(a==="succeeded"||a==="processing"){await l(a);return}h(a===void 0?q:"Payment failed. Please try again."),o(!1);return}if(s.error){if(!n.orderNumber&&s.error.code==="payment_intent_unexpected_state"){const a=await N();if(a==="succeeded"||a==="processing"){await l(a);return}if(a===void 0){h(q),o(!1);return}await y(a==="canceled"),o(!1);return}h(s.error.message??"Payment failed. Please try again."),o(!1);return}await l(s.paymentIntent?.status)}async function C(){if(f)return;if(!k.current){p();return}o(!0),h(null);const s=await N();if(s==="succeeded"||s==="processing"){await l(s);return}if(o(!1),s===void 0){h(q);return}p()}return r("div",{className:"flex flex-col gap-4",children:[e(re,{}),u&&e(_,{role:"alert",children:u}),e("button",{type:"button",onClick:b,disabled:!g||!d||f,className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all",!g||!d||f?"cursor-not-allowed border-line bg-surface text-fg-dim":"border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg"].join(" "),children:f?r(x,{children:["Processing… ",e("span",{children:"·"})]}):r(x,{children:["Pay ",c(Number(t.amount),t.currency),e("span",{className:"transition-transform group-hover:translate-x-1",children:"→"})]})}),!n.orderNumber&&!f&&r("button",{type:"button",onClick:C,className:"inline-flex items-center gap-3 self-start font-mono text-[12px] uppercase tracking-[0.26em] text-fg-dim transition-colors hover:text-accent",children:["←",e("span",{children:"Back to checkout"})]})]})}const B="paypal-sdk-js";let I=null;function ve(t,n){const i=`${t}|${n}`;if(I?.key===i)return I.promise;const m=new Promise((y,p)=>{document.getElementById(B)?.remove();const c=document.createElement("script");c.id=B;const g=new URLSearchParams({"client-id":t,currency:n,intent:"capture"});c.src=`https://www.paypal.com/sdk/js?${g}`,c.onload=()=>{const d=window.paypal;d?y(d):p(new Error("PayPal SDK loaded without its namespace"))},c.onerror=()=>p(new Error("PayPal SDK failed to load")),document.head.appendChild(c)});return I={key:i,promise:m},m}function Ce({confirmation:t,clientId:n,idemKey:i,onPaid:m,onSkip:y}){const{formatMoney:p}=E(),c=j(null),[g,d]=v(!1),[f,o]=v(null),u=j(m);return u.current=m,D(()=>{let h=!1,k=null;return ve(n,t.currency).then(N=>{if(!(h||!c.current))return k=N.Buttons({style:{layout:"vertical",color:"gold",shape:"rect",label:"paypal"},createOrder:async()=>(await T.createPaypalOrder({idempotencyKey:i})).paypalOrderId,onApprove:async l=>{try{if((await T.capturePaypalOrder({idempotencyKey:i,paypalOrderId:l.orderID})).status==="paid"){u.current();return}o("PayPal did not complete the payment. Please try again.")}catch(b){o(b instanceof L?b.message:"PayPal payment failed. Please try again.")}},onError:()=>{o("PayPal could not process the payment. Please try again.")}}),k.render(c.current).then(()=>{h||d(!0)})}).catch(()=>{h||o("PayPal could not be loaded. You can pay later — your order stands either way.")}),()=>{h=!0,k?.close?.()}},[n,t.currency,i]),e("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:r("div",{className:"w-full max-w-xl border border-line bg-bg",children:[r("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[e("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:t.orderNumber}),e("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"PayPal"})]}),r("div",{className:"flex flex-col gap-4 px-6 py-6",children:[r("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:["Your order is placed. Pay"," ",e("span",{className:"text-fg",children:p(Number(t.grandTotal),t.currency)})," ","with PayPal to confirm it now."]}),!g&&!f&&e("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Loading PayPal…"}),e("div",{ref:c}),f&&e(_,{role:"alert",children:f}),e("button",{type:"button",onClick:y,className:"self-center font-mono text-[11px] uppercase tracking-[0.24em] text-fg-dim underline-offset-4 transition-colors hover:text-accent hover:underline",children:"Pay later — our team will be in touch"})]})]})})}const F="square-web-sdk";let K=null;function Se(t){const n=t==="sandbox"?"sandbox":"production";if(K?.key===n)return K.promise;const i=new Promise((m,y)=>{document.getElementById(F)?.remove();const p=document.createElement("script");p.id=F,p.src=n==="sandbox"?"https://sandbox.web.squarecdn.com/v1/square.js":"https://web.squarecdn.com/v1/square.js",p.onload=()=>{const c=window.Square;c?m(c):y(new Error("Square SDK loaded without its namespace"))},p.onerror=()=>y(new Error("Square SDK failed to load")),document.head.appendChild(p)});return K={key:n,promise:i},i}function je({confirmation:t,applicationId:n,locationId:i,environment:m,idemKey:y,onPaid:p,onSkip:c}){const{formatMoney:g}=E(),d=j(null),f=j(null),o=j(null),[u,h]=v(!1),[k,N]=v(!1),[l,b]=v(null);D(()=>{let s=!1,a=null;return Se(m).then(async w=>{if(s||!d.current)return;const P=w.payments(n,i);o.current=P,a=await P.card(),await a.attach(d.current),f.current=a,s||h(!0)}).catch(()=>{s||b("Square could not be loaded. You can pay later — your order stands either way.")}),()=>{s=!0,a?.destroy?.()}},[n,i,m]);async function C(){const s=f.current;if(!(!s||k)){N(!0),b(null);try{const a=await s.tokenize();if(a.status!=="OK"||!a.token){b(a.errors?.[0]?.message??"Please check the card details and try again."),N(!1);return}let w;try{w=(await o.current?.verifyBuyer?.(a.token,{amount:String(t.grandTotal),currencyCode:t.currency,intent:"CHARGE"}))?.token}catch{}if((await T.chargeSquare({idempotencyKey:y,sourceId:a.token,...w?{verificationToken:w}:{}})).status==="paid"){p();return}b("Square did not complete the payment. Please try again.")}catch(a){b(a instanceof L?a.message:"Square payment failed. Please try again.")}N(!1)}}return e("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:r("div",{className:"w-full max-w-xl border border-line bg-bg",children:[r("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[e("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:t.orderNumber}),e("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"Card"})]}),r("div",{className:"flex flex-col gap-4 px-6 py-6",children:[r("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:["Your order is placed. Pay"," ",e("span",{className:"text-fg",children:g(Number(t.grandTotal),t.currency)})," ","by card to confirm it now."]}),!u&&!l&&e("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Loading card form…"}),e("div",{ref:d}),l&&e(_,{role:"alert",children:l}),e("button",{type:"button",onClick:C,disabled:!u||k,className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all",!u||k?"cursor-not-allowed border-line bg-surface text-fg-dim":"border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg"].join(" "),children:k?r(x,{children:["Processing… ",e("span",{children:"·"})]}):r(x,{children:["Pay ",g(Number(t.grandTotal),t.currency),e("span",{className:"transition-transform group-hover:translate-x-1",children:"→"})]})}),e("button",{type:"button",onClick:c,disabled:k,className:"self-center font-mono text-[11px] uppercase tracking-[0.24em] text-fg-dim underline-offset-4 transition-colors hover:text-accent hover:underline",children:"Pay later — our team will be in touch"})]})]})})}export{be as PayFirstResultView,he as default};
@@ -1 +1 @@
1
- "use client";import{jsx as t,Fragment as s,jsxs as p}from"react/jsx-runtime";import u from"../ProductHeroPanel.js";import l from"../ProductLightbox.js";import m from"../SectionNotice.js";import d from"./KindGate.js";import{useLightbox as a}from"../useLightbox.js";import{useProductSelection as f}from"../useProductSelection.js";import{PLP_KINDS as h}from"../../lib/catalog/plp-item.js";import{useCurrentProduct as x}from"../../lib/document/current-product.js";import{useSampleProduct as P}from"./useSampleProduct.js";import{say as g}from"efficient-web-builder/format/lib/editor-words";const L=h;function b({editing:e=!1,pricePlacement:r,showVehicleFitment:i=!0,...o}){const n=x();return t(d,{kinds:L,type:"ProductHero",editing:e,children:n?t(u,{product:n.product,selection:n.selection,onLightbox:n.openLightbox,editing:e,pricePlacement:r,showVehicleFitment:i,...o}):e?t(S,{pricePlacement:r,showVehicleFitment:i,...o}):t(m,{size:"tall",children:"Bound to the current product — preview on a product page."})})}function S({pricePlacement:e,showVehicleFitment:r,...i}){const o=P(!0);return o?t(F,{product:o,pricePlacement:e,showVehicleFitment:r,...i}):t(m,{size:"tall",children:g("Loading sample product…")})}function F({product:e,pricePlacement:r,showVehicleFitment:i,...o}){const n=f(e,{editing:!0}),c=a();return p(s,{children:[t(u,{product:e,selection:n,onLightbox:c.open,editing:!0,pricePlacement:r,showVehicleFitment:i,...o}),t(l,{item:c.item,onClose:c.close})]})}export{F as SampleHeroLoaded,b as default,L as supportedKinds};
1
+ "use client";import{jsx as t,Fragment as s,jsxs as u}from"react/jsx-runtime";import m from"../ProductHeroPanel.js";import l from"../ProductLightbox.js";import p from"../SectionNotice.js";import d from"./KindGate.js";import{useLightbox as a}from"../useLightbox.js";import{useProductSelection as f}from"../useProductSelection.js";import{PLP_KINDS as h}from"../../lib/catalog/plp-item.js";import{useCurrentProduct as P}from"../../lib/document/current-product.js";import{useSampleProduct as x}from"./useSampleProduct.js";import{say as g}from"efficient-web-builder/format/lib/editor-words";import{PRODUCT_HERO_TYPE as L}from"../../lib/document/document-nodes.js";const b=h;function S({editing:e=!1,pricePlacement:r,showVehicleFitment:i=!0,...o}){const n=P();return t(d,{kinds:b,type:L,editing:e,children:n?t(m,{product:n.product,selection:n.selection,onLightbox:n.openLightbox,editing:e,pricePlacement:r,showVehicleFitment:i,...o}):e?t(_,{pricePlacement:r,showVehicleFitment:i,...o}):t(p,{size:"tall",children:"Bound to the current product — preview on a product page."})})}function _({pricePlacement:e,showVehicleFitment:r,...i}){const o=x(!0);return o?t(F,{product:o,pricePlacement:e,showVehicleFitment:r,...i}):t(p,{size:"tall",children:g("Loading sample product…")})}function F({product:e,pricePlacement:r,showVehicleFitment:i,...o}){const n=f(e,{editing:!0}),c=a();return u(s,{children:[t(m,{product:e,selection:n,onLightbox:c.open,editing:!0,pricePlacement:r,showVehicleFitment:i,...o}),t(l,{item:c.item,onClose:c.close})]})}export{F as SampleHeroLoaded,S as default,b as supportedKinds};
@@ -1,2 +1,3 @@
1
1
  import { type TyreSummary } from "../lib/api/index.js";
2
- export declare function useTyreCatalog(needed: boolean): ReadonlyMap<string, TyreSummary>;
2
+ export type TyreThumbnail = Pick<TyreSummary, "coverImage" | "tyreTypes">;
3
+ export declare function useTyreCatalog(slugs: readonly string[]): ReadonlyMap<string, TyreThumbnail>;
@@ -1 +1,3 @@
1
- "use client";import{useEffect as o,useState as u}from"react";import{products as s}from"../lib/api/index.js";const c=new Map;function p(a){const[e,n]=u(null);return o(()=>{if(!a||e)return;let l=!0;return s.listCatalog(["tyre"]).then(t=>{l&&n(new Map(t.flatMap(r=>r.kind==="tyre"?[[r.slug,r]]:[])))}).catch(t=>{console.error("[useTyreCatalog] tyre catalog read failed",t)}),()=>{l=!1}},[a,e]),e??c}export{p as useTyreCatalog};
1
+ "use client";import{useEffect as u,useState as f}from"react";import{products as l}from"../lib/api/index.js";const h=new Map,i=new Map;function p(e){const r=e.variants.map(t=>t.specs?.tireType).filter(t=>!!t);return{coverImage:e.coverImage,tyreTypes:[...new Set(r)]}}function m(e){const r=i.get(e);if(r)return r;const t=l.getTyre(e).then(p).catch(n=>{throw i.delete(e),n});return i.set(e,t),t}function d(e){const[r,t]=f(h),n=[...new Set(e)].sort().join(`
2
+ `);return u(()=>{if(!n)return;let s=!0;for(const o of n.split(`
3
+ `))m(o).then(c=>{s&&t(a=>a.get(o)===c?a:new Map(a).set(o,c))}).catch(c=>{s&&console.error("[useTyreCatalog] tyre read failed",o,c)});return()=>{s=!1}},[n]),r}export{d as useTyreCatalog};
@@ -1,3 +1,3 @@
1
- export declare function formatAppointmentTime(value: string, timezone: string): string;
2
- export declare function formatAppointment(value: string, timezone: string): string;
1
+ export declare function formatAppointmentTime(value: string, ...zones: string[]): string;
2
+ export declare function formatAppointment(value: string, ...zones: string[]): string;
3
3
  export declare function startHasPassed(start: string, now: number): boolean;
@@ -1 +1 @@
1
- const i=void 0,r={hour:"numeric",minute:"2-digit"},o={weekday:"long",day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"};function a(t,e){try{return new Intl.DateTimeFormat(void 0,{...r,timeZone:e}).format(new Date(t))}catch{return new Date(t).toLocaleTimeString([],r)}}function m(t,e){try{return new Intl.DateTimeFormat(void 0,{...o,timeZone:e}).format(new Date(t))}catch{return new Date(t).toLocaleString()}}function c(t,e){const n=Date.parse(t);return Number.isFinite(n)&&n<=e}export{m as formatAppointment,a as formatAppointmentTime,c as startHasPassed};
1
+ import{formatTime as m}from"efficient-shell/format";import{firstReadableZone as r,runtimeLocale as a}from"../zone.js";const u={weekday:"long",day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"};function i(t){const e=new Date(t);return Number.isFinite(e.getTime())?e:null}function f(t,...e){const n=r(...e);return!n||!i(t)?"":m(t,{locale:a(),timeZone:n})}function p(t,...e){const n=r(...e),o=i(t);return!n||!o?"":new Intl.DateTimeFormat(void 0,{...u,timeZone:n}).format(o)}function l(t,e){const n=Date.parse(t);return Number.isFinite(n)&&n<=e}export{p as formatAppointment,f as formatAppointmentTime,l as startHasPassed};
@@ -0,0 +1 @@
1
+ export declare function holdTime(expiresAt: string, zone: string): string;
@@ -0,0 +1 @@
1
+ import{formatTime as r}from"efficient-shell/format";import{firstReadableZone as t,runtimeLocale as i}from"../zone.js";function f(e,m){const o=t(m);return!o||Number.isNaN(new Date(e).getTime())?"":r(e,{locale:i(),timeZone:o})}export{f as holdTime};
@@ -1 +1 @@
1
- import{CARD_ROW_FIELD_PROP as s}from"efficient-web-builder/format/lib/content/card-template";import{RECORD_TITLE_FIELD as m}from"efficient-web-builder/format/lib/content/record-row";import{TEMPLATE_RECORD_TYPE_PROP as _}from"efficient-web-builder/format/lib/content/record-types";import{BOX_TYPE as n,CONTAINER_BLOCKS_SLOT as r}from"efficient-web-builder/format/lib/document/container-blocks";import{BOX as E,DIM as c,TEXT as O,boxPadding as p,labelLook as g,seedNodes as d}from"efficient-web-builder/format/lib/document/seed-parts";import{BLOG_POST_RECORD_TYPE as P}from"./article-body.js";import{ARTICLE_BODY_BLOCK as l,ARTICLE_HEADING_LOOK as T,ARTICLE_MEASURE as y,ARTICLE_PARAGRAPH_LOOK as R,articleBodySeed as B}from"./article-body-seed.js";const a={...E,direction:"column",align:"center"},i=(o,e,t)=>({type:"Text",props:{...e,text:"",[s]:o,align:"center",maxWidth:y,_partStyles:{text:{...t,align:"center"}}}}),L=[{type:n,props:{...a,name:"Title",gap:16,...p(64,32,40,20),sectionPaddingBottom:16,sectionPaddingBottomPhone:16},slots:{[r]:[i("category",{...c,tag:"p"},{textStyle:"body-1",...g(13)}),i(m,{...O,tag:"h1"},T),i("excerpt",{...c,tag:"p"},R)]}},{type:n,props:{...a,align:"stretch",name:"Cover",...p(0,0,0,0)},slots:{[r]:[{type:"ImageBlock",props:{[s]:"cover",aspect:"16/9",contained:!0,widthMode:"page",...p(0,32,0,20)}}]}},{type:n,props:{...a,name:"Body",...p(0,32,0,20),sectionPaddingBottom:64,sectionPaddingBottomPhone:40},slots:{[r]:[{type:l,props:{}}]}},{type:n,props:{...a,align:"stretch",name:"Breadcrumb",...p(0,0,0,0)},slots:{[r]:[{type:"Breadcrumb",props:{items:[{label:"Home",href:"/"},{label:"Journal",href:"/journal"}],meta:"",[s]:m}}]}}];function x(){const o=d(L,(e,t)=>`article-${e}-${t.replace(/\./g,"-")}`).map(A);return{root:{props:{[_]:P}},content:o,zones:{}}}function A(o){const e=o.props[r];return Array.isArray(e)?{...o,props:{...o.props,[r]:e.map(t=>t.type===l?{...t,props:{...t.props,template:B(String(t.props.id))}}:t)}}:o}export{x as articlePageDocument};
1
+ import{CARD_ROW_FIELD_PROP as s}from"efficient-web-builder/format/lib/content/card-template";import{RECORD_TITLE_FIELD as m}from"efficient-web-builder/format/lib/content/record-row";import{TEMPLATE_RECORD_TYPE_PROP as _}from"efficient-web-builder/format/lib/content/record-types";import{BOX_TYPE as n,CONTAINER_BLOCKS_SLOT as r}from"efficient-web-builder/format/lib/document/container-blocks";import{BOX as E,DIM as c,TEXT as O,boxPadding as p,labelLook as g,seedNodes as d}from"efficient-web-builder/format/lib/document/seed-parts";import{BLOG_POST_RECORD_TYPE as P}from"./article-body.js";import{ARTICLE_BODY_BLOCK as l,ARTICLE_HEADING_LOOK as T,ARTICLE_MEASURE as y,ARTICLE_PARAGRAPH_LOOK as R,articleBodySeed as B}from"efficient-web-builder/format/lib/document/article-body-seed";const a={...E,direction:"column",align:"center"},i=(o,e,t)=>({type:"Text",props:{...e,text:"",[s]:o,align:"center",maxWidth:y,_partStyles:{text:{...t,align:"center"}}}}),L=[{type:n,props:{...a,name:"Title",gap:16,...p(64,32,40,20),sectionPaddingBottom:16,sectionPaddingBottomPhone:16},slots:{[r]:[i("category",{...c,tag:"p"},{textStyle:"body-1",...g(13)}),i(m,{...O,tag:"h1"},T),i("excerpt",{...c,tag:"p"},R)]}},{type:n,props:{...a,align:"stretch",name:"Cover",...p(0,0,0,0)},slots:{[r]:[{type:"ImageBlock",props:{[s]:"cover",aspect:"16/9",contained:!0,widthMode:"page",...p(0,32,0,20)}}]}},{type:n,props:{...a,name:"Body",...p(0,32,0,20),sectionPaddingBottom:64,sectionPaddingBottomPhone:40},slots:{[r]:[{type:l,props:{}}]}},{type:n,props:{...a,align:"stretch",name:"Breadcrumb",...p(0,0,0,0)},slots:{[r]:[{type:"Breadcrumb",props:{items:[{label:"Home",href:"/"},{label:"Journal",href:"/journal"}],meta:"",[s]:m}}]}}];function x(){const o=d(L,(e,t)=>`article-${e}-${t.replace(/\./g,"-")}`).map(A);return{root:{props:{[_]:P}},content:o,zones:{}}}function A(o){const e=o.props[r];return Array.isArray(e)?{...o,props:{...o.props,[r]:e.map(t=>t.type===l?{...t,props:{...t.props,template:B(String(t.props.id))}}:t)}}:o}export{x as articlePageDocument};
@@ -1 +1 @@
1
- import{BOX_HIDE_WHEN_ROW_EMPTY as g}from"efficient-web-builder/format/lib/content/card-template";import{BOX_TYPE as o,CONTAINER_BLOCKS_SLOT as s}from"efficient-web-builder/format/lib/document/container-blocks";import{rowFieldTextSeed as l}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{BOX as T,DIM as u,INNER_BOX as d,TEXT as _,boxPadding as f,seedNodes as S}from"efficient-web-builder/format/lib/document/seed-parts";import{parseSectionHeadPlacement as b}from"efficient-web-builder/format/lib/sections/section-head-placement";import{BOOKING_KIND_PROP as P,bookingKindRole as k}from"../booking/text-kinds.js";const p="serviceTemplate",O="timeTemplate",B=[{key:"name",label:"Service"},{key:"meta",label:"Duration · price"},{key:"description",label:"Service description",multiline:!0}],E=[{key:"time",label:"Time"},{key:"businessTime",label:"Business time"}],F=[{slot:p,label:"Service template",fields:B},{slot:O,label:"Time template",fields:E}],C=[...B,...E],I=["Text",o],W={[p]:{type:"slot",allow:[...I]},[O]:{type:"slot",allow:[...I]}},y="BookingBox",L="AppointmentBooking",a=(e,t,n={})=>({fontRole:e,size:t,...n});function c(e,t,n,i=!1){const r=k(n[P[t]]);if(!r)return e;const{fontRole:D,size:N,...x}=e;return{...x,role:r,...i?{size:N}:{}}}const m={lineHeight:1.5};function h(e){return{type:o,props:{...T,direction:"column",name:"Service",justify:"center",gap:12,gapPhone:12,...f(16,16),sectionBorder:{width:1}},slots:{[s]:[{type:o,props:{...d,name:"Words",gap:4,gapPhone:4},slots:{[s]:[l("name",{..._,tag:"span"},c(a("heading",18,{weight:500,...m}),"name",e)),l("meta",{...u,tag:"span"},c(a("label",11,{case:"upper",letterSpacing:.14,...m}),"value",e))]}},{type:o,props:{...d,name:"Description",[g]:["description"]},slots:{[s]:[l("description",{...u,tag:"span"},c(a("heading",14,m),"note",e))]}}]}}}function K(e){return{type:o,props:{...T,direction:"column",name:"Time",align:"center",justify:"center",gap:2,gapPhone:2,...f(8,12),sectionBorder:{width:1},sectionHeightMode:"fixed",sectionHeightValue:44,sectionHeightUnit:"px"},slots:{[s]:[l("time",{..._,tag:"span"},c(a("label",12,{weight:600,case:"upper",letterSpacing:.12,align:"center",...m}),"value",e)),{type:o,props:{...d,name:"Business time",align:"center",[g]:["businessTime"]},slots:{[s]:[l("businessTime",{...u,tag:"span"},c(a("label",9,{case:"upper",letterSpacing:.08,align:"center",...m}),"value",e,!0))]}}]}}}function v(e,t={}){return S([h(t)],(n,i)=>i==="0"?`${e}~service`:`${e}~service.${i.slice(2)}`)}function G(e,t={}){return S([K(t)],(n,i)=>i==="0"?`${e}~time`:`${e}~time.${i.slice(2)}`)}function w(e,t){return e===y?t.region==="booking":e===L?t.layout!=="boxes"||b(t.headPlacement)==="own-box":!1}function Y(e,t){if(!w(e,t))return t;const n=t[p]===void 0,i=t[O]===void 0;if(!n&&!i)return t;const r=typeof t.id=="string"&&t.id.trim()?t.id:e;return{...t,...n?{[p]:v(r,t)}:{},...i?{[O]:G(r,t)}:{}}}export{L as APPOINTMENT_BOOKING_TYPE,y as BOOKING_BOX_TYPE,I as BOOKING_OPTION_ALLOW,C as BOOKING_OPTION_FIELDS,B as BOOKING_SERVICE_FIELDS,p as BOOKING_SERVICE_SLOT,F as BOOKING_TEMPLATE_SLOTS,W as BOOKING_TEMPLATE_SLOT_FIELDS,E as BOOKING_TIME_FIELDS,O as BOOKING_TIME_SLOT,v as bookingServiceSeed,G as bookingTimeSeed,w as drawsBookingStep,Y as withBookingTemplates};
1
+ import{BOX_HIDE_WHEN_ROW_EMPTY as g}from"efficient-web-builder/format/lib/content/card-template";import{BOX_TYPE as o,CONTAINER_BLOCKS_SLOT as r}from"efficient-web-builder/format/lib/document/container-blocks";import{rowFieldTextSeed as s}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{BOX as T,DIM as O,INNER_BOX as u,TEXT as _,boxPadding as f,seedNodes as I}from"efficient-web-builder/format/lib/document/seed-parts";import{parseSectionHeadPlacement as P}from"efficient-web-builder/format/lib/sections/section-head-placement";import{BOOKING_KIND_PROP as k,bookingKindRole as L}from"../booking/text-kinds.js";import{seedNodeId as h,slotSeedIds as S}from"./seed-ids.js";const p="serviceTemplate",d="timeTemplate",B=[{key:"name",label:"Service"},{key:"meta",label:"Duration · price"},{key:"description",label:"Service description",multiline:!0}],E=[{key:"time",label:"Time"},{key:"businessTime",label:"Business time"}],V=[{slot:p,label:"Service template",fields:B},{slot:d,label:"Time template",fields:E}],j=[...B,...E],N=["Text",o],z={[p]:{type:"slot",allow:[...N]},[d]:{type:"slot",allow:[...N]}},K="BookingBox",y="AppointmentBooking",a=(e,t,n={})=>({fontRole:e,size:t,...n});function l(e,t,n,m=!1){const i=L(n[k[t]]);if(!i)return e;const{fontRole:M,size:x,...b}=e;return{...b,role:i,...m?{size:x}:{}}}const c={lineHeight:1.5};function v(e){return{type:o,props:{...T,direction:"column",name:"Service",justify:"center",gap:12,gapPhone:12,...f(16,16),sectionBorder:{width:1}},slots:{[r]:[{type:o,props:{...u,name:"Words",gap:4,gapPhone:4},slots:{[r]:[s("name",{..._,tag:"span"},l(a("heading",18,{weight:500,...c}),"name",e)),s("meta",{...O,tag:"span"},l(a("label",11,{case:"upper",letterSpacing:.14,...c}),"value",e))]}},{type:o,props:{...u,name:"Description",[g]:["description"]},slots:{[r]:[s("description",{...O,tag:"span"},l(a("heading",14,c),"note",e))]}}]}}}function G(e){return{type:o,props:{...T,direction:"column",name:"Time",align:"center",justify:"center",gap:2,gapPhone:2,...f(8,12),sectionBorder:{width:1},sectionHeightMode:"fixed",sectionHeightValue:44,sectionHeightUnit:"px"},slots:{[r]:[s("time",{..._,tag:"span"},l(a("label",12,{weight:600,case:"upper",letterSpacing:.12,align:"center",...c}),"value",e)),{type:o,props:{...u,name:"Business time",align:"center",[g]:["businessTime"]},slots:{[r]:[s("businessTime",{...O,tag:"span"},l(a("label",9,{case:"upper",letterSpacing:.08,align:"center",...c}),"value",e,!0))]}}]}}}function w(e,t={}){return I([v(t)],S(e,"service"))}function D(e,t={}){return I([G(t)],S(e,"time"))}function R(e,t){return e===K?t.region==="booking":e===y?t.layout!=="boxes"||P(t.headPlacement)==="own-box":!1}function U(e,t){if(!R(e,t))return t;const n=t[p]===void 0,m=t[d]===void 0;if(!n&&!m)return t;const i=h(t,e);return{...t,...n?{[p]:w(i,t)}:{},...m?{[d]:D(i,t)}:{}}}export{y as APPOINTMENT_BOOKING_TYPE,K as BOOKING_BOX_TYPE,N as BOOKING_OPTION_ALLOW,j as BOOKING_OPTION_FIELDS,B as BOOKING_SERVICE_FIELDS,p as BOOKING_SERVICE_SLOT,V as BOOKING_TEMPLATE_SLOTS,z as BOOKING_TEMPLATE_SLOT_FIELDS,E as BOOKING_TIME_FIELDS,d as BOOKING_TIME_SLOT,w as bookingServiceSeed,D as bookingTimeSeed,R as drawsBookingStep,U as withBookingTemplates};
@@ -1 +1 @@
1
- import{BOX_HIDE_WHEN_ROW_EMPTY as C,CARD_ROW_LINK_PROP as E}from"efficient-web-builder/format/lib/content/card-template";import{BOX_TYPE as o,CONTAINER_BLOCKS_SLOT as l}from"efficient-web-builder/format/lib/document/container-blocks";import{rowFieldTextSeed as n}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{BOX as S,DIM as r,INNER_BOX as b,TEXT as c,boxPadding as d,labelStyle as N,seedNodes as f,token as O}from"efficient-web-builder/format/lib/document/seed-parts";const h="template",_="reasonTemplate",L="channelTemplate",y={key:"title",label:"Title",plain:!0},$=[{key:"eyebrow",label:"Eyebrow",plain:!0},y,{key:"copy",label:"Body",multiline:!0},{key:"response",label:"Response time"}],M=[y],V=[{key:"label",label:"Label",plain:!0},{key:"value",label:"Value",plain:!0},{key:"sub",label:"Sub line",plain:!0},{key:"href",label:"Link",kind:"link"}],Y=["Text","ImageBlock",o],p=(e,t)=>({...N(e),letterSpacing:t,lineHeight:1.5}),m={...p(12,.24),color:"main"},P={textStyle:"heading-3",...O("headingSmall",26),weight:500,case:"upper",lineHeight:1.05,letterSpacing:-.02},x={textStyle:"heading-1",...O("body",14),weight:400,case:"none",lineHeight:1.5,letterSpacing:0,color:"muted"},u=p(12,.22),w=p(12,.2),A={...p(12,.3),color:"main"},R={textStyle:"heading-3",...O("headingSmall",24),weight:500,case:"none",lineHeight:1.2,letterSpacing:-.02},H={...p(12,.2),color:"muted"},s=(e,t,i={})=>({...b,name:e,gap:t,gapPhone:t,...i}),I=()=>({type:o,props:s("Topic",16,{justify:"between",...d(40,32),sectionHeightMode:"fixed",sectionHeightValue:240,sectionHeightUnit:"px"}),slots:{[l]:[{type:o,props:s("Head",16),slots:{[l]:[n("eyebrow",{...c,tag:"p",widthFit:"fill"},m),n("title",{...c,tag:"h3",widthFit:"fill"},P)]}},{type:o,props:s("Foot",24),slots:{[l]:[n("copy",{...r,tag:"p",widthFit:"fill"},x),{type:o,props:{...S,name:"Response",direction:"row",justify:"between",align:"center",gap:16,gapPhone:16,phoneRow:2,sharePhone:"content",wrapPhone:"nowrap",...d(0,0),sectionPaddingTop:16,sectionPaddingTopPhone:16,sectionBorder:{top:1},[C]:["response"]},slots:{[l]:[{type:"Text",props:{...r,tag:"p",text:"Response",_partStyles:{text:u}}},n("response",{...c,tag:"p"},u)]}}]}}]}}),B=()=>({type:o,props:{...s("Reason",0),...d(12,16),sectionBorder:{width:1}},slots:{[l]:[n("title",{...r,tag:"p"},w)]}}),k=()=>({type:o,props:{...s("Channel",12),...d(32,20,20,20),sectionPaddingLeft:22,sectionPaddingTopTablet:20,sectionPaddingRightTablet:20,sectionPaddingBottomTablet:20,sectionPaddingLeftTablet:20,sectionBorder:{bottom:1}},slots:{[l]:[n("label",{...c,tag:"p",widthFit:"fill"},A),{type:o,props:{...s("Value",0),[E]:"href"},slots:{[l]:[n("value",{...c,tag:"p",widthFit:"fill"},R)]}},n("sub",{...r,tag:"p",widthFit:"fill"},H)]}});function g(e,t,i){return f([e],(T,a)=>a==="0"?`${t}~${i}`:`${t}~${i}.${a.slice(2)}`)}const F=e=>typeof e.id=="string"&&e.id.trim()?e.id:"ContactRouting";function U(e){const t=e[h]===void 0,i=e[_]===void 0,T=e[L]===void 0;if(!t&&!i&&!T)return e;const a=F(e);return{...e,...t?{[h]:g(I(),a,"topic")}:{},...i?{[_]:g(B(),a,"reason")}:{},...T?{[L]:g(k(),a,"channel")}:{}}}export{V as CONTACT_CHANNEL_FIELDS,L as CONTACT_CHANNEL_SLOT,M as CONTACT_REASON_FIELDS,_ as CONTACT_REASON_SLOT,Y as CONTACT_TEMPLATE_ALLOW,$ as CONTACT_TOPIC_FIELDS,h as CONTACT_TOPIC_SLOT,k as contactChannelSeed,B as contactReasonSeed,I as contactTopicSeed,U as withContactTemplates};
1
+ import{BOX_HIDE_WHEN_ROW_EMPTY as C,CARD_ROW_LINK_PROP as S}from"efficient-web-builder/format/lib/content/card-template";import{BOX_TYPE as o,CONTAINER_BLOCKS_SLOT as i}from"efficient-web-builder/format/lib/document/container-blocks";import{rowFieldTextSeed as n}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{BOX as E,DIM as c,INNER_BOX as b,TEXT as s,boxPadding as r,labelStyle as N,seedNodes as m,token as T}from"efficient-web-builder/format/lib/document/seed-parts";import{seedNodeId as f,slotSeedIds as P}from"./seed-ids.js";const h="template",_="reasonTemplate",L="channelTemplate",u={key:"title",label:"Title",plain:!0},U=[{key:"eyebrow",label:"Eyebrow",plain:!0},u,{key:"copy",label:"Body",multiline:!0},{key:"response",label:"Response time"}],j=[u],v=[{key:"label",label:"Label",plain:!0},{key:"value",label:"Value",plain:!0},{key:"sub",label:"Sub line",plain:!0},{key:"href",label:"Link",kind:"link"}],q=["Text","ImageBlock",o],p=(e,t)=>({...N(e),letterSpacing:t,lineHeight:1.5}),x={...p(12,.24),color:"main"},w={textStyle:"heading-3",...T("headingSmall",26),weight:500,case:"upper",lineHeight:1.05,letterSpacing:-.02},A={textStyle:"heading-1",...T("body",14),weight:400,case:"none",lineHeight:1.5,letterSpacing:0,color:"muted"},y=p(12,.22),I=p(12,.2),R={...p(12,.3),color:"main"},H={textStyle:"heading-3",...T("headingSmall",24),weight:500,case:"none",lineHeight:1.2,letterSpacing:-.02},B={...p(12,.2),color:"muted"},a=(e,t,l={})=>({...b,name:e,gap:t,gapPhone:t,...l}),k=()=>({type:o,props:a("Topic",16,{justify:"between",...r(40,32),sectionHeightMode:"fixed",sectionHeightValue:240,sectionHeightUnit:"px"}),slots:{[i]:[{type:o,props:a("Head",16),slots:{[i]:[n("eyebrow",{...s,tag:"p",widthFit:"fill"},x),n("title",{...s,tag:"h3",widthFit:"fill"},w)]}},{type:o,props:a("Foot",24),slots:{[i]:[n("copy",{...c,tag:"p",widthFit:"fill"},A),{type:o,props:{...E,name:"Response",direction:"row",justify:"between",align:"center",gap:16,gapPhone:16,phoneRow:2,sharePhone:"content",wrapPhone:"nowrap",...r(0,0),sectionPaddingTop:16,sectionPaddingTopPhone:16,sectionBorder:{top:1},[C]:["response"]},slots:{[i]:[{type:"Text",props:{...c,tag:"p",text:"Response",_partStyles:{text:y}}},n("response",{...s,tag:"p"},y)]}}]}}]}}),F=()=>({type:o,props:{...a("Reason",0),...r(12,16),sectionBorder:{width:1}},slots:{[i]:[n("title",{...c,tag:"p"},I)]}}),K=()=>({type:o,props:{...a("Channel",12),...r(32,20,20,20),sectionPaddingLeft:22,sectionPaddingTopTablet:20,sectionPaddingRightTablet:20,sectionPaddingBottomTablet:20,sectionPaddingLeftTablet:20,sectionBorder:{bottom:1}},slots:{[i]:[n("label",{...s,tag:"p",widthFit:"fill"},R),{type:o,props:{...a("Value",0),[S]:"href"},slots:{[i]:[n("value",{...s,tag:"p",widthFit:"fill"},H)]}},n("sub",{...c,tag:"p",widthFit:"fill"},B)]}});function O(e,t,l){return m([e],P(t,l))}const D=e=>f(e,"ContactRouting");function z(e){const t=e[h]===void 0,l=e[_]===void 0,g=e[L]===void 0;if(!t&&!l&&!g)return e;const d=D(e);return{...e,...t?{[h]:O(k(),d,"topic")}:{},...l?{[_]:O(F(),d,"reason")}:{},...g?{[L]:O(K(),d,"channel")}:{}}}export{v as CONTACT_CHANNEL_FIELDS,L as CONTACT_CHANNEL_SLOT,j as CONTACT_REASON_FIELDS,_ as CONTACT_REASON_SLOT,q as CONTACT_TEMPLATE_ALLOW,U as CONTACT_TOPIC_FIELDS,h as CONTACT_TOPIC_SLOT,K as contactChannelSeed,F as contactReasonSeed,k as contactTopicSeed,z as withContactTemplates};
@@ -1 +1 @@
1
- import{absolutizeApiUrl as r}from"efficient-web-builder/render/lib/media";import{postDateLabel as i}from"efficient-web-builder/format/lib/content/post-date";import{postPath as l}from"efficient-web-builder/format/lib/links/page-link-rules";function u(e){return{slug:e.slug,title:e.title,excerpt:e.excerpt,category:e.category,coverImage:e.cover_image?r(e.cover_image)??"":"",publishedAt:e.published_at,href:l(e.slug)}}function g(e){const t=e.category.trim();return{slug:e.slug,title:e.title,excerpt:e.excerpt,cover:e.coverImage,meta:t||void 0,dateLabel:i(e.publishedAt)||void 0}}export{u as blogPostRowOfAdmin,g as eventPostOf};
1
+ import{absolutizeApiUrl as i}from"efficient-web-builder/render/lib/media";import{postPath as o}from"efficient-web-builder/format/lib/links/page-link-rules";import{postSnapshotOf as l}from"efficient-web-builder/format/lib/content/post-snapshot";function g(e){return{slug:e.slug,title:e.title,excerpt:e.excerpt,category:e.category,coverImage:e.cover_image?i(e.cover_image)??"":"",publishedAt:e.published_at,href:o(e.slug)}}function n(e){const t=l(e),r=e.category.trim();return{slug:t.slug,title:t.title,excerpt:t.dek,cover:t.image,meta:r||void 0,publishedAt:t.publishedAt}}export{g as blogPostRowOfAdmin,n as eventPostOf};
@@ -1 +1 @@
1
- import{BOX_SWATCH_PROP as c}from"efficient-web-builder/format/lib/content/box-background";import{BOX_ROW_IMAGE_PROP as C}from"efficient-web-builder/format/lib/content/box-card-rule";import{BOX_HIDE_WHEN_ROW_EMPTY as l}from"efficient-web-builder/format/lib/content/card-template";import{BOX_TYPE as t,CONTAINER_BLOCKS_SLOT as r}from"efficient-web-builder/format/lib/document/container-blocks";import{rowFieldTextSeed as f}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{BOX as E,DIM as R,INNER_BOX as d,TEXT as m,boxPadding as i,seedNodes as y}from"efficient-web-builder/format/lib/document/seed-parts";import{roundBox as p,squareBox as T}from"./square-box.js";import{ALLOY_WHEELS_LISTING_TYPE as O}from"../document/document-nodes.js";const x="facetTemplate",H="Filter option template",G=[{key:"facetLabel",label:"Filter option"},{key:"facetName",label:"Type name"},{key:"facetCount",label:"Option count"},{key:"facetColour",label:"Option colour",kind:"colour"},{key:"facetTickFill",label:"Tick box fill",kind:"colour"},{key:"facetTick",label:"Tick mark",kind:"image"},{key:"facetTickMark",label:"Tick box shown"},{key:"facetRadioMark",label:"Round mark shown"},{key:"facetDot",label:"Round mark dot",kind:"colour"}],L="sf-facet-tick-picture",v="data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%271%200.75%2014%2014%27%20id%3D%27"+L+"%27%3E%3Cpath%20d%3D%27M3.2%208%206.4%2011.2%2012.8%203.2%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272.56%27%2F%3E%3C%2Fsvg%3E",Y="--sf-facet-tick",U="[&_[data-sf-card-state~=selected]_.sf-card[style*=sf-facet-tick-picture]]:[background-image:none]! [&_[data-sf-card-state~=selected]_.sf-card[style*=sf-facet-tick-picture]]:[background-color:var(--accent-ink)]! [&_[data-sf-card-state~=selected]_.sf-card[style*=sf-facet-tick-picture]]:[-webkit-mask:var(--sf-facet-tick)_center/cover_no-repeat] [&_[data-sf-card-state~=selected]_.sf-card[style*=sf-facet-tick-picture]]:[mask:var(--sf-facet-tick)_center/cover_no-repeat]";function $(e,n){return{facetLabel:e.label,facetName:"",facetCount:String(e.count),facetColour:e.swatch??"",facetTickFill:n?"main":"",facetTick:n?v:"",facetTickMark:"tick",facetRadioMark:"",facetDot:""}}function j(e,n){return{facetLabel:"",facetName:e.label,facetCount:String(e.count),facetColour:"",facetTickFill:n?"main":"",facetTick:"",facetTickMark:"",facetRadioMark:"radio",facetDot:n?"main":""}}const q=["Text","ImageBlock",t],h={...E,direction:"row",align:"center",phoneRow:2,sharePhone:"content",wrapPhone:"nowrap"},k=13,s=10,w=2,_=1,o="2026-12-18",a="storefront sections owner",V=[{part:"facetLabel",kind:"size",value:k,reason:"The old rail's option words were 13 px; kept so no facet word moves.",owner:a,due:o},{part:"facetName",kind:"size",value:k,reason:"A type's name takes the facet words' 13 px, so the type picker has the same rail look.",owner:a,due:o},{part:"Option",kind:"gap",value:s,reason:"The old rail's 10 px between the option and its count; kept so no word moves.",owner:a,due:o},{part:"Choice",kind:"gap",value:s,reason:"The old rail's 10 px between tick box, dot and words; kept so no word moves.",owner:a,due:o},{part:"Tick box",kind:"padding",value:1,reason:"The 1 px ring round the tick box, drawn as the Box's own Fill inside 1 px padding.",owner:a,due:o},{part:"Radio",kind:"padding",value:1,reason:"The 1 px ring round the round mark, drawn as the Box's own Fill inside 1 px padding.",owner:a,due:o},{part:"Radio ground",kind:"padding",value:3,reason:"The 3 px between the round mark's ring and its 8 px dot, as the browser's own radio.",owner:a,due:o},{part:"Tick",kind:"box",value:14,reason:"The tick box's ground inside its 1 px ring: 16 px less the ring each side, the browser's own checkbox size.",owner:a,due:o},{part:"Radio ground",kind:"box",value:14,reason:"The round mark's ground inside its 1 px ring: 16 px less the ring each side, the browser's own radio size.",owner:a,due:o},{part:"Ring",kind:"box",value:13,reason:"The colour dot's 1 px ring as the old rail drew it (13 px round); kept so no swatch or word moves.",owner:a,due:o},{part:"Colour",kind:"box",value:11,reason:"The colour dot inside its 1 px ring (13 px less the ring each side), as the old rail drew it.",owner:a,due:o},{part:"Tick box",kind:"corner",value:w,reason:"The browser's own checkbox corners (2 px on 16 px), below the shell's smallest corner step (--radius-sm 4 px); kept so the tick box keeps the rail's look.",owner:a,due:o},{part:"Tick",kind:"corner",value:_,reason:"The tick box's ground inside its 1 px ring follows the box's 2 px corners (2 - 1).",owner:a,due:o},{part:"aside",kind:"padding",value:22,reason:"The rail box's right padding at lg (PlpSidebar lg:pr-[22px]): 12 px room for the picked frame plus main's 10 px scrollbar room, so the content stays main's 258 px wide.",owner:a,due:o}],A={size:k,case:"capitalize",lineHeight:1.5},F={size:k,case:"none",lineHeight:1.5},N={textStyle:"body-5",size:11,case:"none",letterSpacing:0,lineHeight:1.5},g="muted",b="surface",P=()=>({type:t,props:{...h,name:"Option",justify:"between",gap:s,gapPhone:s,...i(4,12)},slots:{[r]:[{type:t,props:{...h,name:"Choice",gap:s,gapPhone:s,minWidth:0},slots:{[r]:[{type:t,props:{...d,name:"Tick mark",[l]:["facetTickMark"]},slots:{[r]:[{type:t,props:{...T(16,{sectionCorners:w,fillColor:g,[c]:"facetTickFill",...i(1,1)}),name:"Tick box"},slots:{[r]:[{type:t,props:{...T(14,{sectionCorners:_,fillColor:b,[c]:"facetTickFill",[C]:"facetTick",...i(0,0)}),name:"Tick"}}]}}]}},{type:t,props:{...d,name:"Round mark",[l]:["facetRadioMark"]},slots:{[r]:[{type:t,props:{...p(16,{fillColor:g,[c]:"facetTickFill",...i(1,1)}),name:"Radio"},slots:{[r]:[{type:t,props:{...p(14,{fillColor:b,...i(3,3)}),name:"Radio ground"},slots:{[r]:[{type:t,props:{...p(8,{[c]:"facetDot",...i(0,0)}),name:"Dot"}}]}}]}}]}},{type:t,props:{...d,name:"Swatch",[l]:["facetColour"]},slots:{[r]:[{type:t,props:{...p(13,{sectionBorder:{width:1}}),name:"Ring"},slots:{[r]:[{type:t,props:{...p(11,{[c]:"facetColour"}),name:"Colour"}}]}}]}},{type:t,props:{...d,name:"Label",[l]:["facetLabel"]},slots:{[r]:[f("facetLabel",{...m,tag:"span",minWidth:0},A)]}},{type:t,props:{...d,name:"Name",[l]:["facetName"]},slots:{[r]:[f("facetName",{...m,tag:"span",minWidth:0},F)]}}]}},f("facetCount",{...R,tag:"span"},N)]}});function S(e){return y([P()],(n,u)=>u==="0"?`${e}~facet`:`${e}~facet.${u.slice(2)}`)}function J(e){if(e[x]!==void 0)return e;const n=typeof e.id=="string"&&e.id.trim()?e.id:O;return{...e,[x]:S(n)}}export{G as FACET_ROW_FIELDS,q as FACET_TEMPLATE_ALLOW,H as FACET_TEMPLATE_LABEL,x as FACET_TEMPLATE_SLOT,v as FACET_TICK,U as FACET_TICK_INK_CLASS,L as FACET_TICK_MARK,Y as FACET_TICK_VAR,V as NAMED_EXCEPTIONS,h as ONE_ROW,$ as facetRow,S as facetRowSeed,j as typeRow,J as withFacetTemplate};
1
+ import{BOX_SWATCH_PROP as c}from"efficient-web-builder/format/lib/content/box-background";import{BOX_ROW_IMAGE_PROP as g}from"efficient-web-builder/format/lib/content/box-card-rule";import{BOX_HIDE_WHEN_ROW_EMPTY as p}from"efficient-web-builder/format/lib/content/card-template";import{BOX_TYPE as e,CONTAINER_BLOCKS_SLOT as a}from"efficient-web-builder/format/lib/document/container-blocks";import{rowFieldTextSeed as f}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{BOX as b,DIM as C,INNER_BOX as l,TEXT as u,boxPadding as n,seedNodes as E}from"efficient-web-builder/format/lib/document/seed-parts";import{roundBox as d,squareBox as m}from"./square-box.js";import{ALLOY_WHEELS_LISTING_TYPE as R}from"../document/document-nodes.js";import{slotSeedIds as O,withSeededSlot as y}from"./seed-ids.js";const L="facetTemplate",Y="Filter option template",U=[{key:"facetLabel",label:"Filter option"},{key:"facetName",label:"Type name"},{key:"facetCount",label:"Option count"},{key:"facetColour",label:"Option colour",kind:"colour"},{key:"facetTickFill",label:"Tick box fill",kind:"colour"},{key:"facetTick",label:"Tick mark",kind:"image"},{key:"facetTickMark",label:"Tick box shown"},{key:"facetRadioMark",label:"Round mark shown"},{key:"facetDot",label:"Round mark dot",kind:"colour"}],v="sf-facet-tick-picture",A="data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%271%200.75%2014%2014%27%20id%3D%27"+v+"%27%3E%3Cpath%20d%3D%27M3.2%208%206.4%2011.2%2012.8%203.2%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272.56%27%2F%3E%3C%2Fsvg%3E",j="--sf-facet-tick",q="[&_[data-sf-card-state~=selected]_.sf-card[style*=sf-facet-tick-picture]]:[background-image:none]! [&_[data-sf-card-state~=selected]_.sf-card[style*=sf-facet-tick-picture]]:[background-color:var(--accent-ink)]! [&_[data-sf-card-state~=selected]_.sf-card[style*=sf-facet-tick-picture]]:[-webkit-mask:var(--sf-facet-tick)_center/cover_no-repeat] [&_[data-sf-card-state~=selected]_.sf-card[style*=sf-facet-tick-picture]]:[mask:var(--sf-facet-tick)_center/cover_no-repeat]";function V(r,i){return{facetLabel:r.label,facetName:"",facetCount:String(r.count),facetColour:r.swatch??"",facetTickFill:i?"main":"",facetTick:i?A:"",facetTickMark:"tick",facetRadioMark:"",facetDot:""}}function J(r,i){return{facetLabel:"",facetName:r.label,facetCount:String(r.count),facetColour:"",facetTickFill:i?"main":"",facetTick:"",facetTickMark:"",facetRadioMark:"radio",facetDot:i?"main":""}}const Q=["Text","ImageBlock",e],T={...b,direction:"row",align:"center",phoneRow:2,sharePhone:"content",wrapPhone:"nowrap"},k=13,s=10,x=2,h=1,o="2026-12-18",t="storefront sections owner",Z=[{part:"facetLabel",kind:"size",value:k,reason:"The old rail's option words were 13 px; kept so no facet word moves.",owner:t,due:o},{part:"facetName",kind:"size",value:k,reason:"A type's name takes the facet words' 13 px, so the type picker has the same rail look.",owner:t,due:o},{part:"Option",kind:"gap",value:s,reason:"The old rail's 10 px between the option and its count; kept so no word moves.",owner:t,due:o},{part:"Choice",kind:"gap",value:s,reason:"The old rail's 10 px between tick box, dot and words; kept so no word moves.",owner:t,due:o},{part:"Tick box",kind:"padding",value:1,reason:"The 1 px ring round the tick box, drawn as the Box's own Fill inside 1 px padding.",owner:t,due:o},{part:"Radio",kind:"padding",value:1,reason:"The 1 px ring round the round mark, drawn as the Box's own Fill inside 1 px padding.",owner:t,due:o},{part:"Radio ground",kind:"padding",value:3,reason:"The 3 px between the round mark's ring and its 8 px dot, as the browser's own radio.",owner:t,due:o},{part:"Tick",kind:"box",value:14,reason:"The tick box's ground inside its 1 px ring: 16 px less the ring each side, the browser's own checkbox size.",owner:t,due:o},{part:"Radio ground",kind:"box",value:14,reason:"The round mark's ground inside its 1 px ring: 16 px less the ring each side, the browser's own radio size.",owner:t,due:o},{part:"Ring",kind:"box",value:13,reason:"The colour dot's 1 px ring as the old rail drew it (13 px round); kept so no swatch or word moves.",owner:t,due:o},{part:"Colour",kind:"box",value:11,reason:"The colour dot inside its 1 px ring (13 px less the ring each side), as the old rail drew it.",owner:t,due:o},{part:"Tick box",kind:"corner",value:x,reason:"The browser's own checkbox corners (2 px on 16 px), below the shell's smallest corner step (--radius-sm 4 px); kept so the tick box keeps the rail's look.",owner:t,due:o},{part:"Tick",kind:"corner",value:h,reason:"The tick box's ground inside its 1 px ring follows the box's 2 px corners (2 - 1).",owner:t,due:o},{part:"aside",kind:"padding",value:22,reason:"The rail box's right padding at lg (PlpSidebar lg:pr-[22px]): 12 px room for the picked frame plus main's 10 px scrollbar room, so the content stays main's 258 px wide.",owner:t,due:o}],F={size:k,case:"capitalize",lineHeight:1.5},N={size:k,case:"none",lineHeight:1.5},S={textStyle:"body-5",size:11,case:"none",letterSpacing:0,lineHeight:1.5},w="muted",_="surface",I=()=>({type:e,props:{...T,name:"Option",justify:"between",gap:s,gapPhone:s,...n(4,12)},slots:{[a]:[{type:e,props:{...T,name:"Choice",gap:s,gapPhone:s,minWidth:0},slots:{[a]:[{type:e,props:{...l,name:"Tick mark",[p]:["facetTickMark"]},slots:{[a]:[{type:e,props:{...m(16,{sectionCorners:x,fillColor:w,[c]:"facetTickFill",...n(1,1)}),name:"Tick box"},slots:{[a]:[{type:e,props:{...m(14,{sectionCorners:h,fillColor:_,[c]:"facetTickFill",[g]:"facetTick",...n(0,0)}),name:"Tick"}}]}}]}},{type:e,props:{...l,name:"Round mark",[p]:["facetRadioMark"]},slots:{[a]:[{type:e,props:{...d(16,{fillColor:w,[c]:"facetTickFill",...n(1,1)}),name:"Radio"},slots:{[a]:[{type:e,props:{...d(14,{fillColor:_,...n(3,3)}),name:"Radio ground"},slots:{[a]:[{type:e,props:{...d(8,{[c]:"facetDot",...n(0,0)}),name:"Dot"}}]}}]}}]}},{type:e,props:{...l,name:"Swatch",[p]:["facetColour"]},slots:{[a]:[{type:e,props:{...d(13,{sectionBorder:{width:1}}),name:"Ring"},slots:{[a]:[{type:e,props:{...d(11,{[c]:"facetColour"}),name:"Colour"}}]}}]}},{type:e,props:{...l,name:"Label",[p]:["facetLabel"]},slots:{[a]:[f("facetLabel",{...u,tag:"span",minWidth:0},F)]}},{type:e,props:{...l,name:"Name",[p]:["facetName"]},slots:{[a]:[f("facetName",{...u,tag:"span",minWidth:0},N)]}}]}},f("facetCount",{...C,tag:"span"},S)]}});function P(r){return E([I()],O(r,"facet"))}function $(r){return y(r,L,R,P)}export{U as FACET_ROW_FIELDS,Q as FACET_TEMPLATE_ALLOW,Y as FACET_TEMPLATE_LABEL,L as FACET_TEMPLATE_SLOT,A as FACET_TICK,q as FACET_TICK_INK_CLASS,v as FACET_TICK_MARK,j as FACET_TICK_VAR,Z as NAMED_EXCEPTIONS,T as ONE_ROW,V as facetRow,P as facetRowSeed,J as typeRow,$ as withFacetTemplate};
@@ -1 +1 @@
1
- import{CARD_LIST_TYPE as s,CARD_ROW_FIELD_PROP as h}from"efficient-web-builder/format/lib/content/card-template";import{BOX_TYPE as n,CONTAINER_BLOCKS_SLOT as p}from"efficient-web-builder/format/lib/document/container-blocks";import{rowFieldTextSeed as r}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{BOX as f,DIM as m,INNER_BOX as L,TEXT as l,boxPadding as O,labelStyle as E,seedNodes as T}from"efficient-web-builder/format/lib/document/seed-parts";const I="options",y=["Text","ImageBlock",n,s],A=["Text","ImageBlock",n],a=(t,e)=>({...E(t),letterSpacing:e,lineHeight:1.2}),P=a(12,.32),_=a(12,.18),d={...a(11,.14),color:"main"},c=(t,e,i={})=>({...f,direction:"row",align:"center",gap:t,gapPhone:t,phoneRow:2,sharePhone:"content",...e?{wrapPhone:"nowrap"}:{},...i}),w=()=>({type:n,props:{...c(8,!0),name:"Option",...O(8,12),sectionBorder:{width:1}},slots:{[p]:[r("label",{...l,tag:"p"},_),r("count",{...m,tag:"p"},_)]}});function x(t){const e=o=>o==="0"?`${t}~group`:`${t}~group.${o.slice(2)}`,i={type:n,props:{...L,name:"Group",gap:12,gapPhone:12},slots:{[p]:[r("label",{...m,tag:"p"},P),{type:n,props:{...c(8,!1,{align:"start",wrap:!0}),name:"Options"},slots:{[p]:[{type:s,props:{[h]:I},slots:{template:[w()]}}]}}]}};return T([i],(o,g)=>e(g))}function C(t){const e={type:n,props:{...c(8,!0),name:"Chip",...O(4,8),sectionBorder:{width:1}},slots:{[p]:[r("label",{...l,tag:"p"},d),r("mark",{...l,tag:"p"},d)]}};return T([e],(i,o)=>o==="0"?`${t}~chip`:`${t}~chip.${o.slice(2)}`)}const u=(t,e)=>typeof t.id=="string"&&t.id.trim()?t.id:e;function N(t){return t.template!==void 0?t:{...t,template:x(u(t,"FilterBlock"))}}function b(t){return t.template!==void 0?t:{...t,template:C(u(t,"FilterChipsBlock"))}}export{A as FILTER_CHIPS_TEMPLATE_ALLOW,I as FILTER_OPTIONS_FIELD,y as FILTER_TEMPLATE_ALLOW,x as filterCardSeed,C as filterChipSeed,b as withFilterChipsTemplate,N as withFilterTemplate};
1
+ import{CARD_LIST_TYPE as a,CARD_ROW_FIELD_PROP as d,CARD_TEMPLATE_SLOT as l}from"efficient-web-builder/format/lib/content/card-template";import{BOX_TYPE as o,CONTAINER_BLOCKS_SLOT as p}from"efficient-web-builder/format/lib/document/container-blocks";import{rowFieldTextSeed as r}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{BOX as P,DIM as T,INNER_BOX as h,TEXT as n,boxPadding as c,labelStyle as g,seedNodes as _}from"efficient-web-builder/format/lib/document/seed-parts";import{slotSeedIds as O,withSeededSlot as m}from"./seed-ids.js";import{FILTER_BLOCK_TYPE as S,FILTER_CHIPS_TYPE as u}from"../document/document-nodes.js";const f="options",y=["Text","ImageBlock",o,a],H=["Text","ImageBlock",o],i=(t,e)=>({...g(t),letterSpacing:e,lineHeight:1.2}),C=i(12,.32),L=i(12,.18),E={...i(11,.14),color:"main"},s=(t,e,I={})=>({...P,direction:"row",align:"center",gap:t,gapPhone:t,phoneRow:2,sharePhone:"content",...e?{wrapPhone:"nowrap"}:{},...I}),R=()=>({type:o,props:{...s(8,!0),name:"Option",...c(8,12),sectionBorder:{width:1}},slots:{[p]:[r("label",{...n,tag:"p"},L),r("count",{...T,tag:"p"},L)]}});function w(t){const e={type:o,props:{...h,name:"Group",gap:12,gapPhone:12},slots:{[p]:[r("label",{...T,tag:"p"},C),{type:o,props:{...s(8,!1,{align:"start",wrap:!0}),name:"Options"},slots:{[p]:[{type:a,props:{[d]:f},slots:{template:[R()]}}]}}]}};return _([e],O(t,"group"))}function x(t){const e={type:o,props:{...s(8,!0),name:"Chip",...c(4,8),sectionBorder:{width:1}},slots:{[p]:[r("label",{...n,tag:"p"},E),r("mark",{...n,tag:"p"},E)]}};return _([e],O(t,"chip"))}function K(t){return m(t,l,S,w)}function M(t){return m(t,l,u,x)}export{H as FILTER_CHIPS_TEMPLATE_ALLOW,f as FILTER_OPTIONS_FIELD,y as FILTER_TEMPLATE_ALLOW,w as filterCardSeed,x as filterChipSeed,M as withFilterChipsTemplate,K as withFilterTemplate};
@@ -0,0 +1,11 @@
1
+ import { type SeededNode } from "efficient-web-builder/format/lib/document/seed-parts";
2
+ type Props = Record<string, unknown>;
3
+ export declare const HERO_BUY_SLOT = "buyTemplate";
4
+ export declare const HERO_BUY_SLOT_LABEL = "Buy template";
5
+ export declare const HERO_BUY_BLOCK = "ProductBuyButton";
6
+ export declare const HERO_QUANTITY_PART = "quantity";
7
+ export declare const HERO_SAVE_PART = "save";
8
+ export declare const HERO_BUY_ALLOW: readonly ["Flex", "ProductBuyButton"];
9
+ export declare function heroBuySeed(nodeId: string): SeededNode[];
10
+ export declare function withHeroBuyTemplate(props: Props): Props;
11
+ export {};
@@ -0,0 +1 @@
1
+ import{BOX_TYPE as r,CONTAINER_BLOCKS_SLOT as O}from"efficient-web-builder/format/lib/document/container-blocks";import{seedNodes as a}from"efficient-web-builder/format/lib/document/seed-parts";import{HOST_PART_TYPE as n}from"efficient-web-builder/format/lib/content/card-template";import{say as p}from"efficient-web-builder/format/lib/editor-words";import{ONE_ROW as m}from"./facet-row-seed.js";import{PRODUCT_HERO_TYPE as T}from"../document/document-nodes.js";import{hostPartSeed as s}from"./host-part-seed.js";import{slotSeedIds as i,withSeededSlot as c}from"./seed-ids.js";const B="buyTemplate",x="Buy template",e="ProductBuyButton",y="quantity",P="save",U=[r,e],_=16,u="buy",d=t=>{const o=i(t,u);return{quantity:o(n,"0.0"),button:o(e,"0.1"),save:o(n,"0.2")}},f=t=>{const o=d(t);return{type:r,props:{...m,name:"Buy row",align:"stretch",gap:_,gapPhone:_,wrapPhone:"wrap",orderPhone:[o.quantity,o.save,o.button]},slots:{[O]:[s(y,p("Quantity")),{type:e,props:{widthFit:"fill",widthFitPhone:"fill"}},s(P,p("Save"))]}}};function E(t){return a([f(t)],i(t,u))}function w(t){return c(t,B,T,E)}export{U as HERO_BUY_ALLOW,e as HERO_BUY_BLOCK,B as HERO_BUY_SLOT,x as HERO_BUY_SLOT_LABEL,y as HERO_QUANTITY_PART,P as HERO_SAVE_PART,E as heroBuySeed,w as withHeroBuyTemplate};
@@ -1 +1 @@
1
- import{BOX_SWATCH_PROP as d}from"efficient-web-builder/format/lib/content/box-background";import{BOX_HIDE_WHEN_ROW_EMPTY as s}from"efficient-web-builder/format/lib/content/card-template";import{BOX_TYPE as o,CONTAINER_BLOCKS_SLOT as i}from"efficient-web-builder/format/lib/document/container-blocks";import{rowFieldTextSeed as r}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{BOX as O,DIM as _,INNER_BOX as l,TEXT as c,boxPadding as p,labelStyle as h,seedNodes as T}from"efficient-web-builder/format/lib/document/seed-parts";import{roundBox as w}from"./square-box.js";const m="optionTemplate",B="Option template",H=[{key:"swatch",label:"Finish colour",kind:"colour"},{key:"name",label:"Finish name"},{key:"label",label:"Option"},{key:"note",label:"Option note"}],R=["Text",o],a=(e,t,n={})=>({...h(e),letterSpacing:t,lineHeight:1.5,...n}),E={...O,direction:"row",align:"center",phoneRow:2,sharePhone:"content",wrapPhone:"nowrap"},P=()=>({type:o,props:{...O,direction:"column",name:"Option",...p(12,12),sectionBorder:{width:2}},slots:{[i]:[{type:o,props:{...E,name:"Finish",gap:12,gapPhone:12,[s]:["swatch"]},slots:{[i]:[{type:o,props:{...l,name:"Swatch"},slots:{[i]:[{type:o,props:{...w(20,{...p(0,0),sectionBorder:{width:1},[d]:"swatch"}),name:"Dot"}}]}},r("name",{...c,tag:"span",minWidth:0},a(12,.18,{weight:700}))]}},{type:o,props:{...l,name:"Words",gap:4,gapPhone:4,...p(0,4),[s]:["label"]},slots:{[i]:[r("label",{...c,tag:"span"},a(14,.18)),r("note",{..._,tag:"span"},a(11,.12))]}}]}});function g(e){return T([P()],(t,n)=>n==="0"?`${e}~option`:`${e}~option.${n.slice(2)}`)}function b(e){if(e[m]!==void 0)return e;const t=typeof e.id=="string"&&e.id.trim()?e.id:"ProductHero";return{...e,[m]:g(t)}}export{R as HERO_OPTION_ALLOW,H as HERO_OPTION_FIELDS,m as HERO_OPTION_SLOT,B as HERO_OPTION_SLOT_LABEL,g as heroOptionSeed,b as withHeroOptionTemplate};
1
+ import{BOX_SWATCH_PROP as c}from"efficient-web-builder/format/lib/content/box-background";import{BOX_HIDE_WHEN_ROW_EMPTY as i}from"efficient-web-builder/format/lib/content/card-template";import{BOX_TYPE as o,CONTAINER_BLOCKS_SLOT as t}from"efficient-web-builder/format/lib/document/container-blocks";import{rowFieldTextSeed as n}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{BOX as a,DIM as d,INNER_BOX as s,TEXT as O,boxPadding as p,labelStyle as _,seedNodes as h}from"efficient-web-builder/format/lib/document/seed-parts";import{roundBox as T}from"./square-box.js";import{PRODUCT_HERO_TYPE as E}from"../document/document-nodes.js";import{slotSeedIds as w,withSeededSlot as P}from"./seed-ids.js";const S="optionTemplate",u="Option template",W=[{key:"swatch",label:"Finish colour",kind:"colour"},{key:"name",label:"Finish name"},{key:"label",label:"Option"},{key:"note",label:"Option note"}],X=["Text",o],r=(e,l,m={})=>({..._(e),letterSpacing:l,lineHeight:1.5,...m}),g={...a,direction:"row",align:"center",phoneRow:2,sharePhone:"content",wrapPhone:"nowrap"},R=()=>({type:o,props:{...a,direction:"column",name:"Option",...p(12,12),sectionBorder:{width:2}},slots:{[t]:[{type:o,props:{...g,name:"Finish",gap:12,gapPhone:12,[i]:["swatch"]},slots:{[t]:[{type:o,props:{...s,name:"Swatch"},slots:{[t]:[{type:o,props:{...T(20,{...p(0,0),sectionBorder:{width:1},[c]:"swatch"}),name:"Dot"}}]}},n("name",{...O,tag:"span",minWidth:0},r(12,.18,{weight:700}))]}},{type:o,props:{...s,name:"Words",gap:4,gapPhone:4,...p(0,4),[i]:["label"]},slots:{[t]:[n("label",{...O,tag:"span"},r(14,.18)),n("note",{...d,tag:"span"},r(11,.12))]}}]}});function N(e){return h([R()],w(e,"option"))}function k(e){return P(e,S,E,N)}export{X as HERO_OPTION_ALLOW,W as HERO_OPTION_FIELDS,S as HERO_OPTION_SLOT,u as HERO_OPTION_SLOT_LABEL,N as heroOptionSeed,k as withHeroOptionTemplate};
@@ -1 +1 @@
1
- import{PART_MOTION_PROP as s}from"efficient-web-builder/render/lib/animation/part-motion";import{PART_STYLES_PROP as m,readPartStyles as u}from"efficient-web-builder/render/lib/document/part-styles";import{seedNodes as p}from"efficient-web-builder/format/lib/document/seed-parts";const R="ProductPrice",d="@price";function _(e){const{[d]:o,...t}=e&&typeof e=="object"?e:{};return{price:o,others:t}}function T(e){if(e.template!==void 0)return e;const o=typeof e.id=="string"&&e.id.trim()?e.id:"ProductHero",[t]=p([{type:R}],()=>`${o}~price`),r={...e},c={};for(const[n,f]of[[m,u(e)],[s,e[s]]]){const{price:i,others:P}=_(f);i&&(c[n]={[d]:i},Object.keys(P).length>0?r[n]=P:delete r[n])}return r.template=[{...t,props:{...t.props,...c}}],r}export{R as HERO_PRICE_BLOCK,T as withHeroPriceTemplate};
1
+ import{PART_MOTION_PROP as s}from"efficient-web-builder/render/lib/animation/part-motion";import{PART_STYLES_PROP as p,readPartStyles as _}from"efficient-web-builder/render/lib/document/part-styles";import{seedNodes as R}from"efficient-web-builder/format/lib/document/seed-parts";import{seedNodeId as T}from"./seed-ids.js";import{PRODUCT_HERO_TYPE as O}from"../document/document-nodes.js";import{CARD_TEMPLATE_SLOT as f}from"efficient-web-builder/format/lib/content/card-template";const E="ProductPrice",d="@price";function u(e){const{[d]:r,...t}=e&&typeof e=="object"?e:{};return{price:r,others:t}}function I(e){if(e[f]!==void 0)return e;const r=T(e,O),[t]=R([{type:E}],()=>`${r}~price`),o={...e},c={};for(const[n,m]of[[p,_(e)],[s,e[s]]]){const{price:i,others:P}=u(m);i&&(c[n]={[d]:i},Object.keys(P).length>0?o[n]=P:delete o[n])}return o[f]=[{...t,props:{...t.props,...c}}],o}export{E as HERO_PRICE_BLOCK,I as withHeroPriceTemplate};
@@ -0,0 +1,2 @@
1
+ import type { BlockSeed } from "efficient-web-builder/format/lib/document/seed-parts";
2
+ export declare const hostPartSeed: (name: string, label: string) => BlockSeed;
@@ -0,0 +1 @@
1
+ import{HOST_PART_TYPE as p}from"efficient-web-builder/format/lib/content/card-template";const e=(o,t)=>({type:p,props:{name:o,label:t}});export{e as hostPartSeed};
@@ -1 +1 @@
1
- import{INNER_BOX as g,TEXT as N,seedNodes as i}from"efficient-web-builder/format/lib/document/seed-parts";import{BOX_TYPE as c,CONTAINER_BLOCKS_SLOT as _}from"efficient-web-builder/format/lib/document/container-blocks";import{rowFieldTextSeed as O}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{declaredBlockSource as d}from"efficient-web-builder/format/lib/content/block-sources";import{MENU_ENTRY_SIZE_PX as C}from"./menu-entry-type.js";const r="MenuLinkBlock";function l(t){return i([{type:r}],()=>`${t}~link`)}const E="blog-categories",T="count",y={...g,direction:"row",align:"center",gap:8,gapPhone:8,phoneRow:2,sharePhone:"content",wrapPhone:!1,name:"Card"},S="main",h={size:C,lineHeight:1,color:S};function a(t){const e={0:`${t}~card`,"0.0":`${t}~link`,"0.1":`${t}~count`};return i([{type:c,props:y,slots:{[_]:[{type:r},O(T,{...N,tag:"p"},h)]}}],(o,n)=>e[n]??`${t}~${n}`)}const s=t=>typeof t.id=="string"&&t.id.trim()?t.id:"Menu",u=t=>d(t)===E,m=t=>(u(t)?a:l)(s(t)),w=(t,e)=>Array.isArray(t)&&t.length===e.length&&JSON.stringify(t)===JSON.stringify(e);function x(t){const e=t.template;if(!Array.isArray(e)||e.length!==1)return t;const o=e[0]?.type;if(o!==r&&o!==c)return t;const n=s(t),f=u(t)?l(n):a(n);return w(e,f)?{...t,template:m(t)}:t}function $(t){return t.template!==void 0?x(t):{...t,template:m(t)}}export{E as MENU_BLOG_CATEGORIES_SOURCE,T as MENU_COUNT_FIELD,r as MENU_LINK_BLOCK,l as menuCardSeed,a as menuCountCardSeed,x as menuTemplateFollowsContent,$ as withMenuTemplate};
1
+ import{INNER_BOX as N,TEXT as _,seedNodes as i}from"efficient-web-builder/format/lib/document/seed-parts";import{BOX_TYPE as c,CONTAINER_BLOCKS_SLOT as g}from"efficient-web-builder/format/lib/document/container-blocks";import{rowFieldTextSeed as O}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{declaredBlockSource as d}from"efficient-web-builder/format/lib/content/block-sources";import{MENU_ENTRY_SIZE_PX as C}from"./menu-entry-type.js";import{seedNodeId as E}from"./seed-ids.js";const r="MenuLinkBlock";function l(e){return i([{type:r}],()=>`${e}~link`)}const T="blog-categories",S="count",h={...N,direction:"row",align:"center",gap:8,gapPhone:8,phoneRow:2,sharePhone:"content",wrapPhone:!1,name:"Card"},y="main",p={size:C,lineHeight:1,color:y};function s(e){const t={0:`${e}~card`,"0.0":`${e}~link`,"0.1":`${e}~count`};return i([{type:c,props:h,slots:{[g]:[{type:r},O(S,{..._,tag:"p"},p)]}}],(o,n)=>t[n]??`${e}~${n}`)}const a=e=>E(e,"Menu"),u=e=>d(e)===T,m=e=>(u(e)?s:l)(a(e)),w=(e,t)=>Array.isArray(e)&&e.length===t.length&&JSON.stringify(e)===JSON.stringify(t);function x(e){const t=e.template;if(!Array.isArray(t)||t.length!==1)return e;const o=t[0]?.type;if(o!==r&&o!==c)return e;const n=a(e),f=u(e)?l(n):s(n);return w(t,f)?{...e,template:m(e)}:e}function $(e){return e.template!==void 0?x(e):{...e,template:m(e)}}export{T as MENU_BLOG_CATEGORIES_SOURCE,S as MENU_COUNT_FIELD,r as MENU_LINK_BLOCK,l as menuCardSeed,s as menuCountCardSeed,x as menuTemplateFollowsContent,$ as withMenuTemplate};
@@ -1 +1 @@
1
- import{BOX_TYPE as s,CONTAINER_BLOCKS_SLOT as u}from"efficient-web-builder/format/lib/document/container-blocks";import{DIM as D,INNER_BOX as l,boxPadding as C,seedNodes as m,token as E}from"efficient-web-builder/format/lib/document/seed-parts";import{CARD_ROW_FIELD_PROP as S}from"efficient-web-builder/format/lib/content/card-template";import{CARDS_BODY_LOOK as x}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{THEME_CARD_IMAGE_BG as I,resolveBoundCardImageBackground as L}from"efficient-web-builder/format/lib/content/card-image-background";import{SHARED_ROWS_KEY as k}from"efficient-web-builder/render/lib/content/box-shared-columns";import{GRID_CARD_SHOW as w,LISTING_CARD_SHOW as b}from"../sections/card-show-defaults.js";import{ALLOY_WHEELS_LISTING_TYPE as K}from"../document/document-nodes.js";const _="ProductPicture",y="ProductSpecs",P="ProductBuy",g="ProductPrice",f="ProductColour",A="ProductSize",R="ProductEyebrow",p="ProductName",Q=[_,R,p,y,g,f,A,P],ee=[{key:"name",label:"Name"},{key:"eyebrow",label:"Eyebrow"},{key:"note",label:"Note"},{key:"href",label:"Product page",kind:"link"},{key:"colour",label:"Product colour",kind:"colour"},{key:"colourVaried",label:"Product colour, varied",kind:"colour"},{key:"colourRandom",label:"Random colour",kind:"colour"}],N={...l,gap:0,gapPhone:0,...C(32,32,32,32),[k]:"shared"},h=(e,t="ProductGrid")=>typeof e.id=="string"&&e.id.trim()?e.id:t,a=(e,t)=>typeof e=="boolean"?e:t,U={type:"Text",props:{...D,tag:"p",text:"",[S]:"note",_partStyles:{text:{...x,...E("body",14),lineHeight:1.375}}}};function H(e,t={}){const r=e.dynamic===!0,o={},i=r?t.legacyWellHonoured?e.imageBackground??I:L(e.imageBackground):e.imageBackground;i!==void 0&&(o.imageBackground=i);for(const d of["cardImage","coverIndex","indexBadge","showBadge"])e[d]!==void 0&&(o[d]=e[d]);const c=t.showRest??w,n={price:a(e.showCardPrice,!0),finishes:a(e.showCardFinishes,!0),sizes:a(e.showCardSizes,c.showCardSizes),buy:a(e.showCardBuy,c.showCardBuy),page:a(e.showCardPage,c.showCardPage)},O={...N,name:"Card"};e.outline==="hairline"&&(O.sectionBorder={width:1,style:"solid"});const T=[{type:_,props:o},{type:R},{type:p},{type:y,props:{sizes:n.sizes}},...n.price?[{type:g}]:[],...n.finishes?[{type:f}]:[],...n.buy||n.page?[{type:P,props:{buy:n.buy,page:n.page}}]:[]];return{type:s,props:O,slots:{[u]:T}}}const G={...l,gap:0,gapPhone:0,...C(0,0,0,0)},Y={...l,gap:8,gapPhone:8,...C(16,20,16,20)},z={role:"heading",size:18,weight:500,case:"none",letterSpacing:-.015,lineHeight:1.2},B=24;function W(e){const t={frame:"full"};for(const o of["cardImage","showBadge"])e[o]!==void 0&&(t[o]=e[o]);const r={type:s,props:{...Y,name:"Copy"},slots:{[u]:[{type:p,props:{fixedHeight:!1,_partStyles:{"@name":z}}},U,{type:g}]}};return{type:s,props:{...G,name:"Card"},slots:{[u]:[{type:_,props:t},r]}}}function te(e){if(e.template!==void 0)return e;const t=h(e);return{...e,gap:e.gap??B,gapPhone:e.gapPhone??B,template:m([W(e)],(r,o)=>`${t}~card-${o}-${r}`)}}function X(e,t={}){const r=h(e,t.section);return m([H(e,t)],(o,i)=>`${r}~card-${i}-${o}`)}function oe(e){return $(e,{showRest:b,section:K})}function $(e,t={}){return e.template!==void 0?e:{...e,template:X(e,t)}}export{P as PRODUCT_BUY_BLOCK,ee as PRODUCT_CARD_FIELDS,Q as PRODUCT_CARD_SLOT_BLOCKS,f as PRODUCT_COLOUR_BLOCK,R as PRODUCT_EYEBROW_BLOCK,p as PRODUCT_NAME_BLOCK,_ as PRODUCT_PICTURE_BLOCK,g as PRODUCT_PRICE_BLOCK,A as PRODUCT_SIZE_BLOCK,y as PRODUCT_SPECS_BLOCK,W as kitCardSeed,H as productCardSeed,X as productCardTemplate,te as withKitCardTemplate,oe as withListingCardTemplate,$ as withProductCardTemplate};
1
+ import{BOX_TYPE as s,CONTAINER_BLOCKS_SLOT as u}from"efficient-web-builder/format/lib/document/container-blocks";import{DIM as D,INNER_BOX as _,boxPadding as l,seedNodes as m,token as E}from"efficient-web-builder/format/lib/document/seed-parts";import{CARD_ROW_FIELD_PROP as I}from"efficient-web-builder/format/lib/content/card-template";import{CARDS_BODY_LOOK as S}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{THEME_CARD_IMAGE_BG as x,resolveBoundCardImageBackground as L}from"efficient-web-builder/format/lib/content/card-image-background";import{SHARED_ROWS_KEY as k}from"efficient-web-builder/render/lib/content/box-shared-columns";import{GRID_CARD_SHOW as w,LISTING_CARD_SHOW as b}from"../sections/card-show-defaults.js";import{ALLOY_WHEELS_LISTING_TYPE as K,PRODUCT_GRID_TYPE as A}from"../document/document-nodes.js";import{seedNodeId as N}from"./seed-ids.js";const C="ProductPicture",P="ProductSpecs",y="ProductBuy",p="ProductPrice",f="ProductColour",U="ProductSize",R="ProductEyebrow",O="ProductName",oe=[C,R,O,P,p,f,U,y],re=[{key:"name",label:"Name"},{key:"eyebrow",label:"Eyebrow"},{key:"note",label:"Note"},{key:"href",label:"Product page",kind:"link"},{key:"colour",label:"Product colour",kind:"colour"},{key:"colourVaried",label:"Product colour, varied",kind:"colour"},{key:"colourRandom",label:"Random colour",kind:"colour"}],H={..._,gap:0,gapPhone:0,...l(32,32,32,32),[k]:"shared"},h=(e,t=A)=>N(e,t),a=(e,t)=>typeof e=="boolean"?e:t,Y={type:"Text",props:{...D,tag:"p",text:"",[I]:"note",_partStyles:{text:{...S,...E("body",14),lineHeight:1.375}}}};function G(e,t={}){const r=e.dynamic===!0,o={},c=r?t.legacyWellHonoured?e.imageBackground??x:L(e.imageBackground):e.imageBackground;c!==void 0&&(o.imageBackground=c);for(const i of["cardImage","coverIndex","indexBadge","showBadge"])e[i]!==void 0&&(o[i]=e[i]);const d=t.showRest??w,n={price:a(e.showCardPrice,!0),finishes:a(e.showCardFinishes,!0),sizes:a(e.showCardSizes,d.showCardSizes),buy:a(e.showCardBuy,d.showCardBuy),page:a(e.showCardPage,d.showCardPage)},g={...H,name:"Card"};e.outline==="hairline"&&(g.sectionBorder={width:1,style:"solid"});const B=[{type:C,props:o},{type:R},{type:O},{type:P,props:{sizes:n.sizes}},...n.price?[{type:p}]:[],...n.finishes?[{type:f}]:[],...n.buy||n.page?[{type:y,props:{buy:n.buy,page:n.page}}]:[]];return{type:s,props:g,slots:{[u]:B}}}const z={..._,gap:0,gapPhone:0,...l(0,0,0,0)},W={..._,gap:8,gapPhone:8,...l(16,20,16,20)},X={role:"heading",size:18,weight:500,case:"none",letterSpacing:-.015,lineHeight:1.2},T=24;function $(e){const t={frame:"full"};for(const o of["cardImage","showBadge"])e[o]!==void 0&&(t[o]=e[o]);const r={type:s,props:{...W,name:"Copy"},slots:{[u]:[{type:O,props:{fixedHeight:!1,_partStyles:{"@name":X}}},Y,{type:p}]}};return{type:s,props:{...z,name:"Card"},slots:{[u]:[{type:C,props:t},r]}}}function ne(e){if(e.template!==void 0)return e;const t=h(e);return{...e,gap:e.gap??T,gapPhone:e.gapPhone??T,template:m([$(e)],(r,o)=>`${t}~card-${o}-${r}`)}}function M(e,t={}){const r=h(e,t.section);return m([G(e,t)],(o,c)=>`${r}~card-${c}-${o}`)}function ae(e){return F(e,{showRest:b,section:K})}function F(e,t={}){return e.template!==void 0?e:{...e,template:M(e,t)}}export{y as PRODUCT_BUY_BLOCK,re as PRODUCT_CARD_FIELDS,oe as PRODUCT_CARD_SLOT_BLOCKS,f as PRODUCT_COLOUR_BLOCK,R as PRODUCT_EYEBROW_BLOCK,O as PRODUCT_NAME_BLOCK,C as PRODUCT_PICTURE_BLOCK,p as PRODUCT_PRICE_BLOCK,U as PRODUCT_SIZE_BLOCK,P as PRODUCT_SPECS_BLOCK,$ as kitCardSeed,G as productCardSeed,M as productCardTemplate,ne as withKitCardTemplate,ae as withListingCardTemplate,F as withProductCardTemplate};
@@ -1 +1 @@
1
- import{HOST_PART_TYPE as c}from"efficient-web-builder/format/lib/content/card-template";import{BOX_TYPE as r,CONTAINER_BLOCKS_SLOT as i}from"efficient-web-builder/format/lib/document/container-blocks";import{rowFieldTextSeed as m}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{INNER_BOX as a,LABEL_FACE as O,TEXT as p,boxPadding as l,seedNodes as L}from"efficient-web-builder/format/lib/document/seed-parts";import{say as P}from"efficient-web-builder/format/lib/editor-words";import{FACET_TEMPLATE_ALLOW as R,ONE_ROW as u}from"./facet-row-seed.js";import{ALLOY_WHEELS_LISTING_TYPE as f}from"../document/document-nodes.js";const _="railTemplate",W="Filter group template",d="railHeadTemplate",$="Filter head template",s="railGroup",Y=[{key:s,label:"Filter group"}],g="options",S="end",b=R,x={...O,size:11,letterSpacing:.2,lineHeight:1.5},I={fontRole:"heading",size:18,weight:500,case:"upper",letterSpacing:-.01,lineHeight:1.5},T=(t,e)=>({type:c,props:{name:t,label:e}}),h=()=>({type:r,props:{...a,name:"Group",gap:0,startsOpen:!0},slots:{rowTitle:[m(s,{...p,tag:"span"},x)],[i]:[{type:r,props:{...a,name:"Options",...l(0,0),sectionPaddingBottom:12,sectionPaddingBottomPhone:12},slots:{[i]:[T(g,"Filter options")]}}]}}),y=()=>({type:r,props:{...u,name:"Head",justify:"between",...l(0,0),sectionPaddingBottom:8,sectionPaddingBottomPhone:8},slots:{[i]:[{type:"Text",props:{...p,tag:"h2",text:P("Filter"),_partStyles:{text:I}}},T(S,"Clear all")]}}),E=(t,e)=>{let o=0;return(n,A)=>A==="0"?`${t}~${e}`:`${t}~${e}.${o++}`};function H(t){return L([h()],E(t,"rail"))}function B(t){return L([y()],E(t,"railhead"))}function K(t){const e=t[_]===void 0,o=t[d]===void 0;if(!e&&!o)return t;const n=typeof t.id=="string"&&t.id.trim()?t.id:f;return{...t,...e?{[_]:H(n)}:{},...o?{[d]:B(n)}:{}}}const X=t=>({[s]:t});export{S as RAIL_END_PART,s as RAIL_GROUP_FIELD,$ as RAIL_HEAD_TEMPLATE_LABEL,d as RAIL_HEAD_TEMPLATE_SLOT,g as RAIL_OPTIONS_PART,Y as RAIL_ROW_FIELDS,b as RAIL_TEMPLATE_ALLOW,W as RAIL_TEMPLATE_LABEL,_ as RAIL_TEMPLATE_SLOT,X as railRow,K as withRailTemplates};
1
+ import{BOX_TYPE as n,CONTAINER_BLOCKS_SLOT as i}from"efficient-web-builder/format/lib/document/container-blocks";import{rowFieldTextSeed as c}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{INNER_BOX as a,LABEL_FACE as m,TEXT as p,boxPadding as l,seedNodes as L}from"efficient-web-builder/format/lib/document/seed-parts";import{say as O}from"efficient-web-builder/format/lib/editor-words";import{FACET_TEMPLATE_ALLOW as P,ONE_ROW as R}from"./facet-row-seed.js";import{hostPartSeed as d}from"./host-part-seed.js";import{ALLOY_WHEELS_LISTING_TYPE as u}from"../document/document-nodes.js";import{seedNodeId as f}from"./seed-ids.js";const _="railTemplate",$="Filter group template",E="railHeadTemplate",b="Filter head template",s="railGroup",K=[{key:s,label:"Filter group"}],S="options",g="end",X=P,x={...m,size:11,letterSpacing:.2,lineHeight:1.5},I={fontRole:"heading",size:18,weight:500,case:"upper",letterSpacing:-.01,lineHeight:1.5},h=()=>({type:n,props:{...a,name:"Group",gap:0,startsOpen:!0},slots:{rowTitle:[c(s,{...p,tag:"span"},x)],[i]:[{type:n,props:{...a,name:"Options",...l(0,0),sectionPaddingBottom:12,sectionPaddingBottomPhone:12},slots:{[i]:[d(S,"Filter options")]}}]}}),B=()=>({type:n,props:{...R,name:"Head",justify:"between",...l(0,0),sectionPaddingBottom:8,sectionPaddingBottomPhone:8},slots:{[i]:[{type:"Text",props:{...p,tag:"h2",text:O("Filter"),_partStyles:{text:I}}},d(g,"Clear all")]}}),T=(e,t)=>{let o=0;return(r,A)=>A==="0"?`${e}~${t}`:`${e}~${t}.${o++}`};function F(e){return L([h()],T(e,"rail"))}function H(e){return L([B()],T(e,"railhead"))}function Y(e){const t=e[_]===void 0,o=e[E]===void 0;if(!t&&!o)return e;const r=f(e,u);return{...e,...t?{[_]:F(r)}:{},...o?{[E]:H(r)}:{}}}const z=e=>({[s]:e});export{g as RAIL_END_PART,s as RAIL_GROUP_FIELD,b as RAIL_HEAD_TEMPLATE_LABEL,E as RAIL_HEAD_TEMPLATE_SLOT,S as RAIL_OPTIONS_PART,K as RAIL_ROW_FIELDS,X as RAIL_TEMPLATE_ALLOW,$ as RAIL_TEMPLATE_LABEL,_ as RAIL_TEMPLATE_SLOT,z as railRow,Y as withRailTemplates};
@@ -0,0 +1,6 @@
1
+ import type { SeededNode } from "efficient-web-builder/format/lib/document/seed-parts";
2
+ type Props = Record<string, unknown>;
3
+ export declare const seedNodeId: (props: Props, fallback: string) => string;
4
+ export declare const slotSeedIds: (nodeId: string, tag: string) => (_type: string, at: string) => string;
5
+ export declare function withSeededSlot(props: Props, slot: string, fallback: string, seed: (nodeId: string) => SeededNode[]): Props;
6
+ export {};
@@ -0,0 +1 @@
1
+ const n=(e,t)=>typeof e.id=="string"&&e.id.trim()?e.id:t,$=(e,t)=>(i,d)=>d==="0"?`${e}~${t}`:`${e}~${t}.${d.slice(2)}`;function c(e,t,i,d){return e[t]!==void 0?e:{...e,[t]:d(n(e,i))}}export{n as seedNodeId,$ as slotSeedIds,c as withSeededSlot};
@@ -1 +1 @@
1
- const t={label:"Buy button",defaultProps:{}};export{t as ProductBuyButtonMeta};
1
+ const t={label:"Buy button",defaultProps:{},sitsInBox:!0};export{t as ProductBuyButtonMeta};
@@ -8,6 +8,10 @@ export declare const ProductHeroSlots: {
8
8
  type: "slot";
9
9
  allow: ("Flex" | "Text")[];
10
10
  };
11
+ buyTemplate: {
12
+ type: "slot";
13
+ allow: ("Flex" | "ProductBuyButton")[];
14
+ };
11
15
  trustBullets: {
12
16
  type: "slot";
13
17
  allow: string[];
@@ -1 +1 @@
1
- import{DEFAULT_HERO_PRICE_PLACEMENT as e}from"../../../../sections/hero-price-placement.js";import{DEFAULT_HERO_LAYOUT as r,DEFAULT_HERO_RATIO as _,DEFAULT_HERO_TEXT_ALIGN as l}from"../../../../sections/hero-arrangement.js";import{DEFAULT_HERO_GALLERY_MODE as E,DEFAULT_HERO_IMAGE_FIT as L}from"../../../../sections/hero-gallery.js";import{cardTemplateSlot as T}from"efficient-web-builder/format/lib/content/card-template";import{HERO_PRICE_BLOCK as O}from"../../../../content/hero-price-seed.js";import{HERO_OPTION_ALLOW as m,HERO_OPTION_SLOT as a}from"../../../../content/hero-option-seed.js";import{TRUST_BULLETS_ALLOW as i,TRUST_BULLETS_SLOT as o}from"../../../../sections/hero-trust-bullets.js";const t=T(),R="ProductBuyButton",p={template:{...t,allow:[...t.allow,O,R]},[a]:{type:"slot",allow:[...m]},[o]:{type:"slot",allow:i}},S={label:"Product Hero",fields:p,defaultProps:{source:null,pricePlacement:e,showVehicleFitment:!0,heroLayout:r,imageRatio:_,textAlign:l,showSpecTable:!0,showPriceQuote:!0,galleryMode:E,imageFit:L,[o]:[]}};export{S as ProductHeroMeta,p as ProductHeroSlots};
1
+ import{DEFAULT_HERO_PRICE_PLACEMENT as e}from"../../../../sections/hero-price-placement.js";import{DEFAULT_HERO_LAYOUT as r,DEFAULT_HERO_RATIO as l,DEFAULT_HERO_TEXT_ALIGN as _}from"../../../../sections/hero-arrangement.js";import{DEFAULT_HERO_GALLERY_MODE as E,DEFAULT_HERO_IMAGE_FIT as L}from"../../../../sections/hero-gallery.js";import{cardTemplateSlot as O}from"efficient-web-builder/format/lib/content/card-template";import{HERO_PRICE_BLOCK as T}from"../../../../content/hero-price-seed.js";import{HERO_OPTION_ALLOW as m,HERO_OPTION_SLOT as a}from"../../../../content/hero-option-seed.js";import{HERO_BUY_ALLOW as i,HERO_BUY_SLOT as p}from"../../../../content/hero-buy-seed.js";import{TRUST_BULLETS_ALLOW as R,TRUST_BULLETS_SLOT as o}from"../../../../sections/hero-trust-bullets.js";const t=O(),A={template:{...t,allow:[...t.allow,T]},[a]:{type:"slot",allow:[...m]},[p]:{type:"slot",allow:[...i]},[o]:{type:"slot",allow:R}},F={label:"Product Hero",fields:A,defaultProps:{source:null,pricePlacement:e,showVehicleFitment:!0,heroLayout:r,imageRatio:l,textAlign:_,showSpecTable:!0,showPriceQuote:!0,galleryMode:E,imageFit:L,[o]:[]}};export{F as ProductHeroMeta,A as ProductHeroSlots};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{SITE_WIDTH_CAP as L}from"efficient-web-builder/format/lib/content/page-width";import{resolveWidth as g}from"efficient-web-builder/format/lib/content/section-width";import A from"../../../../../components/LinkedProductHero.js";import l from"../../../../../components/pdp-dynamic/DynamicProductHero.js";import O from"../../../../../components/SectionNotice.js";import{trustBulletsRow as R,trustBulletsSlot as y}from"../../../../../components/product-hero/trust-bullets.js";import{TRUST_BULLETS_SLOT as F}from"../../../../sections/hero-trust-bullets.js";import{HERO_OPTION_SLOT as m}from"../../../../content/hero-option-seed.js";import{cardPressTitlesOf as w}from"efficient-web-builder/render/lib/document/card-press-titles";import{useCurrentProduct as D}from"../../../current-product.js";import{isEditorOnDynamicPage as I}from"efficient-web-builder/format/lib/document/editor-page-context";import{DEFAULT_HERO_PRICE_PLACEMENT as S,parseHeroPricePlacement as U}from"../../../../sections/hero-price-placement.js";import{DEFAULT_HERO_LAYOUT as p,DEFAULT_HERO_RATIO as M,DEFAULT_HERO_TEXT_ALIGN as k,parseHeroLayout as x,parseHeroRatio as B,parseHeroTextAlign as C}from"../../../../sections/hero-arrangement.js";import{DEFAULT_HERO_GALLERY_MODE as G,DEFAULT_HERO_IMAGE_FIT as N,parseHeroGalleryMode as V,parseHeroImageFit as b}from"../../../../sections/hero-gallery.js";import{say as j}from"efficient-web-builder/format/lib/editor-words";import{ProductHeroMeta as v}from"./meta.js";import{HideTaker as Q}from"efficient-web-builder/render/components/ViewHideRoot";function W({source:e,editing:t=!1,pricePlacement:i=S,showVehicleFitment:o=!0,heroLayout:a=p,imageRatio:u=M,textAlign:c=k,showSpecTable:f=!0,showPriceQuote:d=!0,galleryMode:s=G,imageFit:T=N,trustBullets:E,nodeId:_,priceTemplate:P,optionTemplate:H,optionPressTitles:h}){const n={heroLayout:a,imageRatio:u,textAlign:c,showSpecTable:f,showPriceQuote:d,galleryMode:s,imageFit:T,trustBullets:R(E,t),nodeId:_,priceTemplate:P,optionTemplate:H,optionPressTitles:h};return D()||t&&I()?r(l,{editing:t,pricePlacement:i,showVehicleFitment:o,...n}):e?.slug?r(A,{slug:e.slug,kind:e.kind??"wheel",editing:t,pricePlacement:i,showVehicleFitment:o,...n}):t?r(O,{size:"tall",children:j("Pick a product in the panel to fill this hero.")}):r(l,{pricePlacement:i,showVehicleFitment:o,...n})}function Y(e,t){return g(e,"full").mode!=="page"?t:r(Q,{as:"div",style:{"--sf-content-cap":L},children:t})}const de={...v,render:e=>Y(e,r(W,{source:e.source,editing:e.editor?.isEditing,pricePlacement:U(e.pricePlacement),showVehicleFitment:e.showVehicleFitment??!0,heroLayout:x(e.heroLayout),imageRatio:B(e.imageRatio),textAlign:C(e.textAlign),showSpecTable:e.showSpecTable??!0,showPriceQuote:e.showPriceQuote??!0,galleryMode:V(e.galleryMode),imageFit:b(e.imageFit),trustBullets:y(e[F]),nodeId:typeof e.id=="string"?e.id:void 0,priceTemplate:typeof e.template=="function"?e.template:void 0,optionTemplate:typeof e[m]=="function"?e[m]:void 0,optionPressTitles:w(e,m)}))};export{de as ProductHeroRender};
1
+ import{jsx as r}from"react/jsx-runtime";import{SITE_WIDTH_CAP as g}from"efficient-web-builder/format/lib/content/page-width";import{resolveWidth as R}from"efficient-web-builder/format/lib/content/section-width";import A from"../../../../../components/LinkedProductHero.js";import l from"../../../../../components/pdp-dynamic/DynamicProductHero.js";import y from"../../../../../components/SectionNotice.js";import{trustBulletsRow as F,trustBulletsSlot as w}from"../../../../../components/product-hero/trust-bullets.js";import{TRUST_BULLETS_SLOT as D}from"../../../../sections/hero-trust-bullets.js";import{HERO_OPTION_SLOT as m}from"../../../../content/hero-option-seed.js";import{HERO_BUY_SLOT as u}from"../../../../content/hero-buy-seed.js";import{cardPressTitlesOf as I}from"efficient-web-builder/render/lib/document/card-press-titles";import{useCurrentProduct as S}from"../../../current-product.js";import{isEditorOnDynamicPage as U}from"efficient-web-builder/format/lib/document/editor-page-context";import{DEFAULT_HERO_PRICE_PLACEMENT as B,parseHeroPricePlacement as M}from"../../../../sections/hero-price-placement.js";import{DEFAULT_HERO_LAYOUT as k,DEFAULT_HERO_RATIO as p,DEFAULT_HERO_TEXT_ALIGN as x,parseHeroLayout as C,parseHeroRatio as G,parseHeroTextAlign as N}from"../../../../sections/hero-arrangement.js";import{DEFAULT_HERO_GALLERY_MODE as b,DEFAULT_HERO_IMAGE_FIT as V,parseHeroGalleryMode as Y,parseHeroImageFit as j}from"../../../../sections/hero-gallery.js";import{say as v}from"efficient-web-builder/format/lib/editor-words";import{ProductHeroMeta as Q}from"./meta.js";import{HideTaker as W}from"efficient-web-builder/render/components/ViewHideRoot";function z({source:e,editing:t=!1,pricePlacement:i=B,showVehicleFitment:o=!0,heroLayout:a=k,imageRatio:c=p,textAlign:f=x,showSpecTable:d=!0,showPriceQuote:T=!0,galleryMode:s=b,imageFit:E=V,trustBullets:_,nodeId:H,priceTemplate:P,optionTemplate:L,optionPressTitles:h,buyTemplate:O}){const n={heroLayout:a,imageRatio:c,textAlign:f,showSpecTable:d,showPriceQuote:T,galleryMode:s,imageFit:E,trustBullets:F(_,t),nodeId:H,priceTemplate:P,optionTemplate:L,optionPressTitles:h,buyTemplate:O};return S()||t&&U()?r(l,{editing:t,pricePlacement:i,showVehicleFitment:o,...n}):e?.slug?r(A,{slug:e.slug,kind:e.kind??"wheel",editing:t,pricePlacement:i,showVehicleFitment:o,...n}):t?r(y,{size:"tall",children:v("Pick a product in the panel to fill this hero.")}):r(l,{pricePlacement:i,showVehicleFitment:o,...n})}function X(e,t){return R(e,"full").mode!=="page"?t:r(W,{as:"div",style:{"--sf-content-cap":g},children:t})}const Ee={...Q,render:e=>X(e,r(z,{source:e.source,editing:e.editor?.isEditing,pricePlacement:M(e.pricePlacement),showVehicleFitment:e.showVehicleFitment??!0,heroLayout:C(e.heroLayout),imageRatio:G(e.imageRatio),textAlign:N(e.textAlign),showSpecTable:e.showSpecTable??!0,showPriceQuote:e.showPriceQuote??!0,galleryMode:Y(e.galleryMode),imageFit:j(e.imageFit),trustBullets:w(e[D]),nodeId:typeof e.id=="string"?e.id:void 0,priceTemplate:typeof e.template=="function"?e.template:void 0,optionTemplate:typeof e[m]=="function"?e[m]:void 0,optionPressTitles:I(e,m),buyTemplate:typeof e[u]=="function"?e[u]:void 0}))};export{Ee as ProductHeroRender};
@@ -1 +1 @@
1
- import{PH as s,CTA_PH as u}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{phRows as o}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{say as r}from"efficient-web-builder/format/lib/editor-words";const h={headNum:s.sectionNumber,headTitle:s.headingAccent,headDesc:"A short description of your newsletter or publication.",kicker:"→ Newsletter",leadTitle:"Get it in the *inbox.*",intro:"Tell readers what they get and how often. One email, straight to the inbox. We will never sell your address.",emailPlaceholder:"your@email.com",submitText:"Subscribe →",subscribedText:"Subscribed ✓",finePrint:"Approx. 1 email per week · Unsubscribe in one click",issuesHeading:"Recent issues",archiveText:"View the full archive →",archiveHref:u.href},n=()=>["N° 04","N° 03","N° 02","N° 01"].map(t=>({n:t,title:r("Issue title"),small:r("Short description"),date:r("Month YYYY")}));function c(t){return t.map((e,i)=>({n:`N° ${String(t.length-i).padStart(2,"0")}`,title:e.title,small:e.meta,date:e.dateLabel}))}function f(t,e){if(t==="issues")return o(e.issues,n(),e.editor);const i=e.posts,l=typeof e.limit=="number"&&e.limit>0?e.limit:4,a=Array.isArray(i)?c(i.slice(0,l)):[];return o(a,n(),e.editor)}export{h as SUBSCRIBE_PH,c as blogPostsToIssues,f as subscribeRailRows,n as subscribeScaffoldIssues};
1
+ import{PH as s,CTA_PH as a}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{phRows as o}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{say as r}from"efficient-web-builder/format/lib/editor-words";const d={headNum:s.sectionNumber,headTitle:s.headingAccent,headDesc:"A short description of your newsletter or publication.",kicker:"→ Newsletter",leadTitle:"Get it in the *inbox.*",intro:"Tell readers what they get and how often. One email, straight to the inbox. We will never sell your address.",emailPlaceholder:"your@email.com",submitText:"Subscribe →",subscribedText:"Subscribed ✓",finePrint:"Approx. 1 email per week · Unsubscribe in one click",issuesHeading:"Recent issues",archiveText:"View the full archive →",archiveHref:a.href},n=()=>["N° 04","N° 03","N° 02","N° 01"].map(t=>({n:t,title:r("Issue title"),small:r("Short description"),date:r("Month YYYY")}));function c(t){return t.map((e,i)=>({n:`N° ${String(t.length-i).padStart(2,"0")}`,title:e.title,small:e.meta}))}function f(t,e){if(t==="issues")return o(e.issues,n(),e.editor);const i=e.posts,l=typeof e.limit=="number"&&e.limit>0?e.limit:4,u=Array.isArray(i)?c(i.slice(0,l)):[];return o(u,n(),e.editor)}export{d as SUBSCRIBE_PH,c as blogPostsToIssues,f as subscribeRailRows,n as subscribeScaffoldIssues};
@@ -1 +1 @@
1
- import{CARD_LIST_TYPE as L,CARD_ROW_FIELD_PROP as h,CARD_ROW_LINK_PROP as _,CARD_TEMPLATE_SLOT as C,registerCardTemplates as te}from"efficient-web-builder/format/lib/content/card-template";import{DIM as s,INNER_BOX as o,TEXT as n,boxPadding as r,fillSlot as N,labelLook as A,labelStyle as D,seedNodes as w,token as d}from"efficient-web-builder/format/lib/document/seed-parts";import{BOX_TYPE as a,CONTAINER_BLOCKS_SLOT as i}from"efficient-web-builder/format/lib/document/container-blocks";import{BOX_ROW_IMAGE_PROP as B}from"efficient-web-builder/format/lib/content/box-card-rule";import{POST_CARD_HEIGHT as le}from"efficient-web-builder/format/lib/post-card-layout";import{EVENTS_FEATURED_DARKEN as oe,EVENTS_FEATURED_DARKEN_STYLE as F,EVENTS_FEATURED_PLACEMENT as ae}from"../content/events-featured-look.js";import{COLLECTION_DARKEN as ie,COLLECTION_HOVER_DARKEN as ne,COLLECTION_HOVER_ZOOM as H}from"../content/collection-card-look.js";import{COLLECTION_CARD_REGIONS as p,COLLECTION_CARD_TEXT_SIZE as re}from"efficient-web-builder/format/lib/sections/collection-card-text-regions";import{SH_LINK as K}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{rowFieldTextSeed as l}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{withRelatedTabletColumns as P}from"../sections/product-grid-columns.js";import{bundleColumns as se}from"../sections/bundle-to-grid.js";import{HERO_PRICE_BLOCK as de,withHeroPriceTemplate as Ee}from"../content/hero-price-seed.js";import{HERO_OPTION_FIELDS as M,HERO_OPTION_SLOT as ce,HERO_OPTION_SLOT_LABEL as Te,withHeroOptionTemplate as _e}from"../content/hero-option-seed.js";import{FILTER_OPTIONS_FIELD as pe,withFilterChipsTemplate as Oe,withFilterTemplate as me}from"../content/filter-card-seed.js";import{FACET_ROW_FIELDS as O,FACET_TEMPLATE_LABEL as x,FACET_TEMPLATE_SLOT as U,withFacetTemplate as v}from"../content/facet-row-seed.js";import{RAIL_HEAD_TEMPLATE_LABEL as be,RAIL_HEAD_TEMPLATE_SLOT as Le,RAIL_ROW_FIELDS as g,RAIL_TEMPLATE_LABEL as he,RAIL_TEMPLATE_SLOT as Ce,withRailTemplates as V}from"../content/rail-row-seed.js";import{MENU_LINK_BLOCK as Pe,withMenuTemplate as ge}from"../content/menu-card-seed.js";import{CONTACT_CHANNEL_FIELDS as G,CONTACT_CHANNEL_SLOT as ye,CONTACT_REASON_FIELDS as ke,CONTACT_REASON_SLOT as fe,CONTACT_TOPIC_FIELDS as W,CONTACT_TOPIC_SLOT as Se,withContactTemplates as Re}from"../content/contact-card-seed.js";import{ARTICLE_BODY_BLOCK as ue,withArticleBodyTemplate as Ie}from"../content/article-body-seed.js";import{APPOINTMENT_BOOKING_TYPE as Ne,BOOKING_BOX_TYPE as Ae,BOOKING_OPTION_FIELDS as De,BOOKING_TEMPLATE_SLOTS as we,withBookingTemplates as Be}from"../content/booking-card-seed.js";import{PRODUCT_BUY_BLOCK as Fe,PRODUCT_CARD_FIELDS as y,PRODUCT_COLOUR_BLOCK as He,PRODUCT_EYEBROW_BLOCK as Ke,PRODUCT_NAME_BLOCK as Me,PRODUCT_PICTURE_BLOCK as xe,PRODUCT_PRICE_BLOCK as Ue,PRODUCT_SIZE_BLOCK as ve,PRODUCT_SPECS_BLOCK as Ve,productCardSeed as Ge,withKitCardTemplate as k,withListingCardTemplate as We,withProductCardTemplate as f}from"../content/product-card-seed.js";import{ALLOY_WHEELS_LISTING_TYPE as Ye,MENU_BLOCK_TYPE as $e}from"./document-nodes.js";const Y="tags",E=A(12),$={textStyle:"heading-3",...d("headingSmall",20),weight:500,lineHeight:1.2,letterSpacing:-.02},X={textStyle:"body-1",...d("body",14),lineHeight:1.55},Xe={...$,...d("headingSmall",30)},Ze={sectionPaddingTop:24,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:24,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},je=le.fallback,ze=480,qe=70,Qe=()=>({type:a,props:{...o,name:"Featured",[B]:"cover",darken:oe,darkenStyle:F,darkenPhone:qe,darkenStylePhone:F,placement:ae,direction:"column",gap:8,gapPhone:8,...r(32,32,20,20),sectionHeightMode:"fixed",sectionHeightValue:je,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:ze,sectionHeightUnitPhone:"px",[_]:"href"},slots:{[i]:[l("meta",{...n,tag:"p"},E,!0),l("title",{...n,tag:"h3",widthFit:"fill"},Xe),l("excerpt",{...s,tag:"p",widthFit:"fill",maxWidth:384},X),l("dateLabel",{...s,tag:"p"},{...E,color:"muted"})]}}),Je=()=>({type:a,props:{...o,name:"Post",gap:0,gapPhone:0,...r(0,0,0,0),...N("surface"),shadow:!0},slots:{[i]:[{type:"ImageBlock",props:{[h]:"cover",aspect:"16/10",contained:!1}},{type:a,props:{...o,name:"Words",gap:12,gapPhone:12,...Ze},slots:{[i]:[{type:a,props:{...o,name:"Meta",direction:"row",wrap:!0,share:"content",sharePhone:"content",phoneRow:2,gap:12,gapPhone:12,...r(0,0,0,0)},slots:{[i]:[l("meta",{...n,tag:"p"},E,!0),l("dateLabel",{...s,tag:"p"},{...E,color:"muted"},!0)]}},l("title",{...n,tag:"h3",widthFit:"fill"},$),l("excerpt",{...s,tag:"p",widthFit:"fill"},X),{type:L,props:{[h]:Y},slots:{template:[{type:a,props:{...o,name:"Chip",...r(4,8,4,8),sectionBorder:{width:1}},slots:{[i]:[l("label",{...s,tag:"p"},E)]}}]}},{type:"ButtonBlock",props:{variant:"ghost",label:"Read more",href:"",[_]:"href",...K,icon:"arrow-right",iconPosition:"after",_partStyles:{label:D(12)}}}]}}]}}),et=()=>[Qe(),Je()];function tt(e){if(e.template!==void 0)return e;const t=typeof e.id=="string"&&e.id.trim()?e.id:"Events",S=["featured","post"];return{...e,template:w(et(),(b,ee)=>{const[R,...u]=ee.split("."),I=S[Number(R)]??`card${R}`;return u.length?`${t}~${I}.${u.join(".")}`:`${t}~${I}`})}}const lt={fields:[{key:"cover",label:"Cover",kind:"image",alt:"title"},{key:"meta",label:"Eyebrow"},{key:"dateLabel",label:"Date"},{key:"title",label:"Title"},{key:"excerpt",label:"Excerpt",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:Y,label:"Tags",kind:"list",fields:[{key:"label",label:"Tag"}]}],blocks:[{type:L,label:"Card list"}],seedOnInsert:tt},c=e=>Number(/(\d+)px/.exec(e)?.[1]),T={tag:c(p.tag.builtIn),name:c(p.name.builtIn),namePhone:c(re.namePhone),body:c(p.body.builtIn),link:c(p.link.builtIn)},ot={...A(T.tag),letterSpacing:.25},at={textStyle:"heading-2",...d("headingMedium",T.name,T.namePhone),weight:500,lineHeight:1,letterSpacing:-.03},it={textStyle:"body-1",...d("body",T.body),lineHeight:1.5,paragraphSpacing:12},Z=()=>[l("tag",{...n,tag:"p"},ot,!0),l("name",{...n,tag:"h3",widthFit:"fill"},at),l("desc",{...n,tag:"p",widthFit:"fill",maxWidth:420},it),{type:"ButtonBlock",props:{variant:"ghost",label:"Explore",href:"",[_]:"href",...K,icon:"arrow-right",iconPosition:"after",_partStyles:{label:D(T.link)}}}],j={_hidden:!0,_hiddenTablet:!0,_hiddenPhone:!1},nt=()=>({type:a,props:{...o,name:"Collection",gap:0,gapPhone:0,...r(0,0,0,0),[_]:"href"},slots:{[i]:[{type:a,props:{...o,name:"Picture",[B]:"image",boxShape:"portrait",darken:ie,placement:"bottom-left",direction:"column",gap:12,gapPhone:12,...r(32,32),hoverZoom:H,hoverDarken:ne,_hiddenPhone:!0},slots:{[i]:Z()}},{type:"ImageBlock",props:{[h]:"image",aspect:"4/5",contained:!1,hoverZoom:H,...j}},{type:a,props:{...o,name:"Words",gap:12,gapPhone:12,...r(24,24),...N("surface"),...j},slots:{[i]:Z()}}]}});function rt(e){if(e.template!==void 0)return e;const t=typeof e.id=="string"&&e.id.trim()?e.id:"Collections";return{...e,template:w([nt()],(S,b)=>`${t}~card${b?`.${b}`:""}`)}}const st={fields:[{key:"tag",label:"Eyebrow"},{key:"name",label:"Title"},{key:"desc",label:"Description",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"name"},{key:"href",label:"Link",kind:"link"}],seedOnInsert:rt},dt=["showCardPrice","showCardFinishes","showCardSizes","showCardBuy","showCardPage"],Et=e=>Object.fromEntries(Object.entries(e).filter(([t])=>!dt.includes(t))),z={fields:[{key:"label",label:"Label"},{key:"href",label:"Link",kind:"link"}],blocks:[{type:Pe,label:"Menu link"}],seed:ge},q=e=>e.dynamic===!0&&e.relationship==="bundles",Ft=(e={})=>Ge(e),m={fields:y,blocks:[{type:xe,label:"Picture"},{type:Ke,label:"Eyebrow"},{type:Me,label:"Name"},{type:Ve,label:"Specs"},{type:Ue,label:"Price"},{type:He,label:"Colour"},{type:ve,label:"Size"},{type:Fe,label:"Buy"}],seed:e=>{if(e.dynamic!==!0)return f(e);const t=P(e);return q(e)?k(t):f(t)}},Q=[{key:"label",label:"Filter name"},{key:pe,label:"Options",kind:"list",fields:[{key:"label",label:"Option"},{key:"count",label:"Count"}]}],J=[{slot:Ce,label:he,fields:g},{slot:Le,label:be,fields:[]}],ct=[{block:"Reviews",fields:[{key:"quote",label:"Quote"},{key:"title",label:"Title"},{key:"name",label:"Name"},{key:"role",label:"Role · location"},{key:"rating",label:"Rating"},{key:"dateLabel",label:"Date"}],blocks:[{type:"RatingBlock",label:"Rating"}]},{block:"SpecTable",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]},{block:"DetailRows",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"}]},{block:"FooterMenu",...z},{block:$e,...z},{block:"ProductGrid",...m},{block:Ye,...m,slots:[{slot:C,fields:y},{slot:U,label:x,fields:O},...J],fields:[...y,...O,...g],seed:e=>V(v(We(e)))},{block:"RelatedProducts",...m,seed:e=>{const t=P({...Et(e),dynamic:!0});return q(t)?k(t):f(t,{legacyWellHonoured:!0})}},{block:"BundleOffer",...m,seed:e=>k(P({...e,columns:se(e),dynamic:!0}))},{block:"ProductHero",slots:[{slot:C,fields:[]},{slot:ce,label:Te,fields:M}],fields:M,blocks:[{type:de,label:"Price"}],seed:e=>_e(Ee(e))},{block:"FilterBlock",slots:[{slot:C,fields:Q},{slot:U,label:x,fields:O},...J],fields:[...Q,...O,...g],blocks:[{type:L,label:"Card list"}],seed:e=>V(v(me(e)))},{block:"FilterChipsBlock",fields:[{key:"label",label:"Pick"},{key:"mark",label:"Remove mark"}],seed:Oe},{block:"ContactRouting",slots:[{slot:Se,label:"Topic card",fields:W},{slot:fe,label:"Reason chip",fields:ke},{slot:ye,label:"Channel row",fields:G}],fields:[...W,...G],seed:Re},{block:ue,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:Ie},...[Ae,Ne].map(e=>({block:e,slots:we,fields:De,seed:t=>Be(e,t)})),{block:"Events",...lt},{block:"Collections",...st}];te(ct);export{ct as STOREFRONT_CARD_TEMPLATES,nt as collectionCardSeed,q as drawsKits,et as eventsCardSeeds,Ft as productGridCardSeed,rt as withCollectionsTemplate,tt as withEventsTemplate};
1
+ import{CARD_LIST_TYPE as h,CARD_ROW_FIELD_PROP as P,CARD_ROW_LINK_PROP as c,CARD_TEMPLATE_SLOT as s,registerCardTemplates as le}from"efficient-web-builder/format/lib/content/card-template";import{DIM as d,INNER_BOX as o,TEXT as n,boxPadding as r,fillSlot as N,labelLook as A,labelStyle as D,seedNodes as w,token as E}from"efficient-web-builder/format/lib/document/seed-parts";import{BOX_TYPE as a,CONTAINER_BLOCKS_SLOT as i}from"efficient-web-builder/format/lib/document/container-blocks";import{BOX_ROW_IMAGE_PROP as B}from"efficient-web-builder/format/lib/content/box-card-rule";import{POST_CARD_HEIGHT as oe}from"efficient-web-builder/format/lib/post-card-layout";import{EVENTS_FEATURED_DARKEN as ae,EVENTS_FEATURED_DARKEN_STYLE as F,EVENTS_FEATURED_PLACEMENT as ie}from"../content/events-featured-look.js";import{COLLECTION_DARKEN as ne,COLLECTION_HOVER_DARKEN as re,COLLECTION_HOVER_ZOOM as H}from"../content/collection-card-look.js";import{COLLECTION_CARD_REGIONS as O,COLLECTION_CARD_TEXT_SIZE as se}from"efficient-web-builder/format/lib/sections/collection-card-text-regions";import{SH_LINK as K}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{rowFieldTextSeed as l}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{withRelatedTabletColumns as g}from"../sections/product-grid-columns.js";import{bundleColumns as de}from"../sections/bundle-to-grid.js";import{HERO_PRICE_BLOCK as Ee,withHeroPriceTemplate as Te}from"../content/hero-price-seed.js";import{HERO_BUY_SLOT as _e,HERO_BUY_SLOT_LABEL as pe,withHeroBuyTemplate as ce}from"../content/hero-buy-seed.js";import{HERO_OPTION_FIELDS as M,HERO_OPTION_SLOT as Oe,HERO_OPTION_SLOT_LABEL as me,withHeroOptionTemplate as Le}from"../content/hero-option-seed.js";import{FILTER_OPTIONS_FIELD as be,withFilterChipsTemplate as Ce,withFilterTemplate as he}from"../content/filter-card-seed.js";import{FACET_ROW_FIELDS as m,FACET_TEMPLATE_LABEL as U,FACET_TEMPLATE_SLOT as x,withFacetTemplate as v}from"../content/facet-row-seed.js";import{RAIL_HEAD_TEMPLATE_LABEL as Pe,RAIL_HEAD_TEMPLATE_SLOT as ge,RAIL_ROW_FIELDS as y,RAIL_TEMPLATE_LABEL as ye,RAIL_TEMPLATE_SLOT as Re,withRailTemplates as V}from"../content/rail-row-seed.js";import{MENU_LINK_BLOCK as Se,withMenuTemplate as ke}from"../content/menu-card-seed.js";import{CONTACT_CHANNEL_FIELDS as Y,CONTACT_CHANNEL_SLOT as fe,CONTACT_REASON_FIELDS as ue,CONTACT_REASON_SLOT as Ie,CONTACT_TOPIC_FIELDS as G,CONTACT_TOPIC_SLOT as Ne,withContactTemplates as Ae}from"../content/contact-card-seed.js";import{ARTICLE_BODY_BLOCK as De,withArticleBodyTemplate as we}from"efficient-web-builder/format/lib/document/article-body-seed";import{APPOINTMENT_BOOKING_TYPE as Be,BOOKING_BOX_TYPE as Fe,BOOKING_OPTION_FIELDS as He,BOOKING_TEMPLATE_SLOTS as Ke,withBookingTemplates as Me}from"../content/booking-card-seed.js";import{PRODUCT_BUY_BLOCK as Ue,PRODUCT_CARD_FIELDS as R,PRODUCT_COLOUR_BLOCK as xe,PRODUCT_EYEBROW_BLOCK as ve,PRODUCT_NAME_BLOCK as Ve,PRODUCT_PICTURE_BLOCK as Ye,PRODUCT_PRICE_BLOCK as Ge,PRODUCT_SIZE_BLOCK as We,PRODUCT_SPECS_BLOCK as $e,productCardSeed as Xe,withKitCardTemplate as S,withListingCardTemplate as Ze,withProductCardTemplate as k}from"../content/product-card-seed.js";import{ALLOY_WHEELS_LISTING_TYPE as je,FILTER_BLOCK_TYPE as ze,FILTER_CHIPS_TYPE as qe,MENU_BLOCK_TYPE as Qe,PRODUCT_GRID_TYPE as Je,PRODUCT_HERO_TYPE as et}from"./document-nodes.js";import{withSeededSlot as W}from"../content/seed-ids.js";const $="tags",T=A(12),X={textStyle:"heading-3",...E("headingSmall",20),weight:500,lineHeight:1.2,letterSpacing:-.02},Z={textStyle:"body-1",...E("body",14),lineHeight:1.55},tt={...X,...E("headingSmall",30)},lt={sectionPaddingTop:24,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:24,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},ot=oe.fallback,at=480,it=70,nt=()=>({type:a,props:{...o,name:"Featured",[B]:"cover",darken:ae,darkenStyle:F,darkenPhone:it,darkenStylePhone:F,placement:ie,direction:"column",gap:8,gapPhone:8,...r(32,32,20,20),sectionHeightMode:"fixed",sectionHeightValue:ot,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:at,sectionHeightUnitPhone:"px",[c]:"href"},slots:{[i]:[l("meta",{...n,tag:"p"},T,!0),l("title",{...n,tag:"h3",widthFit:"fill"},tt),l("excerpt",{...d,tag:"p",widthFit:"fill",maxWidth:384},Z),l("dateLabel",{...d,tag:"p"},{...T,color:"muted"})]}}),rt=()=>({type:a,props:{...o,name:"Post",gap:0,gapPhone:0,...r(0,0,0,0),...N("surface"),shadow:!0},slots:{[i]:[{type:"ImageBlock",props:{[P]:"cover",aspect:"16/10",contained:!1}},{type:a,props:{...o,name:"Words",gap:12,gapPhone:12,...lt},slots:{[i]:[{type:a,props:{...o,name:"Meta",direction:"row",wrap:!0,share:"content",sharePhone:"content",phoneRow:2,gap:12,gapPhone:12,...r(0,0,0,0)},slots:{[i]:[l("meta",{...n,tag:"p"},T,!0),l("dateLabel",{...d,tag:"p"},{...T,color:"muted"},!0)]}},l("title",{...n,tag:"h3",widthFit:"fill"},X),l("excerpt",{...d,tag:"p",widthFit:"fill"},Z),{type:h,props:{[P]:$},slots:{template:[{type:a,props:{...o,name:"Chip",...r(4,8,4,8),sectionBorder:{width:1}},slots:{[i]:[l("label",{...d,tag:"p"},T)]}}]}},{type:"ButtonBlock",props:{variant:"ghost",label:"Read more",href:"",[c]:"href",...K,icon:"arrow-right",iconPosition:"after",_partStyles:{label:D(12)}}}]}}]}}),st=()=>[nt(),rt()];function dt(e){const t=["featured","post"];return W(e,s,"Events",b=>w(st(),(C,te)=>{const[f,...u]=te.split("."),I=t[Number(f)]??`card${f}`;return u.length?`${b}~${I}.${u.join(".")}`:`${b}~${I}`}))}const Et={fields:[{key:"cover",label:"Cover",kind:"image",alt:"title"},{key:"meta",label:"Eyebrow"},{key:"dateLabel",label:"Date"},{key:"title",label:"Title"},{key:"excerpt",label:"Excerpt",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:$,label:"Tags",kind:"list",fields:[{key:"label",label:"Tag"}]}],blocks:[{type:h,label:"Card list"}],seedOnInsert:dt},_=e=>Number(/(\d+)px/.exec(e)?.[1]),p={tag:_(O.tag.builtIn),name:_(O.name.builtIn),namePhone:_(se.namePhone),body:_(O.body.builtIn),link:_(O.link.builtIn)},Tt={...A(p.tag),letterSpacing:.25},_t={textStyle:"heading-2",...E("headingMedium",p.name,p.namePhone),weight:500,lineHeight:1,letterSpacing:-.03},pt={textStyle:"body-1",...E("body",p.body),lineHeight:1.5,paragraphSpacing:12},j=()=>[l("tag",{...n,tag:"p"},Tt,!0),l("name",{...n,tag:"h3",widthFit:"fill"},_t),l("desc",{...n,tag:"p",widthFit:"fill",maxWidth:420},pt),{type:"ButtonBlock",props:{variant:"ghost",label:"Explore",href:"",[c]:"href",...K,icon:"arrow-right",iconPosition:"after",_partStyles:{label:D(p.link)}}}],z={_hidden:!0,_hiddenTablet:!0,_hiddenPhone:!1},ct=()=>({type:a,props:{...o,name:"Collection",gap:0,gapPhone:0,...r(0,0,0,0),[c]:"href"},slots:{[i]:[{type:a,props:{...o,name:"Picture",[B]:"image",boxShape:"portrait",darken:ne,placement:"bottom-left",direction:"column",gap:12,gapPhone:12,...r(32,32),hoverZoom:H,hoverDarken:re,_hiddenPhone:!0},slots:{[i]:j()}},{type:"ImageBlock",props:{[P]:"image",aspect:"4/5",contained:!1,hoverZoom:H,...z}},{type:a,props:{...o,name:"Words",gap:12,gapPhone:12,...r(24,24),...N("surface"),...z},slots:{[i]:j()}}]}});function Ot(e){return W(e,s,"Collections",t=>w([ct()],(b,C)=>`${t}~card${C?`.${C}`:""}`))}const mt={fields:[{key:"tag",label:"Eyebrow"},{key:"name",label:"Title"},{key:"desc",label:"Description",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"name"},{key:"href",label:"Link",kind:"link"}],seedOnInsert:Ot},Lt=["showCardPrice","showCardFinishes","showCardSizes","showCardBuy","showCardPage"],bt=e=>Object.fromEntries(Object.entries(e).filter(([t])=>!Lt.includes(t))),q={fields:[{key:"label",label:"Label"},{key:"href",label:"Link",kind:"link"}],blocks:[{type:Se,label:"Menu link"}],seed:ke},Q=e=>e.dynamic===!0&&e.relationship==="bundles",Wt=(e={})=>Xe(e),L={fields:R,blocks:[{type:Ye,label:"Picture"},{type:ve,label:"Eyebrow"},{type:Ve,label:"Name"},{type:$e,label:"Specs"},{type:Ge,label:"Price"},{type:xe,label:"Colour"},{type:We,label:"Size"},{type:Ue,label:"Buy"}],seed:e=>{if(e.dynamic!==!0)return k(e);const t=g(e);return Q(e)?S(t):k(t)}},J=[{key:"label",label:"Filter name"},{key:be,label:"Options",kind:"list",fields:[{key:"label",label:"Option"},{key:"count",label:"Count"}]}],ee=[{slot:Re,label:ye,fields:y},{slot:ge,label:Pe,fields:[]}],Ct=[{block:"Reviews",fields:[{key:"quote",label:"Quote"},{key:"title",label:"Title"},{key:"name",label:"Name"},{key:"role",label:"Role · location"},{key:"rating",label:"Rating"},{key:"dateLabel",label:"Date"}],blocks:[{type:"RatingBlock",label:"Rating"}]},{block:"SpecTable",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]},{block:"DetailRows",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"}]},{block:"FooterMenu",...q},{block:Qe,...q},{block:Je,...L},{block:je,...L,slots:[{slot:s,fields:R},{slot:x,label:U,fields:m},...ee],fields:[...R,...m,...y],seed:e=>V(v(Ze(e)))},{block:"RelatedProducts",...L,seed:e=>{const t=g({...bt(e),dynamic:!0});return Q(t)?S(t):k(t,{legacyWellHonoured:!0})}},{block:"BundleOffer",...L,seed:e=>S(g({...e,columns:de(e),dynamic:!0}))},{block:et,slots:[{slot:s,fields:[]},{slot:Oe,label:me,fields:M},{slot:_e,label:pe,fields:[]}],fields:M,blocks:[{type:Ee,label:"Price"}],seed:e=>ce(Le(Te(e)))},{block:ze,slots:[{slot:s,fields:J},{slot:x,label:U,fields:m},...ee],fields:[...J,...m,...y],blocks:[{type:h,label:"Card list"}],seed:e=>V(v(he(e)))},{block:qe,fields:[{key:"label",label:"Pick"},{key:"mark",label:"Remove mark"}],seed:Ce},{block:"ContactRouting",slots:[{slot:Ne,label:"Topic card",fields:G},{slot:Ie,label:"Reason chip",fields:ue},{slot:fe,label:"Channel row",fields:Y}],fields:[...G,...Y],seed:Ae},{block:De,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:we},...[Fe,Be].map(e=>({block:e,slots:Ke,fields:He,seed:t=>Me(e,t)})),{block:"Events",...Et},{block:"Collections",...mt}];le(Ct);export{Ct as STOREFRONT_CARD_TEMPLATES,ct as collectionCardSeed,Q as drawsKits,st as eventsCardSeeds,Wt as productGridCardSeed,Ot as withCollectionsTemplate,dt as withEventsTemplate};