efficient-storefront-blocks 0.125.0 → 0.125.1

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 (30) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/chunks/{CustomHtmlCodeWindow-ROUI64CY.js → CustomHtmlCodeWindow-VRZ524JP.js} +1 -1
  3. package/dist/chunks/{EditorPreviewCheckout-F2HXHGBN.js → EditorPreviewCheckout-3TKWZ44N.js} +1 -1
  4. package/dist/chunks/SiteEditorProvider-OBXLJM7I.js +1 -0
  5. package/dist/chunks/chunk-4KN3VTQU.js +7 -0
  6. package/dist/chunks/{chunk-MU65AZLZ.js → chunk-6ABZ7XWF.js} +1 -1
  7. package/dist/chunks/{chunk-ESVLXH7T.js → chunk-FNCEZSDY.js} +1 -1
  8. package/dist/chunks/{chunk-2KEZPQPW.js → chunk-HQFRQZ6J.js} +1 -1
  9. package/dist/chunks/chunk-J6SPMJBT.js +337 -0
  10. package/dist/chunks/{chunk-T2LZCAFH.js → chunk-PULBLZRR.js} +1 -1
  11. package/dist/chunks/{chunk-O3YXHDC6.js → chunk-TVMCJUOE.js} +1 -1
  12. package/dist/chunks/{fitment-data-X7PIIXMU.js → fitment-data-C2NHZBPR.js} +1 -1
  13. package/dist/chunks/{section-css-style-Q23EN42Q.js → section-css-style-BECHWIDU.js} +1 -1
  14. package/dist/contract.js +1 -1
  15. package/dist/editor/components/HeaderSettingsPanel.js +1 -1
  16. package/dist/index.js +27 -27
  17. package/dist/render/built-with.json +1 -1
  18. package/dist/routine-index.json +1 -1
  19. package/dist/value-index.json +1 -1
  20. package/dist/words.d.ts +4 -0
  21. package/dist/words.js +3 -3
  22. package/package.json +4 -4
  23. package/dist/chunks/SiteEditorProvider-B7766ULW.js +0 -1
  24. package/dist/chunks/chunk-SEA3MICI.js +0 -7
  25. package/dist/chunks/chunk-WWQ5LOLU.js +0 -337
  26. /package/dist/chunks/{chunk-AUQZLQEO.js → chunk-7UJXVH57.js} +0 -0
  27. /package/dist/chunks/{chunk-NMB6BD73.js → chunk-EZ5QLDA5.js} +0 -0
  28. /package/dist/chunks/{chunk-ESVLXH7T.js.LEGAL.txt → chunk-FNCEZSDY.js.LEGAL.txt} +0 -0
  29. /package/dist/chunks/{chunk-WWQ5LOLU.js.LEGAL.txt → chunk-J6SPMJBT.js.LEGAL.txt} +0 -0
  30. /package/dist/chunks/{chunk-KFZLLS45.js → chunk-UV27QVUD.js} +0 -0
@@ -92,5 +92,5 @@ WHAT A MERCHANT LOSES until the wall is redone: the photo wall and the section h
92
92
 
93
93
  Old sites stay as they are (owner, 2026-11-06); moving a stored page is a separate write that needs the owner's word.
94
94
 
95
- THE TYPE KEY STAYS AND SO DOES THE COMPONENT. A stored Contact / Locations node still renders through it and can still be edited; no document is rewritten.`},PaymentBadges:{label:"Payment Methods",note:"Owner, 2026-10-10: Logos and Payment Methods are one block, and a payment wall is a Logos block with the payment chip for its look. 2026-11-07: the dot before each line is a Mark Box at full strength (approved).\n\nWHAT REPLACES IT: the Logos row (Layouts group), Logo style Cards. Field by field, as its converter row (`section-to-box-rows-logos`) moves it: `heading` is a Text block; each of `badges` is a Logo block in the wall, its name the Logo's name and its `src` the Logo's picture; `dataSource` is the wall's own Logo content row (\"Ways to pay here\" or \"Ways to pay at checkout\", served by the backend to Logos too), and the wall draws ONE Logo card template per served method, the same chip; `assurances` are a Reassurance Box of lines, each a Mark Box (an empty Box, 4 x 4, Corners 2, Fill main) before a Text; `contained` is the Box's site frame. A press of this type lays down that Box (SECTION_TO_BOX_PRESS).\n\nWHAT A MERCHANT LOSES: the 60% and 70% opacity of the old dot and words (a Box and a Text have no opacity: the dot is the main colour, the words the label ink) and the 4px gap between wrapped lines (a Box has one Gap). No field is lost.\n\n4 Payment Methods nodes are stored on the US sites, all on template pages, draft only, all fed by a source; 0 on pages (read only, 2026-11-07). Old sites stay as they are (owner, 2026-11-06); moving a page is a separate write.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. A stored Payment Methods node still renders through it, its dot included, and can still be edited; no document is rewritten."},Gallery:{label:"Tabbed Gallery",note:'Owner, 2026-10-10 (approved): the Tabbed Gallery goes into the Customer Photo Grid, and the one that is left is called Gallery; its vehicle / wheel / others halves become a Tabs list, and its wall becomes one of the photo layouts. Retired from the Add menu with no preset row and no migration.\n\nWHAT REPLACES IT, field by field: the Gallery (`GalleryB`). `mode` both = a Box in Tabs mode with one Gallery per panel; one mode = one Gallery, no Tabs Box. `vehicleTabLabel` / `wheelTabLabel` = the Box\'s panel names, Tab shape "Large tabs" (this strip is the Tabbed Gallery\'s own, class for class); `showTabs` off = the Box Stacked. `source` (one product, or All products and a `category`) = each Gallery\'s `dataSource: "product-pictures"`, with `product`, `designCode`, `mediaZone` (lifestyle = the vehicle half, photos = the wheel half, others) and `category`; it reads live on every view, nothing is baked. `kicker`, the titles, `*Body1` / `*Body2` = Text blocks in the panel\'s Box (Heading N, Body N); `showIntro` off = the Layers eye. `*Stats` = a Stats block; `breadcrumbLabel` = a Breadcrumb block; `showFilters`, `showCount`, `showSort` = a Filter chips block over the Gallery (`showCount`, `showSort`). A card\'s `image`, `photos`, `href`, `name`, `meta`, `process` (the Tag) and `eyebrow` (the caption line over the title) = a Gallery Item\'s, or the served row\'s. The wall (two half, then thirds, 4:3, one across on a phone) = layout "Two, then threes" (`twoThenThreesPhoto`), the default for product pictures. Words at rest, the tile number, the hover zoom and the lightbox\'s "View product" are the Gallery card\'s. `previewTab` = the Box Tabs pane switch; `previewHover` = the Gallery\'s own. `anchor`, `sectionAccent` and `_partStyles` are the same injected keys on the Box and the Gallery.\n\nWHAT A MERCHANT LOSES: the per-tab note under each tab ("N items \xB7 Community photos" / "Featured photos", desktop only): Large tabs draws the letter and the name only. Accepted only because nothing stored moves now. \u26D4 A "Tab note" Box setting MUST exist before the /gallery move: a moved page with no home for it loses a line the shopper sees. Also lost: the empty line ("No items in this gallery yet." / "No items match this filter."); an empty Gallery draws nothing, and the chips come from the tiles, so "no match" cannot happen.\n\nNO CONVERTER ROW: no stored node is rewritten and SECTION_TO_BOX_ON stays without it (owner, 2026-11-06: old sites stay as they are). 2 Tabbed Gallery nodes are stored on the US sites, both top level, draft equal to published (read only, 2026-11-08): `Gallery-f1eb706a` (inovit.com /gallery: mode both, every show flag on, All products, 10 + 10 cards, 20 of 20 with a caption, 3 + 3 stats) and `Gallery-ce49eb98` (hartesmetal.com /gallery: mode vehicles, count and stats on, All products, 49 cards, 0 with a caption, 2 stats).\n\nTHE MOVE RECIPE, for the day the owner orders the /gallery move (a live write, his word): a Box in Tabs mode (inovit) or one Gallery (hartes); each Gallery `dataSource: "product-pictures"`, `mediaZone` lifestyle / photos, and `displayPhone: {tag:true}` (a new Gallery stores `{tag:false}`, and the Tabbed Gallery drew its Tag at every width). The captions: the stored ones are frozen copies that live only in the page; a product-pictures row serves its media group\'s `vehicle` as `eyebrow`, and that is empty on every group today (the editor\'s product binding clears `eyebrow` and reads only `vehicle`). So carry them as typed Gallery Items with the stored `eyebrow` copies, OR fill each media group\'s `vehicle` first (a data write). It needs efficient-storefront-blocks 0.91.0 (the photo layout default and the stored cards kept on open) and the backend\'s product-pictures source (106.0.0).\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT (efficient-storefront-blocks GalleryShowcase). A stored Tabbed Gallery still renders through it and can still be edited, its source row, cover, width, heading level and settings groups included; in Layers it keeps its block\'s own label, "Tabbed Gallery". Delete the component only when the last stored `Gallery` node is gone.'}},Lr=Object.fromEntries(Object.entries(ma).map(([e,t])=>[e,t.note])),Kp=["Grid","Spacer","TyreFitment"],$p=Array.from(new Set([...te.flatMap(e=>e.sections.map(t=>t.type)),...Object.keys(Lr)])),Cr=Object.fromEntries(Object.entries(ma).map(([e,t])=>[e,t.label])),Vp={...Cr,...Object.fromEntries(te.flatMap(e=>e.sections.map(t=>[t.type,t.label])))},Ir={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",LocationMap:"general",Contents:"general",ListSearch:"general",ButtonBlock:"general",CardList:"general",HostPart:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",KeyFeatures:"general",Spacer:"general",Series:"general",DocMetaCards:"general",StatsParagraph:"general",Testimonials:"general",Masthead:"general",CategoryBar:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",DeliveryOptions:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",AccountBlock:"commerce",ThemeSwitchBlock:"commerce",ProductGallery:"commerce",EuTyreLabelBlock:"commerce",WheelDiagram:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",RatingBlock:"service",Footer:"service",FooterLogo:"service",FooterMenu:"service",FooterDivider:"service",FooterGroup:"service",FooterText:"service",FooterEmailSignup:"service",FooterSocial:"service",FooterPayment:"service",MenuBlock:"service",MenuLinkBlock:"service",ProductPrice:"commerce",ProductSize:"commerce",ProductColour:"commerce",ProductPicture:"commerce",ProductEyebrow:"commerce",ProductName:"commerce",ProductSpecs:"commerce",ProductBuy:"commerce",ProductBuyButton:"commerce",FitmentPicker:"commerce",StockFitment:"commerce",RelatedProducts:"commerce",BundleOffer:"commerce",TyreFitment:"commerce",EuTyreLabel:"commerce",PaymentBadges:"general",ContactLocations:"general",HeroSingle:"general",Gallery:"commerce",EmailFormBlock:"service",SocialLogosBlock:"service",PaymentLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},St={...Ir,...Object.fromEntries(te.flatMap(e=>e.sections.map(t=>[t.type,t.set])))};function jp(e){return fe(St,e)}function _t(e){return Object.keys(St).filter(t=>fe(St,t)===e).sort()}var Xp=_t("general"),zp=_t("commerce"),qp=_t("service"),Pr="Flex",Le="Box",Qp=`${Le}es`;function Nr(e){return e==="section"?"Blank section":Le}function Zp(e,t,o){return e===Pr?Nr(t):o}var F=["highlight","strong","quiet"],G={highlight:"Highlight",strong:"Bold",quiet:"Quiet"},L={highlight:{kind:"wordHighlight",delimiter:"@@"},strong:{kind:"wordStrong",delimiter:"++"},quiet:{kind:"wordQuiet",delimiter:"^^"}},tm=Object.fromEntries(F.map(e=>[L[e].kind,e])),om="data-sf-ws",Hr=["accent","text","labels"],Dr={accent:"var(--accent)",text:"var(--fg)",labels:"var(--fg-dim)"},Br=80,Mr=120,Fr=100,Gr=900,Wr=.5,Ur=3,Yr=-.1,Kr=.5,$r=3,Ot={font:null,size:null,weight:null,bold:null,italic:null,lineGap:null,textGap:null,colour:null},Vr={highlight:{...Ot},strong:{...Ot},quiet:{...Ot}};function fa(e,t,o){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),o))}function wa(e,t,o){if(typeof e!="number"||!Number.isFinite(e))return null;let a=10**$r;return Math.round(Math.min(Math.max(e,t),o)*a)/a}function ga(e){return typeof e=="boolean"?e:null}function jr(e){let t=typeof e?.font=="string"&&pe.some(a=>a.key===e.font)?e.font:null,o=typeof e?.colour=="string"&&Hr.includes(e.colour)?e.colour:null;return{font:t,size:fa(e?.size,Br,Mr),weight:fa(e?.weight,Fr,Gr),bold:ga(e?.bold),italic:ga(e?.italic),lineGap:wa(e?.lineGap,Wr,Ur),textGap:wa(e?.textGap,Yr,Kr),colour:o}}function ba(e){let t={};for(let o of F)t[o]=e&&o in e&&e[o]?jr(e[o]):{...Vr[o]};return t}function am(e){let t=ba(e),o={};for(let a of F){let s=t[a],n=`--sf-ws-${a}`;if(s.font){let i=pe.find(r=>r.key===s.font);i&&(o[`${n}-font`]=`var(${i.cssVar})`)}s.size!==null&&(o[`${n}-size`]=`${s.size/100}em`),s.weight!==null&&(o[`${n}-weight`]=String(s.weight)),s.bold!==null&&(o[`${n}-weight-bold`]=s.bold?"700":"400"),s.italic!==null&&(o[`${n}-style`]=s.italic?"italic":"normal"),s.lineGap!==null&&(o[`${n}-line`]=String(s.lineGap)),s.textGap!==null&&(o[`${n}-track`]=`${s.textGap}em`),s.colour!==null&&(o[`${n}-color`]=Dr[s.colour])}return o}function sm(e){let t=e?.word_styles??void 0,o={};for(let a of F)t&&a in t&&(o[a]=t[a]??null);return ba(o)}import{applyMark as rm,markupTools as lm,MARKUP_TOOLS as cm,COPY_FIELD_TOOLS as dm,STOREFRONT_MARKUP as hm,tokenizeInline as um,stripInline as pm,isSafeLinkHref as mm}from"efficient-shell/markup";import{applyMark as Xr,clearStyle as zr,markedAt as qr,markupTools as Qr,MARKUP_TOOLS as Zr,parseMarkup as Jr,RETIRED_MARKS as el,STOREFRONT_MARKUP as tl,tokenizeInline as wm}from"efficient-shell/markup";var ol=new Set(["strong"]),ya=F.map(e=>({open:L[e].delimiter,close:L[e].delimiter,kind:L[e].kind,...ol.has(e)?{wordStart:!0}:{}})),bm=[{style:L.highlight.kind,label:G.highlight,title:`${G.highlight} word style`},{style:L.strong.kind,label:G.strong,title:`${G.strong} word style`},{style:L.quiet.kind,label:G.quiet,title:`${G.quiet} word style`}],al=new Set(ya.map(e=>e.open)),vt=[...tl.filter(e=>!al.has(e.open)),...ya];function sl(e){return e.bullet?"- ":e.number!=null?`${e.number}. `:""}function Ta(e){return Jr(typeof e=="string"?e:"",vt)}var nl=Zr.map(e=>e.style).filter(e=>!el.includes(e)).filter(e=>vt.some(t=>t.kind===e));function ym(){return Qr(nl)}var Ea=Object.fromEntries(F.map(e=>[L[e].kind,L[e].delimiter]));function Tm(e,t,o,a){let s=Ea[a];if(!s)return Xr(e,t,o,a);let n=e.slice(t,o),i=e.slice(Math.max(0,t-s.length),t),r=e.slice(o,o+s.length);if(i===s&&r===s)return{text:e.slice(0,t-s.length)+n+e.slice(o+s.length),selectionStart:t-s.length,selectionEnd:t-s.length+n.length};let c=n||"styled text";return{text:e.slice(0,t)+s+c+s+e.slice(o),selectionStart:t+s.length,selectionEnd:t+s.length+c.length}}function Em(e,t,o,a){let s=Ea[a];return s?t>=s.length&&e.slice(t-s.length,t)===s&&e.slice(o,o+s.length)===s:qr(e,t,o,a)}function Sa(e){return e.replace(/==(.+?)==/g,(t,o)=>o.startsWith("_")&&o.endsWith("_")?t:`==_${o}_==`)}function Sm(e){return Ta(e).map(t=>sl(t)+_a(t.children)).join(`
95
+ THE TYPE KEY STAYS AND SO DOES THE COMPONENT. A stored Contact / Locations node still renders through it and can still be edited; no document is rewritten.`},PaymentBadges:{label:"Payment Methods",note:"Owner, 2026-10-10: Logos and Payment Methods are one block, and a payment wall is a Logos block with the payment chip for its look. 2026-11-07: the dot before each line is a Mark Box at full strength (approved).\n\nWHAT REPLACES IT: the Logos row (Layouts group), Logo style Cards. Field by field, as its converter row (`section-to-box-rows-logos`) moves it: `heading` is a Text block; each of `badges` is a Logo block in the wall, its name the Logo's name and its `src` the Logo's picture; `dataSource` is the wall's own Logo content row (\"Ways to pay here\" or \"Ways to pay at checkout\", served by the backend to Logos too), and the wall draws ONE Logo card template per served method, the same chip; `assurances` are a Reassurance Box of lines, each a Mark Box (an empty Box, 4 x 4, Corners 2, Fill main) before a Text; `contained` is the Box's site frame. A press of this type lays down that Box (SECTION_TO_BOX_PRESS).\n\nWHAT A MERCHANT LOSES: the 60% and 70% opacity of the old dot and words (a Box and a Text have no opacity: the dot is the main colour, the words the label ink) and the 4px gap between wrapped lines (a Box has one Gap). No field is lost.\n\n4 Payment Methods nodes are stored on the US sites, all on template pages, draft only, all fed by a source; 0 on pages (read only, 2026-11-07). Old sites stay as they are (owner, 2026-11-06); moving a page is a separate write.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. A stored Payment Methods node still renders through it, its dot included, and can still be edited; no document is rewritten."},Gallery:{label:"Tabbed Gallery",note:'Owner, 2026-10-10 (approved): the Tabbed Gallery goes into the Customer Photo Grid, and the one that is left is called Gallery; its vehicle / wheel / others halves become a Tabs list, and its wall becomes one of the photo layouts. Retired from the Add menu with no preset row and no migration.\n\nWHAT REPLACES IT, field by field: the Gallery (`GalleryB`). `mode` both = a Box in Tabs mode with one Gallery per panel; one mode = one Gallery, no Tabs Box. `vehicleTabLabel` / `wheelTabLabel` = the Box\'s panel names, Tab shape "Large tabs" (this strip is the Tabbed Gallery\'s own, class for class); `showTabs` off = the Box Stacked. `source` (one product, or All products and a `category`) = each Gallery\'s `dataSource: "product-pictures"`, with `product`, `designCode`, `mediaZone` (lifestyle = the vehicle half, photos = the wheel half, others) and `category`; it reads live on every view, nothing is baked. `kicker`, the titles, `*Body1` / `*Body2` = Text blocks in the panel\'s Box (Heading N, Body N); `showIntro` off = the Layers eye. `*Stats` = a Stats block; `breadcrumbLabel` = a Breadcrumb block; `showFilters`, `showCount`, `showSort` = a Filter chips block over the Gallery (`showCount`, `showSort`). A card\'s `image`, `photos`, `href`, `name`, `meta`, `process` (the Tag) and `eyebrow` (the caption line over the title) = a Gallery Item\'s, or the served row\'s. The wall (two half, then thirds, 4:3, one across on a phone) = layout "Two, then threes" (`twoThenThreesPhoto`), the default for product pictures. Words at rest, the tile number, the hover zoom and the lightbox\'s "View product" are the Gallery card\'s. `previewTab` = the Box Tabs pane switch; `previewHover` = the Gallery\'s own. `anchor`, `sectionAccent` and `_partStyles` are the same injected keys on the Box and the Gallery.\n\nWHAT A MERCHANT LOSES: the per-tab note under each tab ("N items \xB7 Community photos" / "Featured photos", desktop only): Large tabs draws the letter and the name only. Accepted only because nothing stored moves now. \u26D4 A "Tab note" Box setting MUST exist before the /gallery move: a moved page with no home for it loses a line the shopper sees. Also lost: the empty line ("No items in this gallery yet." / "No items match this filter."); an empty Gallery draws nothing, and the chips come from the tiles, so "no match" cannot happen.\n\nNO CONVERTER ROW: no stored node is rewritten and SECTION_TO_BOX_ON stays without it (owner, 2026-11-06: old sites stay as they are). 2 Tabbed Gallery nodes are stored on the US sites, both top level, draft equal to published (read only, 2026-11-08): `Gallery-f1eb706a` (inovit.com /gallery: mode both, every show flag on, All products, 10 + 10 cards, 20 of 20 with a caption, 3 + 3 stats) and `Gallery-ce49eb98` (hartesmetal.com /gallery: mode vehicles, count and stats on, All products, 49 cards, 0 with a caption, 2 stats).\n\nTHE MOVE RECIPE, for the day the owner orders the /gallery move (a live write, his word): a Box in Tabs mode (inovit) or one Gallery (hartes); each Gallery `dataSource: "product-pictures"`, `mediaZone` lifestyle / photos, and `displayPhone: {tag:true}` (a new Gallery stores `{tag:false}`, and the Tabbed Gallery drew its Tag at every width). The captions: the stored ones are frozen copies that live only in the page; a product-pictures row serves its media group\'s `vehicle` as `eyebrow`, and that is empty on every group today (the editor\'s product binding clears `eyebrow` and reads only `vehicle`). So carry them as typed Gallery Items with the stored `eyebrow` copies, OR fill each media group\'s `vehicle` first (a data write). It needs efficient-storefront-blocks 0.91.0 (the photo layout default and the stored cards kept on open) and the backend\'s product-pictures source (106.0.0).\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT (efficient-storefront-blocks GalleryShowcase). A stored Tabbed Gallery still renders through it and can still be edited, its source row, cover, width, heading level and settings groups included; in Layers it keeps its block\'s own label, "Tabbed Gallery". Delete the component only when the last stored `Gallery` node is gone.'}},Lr=Object.fromEntries(Object.entries(ma).map(([e,t])=>[e,t.note])),Kp=["Grid","Spacer","TyreFitment"],$p=Array.from(new Set([...te.flatMap(e=>e.sections.map(t=>t.type)),...Object.keys(Lr)])),Cr=Object.fromEntries(Object.entries(ma).map(([e,t])=>[e,t.label])),Vp={...Cr,...Object.fromEntries(te.flatMap(e=>e.sections.map(t=>[t.type,t.label])))},Ir={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",LocationMap:"general",Contents:"general",ListSearch:"general",ButtonBlock:"general",CardList:"general",HostPart:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",KeyFeatures:"general",Spacer:"general",Series:"general",DocMetaCards:"general",StatsParagraph:"general",Testimonials:"general",Masthead:"general",CategoryBar:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",DeliveryOptions:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",AccountBlock:"commerce",ThemeSwitchBlock:"commerce",ProductGallery:"commerce",EuTyreLabelBlock:"commerce",WheelDiagram:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",RatingBlock:"service",Footer:"service",FooterLogo:"service",FooterMenu:"service",FooterDivider:"service",FooterGroup:"service",FooterText:"service",FooterEmailSignup:"service",FooterSocial:"service",FooterPayment:"service",MenuBlock:"service",MenuLinkBlock:"service",ProductPrice:"commerce",ProductSize:"commerce",ProductColour:"commerce",ProductPicture:"commerce",ProductEyebrow:"commerce",ProductName:"commerce",ProductSpecs:"commerce",ProductBuy:"commerce",ProductBuyButton:"commerce",ProductSku:"commerce",FitmentPicker:"commerce",StockFitment:"commerce",RelatedProducts:"commerce",BundleOffer:"commerce",TyreFitment:"commerce",EuTyreLabel:"commerce",PaymentBadges:"general",ContactLocations:"general",HeroSingle:"general",Gallery:"commerce",EmailFormBlock:"service",SocialLogosBlock:"service",PaymentLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},St={...Ir,...Object.fromEntries(te.flatMap(e=>e.sections.map(t=>[t.type,t.set])))};function jp(e){return fe(St,e)}function _t(e){return Object.keys(St).filter(t=>fe(St,t)===e).sort()}var Xp=_t("general"),zp=_t("commerce"),qp=_t("service"),Pr="Flex",Le="Box",Qp=`${Le}es`;function Nr(e){return e==="section"?"Blank section":Le}function Zp(e,t,o){return e===Pr?Nr(t):o}var F=["highlight","strong","quiet"],G={highlight:"Highlight",strong:"Bold",quiet:"Quiet"},L={highlight:{kind:"wordHighlight",delimiter:"@@"},strong:{kind:"wordStrong",delimiter:"++"},quiet:{kind:"wordQuiet",delimiter:"^^"}},tm=Object.fromEntries(F.map(e=>[L[e].kind,e])),om="data-sf-ws",Hr=["accent","text","labels"],Dr={accent:"var(--accent)",text:"var(--fg)",labels:"var(--fg-dim)"},Br=80,Mr=120,Fr=100,Gr=900,Wr=.5,Ur=3,Yr=-.1,Kr=.5,$r=3,Ot={font:null,size:null,weight:null,bold:null,italic:null,lineGap:null,textGap:null,colour:null},Vr={highlight:{...Ot},strong:{...Ot},quiet:{...Ot}};function fa(e,t,o){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),o))}function wa(e,t,o){if(typeof e!="number"||!Number.isFinite(e))return null;let a=10**$r;return Math.round(Math.min(Math.max(e,t),o)*a)/a}function ga(e){return typeof e=="boolean"?e:null}function jr(e){let t=typeof e?.font=="string"&&pe.some(a=>a.key===e.font)?e.font:null,o=typeof e?.colour=="string"&&Hr.includes(e.colour)?e.colour:null;return{font:t,size:fa(e?.size,Br,Mr),weight:fa(e?.weight,Fr,Gr),bold:ga(e?.bold),italic:ga(e?.italic),lineGap:wa(e?.lineGap,Wr,Ur),textGap:wa(e?.textGap,Yr,Kr),colour:o}}function ba(e){let t={};for(let o of F)t[o]=e&&o in e&&e[o]?jr(e[o]):{...Vr[o]};return t}function am(e){let t=ba(e),o={};for(let a of F){let s=t[a],n=`--sf-ws-${a}`;if(s.font){let i=pe.find(r=>r.key===s.font);i&&(o[`${n}-font`]=`var(${i.cssVar})`)}s.size!==null&&(o[`${n}-size`]=`${s.size/100}em`),s.weight!==null&&(o[`${n}-weight`]=String(s.weight)),s.bold!==null&&(o[`${n}-weight-bold`]=s.bold?"700":"400"),s.italic!==null&&(o[`${n}-style`]=s.italic?"italic":"normal"),s.lineGap!==null&&(o[`${n}-line`]=String(s.lineGap)),s.textGap!==null&&(o[`${n}-track`]=`${s.textGap}em`),s.colour!==null&&(o[`${n}-color`]=Dr[s.colour])}return o}function sm(e){let t=e?.word_styles??void 0,o={};for(let a of F)t&&a in t&&(o[a]=t[a]??null);return ba(o)}import{applyMark as rm,markupTools as lm,MARKUP_TOOLS as cm,COPY_FIELD_TOOLS as dm,STOREFRONT_MARKUP as hm,tokenizeInline as um,stripInline as pm,isSafeLinkHref as mm}from"efficient-shell/markup";import{applyMark as Xr,clearStyle as zr,markedAt as qr,markupTools as Qr,MARKUP_TOOLS as Zr,parseMarkup as Jr,RETIRED_MARKS as el,STOREFRONT_MARKUP as tl,tokenizeInline as wm}from"efficient-shell/markup";var ol=new Set(["strong"]),ya=F.map(e=>({open:L[e].delimiter,close:L[e].delimiter,kind:L[e].kind,...ol.has(e)?{wordStart:!0}:{}})),bm=[{style:L.highlight.kind,label:G.highlight,title:`${G.highlight} word style`},{style:L.strong.kind,label:G.strong,title:`${G.strong} word style`},{style:L.quiet.kind,label:G.quiet,title:`${G.quiet} word style`}],al=new Set(ya.map(e=>e.open)),vt=[...tl.filter(e=>!al.has(e.open)),...ya];function sl(e){return e.bullet?"- ":e.number!=null?`${e.number}. `:""}function Ta(e){return Jr(typeof e=="string"?e:"",vt)}var nl=Zr.map(e=>e.style).filter(e=>!el.includes(e)).filter(e=>vt.some(t=>t.kind===e));function ym(){return Qr(nl)}var Ea=Object.fromEntries(F.map(e=>[L[e].kind,L[e].delimiter]));function Tm(e,t,o,a){let s=Ea[a];if(!s)return Xr(e,t,o,a);let n=e.slice(t,o),i=e.slice(Math.max(0,t-s.length),t),r=e.slice(o,o+s.length);if(i===s&&r===s)return{text:e.slice(0,t-s.length)+n+e.slice(o+s.length),selectionStart:t-s.length,selectionEnd:t-s.length+n.length};let c=n||"styled text";return{text:e.slice(0,t)+s+c+s+e.slice(o),selectionStart:t+s.length,selectionEnd:t+s.length+c.length}}function Em(e,t,o,a){let s=Ea[a];return s?t>=s.length&&e.slice(t-s.length,t)===s&&e.slice(o,o+s.length)===s:qr(e,t,o,a)}function Sa(e){return e.replace(/==(.+?)==/g,(t,o)=>o.startsWith("_")&&o.endsWith("_")?t:`==_${o}_==`)}function Sm(e){return Ta(e).map(t=>sl(t)+_a(t.children)).join(`
96
96
  `)}function _m(e,t,o){return zr(e,t,o,vt)}function _a(e){return e.map(t=>t.kind==="text"?t.text:_a(t.children)).join("")}function Om(e){let t=o=>o.some(a=>a.kind==="link"||"children"in a&&t(a.children));return Ta(e).some(o=>t(o.children))}import{AUTO_RULES as il,FOLLOW_RULES as rl,isAuto as ll,resolveViewValue as cl}from"efficient-easel/screen/lib/content/view-tiers";function dl(){return Go==="v2"?il:rl}function Ce(e,t,o,a,s=dl()){let n=cl(e,t,o,a,s),i={},r=(c,h)=>!ll(c)||h!=null&&h!==t;return r(o,n.tablet)&&(i.tablet=n.tablet),r(a,n.phone)&&(i.phone=n.phone),i}var Oa=-1,hl="sf-section-accent",Lm="Color",Cm=new Set(["CategoryBar","DocTabs"]),Im=new Set(["Flex"]),ul=0;function pl(e){return e===Oa?null:typeof e=="number"&&Number.isInteger(e)&&e>=0?e:ul}function Pm(e){return e??Oa}function ml(e){let t=`--theme-preset-${e}`,o={"--sf-sec-accent":`var(${t}-accent)`,"--sf-sec-accent-2":`var(${t}-accent-2)`,"--sf-sec-accent-ink":`var(${t}-accent-ink)`};for(let{role:a}of yt)o[`--sf-sec-${a}`]=`var(${t}-${a}, var(--theme-${a}))`;return o}function Nm(e){let t=pl(e.sectionAccent);return t===null?null:{className:hl,style:ml(t)}}import{isNodeList as fl}from"efficient-easel/data";import{parseOption as wl}from"efficient-shell/format";var Ie=["top-left","top-center","top-right","left","center","right","bottom-left","bottom-center","bottom-right"],xa="bottom-left",W=4,gl=W+1,va=40,bl=30,yl=100,Tl=60,Mm=100;var xt={"top-left":"Top left","top-center":"Top center","top-right":"Top right",left:"Left",center:"Center",right:"Right","bottom-left":"Bottom left","bottom-center":"Bottom center","bottom-right":"Bottom right"};function El(e){let t=Ie.indexOf(oe(e));return{band:Math.floor(t/3),column:["start","center","end"][t%3]}}function Sl(e){return 1+El(e).band*(gl+1)}function Fm(e){return Sl(e)+1}function oe(e){return wl(Ie,xa,e)}function Gm(e){let t=typeof e=="number"&&Number.isFinite(e)?e:0;return Math.max(-va,Math.min(va,Math.round(t)))}function Wm(e,t=Tl){let o=typeof e=="number"&&Number.isFinite(e)?e:t;return Math.max(bl,Math.min(yl,Math.round(o)))}function kt(e,t){let o=oe(t);return e.filter(a=>oe(a?.props?.placement)===o).length}function ka(e){return`${xt[oe(e)]} already holds ${W} boxes. Move one somewhere else first.`}function Um(e,t){let o=e.filter(a=>a?.props?.id!==t);return Ie.map(a=>{let s=kt(o,a)>=W,n=xt[a];return s?{value:a,label:n,disabled:!0,title:ka(a)}:{value:a,label:n}})}function _l(e,t){let o=t===void 0?xa:oe(t?.props?.placement);return kt(e,o)>=W?ka(o):null}var Aa="HeroGroup";function Ym(e){let t=new Map,o=!1,a=e.filter(s=>{let n=oe(s?.props?.placement),i=(t.get(n)??0)+1;return t.set(n,i),i<=W?!0:(o=!0,!1)});return o?a:e}function Ol(e){return Ie.map(t=>{let o=kt(e,t);return{anchor:t,total:o,hidden:o-W}}).filter(t=>t.hidden>0)}function Km(e){let t=Ol(e);return t.length===0?null:t.map(({anchor:o,total:a,hidden:s})=>{let n=xt[o],i=s===1?"1 is not shown":`${s} are not shown`;return`${n} holds ${a} boxes. The published page draws the first ${W}, so ${i}. ${s===1?"Move it":"Move them"} somewhere else.`}).join(" ")}function $m(e,t){let o=t;if(o?.type!==Aa)return null;let a=o.props?.id===void 0?"":String(o.props.id);return a?_l(vl(e,a),o):null}function vl(e,t){let o=Ra(e,t);return o&&o.ownerType===kl?o.siblings:[]}function Vm(e,t){let o=Ra(e,t);return o?o.ancestorTypes.filter(a=>a===Aa).length:xl}var xl=1,kl="HeroSlide";function Ra(e,t){let o=(a,s,n)=>{if(s>12||!a||typeof a!="object")return null;if(fl(a)){if(a.some(i=>i?.props?.id===t))return{siblings:a,ownerType:n.at(-1)??null,ancestorTypes:n};for(let i of a){let r=i.type,c=o(i,s+1,[...n,String(r)]);if(c)return c}return null}for(let i of Object.values(a)){let r=o(i,s+1,n);if(r)return r}return null};return o(e,0,[])}var At={desktop:"desktop",tablet:"tablet",phone:"mobile"},Al=Object.keys(At);function La(e){return At[e??"desktop"]}function Xm(e){return Al.find(t=>At[t]===e)??"desktop"}import{FOLLOW_RULES as Rl,resolveViewValue as Ll,viewKeyAt as Cl}from"efficient-easel/screen/lib/content/view-tiers";var Il=["desktop","tablet","phone"],Lt=(e,t)=>Cl(e,La(t)),Zm=e=>e.flatMap(t=>Il.map(o=>Lt(t,o))),Rt=e=>e===null||e===""?void 0:e,Pl=(e,t,o)=>Ll("same",Rt(e),Rt(t),Rt(o),Rl);function Jm(e,t,o,a=e[t]){return Pl(a,e[Lt(t,"tablet")],e[Lt(t,"phone")])[o]}var Nl="Website";function tf(e){return e?.trim()||Nl}function ae(e,t){let o=globalThis,a=Symbol.for(e),s=o[a];return s===void 0&&(s=t(),o[a]=s),s}function we(){return ae("efficient.slot-field-blocks",()=>new Set)}var Hl="dataSource",df="dataSourceOptions",Dl="dataRows",hf="countKey",uf="counts",pf="location-payment-methods",mf="shop-payment-methods",ff="delivery-options",wf="blog-categories",Ct="dealers",Bl="site-offices";function Ml(e){return typeof e.open=="function"}var Pa=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;function gf(e){return typeof e=="string"&&Pa.test(e)}var Ca=new Set([Ct,Bl]);function ge(){return ae("efficient.block-sources",()=>({sources:new Map,revision:0}))}var Fl=e=>[e?.key,e?.label,e?.value].every(t=>typeof t=="string"&&t.trim()!==""),Gl=e=>[e?.key,e?.label].every(t=>typeof t=="string"&&t.trim()!==""),Ia=e=>typeof e=="string"&&e.trim()!=="";function Wl(e){if(!e||!Ia(e.label))return null;if(Ml(e))return{label:e.label.trim(),open:e.open};let t=e.href;return Ia(t)?{label:e.label.trim(),href:t.trim()}:null}function Ul(e){if(typeof e.key!="string"||!Pa.test(e.key))throw new Error(`A block source key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(typeof e.label!="string"||!e.label.trim())throw new Error(`The block source ${e.key} has no label.`);if(!Array.isArray(e.blocks)||!e.blocks.length||e.blocks.some(a=>typeof a!="string"||!a))throw new Error(`The block source ${e.key} names no block it can fill.`);let t=e.blocks.find(a=>we().has(a));if(t)throw new Error(`The block source ${e.key} names ${t}, whose card template declares slot fields: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);let o=Wl(e.edit);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(a=>Ha(a)).filter(a=>a!==null)}:{},...Array.isArray(e.choices)?{choices:e.choices.filter(Fl)}:{},...Array.isArray(e.fields)?{fields:e.fields.filter(Gl).map(a=>({...a}))}:{},...o?{edit:o}:{},...typeof e.useRows=="function"?{useRows:e.useRows}:{},...Array.isArray(e.records)?{records:e.records.filter(a=>typeof a=="string"&&a.trim()!=="").map(a=>a.trim())}:{}}}function bf(e){let t=e.map(Ul),o=ge();for(let a of t)o.sources.set(a.key,a);t.length&&(o.revision+=1)}function Na(e){let t=[...ge().sources.values()],o=[...t.filter(a=>!Ca.has(a.key)),...t.filter(a=>Ca.has(a.key))];return e===void 0?o:o.filter(a=>a.blocks.includes(e))}function Pe(e){return ge().sources.get(e)??null}function yf(e){return ge().sources.get(e)?.choices??[]}function Tf(){return ge().revision}function v(e){let t=e?.[Hl];return typeof t=="string"?t.trim():""}function Ha(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t={};for(let[o,a]of Object.entries(e)){let s=I(a);s&&(t[o]=s)}return Object.keys(t).length?t:null}function Yl(e){let t=e?.[Dl];return Array.isArray(t)?t.map(Ha).filter(o=>o!==null):null}function Ef(e,t,o=[]){let a=Yl(e);if(a!==null&&(a.length||!t))return{rows:a,sample:!1};if(!t)return{rows:[],sample:!1};let s=Pe(v(e))?.sample;return{rows:s?.length?s:o,sample:!0}}var w="rowField",x="rowLinkField",d="template",A="CardList",be="hideWhenRowEmpty",It=["Text","ImageBlock","ButtonBlock","Flex"];function U(){return{type:"slot",allow:[...It]}}var Da=It.filter(e=>e!=="ButtonBlock");function Pt(){return{type:"slot",allow:[...Da]}}var Kl="boxes",Ba={CardList:{template:Pt()},Cards:{template:U()},FAQ:{template:U()},Flex:{rowTitle:{type:"slot",allow:["Text"]},content:{type:"slot"}},Footprint:{template:U()},Grid:{content:{type:"slot"}},Hero:{slides:{type:"slot",ownPictures:!0},strip:{type:"slot",allow:["Flex"]}},HeroGroup:{content:{type:"slot"}},HeroSingle:{boxes:{type:"slot",allow:["HeroGroup"]}},HeroSlide:{groups:{type:"slot",allow:["HeroGroup"]}},Logos:{logos:{type:"slot",allow:["LogoBlock"]},template:{type:"slot",allow:["LogoBlock"]}},OrderSummary:{template:U()},ProcessSteps:{[Kl]:{type:"slot"},template:U()}};import{isNodeList as Ma,slotsOf as $l,storedKeyOrder as Vl}from"efficient-easel/data";var jl={},Xl=null;function zl(){let e=Object.fromEntries(Object.entries(Ba).map(([t,o])=>[t,{fields:o}]));return Xl??={components:{...e,...jl}}}function se(e){let t=e.props??{},o=typeof e.type=="string"?e.type:"",a=zl(),s=o!==""&&Object.prototype.hasOwnProperty.call(a.components,o)?$l({type:o,props:t},a).map(r=>r.slot).filter(r=>!r.includes(".")):[],n=s.filter(r=>Ma(t[r])),i=Vl(Object.keys(t).filter(r=>!s.includes(r)&&Ma(t[r])));return[...n,...i]}function Af(e){let t=e.props??{};return se(e).map(o=>t[o])}function Rf(e,t){let o=null;return e.forEach((a,s)=>{let n=t(a,s);n!==a&&((o??=e.slice())[s]=n)}),o??e}function Lf(e,t){let o=null;for(let a of se(e)){let s=e.props[a],n=t(s,a);n!==s&&((o??={...e.props})[a]=n)}return o?{...e,props:o}:e}function ql(e,t){let o=e;if(!o||!Array.isArray(o.content))return e;let a=t(o.content);return a===o.content?e:{...o,content:a}}function Cf(e,t){let o=ql(e,t),a=e?.zones;if(!a||typeof a!="object")return o;let s=null;for(let[n,i]of Object.entries(a)){if(!Array.isArray(i))continue;let r=t(i);r!==i&&((s??={...a})[n]=r)}return s?{...o,zones:s}:o}var p="content",f="Flex",Ql="Text & media",Zl="Layout & structure",Ga=[{type:"Eyebrow",label:"Eyebrow",retired:!0},{type:"Heading",label:"Heading",retired:!0},{type:"Text",label:"Text"},{type:"ImageBlock",label:"Image"},{type:"LogoBlock",label:"Logo"},{type:"LocationMap",label:"Map"},{type:"ButtonBlock",label:"Button"},{type:"Contents",label:"Contents"}],Jl=[...Ga,{type:"ListSearch",label:"List search"},{type:"Form",label:"Form"},{type:"PostCard",label:"Post Card"},{type:"Stats",label:"Stats",retired:!0},{type:"MenuBlock",label:"Menu"},{type:"EmailFormBlock",label:"Email Form"},{type:"SocialLogosBlock",label:"Social Logos"},{type:"PaymentLogosBlock",label:"Payment Logos",retired:!0},{type:"LegalLineBlock",label:"Legal Line"},{type:"SearchBlock",label:"Search"},{type:"CartBlock",label:"Cart"},{type:"CountrySwitchBlock",label:"Country Switch"},{type:"AccountBlock",label:"Account"},{type:"ThemeSwitchBlock",label:"Theme Switch"}].map(e=>({...e,group:Ql})),ec=(te.find(e=>e.key==="structure")?.sections??[]).map(e=>({type:e.type,label:e.label,group:Zl})),Fa=[...Jl,...ec],Nt=[...Ga,{type:"HeroGroup",label:Le}],Hf=Nt.map(e=>e.type),tc=1,oc=Nt.filter(e=>e.type!=="HeroGroup");function ac(e){return e<tc?Nt:oc}var sc={Flex:{slot:p,choices:()=>Fa},Grid:{slot:p,choices:()=>Fa},HeroGroup:{slot:p,choices:ac}};function Df(e,t=0){let o=fe(sc,e);return o?{slot:o.slot,choices:o.choices(t)}:null}import{MEDIA_ZONES as nc,MEDIA_ZONE_LABELS as ic}from"efficient-easel/screen/lib/content/media-zones";import{HOVER_MOTION as rc,hoverKindsOf as He,motionSeconds as Ne,parseOption as ye}from"efficient-shell/format";var ne={min:0,max:360,step:1},Wa="angle";function Ff(e){let t=C(e);if(t===void 0)return null;let o=Math.min(ne.max,Math.max(ne.min,t));return o===ne.min||o===ne.max?null:{rotate:`${o}deg`}}var R="hover",$f="_gHover",lc={none:"None",nextImage:"Show next image",rotate:"Rotate",zoom:"Zoom",lift:"Lift",mono:"Black and white"},Y="highlight",cc="Highlight",Vf=["none",Y],jf={none:lc.none,[Y]:cc};function dc(e){return e[R]===Y?Y:"none"}var Xf="transition-colors hover:bg-[var(--sf-hl-bg)]! hover:[--fg:var(--sf-hl-ink)] active:bg-[var(--sf-hl-bg)]! active:[--fg:var(--sf-hl-ink)]",zf="hover:[--fg:var(--sf-hl-ink)]! hover:[--fg-dim:inherit]! hover:[--site-line:inherit]! hover:[color:inherit]! active:[--fg:var(--sf-hl-ink)]! active:[--fg-dim:inherit]! active:[--site-line:inherit]! active:[color:inherit]!";function qf(e,t){return dc(e)!==Y?null:{"--sf-hl-bg":t("surface"),"--sf-hl-ink":t("main")}}var hc=He(["none","lift"]);function Qf(e){let t=e[R];return ye(hc,"none",t)}var Ka=He(["none","nextImage","rotate"]),k={kind:R,angle:"hoverAngle",duration:"hoverDuration",delay:"hoverDelay",mediaKind:"hoverKind",mediaGroup:"hoverGroup",cover:"hoverCover"},Bt="spinOnHover",Ua=ne,$a={ProductGrid:"rotate",RelatedProducts:"rotate",AlloyWheelsListing:"none"},Zf=Object.keys($a);function uc(e){return $a[e]??"none"}var pc=rc.rotateFallbackDeg,mc=e=>e==="rendering"?"renderings":e,fc=e=>e==="renderings"?"rendering":e,Va=Object.freeze(nc.filter(e=>e!=="videos").map(mc)),Jf=Object.freeze(Object.fromEntries(Va.map(e=>[e,ic[fc(e)]]))),wc=["finish","first"],ew={finish:"Same finish",first:"First group"},gc=["card","picture"],tw={card:"Whole card",picture:"Picture"},Ht={kind:"photos",group:"finish",cover:"card"};function ja(e){return{kind:ye(Va,Ht.kind,e[k.mediaKind]),group:ye(wc,Ht.group,e[k.mediaGroup]),cover:ye(gc,Ht.cover,e[k.cover])}}function ow(){return{field:k.kind,is:"nextImage"}}function bc(e,t){let o=e[k.kind];if(Ka.includes(o))return o;let a=e[Bt];return typeof a=="boolean"?a?"rotate":"none":t}function yc(e){let t=C(e);return t===void 0?pc:Math.min(Ua.max,Math.max(Ua.min,t))}function aw(e,t){let o=uc(t),a=bc(e,o);return{kind:a,angle:a==="rotate"?yc(e[k.angle]):null,duration:Ne("hover","duration",a==="rotate"?e[k.duration]:void 0),delay:Ne("hover","delay",a==="rotate"?e[k.delay]:void 0),...a==="nextImage"?{media:ja(e)}:{}}}function sw(e){let t={field:k.kind,in:[...Ka]};return{any:[{field:k.kind,is:"rotate"},{all:[{not:t},e==="rotate"?{not:{field:Bt,is:!1}}:{field:Bt,is:!0}]}]}}var Xa=He(["none","mono"]),Tc=He(["none","nextImage","mono"]),za={ImageBlock:"none",Manifesto:"none",Split:"none",ContactLocations:"mono"},nw=Object.keys(za);function Ec(e){return za[e]??"none"}var qa={zoom:"hoverZoom",darken:"hoverDarken"},Dt={min:100,max:150,step:1,unit:"%"};function Sc(e){let t=C(e[qa.zoom]);if(t===void 0)return null;let o=Math.min(Dt.max,Math.max(Dt.min,t));return o===Dt.min?null:String(o/100)}function _c(e){let t=C(e[qa.darken]);return t!==void 0&&t>0?t:null}var iw="hoverShow",rw="cardHover",lw="always",Oc=["ImageBlock","Flex"];function vc(e,t,o=Xa){let a=e[R];return ye(o,t,a)}function cw(e,t=""){let o=Oc.includes(t)?Tc:Xa,a=vc(e,Ec(t),o),s=a==="mono";return{kind:a,duration:Ne("hover","duration",s?e[k.duration]:void 0),delay:Ne("hover","delay",s?e[k.delay]:void 0),...a==="nextImage"?{media:ja(e),...t==="Flex"?Ya(e):{}}:Ya(e)}}function Ya(e){let t=Sc(e),o=_c(e);return{...t?{zoom:t}:{},...o?{darken:o}:{}}}function dw(){return{not:{field:R,is:"nextImage"}}}function hw(e){return e==="none"?{field:R,in:["mono","nextImage"]}:{not:{field:R,is:"none"}}}function uw(e){return e==="none"?{field:R,is:"mono"}:{not:{field:R,in:["none","nextImage"]}}}var fw={left:"start",center:"center",right:"end"},ww={left:"justify-start",center:"justify-center",right:"justify-end"},gw={left:"",center:"mx-auto",right:"ml-auto"},Qa={left:"",center:"text-center",right:"text-right"},xc={text:{left:"view-wide:max-view-desktop:text-left",center:"view-wide:max-view-desktop:text-center",right:"view-wide:max-view-desktop:text-right"},place:{left:"view-wide:max-view-desktop:mx-0",center:"view-wide:max-view-desktop:mx-auto",right:"view-wide:max-view-desktop:ml-auto view-wide:max-view-desktop:mr-0"},items:{left:"view-wide:max-view-desktop:grid-cols-1 view-wide:max-view-desktop:justify-items-start",center:"view-wide:max-view-desktop:grid-cols-1 view-wide:max-view-desktop:justify-items-center",right:"view-wide:max-view-desktop:justify-items-end"},justify:{left:"view-wide:max-view-desktop:justify-start",center:"view-wide:max-view-desktop:justify-center",right:"view-wide:max-view-desktop:justify-end"}},kc={text:{left:"max-view-wide:text-left",center:"max-view-wide:text-center",right:"max-view-wide:text-right"},place:{left:"max-view-wide:mx-0",center:"max-view-wide:mx-auto",right:"max-view-wide:ml-auto max-view-wide:mr-0"},items:{left:"max-view-wide:grid-cols-1 max-view-wide:justify-items-start",center:"max-view-wide:grid-cols-1 max-view-wide:justify-items-center",right:"max-view-wide:justify-items-end"},justify:{left:"max-view-wide:justify-start",center:"max-view-wide:justify-center",right:"max-view-wide:justify-end"}},Ac={text:{left:"view-tablet:max-view-desktop:text-left",center:"view-tablet:max-view-desktop:text-center",right:"view-tablet:max-view-desktop:text-right"},place:{left:"view-tablet:max-view-desktop:mx-0",center:"view-tablet:max-view-desktop:mx-auto",right:"view-tablet:max-view-desktop:ml-auto view-tablet:max-view-desktop:mr-0"},items:{left:"view-tablet:max-view-desktop:grid-cols-1 view-tablet:max-view-desktop:justify-items-start",center:"view-tablet:max-view-desktop:grid-cols-1 view-tablet:max-view-desktop:justify-items-center",right:"view-tablet:max-view-desktop:justify-items-end"},justify:{left:"view-tablet:max-view-desktop:justify-start",center:"view-tablet:max-view-desktop:justify-center",right:"view-tablet:max-view-desktop:justify-end"}},Rc={text:{left:"max-view-tablet:text-left",center:"max-view-tablet:text-center",right:"max-view-tablet:text-right"},place:{left:"max-view-tablet:mx-0",center:"max-view-tablet:mx-auto",right:"max-view-tablet:ml-auto max-view-tablet:mr-0"},items:{left:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-start",center:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-center",right:"max-view-tablet:justify-items-end"},justify:{left:"max-view-tablet:justify-start",center:"max-view-tablet:justify-center",right:"max-view-tablet:justify-end"}};function De(e){return e==="left"||e==="center"||e==="right"?e:void 0}function bw(e){return e==="start"?"left":e==="end"?"right":De(e)}function Lc(e,t,o){let a=De(e)??"left",s=Ce("same",a,De(t),De(o)),n={};return s.tablet&&s.tablet!==a&&(n.tablet=s.tablet),s.phone&&s.phone!==a&&(n.phone=s.phone),n}function yw(e,t,o,a,{atSectionLine:s=!1}={}){let n=Lc(t,o,a),i=s?Ac:xc,r=s?Rc:kc;return[n.tablet?i[e][n.tablet]:"",n.phone?r[e][n.phone]:""].filter(Boolean).join(" ")}var Mt="rowImageField",Cc="boxOutsideCopy",Ic={all:[{field:Mt,set:!0},{not:{context:Cc,is:!0}}]},Ew={any:[{field:"bgImage",set:!0},Ic]},Za="boxInCopy",Pc={any:[{not:{field:Mt,set:!0}},{not:{context:Za,is:!0}}]},Sw={all:[{not:{field:"bgImage",set:!0}},Pc]},Ja={all:[{not:{context:"parent.bgImage",set:!0}},{any:[{not:{context:`parent.${Mt}`,set:!0}},{not:{context:Za,is:!0}}]}]};import{parseOption as es}from"efficient-shell/format";var Nc="small",Hc="dot",Dc=[{label:"Small",value:"small"},{label:"Display",value:"display"}],Ft=[{label:"Dot \u25CF",value:"dot"},{label:"Cross \u2715",value:"cross"},{label:"Slash /",value:"slash"},{label:"Triangle \u25BC",value:"triangle"},{label:"None",value:"none"}],ts={dot:"\u25CF",cross:"\u2715",slash:"/",triangle:"\u25BC",none:""},Bc={small:"font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.25em] max-view-wide:text-[length:var(--size-label,12px)]",display:"font-display font-medium text-[length:var(--size-headingMedium,44px)] uppercase leading-none tracking-[0.005em] max-view-wide:text-[length:var(--size-headingMedium,28px)]"},Mc={small:{dot:"",cross:"text-[0.77em]",slash:"text-[0.77em]",triangle:"",none:""},display:{dot:"text-[0.3em]",cross:"text-[0.64em]",slash:"text-[0.64em]",triangle:"text-[0.3em]",none:""}};function vw(e){return es(Dc,Nc,e)}function os(e){return es(Ft,Hc,e)}function xw(e){return Bc[e]}function as(e,t){return Mc[e][t]}var Rw=[{value:"none"},{value:"dot"},{value:"cross"},{value:"slash"},{value:"triangle"}];function ss(e){return Ft.some(t=>t.value===e)?os(e):void 0}var Fc="overflow-x-clip [&>*]:shrink-0 [&>[data-sf-box-items]>*]:shrink-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content] [&>*_:is(p,h1,h2,h3,h4,h5,h6)]:max-w-none [&>[data-sf-box-items]>*_:is(p,h1,h2,h3,h4,h5,h6)]:max-w-none [&>*_:is(.sf-button-block>div)]:font-mono [&>[data-sf-box-items]>*_:is(.sf-button-block>div)]:font-mono [&>*_:is(.sf-button-block>div)]:text-[length:var(--size-label,14px)] [&>[data-sf-box-items]>*_:is(.sf-button-block>div)]:text-[length:var(--size-label,14px)] [&>*_:is(.sf-button-block>div)]:tracking-[0.2em] [&>[data-sf-box-items]>*_:is(.sf-button-block>div)]:tracking-[0.2em] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:inline-flex [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:inline-flex [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:items-center [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:items-center [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:align-top [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:align-top [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:h-[calc(1lh/var(--sf-sep-k,1))] [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:h-[calc(1lh/var(--sf-sep-k,1))] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:mr-[var(--sf-gap-len,0px)] [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:mr-[var(--sf-gap-len,0px)] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-view-wide:before:mr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-view-wide:before:mr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-accent [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-accent [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:content-[var(--sf-sep-mark)] [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:content-[var(--sf-sep-mark)]";function K(e,t){return e==="row"&&ss(t)!==void 0}function Lw(e,t){return K(e,t)?Fc:""}var Gc="[&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:inline-flex [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:items-center [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:align-top [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:h-[calc(1lh/var(--sf-sep-k,1))] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:ml-[var(--sf-gap-len,0px)] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-view-wide:after:ml-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:text-accent [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:content-[var(--sf-sep-mark)] [&>[data-sf-box-items]:last-child>*:not(:last-child)_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:content-none";function Cw(e,t){return K(e,t)?Gc:""}function Iw(e,t){if(!K(e,t))return{};let o=ss(t),a=/^text-\[([\d.]+)em\]$/.exec(as("small",o))?.[1],s=ts[o];return{"--sf-sep-mark":s===""?"none":JSON.stringify(s),...a?{"--sf-sep-k":a}:{}}}import{parseOption as Wc}from"efficient-shell/format";var ls={sectionPaddingTop:0,sectionPaddingBottom:0},Te={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},re={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},Gw=[...new Set([...Object.keys(re),...Object.keys(Qa)])];function Ww(e,t){let o=typeof e=="string"&&ee(Te,e)?Te[e]:"",a=typeof t=="string"&&ee(re,t)?re[t]:"";return[o,a].filter(Boolean).join(" ")}function Uc(e){return e===!0||e==="wrap"?"flex-wrap":""}var Yc={start:"view-wide:max-view-desktop:justify-start!",center:"view-wide:max-view-desktop:justify-center!",between:"view-wide:max-view-desktop:justify-between!",end:"view-wide:max-view-desktop:justify-end!"},Kc={start:"max-view-wide:justify-start",center:"max-view-wide:justify-center",between:"max-view-wide:justify-between",end:"max-view-wide:justify-end"},$c={start:"view-wide:max-view-desktop:items-start!",center:"view-wide:max-view-desktop:items-center!",end:"view-wide:max-view-desktop:items-end!",stretch:"view-wide:max-view-desktop:items-stretch!"},Vc={start:"max-view-wide:items-start",center:"max-view-wide:items-center",end:"max-view-wide:items-end",stretch:"max-view-wide:items-stretch"},jc={wrap:"view-wide:max-view-desktop:flex-wrap!",nowrap:"view-wide:max-view-desktop:flex-nowrap!"};function j(e,t){return typeof t=="string"&&ee(e,t)?t:void 0}function Wt(e,t,o){let a=Ce("same",e,t,o),s={};return a.tablet!==void 0&&a.tablet!==e&&(s.tablet=a.tablet),a.phone!==void 0&&a.phone!==e&&(s.phone=a.phone),s}function Ut(e,t,o){return[e.tablet?t[e.tablet]:"",e.phone?o[e.phone]:""].filter(Boolean).join(" ")}function Xc(e,t,o){return Wt(j(Te,e)??"start",j(Te,t),j(Te,o))}function Uw(e,t,o){return Ut(Xc(e,t,o),Yc,Kc)}function Yw(e,t,o){let a=j(re,e)??"stretch";if(a==="stretch")return"";let s=Wt(a,j(re,t),j(re,o));return Ut(s,$c,Vc)}function Gt(e){if(e===!0||e==="wrap")return"wrap";if(e===!1||e==="nowrap")return"nowrap"}function Kw(e,t){let o=Uc(e)===""?"nowrap":"wrap",a=Gt(t);return a&&a!==o?jc[a]:""}var $w="Block widths",cs=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{value:"bigLeft",weights:[2,1]},{value:"bigRight",weights:[1,2]},{value:"biggerLeft",weights:[3,1]},{value:"biggerRight",weights:[1,3]},{value:"twoThree",weights:[2,3]}],zc="data-sf-box-items",Vw=new RegExp(`[ \\t]+[^\\s"'\`]*\\[${zc}\\][^\\s"'\`]*`,"g");var jw=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Custom",value:"custom",weights:[2,1]}];function Xw(e){return Array.isArray(e)?"custom":e==="equal"?"equal":typeof e=="string"&&e in Be?"custom":"content"}var ds=4,ns=10;function qc(e,t){if(!Number.isInteger(t)||t<2||t>ds||e.length!==t-1||!e.every(s=>typeof s=="number"&&Number.isFinite(s)))return;let o=[],a=0;return e.forEach((s,n)=>{let i=100-a-ns*(t-1-n),r=Math.min(i,Math.max(ns,Math.round(s)));o.push(r),a+=r}),o}function is(e,t,o){if(!Array.isArray(t))return;let a=qc(t,o),s=a?[...a,100-a.reduce((i,r)=>i+r,0)]:[],n={};for(let i=0;i<ds;i+=1)n[`--${e}-${i+1}`]=s[i]??1;return n}function zw(e,t,o){let a=is("sf-share",e,o),s=is("sf-share-tablet",t,o);return a||s?{...a,...s}:void 0}function Qc(e,t){let o=Array.from({length:t},()=>1),a=cs.find(i=>i.value===e);if(!a?.weights||t<1)return o;let[s,n]=a.weights;return s>1&&(o[0]=s),n>1&&(o[t-1]=n),o}function qw(e,t){if(typeof e!="string"||!(e in Be)||e==="equal")return e;let o=Qc(e,t),a=o.reduce((s,n)=>s+n,0);return o.slice(0,-1).map(s=>Math.round(s/a*100))}var $="[&>*]:min-w-0 [&>[data-sf-box-items]>*]:min-w-0 [&>*]:flex-1 [&>[data-sf-box-items]>*]:flex-1 [&>*]:basis-0 [&>[data-sf-box-items]>*]:basis-0",Be={equal:$,bigLeft:`${$} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2]`,bigRight:`${$} [&>*:last-child]:view-wide:grow-[2] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${$} [&>*:first-child]:view-wide:grow-[3] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[3]`,biggerRight:`${$} [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`,twoThree:`${$} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`},Zc=`${$} [&>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>[data-sf-box-items]>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>[data-sf-box-items]>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>[data-sf-box-items]>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)] [&>[data-sf-box-items]>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)]`;function Jc(e){return Array.isArray(e)?Zc:typeof e=="string"?Be[e]??"":""}var Qw={all:[{context:"parentType",is:"Flex"},{context:"parent.direction",is:"row"},{any:[{not:{context:"parent.align",set:!0}},{context:"parent.align",is:"stretch"}]},{not:{context:"parent.separator",set:!0}},{not:{context:"parent.loop",is:"scroll"}},{not:{context:"parent.line",is:!0}},Ja,{any:[{context:"parent.columns",in:[2,3,4,5,6]},{all:[{not:{context:"parent.columns",is:1}},{context:"parent.share",in:Object.keys(Be)}]}]}]},hs="view-wide:max-view-desktop:flex-row!",V=`${hs} [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-0!`,us={content:`${hs} [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[content]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[content]!`,equal:V,bigLeft:`${V} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]!`,bigRight:`${V} [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]!`,biggerLeft:`${V} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`,biggerRight:`${V} [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`,twoThree:`${V} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`},ed=`${V} [&>*:nth-child(1):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>[data-sf-box-items]>*:nth-child(1):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>*:nth-child(2):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>[data-sf-box-items]>*:nth-child(2):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>*:nth-child(3):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>[data-sf-box-items]>*:nth-child(3):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>*:nth-child(4):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]! [&>[data-sf-box-items]>*:nth-child(4):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]!`;function td(e){return Array.isArray(e)||typeof e=="string"&&e in us?e:null}function Zw(e){if(e.direction!=="row"||K(e.direction,e.separator)||e.loop==="scroll"||e.line===!0||ps(e.columns)!==""||ms(e.columnsTablet)!=="")return"";let t=td(e.shareTablet);return t===null?"":typeof t=="string"?us[t]:ed}var od="[&>*]:view-wide:basis-[content] [&>[data-sf-box-items]>*]:view-wide:basis-[content]";function Jw(e){return Jc(e)===""?od:""}var eg="Columns",tg=1,og=3,Yt={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},ag=cs.filter(e=>e.value==="content"||e.value==="equal"),sg="equal",ng=1,ig=6,ie="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>[data-sf-box-items]>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0! [&>[data-sf-box-items]>*]:view-wide:grow-0!",ad={1:`${ie} [&>*]:view-wide:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc(100%/1)]!`,2:`${ie} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${ie} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${ie} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${ie} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${ie} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function ps(e){return typeof e=="number"?ad[e]??"":""}var sd={1:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc(100%/1)]!",2:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function ms(e){return typeof e=="number"?sd[e]??"":""}function rg(e){return e.direction!=="row"||K(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":ms(e.columnsTablet)}function lg(e){return e.direction!=="row"||K(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":ps(e.columns)}var fs={2:"view-wide:grid view-wide:grid-cols-2",3:"view-wide:grid view-wide:grid-cols-3",4:"view-wide:grid view-wide:grid-cols-4",5:"view-wide:grid view-wide:grid-cols-5",6:"view-wide:grid view-wide:grid-cols-6"},ws={2:"max-view-wide:grid max-view-wide:grid-cols-2",3:"max-view-wide:grid max-view-wide:grid-cols-3"},cg=Object.keys(fs).map(Number),dg=Object.keys(ws).map(Number);function hg(e,t,o=!1){let a=typeof e=="number"?fs[e]??"":"",s=ws[Number(t)]??"";return!a&&!s?"":[a,s,o?"gap-y-0!":""].filter(Boolean).join(" ")}var nd="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]",id={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},rd="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]";function ld(e,t){return(Gt(e)??Gt(t)??"wrap")==="nowrap"}function ug(e,t,o,a){let s=Yt[Number(e)];if(!s)return"max-view-wide:flex-col";let n=ld(o,a);return gs(e,t)?n?rd:nd:n?id[Number(e)]:s}function pg(e,t){return Number(e)in Yt&&!gs(e,t)}function gs(e,t){return Number(e)in Yt&&t==="content"}var mg="Block spacing",cd=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],dd="sf-box-gap-only";function fg(e){return e==="gap"?dd:""}var rs={each:"sf-box-each-tablet",gap:"sf-box-gap-only-tablet"},hd={each:"sf-box-each-phone",gap:"sf-box-gap-only-phone"};function wg(e,t,o){let a=n=>j(rs,n),s=Wt(Wc(cd,"each",e),a(t),a(o));return Ut(s,rs,hd)}var bs={label:"Text",defaultProps:{text:"",align:"left",tone:"default",tag:"p",contained:!0}};var{text:Eg,tag:Sg,...ud}=bs.defaultProps,b=ud,E={...b,tone:"dim"},pd={justify:"start",align:"stretch",wrap:!1,blockSpacing:"gap",padV2:!0},g={...pd,direction:"column",...ls},P=(e,t=e,o=e,a=t)=>({sectionPaddingTop:e,sectionPaddingRight:t,sectionPaddingBottom:e,sectionPaddingLeft:t,sectionPaddingTopPhone:o,sectionPaddingRightPhone:a,sectionPaddingBottomPhone:o,sectionPaddingLeftPhone:a}),md=e=>({fillColor:e}),ys=(e,t,o={})=>({...g,widthFit:"fixed",width:e,minWidth:e,sectionHeightMode:"fixed",sectionHeightValue:e,sectionHeightUnit:"px",...t?md(t):{},...o}),y=(e,t,o,a)=>({sizeToken:{step:e,px:t,...a?{stepPhone:a}:{},...o?{pxPhone:o}:{}}}),_g=e=>({textStyle:"body-1",...y("body",e),lineHeight:1.625}),Ts={case:"upper"},Kt={textStyle:"body-5",...Ts},$t=(e,t)=>({...y("label",e,t),letterSpacing:.2,...Ts}),Vt=(e,t)=>({...Kt,...$t(e,t)});function T(e,t,o=""){return e.map((a,s)=>{let n=o?`${o}.${s}`:String(s),i={...a.props??{}};for(let[r,c]of Object.entries(a.slots??{}))i[r]=T(c,t,n);return{type:a.type,props:{...i,id:t(a.type,n)}}})}function H(e,t){return typeof e.id=="string"&&e.id.trim()?e.id:t}var le=(e,t)=>(o,a)=>a==="0"?`${e}~${t}`:`${e}~${t}.${a.slice(2)}`;function D(e,t,o,a){return e[t]!==void 0?e:{...e,[t]:a(H(e,o))}}var xg=()=>({tag:"h2",_partStyles:{text:{textStyle:"heading-2"}}}),Es=()=>({_partStyles:{text:{...Kt,color:"accent",letterSpacing:.3,lineHeight:1.5}}});var ce="Cards",fd={...g,gap:12,gapPhone:12,...P(32,32,28,28)},wd={textStyle:"heading-3",...y("headingSmall",20),weight:500,case:"upper",lineHeight:1.5,letterSpacing:.02},Ee={textStyle:"body-1",...y("body",15),lineHeight:1.6},u=(e,t,o,a=!1)=>({type:"Text",props:{...t,text:"",[w]:e,_partStyles:{text:{...a?Es()._partStyles?.text??{}:{},...o}}}}),de={title:"title",body:"body"},Me={title:"name",body:"note"},gd=(e=de)=>({type:f,props:{...fd,name:"Card"},slots:{[p]:[u(e.title,{...b,tag:"p",widthFit:"fill"},wd),u(e.body,{...E,tag:"p",widthFit:"fill"},Ee)]}}),_s=(e,t)=>T([gd(t)],e),Ss={label:de.title,href:"href"},bd={textStyle:"body-1",fontRole:"heading",color:"text",...y("body",17),weight:500,case:"upper",letterSpacing:.06,lineHeight:1.5},yd=ys(9,"main",{[Wa]:45}),Td=(e=!1)=>({type:f,props:{...g,name:"Card",direction:"row",align:"center",gap:16,gapPhone:16,phoneRow:2,sharePhone:"content",wrapPhone:!1,...P(32,28),[x]:Ss.href,...e?{[R]:Y}:{}},slots:{[p]:[{type:f,props:{...yd,name:"Mark"}},u(Ss.label,{...b,tag:"p",widthFit:"fill"},bd)]}}),Os=e=>le(e,"card"),vs=(e,t=!1)=>T([Td(t)],e);var jt="ArticleBody",Ed={textStyle:"heading-3",...y("headingSmall",20),weight:500,lineHeight:1.4,align:"center"},Sd={...Ee,align:"center"},xs=640,_d=()=>[u("heading",{...b,tag:"h2",align:"center",maxWidth:xs},Ed),u("paragraph",{...E,tag:"p",align:"center",maxWidth:xs},Sd)],Od=e=>T(_d(),e);function vd(e){return Od((t,o)=>`${e}~${o==="0"?"heading":"paragraph"}`)}function ks(e){return D(e,d,jt,vd)}import{addShowWhenFacts as xd}from"efficient-shell/format";import{showWhenOf as Wg,shownForOption as Ug,truthy as Yg,withRowRules as Kg,withRowsShownWhen as As,withShowWhen as $g}from"efficient-shell/format";var Vg=xd;function jg(e,t,o){return e.slice(0,-1).reduceRight((a,s)=>({any:[{all:[t(s),o(s)]},{all:[{not:t(s)},a]}]}),o(e[e.length-1]))}import{parseOption as kd}from"efficient-shell/format";var Ad="inline",Rd=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"},{label:"In the list column",value:"list-column",only:["Footprint"]}],Rs="list-column";var Ld={ProductGrid:{num:"num",title:"title",description:"description",headRows:["num","title","titleSize","description","linkText","linkHref"],renderer:"ProductGridSection",padKey:"padTop",linkProp:"link"},TyreSizes:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreSizes"},FitmentFinder:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentFinder"},TyreFitment:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreFitment"},BundleOffer:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},CompatibleTyres:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},RelatedProducts:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},SpecTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"SpecTable"},FAQ:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"FAQ"},GalleryB:{num:"num",title:"title",headRows:["num","title","linkText","linkHref"],renderer:"GalleryGrid"},FitmentTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentTable"},Events:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"Events"},ProcessSteps:{num:"num",title:"title",description:"description",headRows:["num","title","description"],headStyle:"editorial",renderer:"ProcessSteps",padKey:"padTop"},LongRead:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"LongRead"},Series:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"Series"},Subscribe:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"Subscribe"},TimelineTrack:{num:"eyebrow",title:"title",description:"intro",headRows:["eyebrow","title","intro"],headStyle:"editorial",renderer:"TimelineTrack",padKey:"padTop"},StatsParagraph:{num:"eyebrow",title:"title",description:"desc",headRows:["eyebrow","title","desc"],headStyle:"editorial",renderer:"StatsParagraph"},Footprint:{num:"sectionNumber",title:"heading",description:"tagline",headRows:["sectionNumber","heading","tagline"],headStyle:"editorial",renderer:"Footprint",padKey:"padTop"},Collections:{num:"eyebrow",title:"heading",headRows:["eyebrow","heading"],renderer:"Collections"},Cards:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Cards"},Testimonials:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Testimonials"},Reviews:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Reviews"},Prose:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"essay",renderer:"Prose"},ReviewForm:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"simple",renderer:"ReviewForm"},DeliveryOptions:{num:"eyebrow",title:"title",description:"body",headRows:["eyebrow","title","body"],headStyle:"natural",headRowGap:"gap-3",headDescriptionSize:"text-[15px]",renderer:"DeliveryOptions"}},Zg="SectionHeader";function Jg(e){return ee(Ld,e)}function Fe(e){return kd(Rd,Ad,e)}var Cd=new Set(["Flex"]);function eb(e){return!!e?.type&&Cd.has(e.type)}var Ls={not:{field:"headPlacement",is:"own-box"}},tb={not:Ls};function ob(e,t,o){return As(e,o,Ls)}var sb="data-sf-spec-region";function nb(e){return e.writable===!0&&e.sized===!0}function ib(e,t,o){if(!e)return;let a=o[e];if(a)return{fontFamily:`var(--font-role-${e})`,fontSize:`var(--size-${a}, ${t.builtIn})`}}function rb(e){let t=/var\(--size-[A-Za-z]+, ?([0-9.]+px)\)/.exec(e);if(!t)throw new Error(`builtInOf: no --size-* fallback in ${e}`);return t[1]}function Cs(e){return`@${e}`}function lb(e,t){if(!t.startsWith("@"))return null;let o=t.slice(1);return o in e?o:null}function cb(e,t){return t&&t in e?t:null}function Ps(e,t){if(e!==ce)return t;if(t[d]!==void 0)return Is(t);let o=H(t,ce),a=Os(o);if(t.cardStyle==="label-only"){let n=Array.isArray(t.items)&&t.items.some(i=>I(i?.href)!==void 0);return Is({...t,[d]:vs(a,n)})}let s=v(t)?Me:de;return{...t,[d]:_s(a,s)}}var Id=e=>{let[t,o]=e?[de,Me]:[Me,de];return new Map([[t.title,o.title],[t.body,o.body]])};function Ns(e,t){let o=null;return e.forEach((a,s)=>{let n=a?.props;if(!n)return;let i=n,r=n[w];a.type==="Text"&&typeof r=="string"&&t.has(r)&&(i={...i,[w]:t.get(r)});let c=n[p];if(Array.isArray(c)){let h=Ns(c,t);h!==c&&(i={...i,[p]:h})}i!==n&&(o??=[...e],o[s]={...a,props:i})}),o??e}function Is(e,t){if(!Array.isArray(e[d]))return e;let o=Id(!!v(e)),a=t?new Map([...o].filter(([n,i])=>t(i)&&!t(n))):o;if(!a.size)return e;let s=Ns(e[d],a);return s===e[d]?e:{...e,[d]:s}}var Hs="OrderSummary";var Pd="label";function Ge(e){return D(e,d,A,t=>T([Nd()],le(t,"item")))}function Nd(){return{type:f,props:{...g,name:"Item"},slots:{[p]:[u(Pd,{...b,tag:"p"},Ee)]}}}var Ds="ProcessSteps",Hd={eyebrow:"eyebrow",title:"title",copy:"copy",image:"image",tag:"tag",specs:"specs"},he=Hd,Dd=()=>({type:f,props:{...g,name:"Row",direction:"row",share:"equal",align:"center",gap:48,sectionPaddingTop:60,sectionPaddingBottom:60,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60},slots:{[p]:[{type:f,props:{...g,name:"Picture",direction:"column",gap:12},slots:{[p]:[{type:"ImageBlock",props:{[w]:he.image,aspect:"1/1",fit:"contain"}},u(he.tag,{...E,tag:"p"},Vt(11))]}},{type:f,props:{...g,name:"Words",direction:"column",gap:16},slots:{[p]:[u(he.eyebrow,{...b,tag:"p"},{...Vt(13),color:"accent"}),u(he.title,{...b,tag:"h2"},{textStyle:"heading-2",...y("headingMedium",42,28),lineHeight:1.1,letterSpacing:-.02}),u(he.copy,{...E,tag:"p"},{textStyle:"body-1",...y("body",15),lineHeight:1.6}),{type:A,props:{[w]:he.specs}}]}}]}});function Bs(e){return e.map(t=>{let o=t.props;for(let a of se(t))o={...o,[a]:Bs(o[a])};return t.type===A?{...t,props:Ge(o)}:{...t,props:o}})}function Lb(e){return Bs(T([Dd()],le(e,"row")))}var Bd="label",Md=()=>({type:"LogoBlock",props:{[w]:Bd}}),We="Logos",Ms=e=>T([Md()],()=>`${e}~logo`);function Fs(e){return v(e)?D(e,d,We,Ms):e}function Hb(e){if(!v(e))return e;let t=e[d];return t!==void 0&&!(Array.isArray(t)&&t.length===0)?e:{...e,[d]:Ms(H(e,We))}}var Xt={number:{label:"Number",follows:"Labels",builtIn:"14px",writable:!0,sized:!0},question:{label:"Question",follows:"Body",builtIn:"18px",writable:!0,sized:!0},answer:{label:"Answer",follows:"Body",builtIn:"15px",writable:!0,sized:!0}},Bb=Xt;var zt="FAQ",Fd="question",Gd="answer",Wd={textStyle:"body-1",fontRole:"heading",...y("body",18,15),weight:500,case:"upper",letterSpacing:.02,lineHeight:1.5},Ud={textStyle:"body-1",...y("body",15),lineHeight:1.7};function jb(){return Object.keys(Xt).map(Cs)}var Yd=()=>({type:f,props:{...g,gap:0,name:"Question"},slots:{rowTitle:[u(Fd,{...b,tag:"p",widthFit:"fill"},Wd)],[p]:[u(Gd,{...E,tag:"p",widthFit:"fill",maxWidth:760},Ud)]}});function Kd(e){return Fe(e.headPlacement)==="own-box"?!1:["num","title","linkText"].some(t=>I(e[t])!==void 0)}function Gs(e){return Kd(e)?e:D(e,d,zt,t=>{let o=0;return T([Yd()],a=>a===f?`${t}~row`:`${t}~row.${o++}`)})}import{rootIsDark as $d}from"efficient-shell/format";function qb(e="auto"){return e==="light"?!0:e==="dark"?!1:!$d({whenUnset:!0})}function Ws(e,t){return Number.isFinite(e)&&Number.isFinite(t)&&!(e===0&&t===0)}function qt(e){let t=Number.parseFloat(e??"");return Number.isFinite(t)?t:0}function Zb(e,t,o){let a=[];return e.forEach((s,n)=>{let i=t(s),r=a.find(c=>c.key===i);r||(r={key:i,name:o(s),items:[]},a.push(r)),r.items.push({item:s,index:n})}),a}function Us(e){return Vd[Qt(e)]}var Vd={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4"};function Qt(e){if(e<=1)return 1;if(e<=4)return e;let t=o=>e%o||o;return t(4)>=t(3)?4:3}import{parseOption as Zt}from"efficient-shell/format";import{parseOption as jd}from"efficient-shell/format";var Xd=["below","left","right"];function Ys(e){return jd(Xd,"below",e)}var zd=/^https?:\/\//i;function ry(e){let t=(e.href??"").trim(),o=(e.linkLabel??"").trim();return{role:e.role??"",city:e.city??"",country:e.country??"",address:e.address??"",hq:e.hq==="true",lat:qt(e.lat),lng:qt(e.lng),...t&&o&&zd.test(t)?{href:t,linkLabel:o}:{}}}function ly(e){let t=o=>typeof o=="string"?o:"";return{badge:e.hq?"HQ":"",role:t(e.role),city:t(e.city),country:t(e.country),address:t(e.address),phone:t(e.phone),...e.href&&e.linkLabel?{href:e.href,linkLabel:e.linkLabel}:{}}}function cy(e){return[e.city,e.country,e.address,e.role].map(t=>typeof t=="string"?t.replace(/[=*]/g,"").trim():"").filter(Boolean).join(" ")}var dy={sectionNumber:"",heading:"",tagline:"",mapTheme:"auto"};function hy(e){let t=[];return e.forEach((o,a)=>{Ws(o.lat,o.lng)&&t.push({key:String(a),label:o.city||o.role||"Office",lat:o.lat,lng:o.lng,glyph:"",tone:"",...o.hq?{badge:"HQ"}:{}})}),t}var qd=["both","map","list"],uy="shows",$s="both";function Qd(e){return Zt(qd,$s,e.shows)}function Ye(e){return Qd(e)===$s?Ys(e.listPosition):"below"}var Zd=["fixed","full"],Jd="mapHeight",Ks="fixed",py="full",Vs=e=>Ye(e)!=="below";function my(e){return Vs(e)?Zt(Zd,Ks,e[Jd]):Ks}function fy(e){return Vs(e)&&Fe(e.headPlacement)===Rs}var eh=[1,2,3,4],Ue="auto",th=2,oh=1,ah=[Ue,...eh.map(String)];function wy(e){let t=Zt(ah,Ue,e.listColumns);return t===Ue?t:Number(t)}var sh="max-view-desktop:grid-cols-2",nh="max-[700px]:grid-cols-1";function gy(e,t){let o=e===Ue?Qt(t):e;return[Us(o),[o>th?sh:"",o>oh?nh:""].filter(Boolean).join(" ")].join(" ")}function Jt(e){return Array.isArray(e)?e.map(Jt):!e||typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([t,o])=>t!=="id"&&o!==void 0&&!(Array.isArray(o)&&o.length===0)).sort(([t],[o])=>t<o?-1:t>o?1:0).map(([t,o])=>[t,Jt(o)]))}var B=e=>JSON.stringify(Jt(e));var $e="Footprint",zs=e=>v(e)===Ct,Ke=$t(11),ih={textStyle:"body-1",...y("body",18),weight:500,lineHeight:1.2},ky=()=>({type:f,props:{...g,gap:8,gapPhone:8,...P(20,24,20,20),name:"Office"},slots:{[p]:[u("badge",{...b,tag:"p",widthFit:"fill"},Ke,!0),u("role",{...b,tag:"p",widthFit:"fill"},Ke,!0),u("city",{...b,tag:"p",widthFit:"fill"},ih),u("country",{...E,tag:"p",widthFit:"fill"},Ke),u("address",{...E,tag:"p",widthFit:"fill"},Ke),{type:"ButtonBlock",props:{variant:"link",label:"",href:"",[w]:"linkLabel",[x]:"href"}}]}}),qs={textStyle:"body-1",fontRole:"heading",...y("body",16),weight:500,lineHeight:1.25},to={textStyle:"body-1",...y("body",14),lineHeight:1.5},rh=()=>({type:f,props:{...g,gap:4,gapPhone:4,...P(16,4),sectionBorder:{bottom:1},name:"Office"},slots:{[p]:[u("city",{...b,tag:"p",widthFit:"fill"},qs),u("address",{...E,tag:"p",widthFit:"fill"},to),u("phone",{...E,tag:"p",widthFit:"fill"},to)]}});function Qs(e){let t=H(e,$e),o=0;return T([rh()],a=>a===f?`${t}~office`:`${t}~office.${o++}`)}function Zs(e){return Array.isArray(e[d])&&e[d].length>0&&B(e[d])===B(Qs(e))}var Js=e=>e===void 0||Array.isArray(e)&&e.length===0;function js(e){return Ye(e)==="below"?Zs(e)?{...e,[d]:[]}:e:!Js(e[d])||zs(e)?e:{...e,[d]:Qs(e)}}var lh=qs,ch=to,dh={textFit:"line"},oo=(e,t,o="",a={},s={})=>{let n=u(e,{...t?E:b,tag:"p",...a},{...ch,...s});return o?{...n,props:{...n.props,[x]:o}}:n},eo=(e,t,o,a)=>({type:f,props:{...g,gap:0,gapPhone:0,[be]:[e],name:a},slots:{[p]:[oo(e,t,o,dh,{align:"right"})]}}),hh=e=>({type:f,props:{...g,direction:"row",justify:"between",share:"content",phoneRow:2,sharePhone:"content",wrapPhone:"nowrap",gap:12,gapPhone:12,...e?P(20,24):{...P(16,4),sectionBorder:{bottom:1}},name:"Dealer"},slots:{[p]:[{type:f,props:{...g,justify:"center",gap:0,gapPhone:0,widthFit:"fill",name:"Dealer words"},slots:{[p]:[{type:f,props:{...g,gap:4,gapPhone:4,widthFit:"fill",name:"Dealer name"},slots:{[p]:[u("name",{...b,tag:"p",widthFit:"fill"},lh),oo("address",!0)]}},oo("place",!0,"",{widthFit:"fill"})]}},{type:f,props:{...g,align:"end",gap:4,gapPhone:4,name:"Dealer contact"},slots:{[p]:[eo("distance",!0,"","Dealer distance"),eo("phone",!1,"phoneHref","Dealer phone"),eo("website",!1,"websiteHref","Dealer website")]}}]}}),uh=e=>{let t=hh(e),o={type:f,props:{...g,...P(0,12),name:"Dealer"},slots:{[p]:[{...t,props:{...t.props,name:"Dealer row"}}]}};return e?t:o};function ao(e,t){let o=H(e,$e),a=0;return T([uh(t)],(s,n)=>n==="0"?`${o}~dealer`:`${o}~dealer.${a++}`)}function Xs(e){if(!Array.isArray(e[d])||e[d].length===0)return!1;let t=B(e[d]);return t===B(ao(e,!0))||t===B(ao(e,!1))}function en(e){if(zs(e)){let o=ao(e,Ye(e)==="below");return!(Js(e[d])||Zs(e)||Xs(e))||B(e[d]??[])===B(o)?e:{...e,[d]:o}}if(!Xs(e))return js(e);let t={...e,[d]:[]};return js(t)}var ph="Card template",on="items",an="itemFields";function X(e,t){if(!t)return e;let o=typeof t=="string"?[t]:t;return e.filter(a=>o.includes(a.kind??"text"))}var mh=[{block:Hs,typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:zt,typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>Gs(e)},{block:$e,typedRows:"offices",fields:[{key:"badge",label:"HQ",plain:!0},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region \xB7 country"},{key:"address",label:"Address"},{key:"phone",label:"Phone"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}],seed:e=>en(e)},{block:ce,typedRows:"items",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],seed:e=>Ps(ce,e)},{block:Ds,fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:A,label:"Card list"}]},{block:We,fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>Fs(e)},{block:A,fields:[{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],typedRows:on,seed:e=>Ge(e)},{block:jt,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>ks(e)}];function S(){return ae("efficient.card-templates",()=>new Map(mh.map(e=>[e.block,e])))}function jy(e){for(let t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");let o=[];for(let i of t.blocks??[]){if(typeof i?.type!="string"||!i.type)throw new Error(`The card template of ${t.block} names an empty block.`);if(i.type===tn)throw new Error(`The card template of ${t.block} names "${tn}" in its blocks. Only a host's seed puts a host part in a card template; a merchant never adds one. Take it out.`);o.some(r=>r.type===i.type)||o.push({type:i.type,label:i.label||i.type})}let a=[];for(let i of t.slots??[]){if(typeof i?.slot!="string"||!i.slot)throw new Error(`The card template of ${t.block} names an empty slot.`);let r=I(i.label),c=Array.isArray(i.fields)?{fields:i.fields.map(h=>({...h}))}:null;a.some(h=>h.slot===i.slot)||a.push({slot:i.slot,...r?{label:r}:null,...c})}let s=a.some(i=>i.fields);if(s&&(t.fields.some(i=>i.everySource)||Na(t.block).length))throw new Error(`The card template of ${t.block} declares slot fields, but the block reads a source: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);s?we().add(t.block):we().delete(t.block);let n=I(t.typedRows);S().set(t.block,{block:t.block,...a.length?{slots:a}:{},fields:t.fields.map(i=>({...i})),blocks:o,typedRows:n,...t.seed?{seed:t.seed}:{},...t.seedOnInsert?{seedOnInsert:t.seedOnInsert}:{},...t.linesBetween===!0?{linesBetween:!0}:{}})}}function fh(e,t){let o=e?S().get(e)?.seed:void 0;return o?o(t):t}function Xy(e,t){let o=gh(e),a=(o.length?o:[d]).filter(r=>t[r]===void 0||Array.isArray(t[r])&&t[r].length===0);if(!a.length)return t;let s={...t};for(let r of a)delete s[r];let n=e?S().get(e)?.seedOnInsert:void 0,i=n?n(s):fh(e,s);return i===s?t:i}function zy(){for(let e of S().values())if(e.blocks?.length)return!0;return!1}function qy(e){return S().get(e)?.blocks??[]}function Qy(e){for(let t of S().values())if(t.blocks?.some(o=>o.type===e))return!0;return!1}function Zy(e){return typeof e=="string"&&S().get(e)?.typedRows||""}function Jy(e){return typeof e=="string"&&S().get(e)?.linesBetween===!0}function eT(e){return typeof e=="string"&&S().has(e)}var wh=[{slot:d}];function Ve(e){if(typeof e!="string")return[];let t=S().get(e);return t?t.slots??wh:[]}function gh(e){return Ve(e).map(t=>t.slot)}function bh(e,t){return Ve(e).some(o=>o.slot===t)}function tT(e,t){let o=Ve(e).find(a=>a.slot===t);return o?o.label??ph:null}function so(e,t){return t?Ve(e).find(o=>o.slot===t)?.fields:void 0}function yh(e,t){let o=S().get(e)?.fields??[];return X(o,t)}function Th(e,t){if(typeof e!="string")return"";let o=so(e,t);return(o?X(o,"list"):yh(e,"list"))[0]?.key??""}function Eh(e,t,o){return io(e)||Th(t,o)}function sn(e,t,o){let a=typeof e?.type=="string"?e.type:"";if(!a)return[];let s=so(a,o);if(s)return X(s,t);let n=S().get(a)?.fields??[],i=Pe(v(e?.props))?.fields,r=i?.length?[...i.map(c=>({...c})),...n.filter(c=>c.everySource&&!i.some(h=>h.key===c.key))]:n;return X(r,t)}function Sh(e,t,o,a){if(!e)return null;let s=so(e,a);return s?s.find(n=>n.key===t)??null:o?sn(o).find(n=>n.key===t)??null:S().get(e)?.fields.find(n=>n.key===t)??null}function no(e,t){return!e||!t?null:e.fields?.find(o=>o.key===t)??Sh(e.ownerType,t,e.owner,e.slot)}function oT(e,t){return no(e,t)?.plain===!0}function aT(e,t){return no(e,t)?.kind==="date"}function io(e,t=w){let o=e?.[t];return typeof o=="string"?o.trim():""}function sT(e,t){return e.key||String(t+1)}function nT(e){let t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(let[o,a]of Object.entries(e))typeof a=="string"&&(t[o]=a);return t}function iT(e,t){let o=e[be];return!t||!Array.isArray(o)||!o.length?!1:o.every(a=>typeof a!="string"||!t[a]?.trim())}var ro={Text:{text:w,href:x},ImageBlock:{src:w,href:x},ButtonBlock:{label:w,href:x},LogoBlock:{alt:w,href:x},Breadcrumb:{currentCrumb:w}},rT=ro,_h=new Set(["ButtonBlock.label","LogoBlock.alt"]);function lT(e,t,o){return Oh(e,t,o)&&!_h.has(`${e}.${o}`)}function Oh(e,t,o){return vh(e,t,o)!==""}function vh(e,t,o){let a=ro[e]?.[o];return a?io(t,a):""}function nn(e,t){return!t||!e?null:e[t]??""}function xh(e,t){return nn(e,t)?.trim()||void 0}function cT(e,t,o,a,s,n){if(!o)return t;let i=null;for(let[r,c]of Object.entries(ro[e]??{})){let h=io(t,c),_=nn(o,h);if(_!==null){if(i??={...t},c===x){i[r]=xh(o,h);continue}i[r]=no({ownerType:a,fields:s,slot:n},h)?.mark==="accentItalic"?Sa(_):_}}return i??t}function je(e,t){let o=e?.data?.content;if(!Array.isArray(o)||typeof t!="string")return;let a=(n,i)=>{for(let r of n){if(r?.props?.id===t)return i;for(let c of se(r??{})){let h=r.props[c],_=bh(r.type,c)?{owner:r,slot:c,direct:!0,nested:i!==null,underBox:!1}:i&&{owner:i.owner,slot:i.slot,direct:!1,nested:i.nested,underBox:i.underBox||r.type===f},O=a(h,_);if(O!==void 0)return O}}},s=a(o,null);return s===void 0?null:s}function kh(e,t){let o=je(e,t);return o&&o.owner}function Ah(e,t){let o=je(e,t);return o&&o.slot}function dT(e,t){let o=je(e,t);return o&&(o.direct?o.owner:null)}function hT(e,t){let o=je(e,t);if(o!==void 0)return o===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:o.nested,underBox:o.underBox}}function uT(e,t,o){if(t?.type!==A)return[];let a=kh(e,t.props?.id);if(!a){let r=Pe(v(t.props))?.fields,c=r?.length?r.map(O=>({...O})):Rh(t.props),h=(S().get(A)?.fields??[]).filter(O=>O.everySource&&!c.some(Qe=>Qe.key===O.key)),_=[...c,...h];return X(_,o)}let s=Ah(e,t.props?.id)??void 0,n=Eh(t.props,a.type,s),i=n&&sn(a,"list",s).find(r=>r.key===n)?.fields||[];return X(i,o)}function pT(e,t){return{[w]:"",[on]:e.map(o=>({...o})),[an]:t.map(o=>({...o}))}}function Rh(e,t){let o=e?.[an];if(!Array.isArray(o))return[];let a=o.flatMap(s=>{if(!s||typeof s!="object")return[];let{key:n,label:i,kind:r,multiline:c,alt:h,next:_}=s;if(typeof n!="string"||!n||typeof i!="string")return[];let O=r==="image"||r==="link"||r==="colour"||r==="date"?r:void 0;return[{key:n,label:i,...O?{kind:O}:{},...c===!0?{multiline:!0}:{},...typeof h=="string"&&h?{alt:h}:{},...typeof _=="string"&&_?{next:_}:{}}]});return X(a,t)}var tn="HostPart";function Xe(e){return`color-mix(in srgb, var(--overlay-scrim) ${Math.round(Math.min(1,Math.max(0,e))*1e3)/10}%, transparent)`}import{FOLLOW_RULES as Lh,VIEW_TIERS as Ch,resolveViewValue as Ih}from"efficient-easel/screen/lib/content/view-tiers";import{LENGTH_UNITS as Ph}from"efficient-easel/screen/lib/content/length-units";var Nh=["auto","fixed","screen","fill"],Hh=Ph.filter(e=>e==="px"||e==="%"),Dh="svh",Bh="vh",Mh="var(--sf-header-h, 88px)",Fh={min:40,max:2e3,step:10,fallback:600},Gh={min:10,max:200,step:5,fallback:100},Wh="sf-section-minh",Se="grid-cols-[minmax(0,1fr)]",rn={base:"--sf-section-minh",small:"--sf-section-minh-s"},co=e=>typeof e=="string"&&Nh.includes(e),Uh=e=>typeof e=="string"&&Hh.includes(e);function ze(e){let t=co(e.sectionHeightMode)?e.sectionHeightMode:"auto",o=t==="screen"?"%":Uh(e.sectionHeightUnit)?e.sectionHeightUnit:"px",a=t==="screen"?Gh.fallback:Fh.fallback,s=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:a;return{mode:t,value:s,unit:o}}function dn(e){let{mode:t,value:o,unit:a}=ze(e);if(t==="auto"||t==="fill")return;if(t==="fixed"&&a==="px")return[`${o}px`,null];let s=o/100,n=i=>t==="screen"?`(100${i} - ${Mh})`:`100${i}`;return[`calc(${n(Bh)} * ${s})`,`calc(${n(Dh)} * ${s})`]}function hn(e){let t=dn(e);if(!t)return;let[o,a]=t;return{display:"grid",[rn.base]:o,...a?{[rn.small]:a}:{}}}var bT=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),yT="Height",un="sf-section-minh-phone",ln={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function pn(e){return co(e.sectionHeightModePhone)}function Yh(e){return ze({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}var mn="sf-section-minh-tablet",cn={base:"--sf-section-minh-t",small:"--sf-section-minh-ts"};function fn(e){return co(e.sectionHeightModeTablet)}function Kh(e){return ze({sectionHeightMode:e.sectionHeightModeTablet,sectionHeightValue:e.sectionHeightValueTablet,sectionHeightUnit:e.sectionHeightUnitTablet})}function ho(e){let t=hn(e),o=(r,c,h)=>dn({sectionHeightMode:r,sectionHeightValue:c,sectionHeightUnit:h})??(t?["auto",null]:void 0),a=fn(e)?o(e.sectionHeightModeTablet,e.sectionHeightValueTablet,e.sectionHeightUnitTablet):void 0,s=pn(e)?o(e.sectionHeightModePhone,e.sectionHeightValuePhone,e.sectionHeightUnitPhone):a;if(!t&&!a&&!s)return null;let n=[Wh,Se],i={...t??{}};return a&&(n.push(mn),i[cn.base]=a[0],a[1]&&(i[cn.small]=a[1])),s&&(n.push(un),i[ln.base]=s[0],s[1]&&(i[ln.small]=s[1])),{className:n.join(" "),style:i}}function TT(e){return ho(e)!==null||qe(e).length>0}var lo=`grid ${Se}`,ET="h-full",$h="view-tablet:max-view-desktop:grid",wn="max-view-tablet:grid",Vh="view-wide:max-view-desktop:grid",jh="max-view-wide:grid",Xh=`${wn} ${Se}`;function ST(e,{atSectionLine:t=!1}={}){if(qe(e).length>0)return lo;let o=ho(e);if(!o)return"";if(hn(e))return lo;let a=o.className.split(" "),s=t?$h:Vh,n=t?wn:jh;if(!a.includes(mn))return t?Xh:`${n} ${Se}`;let i=a.includes(un);return[s,i?n:"",Se].filter(Boolean).join(" ")}var _T="data-sf-height-fill",zh=Ch,qh={desktop:"view-desktop:[.flex-col>&]:grow! view-desktop:[.flex-row>&]:self-stretch",tablet:"view-wide:max-view-desktop:[.flex-col>&]:grow! view-wide:max-view-desktop:[.flex-row>&]:self-stretch",mobile:"max-view-wide:[.flex-col>&]:grow!"};function qe(e){let t=e,o=Ih("heightMode",ze(t).mode,fn(t)?Kh(t).mode:null,pn(t)?Yh(t).mode:null,Lh),a={desktop:o.desktop==="fill",tablet:o.tablet==="fill",mobile:o.phone==="fill"};return zh.filter(s=>a[s])}function OT(e){return qe(e).map(t=>qh[t]).join(" ")}function vT(e){let t=ho(e);return qe(e).length===0?t:t?{className:`${t.className} grid`,style:t.style}:{className:lo}}function AT(e){switch(e){case"tall":return"aspect-[3/4]";case"wide":return"aspect-[2/1]";case"landscape":return"aspect-[4/3]";case"screen":return"aspect-[16/10]";case"portrait":return"aspect-[4/5]";case"video":return"aspect-[16/9]";case"panorama":return"aspect-[21/9]";case"story":return"aspect-[9/16]";case"poster":return"aspect-[2/3]";case"auto":return"";case"custom":return"aspect-[var(--shape-ratio)]";default:return"aspect-square"}}var uo=[{shape:"auto",image:"auto",ratio:null,label:"Auto"},{shape:"story",image:"9/16",ratio:[9,16],label:"Story 9:16"},{shape:"poster",image:"2/3",ratio:[2,3],label:"Poster 2:3"},{shape:"tall",image:"3/4",ratio:[3,4],label:"Tall 3:4"},{shape:"portrait",image:"4/5",ratio:[4,5],label:"Portrait 4:5"},{shape:"square",image:"1/1",ratio:[1,1],label:"Square 1:1"},{shape:"landscape",image:"4/3",ratio:[4,3],label:"Landscape 4:3"},{shape:"screen",image:"16/10",ratio:[16,10],label:"Screen 16:10"},{shape:"video",image:"16/9",ratio:[16,9],label:"Video 16:9"},{shape:"wide",image:"2/1",ratio:[2,1],label:"Wide 2:1"},{shape:"panorama",image:"21/9",ratio:[21,9],label:"Panorama 21:9"},{shape:"custom",image:"custom",ratio:null,label:"Custom W:H"}],RT="custom",Qh=/^(\d{1,4}(?:\.\d{1,2})?)\/(\d{1,4}(?:\.\d{1,2})?)$/;function gn(e){if(typeof e!="string")return null;let t=Qh.exec(e);if(!t)return null;let o=Number(t[1]),a=Number(t[2]);return o>0&&a>0?[o,a]:null}function Zh(e){return uo.every(t=>t.shape!==e&&t.image!==e)&&gn(e)!==null}function LT(e,t,o){let a=uo.find(s=>s.ratio!==null&&s.ratio[0]*t===s.ratio[1]*e);return a?a[o]:`${e}/${t}`}function Jh(e){return`${e[0]} / ${e[1]}`}var eu={desktop:"--shape-ratio",tablet:"--shape-ratio-tablet",phone:"--shape-ratio-phone"};function CT(e){let t={};for(let o of["desktop","phone","tablet"]){let a=Zh(e[o])?gn(e[o]):null;a&&(t[eu[o]]=Jh(a))}return Object.keys(t).length?t:null}function IT(e){return uo.filter(t=>e.includes(t.shape))}function PT(e){return e==="below"}var NT=`linear-gradient(180deg, transparent 40%, ${Xe(.85)} 100%)`,HT=`linear-gradient(0deg, transparent 40%, ${Xe(.85)} 100%)`,DT=Xe(.45);export{ae as a,I as b,Hl as c,df as d,Dl as e,hf as f,uf as g,pf as h,mf as i,ff as j,wf as k,Ct as l,Bl as m,Ml as n,gf as o,bf as p,Na as q,Pe as r,yf as s,Tf as t,v as u,Yl as v,Ef as w,w as x,x as y,d as z,A,be as B,U as C,Kl as D,Ba as E,se as F,Af as G,Rf as H,Lf as I,ql as J,Cf as K,fe as L,ee as M,Up as N,te as O,Yp as P,Lr as Q,Kp as R,$p as S,Vp as T,jp as U,Pr as V,Le as W,Zp as X,p as Y,f as Z,Fa as _,Hf as $,Df as aa,pe as ba,tu as ca,Ze as da,ou as ea,au as fa,su as ga,nu as ha,wi as ia,M as ja,gi as ka,lu as la,tm as ma,om as na,Dr as oa,am as pa,sm as qa,mm as ra,vt as sa,sl as ta,Ta as ua,ym as va,Tm as wa,Em as xa,Sa as ya,Sm as za,_m as Aa,Om as Ba,C as Ca,ne as Da,Wa as Ea,Ff as Fa,R as Ga,$f as Ha,lc as Ia,Y as Ja,cc as Ka,Vf as La,jf as Ma,Xf as Na,zf as Oa,qf as Pa,hc as Qa,Qf as Ra,Ka as Sa,k as Ta,Bt as Ua,Zf as Va,uc as Wa,pc as Xa,Va as Ya,Jf as Za,wc as _a,ew as $a,gc as ab,tw as bb,Ht as cb,ow as db,bc as eb,yc as fb,aw as gb,sw as hb,Xa as ib,Tc as jb,nw as kb,Ec as lb,qa as mb,Dt as nb,iw as ob,rw as pb,lw as qb,Oc as rb,vc as sb,cw as tb,dw as ub,hw as vb,uw as wb,Wo as xb,Fo as yb,hu as zb,uu as Ab,pu as Bb,mu as Cb,dl as Db,Ce as Eb,fw as Fb,ww as Gb,gw as Hb,Qa as Ib,De as Jb,bw as Kb,Lc as Lb,yw as Mb,Mt as Nb,Cc as Ob,Ew as Pb,Za as Qb,Sw as Rb,Nc as Sb,Hc as Tb,Dc as Ub,ts as Vb,vw as Wb,os as Xb,xw as Yb,as as Zb,Rw as _b,ss as $b,K as ac,Lw as bc,Cw as cc,Iw as dc,ls as ec,re as fc,Ww as gc,Uc as hc,Xc as ic,Uw as jc,Yw as kc,Gt as lc,Kw as mc,$w as nc,zc as oc,jw as pc,Xw as qc,zw as rc,qw as sc,Jc as tc,Qw as uc,td as vc,Zw as wc,Jw as xc,eg as yc,tg as zc,og as Ac,ag as Bc,sg as Cc,ng as Dc,ig as Ec,ps as Fc,ms as Gc,rg as Hc,lg as Ic,cg as Jc,dg as Kc,hg as Lc,ld as Mc,ug as Nc,pg as Oc,gs as Pc,mg as Qc,cd as Rc,dd as Sc,fg as Tc,wg as Uc,bs as Vc,b as Wc,E as Xc,pd as Yc,g as Zc,P as _c,md as $c,ys as ad,y as bd,_g as cd,Kt as dd,$t as ed,Vt as fd,T as gd,H as hd,xg as id,Es as jd,ce as kd,Ee as ld,u as md,de as nd,Me as od,gd as pd,_s as qd,Ss as rd,Td as sd,Os as td,Is as ud,Ds as vd,Lb as wd,jt as xd,Od as yd,ks as zd,Md as Ad,Hb as Bd,Wg as Cd,Ug as Dd,Yg as Ed,Kg as Fd,As as Gd,$g as Hd,Vg as Id,jg as Jd,Ld as Kd,Zg as Ld,Jg as Md,Fe as Nd,eb as Od,Ls as Pd,tb as Qd,ob as Rd,sb as Sd,nb as Td,ib as Ud,rb as Vd,Cs as Wd,lb as Xd,cb as Yd,Xt as Zd,Bb as _d,jb as $d,Yd as ae,qb as be,Ws as ce,qt as de,Zb as ee,Us as fe,Qt as ge,ry as he,ly as ie,cy as je,dy as ke,hy as le,uy as me,$s as ne,Qd as oe,Ye as pe,Jd as qe,Ks as re,py as se,my as te,fy as ue,eh as ve,Ue as we,wy as xe,gy as ye,B as ze,ky as Ae,en as Be,on as Ce,an as De,X as Ee,jy as Fe,fh as Ge,Xy as He,zy as Ie,qy as Je,Qy as Ke,Zy as Le,Jy as Me,eT as Ne,gh as Oe,bh as Pe,tT as Qe,yh as Re,Eh as Se,sn as Te,no as Ue,oT as Ve,aT as We,io as Xe,sT as Ye,nT as Ze,iT as _e,rT as $e,lT as af,Oh as bf,vh as cf,nn as df,xh as ef,cT as ff,kh as gf,Ah as hf,dT as if,hT as jf,uT as kf,pT as lf,tn as mf,et as nf,tt as of,Tu as pf,Eu as qf,xi as rf,ot as sf,Su as tf,ki as uf,_u as vf,Ou as wf,ku as xf,Xo as yf,Iu as zf,Pu as Af,Nu as Bf,Hu as Cf,Du as Df,ut as Ef,pt as Ff,Bu as Gf,Q as Hf,Ni as If,zo as Jf,Mu as Kf,Fu as Lf,J as Mf,Z as Nf,Bi as Of,Mi as Pf,Gu as Qf,Wu as Rf,ke as Sf,qo as Tf,Uu as Uf,Yu as Vf,Ku as Wf,ft as Xf,$u as Yf,Qo as Zf,Ki as _f,Vu as $f,ju as ag,Xu as bg,Vi as cg,zu as dg,qu as eg,Qu as fg,Zu as gg,Ju as hg,ep as ig,wt as jg,Ji as kg,tp as lg,op as mg,Ae as ng,or as og,ap as pg,gt as qg,$o as rg,sp as sg,np as tg,ar as ug,sr as vg,aa as wg,Re as xg,rr as yg,lr as zg,cr as Ag,sa as Bg,dr as Cg,na as Dg,lp as Eg,cp as Fg,dp as Gg,hp as Hg,me as Ig,ia as Jg,up as Kg,pp as Lg,bt as Mg,ra as Ng,mp as Og,fp as Pg,wp as Qg,yt as Rg,wr as Sg,br as Tg,Tp as Ug,Oa as Vg,Lm as Wg,Cm as Xg,Im as Yg,ul as Zg,pl as _g,Pm as $g,ml as ah,Nm as bh,Ie as ch,xa as dh,va as eh,bl as fh,yl as gh,Tl as hh,Mm as ih,El as jh,Fm as kh,oe as lh,Gm as mh,Wm as nh,Um as oh,_l as ph,Aa as qh,Ym as rh,Km as sh,$m as th,vl as uh,Vm as vh,kl as wh,Xe as xh,AT as yh,uo as zh,RT as Ah,gn as Bh,Zh as Ch,LT as Dh,Jh as Eh,CT as Fh,IT as Gh,PT as Hh,At as Ih,La as Jh,Xm as Kh,Il as Lh,Lt as Mh,Zm as Nh,Pl as Oh,Jm as Ph,Nh as Qh,Hh as Rh,Fh as Sh,Gh as Th,Se as Uh,ze as Vh,bT as Wh,yT as Xh,pn as Yh,fn as Zh,Kh as _h,TT as $h,lo as ai,ET as bi,ST as ci,_T as di,qe as ei,OT as fi,vT as gi,ca as hi,xp as ii,Pp as ji,kr as ki,Np as li,Hp as mi,Dp as ni,Bp as oi,Nl as pi,tf as qi};
@@ -1,4 +1,4 @@
1
- import{f as fs,g as hs}from"./chunk-KFZLLS45.js";import{a as T,b as Sr}from"./chunk-Y6SLVHK3.js";var Sn=T((ud,Ds)=>{"use strict";function Iu(i,e){this.v=i,this.k=e}function ps(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,r=Array(e);t<e;t++)r[t]=i[t];return r}function Lu(i){if(Array.isArray(i))return i}function Du(i,e){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var r,n,s,o,l=[],a=!0,h=!1;try{if(s=(t=t.call(i)).next,e===0){if(Object(t)!==t)return;a=!1}else for(;!(a=(r=s.call(t)).done)&&(l.push(r.value),l.length!==e);a=!0);}catch(f){h=!0,n=f}finally{try{if(!a&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(h)throw n}}return l}}function Ru(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{f as fs,g as hs}from"./chunk-UV27QVUD.js";import{a as T,b as Sr}from"./chunk-Y6SLVHK3.js";var Sn=T((ud,Ds)=>{"use strict";function Iu(i,e){this.v=i,this.k=e}function ps(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,r=Array(e);t<e;t++)r[t]=i[t];return r}function Lu(i){if(Array.isArray(i))return i}function Du(i,e){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var r,n,s,o,l=[],a=!0,h=!1;try{if(s=(t=t.call(i)).next,e===0){if(Object(t)!==t)return;a=!1}else for(;!(a=(r=s.call(t)).done)&&(l.push(r.value),l.length!==e);a=!0);}catch(f){h=!0,n=f}finally{try{if(!a&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(h)throw n}}return l}}function Ru(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nu(i,e){return Lu(i)||Du(i,e)||ku(i,e)||Ru()}function ku(i,e){if(i){if(typeof i=="string")return ps(i,e);var t={}.toString.call(i).slice(8,-1);return t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set"?Array.from(i):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ps(i,e):void 0}}function br(i){var e,t;function r(s,o){try{var l=i[s](o),a=l.value,h=a instanceof Iu;Promise.resolve(h?a.v:a).then(function(f){if(h){var _=s==="return"&&a.k?s:"next";if(!a.k||f.done)return r(_,f);f=i[_](f).value}n(!!l.done,f)},function(f){r("throw",f)})}catch(f){n(2,f)}}function n(s,o){s===2?e.reject(o):e.resolve({value:o,done:s}),(e=e.next)?r(e.key,e.arg):t=null}this._invoke=function(s,o){return new Promise(function(l,a){var h={key:s,arg:o,resolve:l,reject:a,next:null};t?t=t.next=h:(e=t=h,r(s,o))})},typeof i.return!="function"&&(this.return=void 0)}br.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},br.prototype.next=function(i){return this._invoke("next",i)},br.prototype.throw=function(i){return this._invoke("throw",i)},br.prototype.return=function(i){return this._invoke("return",i)};var xs=Object.entries,ds=Object.setPrototypeOf,Mu=Object.isFrozen,Fu=Object.getPrototypeOf,qu=Object.getOwnPropertyDescriptor,J=Object.freeze,re=Object.seal,vt=Object.create,Cs=typeof Reflect<"u"&&Reflect,vn=Cs.apply,wn=Cs.construct;J||(J=function(e){return e});re||(re=function(e){return e});vn||(vn=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),s=2;s<r;s++)n[s-2]=arguments[s];return e.apply(t,n)});wn||(wn=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return new e(...r)});var Ge=X(Array.prototype.forEach);Array.prototype.indexOf;var ju=X(Array.prototype.lastIndexOf),ms=X(Array.prototype.pop),kt=X(Array.prototype.push);Array.prototype.slice;var Uu=X(Array.prototype.splice),wt=Array.isArray,qt=X(String.prototype.toLowerCase),pn=X(String.prototype.toString),gs=X(String.prototype.match),Mt=X(String.prototype.replace),ys=X(String.prototype.indexOf),Bu=X(String.prototype.trim),zu=X(Number.prototype.toString),Wu=X(Boolean.prototype.toString),_s=typeof BigInt>"u"?null:X(BigInt.prototype.toString),vs=typeof Symbol>"u"?null:X(Symbol.prototype.toString),ue=X(Object.prototype.hasOwnProperty),Ft=X(Object.prototype.toString),oe=X(RegExp.prototype.test),ke=Hu(TypeError);function X(i){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return vn(i,e,r)}}function Hu(i){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return wn(i,t)}}function D(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:qt;if(ds&&ds(i,null),!wt(e))return i;let r=e.length;for(;r--;){let n=e[r];if(typeof n=="string"){let s=t(n);s!==n&&(Mu(e)||(e[r]=s),n=s)}i[n]=!0}return i}function Gu(i){for(let e=0;e<i.length;e++)ue(i,e)||(i[e]=null);return i}function he(i){let e=vt(null);for(let r of xs(i)){var t=Nu(r,2);let n=t[0],s=t[1];ue(i,n)&&(wt(s)?e[n]=Gu(s):s&&typeof s=="object"&&s.constructor===Object?e[n]=he(s):e[n]=s)}return e}function Yu(i){switch(typeof i){case"string":return i;case"number":return zu(i);case"boolean":return Wu(i);case"bigint":return _s?_s(i):"0";case"symbol":return vs?vs(i):"Symbol()";case"undefined":return Ft(i);case"function":case"object":{if(i===null)return Ft(i);let e=i,t=me(e,"toString");if(typeof t=="function"){let r=t(e);return typeof r=="string"?r:Ft(r)}return Ft(i)}default:return Ft(i)}}function me(i,e){for(;i!==null;){let r=qu(i,e);if(r){if(r.get)return X(r.get);if(typeof r.value=="function")return X(r.value)}i=Fu(i)}function t(){return null}return t}function $u(i){try{return oe(i,""),!0}catch{return!1}}var ws=J(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),dn=J(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),mn=J(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Vu=J(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),gn=J(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Qu=J(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ss=J(["#text"]),bs=J(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),yn=J(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ts=J(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Tr=J(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Xu=re(/{{[\w\W]*|^[\w\W]*}}/g),Ku=re(/<%[\w\W]*|^[\w\W]*%>/g),Ju=re(/\${[\w\W]*/g),Zu=re(/^data-[\-\w.\u00B7-\uFFFF]+$/),el=re(/^aria-[\-\w]+$/),Es=re(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tl=re(/^(?:\w+script|data):/i),rl=re(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),nl=re(/^html$/i),il=re(/^[a-z][.\w]*(-[.\w]+)+$/i),Os=re(/<[/\w!]/g),As=re(/<[/\w]/g),sl=re(/<\/no(script|embed|frames)/i),ol=re(/\/>/i),fe={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Is=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],al=J(D({},Is)),ul=(function(){let i={};return Ge(Is,e=>{i[e]=re(new RegExp("</"+e+"(?=[\\t\\n\\f\\r />])","i"))}),J(i)})(),ll=function(){return typeof window>"u"?null:window},cl=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null,n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(r=t.getAttribute(n));let s="dompurify"+(r?"#"+r:"");try{return e.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Ps=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Me=function(e,t,r,n){return ue(e,t)&&wt(e[t])?D(n.base?he(n.base):{},e[t],n.transform):r},_n=function(e,t,r){let n=ue(e,t)?e[t]:void 0;return n&&typeof n=="object"?he(n):r()};function Ls(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ll(),e=y=>Ls(y);if(e.version="3.4.16",e.removed=[],!i||!i.document||i.document.nodeType!==fe.document||!i.Element)return e.isSupported=!1,e;let t=i.document,r=t,n=r.currentScript;i.DocumentFragment;let s=i.HTMLTemplateElement,o=i.Node,l=i.Element,a=i.NodeFilter;i.NamedNodeMap===void 0&&(i.NamedNodeMap||i.MozNamedAttrMap),i.HTMLFormElement;let h=i.DOMParser,f=i.trustedTypes,_=l.prototype,p=me(_,"cloneNode"),d=me(_,"remove"),v=me(_,"removeAttributeNode"),x=me(_,"nextSibling"),E=me(_,"childNodes"),U=me(_,"parentNode"),Y=me(_,"shadowRoot"),K=me(_,"attributes"),k=o&&o.prototype?me(o.prototype,"nodeType"):null,V=o&&o.prototype?me(o.prototype,"nodeName"):null,Q=o&&o.prototype?me(o.prototype,"ownerDocument"):null,ee=function(u){return k?k(u):u.nodeType},Se=function(u){return V?V(u):u.nodeName};if(typeof s=="function"){let y=t.createElement("template");y.content&&y.content.ownerDocument&&(t=y.content.ownerDocument)}let te,pe="",Lt,ar=!1,Be=0,Ni=function(){if(Be>0)throw ke('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},ct=function(u){Ni(),Be++;try{return te.createHTML(u)}finally{Be--}},ru=function(u){Ni(),Be++;try{return te.createScriptURL(u)}finally{Be--}},nu=function(){return ar||(Lt=cl(f,n),ar=!0),Lt},ur=t,Xr=ur.implementation,ki=ur.createNodeIterator,iu=ur.createDocumentFragment,su=ur.getElementsByTagName,ou=r.importNode,B=Ps();e.isSupported=typeof xs=="function"&&typeof U=="function"&&Xr&&Xr.createHTMLDocument!==void 0;let au=Xu,uu=Ku,lu=Ju,cu=Zu,fu=el,hu=tl,Mi=rl,pu=il,Fi=Es,z=null,Kr=D({},[...ws,...dn,...mn,...gn,...Ss]),W=null,Jr=D({},[...bs,...yn,...Ts,...Tr]),be=Object.seal(vt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Dt=null,qi=null,De=Object.seal(vt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ji=!0,Zr=!0,Ui=!1,Bi=!0,Re=!1,ze=!0,We=!1,en=!1,lr=null,cr=null,tn=!1,ft=!1,fr=!1,hr=!1,zi=!0,Wi=!1,Hi="user-content-",rn=!0,nn=!1,ht={},pt=null,Gi=D({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Yi=null,$i=D({},["audio","video","img","source","image","track"]),Vi=null,Qi=D({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pr="http://www.w3.org/1998/Math/MathML",dr="http://www.w3.org/2000/svg",Te="http://www.w3.org/1999/xhtml",dt=Te,sn=!1,on=null,du=D({},[pr,dr,Te],pn),Xi=J(["mi","mo","mn","ms","mtext"]),an=D({},Xi),Ki=J(["annotation-xml"]),un=D({},Ki),mu=D({},["title","style","font","a","script"]),Rt=null,gu=["application/xhtml+xml","text/html"],yu="text/html",$=null,mt=null,_u=t.createElement("form"),Ji=function(u){return u instanceof RegExp||u instanceof Function},ln=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(mt&&mt===u)return;(!u||typeof u!="object")&&(u={}),u=he(u),Rt=gu.indexOf(u.PARSER_MEDIA_TYPE)===-1?yu:u.PARSER_MEDIA_TYPE,$=Rt==="application/xhtml+xml"?pn:qt,z=Me(u,"ALLOWED_TAGS",Kr,{transform:$}),W=Me(u,"ALLOWED_ATTR",Jr,{transform:$}),on=Me(u,"ALLOWED_NAMESPACES",du,{transform:pn}),Vi=Me(u,"ADD_URI_SAFE_ATTR",Qi,{transform:$,base:Qi}),Yi=Me(u,"ADD_DATA_URI_TAGS",$i,{transform:$,base:$i}),pt=Me(u,"FORBID_CONTENTS",Gi,{transform:$}),Dt=Me(u,"FORBID_TAGS",he({}),{transform:$}),qi=Me(u,"FORBID_ATTR",he({}),{transform:$}),ht=ue(u,"USE_PROFILES")?u.USE_PROFILES&&typeof u.USE_PROFILES=="object"?he(u.USE_PROFILES):u.USE_PROFILES:!1,ji=u.ALLOW_ARIA_ATTR!==!1,Zr=u.ALLOW_DATA_ATTR!==!1,Ui=u.ALLOW_UNKNOWN_PROTOCOLS||!1,Bi=u.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Re=u.SAFE_FOR_TEMPLATES||!1,ze=u.SAFE_FOR_XML!==!1,We=u.WHOLE_DOCUMENT||!1,ft=u.RETURN_DOM||!1,fr=u.RETURN_DOM_FRAGMENT||!1,hr=u.RETURN_TRUSTED_TYPE||!1,tn=u.FORCE_BODY||!1,zi=u.SANITIZE_DOM!==!1,Wi=u.SANITIZE_NAMED_PROPS||!1,rn=u.KEEP_CONTENT!==!1,nn=u.IN_PLACE||!1,Fi=$u(u.ALLOWED_URI_REGEXP)?u.ALLOWED_URI_REGEXP:Es,dt=typeof u.NAMESPACE=="string"?u.NAMESPACE:Te,an=_n(u,"MATHML_TEXT_INTEGRATION_POINTS",()=>D({},Xi)),un=_n(u,"HTML_INTEGRATION_POINTS",()=>D({},Ki));let c=_n(u,"CUSTOM_ELEMENT_HANDLING",()=>vt(null));if(be=vt(null),ue(c,"tagNameCheck")&&Ji(c.tagNameCheck)&&(be.tagNameCheck=c.tagNameCheck),ue(c,"attributeNameCheck")&&Ji(c.attributeNameCheck)&&(be.attributeNameCheck=c.attributeNameCheck),ue(c,"allowCustomizedBuiltInElements")&&typeof c.allowCustomizedBuiltInElements=="boolean"&&(be.allowCustomizedBuiltInElements=c.allowCustomizedBuiltInElements),re(be),Re&&(Zr=!1),fr&&(ft=!0),ht&&(z=D({},Ss),W=vt(null),ht.html===!0&&(D(z,ws),D(W,bs)),ht.svg===!0&&(D(z,dn),D(W,yn),D(W,Tr)),ht.svgFilters===!0&&(D(z,mn),D(W,yn),D(W,Tr)),ht.mathMl===!0&&(D(z,gn),D(W,Ts),D(W,Tr))),De.tagCheck=null,De.attributeCheck=null,ue(u,"ADD_TAGS")&&(typeof u.ADD_TAGS=="function"?De.tagCheck=u.ADD_TAGS:wt(u.ADD_TAGS)&&(z===Kr&&(z=he(z)),D(z,u.ADD_TAGS,$))),ue(u,"ADD_ATTR")&&(typeof u.ADD_ATTR=="function"?De.attributeCheck=u.ADD_ATTR:wt(u.ADD_ATTR)&&(W===Jr&&(W=he(W)),D(W,u.ADD_ATTR,$))),ue(u,"ADD_FORBID_CONTENTS")&&wt(u.ADD_FORBID_CONTENTS)&&(pt===Gi&&(pt=he(pt)),D(pt,u.ADD_FORBID_CONTENTS,$)),rn&&(z["#text"]=!0),We&&D(z,["html","head","body"]),z.table&&(D(z,["tbody"]),delete Dt.tbody),u.TRUSTED_TYPES_POLICY){if(typeof u.TRUSTED_TYPES_POLICY.createHTML!="function")throw ke('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof u.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ke('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let g=te;te=u.TRUSTED_TYPES_POLICY;try{pe=ct("")}catch(w){throw te=g,w}}else u.TRUSTED_TYPES_POLICY===null?(te=void 0,pe=""):(te===void 0&&(te=nu()),te&&typeof pe=="string"&&(pe=ct("")));J&&J(u),mt=u},Zi=D({},[...dn,...mn,...Vu]),es=D({},[...gn,...Qu]),vu=function(u,c,g){return c.namespaceURI===Te?u==="svg":c.namespaceURI===pr?u==="svg"&&(g==="annotation-xml"||an[g]):!!Zi[u]},wu=function(u,c,g){return c.namespaceURI===Te?u==="math":c.namespaceURI===dr?u==="math"&&un[g]:!!es[u]},Su=function(u,c,g){return c.namespaceURI===dr&&!un[g]||c.namespaceURI===pr&&!an[g]?!1:!es[u]&&(mu[u]||!Zi[u])},bu=function(u){let c=U(u);(!c||!c.tagName)&&(c={namespaceURI:dt,tagName:"template"});let g=qt(u.tagName),w=qt(c.tagName);return on[u.namespaceURI]?u.namespaceURI===dr?vu(g,c,w):u.namespaceURI===pr?wu(g,c,w):u.namespaceURI===Te?Su(g,c,w):!!(Rt==="application/xhtml+xml"&&on[u.namespaceURI]):!1},Ne=function(u){kt(e.removed,{element:u});try{U(u).removeChild(u)}catch{if(d(u),!U(u))throw ke("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},ts=function(u,c,g){try{v(u,c)}catch{try{u.removeAttribute(g)}catch{}}},mr=function(u){gr(u);let c=E(u);if(c){let w=[];Ge(c,A=>{kt(w,A)}),Ge(w,A=>{try{d(A)}catch{}})}let g=K(u);if(g)for(let w=g.length-1;w>=0;--w){let A=g[w],C=A&&A.name;typeof C=="string"&&ts(u,A,C)}},He=function(u,c,g){if(!g)try{g=c.getAttributeNode(u)}catch{g=null}kt(e.removed,{attribute:g||null,from:c});try{g?v(c,g):c.removeAttribute(u)}catch{try{c.removeAttribute(u)}catch{}}if(u==="is")if(ft||fr)try{Ne(c)}catch{}else try{c.setAttribute(u,"")}catch{}},Tu=function(u){let c=K(u);if(c)for(let g=c.length-1;g>=0;--g){let w=c[g],A=w&&w.name;typeof A!="string"||W[$(A)]||ts(u,w,A)}},gr=function(u){let c=[u];for(;c.length>0;){let g=c.pop();ee(g)===fe.element&&Tu(g);let w=E(g);if(w)for(let A=w.length-1;A>=0;--A)c.push(w[A])}},rs=function(u,c){return ze?u==="patchsrc"?!0:u==="for"&&c!=="label"&&c!=="output":!1},Eu=function(u){if(!ze)return;let c=[u];for(;c.length>0;){let g=c.pop(),w=ee(g);if(w===fe.processingInstruction||w===fe.comment&&oe(As,g.data)){try{d(g)}catch{}continue}if(w===fe.element){let C=g,L=$(Se(g));try{C.hasAttribute&&C.hasAttribute("patchsrc")&&C.removeAttribute("patchsrc"),C.hasAttribute&&C.hasAttribute("for")&&rs("for",L)&&C.removeAttribute("for")}catch{}}let A=E(g);if(A)for(let C=A.length-1;C>=0;--C)c.push(A[C])}},ns=function(u){let c=null,g=null;if(tn)u="<remove></remove>"+u;else{let C=gs(u,/^[\r\n\t ]+/);g=C&&C[0]}Rt==="application/xhtml+xml"&&dt===Te&&(u='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+u+"</body></html>");let w=te?ct(u):u;if(dt===Te)try{c=new h().parseFromString(w,Rt)}catch{}if(!c||!c.documentElement){c=Xr.createDocument(dt,"template",null);try{c.documentElement.innerHTML=sn?pe:w}catch{}}let A=c.body||c.documentElement;return u&&g&&A.insertBefore(t.createTextNode(g),A.childNodes[0]||null),dt===Te?su.call(c,We?"html":"body")[0]:We?c.documentElement:A},is=function(u){let c=Q?Q(u):u.ownerDocument;return ki.call(c||u,u,a.SHOW_ELEMENT|a.SHOW_COMMENT|a.SHOW_TEXT|a.SHOW_PROCESSING_INSTRUCTION|a.SHOW_CDATA_SECTION,null)},yr=function(u){return u=Mt(u,au," "),u=Mt(u,uu," "),u=Mt(u,lu," "),u},cn=function(u){var c;u.normalize();let g=Q?Q(u):u.ownerDocument,w=ki.call(g||u,u,a.SHOW_TEXT|a.SHOW_COMMENT|a.SHOW_CDATA_SECTION|a.SHOW_PROCESSING_INSTRUCTION,null),A=w.nextNode();for(;A;)A.data=yr(A.data),A=w.nextNode();let C=(c=u.querySelectorAll)===null||c===void 0?void 0:c.call(u,"template");C&&Ge(C,L=>{gt(L.content)&&cn(L.content)})},_r=function(u){let c=V?V(u):null;return typeof c!="string"||$(c)!=="form"?!1:typeof u.nodeName!="string"||typeof u.textContent!="string"||typeof u.removeChild!="function"||u.attributes!==K(u)||typeof u.removeAttribute!="function"||typeof u.removeAttributeNode!="function"||typeof u.getAttributeNode!="function"||typeof u.setAttribute!="function"||typeof u.namespaceURI!="string"||typeof u.insertBefore!="function"||typeof u.hasChildNodes!="function"||u.nodeType!==k(u)||u.childNodes!==E(u)},gt=function(u){if(!k||typeof u!="object"||u===null)return!1;try{return k(u)===fe.documentFragment}catch{return!1}},Nt=function(u){if(!k||typeof u!="object"||u===null)return!1;try{return typeof k(u)=="number"}catch{return!1}};function Ee(y,u,c){y.length!==0&&Ge(y,g=>{g.call(e,u,c,mt)})}let Ou=function(u,c){return!!(ze&&u.hasChildNodes()&&!Nt(u.firstElementChild)&&oe(Os,u.textContent)&&oe(Os,u.innerHTML)||ze&&u.namespaceURI===Te&&al[c]&&(Nt(u.firstElementChild)||typeof u.textContent=="string"&&oe(ul[c],u.textContent))||u.nodeType===fe.processingInstruction||ze&&u.nodeType===fe.comment&&oe(As,u.data))},vr=function(u,c){if(u instanceof RegExp)return oe(u,c);if(u instanceof Function){for(var g=arguments.length,w=new Array(g>2?g-2:0),A=2;A<g;A++)w[A-2]=arguments[A];return!!u(c,...w)}return!1},Au=function(u,c,g){if(!Dt[c]&&us(c)&&vr(be.tagNameCheck,c))return!1;if(rn&&!pt[c]){let w=U(u),A=E(u);if(A&&w){let C=A.length;for(let L=C-1;L>=0;--L){let G=u===g?p(A[L],!0):A[L];w.insertBefore(G,x(u))}}}return Ne(u),!0},ss=function(u,c,g,w){return u.length===0?c:c===g||c===w?he(c):c},yt=function(u,c){return u===c||U(u)!==null?!1:(nn&&gr(u),!0)},os=function(u,c){if(Ee(B.beforeSanitizeElements,u,null),yt(u,c))return!0;if(_r(u))return Ne(u),!0;let g=$(Se(u));if(z=ss(B.uponSanitizeElement,z,Kr,lr),Ee(B.uponSanitizeElement,u,{tagName:g,allowedTags:z}),yt(u,c))return!0;if(Ou(u,g))return Ne(u),!0;if(Dt[g]||!(De.tagCheck instanceof Function&&De.tagCheck(g))&&!z[g]){let w=Au(u,g,c);return w===!1&&(Ee(B.afterSanitizeElements,u,null),yt(u,c))?!0:w}if(ee(u)===fe.element&&!bu(u)||(g==="noscript"||g==="noembed"||g==="noframes")&&oe(sl,u.innerHTML))return Ne(u),!0;if(Re&&u.nodeType===fe.text){let w=yr(u.textContent);u.textContent!==w&&(kt(e.removed,{element:u.cloneNode()}),u.textContent=w)}return Ee(B.afterSanitizeElements,u,null),yt(u,c)},as=function(u,c,g){if(qi[c]||rs(c,u)||zi&&(c==="id"||c==="name")&&(g in t||g in _u))return!1;let w=W[c]||De.attributeCheck instanceof Function&&De.attributeCheck(c,u);return Zr&&oe(cu,c)||ji&&oe(fu,c)?!0:w?Vi[c]||oe(Fi,Mt(g,Mi,""))||(c==="src"||c==="xlink:href"||c==="href")&&u!=="script"&&ys(g,"data:")===0&&Yi[u]||Ui&&!oe(hu,Mt(g,Mi,""))?!0:!g:us(u)&&vr(be.tagNameCheck,u)&&vr(be.attributeNameCheck,c,u)||c==="is"&&be.allowCustomizedBuiltInElements&&vr(be.tagNameCheck,g)},Pu=D({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),us=function(u){return!Pu[qt(u)]&&oe(pu,u)},xu=function(u,c,g,w){if(te&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!g)switch(f.getAttributeType(u,c)){case"TrustedHTML":return ct(w);case"TrustedScriptURL":return ru(w)}return w},Cu=function(u,c,g,w){try{return g?u.setAttributeNS(g,c,w):u.setAttribute(c,w),_r(u)?(Ne(u),!1):!0}catch{return He(c,u),!1}},ls=function(u,c){if(Ee(B.beforeSanitizeAttributes,u,null),yt(u,c))return;let g=u.attributes;if(!g||_r(u))return;W=ss(B.uponSanitizeAttribute,W,Jr,cr);let w={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0},A=g.length,C=$(u.nodeName);for(;A--;){let L=g[A],G=L.name,de=L.namespaceURI,ce=L.value,_t=$(G),hn=ce,ae=G==="value"?hn:Bu(hn),cs=!1;if(w.attrName=_t,w.attrValue=ae,w.keepAttr=!0,w.forceKeepAttr=void 0,Ee(B.uponSanitizeAttribute,u,w),ae=w.attrValue,Wi&&(_t==="id"||_t==="name")&&ys(ae,Hi)!==0&&(He(G,u,L),ae=Hi+ae,cs=!0),ze&&oe(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ae)){He(G,u,L);continue}if(_t==="attributename"&&gs(ae,"href")){He(G,u,L);continue}if(!w.forceKeepAttr){if(!w.keepAttr){He(G,u,L);continue}if(!Bi&&oe(ol,ae)){He(G,u,L);continue}if(Re&&(ae=yr(ae)),!as(C,_t,ae)){He(G,u,L);continue}ae=xu(C,_t,de,ae),ae!==hn&&Cu(u,G,de,ae)&&cs&&ms(e.removed)}}Ee(B.afterSanitizeAttributes,u,null),yt(u,c)},wr=function(u){let c=null,g=is(u);for(Ee(B.beforeSanitizeShadowDOM,u,null);c=g.nextNode();)if(Ee(B.uponSanitizeShadowNode,c,null),os(c,u),ls(c,u),gt(c.content)&&wr(c.content),ee(c)===fe.element){let w=Y(c);gt(w)&&(fn(w),wr(w))}Ee(B.afterSanitizeShadowDOM,u,null)},fn=function(u){let c=[{node:u,shadow:null}];for(;c.length>0;){let g=c.pop();if(g.shadow){wr(g.shadow);continue}let w=g.node,A=ee(w)===fe.element,C=E(w);if(C)for(let L=C.length-1;L>=0;--L)c.push({node:C[L],shadow:null});if(A){let L=V?V(w):null;if(typeof L=="string"&&$(L)==="template"){let G=w.content;gt(G)&&c.push({node:G,shadow:null})}}if(A){let L=Y(w);gt(L)&&c.push({node:null,shadow:L},{node:L,shadow:null})}}};return e.sanitize=function(y){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=null,g=null,w=null,A=null;if(sn=!y,sn&&(y="<!-->"),typeof y!="string"&&!Nt(y)&&(y=Yu(y),typeof y!="string"))throw ke("dirty is not a string, aborting");if(!e.isSupported)return y;en?(z=lr,W=cr):ln(u),(B.uponSanitizeElement.length>0||B.uponSanitizeAttribute.length>0)&&(z=he(z)),B.uponSanitizeAttribute.length>0&&(W=he(W)),e.removed=[];let C=nn&&typeof y!="string"&&Nt(y);if(C){Eu(y);let de=Se(y);if(typeof de=="string"){let ce=$(de);if(!z[ce]||Dt[ce])throw mr(y),ke("root node is forbidden and cannot be sanitized in-place")}if(_r(y))throw mr(y),ke("root node is clobbered and cannot be sanitized in-place");try{fn(y)}catch(ce){throw mr(y),ce}}else if(Nt(y))c=ns("<!---->"),g=c.ownerDocument.importNode(y,!0),g.nodeType===fe.element&&g.nodeName==="BODY"||g.nodeName==="HTML"?c=g:c.appendChild(g),fn(c);else{if(!ft&&!Re&&!We&&y.indexOf("<")===-1)return te&&hr?ct(y):y;if(c=ns(y),!c)return ft?null:hr?pe:""}c&&tn&&Ne(c.firstChild);let L=C?y:c;try{let de=is(L);for(;w=de.nextNode();)os(w,L),ls(w,L),gt(w.content)&&wr(w.content)}catch(de){throw C&&(mr(y),Ge(e.removed,ce=>{ce.element&&gr(ce.element)})),de}if(C){let de=!1;if(Ge(e.removed,ce=>{ce.element&&(ce.element===y&&(de=!0),gr(ce.element))}),de)throw ke("a node selected for removal could not be safely returned; refusing to sanitize in place");return Re&&cn(y),y}if(ft){if(Re&&cn(c),fr)for(A=iu.call(c.ownerDocument);c.firstChild;)A.appendChild(c.firstChild);else A=c;return(W.shadowroot||W.shadowrootmode)&&(A=ou.call(r,A,!0)),A}let G=We?c.outerHTML:c.innerHTML;return We&&z["!doctype"]&&c.ownerDocument&&c.ownerDocument.doctype&&c.ownerDocument.doctype.name&&oe(nl,c.ownerDocument.doctype.name)&&(G="<!DOCTYPE "+c.ownerDocument.doctype.name+`>
3
3
  `+G),Re&&(G=yr(G)),te&&hr?ct(G):G},e.setConfig=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ln(y),en=!0,lr=z,cr=W},e.clearConfig=function(){mt=null,en=!1,lr=null,cr=null,te=Lt,pe=""},e.isValidAttribute=function(y,u,c){mt||ln({});let g=$(y),w=$(u);return as(g,w,c)},e.addHook=function(y,u){typeof u=="function"&&ue(B,y)&&kt(B[y],u)},e.removeHook=function(y,u){if(ue(B,y)){if(u!==void 0){let c=ju(B[y],u);return c===-1?void 0:Uu(B[y],c,1)[0]}return ms(B[y])}},e.removeHooks=function(y){ue(B,y)&&(B[y]=[])},e.removeAllHooks=function(){B=Ps()},e}var fl=Ls();Ds.exports=fl});var Ns=T((ld,bn)=>{"use strict";var P=String,Rs=function(){return{isColorSupported:!1,reset:P,bold:P,dim:P,italic:P,underline:P,inverse:P,hidden:P,strikethrough:P,black:P,red:P,green:P,yellow:P,blue:P,magenta:P,cyan:P,white:P,gray:P,bgBlack:P,bgRed:P,bgGreen:P,bgYellow:P,bgBlue:P,bgMagenta:P,bgCyan:P,bgWhite:P,blackBright:P,redBright:P,greenBright:P,yellowBright:P,blueBright:P,magentaBright:P,cyanBright:P,whiteBright:P,bgBlackBright:P,bgRedBright:P,bgGreenBright:P,bgYellowBright:P,bgBlueBright:P,bgMagentaBright:P,bgCyanBright:P,bgWhiteBright:P}};bn.exports=Rs();bn.exports.createColors=Rs});var Tn=T(()=>{"use strict"});var Er=T((hd,Fs)=>{"use strict";var ks=Ns(),Ms=Tn(),jt=class i extends Error{constructor(e,t,r,n,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,i)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=ks.isColorSupported);let r=f=>f,n=f=>f,s=f=>f;if(e){let{bold:f,gray:_,red:p}=ks.createColors(!0);n=d=>f(p(d)),r=d=>_(d),Ms&&(s=d=>Ms(d))}let o=t.split(/\r?\n/),l=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),h=String(a).length;return o.slice(l,a).map((f,_)=>{let p=l+1+_,d=" "+(" "+p).slice(-h)+" | ";if(p===this.line){if(f.length>160){let x=20,E=typeof this.endColumn=="number"?this.endColumn:this.column,U=Math.max(0,this.column-x),Y=Math.max(this.column+x,E+x),K=f.slice(U,Y),k=r(d.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,x-1)).replace(/[^\t]/g," ");return n(">")+r(d)+s(K)+`
4
4
  `+k+n("^")}let v=r(d.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(d)+s(f)+`
@@ -1 +1 @@
1
- import{S as Se,_ as _t,aa as Rt,ba as Nt,da as q,g as wt}from"./chunk-T2LZCAFH.js";import{O as xt,aa as Ve,ba as Xe,da as St,ka as Ye,la as Pt}from"./chunk-O3YXHDC6.js";import{j as pe}from"./chunk-NMB6BD73.js";import{pi as xe,qi as Et,tf as Ct}from"./chunk-MU65AZLZ.js";import{c as vt}from"./chunk-AUQZLQEO.js";import{createContext as Ln,useContext as Ot,useEffect as An,useMemo as ve,useState as At}from"react";function It(e,t){return e.map(n=>({partNumber:n.partNumber,quantity:n.wheels*t}))}function me(e,t){if(e.length===0)return null;let n=0;for(let r of e){let o=r.prices?.[t];if(typeof o!="number"||!Number.isFinite(o)||o<=0)return null;n+=o*r.wheels}return n}var Qe=4,Yr=1,Qr={unit:"set",spares:0,spareSide:"left"};function Lt(e){return e.unit==="single"?1:Qe+e.spares}function jr(e,t){return[{partNumber:e.partNumber,wheels:Lt(t),prices:e.prices}]}function Zr(e,t){let n=Lt(t)-Qe;if(n<=0||e.length===0)return e;let r=Nn(e),o=r?r[t.spareSide]:0;return e.map((i,a)=>a===o?{...i,wheels:i.wheels+n}:i)}function Nn(e){let t,n;for(let r=0;r<e.length;r+=1){let o=e[r].hand;if(o!=="left"&&o!=="right")continue;if((o==="left"?t:n)!==void 0)return null;o==="left"?t=r:n=r}return t!==void 0&&n!==void 0?{left:t,right:n}:null}function kn(e,t){return t.spares>0?`${e} + spare`:e}function Jr(e){return e.unit==="single"?"Single":kn(`Set of ${Qe}`,e)}var eo="data-add-to-basket",je=9,In="en",kt=new Map;function Me(e,t,n){let r=`${e}|${t??""}|${n??""}`,o=kt.get(r);return o||(o=new Intl.NumberFormat(In,{style:"currency",currency:e,...t===void 0?{}:{minimumFractionDigits:t},...n===void 0?{}:{maximumFractionDigits:n}}),kt.set(r,o)),o}function j(e,t,n=0){return Me(t,0,n).format(e)}function to(e,t){return Me(t).format(e)}function no(e,t){let n=e.savings[t];if(n===void 0)return null;let r=j(n,t);return e.savingIsFrom?`Save from ${r}`:`Save ${r}`}import{jsx as Dn}from"react/jsx-runtime";var Tn="storefront-country",Tt=Tn,Ze=Ln(null);function On(e){return Mt(e,"catalogue")}function Mn(e){return Mt(e,"money")}function Mt(e,t){let n=new Map(e.map(r=>[r.code,r.decimalPlaces]));return(r,o)=>{if(!o)return"";let i=n.get(o)??0;return Me(o,t==="money"?i:0,i).format(r)}}function so({children:e,currencies:t,countries:n,defaultCurrency:r,defaultCountry:o}){let i=ve(()=>t??[],[t]),a=ve(()=>n??[],[n]),l=ve(()=>r||i.find(g=>g.isDefault)?.code||i[0]?.code||"",[r,i]),c=ve(()=>o||a.find(g=>g.isDefault)?.code||a[0]?.code||"",[o,a]),[u,m]=At(c),[C,d]=At(!1);An(()=>{let g=pe.getItem(Tt);g&&a.some(L=>L.code===g)&&m(g),d(!0)},[a]);function _(g){m(g),pe.setItem(Tt,g)}let k=ve(()=>{let g=a.find(b=>b.code===u)??null,L=g?.currency,I=L&&i.some(b=>b.code===L)?L:l,M=On(i),v=Mn(i);return{country:u,currency:I,setCountry:_,currencies:i,countries:a,activeCountry:g,formatPrice:(b,D)=>M(b,D??I),formatMoney:(b,D)=>v(b,D??I),ready:C}},[u,i,a,l,C]);return Dn(Ze.Provider,{value:k,children:e})}function Dt(e){let t=Ot(Ze);if(!t&&!e?.optional)throw new Error("useCurrency must be used within a CurrencyProvider");return t}function lo(){return Ot(Ze)?.country??""}import{createContext as Qn,useCallback as w,useContext as jn,useEffect as X,useMemo as jt,useRef as Z,useState as N}from"react";function Ft(){return"/edit"}function $t(e,t){return e.valid?!1:e.reason==="firstOrderOnly"?!0:e.reason==="notEligible"&&!t}var Ht="We'll confirm this discount when you place your order.",mo="Confirmed at checkout";function go(e){return e&&(e.valid||e.deferred)?e.code:void 0}var Ut="coupon_code: ";function ho(e){return!(e instanceof Se)||e.status!==400||!e.message.startsWith(Ut)?null:e.message.slice(Ut.length)}function Bt(e,t){return e.map(n=>({qty:n.qty,slug:n.slug,name:`${n.name.lead}${n.name.accent}`.trim(),finish:n.finishName,size:n.size,kind:n.kind,sku:n.sku,pack:n.pack,priceLabel:t(n)}))}var De="Price on request",Un="Request a quote",qt="from ",xo="From ",So="each",Wt="Free",vo="Updating";function Je(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function et(e,t){let n=e?.[t];return Je(n)?n:null}function Eo(e,t,n,r){let o=et(e,n),i=et(t,n);return o===null&&i===null?0:o===null?1:i===null?-1:r==="asc"?o-i:i-o}function Po(e,t,n,r){if(n==null&&r==null)return!0;let o=et(e,t);return!(o===null||n!=null&&o<n||r!=null&&o>r)}var $n={priced:!1,unit:null,was:null,onSale:!1,setTotal:null};function Hn(e,t,n){if(!Je(e))return $n;let r=Je(t)&&t>e?t:null;return{priced:!0,unit:e,was:r,onSale:r!==null,setTotal:n!=null?e*n:null}}function wo(e,t,n=""){return!e.priced||e.unit==null?De:`${n}${j(e.unit,t)}`}function _o(e,t){return e.was==null?null:j(e.was,t)}function Bn(e,t,n=1){let r=me(e,t);if(r===null)return{priced:!1,unit:null,isFrom:!1,setTotal:null};let o=e.reduce((a,l)=>a+l.wheels,0),i=Math.min(...e.map(a=>a.prices[t]));return{priced:!0,unit:i,isFrom:i*o!==r,setTotal:r*n}}var qn={priced:!1,unit:null,isFrom:!1,was:null,onSale:!1,setTotal:null};function Ro(e,t,n,r=1){let o=Hn(e.prices[n],e.msrpPrices?.[n],4),i=o.setTotal==null?null:o.setTotal*r;if(!t)return{priced:o.priced,unit:o.unit,isFrom:!0,was:o.was,onSale:o.onSale,setTotal:null,fromSetTotal:i};let a=Bn(t.components,n,r);return a.priced?{priced:!0,unit:a.unit,isFrom:a.isFrom,was:null,onSale:!1,setTotal:a.setTotal,fromSetTotal:i}:{...qn,fromSetTotal:i}}function Wn(e,t){return!e.priced||e.unit==null?De:`${e.isFrom?qt:""}${j(e.unit,t)}`}function No(e,t){return e.was==null?null:j(e.was,t)}function ko(e,t){return!e.priced||e.unit==null?Un:Wn(e,t)}function Io(e,t){let n=e.savings[t];if(n===void 0||e.components.length===0)return null;let r=0;for(let i of e.components){let a=i.prices?.[t];if(typeof a!="number")return null;r+=a*i.quantity}let o=j(r-n,t);return{was:j(r,t),amount:e.savingIsFrom?`${qt}${o}`:o}}var Gn=/^[^@\s]+@[^@\s]+\.[^@\s]+$/;function Gt(e){return Gn.test(e.trim())}var Kt="sf:ga-purchases",Kn=20;function Vt(){return typeof window>"u"||window.parent!==window}function Ee(...e){try{if(Vt()||typeof window.gtag!="function")return;window.gtag(...e)}catch{}}function zn(e,t){let n=e.config.find(r=>r.gold)?.label;return{item_id:`${e.slug}|${e.finishName}|${e.size}`,item_name:`${e.name.lead}${e.name.accent}`.trim(),...n?{item_variant:n}:{},price:me(e.components,t)??0,quantity:e.qty}}function tt(e,t){return e.filter(Fe).map(n=>zn(n,t))}function Do(e){Ee("event","view_item",{currency:e.currency,value:e.pricePerSet,items:[{item_id:e.itemId,item_name:e.itemName,...e.variant?{item_variant:e.variant}:{},price:e.pricePerSet,quantity:1}]})}function Xt(e,t){let n=tt([e],t);n.length!==0&&Ee("event","add_to_cart",{currency:t,value:n[0].price*n[0].quantity,items:n})}function Fo(e){let t=tt(e.lines,e.currency);t.length!==0&&Ee("event","begin_checkout",{currency:e.currency,value:e.value,...e.coupon?{coupon:e.coupon}:{},items:t})}var zt=new Set;function Vn(e){if(zt.has(e))return!1;zt.add(e);try{let t=JSON.parse(pe.getItem(Kt)??"[]");if(t.includes(e))return!1;pe.setItem(Kt,JSON.stringify([...t,e].slice(-Kn)))}catch{}return!0}function Uo(e){let t=e.confirmation;if(Vt()||!Vn(t.orderNumber))return;let n=t.currency,r=Number(t.grandTotal);Ee("event","purchase",{transaction_id:t.orderNumber,currency:n,value:r,shipping:Number(t.freightCharge),...t.couponCode?{coupon:t.couponCode}:{},items:tt(e.lines,n)}),e.adsSendTo&&Ee("event","conversion",{send_to:e.adsSendTo,transaction_id:t.orderNumber,currency:n,value:r})}var Xn="Arranged after review",Yt="Calculated at checkout",Yn=Yt,Bo=Yt;function Qt({quoted:e,optionCount:t,chosenAmount:n,couponWaivesFreight:r}){return e&&t===0?"arranged":r?"free":n===void 0?"pending":n===0?"free":"charged"}function qo(e){switch(e){case"arranged":return Xn;case"pending":return Yn;case"free":return Wt;case"charged":return null}}import{jsx as tr}from"react/jsx-runtime";var Zn=400,Jn=400,er=1500;function Fe(e){return(e.components?.length??0)>0}function Zt(e,t){return{code:e,valid:t.valid,deferred:$t(t,t.askedAsShopper),message:t.message||void 0,effects:t.effects??void 0}}function en(e,t){return me(e.components,t)}function nt(e,t){let n=en(e,t);return n===null?null:n*e.qty}function Jt(e){return e!=="tyre"}var tn=Qn(null);function ti({children:e,preview:t=!1}){let{currency:n,country:r,formatMoney:o}=Dt(),[i,a]=N(t),[l,c]=N([]),[u,m]=N([]),[C,d]=N([]),[_,k]=N(!1),g=Z(new Set),[L,I]=N([]),[M,v]=N(!1),[b,D]=N(null),[W,te]=N(null),[ue,y]=N(null),[E,x]=N(0),F=w(()=>x(s=>s+1),[]),[ne,ge]=N(void 0),[G,Ne]=N(null),[P,U]=N(null),[K,re]=N(!1),[O,ce]=N(null),oe=Z(void 0),z=w(()=>a(!0),[]),Y=w(()=>a(!1),[]),ke=w(()=>a(s=>!s),[]);X(()=>{t||typeof window>"u"||new URLSearchParams(window.location.search).get("cart")==="open"&&z()},[z,t]);let $=Ft(),V=Z($);X(()=>{V.current!==$&&(V.current=$,t||Y())},[$,t,Y]);let Ie=w(s=>{Ne(p=>p?.country===s?.country&&p?.subdivision===s?.subdivision&&p?.postcode===s?.postcode?p:s)},[]),T=w((s,p)=>{v(!0),!(!p||!Jt(s))&&I(f=>f.includes(p)?f:[...f,p])},[]),Le=M||l.length>0,ie=Z(!0);X(()=>(ie.current=!0,()=>{ie.current=!1}),[]),X(()=>{if(t)return;let s=[...L,...l.filter(f=>Jt(f.kind)).map(f=>f.slug)],p=[...new Set(s)].filter(f=>f&&!g.current.has(f));if(p.length!==0){for(let f of p)g.current.add(f);q.listWheelsBySlug(p).then(f=>{if(!ie.current||f.length===0)return;let h=new Set(f.map(S=>S.slug));m(S=>[...S.filter(se=>!h.has(se.slug)),...f])})}},[t,L,l]),X(()=>{if(t||!Le||_)return;let s=!0;return q.listBundles().then(p=>{s&&(d(p),k(!0))}),()=>{s=!1}},[t,Le,_]);let H=b?.deliveryOptions??[],he=b?.courier??null;X(()=>{b&&ce(s=>s&&H.some(p=>p.id===s)?s:H[0]?.id??null)},[b]);let ae=w(()=>l.filter(Fe).flatMap(s=>It(s.components,s.qty)),[l]),ye=w(async(s,p)=>{let f=s.trim().toUpperCase();if(!f)return;let h=ae();if(h.length===0){U({code:f,valid:!1,message:"Add a wheel to the cart first."});return}re(!0),oe.current=p;try{let S=await q.validateCoupon({code:f,items:h,currency:n,shippingMethodId:O??void 0,customerEmail:p});U(Zt(f,S))}catch{U({code:f,valid:!1,unchecked:!0,message:"Could not check that code. Please try again."})}finally{re(!1)}},[ae,n,O]),de=w(()=>{U(null),oe.current=void 0},[]),Ae=w(s=>{if(!P)return;let{code:p}=P;U(f=>f&&f.code===p?{code:p,valid:!1,refused:!0,message:s}:f)},[P]);X(()=>{if(!P||P.refused)return;let s=P.code,p=h=>h!==null&&h.code===s&&!h.refused,f=setTimeout(async()=>{let h=ae();if(h.length===0){U(S=>p(S)?{code:s,valid:!1,message:"Add a wheel to the cart first."}:S);return}re(!0);try{let S=await q.validateCoupon({code:s,items:h,currency:n,shippingMethodId:O??void 0,customerEmail:oe.current});U(se=>p(se)?Zt(s,S):se)}catch{}finally{re(!1)}},Zn);return()=>clearTimeout(f)},[l,n,O]);let be=P&&!P.refused?P.code:void 0;X(()=>{if(t)return;let s=!0,p=l,f=setTimeout(async()=>{let h=ae();if(h.length===0){D(null),te(null),ge(void 0);return}try{let S=await q.quoteCart({items:h,currency:n,shippingMethodId:O??void 0,couponCode:be,customerEmail:oe.current||void 0,country:G?.country||r||void 0,subdivision:G?.country&&G.subdivision||void 0,postcode:G?.country&&G.postcode||void 0});if(!s)return;D(S),te(p),y(null)}catch{if(!s)return;y(p)}ge(be)},Jn);return()=>{s=!1,clearTimeout(f)}},[l,n,O,be,r,G,E]);let R=w(s=>{c(p=>{let f=p.findIndex(h=>h.id===s.id);return f===-1?[...p,s]:p.map((h,S)=>S===f?{...h,qty:Math.min(je,h.qty+s.qty)}:h)}),Xt(s,n)},[n]),Q=w(s=>{c(p=>p.filter(f=>f.id!==s))},[]),Te=w((s,p)=>{let f=Math.max(1,Math.min(je,p));c(h=>h.map(S=>S.id===s?{...S,qty:f}:S))},[]),ut=w(s=>{c(s)},[]),[Ce,Sn]=N(null),ct=Z(null);ct.current=Ce;let B=Z(null),Ge=Z(""),dt=w((s,p)=>{let f=s.trim().toLowerCase();Gt(f)&&Sn(h=>h&&h.email===f&&h.firstName===(p??"")?h:{email:f,firstName:p??""})},[]);X(()=>{if(t||!Ce)return;let s=Bt(l.filter(Fe),h=>nt(h,n)===null?De:o(nt(h,n),n)),p={email:Ce.email,firstName:Ce.firstName,currency:n,items:s},f=JSON.stringify(p);if(f!==Ge.current)return B.current&&clearTimeout(B.current),B.current=setTimeout(()=>{B.current=null,Ge.current=f,q.captureCart(p).catch(h=>{})},er),()=>{B.current&&(clearTimeout(B.current),B.current=null)}},[l,Ce,n,t]);let ft=w(()=>{B.current&&(clearTimeout(B.current),B.current=null);let s=ct.current;s&&(Ge.current="",q.captureCart({email:s.email,firstName:s.firstName,currency:n,items:[]}).catch(p=>{}))},[n]),pt=jt(()=>{let s=l.reduce((A,fe)=>{let Oe=nt(fe,n);return Oe===null?A:A+Oe},0),p=l.some(A=>en(A,n)===null),f=l.reduce((A,fe)=>A+fe.qty,0),h=P?.valid?P.effects:void 0,S=h?Math.min(s,Number(h.discountAmount)):0,se=b?.bundleDiscount??0,En=b?.appliedBundles??[],Ke=!!h?.freeShipping,yt=H.find(A=>A.id===O),bt=Ke?0:b?.shipping??yt?.amount??0,Pn=Qt({quoted:b!==null,optionCount:H.length,chosenAmount:yt?.amount,couponWaivesFreight:Ke}),ze={};for(let A of h?.freeUnits??[])ze[A.partNumber]=(ze[A.partNumber]??0)+A.quantity;let wn=b?.tax??null,_n=b?b.grandTotal:s-S-se+bt;return{sets:f,units:l.reduce((A,fe)=>A+(fe.components??[]).reduce((Oe,Rn)=>Oe+Rn.wheels*fe.qty,0),0),subtotal:s,hasUnpricedLine:p,discount:S,bundleDiscount:se,appliedBundles:En,shipping:bt,freeShipping:Ke,shippingStatus:Pn,freeUnitsByPartNumber:ze,tax:wn,grand:_n,repricing:!!P?.refused&&b!==null&&ne===P?.code,quoted:b!==null&&W===l,serverSubtotal:b?.subtotal??null,quoteFailed:ue===l,currency:n}},[l,n,P,H,O,b,ne,W,ue]),mt=Z(!0),gt=w(s=>{mt.current=s},[]),ht=w(s=>{R(s),mt.current&&z()},[R,z]),vn=jt(()=>({isOpen:i,preview:t,open:z,close:Y,toggle:ke,items:l,catalog:u,bundles:C,warmCatalog:T,add:R,addAndOpen:ht,setAutoOpen:gt,remove:Q,setQty:Te,replaceItems:ut,identify:dt,clearCapturedCart:ft,coupon:P,applyCoupon:ye,removeCoupon:de,refuseCoupon:Ae,couponBusy:K,deliveryOptions:H,setQuoteDestination:Ie,courier:he,requote:F,shippingMethodId:O,setShippingMethodId:ce,totals:pt}),[i,t,z,Y,ke,l,u,C,T,R,ht,gt,Q,Te,ut,dt,ft,P,ye,de,Ae,K,H,Ie,he,F,O,pt]);return tr(tn.Provider,{value:vn,children:e})}function nn(){let e=jn(tn);if(!e)throw new Error("useCart() must be called inside <CartProvider>. Mount the provider in app/layout.tsx.");return e}import{cache as dr}from"react";function rn(e){return/(?:^|\|)(?:slug|xhost):/.test(e)}function on(e,t,n,r){for(;e.size>=t;){let o,i;for(let[l,c]of e){if(c.expiresAt<=r){o=l;break}i===void 0&&n(l)&&(i=l)}let a=o??i??e.keys().next().value;if(a===void 0)return;e.delete(a)}}var nr=6e4,rr=5e3,or=500,Ue=new Map;async function ir(e){let{host:t,matchesRequestHost:n}=await _t();if(!t)return"";let r=await Rt();return r?`${e}|slug:${encodeURIComponent(t)}/${encodeURIComponent(r)}`:n?`${e}|host:${t}`:`${e}|xhost:${t}`}async function an(e,t){if(await Nt()!==null)return t();let n=await ir(e);if(!n)return t();let r=Date.now(),o=Ue.get(n);if(o&&o.expiresAt>r)return o.load;let i=await t(),a=i.outcome.state==="failed",l=a?rr:nr,c=Ue.get(n)?.lastGood,u=i.outcome.state==="ok"?i:a?c:void 0,m=a&&u?u:i;return on(Ue,or,rn,r),Ue.set(n,{load:m,expiresAt:r+l,lastGood:u}),m}var ar=404;function sr(e){if(e instanceof Se&&e.status===ar)return{state:"absent"};let t=e instanceof Se?e.status:-1,n=e instanceof Error?e.message:String(e);return{state:"failed",status:t,detail:n}}var lr="[storefront:chrome-load-failed]";function ur(e,t){console.error(`${lr} ${e} status=${t.status} \u2014 serving fallback chrome`,t.detail)}async function sn(e,t,n,r){try{let o=await t();return r?.(o)?{value:o,outcome:{state:"absent"}}:{value:o,outcome:{state:"ok"}}}catch(o){let i=sr(o);return i.state==="failed"&&ur(e,i),{value:n,outcome:i}}}function cr(e){return e==="production"?"silent":"banner"}var ui=cr("production");function fr(e,t){return e?.trim()||t}function yi({legalName:e,foundedYear:t,siteName:n},r=new Date().getFullYear()){let o=fr(e,n);return`\xA9 ${t&&t<r?`${t}\u2013${r}`:`${r}`} ${o}`}var pr={name:xe,legalName:null,foundedYear:null,faviconUrl:null,currencies:[],defaultCurrency:null,countries:[],defaultCountry:null,commerceEnabled:!0,cardPayments:!1,paymentMethods:[],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,consentEnabled:!1,consentPrivacyPage:null,consentNoticeOptOut:!1,privacyPage:null,termsPage:null,footerCookieSettings:!0,footerSitemap:!0,socialLinks:Ye},bi=dr(async()=>an("site",()=>sn("site",async()=>{let e=await q.getSite();return{name:Et(e.name),legalName:e.legalName?.trim()||null,foundedYear:e.foundedYear??null,faviconUrl:e.faviconUrl??null,currencies:e.currencies??[],defaultCurrency:e.defaultCurrency??null,countries:e.countries??[],defaultCountry:e.defaultCountry??null,commerceEnabled:e.commerceEnabled??!0,cardPayments:e.cardPayments??!1,paymentMethods:e.paymentMethods??(e.cardPayments?["card"]:[]),paypalClientId:e.paypalClientId??null,paypalEnvironment:e.paypalEnvironment??null,squareApplicationId:e.squareApplicationId??null,squareLocationId:e.squareLocationId??null,squareEnvironment:e.squareEnvironment??null,ga4MeasurementId:e.ga4MeasurementId??null,googleAdsId:e.googleAdsId??null,googleAdsConversionLabel:(e.googleAdsId?e.googleAdsConversionLabel:null)??null,metaPixelId:e.metaPixelId??null,consentEnabled:e.consentEnabled??!1,consentPrivacyPage:e.consentPrivacyPage??null,consentNoticeOptOut:e.consentNoticeOptOut??!1,privacyPage:e.privacyPage??null,termsPage:e.termsPage??null,footerCookieSettings:e.footerCookieSettings??!0,footerSitemap:e.footerSitemap??!0,socialLinks:Pt(e.socialLinks)}},pr)));var Ci={name:xe,legalName:null,foundedYear:null,faviconUrl:null,currencies:[{code:"USD",symbol:"$",decimalPlaces:2,isDefault:!0}],defaultCurrency:"USD",countries:[{code:"US",name:"United States",currency:"USD",url:"",isDefault:!0,chargeTax:!1,taxDisplay:"none",taxName:"",taxRate:null,postalLabel:"Zip Code"}],defaultCountry:"US",commerceEnabled:!0,cardPayments:!0,paymentMethods:["card"],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,consentEnabled:!1,consentPrivacyPage:null,consentNoticeOptOut:!1,privacyPage:null,termsPage:null,footerCookieSettings:!0,footerSitemap:!0,socialLinks:Ye};import{jsx as mr}from"react/jsx-runtime";function Si({tone:e="bad",role:t,children:n}){return mr("div",{role:t,className:["border bg-surface px-4 py-3 text-[14px] leading-relaxed text-fg",e==="good"?"border-accent":e==="bad"?"border-alert":"border-line"].join(" "),children:n})}import{jsx as we,jsxs as rt}from"react/jsx-runtime";import{useEffect as $e,useId as br,useRef as un,useState as He}from"react";import{useRootIsDark as Cr}from"efficient-shell/theme";import{efficientClientOpen as gr}from"efficient-easel/screen/lib/session";var Pe=new Map,hr=64;async function yr(e){if(!gr())return null;try{let t=await fetch(`${vt()}/logo-analysis.json?url=${encodeURIComponent(e)}`);if(!t.ok)return null;let n=await t.json();if(!n||typeof n!="object")return null;let{reversed:r,inkIsDark:o}=n;return typeof r!="string"?null:{reversed:r,inkIsDark:typeof o=="boolean"?o:null}}catch{return null}}function ln(e){let t=Pe.get(e);if(t)return t;let n=yr(e);if(Pe.set(e,n),Pe.size>hr){let r=Pe.keys().next();r.done||Pe.delete(r.value)}return n}var xr=202/22,Sr=.88,Hi=16,vr="invert(1)";function Bi({variant:e="header",scrolled:t=!0,src:n,reverse:r=!1,color:o=null,onLightSurface:i,reversedSrc:a,inkIsDark:l,size:c="medium",sizePx:u,sizeUnit:m,wordmark:C,siteName:d=xe,fitToContainer:_=!1,fitWordmarkToContainer:k=!1,fitFloorPx:g,hideClass:L,hideAttrs:I,part:M}){let v=C&&C.trim()?C.trim():d,[b,D]=He(null),W=un(null),te=R=>{W.current=R};$e(()=>{D(W.current?.ownerDocument??null)},[]);let ue=!Cr({doc:b,whenUnset:!0}),y=n&&n.trim()?n.trim():null,E=!!y&&wt(y),x=i??(ue&&t),F=o&&o.trim()?o.trim():null,ne=r&&!F,ge=`logo-color-${br().replace(/[^A-Za-z0-9_-]/g,"")}`,G=ne&&E&&y&&a!=null?{reversed:a,inkIsDark:l??null}:null,Ne=G!==null,[P,U]=He(null);$e(()=>{if(!ne||!y||!E||Ne){U(null);return}let R=!1;return U(null),ln(y).then(Q=>{R||U(Q)}),()=>{R=!0}},[ne,y,E,Ne]);let K=G??P,re=!!K&&K.inkIsDark!==null&&(x?!K.inkIsDark:K.inkIsDark),O=ne&&!!y&&!E&&!x,ce=re&&K?K.reversed:y,oe=ce?[ce]:[],[z,Y]=He(0);$e(()=>{Y(0)},[y,re]);let ke=e==="footer"?Xe:Ve[c],$=u&&u>0?u:ke,V=(u&&u>0?Ct(u,m,"size",St):null)??`${$}px`,Ie=Math.round($*xr),T=z<oe.length?oe[z]:null,[Le,ie]=He(ce),H=T!==null&&T===Le,he=un(null);$e(()=>{let R=he.current;if(!R||!R.complete)return;if(R.naturalWidth>0||R.naturalHeight>0){ie(T);return}let Q=!1;return R.decode().then(()=>!Q&&ie(T),()=>!Q&&Y(Te=>Te+1)),()=>{Q=!0}},[T]);let ae=_||k,ye=`calc(100cqi / ${((v.length+1)*Sr).toFixed(2)})`,de=ae&&g&&g>0?V===`${$}px`?`${Math.min(g,$)}px`:`min(${g}px, ${V})`:null,Ae=ae?de===null?`min(${V}, ${ye})`:`clamp(${de}, ${ye}, ${V})`:V,be=rt("span",{className:`font-display font-bold tracking-[0.18em] ${de===null?"whitespace-nowrap":"whitespace-normal"}`,style:{fontSize:Ae,lineHeight:1,...F?{color:F}:{}},"aria-label":v,children:[v,we("span",{className:"text-accent",style:F?{color:F}:void 0,children:"."})]});return rt("span",{ref:te,className:xt("inline-flex items-center",L??""),...I,...M,children:[!H&&be,F&&T&&we("svg",{"aria-hidden":"true",focusable:"false",width:"0",height:"0",style:{position:"absolute"},children:rt("filter",{id:ge,colorInterpolationFilters:"sRGB",children:[we("feFlood",{style:{floodColor:F}}),we("feComposite",{in2:"SourceAlpha",operator:"in"})]})}),T&&we("img",{ref:he,src:T,alt:v,width:Ie,height:$,className:"shrink-0 object-contain",style:{...H?{height:V,width:"auto",..._?{maxWidth:"100cqi"}:{}}:{display:"none"},...O?{filter:vr}:{},...F?{filter:`url(#${ge})`}:{}},onLoad:()=>ie(T),onError:()=>Y(R=>R+1)},T)]})}var Wi="w-full border-2 border-line bg-bg px-4 py-4 font-display text-[17px] tracking-[-0.005em] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent",cn="w-0 min-w-0 flex-1",Gi="w-0 min-w-[7rem] flex-1";import{jsx as _e,jsxs as Pr}from"react/jsx-runtime";function Er({spokes:e,mesh:t=!1,className:n}){let a=c=>Math.round(c*1e3)/1e3,l=[];for(let c=0;c<e;c++){let u=c/e*Math.PI*2-Math.PI/2;if(l.push({x1:a(100+Math.cos(u)*22),y1:a(100+Math.sin(u)*22),x2:a(100+Math.cos(u)*86),y2:a(100+Math.sin(u)*86),main:!0}),t){let m=u+Math.PI/e;l.push({x1:a(100+Math.cos(m)*22*1.4),y1:a(100+Math.sin(m)*22*1.4),x2:a(100+Math.cos(m)*78),y2:a(100+Math.sin(m)*78),main:!1})}}return Pr("svg",{viewBox:"0 0 200 200",fill:"none",stroke:"currentColor",className:n??"block h-[70%] w-[70%] transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)]",children:[_e("circle",{cx:100,cy:100,r:92,strokeWidth:2}),_e("circle",{cx:100,cy:100,r:84,strokeWidth:1,opacity:.4}),_e("circle",{cx:100,cy:100,r:22,strokeWidth:2}),_e("circle",{cx:100,cy:100,r:6,fill:"currentColor"}),l.map((c,u)=>_e("line",{x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,stroke:"currentColor",strokeWidth:c.main?6:3,strokeLinecap:"round",opacity:c.main?1:.5},u))]})}var Xi="#c9a461",dn=[{f:"black",label:"Black",hex:"#171717"},{f:"silver",label:"Silver",hex:"#cccccc"},{f:"bronze",label:"Bronze",hex:"#8a6438"},{f:"graphite",label:"Graphite",hex:"#3a3c3f"},{f:"red",label:"Candy Red",hex:"#7a0f14"}],Yi={name:"",color:"var(--fg)",family:"silver",src:""};function wr(e,t){let n=r=>{let o=dn.findIndex(i=>i.f===r);return o===-1?dn.length:o};return n(e)-n(t)||e.localeCompare(t)}function Qi(e){let t=new Set;for(let n of e)for(let r of n.finishes??[])r?.family&&t.add(r.family);return[...t].sort(wr)}import{useEffect as _r,useRef as fn,useState as Rr}from"react";import{jsx as le,jsxs as ot}from"react/jsx-runtime";function Nr({customerEmail:e,disabled:t=!1}){let{coupon:n,applyCoupon:r,removeCoupon:o,couponBusy:i}=nn(),[a,l]=Rr(""),c=fn(!1),u=fn(null);_r(()=>{!c.current||n===null||(c.current=!1,u.current?.focus())},[n]);async function m(){t||i||!a.trim()||(c.current=!0,await r(a,e),l(""))}return ot("div",{className:"flex flex-col gap-2",children:[n===null?ot("div",{className:"flex border border-line",children:[le("input",{type:"text",value:a,onChange:C=>l(C.target.value),onKeyDown:C=>{C.key==="Enter"&&(C.preventDefault(),m())},placeholder:"Coupon code","aria-label":"Coupon code",disabled:t,className:`${cn} bg-transparent px-4 py-4 font-mono text-[11px] uppercase tracking-[0.18em] text-fg outline-none placeholder:text-fg-dim`}),le("button",{type:"button",onClick:()=>{m()},disabled:i||t,className:"border-l border-line px-4 font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:bg-btn hover:text-btn-ink disabled:cursor-wait disabled:opacity-60",children:i?"\u2026":"Apply"})]}):ot("div",{className:["flex items-center justify-between gap-3 border px-4 py-3",n.valid?"border-accent":"border-line"].join(" "),style:n.valid?{background:"color-mix(in oklab, var(--accent) 8%, transparent)"}:void 0,children:[le("span",{className:["font-mono text-[11px] uppercase tracking-[0.22em]",n.valid?"text-accent":n.deferred||n.unchecked?"text-fg":"text-fg-dim line-through"].join(" "),children:n.code}),n.unchecked&&le("button",{type:"button",onClick:()=>{r(n.code,e)},disabled:i||t,className:"ml-auto font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:text-fg disabled:cursor-wait disabled:opacity-60",children:i?"\u2026":"Try again"}),!t&&le("button",{ref:u,type:"button",onClick:o,"aria-label":`Remove coupon ${n.code}`,className:"font-mono text-[12px] text-fg-dim transition-colors hover:text-fg",children:"\u2715"})]}),n?.deferred?le("p",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-fg-dim",children:Ht}):n&&!n.valid&&n.message&&le("p",{role:"alert",className:"font-mono text-[10px] uppercase tracking-[0.18em] text-alert",children:n.message})]})}var it="Ads on. Shopper can opt out.",Be="Ads and analytics off until Accept",kr={us:{region:"us",name:"United States",model:"opt-out",law:"California CCPA / CPRA, other state laws",beforeChoice:it,footerLink:"Do Not Sell or Share My Personal Information",panelEyebrow:"Do not sell or share",adsRowName:"Sale or sharing for ads"},ca:{region:"ca",name:"Canada",model:"opt-in",law:"PIPEDA, Quebec Law 25",beforeChoice:Be,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},au:{region:"au",name:"Australia",model:"opt-out",law:"Privacy Act 1988 (APPs)",beforeChoice:it,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},nz:{region:"nz",name:"New Zealand",model:"opt-out",law:"Privacy Act 2020",beforeChoice:it,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},uk:{region:"uk",name:"United Kingdom",model:"opt-in",law:"PECR, UK GDPR",beforeChoice:Be,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},eu:{region:"eu",name:"European Union",model:"opt-in",law:"ePrivacy Directive, GDPR",beforeChoice:Be,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},other:{region:"other",name:"All other countries",model:"opt-in",law:"Safe default",beforeChoice:Be,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"}};function Ir(e){let t=[...e.googleAds?["Google"]:[],...e.meta?["Facebook","Instagram"]:[]];return t.length<=1?t.join(""):`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}function oa(e,t,n){let r=Ir(n),o=r?`We use cookies to count visits and to show you ${t} ads on ${r}.`:"We use cookies to count visits.";return e.model==="opt-in"?{heading:r?"Cookies and ads":"Cookies",before:`${o} Nothing loads until you choose. You can change this at any time with `,link:e.footerLink,after:" at the bottom of every page."}:{heading:r?"Cookies and ads":"Cookies",before:`${o} You can say no at any time: choose Privacy choices, or use `,link:e.footerLink,after:" at the bottom of every page."}}var ia={accept:"Accept all",reject:"Reject all",choose:"Choose",save:"Save",ok:"OK",privacyChoices:"Privacy choices",privacyPolicy:"Privacy Policy",alwaysOn:"Always on",close:"Close",cookieSettings:"Cookie settings"};var Lr={asked:!1,region:"other",model:"opt-in",analytics:!0,ads:!0,chosen:!0,gpc:!1};var Ar=Lr;function ua(e=Ar){if(e.asked)return e.ads?"granted":"denied"}function da(){let e=typeof crypto<"u"?crypto:void 0;if(typeof e?.randomUUID=="function")return e.randomUUID();let t=new Uint8Array(16);if(typeof e?.getRandomValues=="function")e.getRandomValues(t);else for(let r=0;r<t.length;r++)t[r]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}import{Children as Or,isValidElement as Mr,useEffect as mn,useId as Dr,useLayoutEffect as yn,useRef as J,useState as gn}from"react";var qe=(e,t)=>!!e[t]&&!e[t].disabled;function at(e,t,n){let r=e.length;for(let o=1;o<=r;o++){let i=((t+n*o)%r+r)%r;if(qe(e,i))return i}return t}function st(e,t){return at(e,t===1?-1:e.length,t)}function lt(e,t){return qe(e,t)?t:Math.max(st(e,1),0)}function pn(e,t,n){let{open:r,focus:o}=e,i=a=>({...e,...a});if(t.length===1&&/\S/.test(t)){let a=e.typed+t.toLowerCase(),l=n.findIndex((c,u)=>qe(n,u)&&c.label.toLowerCase().startsWith(a));return{state:i({open:!0,typed:a,focus:l>=0?l:o}),handled:!0}}if(!r)return t==="ArrowDown"||t==="ArrowUp"||t==="Enter"||t===" "?{state:i({open:!0,typed:""}),handled:!0}:{state:e,handled:!1};switch(t){case"ArrowDown":return{state:i({focus:at(n,o,1)}),handled:!0};case"ArrowUp":return{state:i({focus:at(n,o,-1)}),handled:!0};case"Home":return{state:i({focus:st(n,1)}),handled:!0};case"End":return{state:i({focus:st(n,-1)}),handled:!0};case"Enter":case" ":return qe(n,o)?{state:i({open:!1,typed:""}),commit:o,refocus:!0,handled:!0}:{state:e,handled:!0};case"Escape":return{state:i({open:!1,typed:""}),refocus:!0,handled:!0};case"Tab":return{state:i({open:!1,typed:""}),handled:!1};default:return{state:e,handled:!1}}}import{placeMenu as Fr}from"efficient-shell/ui";import{Fragment as Gr,jsx as ee,jsxs as bn}from"react/jsx-runtime";var hn={body:"text-[length:var(--size-body,14px)]",label:"text-[length:var(--size-label,13px)]"};function Ur({items:e,value:t,onPick:n,open:r,onOpen:o,onClose:i}){let[a,l]=gn(!1),c=r!==void 0,u=c?r:a,[m,C]=gn(0),d=J({text:"",timer:0}),_=J(null),k=J(null),g=J(null),L=Dr(),I=J(null),M=e.findIndex(y=>y.value===t),v=y=>{y!==u&&(c||l(y),y?o?.():i?.())},b=y=>{let E=e[y];!E||E.disabled||(n(E.value),v(!1),k.current?.focus())},D=y=>{let E={open:u,focus:u?m:lt(e,M),typed:d.current.text},x=pn(E,y,e);return!x.handled&&x.state.open===u?!1:(x.state.typed!==E.typed&&(d.current.text=x.state.typed,window.clearTimeout(d.current.timer),d.current.timer=window.setTimeout(()=>{d.current.text=""},500)),C(x.state.focus),x.commit!==void 0?b(x.commit):v(x.state.open),x.refocus&&k.current?.focus(),x.handled)},W=J(D);W.current=D;let te=J(()=>v(!1));te.current=()=>v(!1);let ue=y=>{u||(I.current=y.nativeEvent,W.current(y.key)&&y.preventDefault())};return mn(()=>{if(!u)return;let y=x=>{_.current?.contains(x.target)||te.current()},E=x=>{x!==I.current&&W.current(x.key)&&x.preventDefault()};return document.addEventListener("mousedown",y),document.addEventListener("keydown",E),()=>{document.removeEventListener("mousedown",y),document.removeEventListener("keydown",E)}},[u]),mn(()=>{u&&(d.current.text||C(lt(e,M)))},[u]),yn(()=>{if(!u||!g.current)return;g.current.children.item(m)?.scrollIntoView({block:"nearest"})},[m,u]),{open:u,toggle:()=>v(!u),close:()=>v(!1),focusIdx:m,setFocusIdx:C,pick:y=>b(e.findIndex(E=>E.value===y)),wrapRef:_,triggerRef:k,listRef:g,listId:L,onTriggerKeyDown:ue,activeId:u?`${L}-${m}`:void 0}}var $r={select:{list:"absolute left-0 top-full z-50 mt-1 max-h-[280px] w-max min-w-full overflow-y-auto border-2 border-accent bg-bg shadow-xl",item:(e,t,n)=>["px-3 py-3 font-mono text-[13px] font-semibold uppercase tracking-[0.1em] transition-colors whitespace-nowrap",n?"cursor-not-allowed opacity-40":"cursor-pointer",e&&!n?"bg-accent text-bg":"bg-bg text-fg"].join(" ")},cell:{list:"absolute left-0 top-full z-50 mt-1 max-h-[320px] w-max min-w-full overflow-y-auto border-2 border-accent bg-bg shadow-xl",item:e=>[`cursor-pointer whitespace-nowrap px-6 py-3 font-mono ${hn.label} font-semibold uppercase tracking-[0.1em] transition-colors`,e?"bg-accent text-bg":"bg-bg text-fg"].join(" "),pickerMarker:!0},hairline:{list:"absolute left-0 top-full z-50 max-h-[320px] w-full overflow-y-auto border border-line bg-bg shadow-[0_6px_20px_rgba(0,0,0,0.10)]",item:(e,t)=>[`flex cursor-pointer items-center justify-between gap-4 border-b border-line px-4 py-3 text-left ${hn.body} transition-colors last:border-b-0`,t?"border-fg font-medium text-fg":e?"border-fg text-fg":"text-fg-dim"].join(" "),pickerMarker:!0},region:{list:"absolute right-0 top-full z-[200] mt-2 flex min-w-[240px] flex-col border border-line bg-surface text-fg",item:(e,t,n,r)=>["flex w-full cursor-pointer items-center gap-3 px-4 py-3 text-left transition-colors","font-mono text-[13px] uppercase tracking-[0.18em]",e?"bg-surface-2 text-fg":"",r?"":"border-b border-line",t?"text-accent":""].join(" "),itemStyle:e=>e?void 0:{color:"color-mix(in oklab, currentColor 80%, transparent)"}}};function Hr(e,t){yn(()=>{let n=e.current,r=n?.ownerDocument.defaultView;if(!n||!r)return;let o=()=>{let i=n.style;i.top=i.bottom=i.marginTop=i.marginBottom=i.maxHeight=i.overflowY=i.translate="";let a=n.offsetParent??n.parentElement;if(!a)return;let l=a.getBoundingClientRect(),c=n.getBoundingClientRect(),u=Math.abs(c.right-l.right)<Math.abs(c.left-l.left)?"end":"start",m=Fr({trigger:{left:l.left,right:l.right,top:l.top,bottom:l.bottom},menu:{width:c.width,height:c.height},bounds:{left:0,top:0,right:r.innerWidth,bottom:r.innerHeight},align:u,side:"bottom"});if(m.side==="top"){i.top="auto",i.bottom="100%",i.marginTop="0px";let d=m.top+Math.min(c.height,m.maxHeight);i.marginBottom=`${Math.max(0,l.top-d)}px`}m.maxHeight<c.height&&(i.maxHeight=`${m.maxHeight}px`,i.overflowY="auto");let C=m.left-c.left;C&&(i.translate=`${C}px`)};return o(),r.addEventListener("resize",o),r.addEventListener("scroll",o,!0),()=>{r.removeEventListener("resize",o),r.removeEventListener("scroll",o,!0)}},[e,t])}function Br(e){return e.split(" ").map(t=>t==="left-0"?"right-0":t).join(" ")}function qr({id:e,tone:t,items:n,value:r,focusIdx:o,onFocus:i,onPick:a,listRef:l,ariaLabel:c,align:u="start"}){let m=$r[t],C=J(null);return Hr(C,n.length),ee("ul",{ref:d=>{C.current=d,l&&(l.current=d)},id:e,role:"listbox","aria-label":c,...m.pickerMarker?{"data-picker-menu":""}:{},className:u==="end"?Br(m.list):m.list,children:n.map((d,_)=>{let k=d.value===r;return ee("li",{id:`${e}-${_}`,role:"option","aria-selected":k,"aria-disabled":d.disabled||void 0,onMouseEnter:()=>!d.disabled&&i(_),onMouseDown:g=>{g.preventDefault(),d.disabled||a(d.value)},className:m.item(_===o,k&&d.value!=="",!!d.disabled,_===n.length-1),style:m.itemStyle?.(k),children:d.meta===void 0?d.label:bn(Gr,{children:[d.lead,ee("span",{className:"flex-1 whitespace-nowrap",children:d.label}),ee("span",{className:"ml-auto text-[12px] opacity-50",children:d.meta})]})},`${d.value}_${_}`)})})}function Wr({value:e,onChange:t,disabled:n,children:r,className:o,style:i,name:a,id:l,"aria-label":c,align:u}){let m=Or.toArray(r).flatMap(g=>{if(!Mr(g))return[];if(g.type!=="option")return[];let I=g.props,M=I.value!==void 0?String(I.value):"",v=I.children,b=typeof v=="string"||typeof v=="number"?String(v):M;return[{value:M,label:b,disabled:!!I.disabled}]}),C=e??"",d=Ur({items:m,value:C,onPick:g=>t?.({target:{value:g}})}),k=m.find(g=>g.value===C)?.label??m[0]?.label??"";return bn("div",{ref:d.wrapRef,className:"relative",children:[a&&ee("input",{type:"hidden",name:a,value:C}),ee("button",{ref:g=>{d.triggerRef.current=g},type:"button",disabled:n,"aria-haspopup":"listbox","aria-expanded":d.open,"aria-controls":d.open?d.listId:void 0,"aria-activedescendant":d.activeId,"aria-label":c,id:l,onClick:()=>!n&&d.toggle(),onKeyDown:g=>!n&&d.onTriggerKeyDown(g),className:`block w-full ${o??""}`,style:i,children:ee("span",{className:"block w-full truncate text-left",children:k})}),d.open&&ee(qr,{id:d.listId,tone:"select",items:m,value:C,focusIdx:d.focusIdx,onFocus:d.setFocusIdx,onPick:d.pick,listRef:d.listRef,align:u})]})}import{jsx as Re,jsxs as We}from"react/jsx-runtime";var Kr="font-mono text-[length:var(--size-label,12px)]",zr="font-semibold uppercase tracking-[0.22em] text-fg";function Cn(e){return`${e??Kr} ${zr}`}function xn(){return Re("span",{className:"text-accent",children:" *"})}function Vr({children:e,required:t,labelFace:n}){return We("span",{className:Cn(n),children:[e,t?Re(xn,{}):null]})}function Xr({label:e,required:t,hint:n,separate:r,htmlFor:o,labelFace:i,className:a,children:l}){let c=a?`flex flex-col gap-2 ${a}`:"flex flex-col gap-2",u=n?Re("span",{className:"font-mono text-[11px] uppercase tracking-[0.22em] text-fg-dim",children:n}):null;return r||n?We("div",{className:c,children:[We("label",{htmlFor:o,className:Cn(i),children:[e,t?Re(xn,{}):null]}),l,u]}):We("label",{htmlFor:o,className:c,children:[Re(Vr,{required:t,labelFace:i,children:e}),l]})}export{Ft as a,mo as b,go as c,ho as d,It as e,Qe as f,Yr as g,Qr as h,jr as i,Zr as j,Nn as k,kn as l,Jr as m,eo as n,je as o,Me as p,j as q,to as r,no as s,De as t,Un as u,qt as v,xo as w,So as x,Wt as y,vo as z,et as A,Eo as B,Po as C,Hn as D,wo as E,_o as F,Bn as G,Ro as H,Wn as I,No as J,ko as K,Io as L,Gt as M,Do as N,Fo as O,Uo as P,Bo as Q,qo as R,so as S,Dt as T,lo as U,Fe as V,nt as W,ti as X,nn as Y,yi as Z,pr as _,Ci as $,Wi as aa,cn as ba,Gi as ca,Er as da,Xi as ea,dn as fa,Yi as ga,wr as ha,Qi as ia,Nr as ja,Si as ka,Hi as la,Bi as ma,kr as na,oa,ia as pa,Lr as qa,ua as ra,da as sa,Ur as ta,qr as ua,Wr as va,Vr as wa,Xr as xa};
1
+ import{S as Se,_ as _t,aa as Rt,ba as Nt,da as q,g as wt}from"./chunk-PULBLZRR.js";import{O as xt,aa as Ve,ba as Xe,da as St,ka as Ye,la as Pt}from"./chunk-TVMCJUOE.js";import{j as pe}from"./chunk-EZ5QLDA5.js";import{pi as xe,qi as Et,tf as Ct}from"./chunk-6ABZ7XWF.js";import{c as vt}from"./chunk-7UJXVH57.js";import{createContext as Ln,useContext as Ot,useEffect as An,useMemo as ve,useState as At}from"react";function It(e,t){return e.map(n=>({partNumber:n.partNumber,quantity:n.wheels*t}))}function me(e,t){if(e.length===0)return null;let n=0;for(let r of e){let o=r.prices?.[t];if(typeof o!="number"||!Number.isFinite(o)||o<=0)return null;n+=o*r.wheels}return n}var Qe=4,Yr=1,Qr={unit:"set",spares:0,spareSide:"left"};function Lt(e){return e.unit==="single"?1:Qe+e.spares}function jr(e,t){return[{partNumber:e.partNumber,wheels:Lt(t),prices:e.prices}]}function Zr(e,t){let n=Lt(t)-Qe;if(n<=0||e.length===0)return e;let r=Nn(e),o=r?r[t.spareSide]:0;return e.map((i,a)=>a===o?{...i,wheels:i.wheels+n}:i)}function Nn(e){let t,n;for(let r=0;r<e.length;r+=1){let o=e[r].hand;if(o!=="left"&&o!=="right")continue;if((o==="left"?t:n)!==void 0)return null;o==="left"?t=r:n=r}return t!==void 0&&n!==void 0?{left:t,right:n}:null}function kn(e,t){return t.spares>0?`${e} + spare`:e}function Jr(e){return e.unit==="single"?"Single":kn(`Set of ${Qe}`,e)}var eo="data-add-to-basket",je=9,In="en",kt=new Map;function Me(e,t,n){let r=`${e}|${t??""}|${n??""}`,o=kt.get(r);return o||(o=new Intl.NumberFormat(In,{style:"currency",currency:e,...t===void 0?{}:{minimumFractionDigits:t},...n===void 0?{}:{maximumFractionDigits:n}}),kt.set(r,o)),o}function j(e,t,n=0){return Me(t,0,n).format(e)}function to(e,t){return Me(t).format(e)}function no(e,t){let n=e.savings[t];if(n===void 0)return null;let r=j(n,t);return e.savingIsFrom?`Save from ${r}`:`Save ${r}`}import{jsx as Dn}from"react/jsx-runtime";var Tn="storefront-country",Tt=Tn,Ze=Ln(null);function On(e){return Mt(e,"catalogue")}function Mn(e){return Mt(e,"money")}function Mt(e,t){let n=new Map(e.map(r=>[r.code,r.decimalPlaces]));return(r,o)=>{if(!o)return"";let i=n.get(o)??0;return Me(o,t==="money"?i:0,i).format(r)}}function so({children:e,currencies:t,countries:n,defaultCurrency:r,defaultCountry:o}){let i=ve(()=>t??[],[t]),a=ve(()=>n??[],[n]),l=ve(()=>r||i.find(g=>g.isDefault)?.code||i[0]?.code||"",[r,i]),c=ve(()=>o||a.find(g=>g.isDefault)?.code||a[0]?.code||"",[o,a]),[u,m]=At(c),[C,d]=At(!1);An(()=>{let g=pe.getItem(Tt);g&&a.some(L=>L.code===g)&&m(g),d(!0)},[a]);function _(g){m(g),pe.setItem(Tt,g)}let k=ve(()=>{let g=a.find(b=>b.code===u)??null,L=g?.currency,I=L&&i.some(b=>b.code===L)?L:l,M=On(i),v=Mn(i);return{country:u,currency:I,setCountry:_,currencies:i,countries:a,activeCountry:g,formatPrice:(b,D)=>M(b,D??I),formatMoney:(b,D)=>v(b,D??I),ready:C}},[u,i,a,l,C]);return Dn(Ze.Provider,{value:k,children:e})}function Dt(e){let t=Ot(Ze);if(!t&&!e?.optional)throw new Error("useCurrency must be used within a CurrencyProvider");return t}function lo(){return Ot(Ze)?.country??""}import{createContext as Qn,useCallback as w,useContext as jn,useEffect as X,useMemo as jt,useRef as Z,useState as N}from"react";function Ft(){return"/edit"}function $t(e,t){return e.valid?!1:e.reason==="firstOrderOnly"?!0:e.reason==="notEligible"&&!t}var Ht="We'll confirm this discount when you place your order.",mo="Confirmed at checkout";function go(e){return e&&(e.valid||e.deferred)?e.code:void 0}var Ut="coupon_code: ";function ho(e){return!(e instanceof Se)||e.status!==400||!e.message.startsWith(Ut)?null:e.message.slice(Ut.length)}function Bt(e,t){return e.map(n=>({qty:n.qty,slug:n.slug,name:`${n.name.lead}${n.name.accent}`.trim(),finish:n.finishName,size:n.size,kind:n.kind,sku:n.sku,pack:n.pack,priceLabel:t(n)}))}var De="Price on request",Un="Request a quote",qt="from ",xo="From ",So="each",Wt="Free",vo="Updating";function Je(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function et(e,t){let n=e?.[t];return Je(n)?n:null}function Eo(e,t,n,r){let o=et(e,n),i=et(t,n);return o===null&&i===null?0:o===null?1:i===null?-1:r==="asc"?o-i:i-o}function Po(e,t,n,r){if(n==null&&r==null)return!0;let o=et(e,t);return!(o===null||n!=null&&o<n||r!=null&&o>r)}var $n={priced:!1,unit:null,was:null,onSale:!1,setTotal:null};function Hn(e,t,n){if(!Je(e))return $n;let r=Je(t)&&t>e?t:null;return{priced:!0,unit:e,was:r,onSale:r!==null,setTotal:n!=null?e*n:null}}function wo(e,t,n=""){return!e.priced||e.unit==null?De:`${n}${j(e.unit,t)}`}function _o(e,t){return e.was==null?null:j(e.was,t)}function Bn(e,t,n=1){let r=me(e,t);if(r===null)return{priced:!1,unit:null,isFrom:!1,setTotal:null};let o=e.reduce((a,l)=>a+l.wheels,0),i=Math.min(...e.map(a=>a.prices[t]));return{priced:!0,unit:i,isFrom:i*o!==r,setTotal:r*n}}var qn={priced:!1,unit:null,isFrom:!1,was:null,onSale:!1,setTotal:null};function Ro(e,t,n,r=1){let o=Hn(e.prices[n],e.msrpPrices?.[n],4),i=o.setTotal==null?null:o.setTotal*r;if(!t)return{priced:o.priced,unit:o.unit,isFrom:!0,was:o.was,onSale:o.onSale,setTotal:null,fromSetTotal:i};let a=Bn(t.components,n,r);return a.priced?{priced:!0,unit:a.unit,isFrom:a.isFrom,was:null,onSale:!1,setTotal:a.setTotal,fromSetTotal:i}:{...qn,fromSetTotal:i}}function Wn(e,t){return!e.priced||e.unit==null?De:`${e.isFrom?qt:""}${j(e.unit,t)}`}function No(e,t){return e.was==null?null:j(e.was,t)}function ko(e,t){return!e.priced||e.unit==null?Un:Wn(e,t)}function Io(e,t){let n=e.savings[t];if(n===void 0||e.components.length===0)return null;let r=0;for(let i of e.components){let a=i.prices?.[t];if(typeof a!="number")return null;r+=a*i.quantity}let o=j(r-n,t);return{was:j(r,t),amount:e.savingIsFrom?`${qt}${o}`:o}}var Gn=/^[^@\s]+@[^@\s]+\.[^@\s]+$/;function Gt(e){return Gn.test(e.trim())}var Kt="sf:ga-purchases",Kn=20;function Vt(){return typeof window>"u"||window.parent!==window}function Ee(...e){try{if(Vt()||typeof window.gtag!="function")return;window.gtag(...e)}catch{}}function zn(e,t){let n=e.config.find(r=>r.gold)?.label;return{item_id:`${e.slug}|${e.finishName}|${e.size}`,item_name:`${e.name.lead}${e.name.accent}`.trim(),...n?{item_variant:n}:{},price:me(e.components,t)??0,quantity:e.qty}}function tt(e,t){return e.filter(Fe).map(n=>zn(n,t))}function Do(e){Ee("event","view_item",{currency:e.currency,value:e.pricePerSet,items:[{item_id:e.itemId,item_name:e.itemName,...e.variant?{item_variant:e.variant}:{},price:e.pricePerSet,quantity:1}]})}function Xt(e,t){let n=tt([e],t);n.length!==0&&Ee("event","add_to_cart",{currency:t,value:n[0].price*n[0].quantity,items:n})}function Fo(e){let t=tt(e.lines,e.currency);t.length!==0&&Ee("event","begin_checkout",{currency:e.currency,value:e.value,...e.coupon?{coupon:e.coupon}:{},items:t})}var zt=new Set;function Vn(e){if(zt.has(e))return!1;zt.add(e);try{let t=JSON.parse(pe.getItem(Kt)??"[]");if(t.includes(e))return!1;pe.setItem(Kt,JSON.stringify([...t,e].slice(-Kn)))}catch{}return!0}function Uo(e){let t=e.confirmation;if(Vt()||!Vn(t.orderNumber))return;let n=t.currency,r=Number(t.grandTotal);Ee("event","purchase",{transaction_id:t.orderNumber,currency:n,value:r,shipping:Number(t.freightCharge),...t.couponCode?{coupon:t.couponCode}:{},items:tt(e.lines,n)}),e.adsSendTo&&Ee("event","conversion",{send_to:e.adsSendTo,transaction_id:t.orderNumber,currency:n,value:r})}var Xn="Arranged after review",Yt="Calculated at checkout",Yn=Yt,Bo=Yt;function Qt({quoted:e,optionCount:t,chosenAmount:n,couponWaivesFreight:r}){return e&&t===0?"arranged":r?"free":n===void 0?"pending":n===0?"free":"charged"}function qo(e){switch(e){case"arranged":return Xn;case"pending":return Yn;case"free":return Wt;case"charged":return null}}import{jsx as tr}from"react/jsx-runtime";var Zn=400,Jn=400,er=1500;function Fe(e){return(e.components?.length??0)>0}function Zt(e,t){return{code:e,valid:t.valid,deferred:$t(t,t.askedAsShopper),message:t.message||void 0,effects:t.effects??void 0}}function en(e,t){return me(e.components,t)}function nt(e,t){let n=en(e,t);return n===null?null:n*e.qty}function Jt(e){return e!=="tyre"}var tn=Qn(null);function ti({children:e,preview:t=!1}){let{currency:n,country:r,formatMoney:o}=Dt(),[i,a]=N(t),[l,c]=N([]),[u,m]=N([]),[C,d]=N([]),[_,k]=N(!1),g=Z(new Set),[L,I]=N([]),[M,v]=N(!1),[b,D]=N(null),[W,te]=N(null),[ue,y]=N(null),[E,x]=N(0),F=w(()=>x(s=>s+1),[]),[ne,ge]=N(void 0),[G,Ne]=N(null),[P,U]=N(null),[K,re]=N(!1),[O,ce]=N(null),oe=Z(void 0),z=w(()=>a(!0),[]),Y=w(()=>a(!1),[]),ke=w(()=>a(s=>!s),[]);X(()=>{t||typeof window>"u"||new URLSearchParams(window.location.search).get("cart")==="open"&&z()},[z,t]);let $=Ft(),V=Z($);X(()=>{V.current!==$&&(V.current=$,t||Y())},[$,t,Y]);let Ie=w(s=>{Ne(p=>p?.country===s?.country&&p?.subdivision===s?.subdivision&&p?.postcode===s?.postcode?p:s)},[]),T=w((s,p)=>{v(!0),!(!p||!Jt(s))&&I(f=>f.includes(p)?f:[...f,p])},[]),Le=M||l.length>0,ie=Z(!0);X(()=>(ie.current=!0,()=>{ie.current=!1}),[]),X(()=>{if(t)return;let s=[...L,...l.filter(f=>Jt(f.kind)).map(f=>f.slug)],p=[...new Set(s)].filter(f=>f&&!g.current.has(f));if(p.length!==0){for(let f of p)g.current.add(f);q.listWheelsBySlug(p).then(f=>{if(!ie.current||f.length===0)return;let h=new Set(f.map(S=>S.slug));m(S=>[...S.filter(se=>!h.has(se.slug)),...f])})}},[t,L,l]),X(()=>{if(t||!Le||_)return;let s=!0;return q.listBundles().then(p=>{s&&(d(p),k(!0))}),()=>{s=!1}},[t,Le,_]);let H=b?.deliveryOptions??[],he=b?.courier??null;X(()=>{b&&ce(s=>s&&H.some(p=>p.id===s)?s:H[0]?.id??null)},[b]);let ae=w(()=>l.filter(Fe).flatMap(s=>It(s.components,s.qty)),[l]),ye=w(async(s,p)=>{let f=s.trim().toUpperCase();if(!f)return;let h=ae();if(h.length===0){U({code:f,valid:!1,message:"Add a wheel to the cart first."});return}re(!0),oe.current=p;try{let S=await q.validateCoupon({code:f,items:h,currency:n,shippingMethodId:O??void 0,customerEmail:p});U(Zt(f,S))}catch{U({code:f,valid:!1,unchecked:!0,message:"Could not check that code. Please try again."})}finally{re(!1)}},[ae,n,O]),de=w(()=>{U(null),oe.current=void 0},[]),Ae=w(s=>{if(!P)return;let{code:p}=P;U(f=>f&&f.code===p?{code:p,valid:!1,refused:!0,message:s}:f)},[P]);X(()=>{if(!P||P.refused)return;let s=P.code,p=h=>h!==null&&h.code===s&&!h.refused,f=setTimeout(async()=>{let h=ae();if(h.length===0){U(S=>p(S)?{code:s,valid:!1,message:"Add a wheel to the cart first."}:S);return}re(!0);try{let S=await q.validateCoupon({code:s,items:h,currency:n,shippingMethodId:O??void 0,customerEmail:oe.current});U(se=>p(se)?Zt(s,S):se)}catch{}finally{re(!1)}},Zn);return()=>clearTimeout(f)},[l,n,O]);let be=P&&!P.refused?P.code:void 0;X(()=>{if(t)return;let s=!0,p=l,f=setTimeout(async()=>{let h=ae();if(h.length===0){D(null),te(null),ge(void 0);return}try{let S=await q.quoteCart({items:h,currency:n,shippingMethodId:O??void 0,couponCode:be,customerEmail:oe.current||void 0,country:G?.country||r||void 0,subdivision:G?.country&&G.subdivision||void 0,postcode:G?.country&&G.postcode||void 0});if(!s)return;D(S),te(p),y(null)}catch{if(!s)return;y(p)}ge(be)},Jn);return()=>{s=!1,clearTimeout(f)}},[l,n,O,be,r,G,E]);let R=w(s=>{c(p=>{let f=p.findIndex(h=>h.id===s.id);return f===-1?[...p,s]:p.map((h,S)=>S===f?{...h,qty:Math.min(je,h.qty+s.qty)}:h)}),Xt(s,n)},[n]),Q=w(s=>{c(p=>p.filter(f=>f.id!==s))},[]),Te=w((s,p)=>{let f=Math.max(1,Math.min(je,p));c(h=>h.map(S=>S.id===s?{...S,qty:f}:S))},[]),ut=w(s=>{c(s)},[]),[Ce,Sn]=N(null),ct=Z(null);ct.current=Ce;let B=Z(null),Ge=Z(""),dt=w((s,p)=>{let f=s.trim().toLowerCase();Gt(f)&&Sn(h=>h&&h.email===f&&h.firstName===(p??"")?h:{email:f,firstName:p??""})},[]);X(()=>{if(t||!Ce)return;let s=Bt(l.filter(Fe),h=>nt(h,n)===null?De:o(nt(h,n),n)),p={email:Ce.email,firstName:Ce.firstName,currency:n,items:s},f=JSON.stringify(p);if(f!==Ge.current)return B.current&&clearTimeout(B.current),B.current=setTimeout(()=>{B.current=null,Ge.current=f,q.captureCart(p).catch(h=>{})},er),()=>{B.current&&(clearTimeout(B.current),B.current=null)}},[l,Ce,n,t]);let ft=w(()=>{B.current&&(clearTimeout(B.current),B.current=null);let s=ct.current;s&&(Ge.current="",q.captureCart({email:s.email,firstName:s.firstName,currency:n,items:[]}).catch(p=>{}))},[n]),pt=jt(()=>{let s=l.reduce((A,fe)=>{let Oe=nt(fe,n);return Oe===null?A:A+Oe},0),p=l.some(A=>en(A,n)===null),f=l.reduce((A,fe)=>A+fe.qty,0),h=P?.valid?P.effects:void 0,S=h?Math.min(s,Number(h.discountAmount)):0,se=b?.bundleDiscount??0,En=b?.appliedBundles??[],Ke=!!h?.freeShipping,yt=H.find(A=>A.id===O),bt=Ke?0:b?.shipping??yt?.amount??0,Pn=Qt({quoted:b!==null,optionCount:H.length,chosenAmount:yt?.amount,couponWaivesFreight:Ke}),ze={};for(let A of h?.freeUnits??[])ze[A.partNumber]=(ze[A.partNumber]??0)+A.quantity;let wn=b?.tax??null,_n=b?b.grandTotal:s-S-se+bt;return{sets:f,units:l.reduce((A,fe)=>A+(fe.components??[]).reduce((Oe,Rn)=>Oe+Rn.wheels*fe.qty,0),0),subtotal:s,hasUnpricedLine:p,discount:S,bundleDiscount:se,appliedBundles:En,shipping:bt,freeShipping:Ke,shippingStatus:Pn,freeUnitsByPartNumber:ze,tax:wn,grand:_n,repricing:!!P?.refused&&b!==null&&ne===P?.code,quoted:b!==null&&W===l,serverSubtotal:b?.subtotal??null,quoteFailed:ue===l,currency:n}},[l,n,P,H,O,b,ne,W,ue]),mt=Z(!0),gt=w(s=>{mt.current=s},[]),ht=w(s=>{R(s),mt.current&&z()},[R,z]),vn=jt(()=>({isOpen:i,preview:t,open:z,close:Y,toggle:ke,items:l,catalog:u,bundles:C,warmCatalog:T,add:R,addAndOpen:ht,setAutoOpen:gt,remove:Q,setQty:Te,replaceItems:ut,identify:dt,clearCapturedCart:ft,coupon:P,applyCoupon:ye,removeCoupon:de,refuseCoupon:Ae,couponBusy:K,deliveryOptions:H,setQuoteDestination:Ie,courier:he,requote:F,shippingMethodId:O,setShippingMethodId:ce,totals:pt}),[i,t,z,Y,ke,l,u,C,T,R,ht,gt,Q,Te,ut,dt,ft,P,ye,de,Ae,K,H,Ie,he,F,O,pt]);return tr(tn.Provider,{value:vn,children:e})}function nn(){let e=jn(tn);if(!e)throw new Error("useCart() must be called inside <CartProvider>. Mount the provider in app/layout.tsx.");return e}import{cache as dr}from"react";function rn(e){return/(?:^|\|)(?:slug|xhost):/.test(e)}function on(e,t,n,r){for(;e.size>=t;){let o,i;for(let[l,c]of e){if(c.expiresAt<=r){o=l;break}i===void 0&&n(l)&&(i=l)}let a=o??i??e.keys().next().value;if(a===void 0)return;e.delete(a)}}var nr=6e4,rr=5e3,or=500,Ue=new Map;async function ir(e){let{host:t,matchesRequestHost:n}=await _t();if(!t)return"";let r=await Rt();return r?`${e}|slug:${encodeURIComponent(t)}/${encodeURIComponent(r)}`:n?`${e}|host:${t}`:`${e}|xhost:${t}`}async function an(e,t){if(await Nt()!==null)return t();let n=await ir(e);if(!n)return t();let r=Date.now(),o=Ue.get(n);if(o&&o.expiresAt>r)return o.load;let i=await t(),a=i.outcome.state==="failed",l=a?rr:nr,c=Ue.get(n)?.lastGood,u=i.outcome.state==="ok"?i:a?c:void 0,m=a&&u?u:i;return on(Ue,or,rn,r),Ue.set(n,{load:m,expiresAt:r+l,lastGood:u}),m}var ar=404;function sr(e){if(e instanceof Se&&e.status===ar)return{state:"absent"};let t=e instanceof Se?e.status:-1,n=e instanceof Error?e.message:String(e);return{state:"failed",status:t,detail:n}}var lr="[storefront:chrome-load-failed]";function ur(e,t){console.error(`${lr} ${e} status=${t.status} \u2014 serving fallback chrome`,t.detail)}async function sn(e,t,n,r){try{let o=await t();return r?.(o)?{value:o,outcome:{state:"absent"}}:{value:o,outcome:{state:"ok"}}}catch(o){let i=sr(o);return i.state==="failed"&&ur(e,i),{value:n,outcome:i}}}function cr(e){return e==="production"?"silent":"banner"}var ui=cr("production");function fr(e,t){return e?.trim()||t}function yi({legalName:e,foundedYear:t,siteName:n},r=new Date().getFullYear()){let o=fr(e,n);return`\xA9 ${t&&t<r?`${t}\u2013${r}`:`${r}`} ${o}`}var pr={name:xe,legalName:null,foundedYear:null,faviconUrl:null,currencies:[],defaultCurrency:null,countries:[],defaultCountry:null,commerceEnabled:!0,cardPayments:!1,paymentMethods:[],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,consentEnabled:!1,consentPrivacyPage:null,consentNoticeOptOut:!1,privacyPage:null,termsPage:null,footerCookieSettings:!0,footerSitemap:!0,socialLinks:Ye},bi=dr(async()=>an("site",()=>sn("site",async()=>{let e=await q.getSite();return{name:Et(e.name),legalName:e.legalName?.trim()||null,foundedYear:e.foundedYear??null,faviconUrl:e.faviconUrl??null,currencies:e.currencies??[],defaultCurrency:e.defaultCurrency??null,countries:e.countries??[],defaultCountry:e.defaultCountry??null,commerceEnabled:e.commerceEnabled??!0,cardPayments:e.cardPayments??!1,paymentMethods:e.paymentMethods??(e.cardPayments?["card"]:[]),paypalClientId:e.paypalClientId??null,paypalEnvironment:e.paypalEnvironment??null,squareApplicationId:e.squareApplicationId??null,squareLocationId:e.squareLocationId??null,squareEnvironment:e.squareEnvironment??null,ga4MeasurementId:e.ga4MeasurementId??null,googleAdsId:e.googleAdsId??null,googleAdsConversionLabel:(e.googleAdsId?e.googleAdsConversionLabel:null)??null,metaPixelId:e.metaPixelId??null,consentEnabled:e.consentEnabled??!1,consentPrivacyPage:e.consentPrivacyPage??null,consentNoticeOptOut:e.consentNoticeOptOut??!1,privacyPage:e.privacyPage??null,termsPage:e.termsPage??null,footerCookieSettings:e.footerCookieSettings??!0,footerSitemap:e.footerSitemap??!0,socialLinks:Pt(e.socialLinks)}},pr)));var Ci={name:xe,legalName:null,foundedYear:null,faviconUrl:null,currencies:[{code:"USD",symbol:"$",decimalPlaces:2,isDefault:!0}],defaultCurrency:"USD",countries:[{code:"US",name:"United States",currency:"USD",url:"",isDefault:!0,chargeTax:!1,taxDisplay:"none",taxName:"",taxRate:null,postalLabel:"Zip Code"}],defaultCountry:"US",commerceEnabled:!0,cardPayments:!0,paymentMethods:["card"],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,consentEnabled:!1,consentPrivacyPage:null,consentNoticeOptOut:!1,privacyPage:null,termsPage:null,footerCookieSettings:!0,footerSitemap:!0,socialLinks:Ye};import{jsx as mr}from"react/jsx-runtime";function Si({tone:e="bad",role:t,children:n}){return mr("div",{role:t,className:["border bg-surface px-4 py-3 text-[14px] leading-relaxed text-fg",e==="good"?"border-accent":e==="bad"?"border-alert":"border-line"].join(" "),children:n})}import{jsx as we,jsxs as rt}from"react/jsx-runtime";import{useEffect as $e,useId as br,useRef as un,useState as He}from"react";import{useRootIsDark as Cr}from"efficient-shell/theme";import{efficientClientOpen as gr}from"efficient-easel/screen/lib/session";var Pe=new Map,hr=64;async function yr(e){if(!gr())return null;try{let t=await fetch(`${vt()}/logo-analysis.json?url=${encodeURIComponent(e)}`);if(!t.ok)return null;let n=await t.json();if(!n||typeof n!="object")return null;let{reversed:r,inkIsDark:o}=n;return typeof r!="string"?null:{reversed:r,inkIsDark:typeof o=="boolean"?o:null}}catch{return null}}function ln(e){let t=Pe.get(e);if(t)return t;let n=yr(e);if(Pe.set(e,n),Pe.size>hr){let r=Pe.keys().next();r.done||Pe.delete(r.value)}return n}var xr=202/22,Sr=.88,Hi=16,vr="invert(1)";function Bi({variant:e="header",scrolled:t=!0,src:n,reverse:r=!1,color:o=null,onLightSurface:i,reversedSrc:a,inkIsDark:l,size:c="medium",sizePx:u,sizeUnit:m,wordmark:C,siteName:d=xe,fitToContainer:_=!1,fitWordmarkToContainer:k=!1,fitFloorPx:g,hideClass:L,hideAttrs:I,part:M}){let v=C&&C.trim()?C.trim():d,[b,D]=He(null),W=un(null),te=R=>{W.current=R};$e(()=>{D(W.current?.ownerDocument??null)},[]);let ue=!Cr({doc:b,whenUnset:!0}),y=n&&n.trim()?n.trim():null,E=!!y&&wt(y),x=i??(ue&&t),F=o&&o.trim()?o.trim():null,ne=r&&!F,ge=`logo-color-${br().replace(/[^A-Za-z0-9_-]/g,"")}`,G=ne&&E&&y&&a!=null?{reversed:a,inkIsDark:l??null}:null,Ne=G!==null,[P,U]=He(null);$e(()=>{if(!ne||!y||!E||Ne){U(null);return}let R=!1;return U(null),ln(y).then(Q=>{R||U(Q)}),()=>{R=!0}},[ne,y,E,Ne]);let K=G??P,re=!!K&&K.inkIsDark!==null&&(x?!K.inkIsDark:K.inkIsDark),O=ne&&!!y&&!E&&!x,ce=re&&K?K.reversed:y,oe=ce?[ce]:[],[z,Y]=He(0);$e(()=>{Y(0)},[y,re]);let ke=e==="footer"?Xe:Ve[c],$=u&&u>0?u:ke,V=(u&&u>0?Ct(u,m,"size",St):null)??`${$}px`,Ie=Math.round($*xr),T=z<oe.length?oe[z]:null,[Le,ie]=He(ce),H=T!==null&&T===Le,he=un(null);$e(()=>{let R=he.current;if(!R||!R.complete)return;if(R.naturalWidth>0||R.naturalHeight>0){ie(T);return}let Q=!1;return R.decode().then(()=>!Q&&ie(T),()=>!Q&&Y(Te=>Te+1)),()=>{Q=!0}},[T]);let ae=_||k,ye=`calc(100cqi / ${((v.length+1)*Sr).toFixed(2)})`,de=ae&&g&&g>0?V===`${$}px`?`${Math.min(g,$)}px`:`min(${g}px, ${V})`:null,Ae=ae?de===null?`min(${V}, ${ye})`:`clamp(${de}, ${ye}, ${V})`:V,be=rt("span",{className:`font-display font-bold tracking-[0.18em] ${de===null?"whitespace-nowrap":"whitespace-normal"}`,style:{fontSize:Ae,lineHeight:1,...F?{color:F}:{}},"aria-label":v,children:[v,we("span",{className:"text-accent",style:F?{color:F}:void 0,children:"."})]});return rt("span",{ref:te,className:xt("inline-flex items-center",L??""),...I,...M,children:[!H&&be,F&&T&&we("svg",{"aria-hidden":"true",focusable:"false",width:"0",height:"0",style:{position:"absolute"},children:rt("filter",{id:ge,colorInterpolationFilters:"sRGB",children:[we("feFlood",{style:{floodColor:F}}),we("feComposite",{in2:"SourceAlpha",operator:"in"})]})}),T&&we("img",{ref:he,src:T,alt:v,width:Ie,height:$,className:"shrink-0 object-contain",style:{...H?{height:V,width:"auto",..._?{maxWidth:"100cqi"}:{}}:{display:"none"},...O?{filter:vr}:{},...F?{filter:`url(#${ge})`}:{}},onLoad:()=>ie(T),onError:()=>Y(R=>R+1)},T)]})}var Wi="w-full border-2 border-line bg-bg px-4 py-4 font-display text-[17px] tracking-[-0.005em] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent",cn="w-0 min-w-0 flex-1",Gi="w-0 min-w-[7rem] flex-1";import{jsx as _e,jsxs as Pr}from"react/jsx-runtime";function Er({spokes:e,mesh:t=!1,className:n}){let a=c=>Math.round(c*1e3)/1e3,l=[];for(let c=0;c<e;c++){let u=c/e*Math.PI*2-Math.PI/2;if(l.push({x1:a(100+Math.cos(u)*22),y1:a(100+Math.sin(u)*22),x2:a(100+Math.cos(u)*86),y2:a(100+Math.sin(u)*86),main:!0}),t){let m=u+Math.PI/e;l.push({x1:a(100+Math.cos(m)*22*1.4),y1:a(100+Math.sin(m)*22*1.4),x2:a(100+Math.cos(m)*78),y2:a(100+Math.sin(m)*78),main:!1})}}return Pr("svg",{viewBox:"0 0 200 200",fill:"none",stroke:"currentColor",className:n??"block h-[70%] w-[70%] transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)]",children:[_e("circle",{cx:100,cy:100,r:92,strokeWidth:2}),_e("circle",{cx:100,cy:100,r:84,strokeWidth:1,opacity:.4}),_e("circle",{cx:100,cy:100,r:22,strokeWidth:2}),_e("circle",{cx:100,cy:100,r:6,fill:"currentColor"}),l.map((c,u)=>_e("line",{x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,stroke:"currentColor",strokeWidth:c.main?6:3,strokeLinecap:"round",opacity:c.main?1:.5},u))]})}var Xi="#c9a461",dn=[{f:"black",label:"Black",hex:"#171717"},{f:"silver",label:"Silver",hex:"#cccccc"},{f:"bronze",label:"Bronze",hex:"#8a6438"},{f:"graphite",label:"Graphite",hex:"#3a3c3f"},{f:"red",label:"Candy Red",hex:"#7a0f14"}],Yi={name:"",color:"var(--fg)",family:"silver",src:""};function wr(e,t){let n=r=>{let o=dn.findIndex(i=>i.f===r);return o===-1?dn.length:o};return n(e)-n(t)||e.localeCompare(t)}function Qi(e){let t=new Set;for(let n of e)for(let r of n.finishes??[])r?.family&&t.add(r.family);return[...t].sort(wr)}import{useEffect as _r,useRef as fn,useState as Rr}from"react";import{jsx as le,jsxs as ot}from"react/jsx-runtime";function Nr({customerEmail:e,disabled:t=!1}){let{coupon:n,applyCoupon:r,removeCoupon:o,couponBusy:i}=nn(),[a,l]=Rr(""),c=fn(!1),u=fn(null);_r(()=>{!c.current||n===null||(c.current=!1,u.current?.focus())},[n]);async function m(){t||i||!a.trim()||(c.current=!0,await r(a,e),l(""))}return ot("div",{className:"flex flex-col gap-2",children:[n===null?ot("div",{className:"flex border border-line",children:[le("input",{type:"text",value:a,onChange:C=>l(C.target.value),onKeyDown:C=>{C.key==="Enter"&&(C.preventDefault(),m())},placeholder:"Coupon code","aria-label":"Coupon code",disabled:t,className:`${cn} bg-transparent px-4 py-4 font-mono text-[11px] uppercase tracking-[0.18em] text-fg outline-none placeholder:text-fg-dim`}),le("button",{type:"button",onClick:()=>{m()},disabled:i||t,className:"border-l border-line px-4 font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:bg-btn hover:text-btn-ink disabled:cursor-wait disabled:opacity-60",children:i?"\u2026":"Apply"})]}):ot("div",{className:["flex items-center justify-between gap-3 border px-4 py-3",n.valid?"border-accent":"border-line"].join(" "),style:n.valid?{background:"color-mix(in oklab, var(--accent) 8%, transparent)"}:void 0,children:[le("span",{className:["font-mono text-[11px] uppercase tracking-[0.22em]",n.valid?"text-accent":n.deferred||n.unchecked?"text-fg":"text-fg-dim line-through"].join(" "),children:n.code}),n.unchecked&&le("button",{type:"button",onClick:()=>{r(n.code,e)},disabled:i||t,className:"ml-auto font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:text-fg disabled:cursor-wait disabled:opacity-60",children:i?"\u2026":"Try again"}),!t&&le("button",{ref:u,type:"button",onClick:o,"aria-label":`Remove coupon ${n.code}`,className:"font-mono text-[12px] text-fg-dim transition-colors hover:text-fg",children:"\u2715"})]}),n?.deferred?le("p",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-fg-dim",children:Ht}):n&&!n.valid&&n.message&&le("p",{role:"alert",className:"font-mono text-[10px] uppercase tracking-[0.18em] text-alert",children:n.message})]})}var it="Ads on. Shopper can opt out.",Be="Ads and analytics off until Accept",kr={us:{region:"us",name:"United States",model:"opt-out",law:"California CCPA / CPRA, other state laws",beforeChoice:it,footerLink:"Do Not Sell or Share My Personal Information",panelEyebrow:"Do not sell or share",adsRowName:"Sale or sharing for ads"},ca:{region:"ca",name:"Canada",model:"opt-in",law:"PIPEDA, Quebec Law 25",beforeChoice:Be,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},au:{region:"au",name:"Australia",model:"opt-out",law:"Privacy Act 1988 (APPs)",beforeChoice:it,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},nz:{region:"nz",name:"New Zealand",model:"opt-out",law:"Privacy Act 2020",beforeChoice:it,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},uk:{region:"uk",name:"United Kingdom",model:"opt-in",law:"PECR, UK GDPR",beforeChoice:Be,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},eu:{region:"eu",name:"European Union",model:"opt-in",law:"ePrivacy Directive, GDPR",beforeChoice:Be,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},other:{region:"other",name:"All other countries",model:"opt-in",law:"Safe default",beforeChoice:Be,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"}};function Ir(e){let t=[...e.googleAds?["Google"]:[],...e.meta?["Facebook","Instagram"]:[]];return t.length<=1?t.join(""):`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}function oa(e,t,n){let r=Ir(n),o=r?`We use cookies to count visits and to show you ${t} ads on ${r}.`:"We use cookies to count visits.";return e.model==="opt-in"?{heading:r?"Cookies and ads":"Cookies",before:`${o} Nothing loads until you choose. You can change this at any time with `,link:e.footerLink,after:" at the bottom of every page."}:{heading:r?"Cookies and ads":"Cookies",before:`${o} You can say no at any time: choose Privacy choices, or use `,link:e.footerLink,after:" at the bottom of every page."}}var ia={accept:"Accept all",reject:"Reject all",choose:"Choose",save:"Save",ok:"OK",privacyChoices:"Privacy choices",privacyPolicy:"Privacy Policy",alwaysOn:"Always on",close:"Close",cookieSettings:"Cookie settings"};var Lr={asked:!1,region:"other",model:"opt-in",analytics:!0,ads:!0,chosen:!0,gpc:!1};var Ar=Lr;function ua(e=Ar){if(e.asked)return e.ads?"granted":"denied"}function da(){let e=typeof crypto<"u"?crypto:void 0;if(typeof e?.randomUUID=="function")return e.randomUUID();let t=new Uint8Array(16);if(typeof e?.getRandomValues=="function")e.getRandomValues(t);else for(let r=0;r<t.length;r++)t[r]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}import{Children as Or,isValidElement as Mr,useEffect as mn,useId as Dr,useLayoutEffect as yn,useRef as J,useState as gn}from"react";var qe=(e,t)=>!!e[t]&&!e[t].disabled;function at(e,t,n){let r=e.length;for(let o=1;o<=r;o++){let i=((t+n*o)%r+r)%r;if(qe(e,i))return i}return t}function st(e,t){return at(e,t===1?-1:e.length,t)}function lt(e,t){return qe(e,t)?t:Math.max(st(e,1),0)}function pn(e,t,n){let{open:r,focus:o}=e,i=a=>({...e,...a});if(t.length===1&&/\S/.test(t)){let a=e.typed+t.toLowerCase(),l=n.findIndex((c,u)=>qe(n,u)&&c.label.toLowerCase().startsWith(a));return{state:i({open:!0,typed:a,focus:l>=0?l:o}),handled:!0}}if(!r)return t==="ArrowDown"||t==="ArrowUp"||t==="Enter"||t===" "?{state:i({open:!0,typed:""}),handled:!0}:{state:e,handled:!1};switch(t){case"ArrowDown":return{state:i({focus:at(n,o,1)}),handled:!0};case"ArrowUp":return{state:i({focus:at(n,o,-1)}),handled:!0};case"Home":return{state:i({focus:st(n,1)}),handled:!0};case"End":return{state:i({focus:st(n,-1)}),handled:!0};case"Enter":case" ":return qe(n,o)?{state:i({open:!1,typed:""}),commit:o,refocus:!0,handled:!0}:{state:e,handled:!0};case"Escape":return{state:i({open:!1,typed:""}),refocus:!0,handled:!0};case"Tab":return{state:i({open:!1,typed:""}),handled:!1};default:return{state:e,handled:!1}}}import{placeMenu as Fr}from"efficient-shell/ui";import{Fragment as Gr,jsx as ee,jsxs as bn}from"react/jsx-runtime";var hn={body:"text-[length:var(--size-body,14px)]",label:"text-[length:var(--size-label,13px)]"};function Ur({items:e,value:t,onPick:n,open:r,onOpen:o,onClose:i}){let[a,l]=gn(!1),c=r!==void 0,u=c?r:a,[m,C]=gn(0),d=J({text:"",timer:0}),_=J(null),k=J(null),g=J(null),L=Dr(),I=J(null),M=e.findIndex(y=>y.value===t),v=y=>{y!==u&&(c||l(y),y?o?.():i?.())},b=y=>{let E=e[y];!E||E.disabled||(n(E.value),v(!1),k.current?.focus())},D=y=>{let E={open:u,focus:u?m:lt(e,M),typed:d.current.text},x=pn(E,y,e);return!x.handled&&x.state.open===u?!1:(x.state.typed!==E.typed&&(d.current.text=x.state.typed,window.clearTimeout(d.current.timer),d.current.timer=window.setTimeout(()=>{d.current.text=""},500)),C(x.state.focus),x.commit!==void 0?b(x.commit):v(x.state.open),x.refocus&&k.current?.focus(),x.handled)},W=J(D);W.current=D;let te=J(()=>v(!1));te.current=()=>v(!1);let ue=y=>{u||(I.current=y.nativeEvent,W.current(y.key)&&y.preventDefault())};return mn(()=>{if(!u)return;let y=x=>{_.current?.contains(x.target)||te.current()},E=x=>{x!==I.current&&W.current(x.key)&&x.preventDefault()};return document.addEventListener("mousedown",y),document.addEventListener("keydown",E),()=>{document.removeEventListener("mousedown",y),document.removeEventListener("keydown",E)}},[u]),mn(()=>{u&&(d.current.text||C(lt(e,M)))},[u]),yn(()=>{if(!u||!g.current)return;g.current.children.item(m)?.scrollIntoView({block:"nearest"})},[m,u]),{open:u,toggle:()=>v(!u),close:()=>v(!1),focusIdx:m,setFocusIdx:C,pick:y=>b(e.findIndex(E=>E.value===y)),wrapRef:_,triggerRef:k,listRef:g,listId:L,onTriggerKeyDown:ue,activeId:u?`${L}-${m}`:void 0}}var $r={select:{list:"absolute left-0 top-full z-50 mt-1 max-h-[280px] w-max min-w-full overflow-y-auto border-2 border-accent bg-bg shadow-xl",item:(e,t,n)=>["px-3 py-3 font-mono text-[13px] font-semibold uppercase tracking-[0.1em] transition-colors whitespace-nowrap",n?"cursor-not-allowed opacity-40":"cursor-pointer",e&&!n?"bg-accent text-bg":"bg-bg text-fg"].join(" ")},cell:{list:"absolute left-0 top-full z-50 mt-1 max-h-[320px] w-max min-w-full overflow-y-auto border-2 border-accent bg-bg shadow-xl",item:e=>[`cursor-pointer whitespace-nowrap px-6 py-3 font-mono ${hn.label} font-semibold uppercase tracking-[0.1em] transition-colors`,e?"bg-accent text-bg":"bg-bg text-fg"].join(" "),pickerMarker:!0},hairline:{list:"absolute left-0 top-full z-50 max-h-[320px] w-full overflow-y-auto border border-line bg-bg shadow-[0_6px_20px_rgba(0,0,0,0.10)]",item:(e,t)=>[`flex cursor-pointer items-center justify-between gap-4 border-b border-line px-4 py-3 text-left ${hn.body} transition-colors last:border-b-0`,t?"border-fg font-medium text-fg":e?"border-fg text-fg":"text-fg-dim"].join(" "),pickerMarker:!0},region:{list:"absolute right-0 top-full z-[200] mt-2 flex min-w-[240px] flex-col border border-line bg-surface text-fg",item:(e,t,n,r)=>["flex w-full cursor-pointer items-center gap-3 px-4 py-3 text-left transition-colors","font-mono text-[13px] uppercase tracking-[0.18em]",e?"bg-surface-2 text-fg":"",r?"":"border-b border-line",t?"text-accent":""].join(" "),itemStyle:e=>e?void 0:{color:"color-mix(in oklab, currentColor 80%, transparent)"}}};function Hr(e,t){yn(()=>{let n=e.current,r=n?.ownerDocument.defaultView;if(!n||!r)return;let o=()=>{let i=n.style;i.top=i.bottom=i.marginTop=i.marginBottom=i.maxHeight=i.overflowY=i.translate="";let a=n.offsetParent??n.parentElement;if(!a)return;let l=a.getBoundingClientRect(),c=n.getBoundingClientRect(),u=Math.abs(c.right-l.right)<Math.abs(c.left-l.left)?"end":"start",m=Fr({trigger:{left:l.left,right:l.right,top:l.top,bottom:l.bottom},menu:{width:c.width,height:c.height},bounds:{left:0,top:0,right:r.innerWidth,bottom:r.innerHeight},align:u,side:"bottom"});if(m.side==="top"){i.top="auto",i.bottom="100%",i.marginTop="0px";let d=m.top+Math.min(c.height,m.maxHeight);i.marginBottom=`${Math.max(0,l.top-d)}px`}m.maxHeight<c.height&&(i.maxHeight=`${m.maxHeight}px`,i.overflowY="auto");let C=m.left-c.left;C&&(i.translate=`${C}px`)};return o(),r.addEventListener("resize",o),r.addEventListener("scroll",o,!0),()=>{r.removeEventListener("resize",o),r.removeEventListener("scroll",o,!0)}},[e,t])}function Br(e){return e.split(" ").map(t=>t==="left-0"?"right-0":t).join(" ")}function qr({id:e,tone:t,items:n,value:r,focusIdx:o,onFocus:i,onPick:a,listRef:l,ariaLabel:c,align:u="start"}){let m=$r[t],C=J(null);return Hr(C,n.length),ee("ul",{ref:d=>{C.current=d,l&&(l.current=d)},id:e,role:"listbox","aria-label":c,...m.pickerMarker?{"data-picker-menu":""}:{},className:u==="end"?Br(m.list):m.list,children:n.map((d,_)=>{let k=d.value===r;return ee("li",{id:`${e}-${_}`,role:"option","aria-selected":k,"aria-disabled":d.disabled||void 0,onMouseEnter:()=>!d.disabled&&i(_),onMouseDown:g=>{g.preventDefault(),d.disabled||a(d.value)},className:m.item(_===o,k&&d.value!=="",!!d.disabled,_===n.length-1),style:m.itemStyle?.(k),children:d.meta===void 0?d.label:bn(Gr,{children:[d.lead,ee("span",{className:"flex-1 whitespace-nowrap",children:d.label}),ee("span",{className:"ml-auto text-[12px] opacity-50",children:d.meta})]})},`${d.value}_${_}`)})})}function Wr({value:e,onChange:t,disabled:n,children:r,className:o,style:i,name:a,id:l,"aria-label":c,align:u}){let m=Or.toArray(r).flatMap(g=>{if(!Mr(g))return[];if(g.type!=="option")return[];let I=g.props,M=I.value!==void 0?String(I.value):"",v=I.children,b=typeof v=="string"||typeof v=="number"?String(v):M;return[{value:M,label:b,disabled:!!I.disabled}]}),C=e??"",d=Ur({items:m,value:C,onPick:g=>t?.({target:{value:g}})}),k=m.find(g=>g.value===C)?.label??m[0]?.label??"";return bn("div",{ref:d.wrapRef,className:"relative",children:[a&&ee("input",{type:"hidden",name:a,value:C}),ee("button",{ref:g=>{d.triggerRef.current=g},type:"button",disabled:n,"aria-haspopup":"listbox","aria-expanded":d.open,"aria-controls":d.open?d.listId:void 0,"aria-activedescendant":d.activeId,"aria-label":c,id:l,onClick:()=>!n&&d.toggle(),onKeyDown:g=>!n&&d.onTriggerKeyDown(g),className:`block w-full ${o??""}`,style:i,children:ee("span",{className:"block w-full truncate text-left",children:k})}),d.open&&ee(qr,{id:d.listId,tone:"select",items:m,value:C,focusIdx:d.focusIdx,onFocus:d.setFocusIdx,onPick:d.pick,listRef:d.listRef,align:u})]})}import{jsx as Re,jsxs as We}from"react/jsx-runtime";var Kr="font-mono text-[length:var(--size-label,12px)]",zr="font-semibold uppercase tracking-[0.22em] text-fg";function Cn(e){return`${e??Kr} ${zr}`}function xn(){return Re("span",{className:"text-accent",children:" *"})}function Vr({children:e,required:t,labelFace:n}){return We("span",{className:Cn(n),children:[e,t?Re(xn,{}):null]})}function Xr({label:e,required:t,hint:n,separate:r,htmlFor:o,labelFace:i,className:a,children:l}){let c=a?`flex flex-col gap-2 ${a}`:"flex flex-col gap-2",u=n?Re("span",{className:"font-mono text-[11px] uppercase tracking-[0.22em] text-fg-dim",children:n}):null;return r||n?We("div",{className:c,children:[We("label",{htmlFor:o,className:Cn(i),children:[e,t?Re(xn,{}):null]}),l,u]}):We("label",{htmlFor:o,className:c,children:[Re(Vr,{required:t,labelFace:i,children:e}),l]})}export{Ft as a,mo as b,go as c,ho as d,It as e,Qe as f,Yr as g,Qr as h,jr as i,Zr as j,Nn as k,kn as l,Jr as m,eo as n,je as o,Me as p,j as q,to as r,no as s,De as t,Un as u,qt as v,xo as w,So as x,Wt as y,vo as z,et as A,Eo as B,Po as C,Hn as D,wo as E,_o as F,Bn as G,Ro as H,Wn as I,No as J,ko as K,Io as L,Gt as M,Do as N,Fo as O,Uo as P,Bo as Q,qo as R,so as S,Dt as T,lo as U,Fe as V,nt as W,ti as X,nn as Y,yi as Z,pr as _,Ci as $,Wi as aa,cn as ba,Gi as ca,Er as da,Xi as ea,dn as fa,Yi as ga,wr as ha,Qi as ia,Nr as ja,Si as ka,Hi as la,Bi as ma,kr as na,oa,ia as pa,Lr as qa,ua as ra,da as sa,Ur as ta,qr as ua,Wr as va,Vr as wa,Xr as xa};