efficient-storefront-blocks 0.91.0 → 0.92.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/chunks/{EditorPreviewCheckout-NFLTZCIQ.js → EditorPreviewCheckout-VHPWPS3N.js} +1 -1
  3. package/dist/chunks/{SiteEditorProvider-UWRLDKJS.js → SiteEditorProvider-C4HT4BT4.js} +1 -1
  4. package/dist/chunks/chunk-7L5DVQZ4.js +1 -0
  5. package/dist/chunks/chunk-PW7BA4ZJ.js +1 -0
  6. package/dist/chunks/{chunk-HRTZ7SYX.js → chunk-RAOSZKA3.js} +1 -1
  7. package/dist/chunks/chunk-S2WLJ6H2.js +388 -0
  8. package/dist/chunks/{fitment-data-6KHIA3AT.js → fitment-data-URJZ24LU.js} +1 -1
  9. package/dist/contract.js +11 -11
  10. package/dist/editor/lib/document/blocks/commerce/AlloyWheelsListing/fields.js +1 -1
  11. package/dist/editor/lib/document/blocks/commerce/index.d.ts +1 -1
  12. package/dist/editor/lib/document/blocks/service/AppointmentBooking/fields.js +1 -1
  13. package/dist/editor/lib/document/blocks/service/ContactRouting/fields.js +1 -1
  14. package/dist/editor/lib/document/blocks/service/Events/fields.js +1 -1
  15. package/dist/editor/lib/document/blocks/service/index.d.ts +1 -1
  16. package/dist/editor/lib/document/config.d.ts +2 -0
  17. package/dist/editor/lib/document/config.js +1 -1
  18. package/dist/editor/lib/storefront-editor-words.d.ts +2 -7
  19. package/dist/editor/lib/storefront-editor-words.js +1 -1
  20. package/dist/editor.css +1 -1
  21. package/dist/index.js +53 -39
  22. package/dist/links.js +1 -1
  23. package/dist/render/built-with.json +1 -1
  24. package/dist/render/components/AppointmentBooking.d.ts +2 -1
  25. package/dist/render/components/AppointmentBooking.js +1 -1
  26. package/dist/render/components/ContactRouting.d.ts +2 -1
  27. package/dist/render/components/ContactRouting.js +1 -1
  28. package/dist/render/components/Events.d.ts +3 -1
  29. package/dist/render/components/Events.js +1 -1
  30. package/dist/render/components/GridCardTemplate.d.ts +30 -1
  31. package/dist/render/components/GridCardTemplate.js +1 -1
  32. package/dist/render/components/ProductGridSection.d.ts +2 -1
  33. package/dist/render/components/ProductGridSection.js +1 -1
  34. package/dist/render/components/PublishedFooter.js +1 -1
  35. package/dist/render/components/PublishedHeader.js +1 -1
  36. package/dist/render/components/RatingBlockView.d.ts +5 -0
  37. package/dist/render/components/RatingBlockView.js +1 -0
  38. package/dist/render/components/ReviewForm.js +1 -1
  39. package/dist/render/components/TyrePlpCard.d.ts +2 -1
  40. package/dist/render/components/TyrePlpCard.js +1 -1
  41. package/dist/render/components/TyreSummaryCard.d.ts +2 -1
  42. package/dist/render/components/TyreSummaryCard.js +1 -1
  43. package/dist/render/components/WheelCardFrame.d.ts +1 -2
  44. package/dist/render/components/WheelCardFrame.js +1 -1
  45. package/dist/render/components/card-pieces/CardPicture.d.ts +1 -1
  46. package/dist/render/components/card-pieces/CardProductPicture.js +1 -1
  47. package/dist/render/components/wheels-plp/AlloyWheelsListing.d.ts +5 -14
  48. package/dist/render/components/wheels-plp/AlloyWheelsListing.js +1 -1
  49. package/dist/render/lib/api/index.d.ts +3 -1
  50. package/dist/render/lib/api/index.js +1 -1
  51. package/dist/render/lib/chrome-cache.d.ts +1 -0
  52. package/dist/render/lib/chrome-cache.js +1 -1
  53. package/dist/render/lib/content/events-featured-look.d.ts +3 -0
  54. package/dist/render/lib/content/events-featured-look.js +1 -0
  55. package/dist/render/lib/content/product-card-seed.d.ts +7 -0
  56. package/dist/render/lib/content/product-card-seed.js +1 -1
  57. package/dist/render/lib/content/rating.d.ts +1 -0
  58. package/dist/render/lib/content/rating.js +1 -0
  59. package/dist/render/lib/document/blocks/commerce/AlloyWheelsListing/meta.d.ts +6 -0
  60. package/dist/render/lib/document/blocks/commerce/AlloyWheelsListing/meta.js +1 -1
  61. package/dist/render/lib/document/blocks/commerce/AlloyWheelsListing/render.js +1 -1
  62. package/dist/render/lib/document/blocks/commerce/ProductColour/render.js +1 -1
  63. package/dist/render/lib/document/blocks/commerce/ProductEyebrow/render.js +1 -1
  64. package/dist/render/lib/document/blocks/commerce/ProductGrid/render.js +1 -1
  65. package/dist/render/lib/document/blocks/commerce/ProductPrice/render.js +1 -1
  66. package/dist/render/lib/document/blocks/commerce/ProductSpecs/render.js +1 -1
  67. package/dist/render/lib/document/blocks/service/AppointmentBooking/render.js +1 -1
  68. package/dist/render/lib/document/blocks/service/ContactRouting/render.js +1 -1
  69. package/dist/render/lib/document/blocks/service/Events/meta.d.ts +6 -0
  70. package/dist/render/lib/document/blocks/service/Events/meta.js +1 -1
  71. package/dist/render/lib/document/blocks/service/Events/render.js +1 -1
  72. package/dist/render/lib/document/blocks/service/RatingBlock/meta.d.ts +2 -1
  73. package/dist/render/lib/document/blocks/service/RatingBlock/meta.js +1 -1
  74. package/dist/render/lib/document/blocks/service/RatingBlock/render.js +1 -1
  75. package/dist/render/lib/document/card-templates.d.ts +3 -1
  76. package/dist/render/lib/document/card-templates.js +1 -1
  77. package/dist/render/lib/document/published-chrome-data.d.ts +2 -0
  78. package/dist/render/lib/document/published-chrome-data.js +1 -0
  79. package/dist/render/lib/document/render-config.d.ts +2 -0
  80. package/dist/render/lib/document/render-config.js +1 -1
  81. package/dist/render/lib/document/section-to-box-rows-detail.js +1 -1
  82. package/dist/render/lib/document/section-to-box-rows-events.d.ts +1 -0
  83. package/dist/render/lib/document/section-to-box-rows-events.js +1 -0
  84. package/dist/render/lib/document/section-to-box-rows-reviews.d.ts +2 -1
  85. package/dist/render/lib/document/section-to-box-rows-reviews.js +1 -1
  86. package/dist/render/lib/document/section-to-box-rows-service.d.ts +1 -0
  87. package/dist/render/lib/document/section-to-box-rows-service.js +1 -0
  88. package/dist/render/lib/document/section-to-box-rows-spec.js +1 -1
  89. package/dist/render/lib/sections/grid-no-hole.d.ts +1 -1
  90. package/dist/render/lib/wheels/plp-hydrate.d.ts +3 -0
  91. package/dist/render/lib/wheels/plp-hydrate.js +1 -1
  92. package/dist/words.d.ts +12 -7
  93. package/dist/words.js +4 -4
  94. package/package.json +4 -2
  95. package/dist/chunks/chunk-4VRLGKYU.js +0 -387
  96. package/dist/chunks/chunk-PHQQRGQZ.js +0 -1
  97. package/dist/chunks/chunk-YL2HPWVT.js +0 -1
  98. package/dist/render/components/wheels-plp/PlpCard.d.ts +0 -29
  99. package/dist/render/components/wheels-plp/PlpCard.js +0 -1
  100. /package/dist/chunks/{chunk-XMTQMRA3.js → chunk-JB6ISWYA.js} +0 -0
  101. /package/dist/chunks/{chunk-4VRLGKYU.js.LEGAL.txt → chunk-S2WLJ6H2.js.LEGAL.txt} +0 -0
@@ -1 +0,0 @@
1
- import{jsx as Be}from"react/jsx-runtime";import{createContext as Rn,useCallback as i,useContext as Mn,useMemo as Nn,useState as Dn}from"react";import{createContext as we,useContext as N}from"react";import{createContext as Bt}from"react";var Te=Bt(null);var Ut=we(null),D=we({logo:null,placeholder:!1,wordmark:null});function sa(){let e=N(Te),t=N(Ut),n=N(D),a=!e&&n.placeholder,o=e?e.logoUrl:n.logo?.logoUrl??t?.logoUrl??null;return{src:a?null:o,reversedSrc:e?e.logoReversed:n.logo?.logoReversed??t?.logoReversed??null,inkIsDark:e?e.logoInkIsDark:n.logo?.logoInkIsDark??t?.logoInkIsDark??null,wordmark:e?null:n.wordmark,siteName:e?.siteName??t?.siteName}}import{contrastRatio as ca,hexToRgb as x,parseHexColor as d,readableInk as Wt,relativeLuminance as W}from"efficient-shell/format";var la="storefront-theme",ua="sf:theme-mode",da="sf:theme-switch",ha="hide",V="light",z=!1,$t=7,Vt=18;function zt(e){return e>=$t&&e<Vt}function ga(e){let{mode:t,override:n,switchShown:a,hour:o}=e;return a&&(n==="light"||n==="dark")?n:t==="auto"?zt(o)?"light":"dark":t==="light"?"light":"dark"}var S={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},Yt=[{text:"#2e2e2e",accent:"#2e2e2e",background:"#ffffff",surface:"#f7f7f7",line:"#e0e0e0",muted:"#5c5c5c"},{text:"#f7f7f7",accent:"#f7f7f7",background:"#0a0a0a",surface:"#1b1b1b",line:"#363636",muted:"#a3a3a3"},{text:"#ffffff",accent:"#ffffff",background:"#2e2e2e",surface:"#3d3d3d",line:"#545454",muted:"#b0b0b0"},{text:"#0a0a0a",accent:"#0a0a0a",background:"#f7f7f7",surface:"#ffffff",line:"#d9d9d9",muted:"#5c5c5c"}],O={selected:0,themes:Yt};function ke(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...O}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function F(e,t,n){let a=x(e),o=x(t);if(a===null||o===null)return e;let r=(c,l)=>Math.max(0,Math.min(255,Math.round(c+(l-c)*n))).toString(16).padStart(2,"0");return`#${r(a.r,o.r)}${r(a.g,o.g)}${r(a.b,o.b)}`}var Xt={light:"#ffffff",dark:"#0a0a0a"},fa=["light","dark"];function ma(e,t){let n=Xt[t],a=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:F(e,a,.1),line:F(e,a,.22),muted:F(n,e,.35),brandInk:t}}function T(e){let t=ke(e);return t.themes[t.selected]}function _(e){return{text:e.text,accent:e.accent,background:e.background||S.background,surface:e.surface||S.surface,line:e.line||S.line,muted:e.muted||S.muted}}var jt=.4,Kt=4.5,qt=3,pa={good:"Good","large-only":"Large text only",hard:"Hard to read"};function Sa(e){return e>=Kt?"good":e>=qt?"large-only":"hard"}var Zt=["#000000","#ffffff"];function H(e){return Wt(e,Zt)}var Jt=[.25,.4,.55];function _a(e){let t=x(e);return t===null?[]:Jt.map(n=>"#"+[t.r,t.g,t.b].map(a=>Math.round(a*(1-n)).toString(16).padStart(2,"0")).join(""))}function ba(e){let t=T(e),n={"--theme-fg":t.text},a=W(t.text);return(a===null||a>=jt)&&(n["--overlay-fg"]=t.text),n}var Qt=82;function Y(e){return`color-mix(in srgb, ${e} ${Qt}%, #000)`}function ya(e){let t=T(e);return{"--theme-accent":t.accent,"--theme-accent-2":Y(t.accent),"--theme-accent-ink":H(t.accent)}}function X(e){let t=e?.button;return t&&d(t)===t.toLowerCase()?t.toLowerCase():null}function Ea(e){let t=T(e),n=X(t),a=Ae(t);if(n===null&&a===null)return{};let o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=Y(n)),o["--theme-btn-ink"]=a??H(n),o}function Ae(e){let t=e?.buttonInk;return t&&d(t)===t.toLowerCase()?t.toLowerCase():null}function en(e,t){return Ae(e)??H(X(e)??t)}function Ta(e){let t=T(e);return{fill:X(t)??t.accent.toLowerCase(),ink:en(t,t.accent)}}function wa(e){let t={};return ke(e).themes.forEach((n,a)=>{let o=_(n);t[`--theme-preset-${a}-accent`]=o.accent,t[`--theme-preset-${a}-accent-2`]=Y(o.accent),t[`--theme-preset-${a}-accent-ink`]=H(o.accent),t[`--theme-preset-${a}-bg`]=o.background,t[`--theme-preset-${a}-fg`]=o.text,t[`--theme-preset-${a}-surface`]=o.surface,t[`--theme-preset-${a}-surface-2`]=`color-mix(in srgb, ${o.surface} 60%, ${o.line})`,t[`--theme-preset-${a}-line`]=o.line,t[`--theme-preset-${a}-muted`]=o.muted}),t}var v=e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},G=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function Ce([e,t,n]){let[a,o,r]=[v(e),v(t),v(n)],c=Math.cbrt(.4122214708*a+.5363325363*o+.0514459929*r),l=Math.cbrt(.2119034982*a+.6806995451*o+.1073969566*r),u=Math.cbrt(.0883024619*a+.2817188376*o+.6299787005*r);return[.2104542553*c+.793617785*l-.0040720468*u,1.9779984951*c-2.428592205*l+.4505937099*u,.0259040371*c+.7827717662*l-.808675766*u]}function tn([e,t,n]){let a=(e+.3963377774*t+.2158037573*n)**3,o=(e-.1055613458*t-.0638541728*n)**3,r=(e-.0894841775*t-1.291485548*n)**3;return[G(4.0767416621*a-3.3077115913*o+.2309699292*r),G(-1.2684380046*a+2.6097574011*o-.3413193965*r),G(-.0041960863*a-.7034186147*o+1.707614701*r)]}var $=e=>{let t=x(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},Le=(e,t,n)=>[e[0]*n+t[0]*(1-n),e[1]*n+t[1]*(1-n),e[2]*n+t[2]*(1-n)],Ie=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`,xe=e=>Le($(e.surface),$(e.line),.6);function Ca(e){return Ie(xe(_(e)))}function nn(e){let t=_(e);return Ie(tn(Le(Ce(xe(t)),Ce($(t.text)),.92)))}function Oe(e,t,n,a){let o=e[t];if(!o)return-1;let r=n(o);if(!r)return-1;let c=_(o);return e.findIndex((l,u)=>{if(u===t)return!1;let h=_(l);return d(h.background)!==r?!1:!a||d(h.text??"")===d(c.text??"")&&d(h.accent??"")===d(c.accent??"")})}function ka(e,t){return Oe(e,t,nn,!1)}function Aa(e,t){return Oe(e,t,n=>d(n.surface??""),!0)}var an=1;function on(e,t){let n=(e??[]).flatMap((a,o)=>{let r=W(a.background??""),c=W(a.text??"");return r!==null&&c!==null&&r<c?[o]:[]});return n.find(a=>a!==t)??n[0]??an}function La(e){return on(e?.themes,e?.selected)}var Ia=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function xa(e){let t=_(T(e)),n=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,a={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==S.surface||t.line!==S.line)&&(a["--theme-surface-2"]=n),a}var sn=["heading","body","label"];function Oa(e){if(!e)return null;for(let t of sn)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}var He=["headingLarge","headingMedium","headingSmall","accent","body","label"];var j={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},rn=8,cn=200;function ln(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.round(e);return t>=rn&&t<=cn?t:null}function un(e){let t={};for(let n of He)t[n]=ln(e?.[n]);return t}function Ha(e){let t=un(e),n={};for(let a of He){let o=t[a];o!==null&&(n[`--size-${a}`]=`${o}px`)}return n}var dn=["square","small","large"],hn="small";function Pa(e){return dn.includes(e??"")?e:hn}var K=0,gn=40,Ra={square:0,small:null,large:16},Pe={"--sf-card-radius":1,"--sf-button-radius":.5,"--site-radius":.5,"--site-radius-xs":.25,"--site-radius-sm":.5,"--site-radius-md":.75,"--site-radius-lg":1,"--site-radius-xl":1.25,"--site-radius-2xl":1.5,"--site-radius-3xl":2,"--site-radius-4xl":2.5};function q(e){if(e==null||typeof e=="string"&&e.trim()==="")return null;let t=typeof e=="string"?Number(e):e;return Number.isFinite(t)?Math.min(gn,Math.max(K,Math.round(t))):null}function fn(e){let t=q(e);return t===null?{}:Object.fromEntries(Object.entries(Pe).map(([n,a])=>{let o=t*a/16;return[n,o===0?"0":`${o}rem`]}))}function Ma(e){return(q(e)??K)*Pe["--sf-button-radius"]}function Na(e){return fn(q(e)??K)}var mn=["none","soft","lifted"],pn="soft",Re="none",Sn=["tight","normal","roomy"],_n="normal",P="normal",bn=["none","lift","highlight"],yn="lift",En="highlight",Me="#141416";function Ne(e){return mn.includes(e??"")?e:pn}function Tn(e){return Sn.includes(e??"")?e:_n}function De(e){return bn.includes(e??"")?e:yn}function wn(e){return e&&d(e)===e.toLowerCase()?e.toLowerCase():Me}function Da(e){let t=Ne(e);return t===Re?void 0:t}function Fa(e){let t=Tn(e);return t===P?void 0:t}function va(e){let t=De(e);return t===En?void 0:t}function Ga(e,t,n){let a=wn(t);return a===Me?{}:Ne(e)!==Re||De(n)==="lift"?{"--sf-shadow-color":a}:{}}var Cn=["normal","tight","compressed"],w="normal";function Fe(e){return Cn.includes(e??"")?e:w}function Ba(e){let t=Fe(e);return t===w?void 0:t}function Ua(e){switch(Fe(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}var Z={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},B=100,U=900,kn=24,An=200;function I(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function ve(e){let t=I(e?.weight,B,U),n=e?.case==="sentence"?"sentence":"authored",a=r=>r==null?t:I(r,B,U),o=r=>r==="sentence"?"sentence":r==="authored"?"authored":n;return{case:n,weight:t,weightStrong:I(e?.weightStrong,B,U),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:I(e?.maxPx,kn,An),weight2:a(e?.weight2),weight3:a(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function Wa(e){let t=ve(e),n={};return t.case==="sentence"&&(n["--sf-heading-case"]="none"),t.weight!==null&&(n["--sf-heading-weight"]=String(t.weight)),t.weightStrong!==null&&(n["--sf-heading-weight-strong"]=String(t.weightStrong)),t.maxPx!==null&&(n["--sf-heading-max"]=`${t.maxPx}px`),t.weight2!==null&&t.weight2!==t.weight&&(n["--sf-heading-2-weight"]=String(t.weight2)),t.weight3!==null&&t.weight3!==t.weight&&(n["--sf-heading-3-weight"]=String(t.weight3)),t.case2!==t.case&&(n["--sf-heading-2-case"]=t.case2==="sentence"?"none":"uppercase"),t.case3!==t.case&&(n["--sf-heading-3-case"]=t.case3==="sentence"?"none":"uppercase"),n}function $a(e){return ve({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,italicStrong:e?.accent_italic,maxPx:e?.heading_max_px,weight2:e?.heading_2_weight??void 0,weight3:e?.heading_3_weight??void 0,case2:e?.heading_2_case??void 0,case3:e?.heading_3_case??void 0})}var Ge=[{key:"space-grotesk",label:"Space Grotesk",cssVar:"--font-display",category:"sans",italic:!1,italicLoaded:!1},{key:"inter",label:"Inter",cssVar:"--font-body",category:"sans",italic:!0,italicLoaded:!0},{key:"poppins",label:"Poppins",cssVar:"--font-poppins",category:"sans",italic:!0,italicLoaded:!0},{key:"dm-sans",label:"DM Sans",cssVar:"--font-dm-sans",category:"sans",italic:!0,italicLoaded:!0},{key:"sora",label:"Sora",cssVar:"--font-sora",category:"sans",italic:!1,italicLoaded:!1},{key:"oswald",label:"Oswald",cssVar:"--font-oswald",category:"sans",italic:!1,italicLoaded:!1},{key:"archivo",label:"Archivo",cssVar:"--font-archivo",category:"sans",italic:!0,italicLoaded:!0},{key:"outfit",label:"Outfit",cssVar:"--font-outfit",category:"sans",italic:!1,italicLoaded:!1},{key:"manrope",label:"Manrope",cssVar:"--font-manrope",category:"sans",italic:!1,italicLoaded:!1},{key:"big-shoulders",label:"Big Shoulders",cssVar:"--font-big-shoulders",category:"sans",italic:!1,italicLoaded:!1},{key:"michroma",label:"Michroma",cssVar:"--font-michroma",category:"sans",italic:!1,italicLoaded:!1},{key:"assistant",label:"Assistant",cssVar:"--font-assistant",category:"sans",italic:!1,italicLoaded:!1},{key:"jost",label:"Jost",cssVar:"--font-jost",category:"sans",italic:!0,italicLoaded:!0},{key:"fraunces",label:"Fraunces",cssVar:"--font-serif",category:"serif",italic:!0,italicLoaded:!0},{key:"playfair-display",label:"Playfair Display",cssVar:"--font-playfair",category:"serif",italic:!0,italicLoaded:!0},{key:"cormorant",label:"Cormorant",cssVar:"--font-cormorant",category:"serif",italic:!0,italicLoaded:!0},{key:"jetbrains-mono",label:"JetBrains Mono",cssVar:"--font-mono-loaded",category:"mono",italic:!0,italicLoaded:!0}],y=new Map(Ge.map(e=>[e.key,e]));function za(e){return y.get(e)}var J=["heading","heading2","heading3","body","accent","label"];function Ya(e){return typeof e=="string"&&J.includes(e)?e:null}var Xa={heading:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",body:"Body",accent:"Emphasis",label:"Labels"},Ln=[["font-heading2","heading2"],["font-heading3","heading3"],["font-display","heading"],["font-serif","accent"],["font-mono","label"],["font-body","body"]],In=/var\(--size-(headingLarge|headingMedium|headingSmall|accent|body|label)\s*,/,ja={heading:"headingLarge",heading2:"headingMedium",heading3:"headingSmall",accent:"accent",body:"body",label:"label"},xn={headingLarge:"heading",headingMedium:"heading2",headingSmall:"heading3",accent:"accent",body:"body",label:"label"};function Ka(e){let t=e?In.exec(e):null;return t?xn[t[1]]??null:On(e)}function On(e){if(!e)return null;let t=e.split(/\s+/).filter(n=>!n.slice(0,n.lastIndexOf(":")+1).includes("&")).map(n=>n.slice(n.lastIndexOf(":")+1));for(let[n,a]of Ln)if(t.includes(n))return a;return null}var f={heading:"space-grotesk",heading2:"space-grotesk",heading3:"space-grotesk",body:"inter",accent:"fraunces",label:"jetbrains-mono"};function Hn(e){let t=n=>{let a=e?.[n];if(a&&y.has(a))return a;if(n==="heading2"||n==="heading3"){let o=e?.heading;return o&&y.has(o)?o:f.heading}return f[n]};return Object.fromEntries(J.map(n=>[n,t(n)]))}function Pn(e,t){return y.get(e[t])??y.get(f[t])}function b(e,t){return`var(${Pn(e,t).cssVar})`}var qa=[...new Set(J.map(e=>y.get(f[e]).cssVar))],Za=[...new Set(Ge.map(e=>e.cssVar))];function Ja(e){let t=Hn(e);return{"--font-role-heading":b(t,"heading"),"--font-role-heading2":b(t,"heading2"),"--font-role-heading3":b(t,"heading3"),"--font-role-body":b(t,"body"),"--font-role-accent":b(t,"accent"),"--font-role-label":b(t,"label"),fontFamily:"var(--font-role-body)"}}var Ue=Rn({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:V,setThemeMode:()=>{},themeSwitchShown:z,setThemeSwitchShown:()=>{},theme:O,themeRow:"none",setTheme:()=>{},fonts:f,setFonts:()=>{},sizes:j,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:P,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:w,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,siteGutterPhone:null,blockGap:null,blockGapPhone:null,setSiteGutter:()=>{},setSiteGutterPhone:()=>{},setBlockGap:()=>{},setBlockGapPhone:()=>{},headingTypography:Z,setHeadingTypography:()=>{},textStyles:null,setTextStyles:()=>{},wordStyles:null,heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},sectionBackgroundWidth:null,setSectionBackgroundWidth:()=>{},sectionContentWidth:null,setSectionContentWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},shareButtonOnPosts:null,setShareButtonOnPosts:()=>{},themeFromDocument:!1});function so({children:e,websiteName:t=null,templateChrome:n=!1,templateName:a=null,chromePlaceholder:o=!1,themeMode:r=V,onThemeModeChange:c,themeSwitchShown:l=z,onThemeSwitchShownChange:u,theme:h=O,themeRow:C="none",onThemeChange:m,fonts:k=f,onFontsChange:p,sizes:g=j,onSizesChange:A,cornerRadiusPx:R=null,onCornerRadiusPxChange:L,cardShadow:M=null,onCardShadowChange:ee,shadowColor:qe=null,onShadowColorChange:te,cardGap:Ze=P,onCardGapChange:ne,hoverEffect:Je=null,onHoverEffectChange:ae,headingCompression:Qe=w,onHeadingCompressionChange:oe,siteWidth:et=null,onSiteWidthChange:se,siteGutter:tt=null,siteGutterPhone:nt=null,blockGap:at=null,blockGapPhone:ot=null,onSiteGutterChange:re,onSiteGutterPhoneChange:ie,onBlockGapChange:ce,onBlockGapPhoneChange:le,headingTypography:st=Z,onHeadingTypographyChange:ue,textStyles:rt=null,onTextStylesChange:de,wordStyles:it=null,heroBackgroundFollowsWidth:ct=null,onHeroBackgroundFollowsWidthChange:he,sectionBackgroundWidth:lt=null,onSectionBackgroundWidthChange:ge,sectionContentWidth:ut=null,onSectionContentWidthChange:fe,photographyGrayscale:dt=null,onPhotographyGrayscaleChange:me,shareButtonOnPosts:ht=null,onShareButtonOnPostsChange:pe,themeFromDocument:gt=!1}){let[E,Se]=Dn(null),ft=i(s=>Se(Gt=>Gt??s),[]),mt=i(s=>c?.(s),[c]),pt=i(s=>u?.(s),[u]),St=i(s=>m?.(s),[m]),_t=i(s=>p?.(s),[p]),bt=i(s=>A?.(s),[A]),yt=i(s=>se?.(s),[se]),Et=i(s=>re?.(s),[re]),Tt=i(s=>ie?.(s),[ie]),wt=i(s=>ce?.(s),[ce]),Ct=i(s=>le?.(s),[le]),kt=i(s=>he?.(s),[he]),At=i(s=>ge?.(s),[ge]),Lt=i(s=>fe?.(s),[fe]),It=i(s=>me?.(s),[me]),xt=i(s=>pe?.(s),[pe]),Ot=i(s=>L?.(s),[L]),Ht=i(s=>ee?.(s),[ee]),Pt=i(s=>te?.(s),[te]),Rt=i(s=>ne?.(s),[ne]),Mt=i(s=>ae?.(s),[ae]),Nt=i(s=>oe?.(s),[oe]),Dt=i(s=>ue?.(s),[ue]),Ft=i(s=>de?.(s),[de]),_e=E?.logoUrl,be=E?.logoReversed,ye=E?.logoInkIsDark,Ee=E!==null,vt=Nn(()=>({logo:Ee?{logoUrl:_e,logoReversed:be,logoInkIsDark:ye}:null,placeholder:n||o,wordmark:n?a:t}),[Ee,_e,be,ye,n,o,a,t]);return Be(D.Provider,{value:vt,children:Be(Ue.Provider,{value:{settings:E,setSettings:Se,primeSettings:ft,websiteName:t,templateChrome:n,templateName:a,chromePlaceholder:o,themeMode:r,setThemeMode:mt,themeSwitchShown:l,setThemeSwitchShown:pt,theme:h,themeRow:C,setTheme:St,fonts:k,setFonts:_t,sizes:g,setSizes:bt,cornerRadiusPx:R,setCornerRadiusPx:Ot,cardShadow:M,setCardShadow:Ht,shadowColor:qe,setShadowColor:Pt,cardGap:Ze,setCardGap:Rt,hoverEffect:Je,setHoverEffect:Mt,headingCompression:Qe,setHeadingCompression:Nt,siteWidth:et,setSiteWidth:yt,siteGutter:tt,siteGutterPhone:nt,blockGap:at,blockGapPhone:ot,setSiteGutter:Et,setSiteGutterPhone:Tt,setBlockGap:wt,setBlockGapPhone:Ct,headingTypography:st,setHeadingTypography:Dt,textStyles:rt,setTextStyles:Ft,wordStyles:it,heroBackgroundFollowsWidth:ct,setHeroBackgroundFollowsWidth:kt,sectionBackgroundWidth:lt,setSectionBackgroundWidth:At,sectionContentWidth:ut,setSectionContentWidth:Lt,photographyGrayscale:dt,setPhotographyGrayscale:It,shareButtonOnPosts:ht,setShareButtonOnPosts:xt,themeFromDocument:gt},children:e})})}var Fn=()=>Mn(Ue);function ro(e,t,n){return e?t===n?"read":"loading":"none"}function io(e,t){return{value:e,readFor:t}}function co(e,t,n){return{value:t,readFor:e.readFor===n?n:null}}function lo(){let{sectionContentWidth:e,themeFromDocument:t}=Fn();return t?null:e}import{forwardRef as vn}from"react";import{jsx as Un}from"react/jsx-runtime";function Gn(e){if(typeof e=="string")return e;let t=e.query?`?${new URLSearchParams(e.query).toString()}`:"",n=e.hash?e.hash.startsWith("#")?e.hash:`#${e.hash}`:"";return`${e.pathname??""}${t}${n}`}var Bn=vn(function({href:t,prefetch:n,replace:a,scroll:o,shallow:r,legacyBehavior:c,passHref:l,locale:u,onClick:h,children:C,...m},k){let p=g=>{h?.(g),!(g.defaultPrevented||m.target==="_blank")&&g.preventDefault()};return Un("a",{ref:k,href:Gn(t),onClick:p,...m,children:C})}),go=Bn;var Wn="Website";function po(e){return e?.trim()||Wn}var We=["instagram","facebook","tiktok","youtube","x","linkedin","pinterest","whatsapp","telegram","line","wechat"],$n={instagram:"Instagram",facebook:"Facebook",tiktok:"TikTok",youtube:"YouTube",x:"X",linkedin:"LinkedIn",pinterest:"Pinterest",whatsapp:"WhatsApp",telegram:"Telegram",line:"LINE",wechat:"WeChat"},Vn={};function _o(e){if(!e||typeof e!="object")return Vn;let t={};for(let n of We){let a=e[n];if(typeof a!="string")continue;let o=a.trim();!o||!/^https?:\/\//i.test(o)||(t[n]=o)}return t}function bo(e){return We.flatMap(t=>{let n=e[t];return n?[{platform:t,href:n,label:$n[t]}]:[]})}var yo=e=>`${e}_url`;import{createContext as zn,createElement as $e,useContext as Ve}from"react";var Q=zn(null),Yn="data-sf-view-hide",ze=e=>$e(Q.Provider,{value:null},e),Ye={className:"",attrs:{},scope:ze},Xn=Ye,wo=(e,t)=>e?{className:e,words:t}:null;function jn(){let e=Ve(Q);return e===null?Xn:{className:e.className,attrs:{[Yn]:e.words},scope:ze}}function Co(){return Ve(Q)?.className??""}var Kn=(e,t)=>t?e?`${e} ${t}`:t:e;function ko(e){let t=jn(),n=e.takes===!1?Ye:t,a={},o=!1;for(let[r,c]of Object.entries(e))r==="as"||r==="takes"||r==="children"||(r==="className"?(a.className=Kn(c,n.className),o=!0):a[r]=c);return!o&&n.className&&(a.className=n.className),n.scope($e(e.as??"div",{...a,...n.attrs},e.children))}var Lo={small:54,medium:66,large:84},qn=44,Io=16,xo=140,Oo=qn*4;import{forwardRef as Zn}from"react";import{imageCopyUrl as Xe,imageSrcSet as je}from"efficient-shell/image-copies";import{jsx as ea}from"react/jsx-runtime";var Jn={position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,color:"transparent"};function Ke(e,t,n){if(n){let a=je(e);return a?{src:Xe(e,1280),srcSet:a,sizes:n}:{src:e,sizes:n}}if(t&&t>0){let a=je(e,{maxWidth:t*3});return a?{src:Xe(e,t*2),srcSet:a,sizes:`${t}px`}:{src:e}}return{src:e}}var Qn=Zn(function({src:t,width:n,height:a,fill:o,priority:r,loading:c,style:l,quality:u,placeholder:h,blurDataURL:C,unoptimized:m,loader:k,overrideSrc:p,sizes:g,...A},R){let L=p??(typeof t=="string"?t:t.src),M=Ke(L,o?void 0:Number(n)||void 0,g??(o?"100vw":void 0));return ea("img",{ref:R,...M,width:o?void 0:n,height:o?void 0:a,loading:r?"eager":c??"lazy",fetchPriority:r?"high":void 0,decoding:"async",style:o?{...Jn,...l}:{color:"transparent",...l},...A})}),Mo=Qn;function No(e){let t=e.overrideSrc??(typeof e.src=="string"?e.src:e.src.src),n=e.fill?void 0:Number(e.width)||void 0;return{props:Ke(t,n,e.sizes??(e.fill?"100vw":void 0))}}export{Ge as a,za as b,J as c,Ya as d,Xa as e,ja as f,Ka as g,On as h,f as i,Hn as j,Ja as k,ca as l,la as m,ua as n,da as o,ha as p,V as q,z as r,ga as s,S as t,Yt as u,ke as v,fa as w,ma as x,T as y,_ as z,pa as A,Sa as B,H as C,_a as D,ba as E,ya as F,X as G,Ea as H,Ae as I,en as J,Ta as K,wa as L,Ca as M,nn as N,ka as O,Aa as P,La as Q,Ia as R,xa as S,Oa as T,j as U,un as V,Ha as W,Pa as X,K as Y,gn as Z,Ra as _,q as $,fn as aa,Ma as ba,Na as ca,mn as da,pn as ea,Re as fa,P as ga,bn as ha,yn as ia,En as ja,Me as ka,Ne as la,Tn as ma,De as na,wn as oa,Da as pa,Fa as qa,va as ra,Ga as sa,w as ta,Fe as ua,Ba as va,Ua as wa,Z as xa,ve as ya,Wa as za,$a as Aa,Q as Ba,Ye as Ca,wo as Da,jn as Ea,Co as Fa,Kn as Ga,ko as Ha,Lo as Ia,qn as Ja,Io as Ka,xo as La,Oo as Ma,Mo as Na,No as Oa,go as Pa,Te as Qa,sa as Ra,so as Sa,Fn as Ta,ro as Ua,io as Va,co as Wa,lo as Xa,Wn as Ya,po as Za,We as _a,$n as $a,Vn as ab,_o as bb,bo as cb,yo as db};
@@ -1 +0,0 @@
1
- import{a as j,c as C,g as Z,i as U,j as Q,l as T}from"./chunk-XMTQMRA3.js";var B="".replace(/\/+$/,"");var N="x-forwarded-for";function X(e){let t=(e??"").split(",").map(n=>n.trim()).filter(Boolean);return t.length>0?t[t.length-1]:null}var $e="x-forwarded-host";function Y(e,t,n){let s={};return e&&(s[$e]=e),t&&n==="uncached"&&(s[N]=t),s}function ee(e){if(e?.cache==="no-store"||e?.cache==="no-cache")return"uncached";if(e?.cache==="force-cache")return"data-cached";let t=e?.next?.revalidate;return typeof t=="number"&&t>0?"data-cached":"uncached"}var te="x-storefront-site",ne="x-storefront-host",re="x-storefront-preview";var Ue="shop_access_token",se="shop_refresh_token",L=null;function M(){T.removeItem(Ue),T.removeItem(se)}var w={getAccess(){return L},takeLegacyRefresh(){let e=T.getItem(se);return M(),e},setTokens(e){L=e,M()},clear(){L=null,M()}};import{efficientClientOpen as et}from"efficient-easel/screen/lib/session";function Be(e){return!!e.src}function A(e){let t=e.finishes.filter(Be);if(t.length===e.finishes.length)return e;let n=e.defaultFinish&&t.some(s=>s.name===e.defaultFinish)?e.defaultFinish:null;return{...e,finishes:t,defaultFinish:n}}function Ne(e){return e.listable!==!1}function O(e){return e.map(A).filter(Ne)}var ce=["fill","stroke","stop-color","color","flood-color","lighting-color","solid-color"],le=new Set(["none","transparent","currentcolor","inherit","initial","unset","context-fill","context-stroke"]),v={black:[0,0,0],white:[255,255,255],gray:[128,128,128],grey:[128,128,128],darkgray:[169,169,169],darkgrey:[169,169,169],dimgray:[105,105,105],dimgrey:[105,105,105],lightgray:[211,211,211],lightgrey:[211,211,211],gainsboro:[220,220,220],silver:[192,192,192],whitesmoke:[245,245,245]},ue=12,me=/\burl\(/i,pe=new RegExp(`(?<![-\\w])(${ce.join("|")})(\\s*=\\s*)(["'])([^"']*)\\3`,"gi"),de=new RegExp(`((?:^|[;{\\s"'])(?:${ce.join("|")})\\s*:\\s*)([^;}"'<>]+)`,"gi"),Le=/<svg\b([^>]*)>/i,Me=/\bfill\s*[=:]/i;function De(e){let t=e.replace(pe,(n,s,a,l,d)=>{let r=ie(d);return r===null?n:`${s}${a}${l}${r}${l}`}).replace(de,(n,s,a)=>{let l=ie(a);return l===null?n:`${s}${l}`});return t=t.replace(Le,(n,s)=>Me.test(s)?n:`<svg fill="#ffffff"${s}>`),t}function ie(e){let t=/!important/i.test(e),n=e.replace(/!important/gi,"").trim().toLowerCase();if(!n||me.test(n)||le.has(n))return null;let s=n in v?[...v[n],1]:ge(n);if(!s)return null;let[a,l,d,r]=s;if(Math.max(a,l,d)-Math.min(a,l,d)>ue)return null;let i=He(255-a,255-l,255-d,r);return t?`${i} !important`:i}function He(e,t,n,s){if(s<1)return`rgba(${e}, ${t}, ${n}, ${s})`;let a=l=>l.toString(16).padStart(2,"0");return`#${a(e)}${a(t)}${a(n)}`}function ge(e){return e.startsWith("#")?We(e):e.startsWith("rgb")?Je(e):e.startsWith("hsl")?Ke(e):null}function We(e){let t=e.slice(1),n=1;if(t.length===3||t.length===4)t.length===4&&(n=parseInt(t[3]+t[3],16)/255),t=t.slice(0,3).split("").map(s=>s+s).join("");else if(t.length===6||t.length===8)t.length===8&&(n=parseInt(t.slice(6,8),16)/255),t=t.slice(0,6);else return null;return/^[0-9a-f]{6}$/.test(t)?[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16),n]:null}function Je(e){let t=e.slice(e.indexOf("(")+1,e.lastIndexOf(")")),[n,s]=t.split("/"),a=n.split(/[\s,]+/).filter(Boolean).slice(0,3);if(a.length<3)return null;let l=a.map(r=>r.endsWith("%")?Math.round(parseFloat(r)/100*255):Math.round(parseFloat(r)));if(l.some(r=>Number.isNaN(r)))return null;let d=s?E(s):Ge(n);return[l[0],l[1],l[2],d]}function Ge(e){let t=e.split(/[\s,]+/).filter(Boolean);return t.length>=4?E(t[3]):1}function E(e){let t=e.trim().endsWith("%")?parseFloat(e)/100:parseFloat(e);return Number.isNaN(t)?1:t}function Ke(e){let t=e.slice(e.indexOf("(")+1,e.lastIndexOf(")")),[n,s]=t.split("/"),a=n.split(/[\s,]+/).filter(Boolean);if(a.length<3)return null;let l=parseFloat(a[0]),d=parseFloat(a[1])/100,r=parseFloat(a[2])/100;if([l,d,r].some(P=>Number.isNaN(P)))return null;let i=s?E(s):a.length>=4?E(a[3]):1,[o,u,g]=Ve(l,d,r);return[o,u,g,i]}function Ve(e,t,n){let s=(1-Math.abs(2*n-1))*t,a=(e%360+360)%360/60,l=s*(1-Math.abs(a%2-1)),d=0,r=0,i=0;a<1?[d,r,i]=[s,l,0]:a<2?[d,r,i]=[l,s,0]:a<3?[d,r,i]=[0,s,l]:a<4?[d,r,i]=[0,l,s]:a<5?[d,r,i]=[l,0,s]:[d,r,i]=[s,0,l];let o=n-s/2;return[Math.round((d+o)*255),Math.round((r+o)*255),Math.round((i+o)*255)]}var oe=512*1024;function D(e){return/\.svg(\?|$)/i.test(e)}function ze(e){return`data:image/svg+xml,${encodeURIComponent(De(e))}`}function je(e){let t=e.replace(/!important/gi,"").trim().toLowerCase();if(!t||me.test(t)||le.has(t))return null;let n=t in v?[...v[t],1]:ge(t);if(!n)return null;let[s,a,l]=n;return Math.max(s,a,l)-Math.min(s,a,l)>ue?null:(.2126*s+.7152*a+.0722*l)/255}function Ze(e){let t=[],n=s=>{let a=je(s);a!==null&&t.push(a)};for(let s of e.matchAll(pe))n(s[4]);for(let s of e.matchAll(de))n(s[2]);return t.length?t.reduce((s,a)=>s+a,0)/t.length<.5:null}var ae=/^(?:\uFEFF|\s+|<\?xml[^>]*\?>|<!--[\s\S]*?-->|<!DOCTYPE\s+svg[^>[]*>)/i;function Qe(e){let t=e;for(let n=ae.exec(t);n&&n[0].length>0;n=ae.exec(t))t=t.slice(n[0].length);return/^<svg[\s>/]/i.test(t)}async function Xe(e,t){if(!D(e))return null;try{let n=await fetch(e,{signal:t,redirect:"manual"});if(!n.ok)return null;let s=Number(n.headers.get("content-length"));if(Number.isFinite(s)&&s>oe)return null;let a=await n.text();return a.length>oe?null:Qe(a)?a:null}catch{return null}}async function he(e,t){let n=await Xe(e,t);return n===null?null:{reversed:ze(n),inkIsDark:Ze(n)}}import{currentEaselSession as Ye,setSessionBridgedSite as Jt,setSessionDocumentSite as Gt}from"efficient-easel/screen/lib/session";function ye(){return Ye().siteId()}var tt="",S=class extends Error{constructor(t,n,s){super(n),this.status=t,this.data=s}},G="Unable to reach the server. This could be a problem with your internet connection, or the server may be undergoing maintenance or an upgrade. Please try again shortly.",nt=new Set([502,503,504]),H=0,rt="This editor runs on its host's own backend, which does not serve this request.",st=5e3,it=15e3,ot=()=>typeof window>"u"?st:it;function xe(e){let t=(e.method??"GET").toUpperCase();if(!(e.body!=null||t!=="GET"&&t!=="HEAD")&&!(e.audience!=null&&e.audience!=="shop")&&typeof AbortSignal?.timeout=="function")return AbortSignal.timeout(ot())}var fe=e=>e instanceof Error&&e.name==="TimeoutError",Se=(e,t)=>nt.has(e)?G:t,at=["admin","venue"],Ce="admin";function tn(e){Ce=at.includes(e)?e:"admin"}function ct(){return Ce}var lt=/^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{1,8})*$/,Te=null;function nn(e){Te=e&&lt.test(e)?e:null}function ut(){return Te}function mt(e){if(typeof window>"u"||!e.startsWith("/api/v1/"))return e;let t=U();return!t||/[?&]site=/.test(e)?e:$(e,`site=${encodeURIComponent(t)}`)}async function c(e,t={}){let{token:n,baseUrl:s,headers:a,audience:l,...d}=t;if(typeof window<"u"&&!et())throw new S(H,rt,null);if(typeof window>"u"&&s===void 0)throw new Error(`apiFetch(${JSON.stringify(e)}) ran on the server without an explicit baseUrl. The API_URL default it would inherit is browser-only (the prod image bakes NEXT_PUBLIC_API_URL="" for same-origin use, which a Node fetch cannot resolve). Pass a base explicitly: \`await backendOpts()\` (or baseUrl: PRODUCT_FETCH_BASE) for product reads, or the server-only PRODUCT_BACKEND_URL env for other backend surfaces.`);let r=typeof FormData<"u"&&d.body instanceof FormData,i;try{i=await fetch(`${s??tt}${mt(e)}`,{...d,headers:{...r?{}:{"Content-Type":"application/json"},...n?{Authorization:`Bearer ${n}`}:{},...l===null?{}:{"X-Portal-Audience":l??"shop"},...a},signal:d.signal??xe({...d,audience:l})})}catch(g){throw g instanceof TypeError||fe(g)?new S(H,G,null):g}let o;try{o=await i.text()}catch(g){throw fe(g)?new S(H,G,null):g}let u=null;if(o)try{u=JSON.parse(o)}catch{throw new S(i.status,i.ok?"Expected JSON but received a non-JSON response":Se(i.status,i.statusText),o)}if(!i.ok){let g=(u&&typeof u=="object"&&"detail"in u&&typeof u.detail=="string"?u.detail:null)??Se(i.status,i.statusText);throw new S(i.status,g,u)}return u}var R=null;async function Oe(){return R||(R=pt().finally(()=>{R=null}),R)}async function pt(){let e=w.takeLegacyRefresh(),t=await dt.refresh(e??void 0);return w.setTokens(t.access),t.access}async function ve(){return w.getAccess()??Oe()}async function y(e,t={}){let n;try{n=await ve()}catch{throw w.clear(),new S(401,"Not signed in",null)}try{return await c(e,{...t,token:n})}catch(s){if(!(s instanceof S)||s.status!==401)throw s;try{let a=await Oe();return await c(e,{...t,token:a})}catch{throw w.clear(),s}}}async function Pe(e,t={}){if(w.getAccess())try{return{data:await y(e,t),asShopper:!0}}catch(n){if(!(n instanceof S)||n.status!==401)throw n}return{data:await c(e,t),asShopper:!1}}async function we(){let e=await y("/api/auth/me/");if(e.portal!=="shop")throw w.clear(),new S(403,"This session is not valid for this shop.",null);return e}var dt={login:(e,t)=>c("/api/auth/login/",{method:"POST",body:JSON.stringify({email:e,password:t,portal:"shop"}),credentials:"include"}),refresh:e=>c("/api/auth/refresh/",{method:"POST",body:JSON.stringify(e?{refresh:e,portal:"shop"}:{portal:"shop"}),credentials:"include"}),logout:async()=>{w.clear();try{await c("/api/auth/logout/",{method:"POST",body:JSON.stringify({portal:"shop"}),credentials:"include"})}catch{}},restoreSession:async()=>{let e=await ve();return await we(),e},me:we,updateMe:e=>y("/api/auth/me/",{method:"PATCH",body:JSON.stringify(e)}),changePassword:(e,t)=>y("/api/auth/me/",{method:"PATCH",body:JSON.stringify({password:t,old_password:e})}),changeEmail:(e,t)=>y("/api/shop-portal/change-email/",{method:"POST",body:JSON.stringify({new_email:e,current_password:t})}),myProfile:()=>y("/api/shop-portal/profile/"),updateMyProfile:e=>y("/api/shop-portal/profile/",{method:"PATCH",body:JSON.stringify(e)}),myAddresses:()=>y("/api/shop-portal/delivery-locations/"),createAddress:e=>y("/api/shop-portal/delivery-locations/",{method:"POST",body:JSON.stringify(e)}),updateAddress:(e,t)=>y(`/api/shop-portal/delivery-locations/${e}/`,{method:"PATCH",body:JSON.stringify(t)}),deleteAddress:e=>y(`/api/shop-portal/delivery-locations/${e}/`,{method:"DELETE"}),passwordResetRequest:e=>c("/api/auth/password-reset/",{method:"POST",body:JSON.stringify({email:e})}),passwordResetConfirm:(e,t,n)=>c("/api/auth/password-reset/confirm/",{method:"POST",body:JSON.stringify({uid:e,token:t,new_password:n})}),brands:()=>y("/api/products/brands/"),myOrders:()=>y("/api/shop-portal/orders/").then(e=>e.results),myOrder:e=>y(`/api/shop-portal/orders/${e}/`),cancelOrder:e=>y(`/api/shop-portal/orders/${e}/cancel/`,{method:"POST"}),myReturns:e=>y(`/api/shop-portal/returns/${e?`?order=${encodeURIComponent(e)}`:""}`).then(t=>t.results),createReturn:e=>y("/api/shop-portal/returns/",{method:"POST",body:JSON.stringify(e)}),withdrawReturn:e=>y(`/api/shop-portal/returns/${e}/cancel/`,{method:"POST"}),uploadReturnPhoto:(e,t)=>{let n=new FormData;return n.append("claim_item",e),n.append("file",t),n.append("media_type",t.type.startsWith("video/")?"video":"image"),y("/api/shop-portal/return-media/",{method:"POST",body:n})}};function f(e){if(typeof e=="string")return e.startsWith("/media/")?j(e):e;if(Array.isArray(e))return e.map(f);if(e&&typeof e=="object"){let t={};for(let[n,s]of Object.entries(e))t[n]=n==="captions"&&s&&typeof s=="object"&&!Array.isArray(s)?Object.fromEntries(Object.entries(s).map(([a,l])=>[f(a),l])):f(s);return t}return e}var Ee=typeof window>"u"&&B!=="",gt=Ee?B:"",ht=Q,b=()=>({baseUrl:ht(),audience:null});function m(e,t){let n=t?`?process=${encodeURIComponent(t)}`:"";return`/api/v1${e}${n}`}var Fe=100,be=50;function z(e,t,n){let s=new URLSearchParams;for(let[a,l]of Object.entries(t))l!=null&&l!==""&&s.set(a,String(l));return s.set("pageSize",String(Fe)),n&&s.set("cursor",n),`/api/v1${e}?${s.toString()}`}function yt(e,t){return z("/wheels",{process:e},t)}var Ae=Fe;function ft(e,t){return z("/wheels",{slug:e.join(",")},t)}function St(e,t,n){return z("/products",{kind:e.join(","),make:t?.make,model:t?.model,year:t?.year,modification:t?.modification},n)}function Pt(e){if(!e)return null;try{return new URL(e,"http://cursor.invalid").searchParams.get("cursor")}catch{return null}}async function W(e,t,n=()=>!1){let s=[],a=null;try{for(let l=0;l<be;l++){let d=await c(await t(a),await p());if(s.push(...d.results),a=Pt(d.next),!a)break}a&&console.warn(`[${e}] stopped at ${be} pages (${s.length} rows); catalog may be truncated`)}catch(l){if(n(l))throw l;console.warn(`[${e}] product API unavailable, returning []`,l)}return s}var Re=e=>e instanceof S&&e.status===400;function wt(e){return e.flatMap(t=>t.kind==="alloy-wheel"?O([t]):[t])}async function Ie(){return(await bt()).host}async function bt(){try{let{headers:e}=await import("./headers-UYHEZDAT.js"),t=await e(),n=l=>l?.split(",")[0]?.split(":")[0]?.trim().toLowerCase()||null,s=n(t.get(ne)??t.get("x-forwarded-host")??t.get("host")),a=n(t.get("host"));return{host:s,matchesRequestHost:s!==null&&s===a}}catch{return{host:null,matchesRequestHost:!1}}}async function At(){try{let{headers:e}=await import("./headers-UYHEZDAT.js");return X((await e()).get(N))}catch{return null}}async function Rt(){try{let{headers:e}=await import("./headers-UYHEZDAT.js");return(await e()).get(te)||null}catch{return null}}async function _t(){let e=await Rt();if(e)return`site=${encodeURIComponent(e)}`;let t=await Ie();return t?`host=${encodeURIComponent(t)}`:""}async function h(e){if(typeof window<"u"){let t=U();return t?$(e,`site=${encodeURIComponent(t)}`):e}return $(e,await _t())}function $(e,t){return t?`${e}${e.includes("?")?"&":"?"}${t}`:e}var kt="preview";async function xt(){if(typeof window<"u")return null;try{let{headers:e}=await import("./headers-UYHEZDAT.js");return(await e()).get(re)}catch{return null}}async function Ct(){try{let{headers:e}=await import("./headers-UYHEZDAT.js");return(await e()).get("user-agent")}catch{return null}}async function J(e,t){let n=await xt();if(n===null)return[await h(e),await p(t)];let s=$(await h(e),`${kt}=${encodeURIComponent(n)}`),{next:a,cache:l,...d}=t??{},r=await p({...d,cache:"no-store"}),i=await Ct();return i&&(r.headers={...r.headers,"user-agent":i}),[s,r]}async function Tt(e){if(!Ee)return;let[t,n]=await Promise.all([Ie(),At()]),s=Y(t,n,e);return Object.keys(s).length>0?s:void 0}async function p(e){let t=await Tt(ee(e)),n={baseUrl:gt,...e};return t&&(n.headers={...t,...e?.headers}),n}var _=typeof window>"u";function k(e,t){let n=new URLSearchParams;for(let[a,l]of Object.entries(t))l!==void 0&&l!==""&&n.set(a,String(l));let s=n.toString();return`/api/v1/fitment${e}${s?`?${s}`:""}`}var cn={listMakes:async e=>{if(_){let{fitmentData:n}=await import("./fitment-data-6KHIA3AT.js");return n.makes(e)}return(await c(k("/makes",{region:e}),b())).results},listModels:async(e,t)=>{if(_){let{fitmentData:s}=await import("./fitment-data-6KHIA3AT.js");return s.models(e,t)}return(await c(k("/models",{make:e,region:t}),b())).results},listYears:async(e,t,n)=>{if(_){let{fitmentData:a}=await import("./fitment-data-6KHIA3AT.js");return a.years(e,t,n)}return(await c(k("/years",{make:e,model:t,region:n}),b())).results},listModifications:async(e,t,n,s)=>{if(_){let{fitmentData:l}=await import("./fitment-data-6KHIA3AT.js");return l.modifications(e,t,n,s)}return(await c(k("/modifications",{make:e,model:t,year:n,region:s}),b())).results},getStockFitment:async(e,t,n,s,a)=>{if(_){let{fitmentData:l}=await import("./fitment-data-6KHIA3AT.js");return l.stockFitment(e,t,n,s,a)}return c(k("/stock-fitment",{make:e,model:t,year:n,modification:s,region:a}),b())}},ln={listWheels:async(e,t={})=>{let n=await W("products.listWheels",async s=>await h(yt(e,s)),t.throwOnFailure?()=>!0:void 0);return O(f(n))},listWheelsBySlug:async(e,t={})=>{let n=[...new Set(e.map(r=>r.trim()).filter(Boolean))];if(n.length===0)return[];let s=[];for(let r=0;r<n.length;r+=Ae)s.push(n.slice(r,r+Ae));let a=await Promise.all(s.map(r=>W("products.listWheelsBySlug",async i=>await h(ft(r,i)),t.throwOnFailure?()=>!0:Re))),l=new Set(n),d=a.flat().filter(r=>l.has(r.slug));return O(f(d))},listCatalog:async(e,t)=>{if(e.length===0)throw new Error("products.listCatalog() needs at least one kind. An empty list would omit `kind`, which the contract reads as `alloy-wheel` \u2014 so the call would silently return the wheel catalog instead of nothing.");let n=await W("products.listCatalog",async s=>await h(St(e,t,s)),Re);return wt(f(n))},getWheel:async e=>A(f(await c(await h(m(`/wheels/${e}`)),await p()))),getTyre:async e=>f(await c(await h(m(`/tyres/${e}`)),await p())),listBundles:async(e={})=>{try{return await c(await h(m("/bundles")),await p())}catch(t){if(e.throwOnFailure)throw t;return[]}},getBundle:async e=>c(await h(m(`/bundles/${e}`)),await p()),listGalleryBuilds:async(e={})=>{let{process:t=null,wheelSlug:n=null}=e;if(typeof window>"u"){let{listGalleryBuilds:s}=await import("./gallery-builds-data-TD3QJK7L.js");return f(s(t,n))}try{let s=new URLSearchParams;t&&s.set("process",t),n&&s.set("wheelSlug",n);let a=s.toString(),l=await c(`/api/v1/gallery-builds${a?`?${a}`:""}`,b());return f(l.results)}catch(s){return console.warn("[products.listGalleryBuilds] product API unavailable, returning []",s),[]}},getSite:async()=>c(await h(m("/site")),await p()),getSiteBySlug:async e=>c(`${m("/site")}?${new URLSearchParams({site:e})}`,typeof window>"u"?await p():void 0),listPages:async()=>f(await c(await h(m("/pages")),await p())),listPopups:async()=>c(await h(m("/popups")),await p()),listProductTemplates:async()=>{try{return await c(await h(m("/product-templates")),await p())}catch(e){return console.warn("[products.listProductTemplates] unavailable, returning []",e),[]}},listDynamicPages:async e=>{let t=e?`?recordType=${encodeURIComponent(e)}`:"";try{return await c(await h(`${m("/dynamic-pages")}${t}`),await p())}catch(n){if(n instanceof S&&n.status===404)return[];throw n}},getRecord:async(e,t)=>{try{return await c(await h(m(`/records/${encodeURIComponent(e)}/${encodeURIComponent(t)}`)),await p())}catch(n){if(n instanceof S&&n.status===404)return null;throw n}},listRecordKeys:async e=>{try{let t=await c(await h(m(`/records/${encodeURIComponent(e)}`)),await p({cache:"no-store"}));return Array.isArray(t?.keys)?t.keys.filter(n=>typeof n=="string"&&n!==""):[]}catch(t){if(t instanceof S&&t.status===404)return[];throw t}},listProductTypeChoices:async()=>{try{return await c(await h(m("/product-type-choices")),await p())}catch(e){return console.warn("[products.listProductTypeChoices] unavailable, returning []",e),[]}},listFieldUsage:async()=>{try{return await c(await h(m("/field-usage")),await p())}catch(e){return console.warn("[products.listFieldUsage] unavailable, returning []",e),[]}},getPage:async(e,t={})=>{let n=t.record?`?record=${encodeURIComponent(t.record)}`:"",[s,a]=await J(m(`/pages/${e}`)+n,t.revalidate!==void 0?{next:{revalidate:t.revalidate}}:void 0);return f(await c(s,a))},listBlogPosts:async(e={},{throwOnFailure:t=!1}={})=>{let n=e.category?`?category=${encodeURIComponent(e.category)}`:"";try{return(await c(m("/blog-posts")+n,await p())).map(a=>({...a,coverImage:C(a.coverImage)??""}))}catch(s){if(t)throw s;return console.warn("[products.listBlogPosts] blog API unavailable, returning []",s),[]}},getBlogPost:async e=>{let t=await c(m(`/blog-posts/${e}`),await p());return{...t,coverImage:C(t.coverImage)??""}},createOrder:async e=>c(m("/orders"),await p({method:"POST",body:JSON.stringify(e)})),createOrderAuthed:async e=>y(m("/orders"),await p({method:"POST",body:JSON.stringify(e)})),lookupOrder:async e=>c(m("/orders/lookup"),await p({method:"POST",body:JSON.stringify(e)})),createPaymentIntent:async e=>c(m("/payments/intent"),await p({method:"POST",body:JSON.stringify(e)})),releaseCheckout:async e=>c(m("/checkouts/release"),await p({method:"POST",body:JSON.stringify(e)})),createPaypalOrder:async e=>c(m("/payments/paypal/order"),await p({method:"POST",body:JSON.stringify(e)})),capturePaypalOrder:async e=>c(m("/payments/paypal/capture"),await p({method:"POST",body:JSON.stringify(e)})),createAfterpayCheckout:async e=>c(m("/payments/afterpay/checkout"),await p({method:"POST",body:JSON.stringify(e)})),captureAfterpayPayment:async e=>c(m("/payments/afterpay/capture"),await p({method:"POST",body:JSON.stringify(e)})),chargeSquare:async e=>c(m("/payments/square/charge"),await p({method:"POST",body:JSON.stringify(e)})),createGocardlessBillingRequest:async e=>c(m("/payments/gocardless/billing-request"),await p({method:"POST",body:JSON.stringify(e)})),completeGocardlessPayment:async e=>c(m("/payments/gocardless/complete"),await p({method:"POST",body:JSON.stringify(e)})),createZipCheckout:async e=>c(m("/payments/zip/checkout"),await p({method:"POST",body:JSON.stringify(e)})),captureZipPayment:async e=>c(m("/payments/zip/capture"),await p({method:"POST",body:JSON.stringify(e)})),createKlarnaCheckout:async e=>c(m("/payments/klarna/checkout"),await p({method:"POST",body:JSON.stringify(e)})),captureKlarnaPayment:async e=>c(m("/payments/klarna/capture"),await p({method:"POST",body:JSON.stringify(e)})),createStockAlert:async e=>c(m("/stock-alerts"),await p({method:"POST",body:JSON.stringify(e)})),createPreOrderIntent:async e=>c(m("/pre-order-intents"),await p({method:"POST",body:JSON.stringify(e)})),createNewsletterSubscription:async e=>c(m("/newsletter-subscriptions"),await p({method:"POST",body:JSON.stringify(e)})),unsubscribeNewsletter:async e=>c(m("/newsletter-unsubscribe"),await p({method:"POST",body:JSON.stringify(e)})),captureCart:async e=>c(m("/carts"),await p({method:"POST",body:JSON.stringify(e)})),restoreCart:async e=>c(m("/carts/restore"),await p({method:"POST",body:JSON.stringify(e)})),unsubscribeCartReminders:async e=>c(m("/carts/unsubscribe"),await p({method:"POST",body:JSON.stringify(e)})),listReviews:async(e={})=>{let t=new URLSearchParams;e.limit&&t.set("limit",String(e.limit)),e.designCode&&t.set("designCode",e.designCode);let n=m("/reviews"),s=t.toString();try{return await c(await h(s?`${n}?${s}`:n),await p())}catch(a){return console.warn("[products.listReviews] product API unavailable, returning []",a),[]}},submitReview:async e=>c(m("/reviews"),await p({method:"POST",body:JSON.stringify(e)})),getForm:async e=>c(m(`/forms/${encodeURIComponent(e)}`),await p()),submitForm:async(e,t)=>c(m(`/forms/${encodeURIComponent(e)}/submissions`),await p({method:"POST",body:JSON.stringify(t)})),listShippingMethods:async()=>{try{return await c(m("/shipping-methods"),await p())}catch(e){return console.warn("[products.listShippingMethods] product API unavailable, returning []",e),[]}},listCountrySubdivisions:async e=>{try{return await c(m(`/countries/${encodeURIComponent(e)}/subdivisions`),await p())}catch(t){return console.warn("[products.listCountrySubdivisions] unavailable, returning []",t),[]}},quoteCart:async e=>{let t=m("/cart/quote"),n=await p({method:"POST",body:JSON.stringify(e)});return e.couponCode?(await Pe(t,n)).data:c(t,n)},validateCoupon:async e=>{let{data:t,asShopper:n}=await Pe(m("/coupons/validate"),await p({method:"POST",body:JSON.stringify(e)}));return{...t,askedAsShopper:n}},getHeaderSettings:async()=>{let e=xe({method:"GET"}),t=await c(...await J(m("/header-settings"),{signal:e})),n=C(t.logoUrl),s=null,a=null;if(n&&D(n)){let l=await he(n,e);l&&(s=l.reversed,a=l.inkIsDark)}return{...t,logoUrl:n,logoReversed:s,logoInkIsDark:a}},getThemeSettings:async()=>c(...await J(m("/theme-settings"))),getChatSettings:async()=>c(await h(m("/chat-settings")),await p())},un={listServices:async()=>{try{return await c(m("/bookings/services"),await p())}catch(e){return console.warn("[bookings.listServices] API unavailable, returning []",e),{results:[],currency:"USD"}}},getAvailability:async(e,t)=>c(m(`/bookings/availability?service=${encodeURIComponent(e)}&date=${t}`),await p()),create:async e=>c(m("/bookings"),await p({method:"POST",body:JSON.stringify(e)})),get:async e=>c(m(`/bookings/manage/${encodeURIComponent(e)}`),await p()),cancel:async e=>c(m(`/bookings/manage/${encodeURIComponent(e)}/cancel`),await p({method:"POST"})),createPaymentIntent:async e=>c(m("/bookings/payments/intent"),await p({method:"POST",body:JSON.stringify({manageToken:e})}))},K=class extends Error{constructor(n,s){super(`Slug "${n}" exists on ${s} websites; a site is required to pick one.`);this.slug=n;this.count=s;this.name="AmbiguousPageSlugError"}},F=(e,t,n)=>{let s=new URLSearchParams({...t?{site:t}:{},...n?{draft:"1"}:{}}).toString();return`/api/storefront/${e}/${s?`?${s}`:""}`},q=e=>`/api/storefront/sites/${encodeURIComponent(e)}/`,Ot=e=>`${q(e)}currencies/`,vt="/api/storefront/media/ingest/",V=class extends Error{constructor(){super("This editor is not connected to a website, so an upload has nowhere to go. Open the page from the website the file should belong to, then try again."),this.name="MediaUploadDestinationError"}};function Et(){let e=ye();if(!e)throw new V;return`${vt}?${new URLSearchParams({site:e})}`}var Ft="X-Puck-Media-Manifest",_e=Z.contentHash,I={"X-Media-Manifest":_e,[Ft]:_e},mn=qe({});function qe(e){return(t,n={})=>{let s=ut(),a=e.headers||s?{...s?{"Accept-Language":s}:{},...e.headers,...n.headers}:void 0;return c(t,{...n,...e.baseUrl!==void 0?{baseUrl:e.baseUrl}:{},...a?{headers:a}:{},audience:e.audience??ct()})}}function It(e={}){let t=qe(e),n=e.siteDrafts===!0,s=r=>F("header-settings",r,n),a=r=>F("theme-settings",r,n),l=r=>F("chat-settings",r,n),d=r=>F("social-settings",r,n);return{findPageBySlug:async(r,i,o)=>{let u=new URLSearchParams({slug:r});o&&u.set("site",o);let g=await t(`/api/storefront/pages/?${u.toString()}`,{token:i}),P=Array.isArray(g)?g:g.results??[];if(!o&&P.length>1)throw new K(r,P.length);return P[0]??null},getPageById:(r,i)=>t(`/api/storefront/pages/${r}/`,{token:i}),saveLayout:(r,i,o,u,g)=>t(`/api/storefront/pages/${r}/`,{method:"PATCH",body:JSON.stringify({layout:i,expected_updated_at:u,...g?{client_id:g}:{}}),token:o}),duplicatePage:(r,i,o)=>t(`/api/storefront/pages/${r}/duplicate/`,{method:"POST",body:JSON.stringify({title:i.title,slug:i.slug}),token:o}),geocode:(r,i,o)=>t(`/api/storefront/geocode/?${new URLSearchParams(o?{q:r,country:o}:{q:r})}`,{token:i}),listBlockSources:r=>t("/api/storefront/block-sources/",{token:r}),listRecordTypes:r=>t("/api/storefront/record-types/",{token:r}),createPagePreviewLink:(r,i)=>t(`/api/storefront/pages/${r}/preview-link/`,{method:"POST",token:i}),claimPageEditLock:(r,i,o,u=!1)=>t(`/api/storefront/pages/${r}/edit-lock/`,{method:"POST",body:JSON.stringify({client_id:o,takeover:u}),token:i}),releasePageEditLock:(r,i)=>t(`/api/storefront/pages/${r}/edit-lock/`,{method:"DELETE",token:i}),createTemplate:(r,i,o)=>t("/api/storefront/page-templates/",{method:"POST",body:JSON.stringify({name:r,layout:i}),headers:I,token:o}),getTemplate:(r,i)=>t(`/api/storefront/page-templates/${r}/`,{token:i}),saveTemplateLayout:(r,i,o)=>t(`/api/storefront/page-templates/${r}/`,{method:"PATCH",body:JSON.stringify({layout:i}),headers:I,token:o}),listTemplatePages:async(r,i)=>{let o=await t(`/api/storefront/template-pages/?template=${encodeURIComponent(r)}`,{token:i});return Array.isArray(o)?o:o.results??[]},findTemplatePageBySlug:async(r,i,o)=>{let u=await t(`/api/storefront/template-pages/?template=${encodeURIComponent(r)}&slug=${encodeURIComponent(i)}`,{token:o});return(Array.isArray(u)?u:u.results??[])[0]??null},createTemplatePage:(r,i,o)=>t("/api/storefront/template-pages/",{method:"POST",body:JSON.stringify({template:r,...i}),headers:I,token:o}),saveTemplatePageLayout:(r,i,o)=>t(`/api/storefront/template-pages/${r}/`,{method:"PATCH",body:JSON.stringify({layout:i}),headers:I,token:o}),deleteTemplatePage:(r,i,o)=>t(`/api/storefront/template-pages/${r}/`,{method:"DELETE",token:i,...o?.keepalive?{keepalive:!0}:{}}),listPages:async(r,i)=>{let o=new URLSearchParams({no_page:"true"});i&&o.set("site",i);let u=await t(`/api/storefront/pages/?${o.toString()}`,{token:r});return Array.isArray(u)?u:u.results??[]},createPage:(r,i,o,u)=>t("/api/storefront/pages/",{method:"POST",body:JSON.stringify({title:r,slug:i,layout:o}),token:u}),deletePage:(r,i)=>t(`/api/storefront/pages/${r}/`,{method:"DELETE",token:i}),getHeaderSettings:(r,i)=>t(s(i),{token:r}),listMenus:async(r,i)=>{let o=new URLSearchParams({no_page:"true"});i&&o.set("site",i);let u=await t(`/api/storefront/menus/?${o}`,{token:r});return Array.isArray(u)?u:u.results??[]},listBlogPosts:async(r,i={})=>{let o=new URLSearchParams({no_page:"true"});i.visibleOnly&&o.set("is_visible","true"),i.siteId&&o.set("site",i.siteId);let u=await t(`/api/storefront/blog-posts/?${o.toString()}`,{token:r});return Array.isArray(u)?u:u.results??[]},listFieldUsage:async(r,i)=>{let o=await t(`/api/storefront/field-usage/?site=${encodeURIComponent(i)}`,{token:r});return Array.isArray(o?.entries)?o.entries:[]},listCategories:async(r,i={})=>{let o=new URLSearchParams({no_page:"true"});i.visibleOnly&&o.set("is_visible","true"),i.siteId&&o.set("site",i.siteId);let u=await t(`/api/storefront/categories/?${o.toString()}`,{token:r});return[...Array.isArray(u)?u:u.results??[]].sort((P,x)=>P.sort_order-x.sort_order||P.name.localeCompare(x.name))},listForms:async(r,i={})=>{let o=new URLSearchParams({no_page:"true"});i.siteId&&o.set("site",i.siteId);let u=await t(`/api/storefront/forms/?${o.toString()}`,{token:r});return[...Array.isArray(u)?u:u.results??[]].sort((P,x)=>P.title.localeCompare(x.title))},listWheelSummaries:async(r,i={})=>{let o=new URLSearchParams;i.siteId&&o.set("site",i.siteId);let u=o.toString(),g=await t(`/api/storefront/wheel-curations/summaries/${u?`?${u}`:""}`,{token:r});return f(g)},listProducts:async(r,i={})=>{let o=new URLSearchParams;i.kinds?.length&&o.set("kind",i.kinds.join(",")),i.siteId&&o.set("site",i.siteId);let u=o.toString(),g=await t(`/api/storefront/products/${u?`?${u}`:""}`,{token:r});return f(g)},getWheelDetail:async(r,i,o={})=>{let u=new URLSearchParams({slug:i});return o.siteId&&u.set("site",o.siteId),A(f(await t(`/api/storefront/wheel-curations/detail/?${u.toString()}`,{token:r})))},updateHeaderSettings:(r,i,o)=>t(s(o),{method:"PATCH",body:JSON.stringify(r),token:i}),getSite:(r,i)=>t(q(r),{token:i}),listSites:async r=>{let i=await t("/api/storefront/sites/?no_page=true",{token:r});return Array.isArray(i)?i:i.results??[]},listSiteCurrencies:async(r,i)=>{let o=await t(Ot(r),{token:i});return Array.isArray(o)?o:[]},publishSite:(r,i)=>t(`${q(r)}publish/`,{method:"POST",token:i}),getSiteLiveState:(r,i)=>t(`${q(r)}live-state/`,{token:i}),getThemeSettings:(r,i)=>t(a(i),{token:r}),updateThemeSettings:(r,i,o)=>t(a(o),{method:"PATCH",body:JSON.stringify(r),token:i}),getMyPreferences:async r=>(await t("/api/auth/me/",{token:r})).preferences??{},updateMyPreferences:(r,i)=>t("/api/auth/me/",{method:"PATCH",body:JSON.stringify({preferences:r}),token:i}),getChatSettings:(r,i)=>t(l(i),{token:r}),updateChatSettings:(r,i,o)=>t(l(o),{method:"PATCH",body:JSON.stringify(r),token:i}),getSocialSettings:(r,i)=>t(d(i),{token:r}),updateSocialSettings:(r,i,o)=>t(d(o),{method:"PATCH",body:JSON.stringify(r),token:i}),uploadHeaderLogo:(r,i,o)=>{let u=new FormData;return u.append("logo",r),t(s(o),{method:"PATCH",body:u,token:i})},clearHeaderLogo:(r,i)=>t(s(i),{method:"PATCH",body:JSON.stringify({logo:null}),token:r}),setHeaderLogoFromAsset:(r,i,o)=>t(s(o),{method:"PATCH",body:JSON.stringify({logo_asset_id:r}),token:i}),uploadMedia:async(r,i)=>{let o=new FormData;return o.append("file",r),t(Et(),{method:"POST",body:o,token:i})},listMedia:async(r,i)=>{let o=new URLSearchParams({no_page:"true"});i&&o.set("kind",i);let u=await t(`/api/storefront/media-assets/?${o.toString()}`,{token:r});return Array.isArray(u)?u:u.results??[]}}}var pn=It({siteDrafts:!0});export{B as a,Y as b,ee as c,w as d,Be as e,D as f,ye as g,tt as h,S as i,G as j,H as k,tn as l,nn as m,c as n,dt as o,Ie as p,bt as q,At as r,Rt as s,xt as t,cn as u,ln as v,un as w,K as x,mn as y,pn as z};
@@ -1,29 +0,0 @@
1
- import { type CardHoverDrawn } from "efficient-web-builder/format/lib/animation/hover";
2
- import type { WheelSummary } from "../../lib/api/index.js";
3
- import { type CardIndexFormat, type CardOutline } from "efficient-web-builder/format/lib/sections/product-card-style";
4
- import { type FieldUsageAnswer } from "../../lib/content/field-usage.js";
5
- import { type VehicleFitment } from "../../lib/wheels/plp-fitment-match.js";
6
- export interface PlpCardProps {
7
- wheel: WheelSummary;
8
- colours?: readonly string[];
9
- fit?: VehicleFitment | null;
10
- editing?: boolean;
11
- brandPlate?: boolean;
12
- kindLabel?: string | null;
13
- showBrand?: boolean;
14
- showProcess?: boolean;
15
- coverIndex?: number;
16
- fieldUsage?: readonly FieldUsageAnswer[];
17
- hover?: CardHoverDrawn;
18
- imageBackgroundFill?: string;
19
- showBadge?: boolean;
20
- outline?: CardOutline;
21
- indexBadge?: CardIndexFormat;
22
- showCardSizes?: boolean;
23
- showCardBuy?: boolean;
24
- showCardPage?: boolean;
25
- showCardPrice?: boolean;
26
- showCardFinishes?: boolean;
27
- imageSizes?: string;
28
- }
29
- export default function PlpCard({ wheel, colours, fit, editing, brandPlate, kindLabel, showBrand, showProcess, coverIndex, fieldUsage, hover, imageBackgroundFill, showBadge, outline, indexBadge, showCardSizes, showCardBuy, showCardPage, showCardPrice, showCardFinishes, imageSizes, }: PlpCardProps): import("react").JSX.Element;
@@ -1 +0,0 @@
1
- "use client";import{jsx as r,Fragment as T,jsxs as G}from"react/jsx-runtime";import{CARD_IMAGE_SIZES as M}from"../../lib/sections/card-image-sizes.js";import{LISTING_CARD_SHOW as D}from"../../lib/sections/card-show-defaults.js";import U from"next/image";import{useHeldCardPicture as X}from"../card-pieces/useHeldCardPicture.js";import{useState as H}from"react";import V from"../BrandPlate.js";import Z,{CardBuyDialog as q}from"../card-pieces/CardBuyButton.js";import J from"../card-pieces/CardFinishSwatches.js";import K from"../card-pieces/CardPrice.js";import Q from"../card-pieces/CardProductBadge.js";import{useWheelCardState as Y,WheelCardStateProvider as ee}from"../card-pieces/ProductCardState.js";import{wheelCardEyebrow as re,wheelCardEyebrowShows as oe}from"../ProductCardEyebrow.js";import{withRMark as k}from"efficient-web-builder/render/components/RMark";import ae from"../WheelPlaceholder.js";import{cardSpinOf as te}from"../card-spin.js";import{cardHoverOf as se}from"efficient-web-builder/format/lib/animation/hover";import{CardSpecFacts as ie}from"../card-pieces/CardSpecs.js";import ne from"../WheelCardFrame.js";import{CARD_IMAGE_BG_OFF as le}from"efficient-web-builder/format/lib/content/card-image-background";import{itemBrand as de}from"../../lib/catalog/plp-item.js";import{CARD_INDEX_BADGE_CLASS as me,CARD_INDEX_CLASS as ce,DEFAULT_CARD_INDEX_FORMAT as he,DEFAULT_CARD_OUTLINE as pe}from"efficient-web-builder/format/lib/sections/product-card-style";import{NO_FIELD_ANSWERS as fe}from"../../lib/content/field-usage.js";import{setSecondSrc as ue}from"../../lib/wheels/set-mode.js";import{PLP_GRID_GAP_VAR as we}from"../../lib/wheels/plp-grid.js";import{FITMENT_FIELD_SEPARATOR as Se}from"../../lib/wheels/plp-fitment-match.js";import{coverSrcForWheel as Ce,DEFAULT_COVER_INDEX as ge,resolvePaintedSrc as _e}from"../../lib/wheels/cover-rendering.js";const Ee=se({},"AlloyWheelsListing");function Fe({wheel:n,colours:p,fit:l=null,editing:d=!1,brandPlate:m=!1,kindLabel:f=null,showBrand:s=!0,showProcess:u=!1,coverIndex:w=ge,fieldUsage:S=fe,hover:C=Ee,imageBackgroundFill:g=le,showBadge:_=!0,outline:E=pe,indexBadge:F=he,showCardSizes:A=D.showCardSizes,showCardBuy:b=D.showCardBuy,showCardPage:c=D.showCardPage,showCardPrice:o=!0,showCardFinishes:e=!0,imageSizes:h=M}){return r(ee,{wheel:n,colours:p,editing:d,children:r(Ae,{fit:l,brandPlate:m,kindLabel:f,showBrand:s,showProcess:u,coverIndex:w,fieldUsage:S,hover:C,imageBackgroundFill:g,showBadge:_,outline:E,indexBadge:F,showCardSizes:A,showCardBuy:b,showCardPage:c,showCardPrice:o,showCardFinishes:e,imageSizes:h})})}function Ae({fit:n,brandPlate:p,kindLabel:l,showBrand:d,showProcess:m,coverIndex:f,fieldUsage:s,hover:u,imageBackgroundFill:w,showBadge:S,outline:C,indexBadge:g,showCardSizes:_,showCardBuy:E,showCardPage:F,showCardPrice:A,showCardFinishes:b,imageSizes:c}){const{wheel:o,sel:e,isSet:h}=Y(),x=Ce(o,f,e.finish?.name,e.shownSrc,n?.holes),[B,O]=H(()=>new Set),y=a=>{e.pictureFailed(a),O(i=>i.has(a)?i:new Set(i).add(a))},L=_e({overrideSrc:x,hookSrc:e.shownSrc,failed:B}),I=de(o),P=te(u),R=(a,i)=>r(U,{alt:i,src:a,width:800,height:800,sizes:c,className:["block h-full w-full object-contain",P.className].filter(Boolean).join(" "),style:P.style,draggable:!1,onError:()=>y(a)},a),W=e.finish?`${o.name} — ${e.finish.name}`:o.name,v=h?ue(o.finishes?.find(a=>a.name===e.finish?.name),L):null,t=X({src:L,second:v,alt:W,sizes:c,failed:B,onFailed:y,near:e.nearScreen,holdEmpty:e.awaitingProbe}),$=G(T,{children:[t.src?R(t.src,t.alt):r(ae,{imageLabel:o.name,spin:P}),t.trial]}),j=t.second?R(t.second,`${t.alt} — right`):void 0,N=g!=="off"?r("span",{"aria-hidden":!0,className:`${ce} ${me}`}):null,z=re({kindLabel:l,brand:d&&I?k(I):null,process:m&&o.process?k(o.process):null},s);return G(T,{children:[r(ne,{href:`/wheels/${o.slug}`,wide:h,setGridGap:`var(${we})`,identityLink:!0,containerProps:{onPointerEnter:e.arm,onTouchStart:e.arm,onFocusCapture:e.arm},probes:e.probes,outline:C,imageBackgroundFill:w,indexBadge:N,badges:r(Q,{show:S,numbered:N!=null,sale:!0}),image:$,imageSecond:j,plate:p?r(V,{brand:I,logo:o.brandLogo}):null,eyebrow:z,wholeCardLink:!0,reserveEyebrow:oe({kind:!!l,brand:d,process:m},s),spec:r(ie,{sizes:_,fieldUsage:s,car:n,separator:Se}),price:r(K,{show:A,setTotal:!0,wasFollowsSize:!0}),swatches:r(J,{show:b,showSingle:!0}),buy:r(Z,{buy:E,page:F})}),r(q,{})]})}export{Fe as default};