"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[61],{206:(r,e,a)=>{var i=a(0),s=a(1),c=a(210),t=a(2),n=a(10);function l(r){return e=>{e.on("animationStarted",(()=>{const a=e.track.details.minIdx,i=e.track.details.maxIdx,s=e.animator.targetIdx||0;r({min:a,max:i,current:s})}))}}const o={priceColor:"#000000",grayscaleColor:"#000000",regularPriceColor:"#000000",redPriceColor:"#B70111"},{wrapper:d,wrapperBiggerFont:p,wrapperTitle:u,wrapperCrossedPrice:m,wrapperImageContainer:x,wrapperPricesContainer:g,wrapperPricesContainerActualPrice:h,wrapperPricesContainerComparePrice:b,wrapperPricesContainerActualPriceFrom:j}={wrapper:"XVE4a_x6",wrapperBiggerFont:"UZD5BLPz",wrapperTitle:"KnBlmDgn",wrapperPricesContainer:"porhBVvV",wrapperPricesContainerActualPrice:"X_cnGBX7",wrapperPricesContainerComparePrice:"kJ1Jk066",wrapperPricesContainerActualPriceFrom:"opxcR35r",wrapperCrossedPrice:"q9v2TRya",wrapperImageContainer:"zsq43s5w"},v=({product:{productTitle:r,productLink:e,reviewsRating:a,featuredImage:s,variants:n},currencySymbol:l="$"})=>{const{maxComparePrice:v,maxVariantPrice:w}=(r=>{var e,a;let i=0,s=0;const c=r.sort(((r,e)=>Number(r.price)-Number(e.price))),t=r.sort(((r,e)=>(r.crossedPrice?Number(r.crossedPrice):Number(r.price))-(e.crossedPrice?Number(e.crossedPrice):Number(e.price))));return c.length>0&&(i=Number(null===(e=c[0])||void 0===e?void 0:e.price)),t.length>0&&(s=Number(null===(a=t[0])||void 0===a?void 0:a.crossedPrice)),{maxVariantPrice:i,maxComparePrice:s}})(n),C=(r=>!(!Array.isArray(r)||0===r.length)&&(0,t.useMemo)((()=>{var e,a,i;if(1===r.length)return!1;const s=parseFloat(null!==(a=null===(e=r[0])||void 0===e?void 0:e.price)&&void 0!==a?a:"");if(isNaN(s))return!1;let c=!1;for(const e of r){const r=parseFloat(null!==(i=e.price)&&void 0!==i?i:"");if(!isNaN(r)&&r!==s){c=!0;break}}return c}),[r.length]))(n),P=n.map((r=>Number(r.price))),N=Math.min(...P),{currentVariantId:f}=(r=>{var e,a;const i=r.map((r=>({variantId:r.variantId,colorUrl:r.colorUrl,colorValue:r.colorValue,colorSwatch:r.colorSwatch,isValidUrl:r.isValidUrl}))),[s,c]=(0,t.useState)(i[0]?null===(e=i[0])||void 0===e?void 0:e.colorValue:""),[n,l]=(0,t.useState)(i[0]?null===(a=i[0])||void 0===a?void 0:a.variantId:"");return{colors:[...new Map(i.map((r=>[r.colorValue,r]))).values()],currentColor:s,currentVariantId:n,setCurrentVariantId:l,setCurrentColor:c}})(n),[y,O]=(0,t.useState)(s);(0,t.useEffect)((()=>{O((()=>{const r=n.find((r=>r.variantId===f));return r?r.image:s}))}),[f]);const k=v!==w,S=Object.assign({},o),V=`${e}?variant=${f}`;return(0,i.jsxs)("div",Object.assign({className:d},{children:[(0,i.jsx)("a",Object.assign({href:V},{children:(0,i.jsx)("div",Object.assign({className:x},{children:(0,i.jsx)("img",{width:13,height:18,src:y.src,alt:y.alt})}))})),(0,i.jsx)("div",{children:(0,i.jsxs)("div",{children:[(0,i.jsx)("p",Object.assign({className:u},{children:r})),C&&(0,i.jsx)("div",Object.assign({className:g},{children:(0,i.jsx)("p",Object.assign({className:j},{children:`From ${l}${N.toFixed(2)}`}))})),!C&&(0,i.jsxs)("div",Object.assign({className:g},{children:[k&&(0,i.jsx)("p",Object.assign({className:(0,c.a)(b,m),style:{color:S.regularPriceColor}},{children:`${l}${v.toFixed(2)}`})),(0,i.jsx)("p",Object.assign({className:(0,c.a)(h,!k&&p),style:{color:k?S.redPriceColor:S.grayscaleColor}},{children:` ${l}${w.toFixed(2)}`}))]}))]})})]}))};var w=a(4);const C={initial:0,mode:"free",slides:{perView:2.5},breakpoints:{"(min-width: 794px)":{slides:{perView:3.5}},"(min-width: 990px)":{slides:{perView:5}}},loop:!1},{wrapper:P,wrapperTitle:N,arrowLeft:f,arrowRight:y,disable:O}={wrapper:"Cdjy91o4",wrapperTitle:"Uewe5ukr",arrowLeft:"DWwxLDym",arrowRight:"lnpvxOJp",disable:"hmcTl94H"},k=({title:r,slides:e,currencySymbol:a})=>{const{carouselRef:s,isJsDisabled:o,handleSlideNext:d,handleSlidePrev:p,slideIdx:{current:u,min:m,max:x}}=function(r){const[e,a]=(0,t.useState)(!0),[i,s]=(0,t.useState)({min:0,max:1,current:0}),[c,o]=(0,n.a)(r,[l(s)]);var d,p;(0,t.useEffect)((d=o,p=r,()=>(d.current&&d.current.update(Object.assign({},p)),()=>{d.current&&d.current.destroy()})),[o.current]);const u=(0,t.useCallback)((r=>{r.stopPropagation(),o.current&&o.current.prev()}),[o.current]),m=(0,t.useCallback)((r=>{r.stopPropagation(),o.current&&o.current.next()}),[o.current]);return(0,t.useEffect)((()=>{a(!1)}),[]),{carouselRef:c,handleSlideNext:m,handleSlidePrev:u,isJsDisabled:e,instanceRef:o,slideIdx:i}}(C);return(0,i.jsxs)("div",Object.assign({className:(0,c.a)(P,o&&"noJsProductSlider")},{children:[(0,i.jsx)("h3",Object.assign({className:N},{children:r})),(0,i.jsx)("a",Object.assign({className:(0,c.a)(f,u===m?O:""),onClick:p},{children:(0,i.jsx)(w.C,{})})),(0,i.jsx)("a",Object.assign({className:(0,c.a)(y,u===x?O:""),onClick:d},{children:(0,i.jsx)(w.D,{})})),(0,i.jsx)("div",Object.assign({ref:s,class:(0,c.a)("keen-slider")},{children:e.length>0&&e.map(((r,e)=>(0,i.jsx)("div",Object.assign({className:`keen-slider__slide number-slide${e}`},{children:(0,i.jsx)(v,{currencySymbol:a,product:r},r.productTitle)}),r.productTitle)))}))]}))};(0,a(3).createEntrypoint)("shipping-policy-slider",(r=>(0,i.jsx)(s.Fragment,{children:(0,i.jsx)(k,Object.assign({},r.products,{currencySymbol:r.currencySymbol}))})))}},r=>{r.O(0,[1,2,3,4,5,6],(()=>(206,r(r.s=206)))),r.O()}]);