whatmore-react-assets 1.0.1628 → 1.0.1629

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatmore-react-assets",
3
- "version": "1.0.1628",
3
+ "version": "1.0.1629",
4
4
  "description": "public repo for all whatmore js and css assets",
5
5
  "main": "whatmore.js",
6
6
  "scripts": {
@@ -116,7 +116,7 @@
116
116
  100% {
117
117
  transform: translateY(0%) rotate(0deg);
118
118
  }
119
- `} infinite 1.5s linear`;return(0,f.jsx)(c.az,{width:"100%",height:"fit-content",paddingTop:100,borderRadius:"3xl",children:(0,f.jsxs)(u.B,{direction:"column",width:"100%",height:"0px",justifyContent:"flex-end",children:[(0,f.jsx)(s.o,{animation:"vertical"===h?w:y,children:"vertical"===h?(0,f.jsx)(L.A,{sx:{color:"white !important",fontSize:m,filter:"drop-shadow(0 0 20px black);"}}):(0,f.jsx)(B.A,{sx:{color:"white !important",fontSize:m,filter:"drop-shadow(0 0 20px black);"}})}),(0,f.jsx)(s.o,{children:(0,f.jsx)(j.E,{textShadow:"dark-lg",fontSize:g+"px",fontWeight:"semibold",sx:{color:"white !important",textShadow:"0px 0px 20px black !important;"},children:"swipe for more"})})]})})};var D=function(t){const[e,i]=(0,v.QN)("isFirstIndicatorRenderDone"),[o]=(0,v.QN)("indicatorRenderSeconds"),r=o,l=t.swipeUp;return(0,n.useEffect)((()=>{const t=setTimeout((()=>{i(!0)}),3e3+1e3*r);return()=>{clearTimeout(t)}}),[]),e?null:(0,f.jsx)(O,{showForSeconds:.8*r,delayInSeconds:3,swipeUp:l})},R=i(8781),W=i(5144),V=i(4459);const Q="15px";var M=i(1351),H=i(6157),U=i(5551);var X=function(t){const[e]=(0,v.QN)("isInDesignMode"),[i]=(0,v.QN)("isDemoBrand"),[o]=(0,v.QN)("whatmoreSecondaryColor"),[r]=(0,v.QN)("whatmorePrimaryFont"),[a]=(0,v.QN)("whatmoreShopId"),[d,h,m,g]=(0,x.A)(),[w,y]=(0,n.useState)(!1),b=t.product,C=t.event,{whatmoreWidgetSourceDetails:S}=(0,n.useContext)(U.B),k=.1*m,I=.95*g,_=.05*g;return(0,f.jsx)(u.B,{direction:"row",height:k,justifyContent:"center",alignItems:"center",alignContent:"center",bgGradient:"linear(to-b, transparent, blackAlpha.400, blackAlpha.600)",children:(0,f.jsx)(u.B,{direction:"column",width:"fit-content",height:k,justifyContent:"center",alignItems:"center",alignContent:"center",children:(0,f.jsx)(c.az,{width:I+"px",height:"fit-content",padding:"6px",marginTop:Q,backgroundColor:o,borderRadius:"5px",animation:w?W.jd:null,onAnimationEnd:()=>{y(!1)},marginBottom:(0,p.qw1)(a),onClick:()=>{y(!0),function(t,n){e||i||(async()=>{(0,l.Pb)(t,n),(0,M.kz)({userInteractionType:H.O.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:S,event:t,productList:[n],ctaList:t.cta})})()}(C,b),window.location.href=function(t){return(0,p.BLb)(a)?t.product_link+"?"+(0,p.VCz)(a)+"&"+(0,p.Spk)(a)+"&"+(0,p.$lz)(a):t.product_link}(b)},_hover:{backgroundColor:(0,V.YU)(o,8)},cursor:"pointer",children:(0,f.jsx)(s.o,{children:(0,f.jsx)(j.E,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*_+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:r+" !important",color:"white !important"},children:(0,p.Qed)(a)})})})})})},Y=i(4892),$=i(8538),q=i(7458),K=i(2159),G=i(9537),Z=i(173),J=(i(6125),i(4905));const tt={en:{add_to_cart:"ADD TO CART",buy_now:"BUY NOW",more_info:"MORE INFO",size:"Size",color:"Color",description:"Description",like:"Like",share:"Share",talk_to_us:"Talk to Us",done:"Done",cancel:"Cancel",view_product:"View Product",go_to_cart:"Go to Cart",shop_now:"SHOP NOW"},ar:{add_to_cart:"\u0623\u0636\u0641 \u0625\u0644\u0649 \u0627\u0644\u0633\u0644\u0629",buy_now:"\u0627\u0634\u062a\u0631\u0650 \u0627\u0644\u0622\u0646",more_info:"\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a",size:"\u0627\u0644\u062d\u062c\u0645",color:"\u0627\u0644\u0644\u0648\u0646",description:"\u0627\u0644\u0648\u0635\u0641",like:"\u0623\u0639\u062c\u0628\u0646\u064a",share:"\u0645\u0634\u0627\u0631\u0643\u0629",talk_to_us:"\u062a\u062d\u062f\u062b \u0625\u0644\u064a\u0646\u0627",done:"\u062a\u0645",cancel:"\u0625\u0644\u063a\u0627\u0621",view_product:"\u0639\u0631\u0636 \u0627\u0644\u0645\u0646\u062a\u062c",go_to_cart:"\u0627\u0630\u0647\u0628 \u0625\u0644\u0649 \u0627\u0644\u0633\u0644\u0629",watch_and_buy:"\u0634\u0627\u0647\u062f \u0648\u0627\u0634\u062a\u0631\u064a"},da:{add_to_cart:"In den Warenkorb",buy_now:"Jetzt kaufen",more_info:"Mehr Infos",size:"Gr\xf6\xdfe",color:"Farbe",description:"Beschreibung",like:"Gef\xe4llt mir",share:"Teilen",talk_to_us:"Sprechen Sie mit uns",done:"Fertig",cancel:"Abbrechen",view_product:"Produkt ansehen",go_to_cart:"Zum Warenkorb",watch_and_buy:"Ansehen und kaufen"},de:{add_to_cart:"In den Warenkorb",buy_now:"Jetzt kaufen",more_info:"Mehr Infos",size:"Gr\xf6\xdfe",color:"Farbe",description:"Beschreibung",like:"Gef\xe4llt mir",share:"Teilen",talk_to_us:"Sprechen Sie mit uns",done:"Fertig",cancel:"Abbrechen",view_product:"Produkt ansehen",go_to_cart:"Zum Warenkorb",watch_and_buy:"Ansehen und kaufen"},es:{add_to_cart:"A\xf1adir al carrito",buy_now:"Comprar ahora",more_info:"M\xe1s informaci\xf3n",size:"Tama\xf1o",color:"Color",description:"Descripci\xf3n",like:"Me gusta",share:"Compartir",talk_to_us:"Habla con nosotros",done:"Hecho",cancel:"Cancelar",view_product:"Ver producto",go_to_cart:"Ir al carrito",watch_and_buy:"Ver y comprar"},fr:{add_to_cart:"Ajouter au panier",buy_now:"Acheter maintenant",more_info:"Plus d'infos",size:"Taille",color:"Couleur",description:"Description",like:"J'aime",share:"Partager",talk_to_us:"Parlez-nous",done:"Valider",cancel:"Annuler",view_product:"Voir le produit",go_to_cart:"Aller au panier",watch_and_buy:"Regarder et acheter"},ja:{add_to_cart:"\u30ab\u30fc\u30c8\u306b\u8ffd\u52a0",buy_now:"\u4eca\u3059\u3050\u8cfc\u5165",more_info:"\u8a73\u7d30\u60c5\u5831",size:"\u30b5\u30a4\u30ba",color:"\u8272",description:"\u8aac\u660e",like:"\u3044\u3044\u306d",share:"\u5171\u6709",talk_to_us:"\u304a\u554f\u3044\u5408\u308f\u305b",done:"\u5b8c\u4e86",cancel:"\u30ad\u30e3\u30f3\u30bb\u30eb",view_product:"\u5546\u54c1\u3092\u898b\u308b",go_to_cart:"\u30ab\u30fc\u30c8\u306b\u9032\u3080",watch_and_buy:"\u8996\u8074\u3057\u3066\u8cfc\u5165",shop_now:"\u5546\u54c1\u3092\u898b\u308b"},nl:{add_to_cart:"Aan winkelwagentje toevoegen",buy_now:"Nu kopen",more_info:"Meer informatie",size:"Maat",color:"Kleur",description:"Beschrijving",like:"Vind ik leuk",share:"Delen",talk_to_us:"Praat met ons",done:"Klaar",cancel:"Annuleren",view_product:"Bekijk product",go_to_cart:"Ga naar winkelwagentje",watch_and_buy:"Kijk en koop"},pt:{add_to_cart:"Adicionar ao carrinho",buy_now:"Comprar agora",more_info:"Mais informa\xe7\xf5es",size:"Tamanho",color:"Cor",description:"Descri\xe7\xe3o",like:"Curtir",share:"Compartilhar",talk_to_us:"Fale conosco",done:"Conclu\xeddo",cancel:"Cancelar",view_product:"Ver produto",go_to_cart:"Ir para o carrinho",watch_and_buy:"Assistir e comprar"},zh:{add_to_cart:"\u52a0\u5165\u8d2d\u7269\u8f66",buy_now:"\u7acb\u5373\u8d2d\u4e70",more_info:"\u66f4\u591a\u4fe1\u606f",size:"\u5c3a\u5bf8",color:"\u989c\u8272",description:"\u63cf\u8ff0",like:"\u559c\u6b22",share:"\u5206\u4eab",talk_to_us:"\u8054\u7cfb\u6211\u4eec",done:"\u5b8c\u6210",cancel:"\u53d6\u6d88",view_product:"\u67e5\u770b\u5546\u54c1",go_to_cart:"\u524d\u5f80\u8d2d\u7269\u8f66",watch_and_buy:"\u89c2\u770b\u5e76\u8d2d\u4e70"}};function et(t){var e,i,o;const[r]=(0,v.QN)("whatmoreSecondaryColor"),[l]=(0,v.QN)("whatmorePrimaryFont"),[a]=(0,v.QN)("whatmoreShopId"),[d,s]=(0,n.useState)(!1),h=null!==(e=t.baseFontSize)&&void 0!==e?e:10,x=t.onClick,m=t.width,g=t.height,w=t.title,y=t.showInProgressIcon;return(0,f.jsxs)(c.az,{display:"flex",width:m,height:g,padding:"2x",boxShadow:"lg",animation:d?W.jd:null,onAnimationEnd:()=>{s(!1)},cursor:"pointer",children:["awaitingVariantSelection"==t.cartState&&(0,f.jsx)(u.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",backgroundColor:"white",onClick:e=>{e.stopPropagation(),t.updateCartState("init"),t.setProductVariantTitle(t.productTitle),s(!0)},children:(0,f.jsxs)(j.E,{lineHeight:"100%",fontSize:1.4*h+"px !important",fontWeight:"semibold !important",sx:{fontFamily:l+" !important",color:"#343434 !important"},children:["\xa0",null!==(i=null===tt||void 0===tt||null===(o=tt[null===t||void 0===t?void 0:t.websiteLanguage])||void 0===o?void 0:o.cancel)&&void 0!==i?i:"Cancel","\xa0"]})}),(0,f.jsxs)(u.B,{direction:"row",backgroundColor:y?(0,V.YU)(r,8):r,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",onClick:t=>{t.stopPropagation(),x(),s(!0)},children:[(0,f.jsxs)(j.E,{lineHeight:"100%",fontSize:1.4*h+"px !important",fontWeight:"semibold !important",sx:{fontFamily:l+" !important",color:(0,p.Hfu)(a)+" !important"},children:["\xa0",w,"\xa0"]}),y?(0,f.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,f.jsx)(Z.A,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*h+"px"}})}):(0,f.jsx)(f.Fragment,{})]})]})}function it(t){var e,i,o;const[r]=(0,v.QN)("whatmoreSecondaryColor"),[l]=(0,v.QN)("whatmorePrimaryFont"),[a]=(0,v.QN)("whatmoreShopId"),[d,h]=(0,n.useState)(!1),x=null!==(e=t.baseFontSize)&&void 0!==e?e:10,m=t.onClick,g=t.width,w=t.height;return(0,f.jsx)(c.az,{width:g,height:w,padding:"2x",boxShadow:"lg",backgroundColor:"#000000"==(0,p.Wc_)(a)?r:(0,p.Wc_)(a),onClick:t=>{t.stopPropagation(),m(),h(!0)},animation:d?W.jd:null,onAnimationEnd:()=>{h(!1)},cursor:"pointer",children:(0,f.jsx)(u.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",children:(0,f.jsx)(s.o,{children:(0,f.jsxs)(j.E,{lineHeight:"100%",fontSize:1.4*x+"px !important",fontWeight:"semibold !important",sx:{fontFamily:l+" !important",color:(0,p.Hfu)(a)+" !important"},children:["\xa0","ADD TO CART"!=(0,p.KPq)(a)?(0,p.KPq)(a):null!==(i=null===tt||void 0===tt||null===(o=tt[null===t||void 0===t?void 0:t.websiteLanguage])||void 0===o?void 0:o.add_to_cart)&&void 0!==i?i:(0,p.KPq)(a),"\xa0"]})})})})}function nt(t){var e;const[i]=(0,v.QN)("whatmorePrimaryFont"),n=null!==(e=t.baseFontSize)&&void 0!==e?e:10,o=t.width,r=t.height;return(0,f.jsx)(c.az,{width:o,height:r,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:"gray",borderWidth:"1px",onClick:t=>{t.stopPropagation()},children:(0,f.jsx)(u.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:(0,f.jsxs)(j.E,{color:"gray",lineHeight:"100%",fontSize:1.3*n+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:"gray !important"},children:["\xa0"," Sold Out ","\xa0"]})})})}function ot(t){var e;const[i]=(0,v.QN)("whatmoreSecondaryColor"),[n]=(0,v.QN)("whatmorePrimaryFont"),[o]=(0,v.QN)("whatmoreShopId"),r=null!==(e=t.baseFontSize)&&void 0!==e?e:10,l=t.onClick,a=t.cartCount,d=t.width,h=t.height,x=t.onCartIconClick;return(0,f.jsx)(c.az,{width:d,height:h,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:i,borderWidth:"1px",onClick:t=>{t.stopPropagation()},cursor:"pointer",children:(0,f.jsxs)(u.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:[(0,f.jsx)(s.o,{paddingX:"5px",onClick:()=>{x()},children:(0,p.DiI)(o)?(0,f.jsx)(J.$,{size:"sm",_hover:{bg:i},sx:{bg:i},children:(0,f.jsx)(j.E,{paddingX:"6px",color:"white",sx:{fontSize:.85*r},children:"GO TO CART"})}):(0,f.jsx)(G.A,{sx:{color:i,fontSize:1.6*r}})}),(0,f.jsx)(j.E,{color:i,fontSize:1.3*r+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important"},children:a}),(0,f.jsx)(s.o,{paddingX:"5px",onClick:t=>{t.stopPropagation(),l()},children:(0,f.jsx)(K.A,{sx:{color:i,fontSize:1.6*r}})})]})})}var rt=function(t){var e,i,n,o,r,l,a;const[d]=(0,v.QN)("websiteLanguage"),s=null!==(e=t.baseFontSize)&&void 0!==e?e:10,c=null===(i=t.showAddedToCart)||void 0===i||i,u=t.cartState,h=t.cartCount,p=t.onClickAtc,x=t.onCartIconClick;function m(){p()}const g=null!==(n=t.width)&&void 0!==n?n:"100%",w=null!==(o=t.height)&&void 0!==o?o:"100%";return"errored"==u?(0,f.jsx)(nt,{baseFontSize:s,width:g,height:w}):"init"==u?0==h?(0,f.jsx)(it,{onClick:m,baseFontSize:s,width:g,height:w,websiteLanguage:d}):c?(0,f.jsx)(ot,{onClick:m,baseFontSize:s,cartCount:h,width:g,height:w,onCartIconClick:x}):(0,f.jsx)(it,{onClick:m,baseFontSize:s,width:g,height:w,websiteLanguage:d}):(0,f.jsx)(et,{onClick:m,setProductVariantTitle:t.setProductVariantTitle,cartState:u,productTitle:null===(r=t.product)||void 0===r?void 0:r.title,updateCartState:t.updateCartState,baseFontSize:s,width:g,height:w,title:"awaitingVariantSelection"==u?null!==(l=null===tt||void 0===tt||null===(a=tt[d])||void 0===a?void 0:a.done)&&void 0!==l?l:"Done":"",showInProgressIcon:"atcApiCallInProgress"==u||"productVariantDetailsApiCallInProgress"==u,websiteLanguage:d})},lt=i(4533),at=i(6051),dt=i(1745);const st=(0,v.Xd)("isInDesignMode"),ct=(0,v.Xd)("isDemoBrand");async function ut(t,e,i,n,o,r,l,a,d){return"shopify"==i?(0,dt.RX)(t,e,n,l,a,d):(st||ct||(async()=>{(0,lt.Fu)(o,r,l,a,d)})(),(0,at.It)(null===t||void 0===t?void 0:t[0],e,n))}function ht(t,e){return"shopify"==t?(0,dt.iL)(e):(0,at.pV)(e)}var pt=i(852);var vt=function(t,e,i){const[o]=(0,v.QN)("whatmoreShopId"),[r]=(0,v.QN)("isInDesignMode"),[a]=(0,v.QN)("isDemoBrand"),[d,s]=(0,n.useState)(null),c=(0,n.useRef)(null),{closeClickComponent:u}=(0,n.useContext)(_i),{whatmoreUserInfo:h}=(0,n.useContext)(U.B),[x,g]=(0,n.useState)({state:"init",cart_count:t});function f(t,e){g({state:t,cart_count:null!==e&&void 0!==e?e:x.cart_count}),"init"!=t&&"errored"!=t?(0,v.t2)("whatmoreAllowAutoSlide",!1):(0,v.t2)("whatmoreAllowAutoSlide",!0)}function w(t){const e=c.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));return 0==e.length?null:e[0].id}function j(t){var e=[],i=[],n=[];return t.variants.forEach((o=>{var r,l,a;o.option1&&e.push({option:o.option1,available:null===(r=o.available)||void 0===r||r,type:t.options[0].name}),o.option2&&i.push({option:o.option2,available:null===(l=o.available)||void 0===l||l,type:t.options[1].name}),o.option3&&n.push({option:o.option3,available:null===(a=o.available)||void 0===a||a,type:t.options[2].name})})),e=e.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),i=i.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),n=n.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),[e,i,n]}function y(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}function b(t){return t[0].length<=1&&t[1].length<=1&&t[2].length<=1}function C(){if(c.current&&c.current.length>=1){return c.current.filter((t=>t.available)).length>=1}return!1}function S(t,e,i){r||a||(async()=>{(0,l.tO)(t,e,i)})()}function k(t,n){const r=w(t);if(!r)return void f("init",x.cart_count);f("atcApiCallInProgress",null);ut([r],1,(0,p.NCy)(o),o,i,e,n,null===i||void 0===i?void 0:i.location,null===h||void 0===h?void 0:h.userType).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(S(i,e,1),f("init",x.cart_count+1),(0,v.t2)("whatmoreAddedToCart",!0),"72550089015"!=o&&"24366857"!=o&&"68234805419"!=o&&"86879863060"!=o||!(0,v.Xd)("whatmoreAddedToCart")||(0,pt.initiateCartSliderEvent)(o,(()=>{}),100,window.location.hostname,r),(0,p.MPe)(o)&&setTimeout((()=>function(){const t=window.location.origin+"/cart";window.location.href=t}()),500),t))).catch((t=>{f("errored",null),console.error("Error while adding to cart:",t)}))}return[x,function(t){const n=[];f("productVariantDetailsApiCallInProgress",null),Promise.all(i.products.map((t=>(0,m.M)(t,(0,p.NCy)(o),o).then((e=>{c.current=e.variants;const i=j(e);if(s(i),b(i)&&C()){const e=w([y(i[0]),y(i[1]),y(i[2])]);return e?(n.push(t),e):void f("init",x.cart_count)}}))))).then((r=>{const l=r.filter((t=>void 0!=t));ut(l,1,(0,p.NCy)(o),o,i,e,t,null===i||void 0===i?void 0:i.location,null===h||void 0===h?void 0:h.userType).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(n.forEach((t=>{S(i,t,1)})),f("init",x.cart_count+(null===l||void 0===l?void 0:l.length)),(0,v.t2)("whatmoreAddedToCart",!0),t))).catch((t=>{f("errored",null),console.error("Error while adding to cart:",t)}))}))},f,d,function(t,i=!1){f("productVariantDetailsApiCallInProgress",null),(0,m.M)(e,(0,p.NCy)(o),o).then((e=>{c.current=e.variants;const n=j(e);s(n),b(n)||i?C()?k([y(n[0]),y(n[1]),y(n[2])],t):f("errored",null):f("awaitingVariantSelection",null)})).catch((t=>{f("errored",null)}))},k,function(t){var e,i,n,r;const l=c.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));if(0==l.length)return null;const a=null!==(e=l[0].price)&&void 0!==e?e:0,d=null!==(i=l[0].compare_at_price)&&void 0!==i?i:0;return{price:((0,p.NCy)(o),a),compare_price:((0,p.NCy)(o),d),title:null!==(n=null===(r=l[0])||void 0===r?void 0:r.title)&&void 0!==n?n:""}},function(){"do_nothing"!==(0,p.m4S)(o)&&("go_to_cart_page"!==(0,p.m4S)(o)?"open_cart_slider"!==(0,p.m4S)(o)||null!==u&&u():ht((0,p.NCy)(o),o))}]},xt=i(2720),mt=i(3755),gt=i(7973);var ft=function(t){var e,i,o;const r=t.productVariantOptions,l=null!==(e=t.width)&&void 0!==e?e:"100%",a=(t.height,t.maxHeight),d=null!==(i=t.baseFontSize)&&void 0!==i?i:10,h=t.onOptionSelected,p=null!==(o=t.optionTitleColor)&&void 0!==o?o:"black",x=t.data,[m]=(0,v.QN)("whatmorePrimaryFont"),g=(0,n.useRef)(null),[w,b]=(0,n.useState)(!1),[C,S]=(0,n.useState)(0),[k,I]=(0,n.useState)(0);function _(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}const[z,E]=(0,n.useState)([_(r[0]),_(r[1]),_(r[2])]);return(0,n.useEffect)((()=>{h(z)}),[z]),(0,f.jsx)(u.B,{ref:g,direction:"column",width:l,maxHeight:a,justifyContent:"flex-start",alignItems:"center",spacing:"2px",paddingY:"2px",overflowY:"auto",onTouchStart:t=>{g.current&&(b(!0),S(t.touches[0].clientY),I(g.current.scrollTop))},onTouchMove:t=>{if(!w||!g.current)return;const e=t.touches[0].clientY,i=1.5*(C-e);g.current.scrollTop=k+i,t.preventDefault()},onTouchEnd:()=>{b(!1)},onWheel:t=>{if(!g.current)return;let e=0===t.deltaMode?1:15;g.current.scrollTop+=t.deltaY*e},sx:{"&::-webkit-scrollbar":{width:"4px"},"&::-webkit-scrollbar-track":{width:"6px",background:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{background:"#888",borderRadius:"24px"},"&::-webkit-scrollbar-thumb:hover":{background:"#555"},"overflow-y":"scroll !important","-webkit-overflow-scrolling":"touch"},children:r.map(((e,i)=>{var n;if(0==e.length||"mlveda_country"==(null===e||void 0===e||null===(n=e[0])||void 0===n?void 0:n.type))return;const o=e.every((e=>{var i,n,o,r,l,a;return(null===t||void 0===t||null===(i=t.finalArr)||void 0===i||null===(n=i.finalArr)||void 0===n||null===(o=n.find((t=>(null===t||void 0===t?void 0:t.color)===(null===e||void 0===e?void 0:e.option))))||void 0===o?void 0:o.src)||(null===t||void 0===t||null===(r=t.finalArr)||void 0===r||null===(l=r.finalArrExternal)||void 0===l||null===(a=l.find((t=>(null===t||void 0===t?void 0:t.color)===(null===e||void 0===e?void 0:e.option))))||void 0===a?void 0:a.optionsrc)}));return(0,f.jsxs)(u.B,{width:"100%",direction:"column",alignItems:"center",justifyContent:"flex-start",paddingY:"2px",children:[(0,f.jsx)(s.o,{width:"100%",children:(0,f.jsx)(xt.c,{color:"blackAlpha.500",size:"1px",width:"20%"})}),(0,f.jsxs)(j.E,{as:"b",fontSize:1.2*d+"px",sx:{color:p+" !important",fontFamily:m+" !important"},align:"center",marginY:"2px",children:["\xa0",e[0].type,"\xa0"]}),(0,f.jsx)(mt.s,{gap:"6px",wrap:"wrap",justify:"center",paddingY:"2px",children:e.map(((e,n)=>{var r,l,a,s,u,h,p,v;return(0==i||(null===x||void 0===x||null===(r=x.variants)||void 0===r?void 0:r.find((t=>t[`option${i}`]==(null===z||void 0===z?void 0:z[i-1])&&t[`option${i+1}`]==(null===e||void 0===e?void 0:e.option)))))&&(0,f.jsxs)(c.az,{onClick:t=>{t.stopPropagation(),e.available&&function(t,e){if(2==e)E([z[0],z[1],t]);else if(1==e){var i,n;E([z[0],t,null===x||void 0===x||null===(i=x.variants)||void 0===i||null===(n=i.find((e=>(null===e||void 0===e?void 0:e.option2)==t)))||void 0===n?void 0:n.option3])}else{var o,r,l,a,d,s;const e=null===x||void 0===x||null===(o=x.variants)||void 0===o||null===(r=o.find((e=>(null===e||void 0===e?void 0:e.option1)==t)))||void 0===r?void 0:r.option2;E([t,null===x||void 0===x||null===(l=x.variants)||void 0===l||null===(a=l.find((e=>(null===e||void 0===e?void 0:e.option1)==t)))||void 0===a?void 0:a.option2,null===x||void 0===x||null===(d=x.variants)||void 0===d||null===(s=d.find((t=>(null===t||void 0===t?void 0:t.option2)==e)))||void 0===s?void 0:s.option3])}}(e.option,i)},backgroundColor:e.option===z[i]?"rgba(0, 0, 0, 0.7)":"white",border:e.option===z[i]?"1px solid #ffffff":"1px solid black",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:e.option===z[i]?"0 0 8px rgba(0, 0, 0, 0.8)":"none",marginY:"2px",width:"fit-content",padding:o?"0px":"8px",borderRadius:o?"50%":"0",children:[!o&&(0,f.jsxs)(j.E,{as:e.available?"samp":"s",fontSize:.8*d+"px",sx:{color:e.option===z[i]?"white":(e.available?"black":"gray")+" !important",fontFamily:m+" !important"},align:"center",paddingX:(g=e.option,g.length>=3?"0px":.5*d+"px"),children:["\xa0",e.option,"\xa0"]}),o&&(0,f.jsx)(y._,{width:"58px",height:"58px",style:{cursor:null!==e&&void 0!==e&&e.available?"pointer":"not-allowed",opacity:null!==e&&void 0!==e&&e.available?1:.5,filter:null!==e&&void 0!==e&&e.available?"none":"grayscale(100%)",borderRadius:o?"50%":"100%"},src:(0,gt.b)(null!==(l=null===t||void 0===t||null===(a=t.finalArr)||void 0===a||null===(s=a.finalArr)||void 0===s||null===(u=s.find((t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option))))||void 0===u?void 0:u.src)&&void 0!==l?l:null===t||void 0===t||null===(h=t.finalArr)||void 0===h||null===(p=h.finalArrExternal)||void 0===p||null===(v=p.find((t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option))))||void 0===v?void 0:v.optionsrc,"?width=400&height=400")})]},n);var g}))},i)]},i)}))})},wt=i(6594),jt=i(4833);var yt=function(t){var e,i,o,r,a,d,s,h;const[g]=(0,v.QN)("isInDesignMode"),[w]=(0,v.QN)("isDemoBrand"),[b]=(0,v.QN)("whatmoreSecondaryColor"),C=(0,v.Xd)("whatmoreSecondaryColorShade900"),[S]=(0,v.QN)("whatmorePrimaryFont"),[k]=(0,v.QN)("whatmoreShopId"),[I,_,z,E]=(0,x.A)(),[T,N]=(0,n.useState)(!1),[F,A]=(0,n.useState)(t.product),P=(0,v.Xd)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:L}=(0,n.useContext)(U.B),[B,O,D,R,X,K,G,tt]=vt(0,F,t.event),[et,it]=(0,n.useState)(null),[nt,ot]=(0,n.useState)(parseFloat(F.price)),[lt,at]=(0,n.useState)(parseFloat(F.compare_price)),[dt,st]=(0,n.useState)(null===F||void 0===F?void 0:F.title),[ct,ut]=(0,n.useState)(F.currency),[ht,pt]=(0,n.useState)(null),xt=t.event,mt=t.productClickHandler,{whatmoreIsPreviewMode:yt}=(0,n.useContext)(U.B),[bt,Ct]=(0,n.useState)(null),[St,kt]=(0,n.useState)(!1),[It,_t]=(0,n.useState)(!1);if((0,n.useEffect)((()=>{(0,p.w4b)(k)?(0,wt.ck)(F,(0,p.NCy)(k),k).then((t=>{A(t),ot(parseFloat(t.price)),at(parseFloat(t.compare_price)),ut(t.currency),kt(!0)})).catch((t=>{kt(!0)})):(async()=>{try{var t,e,i,n,o,r;const l=await(0,m.M)(F,(0,p.NCy)(k),k);pt(l),ot((null!==(t=null===l||void 0===l||null===(e=l.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.price)&&void 0!==t?t:null===l||void 0===l?void 0:l.price)/100),at((null!==(n=null===l||void 0===l||null===(o=l.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.compare_at_price)&&void 0!==n?n:null===l||void 0===l?void 0:l.compare_at_price)/100),kt(!0)}catch(l){kt(!0)}})(),!(0,p.E8r)(k)||!("in_stock"in xt)||null!==xt&&void 0!==xt&&xt.in_stock||D("errored")}),[]),(0,n.useEffect)((()=>{var t,e;const i=null!=ht?null===ht||void 0===ht||null===(t=ht.options)||void 0===t?void 0:t.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})):-1,n=-1!==i?null===ht||void 0===ht||null===(e=ht.variants)||void 0===e?void 0:e.map((t=>{var e,n;const o=null===t||void 0===t?void 0:t[`option${i+1}`];return null!==t&&void 0!==t&&null!==(e=t.featured_image)&&void 0!==e&&e.src?{color:o,src:null===t||void 0===t||null===(n=t.featured_image)||void 0===n?void 0:n.src}:null})):[];let o=[];var r;-1!==i&&(o=null===ht||void 0===ht||null===(r=ht.images)||void 0===r?void 0:r.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc}))));Ct({position:i,finalArr:n,finalArrExternal:o})}),[ht]),!St)return(0,f.jsx)(f.Fragment,{});var zt=.68*E,Et=.55*zt,Tt=.4*zt,Nt=zt*(.55-.4),Ft=zt+"px",At=Tt+"px",Pt=Nt+"px",Lt=.12*Tt;const Bt=(0,p.XQu)(k);function Ot(){window.location.href=function(t){return(0,p.BLb)(k)?t.product_link+"?"+(0,p.VCz)(k)+"&"+(0,p.Spk)(k)+"&"+(0,p.$lz)(k):t.product_link}(F)}const Dt=L.landingLocationType,Rt=L.templateType,Wt=(0,jt.Wd)(Dt)+(0,jt.gf)(Rt)+(null!==xt&&void 0!==xt&&xt.isRelatedEvent?"R":"E")+"_"+(null===xt||void 0===xt?void 0:xt.event_id),Vt=(0,p.HKH)(k)&&t.activeProductsCount>1&&"init"==B.state&&0==B.cart_count;return(0,f.jsxs)(u.B,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:Q,marginBottom:(0,p.qw1)(k),width:Ft,height:"fit-content",boxShadow:"round"==P?"dark-lg":null,onClick:()=>{!function(t,e){g||w||(async()=>{(0,l.Pb)(t,e)})(),"72550089015"==k?Ot():mt(e),N(!0)}(xt,F)},backgroundColor:(0,V.YU)("#ffffff",(0,p.p2R)(k)),animation:T?W.jd:W.so,borderRadius:"round"==P?"xl":null,overflow:"hidden",spacing:0,sx:{borderWidth:(0,p.YcK)(k),borderColor:(0,p.Fwt)(k)},children:[(0,f.jsxs)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,f.jsx)(c.az,{height:At,width:At,children:(0,f.jsx)(y._,{className:"product-tile-image",width:At,height:At,src:(0,gt.b)(null!==(e=null!==(i=null===bt||void 0===bt||null===(o=bt.finalArr)||void 0===o||null===(r=o.find((t=>(null===t||void 0===t?void 0:t.color)==(null===et||void 0===et?void 0:et[null===bt||void 0===bt?void 0:bt.position]))))||void 0===r?void 0:r.src)&&void 0!==i?i:null===bt||void 0===bt||null===(a=bt.finalArrExternal)||void 0===a||null===(d=a.find((t=>(null===t||void 0===t?void 0:t.color)==(null===et||void 0===et?void 0:et[null===bt||void 0===bt?void 0:bt.position]))))||void 0===d?void 0:d.src)&&void 0!==e?e:F.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,p.KZe)(k)+" !important"}})}),(0,f.jsxs)(c.az,{height:At,width:zt-Tt+"px",children:[(0,f.jsxs)(u.B,{direction:"column",className:"wht-pr-title",justifyContent:(0,p.UlM)(k)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"4px",paddingY:"10px",children:[(0,f.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,p.uoB)(k),"important"),t.style.setProperty("font-size",1.1*Lt*(0,p.rh$)(k)+"px","important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",S,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"),t.style.setProperty("padding","0","important"),t.style.setProperty("margin-bottom","4px","important"),t.style.setProperty("font-weight","normal"))},children:(0,$.v)(dt,"prod-tile")}),(0,p.Nzx)(k)?(0,f.jsxs)(u.B,{className:"whatmore-product-atc-price",direction:(0,p.vw2)(k)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",borderRadius:"round"==P?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"4px",sx:{margin:"0px !important",marginBottom:"4px !important"},children:[St&&(0,f.jsxs)(j.E,{noOfLines:1,fontSize:.9*Lt*(0,p.rh$)(k)+"px !important",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:S+" !important",color:(0,p.uoB)(k)+" !important",padding:"0px !important",letterSpacing:"normal !important",margin:"0px !important"},children:["\xa0"," "+(0,wt.Sb)("70756368633"===k?parseFloat(null===xt||void 0===xt||null===(s=xt.products)||void 0===s||null===(h=s[0])||void 0===h?void 0:h.price):null!==nt&&void 0!==nt?nt:null===F||void 0===F?void 0:F.price,"",k,ct)," \xa0"]}),(0,q.P)(nt,lt)&&St?(0,f.jsxs)(j.E,{noOfLines:1,fontSize:.9*Lt*(0,p.rh$)(k)+"px !important",fontWeight:"medium !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:S+" !important",color:(0,p.gld)(k)+" !important",margin:"0px !important",letterSpacing:"normal !important",textDecoration:0===nt?"":"line-through !important"},children:[" ",(0,wt.Sb)(null!==lt&&void 0!==lt?lt:null===F||void 0===F?void 0:F.compare_price,"",k,ct)]}):(0,f.jsx)(f.Fragment,{})]}):(0,f.jsx)(f.Fragment,{}),(0,f.jsx)(j.E,{fontSize:.82*Lt*(0,p.rh$)(k)+"px",fontWeight:"medium",lineHeight:"110%",sx:{margin:"0px !important",fontFamily:S+" !important",color:(0,p.Br1)(k)+" !important"},children:yt?(0,p.p6A)(k):(0,p.i2h)(k)})]}),(0,p.UlM)(k)?(0,f.jsx)(u.B,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,f.jsxs)(u.B,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,f.jsx)(u.B,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:C,sx:{borderRadius:"round"==P?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,p.SK$)(k)?(0,f.jsx)(J.$,{size:"sm",_hover:{bg:b},sx:{bg:b},children:(0,f.jsx)(j.E,{color:"white",paddingX:"6px",fontSize:.8*Lt+"px",children:"VIEW PRODUCT"})}):(0,f.jsx)(Y.A,{sx:{color:b,fontSize:1.3*Lt+"px"}})}),(0,f.jsx)(c.az,{width:"2px"})]})}):(0,f.jsx)(f.Fragment,{})]})]}),"awaitingVariantSelection"==B.state&&null!=R?(0,f.jsx)(c.az,{width:"100%",height:"fit-content",marginTop:.1*Et+"px",marginBottom:.1*Et+"px",overflowY:"auto",overflowX:"hidden",maxHeight:Et*Bt+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,f.jsx)(ft,{maxHeight:Et*Bt*.5+"px",width:Ft,height:"fit-content",event:xt,product:F,finalArr:bt,data:ht,productVariantOptions:R,baseFontSize:1.2*Lt,onOptionSelected:t=>{!function(t){it(t);const e=G(t);e&&(ot(e.price/100),at(e.compare_price/100),e.title.includes(" ")&&st(e.title))}(t)}})}):(0,f.jsx)(f.Fragment,{}),(0,f.jsxs)(u.B,{direction:"row",width:"100%",height:Pt,spacing:0,children:[(0,f.jsx)(u.B,{className:"whatmore-add-to-cart",direction:"row",width:"100%",height:Pt,children:(0,f.jsx)(rt,{baseFontSize:Vt?.2*Nt:.3*Nt,setProductVariantTitle:st,product:F,cartState:B.state,cartCount:B.cart_count,updateCartState:D,onClickAtc:t=>{"init"==B.state?(X(Wt),(0,M.kz)({userInteractionType:H.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:L,event:xt,productList:[F],ctaList:xt.cta})):"awaitingVariantSelection"==B.state&&(K(et,Wt),st(null===F||void 0===F?void 0:F.title))},onCartIconClick:()=>{tt()}})}),Vt&&(0,f.jsx)(u.B,{width:"100%",className:"wht-all-atc",sx:{fontSize:.28*Nt,flexDirection:"row",height:"100%",justifyContent:"center",alignItems:"center",bg:"white"},children:(0,f.jsx)(J.$,{disabled:It,sx:{cursor:"pointer",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",fontFamily:`${S} !important`,color:"black"},onClick:async t=>{t.stopPropagation();try{_t(!0),O(Wt),(0,M.kz)({userInteractionType:H.O.PRODUCT_TILE_ALL_ATC_CLICKED,widgetSourceDetails:L,event:xt,productList:xt.products,ctaList:xt.cta}),_t(!1)}catch(e){console.error("Failed to add items:",e),_t(!1)}},children:It?(0,f.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,f.jsx)(Z.A,{sx:{filter:"drop-shadow(0 0 15px black)",color:"#F5F5F5",fontSize:.3*Nt*2.5+"px"}})}):(0,f.jsx)(j.E,{fontFamily:S,children:"ADD ALL ITEMS"})})})]})]})},bt=i(2835),Ct=i(8397);var St=function(t){var e,i,n,o,r;const[a]=(0,v.QN)("isInDesignMode"),[d]=(0,v.QN)("isDemoBrand"),[h]=(0,v.QN)("whatmoreSecondaryColor"),[x]=(0,v.QN)("whatmorePrimaryFont"),[m]=(0,v.QN)("whatmoreShopId"),[g]=(0,v.QN)("websiteLanguage"),w=t.event,y=t.product,b=null!==(e=t.baseFontSize)&&void 0!==e?e:10,C=null!==(i=t.width)&&void 0!==i?i:"fit-content",S=null!==(n=t.height)&&void 0!==n?n:"fit-content";return(0,f.jsx)(Ct.N,{href:y.product_link,color:h,onClick:()=>{!function(t,e){a||d||(async()=>{(0,l.TJ)(t,e)})()}(w,y)},children:(0,f.jsx)(c.az,{width:C,height:S,padding:"2x",boxShadow:"lg",borderRadius:"md",backgroundColor:"white",children:(0,f.jsxs)(u.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",spacing:"5px",children:[(0,f.jsx)(s.o,{children:(0,f.jsx)(j.E,{lineHeight:"100%",fontSize:1.4*b,fontWeight:"semibold",sx:{fontFamily:x+" !important",color:h+" !important"},children:"MORE INFO"!=(0,p.KnH)(m)?(0,p.KnH)(m):null!==(o=null===tt||void 0===tt||null===(r=tt[g])||void 0===r?void 0:r.more_info)&&void 0!==o?o:(0,p.KnH)(m)})}),(0,f.jsx)(s.o,{children:(0,f.jsx)(Y.A,{sx:{color:h,fontSize:1.4*b}})})]})})})},kt=i(9408);function It(t){var e,i,o;const[r]=(0,v.QN)("whatmoreSecondaryColor"),[l]=(0,v.QN)("whatmorePrimaryFont"),[a]=(0,v.QN)("whatmoreShopId"),[d]=(0,v.QN)("websiteLanguage"),[s,h]=(0,n.useState)(!1),x=null!==(e=t.baseFontSize)&&void 0!==e?e:10,m=t.onClick,g=t.width,w=t.height,y=t.title;return(0,f.jsx)(c.az,{width:g,height:w,padding:"2x",boxShadow:"lg",backgroundColor:"#000000"==(0,p.Wc_)(a)?r:(0,p.Wc_)(a),onClick:t=>{t.stopPropagation(),m(),h(!0)},animation:s?W.jd:null,onAnimationEnd:()=>{h(!1)},cursor:"pointer",children:(0,f.jsx)(u.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:(0,f.jsxs)(j.E,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},lineHeight:"100%",fontSize:1.4*x+"px",fontWeight:"semibold",sx:{fontFamily:l+" !important",color:(0,p.Hfu)(a)+" !important"},children:["\xa0",null!==(i=null===tt||void 0===tt||null===(o=tt[d])||void 0===o?void 0:o.shop_now)&&void 0!==i?i:y,"\xa0"]})})})}var _t=function(t){var e,i,n;const[o]=(0,v.QN)("whatmoreShopId"),r=t.event,l=t.product,a=null!==(e=t.baseFontSize)&&void 0!==e?e:10,d=t.onShopNowClick,s=null!==(i=t.width)&&void 0!==i?i:"100%",c=null!==(n=t.height)&&void 0!==n?n:"100%";return(0,f.jsx)(It,{onClick:function(){d()},event:r,product:l,baseFontSize:a,width:s,height:c,title:(0,p.Qed)(o)})};var zt=function(t){var e,i,o,r,a;const[d]=(0,v.QN)("isInDesignMode"),[h]=(0,v.QN)("isDemoBrand"),[g]=(0,v.QN)("whatmorePrimaryFont"),[w]=(0,v.QN)("whatmoreShopId"),[b,C,S,k]=(0,x.A)(),[I,_]=(0,n.useState)(!1),[z,E]=(0,n.useState)(t.product),{whatmoreWidgetSourceDetails:T}=(0,n.useContext)(U.B),[N,F,A,P,L,B,O,D]=vt(0,z,t.event),[R,V]=(0,n.useState)(null),[X,Y]=(0,n.useState)(parseFloat(z.price)),[K,G]=(0,n.useState)(parseFloat(z.compare_price)),[Z,J]=(0,n.useState)(z.currency),[tt,et]=(0,n.useState)(!1),it=t.event,nt=t.productClickHandler,ot=null!==(e=t.tileWidthFactor)&&void 0!==e?e:1,lt=T.landingLocationType,at=T.templateType,dt=(0,jt.Wd)(lt)+(0,jt.gf)(at)+(null!==it&&void 0!==it&&it.isRelatedEvent?"R":"E")+"_"+(null===it||void 0===it?void 0:it.event_id);(0,n.useEffect)((()=>{(0,p.w4b)(w)?(0,wt.ck)(z,(0,p.NCy)(w),w).then((t=>{E(t),Y(parseFloat(t.price)),G(parseFloat(t.compare_price)),J(t.currency)})):(async()=>{const t=await(0,m.M)(z,(0,p.NCy)(w),w);Y(null===t||void 0===t?void 0:t.price),G(null===t||void 0===t?void 0:t.compare_at_price),et(!0)})()}),[]);var st=k*ot,ct=.3*st,ut=st+"px",ht=.7*ct,pt=.9*ht,xt=.12*ct;const mt=(0,p.XQu)(w);function gt(t,e){d||h||(async()=>{(0,l.Pb)(t,e)})(),nt(e),_(!0)}return(0,f.jsx)(u.B,{direction:"row",width:ut,height:"fit-content",justifyContent:"center",children:(0,f.jsx)(c.az,{marginTop:Q,marginBottom:(0,p.qw1)(w),width:ut,onClick:t=>{},animation:I?W.jd:null,borderRadius:"lg",onAnimationEnd:()=>{_(!1)},children:(0,f.jsxs)(u.B,{direction:"column",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",spacing:"0px",children:[(0,f.jsxs)(u.B,{direction:"row",width:"100%",height:"70%",justifyContent:"space-around",alignItems:"center",borderTopRadius:"lg",overflow:"hidden",onClick:()=>{gt(it,z)},children:[(0,f.jsx)(c.az,{height:ht+"px",width:ht+"px",children:(0,f.jsx)(u.B,{direction:"column",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",children:(0,f.jsx)(c.az,{height:pt+"px",width:pt+"px",borderRadius:"lg",bgColor:"gray.100",overflow:"hidden",children:(0,f.jsx)(y._,{width:pt+"px",height:pt+"px",src:z.thumbnail_image,objectFit:"cover"})})})}),(0,f.jsx)(c.az,{height:ht+"px",width:st-ht+"px",children:(0,f.jsxs)(u.B,{direction:"column",justifyContent:"space-between",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingY:"10px",spacing:"2px",children:[(0,f.jsx)(j.E,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*xt+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:g+" !important",color:"white !important"},children:(0,$.v)(z.title.toString())}),(0,f.jsxs)(u.B,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",marginTop:"5px",children:[(0,p.Nzx)(w)?(0,f.jsxs)(u.B,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignItems:"center",borderRadius:"lg",backgroundColor:"blackAlpha.500",paddingX:"10px",paddingY:"5px",children:[tt&&(0,f.jsx)(j.E,{noOfLines:1,fontSize:1*xt+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:g+" !important",color:"white !important"},children:" "+(0,wt.Sb)("28849832033"===w?parseFloat(null===it||void 0===it||null===(i=it.products)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.price):null!==X&&void 0!==X?X:null===z||void 0===z?void 0:z.price,"",w,Z)}),(0,f.jsx)(s.o,{children:(0,q.P)(z.price,z.compare_price)&&tt?(0,f.jsxs)(j.E,{noOfLines:1,fontSize:.8*xt+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:g+" !important",color:"#F9F6EE !important",textDecoration:"line-through !important"},children:[" ",(0,wt.Sb)("28849832033"===w?parseFloat(null===it||void 0===it||null===(r=it.products)||void 0===r||null===(a=r[0])||void 0===a?void 0:a.compare_price):null!==K&&void 0!==K?K:null===z||void 0===z?void 0:z.compare_price,"",w,Z)]}):(0,f.jsx)(f.Fragment,{})})]}):(0,f.jsx)(f.Fragment,{}),(0,f.jsx)(s.o,{children:(0,f.jsx)(bt.A,{storeId:w,productId:z.client_product_id,productLink:z.product_link,fontSize:1*xt,fontColor:"white"})})]})]})})]}),"awaitingVariantSelection"==N.state&&null!=P?(0,f.jsx)(c.az,{width:"100%",height:"fit-content",marginTop:.1*ct+"px",marginBottom:.1*ct+"px",overflowY:"auto",overflowX:"hidden",maxHeight:ct*mt+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,f.jsx)(ft,{width:ut,height:"fit-content",event:it,product:z,productVariantOptions:P,baseFontSize:1*xt,onOptionSelected:t=>{!function(t){V(t);const e=O(t);e&&(Y(e.price),G(e.compare_price))}(t)},optionTitleColor:"white"})}):(0,f.jsx)(f.Fragment,{}),(0,f.jsxs)(u.B,{direction:"row",width:"100%",height:"30%",justifyContent:"center",alignItems:"center",paddingBottom:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,f.jsx)(c.az,{width:"100%",height:"100%",children:(0,f.jsx)(St,{baseFontSize:.8*xt,event:it,product:z,width:"100%",height:"100%"})}),(0,f.jsx)(c.az,{width:"100%",height:"100%",borderRadius:"md",overflow:"hidden",children:(0,p.ZzM)(w)?(0,f.jsx)(_t,{baseFontSize:.8*xt,event:it,product:z,borderRadius:"md",onShopNowClick:t=>{gt(it,z)}}):(0,f.jsx)(f.Fragment,{children:"form"===(0,p.nWM)(w)?(0,f.jsx)(kt.default,{baseFontSize:.8*xt,event:it,product:z,width:"100%",height:"100%",showAddedToCart:!0}):(0,f.jsx)(rt,{baseFontSize:.8*xt,event:it,product:z,cartState:N.state,cartCount:N.cart_count,borderRadius:"md",onClickAtc:t=>{"init"==N.state?(L(dt),(0,M.kz)({userInteractionType:H.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:T,event:it,productList:[z],ctaList:it.cta})):"awaitingVariantSelection"==N.state&&B(R,dt)},onCartIconClick:()=>{D()}})})})]})]})})})},Et=i(7740);var Tt=function(t){const[e]=(0,v.QN)("isInDesignMode"),[i]=(0,v.QN)("isDemoBrand"),[o]=(0,v.QN)("whatmoreSecondaryColor"),r=(0,v.Xd)("whatmoreSecondaryColorShade900"),[a]=(0,v.QN)("whatmorePrimaryFont"),[d]=(0,v.QN)("whatmoreShopId"),[s,h,g,w]=(0,x.A)(),[b,C]=(0,n.useState)(!1),[S,k]=(0,n.useState)(t.product),I=(0,v.Xd)("whatmoreUITheme"),[_,z]=(0,n.useState)(!1),[E,T]=(0,n.useState)(parseFloat(S.price)),[N,F]=(0,n.useState)(parseFloat(S.compare_price)),[A,P]=(0,n.useState)(S.currency),L=t.event,[B,O]=(0,n.useState)();if((0,n.useEffect)((()=>{(0,p.w4b)(d)?(0,wt.ck)(S,(0,p.NCy)(d),d).then((t=>{k(t),T(parseFloat(t.price)),F(parseFloat(t.compare_price)),P(t.currency),z(!0)})).catch((t=>z(!0))):(async()=>{try{var t,e,i,n,o,r;const l=await(0,m.M)(S,(0,p.NCy)(d),d);O(l),T((null!==(t=null===l||void 0===l||null===(e=l.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.price)&&void 0!==t?t:null===l||void 0===l?void 0:l.price)/100),F((null!==(n=null===l||void 0===l||null===(o=l.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.compare_at_price)&&void 0!==n?n:null===l||void 0===l?void 0:l.compare_at_price)/100),z(!0)}catch(l){z(!0)}})()}),[]),!_)return(0,f.jsx)(f.Fragment,{});var D=.68*w,R=.4*D,X=D+"px",K=R+"px",G=D*(.55-.4)+"px",Z=.12*R;(0,p.XQu)(d);const{whatmoreWidgetSourceDetails:J}=(0,n.useContext)(U.B);function tt(t){return(0,p.BLb)(d)?t.product_link+"?"+(0,p.VCz)(d)+"&"+(0,p.Spk)(d)+"&"+(0,p.$lz)(d):t.product_link}function et(t,n){e||i||(async()=>{(0,l.Pb)(t,n),(0,M.kz)({userInteractionType:H.O.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:J,event:t,productList:[n],ctaList:t.cta})})(),C(!0)}return(0,f.jsxs)(u.B,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:Q,marginBottom:(0,p.qw1)(d),width:X,height:"fit-content",boxShadow:"round"==I?"dark-lg":null,onClick:()=>{et(L,S),window.location.href=tt(S)},backgroundColor:(0,V.YU)("#ffffff",(0,p.p2R)(d)),animation:b?W.jd:W.so,borderRadius:"round"==I?"xl":null,overflow:"hidden",spacing:0,sx:{borderWidth:(0,p.YcK)(d),borderColor:(0,p.Fwt)(d)},children:[(0,f.jsxs)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,f.jsx)(c.az,{height:K,width:K,children:(0,f.jsx)(y._,{width:K,height:K,src:(0,gt.b)(S.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,p.KZe)(d)+" !important"}})}),(0,f.jsxs)(c.az,{height:K,width:D-R+"px",children:[(0,f.jsxs)(u.B,{direction:"column",justifyContent:(0,p.UlM)(d)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingTop:"10px",paddingBottom:"16px",children:[(0,f.jsx)(j.E,{as:"p",ref:t=>{t&&(t.style.setProperty("min-height","0","important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("-webkit-box-orient","vertical","important"))},sx:{paddingLeft:"8px",fontFamily:a+" !important",color:"black !important",lineHeight:"120% !important",fontWeight:"medium !important",fontSize:1.1*Z+"px !important"},children:(0,$.v)(null==S.title?"":S.title.toString(),"prod-tile")}),(0,p.Nzx)(d)?(0,f.jsxs)(u.B,{className:"whatmore-product-shopnow-price",direction:(0,p.vw2)(d)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",marginTop:"5px",borderRadius:"round"==I?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"5px",children:[_&&(0,f.jsxs)(j.E,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},noOfLines:1,fontSize:.9*Z+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:a+" !important",color:(0,p.uoB)(d)+" !important",margin:"0px !important"},children:[" "+(0,wt.Sb)(null!==E&&void 0!==E?E:null===S||void 0===S?void 0:S.price,"",d,A)," \xa0"]}),(0,q.P)(E,N)&&_?(0,f.jsxs)(j.E,{as:"s",style:{minHeight:0,textDecoration:"line-through"},noOfLines:1,fontSize:.9*Z+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:a+" !important",color:(0,p.gld)(d)+" !important",margin:"0px !important"},children:[" ",(0,wt.Sb)(null!==N&&void 0!==N?N:null===S||void 0===S?void 0:S.compare_price,"",d,A)]}):(0,f.jsx)(f.Fragment,{})]}):(0,f.jsx)(f.Fragment,{}),""!=(0,p.rsz)(d)&&(0,f.jsxs)(j.E,{noOfLines:1,fontSize:.9*Z+"px",lineHeight:"100%",paddingTop:"6px",sx:{fontFamily:(0,p.ogW)(d)+" !important",color:(0,p._zx)(d)+" !important",margin:"0px !important"},children:["\xa0",(0,p.rsz)(d)," \xa0"]})]}),(0,p.UlM)(d)?(0,f.jsx)(u.B,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,f.jsxs)(u.B,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,f.jsx)(u.B,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:r,sx:{borderRadius:"round"==I?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,f.jsx)(Y.A,{sx:{color:o,fontSize:1.3*Z+"px"}})}),(0,f.jsx)(c.az,{width:"2px"})]})}):(0,f.jsx)(f.Fragment,{})]})]}),(0,p.Woi)(d)&&(0,f.jsx)(u.B,{direction:"row",width:"100%",height:G,justifyContent:"center",alignItems:"center",children:(0,f.jsx)(_t,{baseFontSize:.8*Z,event:L,product:S,borderRadius:"md",onShopNowClick:t=>{et(L,S),window.location.href=tt(S)}})})]})};function Nt(t){var e;const[i]=(0,v.QN)("whatmoreSecondaryColor"),[o]=(0,v.QN)("whatmorePrimaryFont"),[r]=(0,v.QN)("whatmoreShopId"),[l,a]=(0,n.useState)(!1),d=null!==(e=t.baseFontSize)&&void 0!==e?e:10,s=t.onClick,h=t.width,x=t.height,m=t.title,g=t.showInProgressIcon;return"awaitingVariantSelection"==t.cartState||"productVariantDetailsApiCallInProgress"==t.cartState?(0,f.jsx)(Ft,{onClick:()=>t.onClick(),event:t.event,product:t.product,baseFontSize:d,width:h,height:x}):(0,f.jsxs)(c.az,{display:"flex",width:"fit-content",minWidth:"75%",padding:"2x",boxShadow:"lg",animation:l?W.jd:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:["awaitingVariantSelection"==t.cartState&&(0,f.jsx)(u.B,{direction:"row",alignItems:"center",justifyContent:"center",paddingY:"2px",backgroundColor:"white",onClick:e=>{e.stopPropagation(),t.updateCartState("init"),a(!0)},children:(0,f.jsxs)(j.E,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:o+" !important",color:"#343434 !important"},children:["\xa0","63064310011"==r?"Annuler":"Cancel","\xa0"]})}),(0,f.jsxs)(u.B,{direction:"row",backgroundColor:g?(0,V.YU)(i,8):i,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",onClick:t=>{t.stopPropagation(),s(),a(!0)},children:[(0,f.jsxs)(j.E,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:o+" !important",color:(0,p.Hfu)(r)+" !important"},children:["\xa0",m,"\xa0"]}),g?(0,f.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,f.jsx)(Z.A,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*d+"px"}})}):(0,f.jsx)(f.Fragment,{})]})]})}function Ft(t){const[e]=(0,v.QN)("whatmoreSecondaryColor"),[i]=(0,v.QN)("whatmorePrimaryFont"),[o]=(0,v.QN)("whatmoreShopId"),[r,l]=(0,n.useState)(!1),a=t.onClick,d=t.baseFontSize;return(0,f.jsx)(u.B,{direction:"row",paddingBottom:"3%",position:"relative",children:(0,f.jsx)(c.az,{width:"fit-content",minWidth:"75%",boxShadow:"lg",padding:"6px 12px",borderRadius:"6px",backgroundColor:e,onClick:t=>{t.stopPropagation(),a(),l(!0)},animation:r?W.jd:null,onAnimationEnd:()=>{l(!1)},cursor:"pointer",zIndex:"1000",children:(0,f.jsx)(u.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",children:(0,f.jsx)(s.o,{children:(0,f.jsx)(j.E,{lineHeight:"100%",fontSize:1.3*d+"px",fontWeight:"semibold",sx:{fontFamily:`${i} !important`,color:`${(0,p.Hfu)(o)} !important`},children:(0,p.KPq)(o)})})})})})}function At(t){var e;const[i]=(0,v.QN)("whatmorePrimaryFont"),n=null!==(e=t.baseFontSize)&&void 0!==e?e:10;t.width,t.height;return(0,f.jsx)(c.az,{width:"fit-content",height:"fit-content !important",minWidth:"75%",boxShadow:"lg",backgroundColor:"white",borderRadius:"6px",borderColor:"gray",borderWidth:"1px",onClick:t=>{t.stopPropagation()},children:(0,f.jsx)(u.B,{direction:"row",width:"100%",alignItems:"center",paddingX:"4px",paddingY:"3px",justifyContent:"center",children:(0,f.jsxs)(j.E,{color:"gray",lineHeight:"100%",fontSize:1.2*n+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:"gray !important"},children:["\xa0"," Sold Out ","\xa0"]})})})}function Pt(t){var e;const[i]=(0,v.QN)("whatmoreSecondaryColor"),[n]=(0,v.QN)("whatmorePrimaryFont"),[o]=(0,v.QN)("whatmoreShopId"),r=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),l=t.onClick,a=t.cartCount,d=(t.width,t.height,t.onCartIconClick);return(0,f.jsx)(c.az,{width:"fit-content",minWidth:"75%",borderRadius:"6px",padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:i,borderWidth:"1px",onClick:t=>{t.stopPropagation()},cursor:"pointer",children:(0,f.jsxs)(u.B,{direction:"row",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:[(0,f.jsx)(s.o,{paddingX:"5px",onClick:()=>{d()},children:"1972174947"!=o&&"55194878152"!=o&&"12181504100"!=o?(0,f.jsx)(G.A,{sx:{color:i,fontSize:1.6*r}}):(0,f.jsx)(J.$,{size:"sm",_hover:{bg:i},sx:{bg:i},children:(0,f.jsx)(j.E,{paddingX:"6px",color:"white",sx:{fontSize:.85*r},children:"GO TO CART"})})}),(0,f.jsx)(j.E,{color:i,fontSize:1.3*r+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important"},children:a}),(0,f.jsx)(s.o,{paddingX:"5px",onClick:t=>{t.stopPropagation(),l()},children:(0,f.jsx)(K.A,{sx:{color:i,fontSize:1.6*r}})})]})})}var Lt=function(t){var e,i,n,o;const[r]=(0,v.QN)("whatmoreShopId"),l=t.event,a=t.product,d=null!==(e=t.baseFontSize)&&void 0!==e?e:10,s=null===(i=t.showAddedToCart)||void 0===i||i,c=t.cartState,u=t.cartCount,h=t.onClickAtc,p=t.onCartIconClick;function x(){h()}const m=null!==(n=t.width)&&void 0!==n?n:"100%",g=null!==(o=t.height)&&void 0!==o?o:"100%";return"errored"==c?(0,f.jsx)(At,{event:l,product:a,baseFontSize:d,width:m,height:g}):"init"==c?0==u?(0,f.jsx)(Ft,{onClick:x,event:l,product:a,baseFontSize:d,width:m,height:g}):s?(0,f.jsx)(Pt,{onClick:x,event:l,product:a,baseFontSize:d,cartCount:u,width:m,height:g,onCartIconClick:p}):(0,f.jsx)(Ft,{onClick:x,event:l,product:a,baseFontSize:d,width:m,height:g}):(0,f.jsx)(Nt,{onClick:x,cartState:c,updateCartState:t.updateCartState,event:l,product:a,baseFontSize:d,width:m,height:g,title:"awaitingVariantSelection"==c?"63064310011"==r?"Valider":"Done":"",showInProgressIcon:"atcApiCallInProgress"==c||"productVariantDetailsApiCallInProgress"==c})};var Bt=function(t){var e,i,o,r,a,d;const[s]=(0,v.QN)("isInDesignMode"),[h]=(0,v.QN)("isDemoBrand"),[g]=(0,v.QN)("whatmorePrimaryFont"),[w]=(0,v.QN)("whatmoreShopId"),[b,C,S,k]=(0,x.A)(),[I,_]=(0,n.useState)(!1),[z,E]=(0,n.useState)(t.product),T=(0,v.Xd)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:N}=(0,n.useContext)(U.B),[F,A,P,L,B,O,D,R]=vt(0,z,t.event),[X,Y]=(0,n.useState)(null),[K,G]=(0,n.useState)(parseFloat(z.price)),[Z,J]=(0,n.useState)(parseFloat(z.compare_price)),[tt,et]=(0,n.useState)(z.currency),[it,nt]=(0,n.useState)(null),ot=t.event,rt=t.productClickHandler,[lt,at]=(0,n.useState)(null),[dt,st]=(0,n.useState)(!1),ct=N.landingLocationType,ut=N.templateType,ht=(0,jt.Wd)(ct)+(0,jt.gf)(ut)+"_"+(null===ot||void 0===ot?void 0:ot.event_id);(0,n.useEffect)((()=>{(0,p.w4b)(w)?(0,wt.ck)(z,(0,p.NCy)(w),w).then((t=>{E(t),G(parseFloat(t.price)),J(parseFloat(t.compare_price)),et(t.currency),st(!0)})):(async()=>{var t,e,i,n,o,r;const l=await(0,m.M)(z,(0,p.NCy)(w),w);nt(l),G((null!==(t=null===l||void 0===l||null===(e=l.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.price)&&void 0!==t?t:null===l||void 0===l?void 0:l.price)/100),J((null!==(n=null===l||void 0===l||null===(o=l.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.compare_at_price)&&void 0!==n?n:null===l||void 0===l?void 0:l.compare_at_price)/100),st(!0)})(),!(0,p.E8r)(w)||null!==ot&&void 0!==ot&&ot.in_stock||P("errored")}),[]),(0,n.useEffect)((()=>{var t,e;const i=null!=it?null===it||void 0===it||null===(t=it.options)||void 0===t?void 0:t.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})):-1,n=-1!==i?null===it||void 0===it||null===(e=it.variants)||void 0===e?void 0:e.map((t=>{var e,n;const o=null===t||void 0===t?void 0:t[`option${i+1}`];return null!==t&&void 0!==t&&null!==(e=t.featured_image)&&void 0!==e&&e.src?{color:o,src:null===t||void 0===t||null===(n=t.featured_image)||void 0===n?void 0:n.src}:null})):[];let o=[];var r;-1!==i&&(o=null===it||void 0===it||null===(r=it.images)||void 0===r?void 0:r.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc}))));at({position:i,finalArr:n,finalArrExternal:o})}),[it]);var pt=.72*k,xt=.37*pt,mt=pt*(.48-.37),ft=.95*pt+"px",yt=xt+"px",bt=.12*xt;function Ct(){window.location.href=function(t){return(0,p.BLb)(w)?t.product_link+"?"+(0,p.VCz)(w)+"&"+(0,p.Spk)(w)+"&"+(0,p.$lz)(w):t.product_link}(z)}return(0,f.jsx)(u.B,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:Q,marginBottom:"24px",width:ft,boxShadow:"round"==T?"dark-lg":null,onClick:()=>{!function(t,e){s||h||(async()=>{(0,l.Pb)(t,e)})(),"72550089015"==w?Ct():rt(e),_(!0)}(ot,z)},backgroundColor:(0,V.YU)("#ffffff",(0,p.p2R)(w)),animation:I?W.jd:null,borderRadius:"round"==T?"xl":null,overflow:"hidden",onAnimationEnd:()=>{_(!1)},spacing:0,sx:{borderWidth:(0,p.YcK)(w),borderColor:(0,p.Fwt)(w)},children:(0,f.jsxs)(u.B,{display:"flex",direction:"row",width:"full",height:"fit-content",justifyContent:"center",alignContent:"center",cursor:"pointer",alignItems:"center",gap:"8px",children:[(0,f.jsx)(c.az,{height:yt,width:yt,children:(0,f.jsx)(y._,{width:"100%",height:"100%",src:(0,gt.b)(null!==(e=null!==(i=null===lt||void 0===lt||null===(o=lt.finalArr)||void 0===o||null===(r=o.find((t=>(null===t||void 0===t?void 0:t.color)==(null===X||void 0===X?void 0:X[null===lt||void 0===lt?void 0:lt.position]))))||void 0===r?void 0:r.src)&&void 0!==i?i:null===lt||void 0===lt||null===(a=lt.finalArrExternal)||void 0===a||null===(d=a.find((t=>(null===t||void 0===t?void 0:t.color)==(null===X||void 0===X?void 0:X[null===lt||void 0===lt?void 0:lt.position]))))||void 0===d?void 0:d.src)&&void 0!==e?e:z.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,p.KZe)(w)+" !important"}})}),(0,f.jsx)(c.az,{height:yt,width:pt-xt+"px",children:(0,f.jsxs)(u.B,{direction:"column",justifyContent:"flex-start",height:"100%",gap:"4px",paddingTop:"12px",width:"100%",children:[(0,f.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",bt+"px","important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",g,"important"),t.style.setProperty("white-space","nowrap","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"),t.style.setProperty("padding","0","important"),t.style.setProperty("font-weight","normal","important"))},children:(0,$.v)(null==z.title?"":z.title.toString())}),(0,p.Nzx)(w)?(0,f.jsxs)(u.B,{direction:(0,p.vw2)(w)?"row":"row-reverse",sx:{margin:"0px !important",minHeight:1.1*bt+"px"},children:[dt&&(0,f.jsxs)(j.E,{noOfLines:1,fontSize:.9*bt*(0,p.rh$)(w)+"px !important",lineHeight:"100%",sx:{fontFamily:g+" !important",color:(0,p.uoB)(w)+" !important",fontWeight:"bold"},children:[" "+(0,wt.Sb)(null!==K&&void 0!==K?K:null===z||void 0===z?void 0:z.price,"",w,tt)," \xa0"]}),(0,q.P)(K,Z)&&dt?(0,f.jsxs)(j.E,{noOfLines:1,fontSize:.9*bt*(0,p.rh$)(w)+"px !important",fontWeight:"medium !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:g+" !important",color:(0,p.gld)(w)+" !important",margin:"0px !important",letterSpacing:"normal !important",textDecoration:"line-through !important"},children:[" ",(0,wt.Sb)(null!==Z&&void 0!==Z?Z:null===z||void 0===z?void 0:z.compare_price,"",w,tt)]}):(0,f.jsx)(f.Fragment,{})]}):(0,f.jsx)(f.Fragment,{}),(0,f.jsx)(Lt,{baseFontSize:.3*mt,event:ot,product:z,cartState:F.state,cartCount:F.cart_count,updateCartState:P,onClickAtc:t=>{"init"===F.state?(B(ht,!0),(0,M.kz)({userInteractionType:H.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:N,event:ot,productList:[z],ctaList:ot.cta})):"awaitingVariantSelection"===F.state&&rt(z)},onCartIconClick:t=>{R()}})]})})]})})};var Ot=function(t){const[e]=(0,v.QN)("whatmoreShopId"),[i]=(0,v.QN)("isWhatmoreWebsite"),n=(0,p.Vpi)(e),o=t.event,r=t.product;return i?(0,f.jsx)(Tt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile"==n?(0,f.jsx)(yt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler,activeProductsCount:t.activeProductsCount}):"broad-tile-no-cta"==n?(0,f.jsx)(Tt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile-new-atc"==n?(0,f.jsx)(Bt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"link_only"==n?(0,f.jsx)(X,{product:t.product,event:t.event}):"narrow-tile"==n?(0,f.jsx)(zt,{event:o,product:r,productClickHandler:t.productClickHandler,tileWidthFactor:o.products.length>1?.68:void 0}):(0,f.jsx)(f.Fragment,{})},Dt=i(1079),Rt=i(7802),Wt=i(2979);var Vt=function(t){var e,i,n;const[l,a,d,h]=(0,x.A)(),[m]=(0,v.QN)("whatmoreShopId"),g=(0,v.Xd)("isInDesignMode"),w=(0,v.Xd)("isDemoBrand"),j=t.event,y=t.productClickHandler,b=(0,p.Vpi)(m),C=null!==(e=null===(i=j.products)||void 0===i||null===(n=i.filter((t=>"active"==(null===t||void 0===t?void 0:t.product_status))))||void 0===n?void 0:n.length)&&void 0!==e?e:0;if(!(0,Rt.Z_)(j))return(0,f.jsx)(f.Fragment,{});if(1==j.products.length&&(void 0==j.cta||0==j.cta.length)){const t=j.products[0];return(0,p.uJl)(m)?(0,f.jsx)(u.B,{direction:"horizontal",width:h,height:"fit-content",justifyContent:"center",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))",children:(0,f.jsx)(Wt.S,{userInteractionType:H.O.PRODUCT_CTA_VIEW,event:j,productList:[t],triggerFlag:!g&&!w,children:(0,f.jsx)(s.o,{children:(0,f.jsx)(zt,{event:j,product:t,productClickHandler:y},j.event_id+t.product_id)})})}):(0,f.jsx)(u.B,{direction:"horizontal",width:h,height:"fit-content",justifyContent:"center",backgroundImage:"narrow-tile"==b?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))":null,children:(0,f.jsx)(s.o,{children:(0,f.jsx)(Wt.S,{userInteractionType:H.O.PRODUCT_CTA_VIEW,event:j,productList:[t],triggerFlag:!g&&!w,children:(0,f.jsx)(Ot,{activeProductsCount:1,event:j,product:t,productClickHandler:y},j.event_id+t.product_id)})})})}return(0,f.jsx)(s.o,{children:(0,f.jsx)("div",{onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,f.jsx)(c.az,{width:h+"px",backgroundImage:"narrow-tile"==b?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))":null,children:(0,f.jsxs)(o.RC,{className:"product-tile swiper-slide",slidesPerView:1==j.products.length?1:1.4,initialSlide:j.products.length<=2||(0,p.TYM)(m)?0:1,centeredSlides:!(0,p.TYM)(m),modules:[r.FJ],mousewheel:{invert:!1,thresholdDelta:20},nested:!0,children:[("STRDOIDF6O7"===m?[j.products[0]]:j.products).map((t=>("oos"!=t.product_status||(0,p.$7F)(m))&&(0,f.jsx)(o.qr,{children:(0,f.jsx)(Wt.S,{userInteractionType:H.O.PRODUCT_CTA_VIEW,event:j,productList:[t],triggerFlag:!g&&!w,children:(0,f.jsx)(u.B,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",alignItems:"center",children:(0,f.jsx)(Ot,{activeProductsCount:C,event:j,product:t,productClickHandler:y},j.event_id+t.product_id)})})},j.event_id+t.product_id))),(0,p.Woi)(m)&&void 0!=j.cta&&j.cta.map((t=>(0,f.jsx)(f.Fragment,{children:""!==t.cta_title.trim()&&(0,f.jsx)(o.qr,{children:(0,f.jsx)(u.B,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",paddingBottom:"12px",alignItems:"center",children:(0,f.jsx)(Dt.A,{fontFactor:.75,cta:t},j.event_id+t.cta_id)})},j.event_id+t.cta_id)})))]})})})})};var Qt=function(t){const[e,i]=(0,v.QN)("isProductSwiperCatalogOpen"),o=t.event,r=t.productClickHandler;return(0,n.useContext)(_i).isIOS,(0,f.jsx)(Vt,{event:o,productClickHandler:r},o.event_id)},Mt=i(6670);function Ht(t){const e=t.event,[i,n,o,r]=(0,x.A)(),[l]=(0,v.QN)("whatmorePrimaryFont");return(0,f.jsx)(c.az,{width:"fit-content",height:"fit-content",padding:"5px",children:(0,f.jsxs)(u.B,{direction:"row",width:"fit-content",height:"fit-content",children:[(0,f.jsx)(s.o,{children:(0,f.jsx)(c.jl,{overflow:"hidden",size:.15*r+"px",children:(0,f.jsx)(y._,{width:"100%",height:"100%",src:e.thumbnail_image})})}),(0,f.jsx)(c.az,{width:"fit-content",height:"fit-content",children:(0,f.jsxs)(u.B,{direction:"column",width:"fit-content",height:"fit-content",children:[(0,f.jsx)(j.E,{color:"white",fontSize:.05*r+"px",fontWeight:"bold",fontFamily:"sans-serif",align:"left",sx:{fontFamily:l+" !important"},children:e.presenter_name.substring(0,15)}),(0,f.jsx)(F.A,{event:e,fontSize:.03*r+"px"})]})})]})})}var Ut=function(t){const[e]=(0,v.QN)("isInDesignMode"),[i]=(0,v.QN)("isDemoBrand"),[o,r]=(0,v.QN)("isProductSwiperCatalogOpen"),[l,a]=(0,Mt.A)(),[d,s]=(0,v.QN)("isFirstIndicatorRenderDone"),h=(0,n.useContext)(_i),[x]=(0,v.QN)("whatmoreShopId"),m=t.event,g=t.isLast,w=t.onCloseCallback,j=t.focusRef,y=t.productClickHandler;return(0,f.jsx)(c.az,{width:"full",height:"full",borderRadius:"md",children:(0,f.jsxs)(u.B,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,f.jsx)(c.az,{width:"full",margin:"2px",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:(0,f.jsxs)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"space-between",paddingRight:"10px",paddingLeft:"10px",children:[(0,f.jsx)(Ht,{event:m}),(0,f.jsxs)(u.B,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,f.jsx)(b.A,{focusRef:j}),(0,f.jsx)(P,{event:m,onCloseCallback:w})]})]})}),(0,f.jsx)(c.az,{width:"100%",height:"100%",onClick:()=>{a(!l)}}),(0,f.jsxs)(c.az,{width:"full",height:"fit-content",children:[h.totalEvents>1&&!d&&h.showSwipeIndicator?(0,f.jsx)(c.az,{width:"full",margin:"2px",children:(0,f.jsx)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,f.jsx)(D,{swipeUp:!g})})}):null,void 0!=m.products&&m.products.length>0?(0,f.jsxs)(c.az,{width:"full",children:[(0,p.ek9)(x)?(0,f.jsx)(c.az,{w:"100%",children:(0,f.jsx)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,f.jsx)(N,{event:m,onToggle:t=>{r("minimize-button"!==t)}})})}):(0,f.jsx)(f.Fragment,{}),(0,f.jsx)(c.az,{display:"flex",width:"100%",height:"fit-content",children:(0,f.jsx)(Qt,{event:m,productClickHandler:y})})]}):(0,f.jsx)("div",{})]})]})})};function Xt(t){const[e,i,o,r]=(0,x.A)(),[l]=(0,v.QN)("whatmorePrimaryFont"),[a]=(0,v.QN)("whatmoreShopId"),[d,s]=(0,n.useState)(""),h=t.data,m=(t.event,t.product,t.setShowOptionsChart);var g=.4*r*.8*.13;(0,n.useEffect)((()=>{let t="vanyaclothing.myshopify.com";"1972174947"===a?t="vanyaclothing.myshopify.com":"57415434338"===a&&(t="usvanya.myshopify.com");const e=`https://app.kiwisizing.com/api/getSizingChart?shop=${t}&product=${null===h||void 0===h?void 0:h.id}&title=${null===h||void 0===h?void 0:h.title}&tags=&cacheSettingsUpdateAt=2020-08-11T15%3A19%3A49.000Z&settingsVersion=19`;fetch(e).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>{var e,i,n,o,r,l;s(null===t||void 0===t||null===(e=t.sizings)||void 0===e||null===(i=e[0])||void 0===i||null===(n=i.layout)||void 0===n||null===(o=n.data)||void 0===o||null===(r=o[0])||void 0===r||null===(l=r.data)||void 0===l?void 0:l.url)})).catch((t=>{console.error("Error fetching data:",t)}))}),[]);const w=`${k.i7`
119
+ `} infinite 1.5s linear`;return(0,f.jsx)(c.az,{width:"100%",height:"fit-content",paddingTop:100,borderRadius:"3xl",children:(0,f.jsxs)(u.B,{direction:"column",width:"100%",height:"0px",justifyContent:"flex-end",children:[(0,f.jsx)(s.o,{animation:"vertical"===h?w:y,children:"vertical"===h?(0,f.jsx)(L.A,{sx:{color:"white !important",fontSize:m,filter:"drop-shadow(0 0 20px black);"}}):(0,f.jsx)(B.A,{sx:{color:"white !important",fontSize:m,filter:"drop-shadow(0 0 20px black);"}})}),(0,f.jsx)(s.o,{children:(0,f.jsx)(j.E,{textShadow:"dark-lg",fontSize:g+"px",fontWeight:"semibold",sx:{color:"white !important",textShadow:"0px 0px 20px black !important;"},children:"swipe for more"})})]})})};var D=function(t){const[e,i]=(0,v.QN)("isFirstIndicatorRenderDone"),[o]=(0,v.QN)("indicatorRenderSeconds"),r=o,l=t.swipeUp;return(0,n.useEffect)((()=>{const t=setTimeout((()=>{i(!0)}),3e3+1e3*r);return()=>{clearTimeout(t)}}),[]),e?null:(0,f.jsx)(O,{showForSeconds:.8*r,delayInSeconds:3,swipeUp:l})},R=i(8781),W=i(5144),V=i(4459);const Q="15px";var M=i(1351),H=i(6157),U=i(5551);var X=function(t){const[e]=(0,v.QN)("isInDesignMode"),[i]=(0,v.QN)("isDemoBrand"),[o]=(0,v.QN)("whatmoreSecondaryColor"),[r]=(0,v.QN)("whatmorePrimaryFont"),[a]=(0,v.QN)("whatmoreShopId"),[d,h,m,g]=(0,x.A)(),[w,y]=(0,n.useState)(!1),b=t.product,C=t.event,{whatmoreWidgetSourceDetails:S}=(0,n.useContext)(U.B),k=.1*m,I=.95*g,_=.05*g;return(0,f.jsx)(u.B,{direction:"row",height:k,justifyContent:"center",alignItems:"center",alignContent:"center",bgGradient:"linear(to-b, transparent, blackAlpha.400, blackAlpha.600)",children:(0,f.jsx)(u.B,{direction:"column",width:"fit-content",height:k,justifyContent:"center",alignItems:"center",alignContent:"center",children:(0,f.jsx)(c.az,{width:I+"px",height:"fit-content",padding:"6px",marginTop:Q,backgroundColor:o,borderRadius:"5px",animation:w?W.jd:null,onAnimationEnd:()=>{y(!1)},marginBottom:(0,p.qw1)(a),onClick:()=>{y(!0),function(t,n){e||i||(async()=>{(0,l.Pb)(t,n),(0,M.kz)({userInteractionType:H.O.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:S,event:t,productList:[n],ctaList:t.cta})})()}(C,b),window.location.href=function(t){return(0,p.BLb)(a)?t.product_link+"?"+(0,p.VCz)(a)+"&"+(0,p.Spk)(a)+"&"+(0,p.$lz)(a):t.product_link}(b)},_hover:{backgroundColor:(0,V.YU)(o,8)},cursor:"pointer",children:(0,f.jsx)(s.o,{children:(0,f.jsx)(j.E,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*_+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:r+" !important",color:"white !important"},children:(0,p.Qed)(a)})})})})})},Y=i(4892),$=i(8538),q=i(7458),K=i(2159),G=i(9537),Z=i(173),J=(i(6125),i(4905));const tt={en:{add_to_cart:"ADD TO CART",buy_now:"BUY NOW",more_info:"MORE INFO",size:"Size",color:"Color",description:"Description",like:"Like",share:"Share",talk_to_us:"Talk to Us",done:"Done",cancel:"Cancel",view_product:"View Product",go_to_cart:"Go to Cart",shop_now:"SHOP NOW"},ar:{add_to_cart:"\u0623\u0636\u0641 \u0625\u0644\u0649 \u0627\u0644\u0633\u0644\u0629",buy_now:"\u0627\u0634\u062a\u0631\u0650 \u0627\u0644\u0622\u0646",more_info:"\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a",size:"\u0627\u0644\u062d\u062c\u0645",color:"\u0627\u0644\u0644\u0648\u0646",description:"\u0627\u0644\u0648\u0635\u0641",like:"\u0623\u0639\u062c\u0628\u0646\u064a",share:"\u0645\u0634\u0627\u0631\u0643\u0629",talk_to_us:"\u062a\u062d\u062f\u062b \u0625\u0644\u064a\u0646\u0627",done:"\u062a\u0645",cancel:"\u0625\u0644\u063a\u0627\u0621",view_product:"\u0639\u0631\u0636 \u0627\u0644\u0645\u0646\u062a\u062c",go_to_cart:"\u0627\u0630\u0647\u0628 \u0625\u0644\u0649 \u0627\u0644\u0633\u0644\u0629",watch_and_buy:"\u0634\u0627\u0647\u062f \u0648\u0627\u0634\u062a\u0631\u064a"},da:{add_to_cart:"In den Warenkorb",buy_now:"Jetzt kaufen",more_info:"Mehr Infos",size:"Gr\xf6\xdfe",color:"Farbe",description:"Beschreibung",like:"Gef\xe4llt mir",share:"Teilen",talk_to_us:"Sprechen Sie mit uns",done:"Fertig",cancel:"Abbrechen",view_product:"Produkt ansehen",go_to_cart:"Zum Warenkorb",watch_and_buy:"Ansehen und kaufen"},de:{add_to_cart:"In den Warenkorb",buy_now:"Jetzt kaufen",more_info:"Mehr Infos",size:"Gr\xf6\xdfe",color:"Farbe",description:"Beschreibung",like:"Gef\xe4llt mir",share:"Teilen",talk_to_us:"Sprechen Sie mit uns",done:"Fertig",cancel:"Abbrechen",view_product:"Produkt ansehen",go_to_cart:"Zum Warenkorb",watch_and_buy:"Ansehen und kaufen"},es:{add_to_cart:"A\xf1adir al carrito",buy_now:"Comprar ahora",more_info:"M\xe1s informaci\xf3n",size:"Tama\xf1o",color:"Color",description:"Descripci\xf3n",like:"Me gusta",share:"Compartir",talk_to_us:"Habla con nosotros",done:"Hecho",cancel:"Cancelar",view_product:"Ver producto",go_to_cart:"Ir al carrito",watch_and_buy:"Ver y comprar"},fr:{add_to_cart:"Ajouter au panier",buy_now:"Acheter maintenant",more_info:"Plus d'infos",size:"Taille",color:"Couleur",description:"Description",like:"J'aime",share:"Partager",talk_to_us:"Parlez-nous",done:"Valider",cancel:"Annuler",view_product:"Voir le produit",go_to_cart:"Aller au panier",watch_and_buy:"Regarder et acheter"},ja:{add_to_cart:"\u30ab\u30fc\u30c8\u306b\u8ffd\u52a0",buy_now:"\u4eca\u3059\u3050\u8cfc\u5165",more_info:"\u8a73\u7d30\u60c5\u5831",size:"\u30b5\u30a4\u30ba",color:"\u8272",description:"\u8aac\u660e",like:"\u3044\u3044\u306d",share:"\u5171\u6709",talk_to_us:"\u304a\u554f\u3044\u5408\u308f\u305b",done:"\u5b8c\u4e86",cancel:"\u30ad\u30e3\u30f3\u30bb\u30eb",view_product:"\u5546\u54c1\u3092\u898b\u308b",go_to_cart:"\u30ab\u30fc\u30c8\u306b\u9032\u3080",watch_and_buy:"\u8996\u8074\u3057\u3066\u8cfc\u5165",shop_now:"\u5546\u54c1\u3092\u898b\u308b"},nl:{add_to_cart:"Aan winkelwagentje toevoegen",buy_now:"Nu kopen",more_info:"Meer informatie",size:"Maat",color:"Kleur",description:"Beschrijving",like:"Vind ik leuk",share:"Delen",talk_to_us:"Praat met ons",done:"Klaar",cancel:"Annuleren",view_product:"Bekijk product",go_to_cart:"Ga naar winkelwagentje",watch_and_buy:"Kijk en koop"},pt:{add_to_cart:"Adicionar ao carrinho",buy_now:"Comprar agora",more_info:"Mais informa\xe7\xf5es",size:"Tamanho",color:"Cor",description:"Descri\xe7\xe3o",like:"Curtir",share:"Compartilhar",talk_to_us:"Fale conosco",done:"Conclu\xeddo",cancel:"Cancelar",view_product:"Ver produto",go_to_cart:"Ir para o carrinho",watch_and_buy:"Assistir e comprar"},zh:{add_to_cart:"\u52a0\u5165\u8d2d\u7269\u8f66",buy_now:"\u7acb\u5373\u8d2d\u4e70",more_info:"\u66f4\u591a\u4fe1\u606f",size:"\u5c3a\u5bf8",color:"\u989c\u8272",description:"\u63cf\u8ff0",like:"\u559c\u6b22",share:"\u5206\u4eab",talk_to_us:"\u8054\u7cfb\u6211\u4eec",done:"\u5b8c\u6210",cancel:"\u53d6\u6d88",view_product:"\u67e5\u770b\u5546\u54c1",go_to_cart:"\u524d\u5f80\u8d2d\u7269\u8f66",watch_and_buy:"\u89c2\u770b\u5e76\u8d2d\u4e70"}};function et(t){var e,i,o;const[r]=(0,v.QN)("whatmoreSecondaryColor"),[l]=(0,v.QN)("whatmorePrimaryFont"),[a]=(0,v.QN)("whatmoreShopId"),[d,s]=(0,n.useState)(!1),h=null!==(e=t.baseFontSize)&&void 0!==e?e:10,x=t.onClick,m=t.width,g=t.height,w=t.title,y=t.showInProgressIcon;return(0,f.jsxs)(c.az,{display:"flex",width:m,height:g,padding:"2x",boxShadow:"lg",animation:d?W.jd:null,onAnimationEnd:()=>{s(!1)},cursor:"pointer",children:["awaitingVariantSelection"==t.cartState&&(0,f.jsx)(u.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",backgroundColor:"white",onClick:e=>{e.stopPropagation(),t.updateCartState("init"),t.setProductVariantTitle(t.productTitle),s(!0)},children:(0,f.jsxs)(j.E,{lineHeight:"100%",fontSize:1.4*h+"px !important",fontWeight:"semibold !important",sx:{fontFamily:l+" !important",color:"#343434 !important"},children:["\xa0",null!==(i=null===tt||void 0===tt||null===(o=tt[null===t||void 0===t?void 0:t.websiteLanguage])||void 0===o?void 0:o.cancel)&&void 0!==i?i:"Cancel","\xa0"]})}),(0,f.jsxs)(u.B,{direction:"row",backgroundColor:y?(0,V.YU)(r,8):r,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",onClick:t=>{t.stopPropagation(),x(),s(!0)},children:[(0,f.jsxs)(j.E,{lineHeight:"100%",fontSize:1.4*h+"px !important",fontWeight:"semibold !important",sx:{fontFamily:l+" !important",color:(0,p.Hfu)(a)+" !important"},children:["\xa0",w,"\xa0"]}),y?(0,f.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,f.jsx)(Z.A,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*h+"px"}})}):(0,f.jsx)(f.Fragment,{})]})]})}function it(t){var e,i,o;const[r]=(0,v.QN)("whatmoreSecondaryColor"),[l]=(0,v.QN)("whatmorePrimaryFont"),[a]=(0,v.QN)("whatmoreShopId"),[d,h]=(0,n.useState)(!1),x=null!==(e=t.baseFontSize)&&void 0!==e?e:10,m=t.onClick,g=t.width,w=t.height;return(0,f.jsx)(c.az,{width:g,height:w,padding:"2x",boxShadow:"lg",backgroundColor:"#000000"==(0,p.Wc_)(a)?r:(0,p.Wc_)(a),onClick:t=>{t.stopPropagation(),m(),h(!0)},animation:d?W.jd:null,onAnimationEnd:()=>{h(!1)},cursor:"pointer",children:(0,f.jsx)(u.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",children:(0,f.jsx)(s.o,{children:(0,f.jsxs)(j.E,{lineHeight:"100%",fontSize:1.4*x+"px !important",fontWeight:"semibold !important",sx:{fontFamily:l+" !important",color:(0,p.Hfu)(a)+" !important"},children:["\xa0","ADD TO CART"!=(0,p.KPq)(a)?(0,p.KPq)(a):null!==(i=null===tt||void 0===tt||null===(o=tt[null===t||void 0===t?void 0:t.websiteLanguage])||void 0===o?void 0:o.add_to_cart)&&void 0!==i?i:(0,p.KPq)(a),"\xa0"]})})})})}function nt(t){var e;const[i]=(0,v.QN)("whatmorePrimaryFont"),n=null!==(e=t.baseFontSize)&&void 0!==e?e:10,o=t.width,r=t.height;return(0,f.jsx)(c.az,{width:o,height:r,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:"gray",borderWidth:"1px",onClick:t=>{t.stopPropagation()},children:(0,f.jsx)(u.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:(0,f.jsxs)(j.E,{color:"gray",lineHeight:"100%",fontSize:1.3*n+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:"gray !important"},children:["\xa0"," Sold Out ","\xa0"]})})})}function ot(t){var e;const[i]=(0,v.QN)("whatmoreSecondaryColor"),[n]=(0,v.QN)("whatmorePrimaryFont"),[o]=(0,v.QN)("whatmoreShopId"),r=null!==(e=t.baseFontSize)&&void 0!==e?e:10,l=t.onClick,a=t.cartCount,d=t.width,h=t.height,x=t.onCartIconClick;return(0,f.jsx)(c.az,{width:d,height:h,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:i,borderWidth:"1px",onClick:t=>{t.stopPropagation()},cursor:"pointer",children:(0,f.jsxs)(u.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:[(0,f.jsx)(s.o,{paddingX:"5px",onClick:()=>{x()},children:(0,p.DiI)(o)?(0,f.jsx)(J.$,{size:"sm",_hover:{bg:i},sx:{bg:i},children:(0,f.jsx)(j.E,{paddingX:"6px",color:"white",sx:{fontSize:.85*r},children:"GO TO CART"})}):(0,f.jsx)(G.A,{sx:{color:i,fontSize:1.6*r}})}),(0,f.jsx)(j.E,{color:i,fontSize:1.3*r+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important"},children:a}),(0,f.jsx)(s.o,{paddingX:"5px",onClick:t=>{t.stopPropagation(),l()},children:(0,f.jsx)(K.A,{sx:{color:i,fontSize:1.6*r}})})]})})}var rt=function(t){var e,i,n,o,r,l,a;const[d]=(0,v.QN)("websiteLanguage"),s=null!==(e=t.baseFontSize)&&void 0!==e?e:10,c=null===(i=t.showAddedToCart)||void 0===i||i,u=t.cartState,h=t.cartCount,p=t.onClickAtc,x=t.onCartIconClick;function m(){p()}const g=null!==(n=t.width)&&void 0!==n?n:"100%",w=null!==(o=t.height)&&void 0!==o?o:"100%";return"errored"==u?(0,f.jsx)(nt,{baseFontSize:s,width:g,height:w}):"init"==u?0==h?(0,f.jsx)(it,{onClick:m,baseFontSize:s,width:g,height:w,websiteLanguage:d}):c?(0,f.jsx)(ot,{onClick:m,baseFontSize:s,cartCount:h,width:g,height:w,onCartIconClick:x}):(0,f.jsx)(it,{onClick:m,baseFontSize:s,width:g,height:w,websiteLanguage:d}):(0,f.jsx)(et,{onClick:m,setProductVariantTitle:t.setProductVariantTitle,cartState:u,productTitle:null===(r=t.product)||void 0===r?void 0:r.title,updateCartState:t.updateCartState,baseFontSize:s,width:g,height:w,title:"awaitingVariantSelection"==u?null!==(l=null===tt||void 0===tt||null===(a=tt[d])||void 0===a?void 0:a.done)&&void 0!==l?l:"Done":"",showInProgressIcon:"atcApiCallInProgress"==u||"productVariantDetailsApiCallInProgress"==u,websiteLanguage:d})},lt=i(4533),at=i(6051),dt=i(1745);const st=(0,v.Xd)("isInDesignMode"),ct=(0,v.Xd)("isDemoBrand");async function ut(t,e,i,n,o,r,l,a,d){return"shopify"==i?(0,dt.RX)(t,e,n,l,a,d):(st||ct||(async()=>{(0,lt.Fu)(o,r,l,a,d)})(),(0,at.It)(null===t||void 0===t?void 0:t[0],e,n))}function ht(t,e){return"shopify"==t?(0,dt.iL)(e):(0,at.pV)(e)}var pt=i(852);var vt=function(t,e,i){const[o]=(0,v.QN)("whatmoreShopId"),[r]=(0,v.QN)("isInDesignMode"),[a]=(0,v.QN)("isDemoBrand"),[d,s]=(0,n.useState)(null),c=(0,n.useRef)(null),{closeClickComponent:u}=(0,n.useContext)(_i),{whatmoreUserInfo:h}=(0,n.useContext)(U.B),[x,g]=(0,n.useState)({state:"init",cart_count:t});function f(t,e){g({state:t,cart_count:null!==e&&void 0!==e?e:x.cart_count}),"init"!=t&&"errored"!=t?(0,v.t2)("whatmoreAllowAutoSlide",!1):(0,v.t2)("whatmoreAllowAutoSlide",!0)}function w(t){const e=c.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));return 0==e.length?null:e[0].id}function j(t){var e=[],i=[],n=[];return t.variants.forEach((o=>{var r,l,a;o.option1&&e.push({option:o.option1,available:null===(r=o.available)||void 0===r||r,type:t.options[0].name}),o.option2&&i.push({option:o.option2,available:null===(l=o.available)||void 0===l||l,type:t.options[1].name}),o.option3&&n.push({option:o.option3,available:null===(a=o.available)||void 0===a||a,type:t.options[2].name})})),e=e.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),i=i.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),n=n.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),[e,i,n]}function y(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}function b(t){return t[0].length<=1&&t[1].length<=1&&t[2].length<=1}function C(){if(c.current&&c.current.length>=1){return c.current.filter((t=>t.available)).length>=1}return!1}function S(t,e,i){r||a||(async()=>{(0,l.tO)(t,e,i)})()}function k(t,n){const r=w(t);if(!r)return void f("init",x.cart_count);f("atcApiCallInProgress",null);ut([r],1,(0,p.NCy)(o),o,i,e,n,null===i||void 0===i?void 0:i.location,null===h||void 0===h?void 0:h.userType).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(S(i,e,1),f("init",x.cart_count+1),(0,v.t2)("whatmoreAddedToCart",!0),"72550089015"!=o&&"24366857"!=o&&"68234805419"!=o&&"86879863060"!=o||!(0,v.Xd)("whatmoreAddedToCart")||(0,pt.initiateCartSliderEvent)(o,(()=>{}),100,window.location.hostname,r),(0,p.MPe)(o)&&setTimeout((()=>function(){const t=window.location.origin+"/cart";window.location.href=t}()),500),t))).catch((t=>{f("errored",null),console.error("Error while adding to cart:",t)}))}return[x,function(t){const n=[];f("productVariantDetailsApiCallInProgress",null),Promise.all(i.products.map((t=>(0,m.M)(t,(0,p.NCy)(o),o).then((e=>{c.current=e.variants;const i=j(e);if(s(i),b(i)&&C()){const e=w([y(i[0]),y(i[1]),y(i[2])]);return e?(n.push(t),e):void f("init",x.cart_count)}}))))).then((r=>{const l=r.filter((t=>void 0!=t));ut(l,1,(0,p.NCy)(o),o,i,e,t,null===i||void 0===i?void 0:i.location,null===h||void 0===h?void 0:h.userType).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(n.forEach((t=>{S(i,t,1)})),f("init",x.cart_count+(null===l||void 0===l?void 0:l.length)),(0,v.t2)("whatmoreAddedToCart",!0),t))).catch((t=>{f("errored",null),console.error("Error while adding to cart:",t)}))}))},f,d,function(t,i=!1){f("productVariantDetailsApiCallInProgress",null),(0,m.M)(e,(0,p.NCy)(o),o).then((e=>{c.current=e.variants;const n=j(e);s(n),b(n)||i?C()?k([y(n[0]),y(n[1]),y(n[2])],t):f("errored",null):f("awaitingVariantSelection",null)})).catch((t=>{f("errored",null)}))},k,function(t){var e,i,n,r;const l=c.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));if(0==l.length)return null;const a=null!==(e=l[0].price)&&void 0!==e?e:0,d=null!==(i=l[0].compare_at_price)&&void 0!==i?i:0;return{price:((0,p.NCy)(o),a),compare_price:((0,p.NCy)(o),d),title:null!==(n=null===(r=l[0])||void 0===r?void 0:r.title)&&void 0!==n?n:""}},function(){"do_nothing"!==(0,p.m4S)(o)&&("go_to_cart_page"!==(0,p.m4S)(o)?"open_cart_slider"!==(0,p.m4S)(o)||null!==u&&u():ht((0,p.NCy)(o),o))}]},xt=i(2720),mt=i(3755),gt=i(7973);var ft=function(t){var e,i,o;const r=t.productVariantOptions,l=null!==(e=t.width)&&void 0!==e?e:"100%",a=(t.height,t.maxHeight),d=null!==(i=t.baseFontSize)&&void 0!==i?i:10,h=t.onOptionSelected,p=null!==(o=t.optionTitleColor)&&void 0!==o?o:"black",x=t.data,[m]=(0,v.QN)("whatmorePrimaryFont"),g=(0,n.useRef)(null),[w,b]=(0,n.useState)(!1),[C,S]=(0,n.useState)(0),[k,I]=(0,n.useState)(0);function _(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}const[z,E]=(0,n.useState)([_(r[0]),_(r[1]),_(r[2])]);return(0,n.useEffect)((()=>{h(z)}),[z]),(0,f.jsx)(u.B,{ref:g,direction:"column",width:l,maxHeight:a,justifyContent:"flex-start",alignItems:"center",spacing:"2px",paddingY:"2px",overflowY:"auto",onTouchStart:t=>{g.current&&(b(!0),S(t.touches[0].clientY),I(g.current.scrollTop))},onTouchMove:t=>{if(!w||!g.current)return;const e=t.touches[0].clientY,i=1.5*(C-e);g.current.scrollTop=k+i,t.preventDefault()},onTouchEnd:()=>{b(!1)},onWheel:t=>{if(!g.current)return;let e=0===t.deltaMode?1:15;g.current.scrollTop+=t.deltaY*e},sx:{"&::-webkit-scrollbar":{width:"4px"},"&::-webkit-scrollbar-track":{width:"6px",background:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{background:"#888",borderRadius:"24px"},"&::-webkit-scrollbar-thumb:hover":{background:"#555"},"overflow-y":"scroll !important","-webkit-overflow-scrolling":"touch"},children:r.map(((e,i)=>{var n;if(0==e.length||"mlveda_country"==(null===e||void 0===e||null===(n=e[0])||void 0===n?void 0:n.type))return;const o=e.every((e=>{var i,n,o,r,l,a;return(null===t||void 0===t||null===(i=t.finalArr)||void 0===i||null===(n=i.finalArr)||void 0===n||null===(o=n.find((t=>(null===t||void 0===t?void 0:t.color)===(null===e||void 0===e?void 0:e.option))))||void 0===o?void 0:o.src)||(null===t||void 0===t||null===(r=t.finalArr)||void 0===r||null===(l=r.finalArrExternal)||void 0===l||null===(a=l.find((t=>(null===t||void 0===t?void 0:t.color)===(null===e||void 0===e?void 0:e.option))))||void 0===a?void 0:a.optionsrc)}));return(0,f.jsxs)(u.B,{width:"100%",direction:"column",alignItems:"center",justifyContent:"flex-start",paddingY:"2px",children:[(0,f.jsx)(s.o,{width:"100%",children:(0,f.jsx)(xt.c,{color:"blackAlpha.500",size:"1px",width:"20%"})}),(0,f.jsxs)(j.E,{as:"b",fontSize:1.2*d+"px",sx:{color:p+" !important",fontFamily:m+" !important"},align:"center",marginY:"2px",children:["\xa0",e[0].type,"\xa0"]}),(0,f.jsx)(mt.s,{gap:"6px",wrap:"wrap",justify:"center",paddingY:"2px",children:e.map(((e,n)=>{var r,l,a,s,u,h,p,v;return(0==i||(null===x||void 0===x||null===(r=x.variants)||void 0===r?void 0:r.find((t=>t[`option${i}`]==(null===z||void 0===z?void 0:z[i-1])&&t[`option${i+1}`]==(null===e||void 0===e?void 0:e.option)))))&&(0,f.jsxs)(c.az,{onClick:t=>{t.stopPropagation(),e.available&&function(t,e){if(2==e)E([z[0],z[1],t]);else if(1==e){var i,n;E([z[0],t,null===x||void 0===x||null===(i=x.variants)||void 0===i||null===(n=i.find((e=>(null===e||void 0===e?void 0:e.option2)==t)))||void 0===n?void 0:n.option3])}else{var o,r,l,a,d,s;const e=null===x||void 0===x||null===(o=x.variants)||void 0===o||null===(r=o.find((e=>(null===e||void 0===e?void 0:e.option1)==t)))||void 0===r?void 0:r.option2;E([t,null===x||void 0===x||null===(l=x.variants)||void 0===l||null===(a=l.find((e=>(null===e||void 0===e?void 0:e.option1)==t)))||void 0===a?void 0:a.option2,null===x||void 0===x||null===(d=x.variants)||void 0===d||null===(s=d.find((t=>(null===t||void 0===t?void 0:t.option2)==e)))||void 0===s?void 0:s.option3])}}(e.option,i)},backgroundColor:e.option===z[i]?"rgba(0, 0, 0, 0.7)":"white",border:e.option===z[i]?"1px solid #ffffff":"1px solid black",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:e.option===z[i]?"0 0 8px rgba(0, 0, 0, 0.8)":"none",marginY:"2px",width:"fit-content",padding:o?"0px":"8px",borderRadius:o?"50%":"0",children:[!o&&(0,f.jsxs)(j.E,{as:e.available?"samp":"s",fontSize:.8*d+"px",sx:{color:e.option===z[i]?"white":(e.available?"black":"gray")+" !important",fontFamily:m+" !important"},align:"center",paddingX:(g=e.option,g.length>=3?"0px":.5*d+"px"),children:["\xa0",e.option,"\xa0"]}),o&&(0,f.jsx)(y._,{width:"58px",height:"58px",style:{cursor:null!==e&&void 0!==e&&e.available?"pointer":"not-allowed",opacity:null!==e&&void 0!==e&&e.available?1:.5,filter:null!==e&&void 0!==e&&e.available?"none":"grayscale(100%)",borderRadius:o?"50%":"100%"},src:(0,gt.b)(null!==(l=null===t||void 0===t||null===(a=t.finalArr)||void 0===a||null===(s=a.finalArr)||void 0===s||null===(u=s.find((t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option))))||void 0===u?void 0:u.src)&&void 0!==l?l:null===t||void 0===t||null===(h=t.finalArr)||void 0===h||null===(p=h.finalArrExternal)||void 0===p||null===(v=p.find((t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option))))||void 0===v?void 0:v.optionsrc,"?width=400&height=400")})]},n);var g}))},i)]},i)}))})},wt=i(6594),jt=i(4833);var yt=function(t){var e,i,o,r,a,d,s,h;const[g]=(0,v.QN)("isInDesignMode"),[w]=(0,v.QN)("isDemoBrand"),[b]=(0,v.QN)("whatmoreSecondaryColor"),C=(0,v.Xd)("whatmoreSecondaryColorShade900"),[S]=(0,v.QN)("whatmorePrimaryFont"),[k]=(0,v.QN)("whatmoreShopId"),[I,_,z,E]=(0,x.A)(),[T,N]=(0,n.useState)(!1),[F,A]=(0,n.useState)(t.product),P=(0,v.Xd)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:L}=(0,n.useContext)(U.B),[B,O,D,R,X,K,G,tt]=vt(0,F,t.event),[et,it]=(0,n.useState)(null),[nt,ot]=(0,n.useState)(parseFloat(F.price)),[lt,at]=(0,n.useState)(parseFloat(F.compare_price)),[dt,st]=(0,n.useState)(null===F||void 0===F?void 0:F.title),[ct,ut]=(0,n.useState)(F.currency),[ht,pt]=(0,n.useState)(null),xt=t.event,mt=t.productClickHandler,{whatmoreIsPreviewMode:yt}=(0,n.useContext)(U.B),[bt,Ct]=(0,n.useState)(null),[St,kt]=(0,n.useState)(!1),[It,_t]=(0,n.useState)(!1);if((0,n.useEffect)((()=>{(0,p.w4b)(k)?(0,wt.ck)(F,(0,p.NCy)(k),k).then((t=>{A(t),ot(parseFloat(t.price)),at(parseFloat(t.compare_price)),ut(t.currency),kt(!0)})).catch((t=>{kt(!0)})):(async()=>{try{var t,e,i,n,o,r;const l=await(0,m.M)(F,(0,p.NCy)(k),k);pt(l),ot((null!==(t=null===l||void 0===l||null===(e=l.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.price)&&void 0!==t?t:null===l||void 0===l?void 0:l.price)/100),at((null!==(n=null===l||void 0===l||null===(o=l.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.compare_at_price)&&void 0!==n?n:null===l||void 0===l?void 0:l.compare_at_price)/100),kt(!0)}catch(l){kt(!0)}})(),!(0,p.E8r)(k)||!("in_stock"in xt)||null!==xt&&void 0!==xt&&xt.in_stock||D("errored")}),[]),(0,n.useEffect)((()=>{var t,e;const i=null!=ht?null===ht||void 0===ht||null===(t=ht.options)||void 0===t?void 0:t.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})):-1,n=-1!==i?null===ht||void 0===ht||null===(e=ht.variants)||void 0===e?void 0:e.map((t=>{var e,n;const o=null===t||void 0===t?void 0:t[`option${i+1}`];return null!==t&&void 0!==t&&null!==(e=t.featured_image)&&void 0!==e&&e.src?{color:o,src:null===t||void 0===t||null===(n=t.featured_image)||void 0===n?void 0:n.src}:null})):[];let o=[];var r;-1!==i&&(o=null===ht||void 0===ht||null===(r=ht.images)||void 0===r?void 0:r.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc}))));Ct({position:i,finalArr:n,finalArrExternal:o})}),[ht]),!St)return(0,f.jsx)(f.Fragment,{});var zt=.68*E,Et=.55*zt,Tt=.4*zt,Nt=zt*(.55-.4),Ft=zt+"px",At=Tt+"px",Pt=Nt+"px",Lt=.12*Tt;const Bt=(0,p.XQu)(k);function Ot(){window.location.href=function(t){return(0,p.BLb)(k)?t.product_link+"?"+(0,p.VCz)(k)+"&"+(0,p.Spk)(k)+"&"+(0,p.$lz)(k):t.product_link}(F)}const Dt=L.landingLocationType,Rt=L.templateType,Wt=(0,jt.Wd)(Dt)+(0,jt.gf)(Rt)+(null!==xt&&void 0!==xt&&xt.isRelatedEvent?"R":"E")+"_"+(null===xt||void 0===xt?void 0:xt.event_id),Vt=(0,p.HKH)(k)&&t.activeProductsCount>1&&"init"==B.state&&0==B.cart_count;return(0,f.jsxs)(u.B,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:Q,marginBottom:(0,p.qw1)(k),width:Ft,height:"fit-content",boxShadow:"round"==P?"dark-lg":null,onClick:()=>{!function(t,e){g||w||(async()=>{(0,l.Pb)(t,e)})(),"72550089015"==k?Ot():mt(e),N(!0)}(xt,F)},backgroundColor:(0,V.YU)("#ffffff",(0,p.p2R)(k)),animation:T?W.jd:W.so,borderRadius:"round"==P?"xl":null,overflow:"hidden",spacing:0,sx:{borderWidth:(0,p.YcK)(k),borderColor:(0,p.Fwt)(k)},children:[(0,f.jsxs)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,f.jsx)(c.az,{height:At,width:At,children:(0,f.jsx)(y._,{className:"product-tile-image",width:At,height:At,src:(0,gt.b)(null!==(e=null!==(i=null===bt||void 0===bt||null===(o=bt.finalArr)||void 0===o||null===(r=o.find((t=>(null===t||void 0===t?void 0:t.color)==(null===et||void 0===et?void 0:et[null===bt||void 0===bt?void 0:bt.position]))))||void 0===r?void 0:r.src)&&void 0!==i?i:null===bt||void 0===bt||null===(a=bt.finalArrExternal)||void 0===a||null===(d=a.find((t=>(null===t||void 0===t?void 0:t.color)==(null===et||void 0===et?void 0:et[null===bt||void 0===bt?void 0:bt.position]))))||void 0===d?void 0:d.src)&&void 0!==e?e:F.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,p.KZe)(k)+" !important"}})}),(0,f.jsxs)(c.az,{height:At,width:zt-Tt+"px",children:[(0,f.jsxs)(u.B,{direction:"column",className:"wht-pr-title",justifyContent:(0,p.UlM)(k)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"4px",paddingY:"10px",children:[(0,f.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,p.uoB)(k),"important"),t.style.setProperty("font-size",1.1*Lt*(0,p.rh$)(k)+"px","important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",S,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"),t.style.setProperty("padding","0","important"),t.style.setProperty("margin-bottom","4px","important"),t.style.setProperty("font-weight","normal"))},children:(0,$.v)(dt,"prod-tile")}),(0,p.Nzx)(k)?(0,f.jsxs)(u.B,{className:"whatmore-product-atc-price",direction:(0,p.vw2)(k)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",borderRadius:"round"==P?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"4px",sx:{margin:"0px !important",marginBottom:"4px !important"},children:[St&&(0,f.jsxs)(j.E,{noOfLines:1,fontSize:.9*Lt*(0,p.rh$)(k)+"px !important",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:S+" !important",color:(0,p.uoB)(k)+" !important",padding:"0px !important",letterSpacing:"normal !important",margin:"0px !important"},children:["\xa0"," "+(0,wt.Sb)("70756368633"===k?parseFloat(null===xt||void 0===xt||null===(s=xt.products)||void 0===s||null===(h=s[0])||void 0===h?void 0:h.price):null!==nt&&void 0!==nt?nt:null===F||void 0===F?void 0:F.price,"",k,ct)," \xa0"]}),(0,q.P)(nt,lt)&&St?(0,f.jsxs)(j.E,{noOfLines:1,fontSize:.9*Lt*(0,p.rh$)(k)+"px !important",fontWeight:"medium !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:S+" !important",color:(0,p.gld)(k)+" !important",margin:"0px !important",letterSpacing:"normal !important",textDecoration:0===nt?"":"line-through !important"},children:[" ",(0,wt.Sb)(null!==lt&&void 0!==lt?lt:null===F||void 0===F?void 0:F.compare_price,"",k,ct)]}):(0,f.jsx)(f.Fragment,{})]}):(0,f.jsx)(f.Fragment,{}),(0,f.jsx)(j.E,{fontSize:.82*Lt*(0,p.rh$)(k)+"px",fontWeight:"medium",lineHeight:"110%",sx:{margin:"0px !important",fontFamily:S+" !important",color:(0,p.Br1)(k)+" !important"},children:yt?(0,p.p6A)(k):(0,p.i2h)(k)})]}),(0,p.UlM)(k)?(0,f.jsx)(u.B,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,f.jsxs)(u.B,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,f.jsx)(u.B,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:C,sx:{borderRadius:"round"==P?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,p.SK$)(k)?(0,f.jsx)(J.$,{size:"sm",_hover:{bg:b},sx:{bg:b},children:(0,f.jsx)(j.E,{color:"white",paddingX:"6px",fontSize:.8*Lt+"px",children:"VIEW PRODUCT"})}):(0,f.jsx)(Y.A,{sx:{color:b,fontSize:1.3*Lt+"px"}})}),(0,f.jsx)(c.az,{width:"2px"})]})}):(0,f.jsx)(f.Fragment,{})]})]}),"awaitingVariantSelection"==B.state&&null!=R?(0,f.jsx)(c.az,{width:"100%",height:"fit-content",marginTop:.1*Et+"px",marginBottom:.1*Et+"px",overflowY:"auto",overflowX:"hidden",maxHeight:Et*Bt+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,f.jsx)(ft,{maxHeight:Et*Bt*.5+"px",width:Ft,height:"fit-content",event:xt,product:F,finalArr:bt,data:ht,productVariantOptions:R,baseFontSize:1.2*Lt,onOptionSelected:t=>{!function(t){it(t);const e=G(t);e&&(ot(e.price/100),at(e.compare_price/100),e.title.includes(" ")&&st(e.title))}(t)}})}):(0,f.jsx)(f.Fragment,{}),(0,f.jsxs)(u.B,{direction:"row",width:"100%",height:Pt,spacing:0,children:[(0,f.jsx)(u.B,{className:"whatmore-add-to-cart",direction:"row",width:"100%",height:Pt,children:(0,f.jsx)(rt,{baseFontSize:Vt?.2*Nt:.3*Nt,setProductVariantTitle:st,product:F,cartState:B.state,cartCount:B.cart_count,updateCartState:D,onClickAtc:t=>{"init"==B.state?(X(Wt),(0,M.kz)({userInteractionType:H.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:L,event:xt,productList:[F],ctaList:xt.cta})):"awaitingVariantSelection"==B.state&&(K(et,Wt),st(null===F||void 0===F?void 0:F.title))},onCartIconClick:()=>{tt()}})}),Vt&&(0,f.jsx)(u.B,{width:"100%",className:"wht-all-atc",sx:{fontSize:.28*Nt,flexDirection:"row",height:"100%",justifyContent:"center",alignItems:"center",bg:"white"},children:(0,f.jsx)(J.$,{disabled:It,sx:{cursor:"pointer",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",fontFamily:`${S} !important`,color:"black"},onClick:async t=>{t.stopPropagation();try{_t(!0),O(Wt),(0,M.kz)({userInteractionType:H.O.PRODUCT_TILE_ALL_ATC_CLICKED,widgetSourceDetails:L,event:xt,productList:xt.products,ctaList:xt.cta}),_t(!1)}catch(e){console.error("Failed to add items:",e),_t(!1)}},children:It?(0,f.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,f.jsx)(Z.A,{sx:{filter:"drop-shadow(0 0 15px black)",color:"#F5F5F5",fontSize:.3*Nt*2.5+"px"}})}):(0,f.jsx)(j.E,{fontFamily:S,children:"ADD ALL ITEMS"})})})]})]})},bt=i(2835),Ct=i(8397);var St=function(t){var e,i,n,o,r;const[a]=(0,v.QN)("isInDesignMode"),[d]=(0,v.QN)("isDemoBrand"),[h]=(0,v.QN)("whatmoreSecondaryColor"),[x]=(0,v.QN)("whatmorePrimaryFont"),[m]=(0,v.QN)("whatmoreShopId"),[g]=(0,v.QN)("websiteLanguage"),w=t.event,y=t.product,b=null!==(e=t.baseFontSize)&&void 0!==e?e:10,C=null!==(i=t.width)&&void 0!==i?i:"fit-content",S=null!==(n=t.height)&&void 0!==n?n:"fit-content";return(0,f.jsx)(Ct.N,{href:y.product_link,color:h,onClick:()=>{!function(t,e){a||d||(async()=>{(0,l.TJ)(t,e)})()}(w,y)},children:(0,f.jsx)(c.az,{width:C,height:S,padding:"2x",boxShadow:"lg",borderRadius:"md",backgroundColor:"white",children:(0,f.jsxs)(u.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",spacing:"5px",children:[(0,f.jsx)(s.o,{children:(0,f.jsx)(j.E,{lineHeight:"100%",fontSize:1.4*b,fontWeight:"semibold",sx:{fontFamily:x+" !important",color:h+" !important"},children:"MORE INFO"!=(0,p.KnH)(m)?(0,p.KnH)(m):null!==(o=null===tt||void 0===tt||null===(r=tt[g])||void 0===r?void 0:r.more_info)&&void 0!==o?o:(0,p.KnH)(m)})}),(0,f.jsx)(s.o,{children:(0,f.jsx)(Y.A,{sx:{color:h,fontSize:1.4*b}})})]})})})},kt=i(9408);function It(t){var e,i,o;const[r]=(0,v.QN)("whatmoreSecondaryColor"),[l]=(0,v.QN)("whatmorePrimaryFont"),[a]=(0,v.QN)("whatmoreShopId"),[d]=(0,v.QN)("websiteLanguage"),[s,h]=(0,n.useState)(!1),x=null!==(e=t.baseFontSize)&&void 0!==e?e:10,m=t.onClick,g=t.width,w=t.height,y=t.title;return(0,f.jsx)(c.az,{width:g,height:w,padding:"2x",boxShadow:"lg",backgroundColor:"#000000"==(0,p.Wc_)(a)?r:(0,p.Wc_)(a),onClick:t=>{t.stopPropagation(),m(),h(!0)},animation:s?W.jd:null,onAnimationEnd:()=>{h(!1)},cursor:"pointer",children:(0,f.jsx)(u.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:(0,f.jsxs)(j.E,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},lineHeight:"100%",fontSize:1.4*x+"px",fontWeight:"semibold",sx:{fontFamily:l+" !important",color:(0,p.Hfu)(a)+" !important"},children:["\xa0","SHOP NOW"==y&&null!==(i=null===tt||void 0===tt||null===(o=tt[d])||void 0===o?void 0:o.shop_now)&&void 0!==i?i:y,"\xa0"]})})})}var _t=function(t){var e,i,n;const[o]=(0,v.QN)("whatmoreShopId"),r=t.event,l=t.product,a=null!==(e=t.baseFontSize)&&void 0!==e?e:10,d=t.onShopNowClick,s=null!==(i=t.width)&&void 0!==i?i:"100%",c=null!==(n=t.height)&&void 0!==n?n:"100%";return(0,f.jsx)(It,{onClick:function(){d()},event:r,product:l,baseFontSize:a,width:s,height:c,title:(0,p.Qed)(o)})};var zt=function(t){var e,i,o,r,a;const[d]=(0,v.QN)("isInDesignMode"),[h]=(0,v.QN)("isDemoBrand"),[g]=(0,v.QN)("whatmorePrimaryFont"),[w]=(0,v.QN)("whatmoreShopId"),[b,C,S,k]=(0,x.A)(),[I,_]=(0,n.useState)(!1),[z,E]=(0,n.useState)(t.product),{whatmoreWidgetSourceDetails:T}=(0,n.useContext)(U.B),[N,F,A,P,L,B,O,D]=vt(0,z,t.event),[R,V]=(0,n.useState)(null),[X,Y]=(0,n.useState)(parseFloat(z.price)),[K,G]=(0,n.useState)(parseFloat(z.compare_price)),[Z,J]=(0,n.useState)(z.currency),[tt,et]=(0,n.useState)(!1),it=t.event,nt=t.productClickHandler,ot=null!==(e=t.tileWidthFactor)&&void 0!==e?e:1,lt=T.landingLocationType,at=T.templateType,dt=(0,jt.Wd)(lt)+(0,jt.gf)(at)+(null!==it&&void 0!==it&&it.isRelatedEvent?"R":"E")+"_"+(null===it||void 0===it?void 0:it.event_id);(0,n.useEffect)((()=>{(0,p.w4b)(w)?(0,wt.ck)(z,(0,p.NCy)(w),w).then((t=>{E(t),Y(parseFloat(t.price)),G(parseFloat(t.compare_price)),J(t.currency)})):(async()=>{const t=await(0,m.M)(z,(0,p.NCy)(w),w);Y(null===t||void 0===t?void 0:t.price),G(null===t||void 0===t?void 0:t.compare_at_price),et(!0)})()}),[]);var st=k*ot,ct=.3*st,ut=st+"px",ht=.7*ct,pt=.9*ht,xt=.12*ct;const mt=(0,p.XQu)(w);function gt(t,e){d||h||(async()=>{(0,l.Pb)(t,e)})(),nt(e),_(!0)}return(0,f.jsx)(u.B,{direction:"row",width:ut,height:"fit-content",justifyContent:"center",children:(0,f.jsx)(c.az,{marginTop:Q,marginBottom:(0,p.qw1)(w),width:ut,onClick:t=>{},animation:I?W.jd:null,borderRadius:"lg",onAnimationEnd:()=>{_(!1)},children:(0,f.jsxs)(u.B,{direction:"column",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",spacing:"0px",children:[(0,f.jsxs)(u.B,{direction:"row",width:"100%",height:"70%",justifyContent:"space-around",alignItems:"center",borderTopRadius:"lg",overflow:"hidden",onClick:()=>{gt(it,z)},children:[(0,f.jsx)(c.az,{height:ht+"px",width:ht+"px",children:(0,f.jsx)(u.B,{direction:"column",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",children:(0,f.jsx)(c.az,{height:pt+"px",width:pt+"px",borderRadius:"lg",bgColor:"gray.100",overflow:"hidden",children:(0,f.jsx)(y._,{width:pt+"px",height:pt+"px",src:z.thumbnail_image,objectFit:"cover"})})})}),(0,f.jsx)(c.az,{height:ht+"px",width:st-ht+"px",children:(0,f.jsxs)(u.B,{direction:"column",justifyContent:"space-between",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingY:"10px",spacing:"2px",children:[(0,f.jsx)(j.E,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*xt+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:g+" !important",color:"white !important"},children:(0,$.v)(z.title.toString())}),(0,f.jsxs)(u.B,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",marginTop:"5px",children:[(0,p.Nzx)(w)?(0,f.jsxs)(u.B,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignItems:"center",borderRadius:"lg",backgroundColor:"blackAlpha.500",paddingX:"10px",paddingY:"5px",children:[tt&&(0,f.jsx)(j.E,{noOfLines:1,fontSize:1*xt+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:g+" !important",color:"white !important"},children:" "+(0,wt.Sb)("28849832033"===w?parseFloat(null===it||void 0===it||null===(i=it.products)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.price):null!==X&&void 0!==X?X:null===z||void 0===z?void 0:z.price,"",w,Z)}),(0,f.jsx)(s.o,{children:(0,q.P)(z.price,z.compare_price)&&tt?(0,f.jsxs)(j.E,{noOfLines:1,fontSize:.8*xt+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:g+" !important",color:"#F9F6EE !important",textDecoration:"line-through !important"},children:[" ",(0,wt.Sb)("28849832033"===w?parseFloat(null===it||void 0===it||null===(r=it.products)||void 0===r||null===(a=r[0])||void 0===a?void 0:a.compare_price):null!==K&&void 0!==K?K:null===z||void 0===z?void 0:z.compare_price,"",w,Z)]}):(0,f.jsx)(f.Fragment,{})})]}):(0,f.jsx)(f.Fragment,{}),(0,f.jsx)(s.o,{children:(0,f.jsx)(bt.A,{storeId:w,productId:z.client_product_id,productLink:z.product_link,fontSize:1*xt,fontColor:"white"})})]})]})})]}),"awaitingVariantSelection"==N.state&&null!=P?(0,f.jsx)(c.az,{width:"100%",height:"fit-content",marginTop:.1*ct+"px",marginBottom:.1*ct+"px",overflowY:"auto",overflowX:"hidden",maxHeight:ct*mt+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,f.jsx)(ft,{width:ut,height:"fit-content",event:it,product:z,productVariantOptions:P,baseFontSize:1*xt,onOptionSelected:t=>{!function(t){V(t);const e=O(t);e&&(Y(e.price),G(e.compare_price))}(t)},optionTitleColor:"white"})}):(0,f.jsx)(f.Fragment,{}),(0,f.jsxs)(u.B,{direction:"row",width:"100%",height:"30%",justifyContent:"center",alignItems:"center",paddingBottom:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,f.jsx)(c.az,{width:"100%",height:"100%",children:(0,f.jsx)(St,{baseFontSize:.8*xt,event:it,product:z,width:"100%",height:"100%"})}),(0,f.jsx)(c.az,{width:"100%",height:"100%",borderRadius:"md",overflow:"hidden",children:(0,p.ZzM)(w)?(0,f.jsx)(_t,{baseFontSize:.8*xt,event:it,product:z,borderRadius:"md",onShopNowClick:t=>{gt(it,z)}}):(0,f.jsx)(f.Fragment,{children:"form"===(0,p.nWM)(w)?(0,f.jsx)(kt.default,{baseFontSize:.8*xt,event:it,product:z,width:"100%",height:"100%",showAddedToCart:!0}):(0,f.jsx)(rt,{baseFontSize:.8*xt,event:it,product:z,cartState:N.state,cartCount:N.cart_count,borderRadius:"md",onClickAtc:t=>{"init"==N.state?(L(dt),(0,M.kz)({userInteractionType:H.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:T,event:it,productList:[z],ctaList:it.cta})):"awaitingVariantSelection"==N.state&&B(R,dt)},onCartIconClick:()=>{D()}})})})]})]})})})},Et=i(7740);var Tt=function(t){const[e]=(0,v.QN)("isInDesignMode"),[i]=(0,v.QN)("isDemoBrand"),[o]=(0,v.QN)("whatmoreSecondaryColor"),r=(0,v.Xd)("whatmoreSecondaryColorShade900"),[a]=(0,v.QN)("whatmorePrimaryFont"),[d]=(0,v.QN)("whatmoreShopId"),[s,h,g,w]=(0,x.A)(),[b,C]=(0,n.useState)(!1),[S,k]=(0,n.useState)(t.product),I=(0,v.Xd)("whatmoreUITheme"),[_,z]=(0,n.useState)(!1),[E,T]=(0,n.useState)(parseFloat(S.price)),[N,F]=(0,n.useState)(parseFloat(S.compare_price)),[A,P]=(0,n.useState)(S.currency),L=t.event,[B,O]=(0,n.useState)();if((0,n.useEffect)((()=>{(0,p.w4b)(d)?(0,wt.ck)(S,(0,p.NCy)(d),d).then((t=>{k(t),T(parseFloat(t.price)),F(parseFloat(t.compare_price)),P(t.currency),z(!0)})).catch((t=>z(!0))):(async()=>{try{var t,e,i,n,o,r;const l=await(0,m.M)(S,(0,p.NCy)(d),d);O(l),T((null!==(t=null===l||void 0===l||null===(e=l.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.price)&&void 0!==t?t:null===l||void 0===l?void 0:l.price)/100),F((null!==(n=null===l||void 0===l||null===(o=l.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.compare_at_price)&&void 0!==n?n:null===l||void 0===l?void 0:l.compare_at_price)/100),z(!0)}catch(l){z(!0)}})()}),[]),!_)return(0,f.jsx)(f.Fragment,{});var D=.68*w,R=.4*D,X=D+"px",K=R+"px",G=D*(.55-.4)+"px",Z=.12*R;(0,p.XQu)(d);const{whatmoreWidgetSourceDetails:J}=(0,n.useContext)(U.B);function tt(t){return(0,p.BLb)(d)?t.product_link+"?"+(0,p.VCz)(d)+"&"+(0,p.Spk)(d)+"&"+(0,p.$lz)(d):t.product_link}function et(t,n){e||i||(async()=>{(0,l.Pb)(t,n),(0,M.kz)({userInteractionType:H.O.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:J,event:t,productList:[n],ctaList:t.cta})})(),C(!0)}return(0,f.jsxs)(u.B,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:Q,marginBottom:(0,p.qw1)(d),width:X,height:"fit-content",boxShadow:"round"==I?"dark-lg":null,onClick:()=>{et(L,S),window.location.href=tt(S)},backgroundColor:(0,V.YU)("#ffffff",(0,p.p2R)(d)),animation:b?W.jd:W.so,borderRadius:"round"==I?"xl":null,overflow:"hidden",spacing:0,sx:{borderWidth:(0,p.YcK)(d),borderColor:(0,p.Fwt)(d)},children:[(0,f.jsxs)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,f.jsx)(c.az,{height:K,width:K,children:(0,f.jsx)(y._,{width:K,height:K,src:(0,gt.b)(S.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,p.KZe)(d)+" !important"}})}),(0,f.jsxs)(c.az,{height:K,width:D-R+"px",children:[(0,f.jsxs)(u.B,{direction:"column",justifyContent:(0,p.UlM)(d)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingTop:"10px",paddingBottom:"16px",children:[(0,f.jsx)(j.E,{as:"p",ref:t=>{t&&(t.style.setProperty("min-height","0","important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("-webkit-box-orient","vertical","important"))},sx:{paddingLeft:"8px",fontFamily:a+" !important",color:"black !important",lineHeight:"120% !important",fontWeight:"medium !important",fontSize:1.1*Z+"px !important"},children:(0,$.v)(null==S.title?"":S.title.toString(),"prod-tile")}),(0,p.Nzx)(d)?(0,f.jsxs)(u.B,{className:"whatmore-product-shopnow-price",direction:(0,p.vw2)(d)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",marginTop:"5px",borderRadius:"round"==I?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"5px",children:[_&&(0,f.jsxs)(j.E,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},noOfLines:1,fontSize:.9*Z+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:a+" !important",color:(0,p.uoB)(d)+" !important",margin:"0px !important"},children:[" "+(0,wt.Sb)(null!==E&&void 0!==E?E:null===S||void 0===S?void 0:S.price,"",d,A)," \xa0"]}),(0,q.P)(E,N)&&_?(0,f.jsxs)(j.E,{as:"s",style:{minHeight:0,textDecoration:"line-through"},noOfLines:1,fontSize:.9*Z+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:a+" !important",color:(0,p.gld)(d)+" !important",margin:"0px !important"},children:[" ",(0,wt.Sb)(null!==N&&void 0!==N?N:null===S||void 0===S?void 0:S.compare_price,"",d,A)]}):(0,f.jsx)(f.Fragment,{})]}):(0,f.jsx)(f.Fragment,{}),""!=(0,p.rsz)(d)&&(0,f.jsxs)(j.E,{noOfLines:1,fontSize:.9*Z+"px",lineHeight:"100%",paddingTop:"6px",sx:{fontFamily:(0,p.ogW)(d)+" !important",color:(0,p._zx)(d)+" !important",margin:"0px !important"},children:["\xa0",(0,p.rsz)(d)," \xa0"]})]}),(0,p.UlM)(d)?(0,f.jsx)(u.B,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,f.jsxs)(u.B,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,f.jsx)(u.B,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:r,sx:{borderRadius:"round"==I?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,f.jsx)(Y.A,{sx:{color:o,fontSize:1.3*Z+"px"}})}),(0,f.jsx)(c.az,{width:"2px"})]})}):(0,f.jsx)(f.Fragment,{})]})]}),(0,p.Woi)(d)&&(0,f.jsx)(u.B,{direction:"row",width:"100%",height:G,justifyContent:"center",alignItems:"center",children:(0,f.jsx)(_t,{baseFontSize:.8*Z,event:L,product:S,borderRadius:"md",onShopNowClick:t=>{et(L,S),window.location.href=tt(S)}})})]})};function Nt(t){var e;const[i]=(0,v.QN)("whatmoreSecondaryColor"),[o]=(0,v.QN)("whatmorePrimaryFont"),[r]=(0,v.QN)("whatmoreShopId"),[l,a]=(0,n.useState)(!1),d=null!==(e=t.baseFontSize)&&void 0!==e?e:10,s=t.onClick,h=t.width,x=t.height,m=t.title,g=t.showInProgressIcon;return"awaitingVariantSelection"==t.cartState||"productVariantDetailsApiCallInProgress"==t.cartState?(0,f.jsx)(Ft,{onClick:()=>t.onClick(),event:t.event,product:t.product,baseFontSize:d,width:h,height:x}):(0,f.jsxs)(c.az,{display:"flex",width:"fit-content",minWidth:"75%",padding:"2x",boxShadow:"lg",animation:l?W.jd:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:["awaitingVariantSelection"==t.cartState&&(0,f.jsx)(u.B,{direction:"row",alignItems:"center",justifyContent:"center",paddingY:"2px",backgroundColor:"white",onClick:e=>{e.stopPropagation(),t.updateCartState("init"),a(!0)},children:(0,f.jsxs)(j.E,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:o+" !important",color:"#343434 !important"},children:["\xa0","63064310011"==r?"Annuler":"Cancel","\xa0"]})}),(0,f.jsxs)(u.B,{direction:"row",backgroundColor:g?(0,V.YU)(i,8):i,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",onClick:t=>{t.stopPropagation(),s(),a(!0)},children:[(0,f.jsxs)(j.E,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:o+" !important",color:(0,p.Hfu)(r)+" !important"},children:["\xa0",m,"\xa0"]}),g?(0,f.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,f.jsx)(Z.A,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*d+"px"}})}):(0,f.jsx)(f.Fragment,{})]})]})}function Ft(t){const[e]=(0,v.QN)("whatmoreSecondaryColor"),[i]=(0,v.QN)("whatmorePrimaryFont"),[o]=(0,v.QN)("whatmoreShopId"),[r,l]=(0,n.useState)(!1),a=t.onClick,d=t.baseFontSize;return(0,f.jsx)(u.B,{direction:"row",paddingBottom:"3%",position:"relative",children:(0,f.jsx)(c.az,{width:"fit-content",minWidth:"75%",boxShadow:"lg",padding:"6px 12px",borderRadius:"6px",backgroundColor:e,onClick:t=>{t.stopPropagation(),a(),l(!0)},animation:r?W.jd:null,onAnimationEnd:()=>{l(!1)},cursor:"pointer",zIndex:"1000",children:(0,f.jsx)(u.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",children:(0,f.jsx)(s.o,{children:(0,f.jsx)(j.E,{lineHeight:"100%",fontSize:1.3*d+"px",fontWeight:"semibold",sx:{fontFamily:`${i} !important`,color:`${(0,p.Hfu)(o)} !important`},children:(0,p.KPq)(o)})})})})})}function At(t){var e;const[i]=(0,v.QN)("whatmorePrimaryFont"),n=null!==(e=t.baseFontSize)&&void 0!==e?e:10;t.width,t.height;return(0,f.jsx)(c.az,{width:"fit-content",height:"fit-content !important",minWidth:"75%",boxShadow:"lg",backgroundColor:"white",borderRadius:"6px",borderColor:"gray",borderWidth:"1px",onClick:t=>{t.stopPropagation()},children:(0,f.jsx)(u.B,{direction:"row",width:"100%",alignItems:"center",paddingX:"4px",paddingY:"3px",justifyContent:"center",children:(0,f.jsxs)(j.E,{color:"gray",lineHeight:"100%",fontSize:1.2*n+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:"gray !important"},children:["\xa0"," Sold Out ","\xa0"]})})})}function Pt(t){var e;const[i]=(0,v.QN)("whatmoreSecondaryColor"),[n]=(0,v.QN)("whatmorePrimaryFont"),[o]=(0,v.QN)("whatmoreShopId"),r=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),l=t.onClick,a=t.cartCount,d=(t.width,t.height,t.onCartIconClick);return(0,f.jsx)(c.az,{width:"fit-content",minWidth:"75%",borderRadius:"6px",padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:i,borderWidth:"1px",onClick:t=>{t.stopPropagation()},cursor:"pointer",children:(0,f.jsxs)(u.B,{direction:"row",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:[(0,f.jsx)(s.o,{paddingX:"5px",onClick:()=>{d()},children:"1972174947"!=o&&"55194878152"!=o&&"12181504100"!=o?(0,f.jsx)(G.A,{sx:{color:i,fontSize:1.6*r}}):(0,f.jsx)(J.$,{size:"sm",_hover:{bg:i},sx:{bg:i},children:(0,f.jsx)(j.E,{paddingX:"6px",color:"white",sx:{fontSize:.85*r},children:"GO TO CART"})})}),(0,f.jsx)(j.E,{color:i,fontSize:1.3*r+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important"},children:a}),(0,f.jsx)(s.o,{paddingX:"5px",onClick:t=>{t.stopPropagation(),l()},children:(0,f.jsx)(K.A,{sx:{color:i,fontSize:1.6*r}})})]})})}var Lt=function(t){var e,i,n,o;const[r]=(0,v.QN)("whatmoreShopId"),l=t.event,a=t.product,d=null!==(e=t.baseFontSize)&&void 0!==e?e:10,s=null===(i=t.showAddedToCart)||void 0===i||i,c=t.cartState,u=t.cartCount,h=t.onClickAtc,p=t.onCartIconClick;function x(){h()}const m=null!==(n=t.width)&&void 0!==n?n:"100%",g=null!==(o=t.height)&&void 0!==o?o:"100%";return"errored"==c?(0,f.jsx)(At,{event:l,product:a,baseFontSize:d,width:m,height:g}):"init"==c?0==u?(0,f.jsx)(Ft,{onClick:x,event:l,product:a,baseFontSize:d,width:m,height:g}):s?(0,f.jsx)(Pt,{onClick:x,event:l,product:a,baseFontSize:d,cartCount:u,width:m,height:g,onCartIconClick:p}):(0,f.jsx)(Ft,{onClick:x,event:l,product:a,baseFontSize:d,width:m,height:g}):(0,f.jsx)(Nt,{onClick:x,cartState:c,updateCartState:t.updateCartState,event:l,product:a,baseFontSize:d,width:m,height:g,title:"awaitingVariantSelection"==c?"63064310011"==r?"Valider":"Done":"",showInProgressIcon:"atcApiCallInProgress"==c||"productVariantDetailsApiCallInProgress"==c})};var Bt=function(t){var e,i,o,r,a,d;const[s]=(0,v.QN)("isInDesignMode"),[h]=(0,v.QN)("isDemoBrand"),[g]=(0,v.QN)("whatmorePrimaryFont"),[w]=(0,v.QN)("whatmoreShopId"),[b,C,S,k]=(0,x.A)(),[I,_]=(0,n.useState)(!1),[z,E]=(0,n.useState)(t.product),T=(0,v.Xd)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:N}=(0,n.useContext)(U.B),[F,A,P,L,B,O,D,R]=vt(0,z,t.event),[X,Y]=(0,n.useState)(null),[K,G]=(0,n.useState)(parseFloat(z.price)),[Z,J]=(0,n.useState)(parseFloat(z.compare_price)),[tt,et]=(0,n.useState)(z.currency),[it,nt]=(0,n.useState)(null),ot=t.event,rt=t.productClickHandler,[lt,at]=(0,n.useState)(null),[dt,st]=(0,n.useState)(!1),ct=N.landingLocationType,ut=N.templateType,ht=(0,jt.Wd)(ct)+(0,jt.gf)(ut)+"_"+(null===ot||void 0===ot?void 0:ot.event_id);(0,n.useEffect)((()=>{(0,p.w4b)(w)?(0,wt.ck)(z,(0,p.NCy)(w),w).then((t=>{E(t),G(parseFloat(t.price)),J(parseFloat(t.compare_price)),et(t.currency),st(!0)})):(async()=>{var t,e,i,n,o,r;const l=await(0,m.M)(z,(0,p.NCy)(w),w);nt(l),G((null!==(t=null===l||void 0===l||null===(e=l.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.price)&&void 0!==t?t:null===l||void 0===l?void 0:l.price)/100),J((null!==(n=null===l||void 0===l||null===(o=l.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.compare_at_price)&&void 0!==n?n:null===l||void 0===l?void 0:l.compare_at_price)/100),st(!0)})(),!(0,p.E8r)(w)||null!==ot&&void 0!==ot&&ot.in_stock||P("errored")}),[]),(0,n.useEffect)((()=>{var t,e;const i=null!=it?null===it||void 0===it||null===(t=it.options)||void 0===t?void 0:t.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})):-1,n=-1!==i?null===it||void 0===it||null===(e=it.variants)||void 0===e?void 0:e.map((t=>{var e,n;const o=null===t||void 0===t?void 0:t[`option${i+1}`];return null!==t&&void 0!==t&&null!==(e=t.featured_image)&&void 0!==e&&e.src?{color:o,src:null===t||void 0===t||null===(n=t.featured_image)||void 0===n?void 0:n.src}:null})):[];let o=[];var r;-1!==i&&(o=null===it||void 0===it||null===(r=it.images)||void 0===r?void 0:r.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc}))));at({position:i,finalArr:n,finalArrExternal:o})}),[it]);var pt=.72*k,xt=.37*pt,mt=pt*(.48-.37),ft=.95*pt+"px",yt=xt+"px",bt=.12*xt;function Ct(){window.location.href=function(t){return(0,p.BLb)(w)?t.product_link+"?"+(0,p.VCz)(w)+"&"+(0,p.Spk)(w)+"&"+(0,p.$lz)(w):t.product_link}(z)}return(0,f.jsx)(u.B,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:Q,marginBottom:"24px",width:ft,boxShadow:"round"==T?"dark-lg":null,onClick:()=>{!function(t,e){s||h||(async()=>{(0,l.Pb)(t,e)})(),"72550089015"==w?Ct():rt(e),_(!0)}(ot,z)},backgroundColor:(0,V.YU)("#ffffff",(0,p.p2R)(w)),animation:I?W.jd:null,borderRadius:"round"==T?"xl":null,overflow:"hidden",onAnimationEnd:()=>{_(!1)},spacing:0,sx:{borderWidth:(0,p.YcK)(w),borderColor:(0,p.Fwt)(w)},children:(0,f.jsxs)(u.B,{display:"flex",direction:"row",width:"full",height:"fit-content",justifyContent:"center",alignContent:"center",cursor:"pointer",alignItems:"center",gap:"8px",children:[(0,f.jsx)(c.az,{height:yt,width:yt,children:(0,f.jsx)(y._,{width:"100%",height:"100%",src:(0,gt.b)(null!==(e=null!==(i=null===lt||void 0===lt||null===(o=lt.finalArr)||void 0===o||null===(r=o.find((t=>(null===t||void 0===t?void 0:t.color)==(null===X||void 0===X?void 0:X[null===lt||void 0===lt?void 0:lt.position]))))||void 0===r?void 0:r.src)&&void 0!==i?i:null===lt||void 0===lt||null===(a=lt.finalArrExternal)||void 0===a||null===(d=a.find((t=>(null===t||void 0===t?void 0:t.color)==(null===X||void 0===X?void 0:X[null===lt||void 0===lt?void 0:lt.position]))))||void 0===d?void 0:d.src)&&void 0!==e?e:z.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,p.KZe)(w)+" !important"}})}),(0,f.jsx)(c.az,{height:yt,width:pt-xt+"px",children:(0,f.jsxs)(u.B,{direction:"column",justifyContent:"flex-start",height:"100%",gap:"4px",paddingTop:"12px",width:"100%",children:[(0,f.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",bt+"px","important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",g,"important"),t.style.setProperty("white-space","nowrap","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"),t.style.setProperty("padding","0","important"),t.style.setProperty("font-weight","normal","important"))},children:(0,$.v)(null==z.title?"":z.title.toString())}),(0,p.Nzx)(w)?(0,f.jsxs)(u.B,{direction:(0,p.vw2)(w)?"row":"row-reverse",sx:{margin:"0px !important",minHeight:1.1*bt+"px"},children:[dt&&(0,f.jsxs)(j.E,{noOfLines:1,fontSize:.9*bt*(0,p.rh$)(w)+"px !important",lineHeight:"100%",sx:{fontFamily:g+" !important",color:(0,p.uoB)(w)+" !important",fontWeight:"bold"},children:[" "+(0,wt.Sb)(null!==K&&void 0!==K?K:null===z||void 0===z?void 0:z.price,"",w,tt)," \xa0"]}),(0,q.P)(K,Z)&&dt?(0,f.jsxs)(j.E,{noOfLines:1,fontSize:.9*bt*(0,p.rh$)(w)+"px !important",fontWeight:"medium !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:g+" !important",color:(0,p.gld)(w)+" !important",margin:"0px !important",letterSpacing:"normal !important",textDecoration:"line-through !important"},children:[" ",(0,wt.Sb)(null!==Z&&void 0!==Z?Z:null===z||void 0===z?void 0:z.compare_price,"",w,tt)]}):(0,f.jsx)(f.Fragment,{})]}):(0,f.jsx)(f.Fragment,{}),(0,f.jsx)(Lt,{baseFontSize:.3*mt,event:ot,product:z,cartState:F.state,cartCount:F.cart_count,updateCartState:P,onClickAtc:t=>{"init"===F.state?(B(ht,!0),(0,M.kz)({userInteractionType:H.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:N,event:ot,productList:[z],ctaList:ot.cta})):"awaitingVariantSelection"===F.state&&rt(z)},onCartIconClick:t=>{R()}})]})})]})})};var Ot=function(t){const[e]=(0,v.QN)("whatmoreShopId"),[i]=(0,v.QN)("isWhatmoreWebsite"),n=(0,p.Vpi)(e),o=t.event,r=t.product;return i?(0,f.jsx)(Tt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile"==n?(0,f.jsx)(yt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler,activeProductsCount:t.activeProductsCount}):"broad-tile-no-cta"==n?(0,f.jsx)(Tt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile-new-atc"==n?(0,f.jsx)(Bt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"link_only"==n?(0,f.jsx)(X,{product:t.product,event:t.event}):"narrow-tile"==n?(0,f.jsx)(zt,{event:o,product:r,productClickHandler:t.productClickHandler,tileWidthFactor:o.products.length>1?.68:void 0}):(0,f.jsx)(f.Fragment,{})},Dt=i(1079),Rt=i(7802),Wt=i(2979);var Vt=function(t){var e,i,n;const[l,a,d,h]=(0,x.A)(),[m]=(0,v.QN)("whatmoreShopId"),g=(0,v.Xd)("isInDesignMode"),w=(0,v.Xd)("isDemoBrand"),j=t.event,y=t.productClickHandler,b=(0,p.Vpi)(m),C=null!==(e=null===(i=j.products)||void 0===i||null===(n=i.filter((t=>"active"==(null===t||void 0===t?void 0:t.product_status))))||void 0===n?void 0:n.length)&&void 0!==e?e:0;if(!(0,Rt.Z_)(j))return(0,f.jsx)(f.Fragment,{});if(1==j.products.length&&(void 0==j.cta||0==j.cta.length)){const t=j.products[0];return(0,p.uJl)(m)?(0,f.jsx)(u.B,{direction:"horizontal",width:h,height:"fit-content",justifyContent:"center",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))",children:(0,f.jsx)(Wt.S,{userInteractionType:H.O.PRODUCT_CTA_VIEW,event:j,productList:[t],triggerFlag:!g&&!w,children:(0,f.jsx)(s.o,{children:(0,f.jsx)(zt,{event:j,product:t,productClickHandler:y},j.event_id+t.product_id)})})}):(0,f.jsx)(u.B,{direction:"horizontal",width:h,height:"fit-content",justifyContent:"center",backgroundImage:"narrow-tile"==b?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))":null,children:(0,f.jsx)(s.o,{children:(0,f.jsx)(Wt.S,{userInteractionType:H.O.PRODUCT_CTA_VIEW,event:j,productList:[t],triggerFlag:!g&&!w,children:(0,f.jsx)(Ot,{activeProductsCount:1,event:j,product:t,productClickHandler:y},j.event_id+t.product_id)})})})}return(0,f.jsx)(s.o,{children:(0,f.jsx)("div",{onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,f.jsx)(c.az,{width:h+"px",backgroundImage:"narrow-tile"==b?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))":null,children:(0,f.jsxs)(o.RC,{className:"product-tile swiper-slide",slidesPerView:1==j.products.length?1:1.4,initialSlide:j.products.length<=2||(0,p.TYM)(m)?0:1,centeredSlides:!(0,p.TYM)(m),modules:[r.FJ],mousewheel:{invert:!1,thresholdDelta:20},nested:!0,children:[("STRDOIDF6O7"===m?[j.products[0]]:j.products).map((t=>("oos"!=t.product_status||(0,p.$7F)(m))&&(0,f.jsx)(o.qr,{children:(0,f.jsx)(Wt.S,{userInteractionType:H.O.PRODUCT_CTA_VIEW,event:j,productList:[t],triggerFlag:!g&&!w,children:(0,f.jsx)(u.B,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",alignItems:"center",children:(0,f.jsx)(Ot,{activeProductsCount:C,event:j,product:t,productClickHandler:y},j.event_id+t.product_id)})})},j.event_id+t.product_id))),(0,p.Woi)(m)&&void 0!=j.cta&&j.cta.map((t=>(0,f.jsx)(f.Fragment,{children:""!==t.cta_title.trim()&&(0,f.jsx)(o.qr,{children:(0,f.jsx)(u.B,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",paddingBottom:"12px",alignItems:"center",children:(0,f.jsx)(Dt.A,{fontFactor:.75,cta:t},j.event_id+t.cta_id)})},j.event_id+t.cta_id)})))]})})})})};var Qt=function(t){const[e,i]=(0,v.QN)("isProductSwiperCatalogOpen"),o=t.event,r=t.productClickHandler;return(0,n.useContext)(_i).isIOS,(0,f.jsx)(Vt,{event:o,productClickHandler:r},o.event_id)},Mt=i(6670);function Ht(t){const e=t.event,[i,n,o,r]=(0,x.A)(),[l]=(0,v.QN)("whatmorePrimaryFont");return(0,f.jsx)(c.az,{width:"fit-content",height:"fit-content",padding:"5px",children:(0,f.jsxs)(u.B,{direction:"row",width:"fit-content",height:"fit-content",children:[(0,f.jsx)(s.o,{children:(0,f.jsx)(c.jl,{overflow:"hidden",size:.15*r+"px",children:(0,f.jsx)(y._,{width:"100%",height:"100%",src:e.thumbnail_image})})}),(0,f.jsx)(c.az,{width:"fit-content",height:"fit-content",children:(0,f.jsxs)(u.B,{direction:"column",width:"fit-content",height:"fit-content",children:[(0,f.jsx)(j.E,{color:"white",fontSize:.05*r+"px",fontWeight:"bold",fontFamily:"sans-serif",align:"left",sx:{fontFamily:l+" !important"},children:e.presenter_name.substring(0,15)}),(0,f.jsx)(F.A,{event:e,fontSize:.03*r+"px"})]})})]})})}var Ut=function(t){const[e]=(0,v.QN)("isInDesignMode"),[i]=(0,v.QN)("isDemoBrand"),[o,r]=(0,v.QN)("isProductSwiperCatalogOpen"),[l,a]=(0,Mt.A)(),[d,s]=(0,v.QN)("isFirstIndicatorRenderDone"),h=(0,n.useContext)(_i),[x]=(0,v.QN)("whatmoreShopId"),m=t.event,g=t.isLast,w=t.onCloseCallback,j=t.focusRef,y=t.productClickHandler;return(0,f.jsx)(c.az,{width:"full",height:"full",borderRadius:"md",children:(0,f.jsxs)(u.B,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,f.jsx)(c.az,{width:"full",margin:"2px",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:(0,f.jsxs)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"space-between",paddingRight:"10px",paddingLeft:"10px",children:[(0,f.jsx)(Ht,{event:m}),(0,f.jsxs)(u.B,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,f.jsx)(b.A,{focusRef:j}),(0,f.jsx)(P,{event:m,onCloseCallback:w})]})]})}),(0,f.jsx)(c.az,{width:"100%",height:"100%",onClick:()=>{a(!l)}}),(0,f.jsxs)(c.az,{width:"full",height:"fit-content",children:[h.totalEvents>1&&!d&&h.showSwipeIndicator?(0,f.jsx)(c.az,{width:"full",margin:"2px",children:(0,f.jsx)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,f.jsx)(D,{swipeUp:!g})})}):null,void 0!=m.products&&m.products.length>0?(0,f.jsxs)(c.az,{width:"full",children:[(0,p.ek9)(x)?(0,f.jsx)(c.az,{w:"100%",children:(0,f.jsx)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,f.jsx)(N,{event:m,onToggle:t=>{r("minimize-button"!==t)}})})}):(0,f.jsx)(f.Fragment,{}),(0,f.jsx)(c.az,{display:"flex",width:"100%",height:"fit-content",children:(0,f.jsx)(Qt,{event:m,productClickHandler:y})})]}):(0,f.jsx)("div",{})]})]})})};function Xt(t){const[e,i,o,r]=(0,x.A)(),[l]=(0,v.QN)("whatmorePrimaryFont"),[a]=(0,v.QN)("whatmoreShopId"),[d,s]=(0,n.useState)(""),h=t.data,m=(t.event,t.product,t.setShowOptionsChart);var g=.4*r*.8*.13;(0,n.useEffect)((()=>{let t="vanyaclothing.myshopify.com";"1972174947"===a?t="vanyaclothing.myshopify.com":"57415434338"===a&&(t="usvanya.myshopify.com");const e=`https://app.kiwisizing.com/api/getSizingChart?shop=${t}&product=${null===h||void 0===h?void 0:h.id}&title=${null===h||void 0===h?void 0:h.title}&tags=&cacheSettingsUpdateAt=2020-08-11T15%3A19%3A49.000Z&settingsVersion=19`;fetch(e).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>{var e,i,n,o,r,l;s(null===t||void 0===t||null===(e=t.sizings)||void 0===e||null===(i=e[0])||void 0===i||null===(n=i.layout)||void 0===n||null===(o=n.data)||void 0===o||null===(r=o[0])||void 0===r||null===(l=r.data)||void 0===l?void 0:l.url)})).catch((t=>{console.error("Error fetching data:",t)}))}),[]);const w=`${k.i7`
120
120
  0% {
121
121
  transform: translateY(100%);
122
122
  }