import{y as Xe,o as zt,b as Ct,e as ge,a as Ie,w as st,z as Vt,B as At,C as Lt,j as H,d as Ot,k as Rt,i as Dt,l as Tt,D as Mt,E as Bt,F as Ze,G as Ht,H as Nt,I as Et,A as ie,J as Gt,K as Wt}from"./Cfh3kXIQ.js";import{E as i,P as c,V as u,J as O,Z as D,L as d,l as M,O as N,F as C,U as x,b as R,r as Se,c as ot,z as ze,I as jt,u as e,R as q,k as S,Q as _,N as $,a2 as Ft,a5 as Ut,H as V,a1 as qt,a4 as _e,D as Xt,a0 as U,M as Zt,q as Ye}from"./DEIzhR9A.js";import{_ as Ce,a as Yt,b as Jt,c as Kt,d as Qt}from"./B7jNADEc.js";import{_ as at}from"./Cmn_vM4N.js";import es from"./CYLXjrQd.js";import ts from"./-IL9qb0M.js";import{u as ss,_ as os}from"./Cn5bykuR.js";import{u as as}from"./Dvss8IH7.js";import{_ as is}from"./CURG9BeU.js";import{_ as it}from"./BlYltdjn.js";import{_ as nt}from"./DdY_a9Gh.js";import{_ as ns}from"./C5qvglTP.js";import{_ as lt}from"./B5Zp2Vr1.js";import{_ as ls}from"./D7-ZWS-e.js";import{u as rt}from"./CSqzEET8.js";import{a as rs,s as cs,i as ct,h as us}from"./vY_KiDi_.js";import{u as ds}from"./BrvZKvXP.js";import{u as Je}from"./-3Z1Icp3.js";import{u as ms,b as ps,g as fs}from"./wx5q-daT.js";import{u as hs}from"./CI0YNt9a.js";import{u as _s}from"./C3UJvzSh.js";import{u as gs}from"./6V7i6PLi.js";import{i as vs}from"./BNS08PCs.js";import"./DpUJxqoL.js";import"./_ECBCnJP.js";import"./Dqvtgzyr.js";import"./BJFSaJwp.js";import"./CZjMpD9W.js";import"./DObx2S2v.js";import"./Cjs1FLPk.js";import"./DGPHl70G.js";import"./APZTHeFf.js";import"./ArJcqVXA.js";import"./AQgvJZua.js";import"./DW-wVgF4.js";import"./CzEXYf9D.js";import"./DAoAjQ1Z.js";import"./BQKfvuZz.js";const ut=t=>Object.keys(t).reduce((s,o)=>{const m=[o].filter(Boolean).toString();return typeof(t==null?void 0:t[o])=="object"?{...s,...ut(t[o])}:{...s,[m]:t[o]}},{}),Ke=t=>t.map(ut),Qe=t=>t.map(s=>({...Xe(Ke(s.fieldSet))[0],values:Xe(s.groupSet.map(o=>Ke(o.fieldSet)))})),ys={},bs={class:"grid grid-cols-3"},ws={class:"col-span-3 grid grid-cols-1 gap-1 sm:col-span-2 sm:grid-cols-2"},ks={class:"container"},$s={class:"mt-4 space-y-8 p-16"},xs={class:"space-y-4"},Ps={class:"space-y-2"},Is={class:"space-y-3"},Ss={class:"flex space-x-2"},zs={class:"space-y-3"},Cs={class:"flex space-x-4"},Vs={class:"flex items-center space-x-8"};function As(t,s){const o=Ct;return i(),c("div",bs,[u("div",ws,[(i(),c(O,null,D(6,m=>d(o,{key:m,"is-full-width":!0,type:"image",class:"max-h-xl sm:max-h-lg"})),64))]),u("div",ks,[u("div",$s,[u("div",xs,[d(o,{type:"link","is-full-width":!0}),d(o,{type:"custom",class:"h-8 w-48"})]),u("div",Ps,[d(o,{type:"custom",class:"h-4 w-36"}),d(o,{type:"custom",class:"h-3 w-20"})]),u("div",Is,[d(o,{type:"custom",class:"h-4 w-32"}),u("div",Ss,[(i(),c(O,null,D(3,m=>d(o,{key:`color-${m}`,type:"custom",class:"size-6"})),64))])]),u("div",zs,[d(o,{type:"custom",class:"h-4 w-20"}),u("div",Cs,[(i(),c(O,null,D(5,m=>d(o,{key:`size-${m}`,type:"custom",class:"size-6"})),64))]),s[0]||(s[0]=u("div",{class:"flex items-center space-x-8"},null,-1))]),u("div",Vs,[d(o,{type:"button","is-full-width":!0}),d(o,{type:"custom",class:"size-8"})])])])])}const Ls=zt(ys,[["render",As]]),Os=["src","muted","autoplay","loop"],dt=M({__name:"ProductVideo",props:{src:{type:String,required:!0},loop:{type:Boolean,default:!0},autoplay:{type:Boolean,default:!0},muted:{type:Boolean,default:!0}},setup(t){return(s,o)=>(i(),c("video",{src:t.src,muted:t.muted,autoplay:t.autoplay,loop:t.loop,class:"h-full object-cover"},null,8,Os))}}),Rs={class:"w-full grid-cols-12 gap-1 sm:grid",style:{"scroll-snap-type":"y mandatory"}},Ds=M({__name:"TiledGallery",props:{productName:{type:String,default:""},itemsPerRow:{type:Array,default:()=>[2,2,2,2,2]},galleryItems:{type:Array,default:()=>[]}},emits:["click:productImage"],setup(t){const s=(o,m)=>m.map(w=>Array(w).fill(12/w)).flat()[o];return(o,m)=>{const b=dt,w=Ce;return i(),c("div",Rs,[(i(!0),c(O,null,D(t.galleryItems,(r,p)=>(i(),c("div",{key:p,class:N(["items-center justify-center overflow-hidden bg-gray-200 sm:flex",{"col-span-1":s(p,t.itemsPerRow)===1,"col-span-2":s(p,t.itemsPerRow)===2,"col-span-3":s(p,t.itemsPerRow)===3,"col-span-6 md:col-span-4":s(p,t.itemsPerRow)===4,"col-span-5":s(p,t.itemsPerRow)===5,"col-span-12 md:col-span-6":s(p,t.itemsPerRow)===6,"col-span-7":s(p,t.itemsPerRow)===7,"col-span-8":s(p,t.itemsPerRow)===8,"col-span-9":s(p,t.itemsPerRow)===9,"col-span-10":s(p,t.itemsPerRow)===10,"col-span-11":s(p,t.itemsPerRow)===11,"col-span-12":s(p,t.itemsPerRow)===12}])},["type"in r&&(r==null?void 0:r.type)==="video"?(i(),C(b,{key:0,src:r.src},null,8,["src"])):"hash"in r?(i(),C(w,{key:1,"aria-label":"Zoom on image",alt:t.productName,image:r,"preload-image":p===0,"image-loading":p===0?"eager":"lazy",sizes:"sm:100vw md:50vw lg:50vw xl:50vw 2xl:50vw 2048:50vw",class:"cursor-zoom-in",onClick:l=>o.$emit("click:productImage",r)},null,8,["alt","image","preload-image","image-loading","onClick"])):x("",!0)],2))),128))])}}}),Ts=(t,s)=>{const o=window.pageXOffset,m=window.pageYOffset,b=R(null),w=R(s);function r(a){if(!a)return!1;let y=a.offsetTop,h=a.offsetLeft;const k=a.offsetWidth,v=a.offsetHeight;for(;a.offsetParent;)a=a.offsetParent,y+=a.offsetTop,h+=a.offsetLeft;return y<window.pageYOffset+window.innerHeight&&h<window.pageXOffset+window.innerWidth&&y+v>window.pageYOffset&&h+k>window.pageXOffset}function p(){b.value&&(w.value=Array.prototype.slice.call(b.value.children).reverse().find(a=>r(a)).getAttribute("hash")??w.value)}function l(a){t.forEach((y,h)=>{y.hash===a&&b.value&&b.value.children[h].scrollIntoView({behavior:"smooth"})})}const P=Se({number:0});function f(){P.number++}return ot(P,()=>{P.number===t.length&&l(w.value)}),ze(()=>{window.addEventListener("scroll",p)}),jt(()=>{window.removeEventListener("scroll",p),window.scrollTo(o,m)}),{activeImageOnScreenHash:w,zoomGalleryRef:b,calculateActiveImageOnScreen:p,scrollToImage:l,load:f}},Ms={class:"absolute left-0 top-0 z-40 m-0 h-screen w-screen bg-white"},Bs={class:"fixed left-8 top-1/2 flex -translate-x-1/2 -translate-y-1/2 flex-col"},Hs=["onClick"],Ns=["hash"],Es=M({__name:"ZoomGallery",props:{images:{type:Array,required:!0},clickedImageHash:{type:String,required:!0}},setup(t){const s=t,{activeImageOnScreenHash:o,zoomGalleryRef:m,scrollToImage:b,load:w}=Ts(s.images,s.clickedImageHash);return(r,p)=>(i(),c("div",Ms,[u("div",Bs,[(i(!0),c(O,null,D(t.images,l=>(i(),c("button",{key:l.hash,type:"button",class:N(["mb-2 size-2 rounded-full",l.hash===e(o)?"bg-black":"bg-gray-500"]),onClick:P=>e(b)(l.hash)},null,10,Hs))),128))]),u("div",{ref_key:"zoomGalleryRef",ref:m},[(i(!0),c(O,null,D(t.images,l=>(i(),c("div",{key:l.hash,hash:l.hash},[q(r.$slots,"body",{image:l,load:e(w)})],8,Ns))),128))],512)]))}}),Gs={key:0,class:"mb-3 flex h-12 items-center justify-center border border-black text-md"},Ws=["placeholder"],js=M({__name:"ProductAvailabilitySubscribe",props:{variantId:{type:Number,required:!0},productId:{type:Number,required:!0}},setup(t){const s=t,{data:o,fetchProductAvailability:m}=as(),{$validation:b}=ge(),w=R({}),r=Se({email:""}),p={email:{email:b.rule.email,required:b.rule.required,maxLength:b.rule.maxLength(64)}},l=ss(p,r,{$externalResults:w});o.value=null;const P=async()=>{await l.value.$validate()&&await m(r.email,s.variantId,s.productId)};ot(()=>s.variantId,(a,y)=>{a!==y&&(o.value=null,r.email="",l.value.$reset())});const f=S(()=>{var a,y;return((a=o.value)==null?void 0:a.message)==="User registered"||((y=o.value)==null?void 0:y.message)==="User already registered"});return(a,y)=>{const h=at,k=os;return e(f)?(i(),c("div",Gs,_(a.$t("newsletter.product_availability.success")),1)):(i(),C(k,{key:1,errors:e(l).$errors},{default:$(({isValid:v})=>[u("div",{class:N(["flex border border-primary-500 pr-4",{"border-red-600":!v}])},[Ft(u("input",{id:"search","onUpdate:modelValue":y[0]||(y[0]=z=>e(r).email=z),type:"email",placeholder:a.$t("newsletter.subscribe.title"),class:N([{"text-red-600":!v},"w-full border-0 text-xl outline-0 ring-0 transition-colors duration-200 ease-linear placeholder:text-black focus:border-primary-500 focus:outline-none focus:ring-0 md:border-none"])},null,10,Ws),[[Ut,e(r).email]]),d(h,{size:"sm",type:"ghost",class:"font-bold","no-padding":"",onClick:P},{default:$(()=>[V(_(a.$t("newsletter.subscribe.cta")),1)]),_:1})],2)]),_:1},8,["errors"]))}}}),Fs={class:"flex flex-col sm:w-1/2 sm:flex-1 sm:items-start"},Us={class:"relative sm:hidden"},qs=M({__name:"VerticalGallery",props:{productName:{type:String,default:""},additionalOffset:{type:Number,default:0},galleryItems:{type:Array,default:()=>[]}},setup(t){const s=t,{additionalOffset:o}=qt(s),m=R(0),b=R(!1);ze(()=>b.value=!0);const w=l=>{m.value=l},r=S(()=>{var l,P;return b.value?`${window.screen.height-(o.value||0)-(((l=document.getElementById("header"))==null?void 0:l.offsetHeight)||0)-(((P=document.getElementById("banner"))==null?void 0:P.offsetHeight)||0)}px`:"100vh"}),p=S(()=>{var l,P;return b.value?`${window.screen.height-(o.value||0)-(((l=document.getElementById("header"))==null?void 0:l.offsetHeight)||0)-(((P=document.getElementById("banner"))==null?void 0:P.offsetHeight)||0)-20}px`:"100vh"});return(l,P)=>{const f=dt,a=Ce,y=it,h=nt,k=ns;return i(),c("div",Fs,[u("div",Us,[d(h,{class:"flex-nowrap",style:_e([{"scroll-snap-type":"x mandatory"},"height:"+e(r)])},{default:$(()=>[(i(!0),c(O,null,D(t.galleryItems,(v,z)=>(i(),C(y,{key:"id"in v?v.id:v.hash,threshold:[.5],class:"relative min-w-full snap-start snap-always",onEnter:T=>w(z)},{default:$(()=>["type"in v&&v.type==="video"?(i(),C(f,{key:0,src:v.src},null,8,["src"])):"hash"in v?(i(),C(a,{key:1,image:v,alt:t.productName,sizes:"xs:100vw sm:100vw md:100vw",fit:"cover",class:"absolute inset-0","preload-image":z===0,"image-loading":z===0?"eager":"lazy"},null,8,["image","alt","preload-image","image-loading"])):x("",!0)]),_:2},1032,["onEnter"]))),128))]),_:1},8,["style"]),d(k,null,{default:$(()=>[u("div",{class:"absolute flex w-screen justify-center space-x-2",style:_e("top: "+e(p))},[(i(!0),c(O,null,D(t.galleryItems,(v,z)=>(i(),c("div",{key:"id"in v?v.id:v.hash,class:N(["size-2 rounded-full",{"bg-white":e(m)===z,"bg-gray-500":e(m)!==z}])},"   ",2))),128))],4)]),_:1})]),q(l.$slots,"default")])}}}),Xs={class:"xl:space-x-1 flex flex-wrap items-center space-x-4 sm:space-x-1 md:space-x-1 lg:space-x-1"},Zs=M({__name:"ProductSiblingPicker",props:{items:{type:Array,default:()=>[]},withValues:{type:Boolean,default:!1}},setup(t){const s=t,o=S(()=>s.items);return(m,b)=>{const w=lt;return i(),c("div",null,[q(m.$slots,"default",{items:t.items},()=>[u("div",Xs,[q(m.$slots,"items",{items:e(o)},()=>[(i(!0),c(O,null,D(e(o),r=>q(m.$slots,"item",{item:r},()=>[(i(),c("span",{key:`color-picker-color-${r.id}`,style:_e(`background-color:${r.id}`),class:"inline-block size-4 rounded-full border border-black bg-white"},null,4))])),256))])]),t.withValues?(i(),C(w,{key:0,class:"mt-4",items:e(o)[0].colors},null,8,["items"])):x("",!0)])])}}}),Ys={class:"mt-2"},Js=M({__name:"ProductDetailGroup",props:{headline:{type:Object,default:()=>({tag:"p",size:"sm"})},margin:{type:String,default:"md",validator:t=>["md","xl"].includes(t)}},setup(t){const s=t,o=S(()=>s.margin==="md"),m=S(()=>s.margin==="xl");return(b,w)=>{const r=Ie;return i(),c("div",{class:N({"mt-5":e(o),"pt-12":e(m)})},[d(r,{tag:t.headline.tag,size:t.headline.size},{default:$(()=>[q(b.$slots,"headline")]),_:3},8,["tag","size"]),u("div",Ys,[q(b.$slots,"default")])],2)}}}),Ks=M({__name:"ProductRecommendations",props:{loading:{type:Boolean,default:!1},products:{type:Array,default:()=>[]},size:{type:String,validator:t=>["4xs","xs","md","lg","xl"].includes(t),default:"md"},isLookbookProducts:{type:Boolean,default:!1}},emits:["intersect:column","click:recommendation"],setup(t,{emit:s}){const o=t,m=s,{getProductDetailRoute:b}=rt(),w=R([]),r=R(),p=R({transition:"1s ease",transform:"translateX(0)"}),l=R(0),P=()=>{var T;const h=(T=r==null?void 0:r.value)==null?void 0:T.scrollWidth,k=h?h/o.products.length:0,v=Math.floor(window.innerWidth/k),z=k*v*(l.value+1);h&&z<h&&(p.value.transform=`translateX(-${z}px)`,l.value++)},f=()=>{var T;const h=(T=r==null?void 0:r.value)==null?void 0:T.scrollWidth,k=h?h/o.products.length:0,v=Math.floor(window.innerWidth/k),z=k*v*(l.value-1);z>=0&&(p.value.transform=`translateX(-${z}px)`,l.value--)};let a;const y=(h,k)=>{if(w.value.findIndex(z=>z.column===k)!==-1)return;w.value.length===0&&(a=!0,setTimeout(()=>{m("intersect:column",{index:k,items:w.value.map(z=>z.items[0])}),a=!1},100));const v=[{...o.products[k],index:k+1}];a||m("intersect:column",{index:k,items:v}),w.value.push({column:k,items:v})};return(h,k)=>{const v=st,z=Yt,T=nt;return i(),C(T,{"hide-overflow":t.isLookbookProducts,"spaced-items":"","spaced-width":"sm"},{default:$(()=>[t.isLookbookProducts&&e(l)!==0?(i(),c("button",{key:0,class:"absolute left-0 top-20 z-10 hidden text-gray-700 focus:outline-none sm:inline-block",onClick:f},[d(v,{icon:"UiArrowLeft","icon-size":"md"})])):x("",!0),u("div",{ref_key:"carousel",ref:r,class:"flex space-x-2",style:_e(e(p))},[(i(!0),c(O,null,D(t.products,(L,X)=>{var W;return i(),C(z,{id:L.id,key:`product-recommendation-${L.id}`,loading:t.loading,title:((W=h.$helpers.attribute.getFirstAttributeValue(L.attributes,"name"))==null?void 0:W.label)||"",class:N({"w-4xs":t.size==="4xs","w-xs":t.size==="xs","w-md":t.size==="md","w-lg":t.size==="lg","w-xl":t.size==="xl"}),link:e(b)(L),image:h.$helpers.image.getFirstModelImage(L.images)??void 0,price:h.$helpers.product.getLowestPrice(L.variants||[]),"lowest-prior-price":h.$helpers.product.getVariantWithLowestPrice(L.variants||[]).lowestPriorPrice,"show-add-to-cart":!1,"show-add-to-wishlist":!1,"show-available-colors":!1,"onIntersect:product":j=>y(j,X),onClickCapture:j=>m("click:recommendation",L)},null,8,["id","loading","title","class","link","image","price","lowest-prior-price","onIntersect:product","onClickCapture"])}),128))],4),t.isLookbookProducts?(i(),c("button",{key:1,class:"absolute right-0 top-20 hidden text-gray-700 focus:outline-none sm:inline-block",onClick:P},[d(v,{icon:"UiArrowRight","icon-size":"md"})])):x("",!0)]),_:1},8,["hide-overflow"])}}}),Qs=["textContent"],eo=["src"],to={key:2},so=["href","textContent"],oo=["textContent"],ao=M({__name:"ProductSustainabilities",props:{product:{type:Object,default:()=>null}},setup(t){const s=t,{$i18n:o}=ge(),m=r=>{const l=rs["production"][`${r}`],P=o.te(`product_detail.sustainability.${l}.text`);if(l&&P){const f=o.te(`product_detail.sustainability.${l}.link.text`),a=o.te(`product_detail.sustainability.${l}.image`);return{text:o.t(`product_detail.sustainability.${l}.text`),image:a?o.t(`product_detail.sustainability.${l}.image`):void 0,link:f?{text:o.t(`product_detail.sustainability.${l}.link.text`),url:o.t(`product_detail.sustainability.${l}.link.url`)}:void 0}}},b=r=>{if(!r)return!1;try{return require(`@/assets/images/sustainability/${r}.png`)}catch{return console.error("Care Icon not found",r),!1}},w=S(()=>{var r;return Vt((r=s.product)==null?void 0:r.attributes,cs).filter(p=>!!p).map(p=>({id:p.id,info:m(p.id)})).filter(p=>!!p.id&&!!p.info)});return(r,p)=>(i(),c("div",null,[e(w).length?(i(!0),c(O,{key:0},D(e(w),l=>{var P,f,a,y;return i(),c("div",{key:l.id},[(P=l==null?void 0:l.info)!=null&&P.text?(i(),c("p",{key:0,textContent:_(l.info.text)},null,8,Qs)):x("",!0),b((f=l==null?void 0:l.info)==null?void 0:f.image)?(i(),c("img",{key:1,class:"mb-4 h-16",src:b((a=l==null?void 0:l.info)==null?void 0:a.image)},null,8,eo)):x("",!0),(y=l==null?void 0:l.info)!=null&&y.link?(i(),c("p",to,[V(_(l.info.link.text)+" ",1),u("u",null,[u("a",{href:l.info.link.url,target:"_blank",textContent:_(l.info.link.url)},null,8,so)])])):x("",!0)])}),128)):(i(),c("p",{key:1,textContent:_(r.$t("sustainability_info"))},null,8,oo))]))}}),et={27978:"machine-wash-30-gentle-or-delicate",28006:"machine-wash-30-permanent-press",739:"machine-wash-30",721:"machine-wash-40-gentle-or-delicate",723:"machine-wash-40-permanent-press",724:"machine-wash-40",722:"machine-wash-60-permanent-press",730:"machine-wash-60",719:"",728:"machine-wash-95",743:"bleach-if-needed",736:"oxygen-bleach-if-needed",731:"iron",734:"hand-wash",746:"iron-high",28013:"dry-flat",738:"iron-medium",27984:"do-not-bleach",750:"do-not-iron",727:"do-not-dry-clean",27981:"iron-low",27975:"do-not-tumble-dry",733:"do-not-wash",754:"",732:"",758:"",751:"",753:"",737:"tumble-dry-at-low-temperature",745:"tumble-dry-at-normal-temperature",768:"tumble-dry",777:"drip-dry"},io=t=>{if(!(!t||!(t in et)))return`IconCare${At(et[t])}`},no=["title"],lo=M({__name:"ProductCareSymbol",props:{symbol:{}},setup(t){const s=t,o=S(()=>io(s.symbol.id));return(m,b)=>(i(),c("div",{title:m.symbol.label},[e(o)?(i(),C(Xt(e(o)),{key:m.symbol.label,alt:m.symbol.label,class:"size-5 md:size-6"},null,8,["alt"])):x("",!0)],8,no))}}),ro=t=>{if(!t)return[];const s=Lt(t,"careSymbol");return co(s)},co=t=>t.sort(({value:s},{value:o})=>s&&o?tt(s)-tt(o):1),tt=t=>{const s=["dry_clean_any_solvent_except_trichloroethylene","dry_clean_petroleum_solvent_only","gentle_dry_clean_any_solvent_except_trichloroethylene","gentle_dry_clean_petroleum_solvent_only","dry_clean","do_not_dry_clean"],o={wash:1,bleach:2,dry:3,iron:4,other:5};return s.includes(t)?Object.keys(o).length+1:/^.*wash.*$/.test(t)?o.wash:/^.*bleach.*$/.test(t)?o.bleach:/^.*dry.*$/.test(t)||/^.*wring.*$/.test(t)?o.dry:/^.*iron.*$/.test(t)?o.iron:o.other},uo=t=>{var w,r,p;const s=(w=H(t,"manufacturerName"))==null?void 0:w.label,o=(r=H(t,"manufacturerAddress"))==null?void 0:r.label,m=(p=H(t,"manufacturerWebsite"))==null?void 0:p.label;return{available:!!(s||o||m),name:s,address:o,website:m}},mo={class:"space-y-4"},po={key:0},fo={key:1},ho={key:2},_o={key:0},go={class:"space-y-4"},vo=["textContent"],yo={class:"space-y-4"},bo={key:0},wo={key:1},ko={key:2},$o={class:"inline-flex space-x-2"},xo={key:0,class:"space-y-4"},Po={key:1},Io={key:0},So=M({__name:"ProductDetails",props:{product:{type:Object,default:()=>null}},setup(t){const s=t,{$i18n:o}=ge(),m=S(()=>{const f=["fitting","upperLength","sleeveLength","shirtCut","bottomLength","trousersCut"],a={};return f.forEach(y=>{var h,k;a[y]=(k=H((h=s.product)==null?void 0:h.attributes,y))==null?void 0:k.label}),a}),b=S(()=>{var f,a,y;return Qe(((y=(a=(f=s.product)==null?void 0:f.advancedAttributes)==null?void 0:a.materialCompositionTextile)==null?void 0:y.values)||[]).map(h=>({materialGroupName:h==null?void 0:h.materialGroupName,values:h==null?void 0:h.values.map(k=>`${k.value}${k.unit} ${k.material}`).join(", ")}))}),w=S(()=>{var f,a,y;return Qe(((y=(a=(f=s.product)==null?void 0:f.advancedAttributes)==null?void 0:a.materialCompositionNonTextile)==null?void 0:y.values)||[]).map(h=>({materialGroupName:h==null?void 0:h.materialGroupName,values:h==null?void 0:h.values.map(k=>`${k.material}`).join(", ")}))}),r=S(()=>{if(s.product&&s.product.attributes)return ro(s.product.attributes)}),p=S(()=>s.product&&ct(s.product)&&us(s.product)),l=S(()=>{var a,y,h,k,v,z,T,L,X,W,j,Q,F,ne,le;const f=(y=(a=s.product)==null?void 0:a.variants)==null?void 0:y.find(E=>{var J,re,ce,I;const Z=H(E.attributes,"wornByModel"),Y=(I=(ce=(re=(J=E==null?void 0:E.advancedAttributes)==null?void 0:J.modelHeight)==null?void 0:re.values)==null?void 0:ce[0].fieldSet)==null?void 0:I[0];return Z&&Y});if(f){const E=(L=(T=(z=(v=(k=(h=f==null?void 0:f.advancedAttributes)==null?void 0:h.modelHeight)==null?void 0:k.values)==null?void 0:v[0].fieldSet)==null?void 0:z[0])==null?void 0:T[0])==null?void 0:L.value,Z=(ne=(F=(Q=(j=(W=(X=f==null?void 0:f.advancedAttributes)==null?void 0:X.modelHeight)==null?void 0:W.values)==null?void 0:j[0].fieldSet)==null?void 0:Q[0])==null?void 0:F[1])==null?void 0:ne.unit,Y=(le=H(f.attributes,"vendorSize"))==null?void 0:le.label;if(Y&&E&&Z){const J=`${E} ${Z}`;return o.t("product_detail.sizeinfo",{modelHeight:J,vendorSize:Y})}}}),P=S(()=>{var f;return uo((f=s.product)==null?void 0:f.attributes)});return(f,a)=>{const y=Ie,h=ao,k=lo;return i(),c("div",{class:N(["mx-auto mt-20 grid max-w-6xl grid-cols-1 gap-10 text-sm",{"md:grid-cols-4":e(P).available,"md:grid-cols-3":!e(P).available}])},[u("div",mo,[d(y,{type:"loud",size:"sm",tag:"h5"},{default:$(()=>[V(_(f.$t("product_info")),1)]),_:1}),u("div",null,[e(m).fitting?(i(),c("p",po,_(f.$t("fitting"))+": "+_(e(m).fitting),1)):x("",!0),e(m).sleeveLength?(i(),c("p",fo,_(f.$t("sleeve_length"))+": "+_(e(m).sleeveLength),1)):x("",!0),e(m).bottomLength?(i(),c("p",ho,_(f.$t("bottom_length"))+": "+_(e(m).bottomLength),1)):x("",!0)]),e(l)?(i(),c("p",_o,_(e(l)),1)):x("",!0)]),u("div",go,[d(y,{type:"loud",size:"sm",tag:"h5"},{default:$(()=>[V(_(f.$t("sustainability")),1)]),_:1}),e(p)?(i(),C(h,{key:0,product:t.product},null,8,["product"])):(i(),c("p",{key:1,textContent:_(f.$t("sustainability_info"))},null,8,vo))]),u("div",yo,[d(y,{type:"loud",size:"sm",tag:"h5"},{default:$(()=>[V(_(f.$t("composition_and_care")),1)]),_:1}),e(b).length?(i(),c("div",bo,[(i(!0),c(O,null,D(e(b),(v,z)=>(i(),c("p",{key:z},_(v.materialGroupName)+": "+_(v.values),1))),128))])):x("",!0),e(w).length?(i(),c("div",wo,[(i(!0),c(O,null,D(e(w),(v,z)=>(i(),c("p",{key:z},_(v.materialGroupName)+": "+_(v.values),1))),128))])):x("",!0),e(r)?(i(),c("div",ko,[u("div",$o,[(i(!0),c(O,null,D(e(r),v=>(i(),C(k,{key:v.id,symbol:v,class:"size-5"},null,8,["symbol"]))),128))])])):x("",!0)]),e(P).available?(i(),c("div",xo,[d(y,{type:"loud",size:"sm",tag:"h5"},{default:$(()=>[V(_(f.$t("manufacturer_info")),1)]),_:1}),u("p",null,[e(P).name?(i(),c(O,{key:0},[u("span",null,_(e(P).name),1),a[0]||(a[0]=u("br",null,null,-1))],64)):x("",!0),e(P).address?(i(),c("span",Po,_(e(P).address),1)):x("",!0)]),e(P).website?(i(),c("p",Io,_(e(P).website),1)):x("",!0)])):x("",!0)],2)}}}),zo={key:1,class:"mb-20"},Co={class:"sm:flex sm:flex-row"},Vo={class:"hidden sm:block"},Ao={class:"container py-4 pb-0 sm:py-4"},Lo={key:"default",class:"flex flex-row"},Oo={class:"w-1/2 space-y-2"},Ro={key:0,class:"text-2xs uppercase tracking-wider"},Do={class:"flex items-center space-x-4"},To={class:"text-right text-xs uppercase text-gray-500"},Mo={class:"space-y-8 bg-white text-center"},Bo={class:"flex justify-center"},Ho={class:"flex flex-col items-center space-y-2"},No={key:0,class:"bg-black px-3 py-1 text-xs text-white"},Eo={key:1,class:"mb-4 text-justify text-sm"},Go={class:"top-16 max-w-md sm:sticky md:w-1/3"},Wo={class:"container sm:mt-4 md:mx-auto"},jo={class:"w-full bg-white sm:py-12 sm:pl-4 sm:pr-2"},Fo={key:0,class:"-mt-10 mb-10 text-xs uppercase tracking-wider"},Uo={class:"mt-4 space-y-8"},qo={key:0,class:"bg-black px-3 py-1 text-xs text-white sm:hidden"},Xo={key:0,class:"mb-4 text-justify text-sm"},Zo={class:"flex flex-col items-center"},Yo={class:"flex w-full"},Jo={class:"hidden sm:block"},Ko={class:"sm:hidden"},Qo={class:"mt-2 hidden text-xs text-gray-700 sm:block"},ea={class:"mt-2 hidden text-sm sm:block"},ta={id:"productDetails",class:"container"},sa={key:0,id:"lookbookProductsSlider",class:"relative mt-20 w-full"},oa={class:"flex justify-between px-5"},Wa=M({name:"PSlug",__name:"[slug]",async setup(t){let s,o;const m=Ot(),{$alert:b,$helpers:w,$i18n:r}=ge(),p=Rt(),{getProductDetailRoute:l,previousRoute:P}=rt(),f=S(()=>{var n,g;return Array.isArray(m.params.slug)?`${m.params.slug.pop()}`:`${((g=(n=m.params.slug)==null?void 0:n.split("-"))==null?void 0:g.pop())||""}`}),{data:a,fetching:y,error:h}=([s,o]=U(()=>ds({key:`product-${f.value}`,params:{id:parseInt(f.value)}})),s=await s,o(),s);if(h.value)throw Dt({...h.value,fatal:!0});const k=S(()=>{var n;return Mt((n=a.value)==null?void 0:n.variants).filter(Boolean)}),{data:v,fetch:z,fetching:T}=([s,o]=U(()=>Je({key:`products-recommendations-${f.value}`,params:{where:{whitelistAttributes:[{key:"ean",type:"attributes",values:k.value}]},sort:{}},options:{autoFetch:!1}})),s=await s,o(),s);k.value.length&&([s,o]=U(()=>z()),await s,o());const L=S(()=>{var g;let n=Bt((g=a.value)==null?void 0:g.attributes,"editedLookbook");return n==="forget_me_not_1"?"forget-me-not":n==="aprs_ski"?"apres-ski":(n&&(n=n.replace(/_/g,"-"),n=n.toLowerCase().split(" ").join("-")),n)}),{data:X,fetch:W,fetching:j}=([s,o]=U(()=>Je({key:`lookbook-products-${f.value}`,params:{category:`/women/lookbooks/${L.value}`,sort:{}},options:{autoFetch:!1}})),s=await s,o(),s);L.value&&([s,o]=U(()=>W()),await s,o());const Q=([s,o]=U(()=>ps()),s=await s,o(),s),F=([s,o]=U(()=>hs()),s=await s,o(),s),{trackViewItem:ne,trackAddToBasket:le,trackViewItemList:E,trackSelectItem:Z,trackAddToWishlist:Y,trackRemoveFromWishlist:J}=ms(),{trackOpenPDP:re,trackAddToCartDL:ce}=_s(),I=R(),ue=R(null),Ve={name:"ADP",id:"ADP"},Ae=S(()=>{var n;return Ze.getVariantWithLowestPrice(((n=a.value)==null?void 0:n.variants)||[])}),ee=S(()=>I.value?Ht(I.value):Ae.value.price),Le=S(()=>{var n,g,A;return((n=I.value)==null?void 0:n.lowestPriorPrice)||((g=Ae.value)==null?void 0:g.lowestPriorPrice)||((A=a.value)==null?void 0:A.lowestPriorPrice)}),ve=S(()=>Nt(a.value)),G=S(()=>{var n,g;return(g=H((n=a.value)==null?void 0:n.attributes,"name"))==null?void 0:g.label}),te=S(()=>{var n;return I.value&&((n=I.value)==null?void 0:n.stock.quantity)===0}),mt=S(()=>{var n,g;return(g=H((n=a.value)==null?void 0:n.attributes,"editedLookbook"))==null?void 0:g.label}),pt=n=>{var g;return n?!!((g=H(n.attributes,"editedOnlineExclusive"))!=null&&g.label):!1},ft=S(()=>a.value?ct(a.value):!1),de=S(()=>{var n,g,A;return Et({isSustainable:ft.value,isSoldOut:(n=a.value)==null?void 0:n.isSoldOut,isOnlineOnly:pt(a.value),isPremium:!!((A=H((g=a.value)==null?void 0:g.attributes,"editedPremium"))!=null&&A.label)})}),ye=S(()=>{var n;return k.value.length?(n=v.value)==null?void 0:n.products:[]}),ht=()=>{var n,g;if(a.value){ne({product:a.value,variant:I.value});const A=((g=(n=P==null?void 0:P.value)==null?void 0:n.meta)==null?void 0:g.pageType)==="category"?"category_page":"other";re(a.value,A)}};ze(()=>{ht()}),gs({title:G.value});const be=R(!1),we=R(!1),_t=()=>{we.value=!0},Oe=()=>{we.value=!1,ue.value=null},ke=R(null),Re=async()=>{var A;if(I.value===void 0){ue.value="choose_size",b.show(r.t("basket.notification.add_basket"),ie.confirm);return}const n=F.count.value;await F.addItem({variantId:I.value.id,quantity:1}),await F.fetch();const g=F.count.value;if(n!==g){const oe=(A=H(I.value.attributes,"vendorSize"))==null?void 0:A.label;a.value&&(le({product:a.value,variant:I.value}),ce(String(I.value.id),"product_detail_page",I.value.price.withoutTax,I.value.price.withTax,I.value.price.currencyCode)),Oe(),b.show(r.t("basket.notification.add_to_cart",{selectedVariantLabel:oe}),ie.route,p(w.route.routes.basket.name))}else b.show(r.t("error_title"),ie.route,p(w.route.routes.basket.name))},se=S(()=>Q.findItem(I.value?{variantId:I.value.id}:{productId:a.value.id})),De=({items:n})=>{E({items:n,listingMetaData:Ve})},Te=(n,g)=>{var A;Z({product:n,category:{...fs(n.categories)},listingMetaData:Ve,index:g,source:`${(A=m.name)==null?void 0:A.toString()}|RecommendationSlider`,soldOut:n.isSoldOut})},Me=()=>{if(!a.value)return;Q.toggleItem(I.value?{variantId:I.value.id}:{productId:a.value.id});const n=se.value,g={product:a.value,variant:I.value};n?J(g):Y(g);const A=n?r.t("wishlist.notification.remove_from_wishlist",{productName:G.value||r.t("wishlist.product")}):r.t("wishlist.notification.add_to_wishlist",{productName:G.value||r.t("wishlist.product")}),oe=n?ie.confirm:ie.route;b.show(A.toString(),oe,n?void 0:p(w.route.routes.wishlist.name))},me=Se({display:!1,image:void 0}),Be=(n,g)=>{me.display=n,me.image=g},He=S(()=>a.value?Ze.disruptGalleryWithVideoItem(Gt.getDetailPageImages(a.value.images),Wt.getDetailPageVideo(f.value),3,f.value):[]),pe=S(()=>!I&&ee.value.appliedReductions.length),gt=S(()=>!vs(L.value)),$e=S(()=>{var n;return((n=X.value)==null?void 0:n.products)||[]});return(n,g)=>{var qe;const A=Ls,oe=Ds,vt=Ce,yt=Es,fe=Ie,Ne=Jt,ae=at,Ee=es,Ge=ts,We=Kt,je=js,bt=is,wt=qs,kt=lt,$t=Qt,he=Tt,xt=Zs,xe=Js,Pt=it,It=ls,Fe=st,Ue=Ks,St=So;return e(y)?(i(),C(A,{key:0})):e(a)?(i(),c("div",zo,[u("div",Co,[d(wt,{"product-name":e(G),"additional-offset":e(ke)&&e(ke).offsetHeight,"gallery-items":e(He)},{default:$(()=>{var B;return[u("div",Vo,[d(Zt,{"enter-class":"translate-y-8 opacity-0","enter-to-class":"translate-0 opacity-100","enter-active-class":"transform transition duration-500 ease-linear",appear:""},{default:$(()=>[d(oe,{"product-name":e(G),"gallery-items":e(He),"onClick:productImage":g[0]||(g[0]=K=>Be(!0,K))},null,8,["product-name","gallery-items"])]),_:1})]),e(me).display?(i(),C(yt,{key:0,images:e(w).image.getDetailPageImages(e(a).images),"clicked-image-hash":(B=e(me).image)==null?void 0:B.hash},{body:$(({image:K,load:Pe})=>[u("div",{onClick:g[1]||(g[1]=aa=>Be(!1,void 0))},[d(vt,{alt:e(G),image:K,load:Pe,class:"cursor-zoom-out",sizes:"sm:100vw md:100vw lg:100vw xl:100vw xxl:100vw 2048:100vw",quality:100},null,8,["alt","image","load"])])]),_:1},8,["images","clicked-image-hash"])):x("",!0),u("div",{id:"mobileStickyMenu",ref_key:"mobileStickyMenu",ref:ke,class:"sticky inset-x-0 bottom-0 z-10 bg-white sm:hidden"},[u("div",Ao,[u("div",Lo,[u("div",Oo,[e(de)?(i(),c("p",Ro,_(n.$t(`badge_labels.${e(de)}`)),1)):x("",!0),d(fe,{size:"2sm"},{default:$(()=>[V(_(e(G)),1)]),_:1}),d(Ne,{class:"mt-6",type:"whisper",price:e(ee),"lowest-prior-price":e(Le),"applied-reductions":e(ee).appliedReductions,"show-price-from":e(pe),"show-price-reduction-badge":e(pe),"show-tax-info":!0,"data-test-id":"product-price"},null,8,["price","lowest-prior-price","applied-reductions","show-price-from","show-price-reduction-badge"])]),u("div",{class:N(["w-1/2 space-y-2 transition-opacity",{"opacity-0":e(be)}])},[u("div",Do,[d(ae,{type:"outline","is-full-width":"",class:"items-center justify-center align-middle","data-test-id":"add-item-to-basket-button",onClick:_t},{default:$(()=>[V(_(n.$t("add_to_cart")),1)]),_:1}),d(ae,{"no-padding":"",type:"ghost",onClick:Me},{icon:$(()=>[e(se)?x("",!0):(i(),C(Ee,{key:0,class:"inline-block size-4","data-test-id":"add-to-wishlist-button"})),e(se)?(i(),C(Ge,{key:1,class:"inline-block size-4","data-test-id":"added-to-wishlist-button"})):x("",!0)]),_:1})]),u("div",To,_(n.$t("additional_colors",{count:e(ve).length-1})),1)],2)])])],512),d(bt,{"is-open":e(we),class:"sm:hidden","onClick:backdrop":Oe},{default:$(()=>{var K;return[u("div",Mo,[u("div",Bo,[d(fe,{size:"lg"},{default:$(()=>[V(_(n.$t("choose_size")),1)]),_:1})]),u("div",Ho,[d(We,{id:e(a).id,modelValue:e(I),"onUpdate:modelValue":g[2]||(g[2]=Pe=>Ye(I)?I.value=Pe:null),class:"justify-center",variants:((K=e(a))==null?void 0:K.variants)||[]},null,8,["id","modelValue","variants"])]),e(ue)==="choose_size"?(i(),c("span",No,_(n.$t("please_choose_size")),1)):x("",!0),e(te)?(i(),c("p",Eo,_(n.$t("newsletter.product_availability.teaser")),1)):x("",!0),e(I)&&e(te)?(i(),C(je,{key:2,"product-id":e(a).id,"variant-id":e(I).id},null,8,["product-id","variant-id"])):(i(),C(ae,{key:3,type:"primary","is-full-width":"",onClick:Re},{default:$(()=>[V(_(n.$t("add_to_cart")),1)]),_:1}))])]}),_:1},8,["is-open"])]}),_:1},8,["product-name","additional-offset","gallery-items"]),u("div",Go,[u("div",Wo,[u("div",jo,[e(de)?(i(),c("p",Fo,_(n.$t(`badge_labels.${e(de)}`)),1)):x("",!0),u("div",Uo,[d(fe,{size:"2xl",class:"mt-4 hidden sm:block","data-test-id":"pdp-product-name"},{default:$(()=>[V(_(e(G)),1)]),_:1}),d(Ne,{class:"hidden sm:block",price:e(ee),"lowest-prior-price":e(Le),"applied-reductions":e(ee).appliedReductions,type:"whisper","show-price-from":e(pe),"show-price-reduction-badge":e(pe),"show-tax-info":!0,"data-test-id":"product-price"},null,8,["price","lowest-prior-price","applied-reductions","show-price-from","show-price-reduction-badge"]),d(xe,{headline:{tag:"div",size:"sm"}},{headline:$(()=>[V(_(n.$t("color"))+" – ",1),d(kt,{items:e(ve)[0].colors},null,8,["items"])]),default:$(()=>[d(xt,{items:e(ve)},{item:$(({item:B})=>[d(he,{class:N(["flex items-center justify-center pb-1",{"border-b border-black":B.id===e(a).id,"border-b border-transparent":B.id!==e(a).id}]),to:e(l)(e(a),B.id)},{default:$(()=>[d($t,{size:"lg",color:B.colors[0]},null,8,["color"])]),_:2},1032,["class","to"])]),_:1},8,["items"])]),_:1}),d(xe,{class:"text-sm"},{headline:$(()=>[V(_(n.$t("choose_size")),1)]),default:$(()=>[d(We,{id:e(a).id,modelValue:e(I),"onUpdate:modelValue":g[3]||(g[3]=B=>Ye(I)?I.value=B:null),variants:e(a).variants||[]},null,8,["id","modelValue","variants"]),e(ue)==="choose_size"?(i(),c("span",qo,_(n.$t("please_choose_size")),1)):x("",!0)]),_:1}),u("div",null,[e(te)?(i(),c("p",Xo,_(n.$t("newsletter.product_availability.teaser")),1)):x("",!0),u("div",Zo,[e(te)&&e(I)?(i(),C(je,{key:0,"product-id":e(a).id,"variant-id":(qe=e(I))==null?void 0:qe.id,class:"w-full"},null,8,["product-id","variant-id"])):x("",!0),d(Pt,{class:"w-full",onEnter:g[4]||(g[4]=B=>be.value=!0),onLeave:g[5]||(g[5]=B=>be.value=!1)},{default:$(()=>[u("div",Yo,[e(te)?x("",!0):(i(),C(ae,{key:0,type:"primary","no-padding":"",class:"mr-4 w-full px-6 sm:w-2/3","data-test-id":"add-item-to-basket-button",onClick:Re},{default:$(()=>[u("span",Jo,_(n.$t("add_to_cart__long")),1),u("span",Ko,_(n.$t("add_to_cart")),1)]),_:1})),d(ae,{type:"ghost","no-padding":"",onClick:Me},{icon:$(()=>[e(se)?x("",!0):(i(),C(Ee,{key:0,class:"inline-block size-4","data-test-id":"add-to-wishlist-button"})),e(se)?(i(),C(Ge,{key:1,class:"inline-block size-4","data-test-id":"added-to-wishlist-button"})):x("",!0)]),_:1})])]),_:1})]),u("div",Qo,[d(It,{type:"pdp"})]),u("div",ea,[d(he,{to:{hash:"#productDetails"}},{default:$(()=>[V(_(n.$t("product_info"))+" ",1),d(Fe,{class:"ml-2 mr-4 inline-block size-1.5",icon:"UiDropdown"})]),_:1}),d(he,{to:{hash:"#productDetails"}},{default:$(()=>[V(_(n.$t("care_instructions"))+" ",1),d(Fe,{class:"ml-2 inline-block size-1.5",icon:"UiDropdown"})]),_:1})])]),e(ye)&&e(ye).length?(i(),C(xe,{key:0,margin:"xl",headline:{tag:"div",size:"sm"}},{headline:$(()=>[V(_(n.$t("product_recommendation")),1)]),default:$(()=>[d(Ue,{products:e(ye),loading:e(T),size:"4xs","is-lookbook-products":"","onIntersect:column":De,"onClick:recommendation":Te},null,8,["products","loading"])]),_:1})):x("",!0)])])])])]),u("div",ta,[d(St,{product:e(a)},null,8,["product"])]),e(gt)&&e($e)&&e($e).length?(i(),c("div",sa,[u("div",oa,[d(fe,{type:"loud",tag:"h3"},{default:$(()=>[V(_(n.$t("product_detail.more_lookbook_products",{label:e(mt)})),1)]),_:1}),d(he,{class:"text-sm underline",to:`/women/lookbooks/${e(L)}`},{default:$(()=>[V(_(n.$t("product_detail.go_to_lookbook")),1)]),_:1},8,["to"])]),d(Ue,{class:"mt-4 px-5",size:"xs",products:e($e),loading:e(j),"is-lookbook-products":"","onIntersect:column":De,"onClick:recommendation":Te},null,8,["products","loading"])])):x("",!0)])):x("",!0)}}});export{Wa as default};