whatmore-react-assets 1.0.581 → 1.0.583

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.581",
3
+ "version": "1.0.583",
4
4
  "description": "public repo for all whatmore js and css assets",
5
5
  "main": "whatmore.js",
6
6
  "scripts": {
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[209],{4209:function(t,e,n){n.r(e),n.d(e,{EventClickComponentContext:function(){return gn},default:function(){return mn}});var i=n(4897),o=n(499),r=n(7313),a=n(2210),l=n(8486),d=n(5160),s=n(3271),c=n(9854),h=n(7753),u=n(7789),p=n(7053),x=n(1896),g=n(6417);var m=function(t){return(0,g.jsx)(x.Z,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,event:t.event})},v=n(5098),f=n(3437),w=n(3455),j=n(6422);var C,y,S,b,I=function(t){const[e,n]=(0,j.Z)(),[i,o,r,a]=(0,u.Z)(),l=.08*a;function d(){n(!e)}return(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.Cd,{cursor:"pointer",children:e?(0,g.jsx)(w.Z,{sx:{color:"white",fontSize:l,filter:"drop-shadow(0 0 5px black);"},onClick:()=>{d()}}):(0,g.jsx)(f.Z,{sx:{color:"white",fontSize:l,filter:"drop-shadow(0 0 5px black);"},onClick:()=>{d()}})})})},k=n(168),_=n(8449),F=n(686);const E=(0,F.F4)(C||(C=(0,k.Z)(["\n 0%,10%,15% {\n opacity: 0; \n }\n 25%{\n opacity: 0.25;\n transform: translateY(-25%);\n }\n 50%{\n opacity: 0.5;\n transform: translateY(0%);\n }\n 75% {\n opacity: 0.75;\n transform: translateY(-8%)\n }\n 100%{\n opacity: 1;\n transform: translateY(0%)\n }\n"]))),T="".concat(E," 0.5s linear"),P=(0,F.F4)(y||(y=(0,k.Z)(["\n 30% { transform: scale(1.2); }\n 40%, 60% { transform: rotate(-20deg) scale(1.2); }\n 50% { transform: rotate(20deg) scale(1.2); }\n 70% { transform: rotate(0deg) scale(1.2); }\n 100% { transform: scale(1); }\n"]))),O="\n ".concat(P," 1.5s linear;\n"),L=(0,F.F4)(S||(S=(0,k.Z)(["\n 3% { transform: scale(1.2); }\n 4%, 6% { transform: rotate(-20deg) scale(1.2); }\n 5%,7% { transform: rotate(20deg) scale(1.2); }\n 8% { transform: rotate(0deg) scale(1.2); }\n 10% { transform: scale(1); }\n"]))),R=("\n ".concat(L," 10s linear infinite;\n"),(0,F.F4)(b||(b=(0,k.Z)(["\n 0% { transform: scale(1); }\n 10% { transform: scale(1.2); }\n 20% { transform: scale(1); }\n"]))));"\n ".concat(R," 5s ease-in-out infinite;\n");var D,z=n(4937);const M=(0,F.F4)(D||(D=(0,k.Z)(["\n 0% { \n opacity: 0;\n }\n 10%{\n opacity: 0.5;\n }\n 20%{\n opacity: 1;\n }\n \n"]))),K="\n ".concat(M," ").concat(3,"s ease-in-out;\n");function W(t){const[e,n,i,o]=(0,u.Z)(),[a]=(0,h.j1)("whatmoreSecondaryColor"),[l,d]=(0,r.useState)(0),c=t.event,p=t.onClick,x=c.products.length;t.isFirstProductsIconClickDone;(0,r.useEffect)((()=>{const t=setInterval((()=>{d((t=>(t+1)%x))}),3e3);return()=>{clearInterval(t)}}),[]);const m=.24,f=.024;var w=o*m+"px",j=o*m+"px",C=o*f*1.5+"px",y=o*f+"px",S=o*f*1.5+"px";if(void 0==c.products||0==c.products.length)return(0,g.jsx)(g.Fragment,{});var b=c.products;return(0,g.jsx)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",height:"fit-content",width:"fit-content",borderRadius:"lg",children:(0,g.jsxs)(s.xu,{margin:"10px",width:w,height:j,boxShadow:"dark-lg",borderColor:"white",borderWidth:"2px",borderRadius:"lg",overflow:"visible",backgroundColor:"gray.100",animation:T,onClick:()=>p(),children:[(0,g.jsx)(v.Ee,{width:"100%",height:"100%",src:b[l].thumbnail_image,objectFit:"cover",borderRadius:"lg",animation:K},l),(0,g.jsx)(s.xu,{width:"100%",height:"100%",style:{position:"relative",zIndex:2,bottom:"100%"},className:"whatmore-ios-css-relative-fix",borderRadius:"lg",children:(0,g.jsx)(s.Kq,{direction:"column",width:"100%",height:"100%",justifyContent:"flex-end",children:(0,g.jsx)(s.M5,{children:(0,g.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",backgroundColor:a,borderRadius:"lg",marginX:"5px",marginY:"5px",paddingX:"2px",paddingY:"2px",children:[(0,g.jsxs)(s.xv,{noOfLines:1,fontSize:y,fontFamily:"sans-serif",fontWeight:"semibold",textAlign:"center",lineHeight:"100%",sx:{color:"white !important"},children:["\xa0","Shop Now","\xa0"]}),(0,g.jsx)(s.M5,{children:(0,g.jsx)(z.Z,{sx:{color:"white",fontSize:S}})})]})})})}),(0,g.jsx)(s.Kq,{direction:"row",height:"fit-content",width:w,justifyContent:"flex-end",style:{position:"relative",zIndex:3,bottom:"210%",left:"5%"},className:"whatmore-ios-css-relative-fix",children:(0,g.jsx)(s.Ct,{fontSize:C,variant:"subtle",textColor:a,bgColor:"gray.100",borderRadius:"md",boxShadow:"dark-lg",children:x>1?x:""})})]})})}var A=function(t){const[e,n]=(0,h.j1)("isProductSwiperCatalogOpen"),[i,o,a,l]=(0,u.Z)(),[d,c]=(0,r.useState)(!1),p=t.onToggle,x=t.event,m=.07*l;return(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.bK,{style:{marginTop:"10px"},children:e?(0,g.jsx)(_.Z,{sx:{color:"white",fontSize:m,filter:"drop-shadow(0 0 5px black);",position:"relative",zIndex:2},onClick:()=>{p("minimize-button")}}):(0,g.jsx)(W,{event:x,onClick:()=>{p("products-button"),c(!0)},isFirstProductsIconClickDone:d})})})},q=n(2634),H=n(8302);var N,Z,U=function(t){const e=t.onCloseCallback,[n,i,o,r]=(0,u.Z)(),a=.08*r;return(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.Cd,{cursor:"pointer",children:(0,g.jsx)(H.Z,{sx:{boxShadow:3,color:"white",fontSize:a,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),e(t)}})})})},V=n(756),B=n(5428),Y=n(8022);var X=function(t){var e,n;const[i,o,a,l]=(0,u.Z)(),[d,c]=(0,r.useState)(!0),{slideDirection:h}=(0,r.useContext)(gn),p=null!==(e=t.showForSeconds)&&void 0!==e?e:3,x=null!==(n=t.delayInSeconds)&&void 0!==n?n:1;t.swipeUp,(0,r.useEffect)((()=>{const t=setTimeout((()=>{c(!1)}),1e3*p);return()=>{clearTimeout(t)}}),[]);const m=.15*l,v=.07*l,f=(0,F.F4)(N||(N=(0,k.Z)(["\n 0% {\n transform: translateY(0%) rotate(0deg);\n }\n 50% {\n transform: translateY(-100%) translateX(+10%) rotate(+30deg);\n }\n 100% {\n transform: translateY(0%) rotate(0deg);\n }\n "]))),w="".concat(f," infinite 1.5s linear"),j=(0,F.F4)(Z||(Z=(0,k.Z)(["\n 0% {\n transform: translateY(0%) rotate(0deg);\n }\n 50% {\n transform: translateX(30%) translateY(20%) rotate(-30deg);\n }\n 100% {\n transform: translateY(0%) rotate(0deg);\n }\n "]))),C="".concat(j," infinite 1.5s linear");return(0,g.jsx)(V.MT,{unmountOnExit:!0,initialScale:.2,in:d,reverse:!0,delay:x,children:(0,g.jsx)(s.xu,{width:"100%",height:"fit-content",paddingTop:100,borderRadius:"3xl",children:(0,g.jsxs)(s.Kq,{direction:"column",width:"100%",height:"fit-content",justifyContent:"flex-end",children:[(0,g.jsx)(s.M5,{animation:"vertical"===h?w:C,children:"vertical"===h?(0,g.jsx)(B.Z,{sx:{color:"white !important",fontSize:m,filter:"drop-shadow(0 0 20px black);"}}):(0,g.jsx)(Y.Z,{sx:{color:"white !important",fontSize:m,filter:"drop-shadow(0 0 20px black);"}})}),(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.xv,{textShadow:"dark-lg",fontSize:v+"px",fontWeight:"semibold",sx:{color:"white !important",textShadow:"0px 0px 20px black !important;"},children:"swipe for more"})})]})})})};var G=function(t){const[e,n]=(0,h.j1)("isFirstIndicatorRenderDone"),[i]=(0,h.j1)("indicatorRenderSeconds"),o=i,a=t.swipeUp;return(0,r.useEffect)((()=>{const t=setTimeout((()=>{n(!0)}),3e3+1e3*o);return()=>{clearTimeout(t)}}),[]),e?null:(0,g.jsx)(X,{showForSeconds:.8*o,delayInSeconds:3,swipeUp:a})},J=n(5180),$=n(9316),Q=n(5254);const tt="15px";var et=n(7376),nt=n(778),it=n(9039);var ot=function(t){const[e]=(0,h.j1)("isInDesignMode"),[n]=(0,h.j1)("isDemoBrand"),[i]=(0,h.j1)("whatmoreSecondaryColor"),[o]=(0,h.j1)("whatmorePrimaryFont"),[a]=(0,h.j1)("whatmoreShopId"),[l,p,x,m]=(0,u.Z)(),[v,f]=(0,r.useState)(!1),w=t.product,j=t.event,{whatmoreWidgetSourceDetails:C}=(0,r.useContext)(it.I),y=.1*x,S=.95*m,b=.05*m;return(0,g.jsx)(s.Kq,{direction:"row",height:y,justifyContent:"center",aligntItems:"center",alignContent:"center",bgGradient:"linear(to-b, transparent, blackAlpha.400, blackAlpha.600)",children:(0,g.jsx)(s.Kq,{direction:"column",width:"fit-content",height:y,justifyContent:"center",aligntItems:"center",alignContent:"center",children:(0,g.jsx)(s.xu,{width:S+"px",height:"fit-content",padding:"6px",marginTop:tt,backgroundColor:i,borderRadius:"5px",animation:v?$.mT:null,onAnimationEnd:()=>{f(!1)},marginBottom:(0,c.pq5)(a),onClick:()=>{f(!0),function(t,i){e||n||(async()=>{(0,d.wz)(t,i),(0,et.GF)({userInteractionType:nt.K.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:C,event:t,productList:[i],ctaList:t.cta})})()}(j,w),window.location.href=function(t){return(0,c.lj5)(a)?t.product_link+"?"+(0,c.awP)(a)+"&"+(0,c.n9s)(a)+"&"+(0,c.vaK)(a):t.product_link}(w)},_hover:{backgroundColor:(0,Q.lA)(i,8)},cursor:"pointer",children:(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*b+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:o+" !important",color:"white !important"},children:"Shop Now"})})})})})},rt=n(7009),at=n(5945),lt=n(5456),dt=n(6984),st=n(6227),ct=n(7329);n(9111);function ht(t){var e;const[n]=(0,h.j1)("whatmoreSecondaryColor"),[i]=(0,h.j1)("whatmorePrimaryFont"),[o]=(0,h.j1)("whatmoreShopId"),[a,l]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),u=t.onClick,p=t.width,x=t.height,m=t.title,v=t.showInProgressIcon;return(0,g.jsx)(s.xu,{width:p,height:x,padding:"2x",boxShadow:"lg",backgroundColor:v?(0,Q.lA)(n,8):n,onClick:t=>{t.stopPropagation(),u(),l(!0)},animation:a?$.mT:null,onAnimationEnd:()=>{l(!1)},cursor:"pointer",children:(0,g.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:[(0,g.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px",fontWeight:"semibold",sx:{fontFamily:i+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",m,"\xa0"]}),v?(0,g.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,g.jsx)(ct.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*d+"px"}})}):(0,g.jsx)(g.Fragment,{})]})})}function ut(t){var e;const[n]=(0,h.j1)("whatmoreSecondaryColor"),[i]=(0,h.j1)("whatmorePrimaryFont"),[o]=(0,h.j1)("whatmoreShopId"),[a,l]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),u=t.onClick,p=t.width,x=t.height;return(0,g.jsx)(s.xu,{width:p,height:x,padding:"2x",boxShadow:"lg",backgroundColor:n,onClick:t=>{t.stopPropagation(),u(),l(!0)},animation:a?$.mT:null,onAnimationEnd:()=>{l(!1)},cursor:"pointer",children:(0,g.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",children:(0,g.jsx)(s.M5,{children:(0,g.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d,fontWeight:"semibold",sx:{fontFamily:i+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",(0,c.tan)(o),"\xa0"]})})})})}function pt(t){var e;const[n]=(0,h.j1)("whatmorePrimaryFont"),[i]=(0,h.j1)("whatmoreShopId"),o=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),r=t.width,a=t.height;return(0,g.jsx)(s.xu,{width:r,height:a,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:"gray",borderWidth:"1px",onClick:t=>{t.stopPropagation()},children:(0,g.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:(0,g.jsxs)(s.xv,{color:"gray",lineHeight:"100%",fontSize:1.3*o,fontWeight:"semibold",sx:{fontFamily:n+" !important",color:"gray !important"},children:["\xa0"," Sold Out ","\xa0"]})})})}function xt(t){var e;const[n]=(0,h.j1)("whatmoreSecondaryColor"),[i]=(0,h.j1)("whatmorePrimaryFont"),[o]=(0,h.j1)("whatmoreShopId"),r=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),a=t.onClick,l=t.cartCount,d=t.width,c=t.height,u=t.onCartIconClick;return(0,g.jsx)(s.xu,{width:d,height:c,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:n,borderWidth:"1px",onClick:t=>{t.stopPropagation()},cursor:"pointer",children:(0,g.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:[(0,g.jsx)(s.M5,{paddingX:"5px",onClick:()=>{u()},children:(0,g.jsx)(st.Z,{sx:{color:n,fontSize:1.6*r}})}),(0,g.jsx)(s.xv,{color:n,fontSize:1.3*r,fontWeight:"semibold",sx:{fontFamily:i+" !important"},children:l}),(0,g.jsx)(s.M5,{paddingX:"5px",onClick:t=>{t.stopPropagation(),a()},children:(0,g.jsx)(dt.Z,{sx:{color:n,fontSize:1.6*r}})})]})})}var gt=function(t){var e,n,i,o;const[r]=(0,h.j1)("whatmoreShopId"),a=t.event,l=t.product,d=null!==(e=t.baseFontSize)&&void 0!==e?e:10,s=null===(n=t.showAddedToCart)||void 0===n||n,c=t.cartState,u=t.cartCount,p=t.onClickAtc,x=t.onCartIconClick;function m(){p()}const v=null!==(i=t.width)&&void 0!==i?i:"100%",f=null!==(o=t.height)&&void 0!==o?o:"100%";return"errored"==c?(0,g.jsx)(V.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:f,width:v},children:(0,g.jsx)(pt,{event:a,product:l,baseFontSize:d,width:v,height:f})}):"init"==c?0==u?(0,g.jsx)(ut,{onClick:m,event:a,product:l,baseFontSize:d,width:v,height:f}):s?(0,g.jsx)(V.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:f,width:v},children:(0,g.jsx)(xt,{onClick:m,event:a,product:l,baseFontSize:d,cartCount:u,width:v,height:f,onCartIconClick:x})}):(0,g.jsx)(ut,{onClick:m,event:a,product:l,baseFontSize:d,width:v,height:f}):(0,g.jsx)(ht,{onClick:m,event:a,product:l,baseFontSize:d,width:v,height:f,title:"awaitingVariantSelection"==c?"Done":"",showInProgressIcon:"atcApiCallInProgress"==c||"productVariantDetailsApiCallInProgress"==c})},mt=n(6967),vt=n(2791),ft=n(4844);const wt=(0,h.MO)("isInDesignMode"),jt=(0,h.MO)("isDemoBrand");async function Ct(t,e,n,i,o,r){return"shopify"==n?(0,ft.wW)(t,e,i):(wt||jt||(async()=>{(0,mt.FF)(o,r)})(),(0,vt.jg)(t,e,i))}function yt(t,e){return"shopify"==t?(0,ft.JL)(e):(0,vt.TE)(e)}var St=function(t,e,n){const[i]=(0,h.j1)("whatmoreShopId"),[o]=(0,h.j1)("isInDesignMode"),[a]=(0,h.j1)("isDemoBrand"),[l,s]=(0,r.useState)(null),u=(0,r.useRef)(null),{closeClickComponent:x}=(0,r.useContext)(gn),[g,m]=(0,r.useState)({state:"init",cart_count:t});function v(t,e){m({state:t,cart_count:null!==e&&void 0!==e?e:g.cart_count}),"init"!=t&&"errored"!=t?(0,h.bU)("whatmoreAllowAutoSlide",!1):(0,h.bU)("whatmoreAllowAutoSlide",!0)}function f(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}function w(t){const r=function(t){const e=u.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));return 0==e.length?null:e[0].id}(t);if(!r)return void v("init",g.cart_count);v("atcApiCallInProgress",null);Ct(r,1,(0,c.Ipo)(i),i,n,e).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(function(t,e,n){o||a||(async()=>{(0,d.JX)(t,e,n)})()}(n,e,1),v("init",g.cart_count+1),(0,h.bU)("whatmoreAddedToCart",!0),t))).catch((t=>{v("errored",null),console.error("Error while adding to cart:",t)}))}return[g,l,function(){v("productVariantDetailsApiCallInProgress",null),(0,p.pO)(e,(0,c.Ipo)(i),i).then((t=>{u.current=t.variants;const e=function(t){var e=[],n=[],i=[];return t.variants.forEach((o=>{var r,a,l;o.option1&&e.push({option:o.option1,available:null===(r=o.available)||void 0===r||r,type:t.options[0].name}),o.option2&&n.push({option:o.option2,available:null===(a=o.available)||void 0===a||a,type:t.options[1].name}),o.option3&&i.push({option:o.option3,available:null===(l=o.available)||void 0===l||l,type:t.options[2].name})})),e=e.reduce(((t,e,n)=>{var i=t.filter((t=>t.option==e.option));return 0==i.length?[...t,e]:(i[0].available=i[0].available|e.available,t)}),[]),n=n.reduce(((t,e,n)=>{var i=t.filter((t=>t.option==e.option));return 0==i.length?[...t,e]:(i[0].available=i[0].available|e.available,t)}),[]),i=i.reduce(((t,e,n)=>{var i=t.filter((t=>t.option==e.option));return 0==i.length?[...t,e]:(i[0].available=i[0].available|e.available,t)}),[]),[e,n,i]}(t);s(e),!function(t){return t[0].length<=1&&t[1].length<=1&&t[2].length<=1}(e)?v("awaitingVariantSelection",null):!function(){if(u.current&&u.current.length>=1)return u.current.filter((t=>t.available)).length>=1;return!1}()?v("errored",null):w([f(e[0]),f(e[1]),f(e[2])])})).catch((t=>{v("errored",null)}))},w,function(t){var e,n;const i=u.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));return 0==i.length?null:{price:(null!==(e=i[0].price)&&void 0!==e?e:0)/100,compare_price:(null!==(n=i[0].compare_at_price)&&void 0!==n?n:0)/100}},function(){"do_nothing"!==(0,c.v9M)(i)&&("go_to_cart_page"!==(0,c.v9M)(i)?"open_cart_slider"!==(0,c.v9M)(i)||null!==x&&x():yt((0,c.Ipo)(i),i))}]};var bt=function(t){var e,n,i,o;const a=t.productVariantOptions,l=null!==(e=t.width)&&void 0!==e?e:"100%",d=null!==(n=t.height)&&void 0!==n?n:"fit-content",u=null!==(i=t.baseFontSize)&&void 0!==i?i:10,p=t.onOptionSelected,x=null!==(o=t.optionTitleColor)&&void 0!==o?o:"black",[m]=(0,h.j1)("whatmoreSecondaryColor"),[f]=(0,h.j1)("whatmorePrimaryFont"),[w]=(0,h.j1)("whatmoreShopId");let j=[];for(let r=0;r<(null===t||void 0===t||null===(C=t.data)||void 0===C||null===(y=C.product)||void 0===y||null===(S=y.images)||void 0===S?void 0:S.length);r++){var C,y,S,b,I,k;(null===t||void 0===t||null===(b=t.data)||void 0===b||null===(I=b.product)||void 0===I||null===(k=I.images[r].variant_ids)||void 0===k?void 0:k.length)>0&&j.push(r)}function _(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}const[F,E]=(0,r.useState)([_(a[0]),_(a[1]),_(a[2])]);return(0,r.useEffect)((()=>{p(F)}),[F]),(0,g.jsx)(s.Kq,{direction:"column",width:l,height:d,justifyContent:"flex-start",alignItems:"center",spacing:"5px",children:a.map(((e,n)=>{if(0!=e.length)return(0,g.jsxs)(s.Kq,{width:"100%",direction:"column",alignItems:"center",justifyContent:"flex-start",children:[(0,g.jsx)(s.M5,{width:"100%",children:(0,g.jsx)(s.iz,{color:"blackAlpha.500",size:"1px",width:"20%"})}),(0,g.jsxs)(s.xv,{as:"b",fontSize:1.2*u+"px",sx:{color:x+" !important",fontFamily:f+" !important"},align:"center",children:["\xa0",e[0].type,"\xa0"]}),(0,g.jsx)(s.Eq,{justify:"center",children:e.map(((i,o)=>{var r,a,l,d;return(0,g.jsx)(s.Uc,{children:(0,g.jsx)(s.xu,{borderRadius:"Colour"!==i.type&&"Color"!==i.type||j.length!==(null===e||void 0===e?void 0:e.length)?"2px":"50%",padding:"2px",onClick:t=>{t.stopPropagation(),i.available&&E([0==n?i.option:F[0],1==n?i.option:F[1],2==n?i.option:F[2]])},backgroundColor:i.option==F[n]?m:"white",_hover:{bg:i.option==F[n]?m:(0,Q.lA)(m,5)},cursor:"pointer",children:"Colour"!==i.type&&"Color"!==i.type||j.length!==(null===e||void 0===e?void 0:e.length)?(0,g.jsxs)(s.xv,{as:i.available?"samp":"s",fontSize:u+"px",sx:{color:(i.available?i.option==F[n]?"white":"black":"gray")+" !important",fontFamily:f+" !important"},align:"center",paddingX:(d=i.option,d.length>=3?"0px":.5*u+"px"),children:["\xa0",i.option,"\xa0"]}):(0,g.jsx)(v.Ee,{padding:"2px",borderRadius:(0,c.lmH)(w),width:"58px",height:"58px",src:null===t||void 0===t||null===(r=t.data)||void 0===r||null===(a=r.product)||void 0===a||null===(l=a.images)||void 0===l?void 0:l[j[o]].src})})},i.option)}))},n)]},n)}))})},It=n(9219),kt=n(9363);var _t=function(t){const[e]=(0,h.j1)("isInDesignMode"),[n]=(0,h.j1)("isDemoBrand"),[i]=(0,h.j1)("whatmoreSecondaryColor"),o=(0,h.MO)("whatmoreSecondaryColorShade900"),[a]=(0,h.j1)("whatmorePrimaryFont"),[l]=(0,h.j1)("whatmoreShopId"),[x,m,f,w]=(0,u.Z)(),[j,C]=(0,r.useState)(!1),[y,S]=(0,r.useState)(t.product),{whatmoreUITheme:b}=(0,r.useContext)(it.I),{whatmoreWidgetSourceDetails:I}=(0,r.useContext)(it.I),[k,_,F,E,T,P]=St(0,y,t.event),[O,L]=(0,r.useState)(null),[R,D]=(0,r.useState)(parseFloat(y.price)),[z,M]=(0,r.useState)(parseFloat(y.compare_price)),[K,W]=(0,r.useState)(y.currency),[A,q]=(0,r.useState)(),H=t.event,N=t.productClickHandler,{whatmoreIsPreviewMode:Z}=(0,r.useContext)(it.I);(0,r.useEffect)((()=>{(0,c.N8M)(l)&&(0,It.Rb)(y,(0,c.Ipo)(l),l).then((t=>{S(t),D(parseFloat(t.price)),M(parseFloat(t.compare_price)),W(t.currency)}));(async()=>{const t=await(0,p.gK)(y,(0,c.Ipo)(l),l);q(t)})()}),[]);var U=.68*w,B=.55*U,Y=.4*U,X=U*(.55-.4),G=U+"px",J=Y+"px",ot=X+"px",dt=.12*Y;const st=(0,c.ITD)(l);return(0,g.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:tt,marginBottom:(0,c.pq5)(l),width:G,height:"fit-content",boxShadow:"round"==b?"dark-lg":null,onClick:()=>{!function(t,i){e||n||(async()=>{(0,d.wz)(t,i)})(),N(i),C(!0)}(H,y)},backgroundColor:(0,Q.lA)("#ffffff",(0,c.U5_)(l)),animation:j?$.mT:null,borderRadius:"round"==b?"xl":null,overflow:"hidden",onAnimationEnd:()=>{C(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(l),borderColor:(0,c.qPe)(l)},children:[(0,g.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,g.jsx)(s.xu,{height:J,width:J,bgColor:o,children:(0,g.jsx)(v.Ee,{width:J,height:J,src:(0,kt.s)(y.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(l)+" !important"}})}),(0,g.jsxs)(s.xu,{height:J,width:U-Y+"px",children:[(0,g.jsxs)(s.Kq,{direction:"column",justifyContent:(0,c.Fr)(l)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"4px",paddingY:"10px",children:[(0,g.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",1.1*dt+"px","important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",a,"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","important"))},children:(0,at.s)(null==y.title?"":y.title.toString())}),(0,c.QaY)(l)?(0,g.jsxs)(s.Kq,{direction:(0,c.$zZ)(l)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",borderRadius:"round"==b?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"4px",sx:{margin:"0px !important",marginBottom:"4px !important"},children:[(0,g.jsxs)(s.xv,{noOfLines:1,fontSize:.9*dt*(0,c.Rqt)(l)+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:a+" !important",color:(0,c.Uyp)(l)+" !important",padding:"0px !important",letterSpacing:"normal !important",margin:"0px !important"},children:["\xa0"," "+(0,It.jx)(R,"",l,K)," \xa0"]}),(0,lt.B)(R,z)?(0,g.jsxs)(s.xv,{noOfLines:1,fontSize:.9*dt*(0,c.Rqt)(l)+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:a+" !important",color:(0,c.kPs)(l)+" !important",margin:"0px !important",letterSpacing:"normal !important",textDecoration:"line-through !important"},children:[" ",(0,It.jx)(z,"",l,K)]}):(0,g.jsx)(g.Fragment,{})]}):(0,g.jsx)(g.Fragment,{}),(0,g.jsx)(s.xv,{fontSize:.82*dt*(0,c.Rqt)(l)+"px",fontWeight:"medium",lineHeight:"110%",sx:{margin:"0px !important",fontFamily:a+" !important",color:(0,c.eod)(l)+" !important"},children:Z?(0,c.qde)(l):(0,c.aTS)(l)})]}),(0,c.Fr)(l)?(0,g.jsx)(s.Kq,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,g.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,g.jsx)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:o,sx:{borderRadius:"round"==b?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,g.jsx)(rt.Z,{sx:{color:i,fontSize:1.3*dt+"px"}})}),(0,g.jsx)(s.xu,{width:"2px"})]})}):(0,g.jsx)(g.Fragment,{})]})]}),(0,g.jsx)(V.Rg,{unmountOnExit:!0,initialScale:.5,in:"awaitingVariantSelection"==k.state,style:{height:"fit-content",width:"100%"},children:"awaitingVariantSelection"==k.state&&null!=_?(0,g.jsx)(s.xu,{width:"100%",height:"fit-content",marginTop:.1*B+"px",marginBottom:.1*B+"px",overflowY:"auto",overflowX:"hidden",maxHeight:B*st+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,g.jsx)(bt,{width:G,height:"fit-conten",event:H,product:y,data:A,productVariantOptions:_,baseFontSize:1.2*dt,onOptionSelected:t=>{!function(t){L(t);const e=T(t);e&&(D(e.price),M(e.compare_price))}(t)}})}):(0,g.jsx)(g.Fragment,{})}),(0,g.jsx)(s.Kq,{direction:"row",width:"100%",height:ot,justifyContent:"center",alignItems:"center",children:(0,g.jsx)(gt,{baseFontSize:.3*X,event:H,product:y,cartState:k.state,cartCount:k.cart_count,onClickAtc:t=>{"init"==k.state?(F(),(0,et.GF)({userInteractionType:nt.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:I,event:H,productList:[y],ctaList:H.cta})):"awaitingVariantSelection"==k.state&&E(O),(0,c.IKD)(l)&&setTimeout((()=>function(){const t=window.location.origin+"/cart";window.location.href=t}()),500)},onCartIconClick:()=>{P()}})})]})},Ft=n(3867);var Et=function(t){var e,n,i;const[o]=(0,h.j1)("isInDesignMode"),[r]=(0,h.j1)("isDemoBrand"),[a]=(0,h.j1)("whatmoreSecondaryColor"),[l]=(0,h.j1)("whatmorePrimaryFont"),c=t.event,u=t.product,p=null!==(e=t.baseFontSize)&&void 0!==e?e:10,x=null!==(n=t.width)&&void 0!==n?n:"fit-content",m=null!==(i=t.height)&&void 0!==i?i:"fit-content";return(0,g.jsx)(s.rU,{href:u.product_link,color:a,onClick:()=>{!function(t,e){o||r||(async()=>{(0,d.$L)(t,e)})()}(c,u)},children:(0,g.jsx)(s.xu,{width:x,height:m,padding:"2x",boxShadow:"lg",borderRadius:"md",backgroundColor:"white",children:(0,g.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",spacing:"5px",children:[(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.xv,{lineHeight:"100%",fontSize:1.4*p,fontWeight:"semibold",sx:{fontFamily:l+" !important",color:a+" !important"},children:" VIEW MORE "})}),(0,g.jsx)(s.M5,{children:(0,g.jsx)(rt.Z,{sx:{color:a,fontSize:1.4*p}})})]})})})},Tt=n(7605);var Pt=n(6163);function Ot(t){var e;const[n]=(0,h.j1)("whatmoreSecondaryColor"),[i]=(0,h.j1)("whatmorePrimaryFont"),[o]=(0,h.j1)("whatmoreShopId"),[a,l]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),u=t.onClick,p=t.width,x=t.height,m=t.title;return(0,g.jsx)(s.xu,{width:p,height:x,padding:"2x",boxShadow:"lg",backgroundColor:n,onClick:t=>{t.stopPropagation(),u(),l(!0)},animation:a?$.mT:null,onAnimationEnd:()=>{l(!1)},cursor:"pointer",children:(0,g.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:(0,g.jsxs)(s.xv,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},lineHeight:"100%",fontSize:1.4*d+"px",fontWeight:"semibold",sx:{fontFamily:i+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",m,"\xa0"]})})})}var Lt=function(t){var e,n,i;const[o]=(0,h.j1)("whatmoreShopId"),r=t.event,a=t.product,l=null!==(e=t.baseFontSize)&&void 0!==e?e:10,d=t.onShopNowClick,s=null!==(n=t.width)&&void 0!==n?n:"100%",c=null!==(i=t.height)&&void 0!==i?i:"100%";return(0,g.jsx)(Ot,{onClick:function(){d()},event:r,product:a,baseFontSize:l,width:s,height:c,title:"SHOP NOW"})};var Rt=function(t){var e;const[n]=(0,h.j1)("isInDesignMode"),[i]=(0,h.j1)("isDemoBrand"),[o]=(0,h.j1)("whatmorePrimaryFont"),[a]=(0,h.j1)("whatmoreShopId"),[l,p,x,m]=(0,u.Z)(),[f,w]=(0,r.useState)(!1),[j,C]=(0,r.useState)(t.product),{whatmoreWidgetSourceDetails:y}=(0,r.useContext)(it.I),[S,b,I,k,_,F]=St(0,j,t.event),[E,T]=(0,r.useState)(null),[P,O]=(0,r.useState)(parseFloat(j.price)),[L,R]=(0,r.useState)(parseFloat(j.compare_price)),[D,z]=(0,r.useState)(j.currency),M=t.event,K=t.productClickHandler,W=null!==(e=t.tileWidthFactor)&&void 0!==e?e:1;(0,r.useEffect)((()=>{(0,c.N8M)(a)&&(0,It.Rb)(j,brandDomainContext(a),a).then((t=>{C(t),O(parseFloat(t.price)),R(parseFloat(t.compare_price)),z(t.currency)}))}),[]);var A=m*W,q=.3*A,H=A+"px",N=.7*q,Z=.9*N,U=.12*q;const B=(0,c.ITD)(a);function Y(t,e){n||i||(async()=>{(0,d.wz)(t,e)})(),K(e),w(!0)}return(0,g.jsx)(s.Kq,{direction:"row",width:H,height:"fit-content",justifyContent:"center",children:(0,g.jsx)(s.xu,{marginTop:tt,marginBottom:(0,c.pq5)(a),width:H,onClick:t=>{},animation:f?$.mT:null,borderRadius:"lg",onAnimationEnd:()=>{w(!1)},children:(0,g.jsxs)(s.Kq,{direction:"column",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",spacing:"0px",children:[(0,g.jsxs)(s.Kq,{direction:"row",width:"100%",height:"70%",justifyContent:"space-around",alignItems:"center",borderTopRadius:"lg",overflow:"hidden",onClick:()=>{Y(M,j)},children:[(0,g.jsx)(s.xu,{height:N+"px",width:N+"px",children:(0,g.jsx)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",children:(0,g.jsx)(s.xu,{height:Z+"px",width:Z+"px",borderRadius:"lg",bgColor:"gray.100",overflow:"hidden",children:(0,g.jsx)(v.Ee,{width:Z+"px",height:Z+"px",src:j.thumbnail_image,objectFit:"cover"})})})}),(0,g.jsx)(s.xu,{height:N+"px",width:A-N+"px",children:(0,g.jsxs)(s.Kq,{direction:"column",justifyContent:"space-between",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingY:"10px",spacing:"2px",children:[(0,g.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*U+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:o+" !important",color:"white !important"},children:(0,at.s)(j.title.toString())}),(0,g.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",aligntItems:"center",marginTop:"5px",children:[(0,c.QaY)(a)?(0,g.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"flex-start",aligntItems:"center",borderRadius:"lg",backgroundColor:"blackAlpha.500",paddingX:"10px",paddingY:"5px",children:[(0,g.jsxs)(s.xv,{noOfLines:1,fontSize:1*U+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:o+" !important",color:"white !important"},children:["\xa0"," ",(0,It.jx)(parseFloat(P),"",a,D)," \xa0"]}),(0,g.jsx)(s.M5,{children:(0,lt.B)(j.price,j.compare_price)?(0,g.jsxs)(s.xv,{noOfLines:1,fontSize:.8*U+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:o+" !important",color:"#F9F6EE !important",textDecoration:"line-through !important"},children:[" ",(0,It.jx)(parseFloat(L),"",a,D)]}):(0,g.jsx)(g.Fragment,{})})]}):(0,g.jsx)(g.Fragment,{}),(0,g.jsx)(s.M5,{children:(0,g.jsx)(Ft.Z,{storeId:a,productId:j.client_product_id,productLink:j.product_link,fontSize:1*U,fontColor:"white"})})]})]})})]}),(0,g.jsx)(V.Rg,{unmountOnExit:!0,initialScale:.5,in:"awaitingVariantSelection"==S.state,style:{height:"fit-content",width:"100%"},children:"awaitingVariantSelection"==S.state&&null!=b?(0,g.jsx)(s.xu,{width:"100%",height:"fit-content",marginTop:.1*q+"px",marginBottom:.1*q+"px",overflowY:"auto",overflowX:"hidden",maxHeight:q*B+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,g.jsx)(bt,{width:H,height:"fit-content",event:M,product:j,productVariantOptions:b,baseFontSize:1*U,onOptionSelected:t=>{!function(t){T(t);const e=_(t);e&&(O(e.price),R(e.compare_price))}(t)},optionTitleColor:"white"})}):(0,g.jsx)(g.Fragment,{})}),(0,g.jsxs)(s.Kq,{direction:"row",width:"100%",height:"30%",justifyContent:"center",alignItems:"center",paddingBottom:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,g.jsx)(s.xu,{width:"100%",height:"100%",children:(0,g.jsx)(Et,{baseFontSize:.8*U,event:M,product:j,width:"100%",height:"100%"})}),(0,g.jsx)(s.xu,{width:"100%",height:"100%",borderRadius:"md",overflow:"hidden",children:(0,c.Ib9)(a)?(0,g.jsx)(Lt,{baseFontSize:.8*U,event:M,product:j,borderRadius:"md",onShopNowClick:t=>{Y(M,j)}}):(0,g.jsx)(g.Fragment,{children:"form"===(0,c._5p)(a)?(0,g.jsx)(Pt.default,{baseFontSize:.8*U,event:M,product:j,width:"100%",height:"100%",showAddedToCart:!0}):(0,g.jsx)(gt,{baseFontSize:.8*U,event:M,product:j,cartState:S.state,cartCount:S.cart_count,borderRadius:"md",onClickAtc:t=>{"init"==S.state?(I(),(0,et.GF)({userInteractionType:nt.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:y,event:M,productList:[j],ctaList:M.cta})):"awaitingVariantSelection"==S.state&&k(E)},onCartIconClick:()=>{F()}})})})]})]})})})};var Dt=function(t){const[e]=(0,h.j1)("isInDesignMode"),[n]=(0,h.j1)("isDemoBrand"),[i]=(0,h.j1)("whatmoreSecondaryColor"),o=(0,h.MO)("whatmoreSecondaryColorShade900"),[a]=(0,h.j1)("whatmorePrimaryFont"),[l]=(0,h.j1)("whatmoreShopId"),[p,x,m,f]=(0,u.Z)(),[w,j]=(0,r.useState)(!1),[C,y]=(0,r.useState)(t.product),{whatmoreUITheme:S}=(0,r.useContext)(it.I),[b,I]=(0,r.useState)(!(0,c.N8M)(l)),[k,_]=(0,r.useState)(parseFloat(C.price)),[F,E]=(0,r.useState)(parseFloat(C.compare_price)),[T,P]=(0,r.useState)(C.currency),O=t.event;t.productClickHandler,(0,r.useEffect)((()=>{(0,c.N8M)(l)&&(0,It.Rb)(C,(0,c.Ipo)(l),l).then((t=>{y(t),_(parseFloat(t.price)),E(parseFloat(t.compare_price)),P(t.currency),I(!0)}))}),[]);var L=.68*f,R=.4*L,D=L+"px",z=R+"px",M=L*(.55-.4)+"px",K=.12*R;(0,c.ITD)(l);const{whatmoreWidgetSourceDetails:W}=(0,r.useContext)(it.I);function A(t){return(0,c.lj5)(l)?t.product_link+"?"+(0,c.awP)(l)+"&"+(0,c.n9s)(l)+"&"+(0,c.vaK)(l):t.product_link}function q(t,i){e||n||(async()=>{(0,d.wz)(t,i),(0,et.GF)({userInteractionType:nt.K.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:W,event:t,productList:[i],ctaList:t.cta})})(),j(!0)}return(0,g.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:tt,marginBottom:(0,c.pq5)(l),width:D,height:"fit-content",boxShadow:"round"==S?"dark-lg":null,onClick:()=>{q(O,C),window.location.href=A(C)},backgroundColor:(0,Q.lA)("#ffffff",(0,c.U5_)(l)),animation:w?$.mT:null,borderRadius:"round"==S?"xl":null,overflow:"hidden",onAnimationEnd:()=>{j(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(l),borderColor:(0,c.qPe)(l)},children:[(0,g.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,g.jsx)(s.xu,{height:z,width:z,bgColor:o,children:(0,g.jsx)(v.Ee,{width:z,height:z,src:(0,kt.s)(C.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(l)+" !important"}})}),(0,g.jsxs)(s.xu,{height:z,width:L-R+"px",children:[(0,g.jsxs)(s.Kq,{direction:"column",justifyContent:(0,c.Fr)(l)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingY:"10px",children:[(0,g.jsx)(s.xv,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},style:{overflow:"hidden",textOverflow:"ellipsis"},sx:{fontFamily:a+" !important",color:"black !important",lineHeight:"120% !important",fontWeight:"medium !important",fontSize:1.1*K+"px !important",noOfLines:"2 !important"},children:(0,at.s)(null==C.title?"":C.title.toString())}),(0,c.QaY)(l)?(0,g.jsxs)(s.Kq,{direction:(0,c.$zZ)(l)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",marginTop:"5px",borderRadius:"round"==S?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"5px",children:[b&&(0,g.jsxs)(s.xv,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},noOfLines:1,fontSize:.9*K+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:a+" !important",color:(0,c.Uyp)(l)+" !important",margin:"0px !important"},children:["\xa0"," "+(0,It.jx)(k,"",l,T)," \xa0"]}),(0,lt.B)(k,F)&&b?(0,g.jsxs)(s.xv,{as:"s",style:{minHeight:0,textDecoration:"line-through"},noOfLines:1,fontSize:.9*K+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:a+" !important",color:(0,c.kPs)(l)+" !important",margin:"0px !important"},children:[" ",(0,It.jx)(F,"",l,T)]}):(0,g.jsx)(g.Fragment,{})]}):(0,g.jsx)(g.Fragment,{})]}),(0,c.Fr)(l)?(0,g.jsx)(s.Kq,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,g.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,g.jsx)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:o,sx:{borderRadius:"round"==S?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,g.jsx)(rt.Z,{sx:{color:i,fontSize:1.3*K+"px"}})}),(0,g.jsx)(s.xu,{width:"2px"})]})}):(0,g.jsx)(g.Fragment,{})]})]}),(0,c.pp3)(l)&&(0,g.jsx)(s.Kq,{direction:"row",width:"100%",height:M,justifyContent:"center",alignItems:"center",children:(0,g.jsx)(Lt,{baseFontSize:.8*K,event:O,product:C,borderRadius:"md",onShopNowClick:t=>{q(O,C),window.location.href=A(C)}})})]})};var zt=function(t){const[e]=(0,h.j1)("whatmoreShopId"),n=(0,c.eyg)(e),i=t.event,o=t.product;return"broad-tile"==n?(0,g.jsx)(_t,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile-no-cta"==n?(0,g.jsx)(Dt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"link_only"==n?(0,g.jsx)(ot,{product:t.product,event:t.event}):"narrow-tile"==n?(0,g.jsx)(Rt,{event:i,product:o,productClickHandler:t.productClickHandler,tileWidthFactor:i.products.length>1?.68:void 0}):(0,g.jsx)(_t,{product:t.product,event:t.event,productClickHandler:t.productClickHandler})},Mt=n(6119),Kt=n(3388),Wt=n(7643);var At=function(t){const[e,n,i,o]=(0,u.Z)(),[r]=(0,h.j1)("whatmoreShopId"),d=(0,h.MO)("isInDesignMode"),p=(0,h.MO)("isDemoBrand"),x=t.event,m=t.productClickHandler,v=(0,c.eyg)(r);if(!(0,Kt.kT)(x))return(0,g.jsx)(g.Fragment,{});if(1==x.products.length&&(void 0==x.cta||0==x.cta.length)){const t=x.products[0];return(0,c.rnv)(r)?(0,g.jsx)(s.Kq,{direction:"horizontal",width:o,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,g.jsx)(Wt.u,{userInteractionType:nt.K.PRODUCT_CTA_VIEW,event:x,productList:[t],triggerFlag:!d&&!p,children:(0,g.jsx)(s.M5,{children:(0,g.jsx)(Rt,{event:x,product:t,productClickHandler:m},x.event_id+t.product_id)})})}):(0,g.jsx)(s.Kq,{direction:"horizontal",width:o,height:"fit-content",justifyContent:"center",backgroundImage:"narrow-tile"==v?"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,g.jsx)(s.M5,{children:(0,g.jsx)(Wt.u,{userInteractionType:nt.K.PRODUCT_CTA_VIEW,event:x,productList:[t],triggerFlag:!d&&!p,children:(0,g.jsx)(zt,{event:x,product:t,productClickHandler:m},x.event_id+t.product_id)})})})}return(0,g.jsx)(s.M5,{children:(0,g.jsx)("div",{onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,g.jsx)(s.xu,{width:o+"px",backgroundImage:"narrow-tile"==v?"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,g.jsxs)(a.tq,{slidesPerView:1==x.products.length?1:1.4,initialSlide:x.products.length<=2||(0,c.VqZ)(r)?0:1,centeredSlides:!(0,c.VqZ)(r),modules:[l.Gk],mousewheel:{invert:!1,thresholdDelta:20},nested:!0,children:[x.products.map((t=>(0,g.jsx)(a.o5,{children:(0,g.jsx)(Wt.u,{userInteractionType:nt.K.PRODUCT_CTA_VIEW,event:x,productList:[t],triggerFlag:!d&&!p,children:(0,g.jsx)(s.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",alignItems:"center",children:(0,g.jsx)(zt,{event:x,product:t,productClickHandler:m},x.event_id+t.product_id)})})},x.event_id+t.product_id))),(0,c.pp3)(r)&&void 0!=x.cta&&x.cta.map((t=>(0,g.jsx)(a.o5,{children:(0,g.jsx)(s.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",alignItems:"center",children:(0,g.jsx)(Mt.Z,{event:x,cta:t},x.event_id+t.cta_id)})},x.event_id+t.cta_id)))]})})})})};var qt=function(t){const[e,n]=(0,h.j1)("isProductSwiperCatalogOpen"),i=t.event,o=t.productClickHandler;return(0,r.useContext)(gn).isIOS&&e?(0,g.jsx)(At,{event:i,productClickHandler:o},i.event_id):(0,g.jsx)(V.MT,{unmountOnExit:!0,initialScale:.2,in:e,children:(0,g.jsx)(At,{event:i,productClickHandler:o},i.event_id)})};function Ht(t){const e=t.event,[n,i,o,r]=(0,u.Z)(),[a]=(0,h.j1)("whatmorePrimaryFont");return(0,g.jsx)(s.xu,{width:"fit-content",height:"fit-content",padding:"5px",children:(0,g.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",children:[(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.Cd,{overflow:"hidden",size:.15*r+"px",children:(0,g.jsx)(v.Ee,{width:"100%",height:"100%",src:e.thumbnail_image})})}),(0,g.jsx)(s.xu,{width:"fit-content",height:"fit-content",children:(0,g.jsxs)(s.Kq,{direction:"column",width:"fit-content",height:"fit-content",children:[(0,g.jsx)(s.xv,{color:"white",fontSize:.05*r+"px",fontWeight:"bold",fontFamily:"sans-serif",align:"left",sx:{fontFamily:a+" !important"},children:e.presenter_name.substring(0,15)}),(0,g.jsx)(q.Z,{event:e,fontSize:.03*r+"px"})]})})]})})}var Nt,Zt=function(t){const[e]=(0,h.j1)("isInDesignMode"),[n]=(0,h.j1)("isDemoBrand"),[i,o]=(0,h.j1)("isProductSwiperCatalogOpen"),[a,l]=(0,j.Z)(),[d,u]=(0,h.j1)("isFirstIndicatorRenderDone"),p=(0,r.useContext)(gn),[x]=(0,h.j1)("whatmoreShopId"),m=t.event,v=t.isLast,f=t.onCloseCallback,w=t.focusRef,C=t.productClickHandler;return(0,g.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",children:(0,g.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,g.jsx)(s.xu,{width:"full",margin:"2px",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:(0,g.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"space-between",paddingRight:"10px",paddingLeft:"10px",children:[(0,g.jsx)(Ht,{event:m}),(0,g.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,g.jsx)(I,{focusRef:w}),(0,g.jsx)(U,{event:m,onCloseCallback:f})]})]})}),(0,g.jsx)(s.xu,{width:"100%",height:"100%",onClick:()=>{l(!a)}}),(0,g.jsxs)(s.xu,{width:"full",height:"fit-content",children:[p.totalEvents>1&&!d&&p.showSwipeIndicator?(0,g.jsx)(s.xu,{width:"full",margin:"2px",children:(0,g.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,g.jsx)(G,{swipeUp:!v})})}):null,void 0!=m.products&&m.products.length>0?(0,g.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(x)?(0,g.jsx)(s.xu,{w:"100%",children:(0,g.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,g.jsx)(A,{event:m,onToggle:t=>{o("minimize-button"!==t)}})})}):(0,g.jsx)(g.Fragment,{}),(0,g.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,g.jsx)(qt,{event:m,productClickHandler:C})})]}):(0,g.jsx)("div",{})]})]})})};function Ut(t){const[e,n,i,o]=(0,u.Z)(),[a]=(0,h.j1)("whatmorePrimaryFont"),[l]=(0,h.j1)("whatmoreShopId"),[d,p]=(0,r.useState)(""),x=t.data,m=(t.event,t.product,t.setShowOptionsChart);var f=.4*o*.8*.13;(0,r.useEffect)((()=>{var t,e,n;let i="vanyaclothing.myshopify.com";"1972174947"===l&&(i="vanyaclothing.myshopify.com");const o="https://app.kiwisizing.com/api/getSizingChart?shop=".concat(i,"&product=").concat(null===x||void 0===x||null===(t=x.product)||void 0===t||null===(e=t.image)||void 0===e?void 0:e.product_id,"&title=").concat(null===x||void 0===x||null===(n=x.product)||void 0===n?void 0:n.title,"&tags=&cacheSettingsUpdateAt=2020-08-11T15%3A19%3A49.000Z&settingsVersion=19");fetch(o).then((t=>{if(!t.ok)throw new Error("HTTP error! Status: ".concat(t.status));return t.json()})).then((t=>{p(t.sizings[0].layout.data[0].data.url)})).catch((t=>{console.error("Error fetching data:",t)}))}),[]);const w=(0,F.F4)(Nt||(Nt=(0,k.Z)(["\n 0% {\n transform: translateY(100%);\n }\n "]))),j="".concat(w," 0.5s");return(0,g.jsx)(s.Kq,{bg:"black",height:"100%",opacity:"100%",width:"100%",borderTopRadius:"xl",animation:j,justifyContent:"center",alignItems:"center",children:(0,g.jsxs)(s.xu,{width:"100%",height:"100%",children:[(0,g.jsx)(v.Ee,{width:"100%",height:"auto",src:(0,c.Zb8)(l)?d:(0,c.KM)(l),objectFit:"contain",borderTopRadius:"xl"}),(0,g.jsx)(s.Kq,{width:"100%",height:"100%",direction:"column",justifyContent:"flex-start",style:{position:"relative",zIndex:1,bottom:"90%"},className:"whatmore-ios-css-relative-fix",children:(0,g.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",onClick:t=>{t.stopPropagation(),m(!1)},cursor:"pointer",padding:"4px",children:(0,g.jsx)(H.Z,{sx:{boxShadow:3,color:"white !important",fontSize:1.6*f,filter:"drop-shadow(0 0 5px black);"}})})})]})})}var Vt=n(9748),Bt=n(5630),Yt=(n(1332),n(6665));function Xt(t){var e;const[n,i]=(0,r.useState)(null),o=t.product;return(0,r.useEffect)((()=>{(0,ft.bN)(o).then((t=>{i(t.variants)}))}),[]),null==n?(0,g.jsx)(g.Fragment,{}):(0,g.jsx)("div",{style:{width:null!==(e=t.width)&&void 0!==e?e:"100%",borderRadius:"6px",overflow:"hidden",height:1.5*t.height,backgroundColor:"white"},children:(0,g.jsxs)("form",{method:"post",action:"/cart/add","accept-charset":"UTF-8",class:"shopify-product-form",enctype:"multipart/form-data",is:"product-form",children:[(0,g.jsx)("input",{type:"hidden",name:"form_type",value:"product"}),(0,g.jsx)("input",{type:"hidden",name:"utf8",value:"\u2713"}),(0,g.jsx)("input",{type:"hidden",name:"id",value:t.variantId}),(0,g.jsx)("input",{type:"hidden",value:t.product.product_link,name:"productUrl"}),(0,g.jsx)("div",{class:"shiprocket-headless","data-type":"product"}),(0,g.jsx)("textarea",{"data-variant-json":"",class:"hide","aria-hidden":"true","aria-label":"Product JSON",children:JSON.stringify(n).toString()})]})})}function Gt(t){const e=(0,h.MO)("whatmoreShopId"),n=t.product;return"63748341981"==e||"55845847231"==e||"47837511839"==e?(0,g.jsx)(Xt,{product:n,variantId:t.variantId,height:t.height,width:t.width}):(0,g.jsx)(g.Fragment,{})}function Jt(t){var e,n,i;const[o]=(0,h.j1)("isInDesignMode"),[a]=(0,h.j1)("isDemoBrand"),[l]=(0,h.j1)("whatmoreShopId"),[u]=(0,h.j1)("whatmorePrimaryFont"),[p]=(0,h.j1)("whatmoreSecondaryColor"),{whatmoreUITheme:x}=(0,r.useContext)(it.I),{whatmoreWidgetSourceDetails:m}=(0,r.useContext)(it.I),[v,f]=(0,r.useState)(!1),{closeClickComponent:w}=(0,r.useContext)(gn),[j,C]=(0,r.useState)(!1),y=t.FONT_SIZE,S=t.data,b=t.event,I=t.selectedVariantId,k=t.product,_=t.itemQuantity,F=t.PRODUCT_TILE_WIDTH,E=t.cartItemCount,T=t.addToCartFlag,P=t.setAddToCartFlag,L=t.soldOutFlag,R=t.setSoldOutFlag;const D=async t=>{var e,n,i;if(t.stopPropagation(),f(!0),function(t,e,n){o||a||(async()=>{(0,d.JX)(t,e,n)})()}(b,k,_),(0,et.GF)({userInteractionType:nt.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:m,event:b,productList:[k],ctaList:b.cta}),void 0===I)return void console.log("ERROR ! Select the option.");const r=void 0!==I?I:null===S||void 0===S||null===(e=S.product)||void 0===e||null===(n=e.variants)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.id,s=S.product.variants.filter((t=>t.id==r))[0].price;Ct(r,_,(0,c.Ipo)(l),l,b,k).then((t=>{if(!t.ok)throw new Error(t.status);return f(!1),P(!0),t.json()})).then((t=>((0,h.bU)("whatmoreAddedToCart",!0),(0,c.kad)(l)&&(o||(async()=>{const t=await(0,ft.Mj)().then((t=>t.json())).catch((t=>{console.error("Whatmore :: Error while fetching cart_token for initiateOrderTrackingEvent.",t)}));(0,Tt.a)(l,window.location.hostname,"",b.event_id,k.product_id,r,s,_,"add-to-cart",t.token)})()),t))).then((()=>{"2665447536"==l&&M()})).catch((t=>{f(!1),R(!0),console.error("Error:",t)}))},z=t=>{var e,n,i;(function(t,e){o||a||(async()=>{(0,d.$L)(t,e)})()}(b,k),"buy-now"==t)&&(!function(t,e,n,i){"shopify"==n?(0,ft.bj)(t,e,i):(0,vt.rY)(t,e,i)}(void 0!==I?I:null===S||void 0===S||null===(e=S.product)||void 0===e||null===(n=e.variants)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.id,_,(0,c.Ipo)(l),l),(0,et.GF)({userInteractionType:nt.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:m,event:b,productList:[k],ctaList:b.cta}));"view-more"==t&&(window.location.href=k.product_link+"?"+(0,c.awP)(l)+"&"+(0,c.n9s)(l)+"&"+(0,c.vaK)(l)+((0,c.C0m)(l)?"&currency="+k.currency:""))},M=()=>{yt((0,c.Ipo)(l),l)};return(0,g.jsxs)(s.Kq,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px",position:t.position,bg:"#D3D3D3",borderRadius:"10px",bottom:"10px",left:"50%",zIndex:"1",transform:"translateX(-50%)",direction:"row",width:"95%",paddingX:"20px",paddingTop:"15px",paddingBottom:"15px",spacing:"15px",fontSize:.9*y,children:[" ",L?(0,g.jsx)(Vt.zx,{width:"90%",bg:"#252324",variant:"outline",opacity:4,_hover:{bg:"#252324"},height:2.5*y,disabled:!0,sx:{borderRadius:"round"==x?"5px":"0px",borderWidth:(0,c.alU)(l),borderColor:(0,c.qPe)(l)},children:(0,g.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"white !important",fontFamily:u+" !important"},children:"Sold Out"})}):(0,g.jsxs)(s.Kq,{direction:"vertical"==(0,c.rc3)(l)?"column":"row",width:"100%",spacing:"15px",fontSize:.9*y,justifyContent:"center",children:[(0,c.$bv)(l)?(0,g.jsx)(Vt.zx,{width:"90%",height:2.5*y,onClick:D,sx:{paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:"#343434"===(0,c.FdS)(l)?p+" !important":(0,c.FdS)(l)+" !important",borderRadius:"round"==x?"5px":"0px",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?p:(0,c.yxc)(l),_hover:{backgroundColor:"transparent !important",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?p:(0,c.yxc)(l)}},children:v?(0,g.jsx)(Bt.$,{display:"flex !important",color:"white"}):(0,g.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:(0,c.eSJ)(l)+" !important",fontFamily:u+" !important"},fontSize:y,children:(0,c.tan)(l)})}):(0,g.jsx)(g.Fragment,{}),(0,c.cDD)(l)?(0,g.jsx)(g.Fragment,{children:(0,c.H$w)(l)?(0,g.jsx)(Gt,{variantId:void 0!==I?I:null===S||void 0===S||null===(e=S.product)||void 0===e||null===(n=e.variants)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.id,product:k,height:2.5*y,width:"90%",fontSize:y,fontFamily:u}):(0,g.jsx)(g.Fragment,{children:(0,c.Stj)(l)?(0,g.jsx)(Vt.zx,{width:"90%",variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*y,onClick:()=>z("view-more"),sx:{backgroundColor:"white !important",borderRadius:"round"==x?"5px":"0px",borderWidth:(0,c.alU)(l),borderColor:(0,c.qPe)(l)},children:(0,g.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:p+"!important",fontFamily:u+" !important"},fontSize:y,children:(0,c.Z59)(l)})}):(0,g.jsx)(Vt.zx,{width:"90%",variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*y,onClick:t=>{"2665447536"==l?D(t):z("buy-now")},sx:{backgroundColor:(0,c.IIW)(l)+" !important",borderRadius:"round"==x?"5px":"0px",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?p:(0,c.yxc)(l),_hover:{backgroundColor:"transparent !important"}},children:(0,g.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"#343434"===(0,c.iKW)(l)?p+" !important":(0,c.iKW)(l)+" !important",fontFamily:u+" !important"},fontSize:y,children:(0,c.ZuH)(l)})})})}):(0,g.jsx)(g.Fragment,{})]}),(0,g.jsx)(g.Fragment,{children:(0,c.$bv)(l)?(0,g.jsx)(g.Fragment,{children:j?(0,g.jsx)(s.kC,{width:"10%",spacing:"0",right:0,children:(0,g.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,g.jsx)(Yt.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*y}})})}):(0,g.jsxs)(s.kC,{animation:T?O:"none",onAnimationEnd:()=>P(!1),width:"10%",spacing:"0",right:0,onClick:()=>{"do_nothing"!==(0,c.v9M)(l)&&("go_to_cart_page"!==(0,c.v9M)(l)?(C(!0),function(t){"open_cart_slider"!==(0,c.v9M)(t)||null!==w&&w()}(l)):M())},cursor:"pointer",children:[(0,g.jsx)(st.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*y}}),E>0?(0,g.jsx)(s.Cd,{padding:"2px",bg:"white",size:1.1*y,top:.03*-F,verticalAlign:"top",position:"relative",left:.11*-F,zIndex:"1",children:(0,g.jsx)(s.xv,{sx:{color:"black !important",fontFamily:u+" !important"},fontWeight:"bold",fontSize:.7*y,children:E})}):(0,g.jsx)(g.Fragment,{})]})}):(0,g.jsx)(g.Fragment,{})})]})}function $t(t){var e;const[n]=(0,h.j1)("whatmorePrimaryFont"),i=t.setOpenShopNow,o=t.FONT_SIZE,r=t.setLockSwiper,a=null!==(e=t.headerText)&&void 0!==e?e:"Shop Now";return(0,g.jsxs)(s.kC,{justifyContent:"center",paddingTop:"10px",paddingBottom:"8px",width:"100%",children:[(0,g.jsx)(s.kC,{width:"10%",display:"flex !important"}),(0,g.jsx)(s.kC,{width:"90%",justifyContent:"center",children:(0,g.jsx)(s.xv,{align:"center",fontSize:1.25*o,fontWeight:"semibold",sx:{color:"black !important",fontFamily:n+" !important"},as:"b",children:a})}),(0,g.jsx)(s.kC,{justifyContent:"center",width:"10%",alignItems:"center",onClick:t=>{t.stopPropagation(),i(!1),r(!1)},cursor:"pointer",children:(0,g.jsx)(H.Z,{sx:{boxShadow:3,color:"black !important",fontSize:1.2*o,filter:"drop-shadow(0 0 5px black);"}})})]})}function Qt(t){const[e]=(0,h.j1)("whatmorePrimaryFont"),n=t.FONT_SIZE,i=t.data;return(0,g.jsxs)(s.Kq,{direction:"column",paddingX:"20px",height:"fit-content",children:[(0,g.jsx)(s.Kq,{children:(0,g.jsx)(s.xv,{fontSize:n,fontWeight:"bold",justifyContent:"center",sx:{color:"black !important",fontFamily:e+" !important"},children:"Description"})}),(0,g.jsx)(s.Kq,{children:(0,g.jsx)(s.xu,{overflowY:"auto",scrollBehavior:"smooth",sx:{"::-webkit-scrollbar":{display:"none"}},children:(0,g.jsx)(s.xv,{fontSize:.8*n,justifyContent:"normal",dangerouslySetInnerHTML:{__html:(o=i.product.body_html,o.replace(/style="[^"]*color[^"]*"/gi,""))},sx:{fontFamily:e+" !important",lineHeight:"140% !important"}})})})]});var o}function te(t){var e;const[n,i]=(0,r.useState)(t.product),[o]=(0,h.j1)("whatmorePrimaryFont"),[a]=(0,h.j1)("whatmoreShopId");(0,r.useEffect)((()=>{(0,c.N8M)(a)&&(0,It.Rb)(n,(0,c.Ipo)(a),a).then((t=>{i(t)}))}),[]);const l=t.FONT_SIZE,d=t.data,u=t.itemPrice;const p=null===(e=t.data.product.variants.find((e=>e.id==t.selectedVariantId)))||void 0===e?void 0:e.compare_at_price,x=p&&0!=p&&p>u?Math.ceil((p-u)/p*100):NaN;return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(s.kC,{direction:"column",paddingLeft:"20px",paddingRight:"20px",paddingY:"5px",children:[(0,g.jsx)(s.kC,{children:(0,g.jsx)(s.rU,{href:function(t){return(0,c.lj5)(a)?t.product_link+"?"+(0,c.awP)(a)+"&"+(0,c.n9s)(a)+"&"+(0,c.vaK)(a)+((0,c.C0m)(a)?"&currency="+t.currency:""):t.product_link+((0,c.C0m)(a)?"?currency="+t.currency:"")}(n),color:"white",children:(0,g.jsx)(s.xv,{isTruncated:!0,noOfLines:2,padding:"2px",fontSize:1.1*l,sx:{color:"black !important",lineHeight:"140% !important",fontFamily:o+" !important"},as:"b",children:d.product.title})})}),(0,g.jsxs)(s.kC,{direction:"row",gap:"6px",paddingTop:"4px",children:[p&&p>u&&(0,g.jsx)(s.xv,{as:"s",padding:"2px",fontSize:1.2*l,fontWeight:"semibold",sx:{color:"gray !important",fontFamily:o+" !important"},children:(0,It.jx)(parseFloat(p)," ",a,n.currency)}),(0,g.jsx)(s.xv,{as:"b",padding:"2px",fontSize:1.2*l,fontWeight:"semibold",sx:{color:"black !important",fontFamily:o+" !important"},children:(0,It.jx)(parseFloat(u)," ",a,n.currency)}),!isNaN(x)&&0!=x&&(0,g.jsx)(s.xu,{display:"flex",bg:(0,c.sTg)(a)?(0,c.ZJm)(a):"white",alignItems:"center",borderRadius:"4px",width:"fit-content",px:"6px",children:(0,g.jsx)(s.xv,{fontSize:(0,c.sTg)(a)?"14px":1.1*l,sx:{color:(0,c.mso)(a)+" !important",fontFamily:o+" !important"},children:(0,c.sTg)(a)?"".concat(x,"% off"):"Save ".concat((0,It.jx)(parseFloat(p-u)," ",a,n.currency))})})]})]})})}function ee(t){var e,n;const[i]=(0,h.j1)("whatmorePrimaryFont"),[o]=(0,h.j1)("whatmoreShopId"),{setShowOptionsChart:a}=(0,r.useContext)(he),[l,d]=(0,r.useState)({}),u=(0,h.MO)("whatmoreSecondaryColorShade300"),p=t.selectedColor,x=t.selectOptionFirstHandler,m=t.selectOptionSecondHandler,f=t.selectOptionThirdHandler,w=(t.PRODUCT_TILE_HEIGHT,t.PRODUCT_TILE_WIDTH,t.FONT_SIZE),j=t.data,C=(t.product,(t,e)=>{d((n=>({...n,[t]:e})))});(0,r.useEffect)((()=>{d((t=>{var e,n,i,o,r,a,l,d,s,c,h,u,p,x,g,m,v,f,w,C;return{...t,[null===j||void 0===j||null===(e=j.product)||void 0===e||null===(n=e.options)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.name]:null===(o=j.product.options)||void 0===o||null===(r=o[0])||void 0===r||null===(a=r.values)||void 0===a?void 0:a[0],[null===j||void 0===j||null===(l=j.product)||void 0===l||null===(d=l.options)||void 0===d||null===(s=d[1])||void 0===s?void 0:s.name]:null===j||void 0===j||null===(c=j.product)||void 0===c||null===(h=c.options)||void 0===h||null===(u=h[1])||void 0===u||null===(p=u.values)||void 0===p?void 0:p[0],[null===j||void 0===j||null===(x=j.product)||void 0===x||null===(g=x.options)||void 0===g||null===(m=g[2])||void 0===m?void 0:m.name]:null===j||void 0===j||null===(v=j.product)||void 0===v||null===(f=v.options)||void 0===f||null===(w=f[2])||void 0===w||null===(C=w.values)||void 0===C?void 0:C[0]}}))}),[]);let y=[];for(let r=0;r<(null===j||void 0===j||null===(S=j.product)||void 0===S||null===(b=S.images)||void 0===b?void 0:b.length);r++){var S,b,I,k;(null===j||void 0===j||null===(I=j.product)||void 0===I||null===(k=I.images[r].variant_ids)||void 0===k?void 0:k.length)>0&&y.push(r)}return(0,g.jsx)(s.kC,{direction:"row",paddingLeft:"20px",paddingRight:"20px",paddingY:"10px",children:(null===j||void 0===j||null===(e=j.product)||void 0===e||null===(n=e.options)||void 0===n?void 0:n.length)>0&&(0,g.jsx)(s.kC,{direction:"column",width:"100%",gap:"4px",children:j.product.options.map(((e,n)=>{var r,d;return(0,g.jsx)(g.Fragment,{children:(e.values.length>1||"Color"===e.name||"Colour"===e.name)&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(s.kC,{justifyContent:"space-between",alignItems:"center",children:[(0,g.jsx)(s.xv,{fontSize:1*w,sx:{color:"black !important",fontFamily:i+" !important",fontWeight:"bold"},children:e.name}),"Size"===e.name&&(0,c.Ip6)(o)?(0,g.jsx)(s.kC,{marginTop:"4px",whiteSpace:"nowrap",cursor:"pointer",children:(0,g.jsx)(s.xv,{fontSize:.7*w,as:"u",sx:{color:"black !important",fontFamily:i+" !important"},onClick:()=>{null!==a&&a(!0)},children:(0,c.meb)(o)})}):(0,g.jsx)(g.Fragment,{})]}),(0,g.jsx)(s.Ug,{spacing:0,flexWrap:"wrap",alignContent:"flex-start",alignItems:"center",justifyContent:"flex-start",children:e.values.map(((t,r)=>{var a,d;return"Color"!==e.name&&"Colour"!==e.name||y.length!==(null===e||void 0===e||null===(a=e.values)||void 0===a?void 0:a.length)?(0,g.jsx)(s.kC,{paddingBottom:"8px",paddingRight:"8px",children:(0,g.jsx)(Vt.zx,{size:"sm",px:"8px !important",bg:l[e.name]===t?(null!==(d=(0,c.CPm)(o))&&void 0!==d?d:u)+" !important":(0,c.bC3)(o)+" !important",width:"fit-content !important",onClick:()=>{C(e.name,t),0===n&&x(t),1===n&&m(t),2===n&&f(t)},children:(0,g.jsx)(s.xv,{fontSize:.9*w,sx:{fontFamily:i+" !important",fontWeight:"normal",color:l[e.name]===t?(0,c.cY_)(o)+" !important":(0,c.FbM)(o)+" !important"},children:t})})},t):(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(s.kC,{paddingBottom:"8px",px:"2px",paddingRight:"8px",children:(0,g.jsx)(s.xu,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px",borderRadius:(0,c.lmH)(o),size:"sm",border:l[e.name]===t?"2px solid ".concat((0,c.ua_)(o)," !important"):"",width:"fit-content !important",onClick:()=>{C(e.name,t);const i=e.values.indexOf(t);p(i),0===n&&x(t),1===n&&m(t),2===n&&f(t)},children:(0,g.jsx)(v.Ee,{padding:"2px",borderRadius:(0,c.lmH)(o),width:"58px",height:"58px",src:j.product.images[y[r]].src})})},t)})}))}),n===(null===j||void 0===j||null===(r=j.product)||void 0===r||null===(d=r.options)||void 0===d?void 0:d.length)-1&&(0,g.jsx)(s.M5,{paddingTop:"8px",width:"100%",children:(0,g.jsx)(s.iz,{color:t.dividerColor,size:"xs"})})]})})}))})})}var ne,ie=n(8782);function oe(t){var e,n;const[i,o,a,l]=(0,u.Z)();var d=.4*l*.8,p=d*(16/9)*.6*.8;const x=1.1*d,m=x*(16/9)*.8;var f=.13*d;const[w,j]=(0,r.useState)(!1),C=t.data,y=t.event,S=t.product,b=t.setOpenShopNow,I=t.setLockSwiper,[_]=(0,h.j1)("whatmoreEmbedAppUseVariant"),[E,T]=(0,r.useState)((()=>{if("true"===_)return le(C,S.client_product_id)})),[P,O]=(0,r.useState)((()=>{if("true"===_)return de(C,S.client_product_id)})),[L,R]=(0,r.useState)((()=>{if("true"===_)return se(C,S.client_product_id)})),[D,z]=(0,r.useState)(),[M,K]=(0,r.useState)(1),[W,A]=(0,r.useState)(),[q,H]=(0,r.useState)(0),[N,Z]=(0,r.useState)(!1),[U,V]=(0,r.useState)(!1),[B,Y]=(0,r.useState)(S.thumbnail_image),X=(0,r.useContext)(it.I),G=(0,h.MO)("whatmoreShopId"),$=(0,r.useCallback)((t=>{T(t)}),[]),Q=(0,r.useCallback)((t=>{O(t)}),[]),tt=(0,r.useCallback)((t=>{R(t)}),[]);(0,r.useEffect)((()=>{const t=re(C,E,P,L);z(t),A(ae(C,t)),K(1),V(!1);const e=ce(C,t);null!==e&&Y(e)}),[E,P,L]),(0,r.useEffect)((()=>{var t,e,n;const i=void 0===D?null===(t=C.product)||void 0===t||null===(e=t.variants)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.price:ae(C,D);A(i*M)}),[M]),(0,r.useEffect)((()=>{function t(t){const e=document.getElementById("whatmore-shopnow-view"),n=document.getElementById("whatmore-size-chart");n&&n.contains(t.target)||!e||e.contains(t.target)||(b(!1),I(!1))}function e(t){t.preventDefault(),t.stopPropagation(),n.scrollTop+=t.deltaY}document.addEventListener("click",t);const n=document.getElementById("whatmore-shopnow-view");return null===n||void 0===n||n.addEventListener("wheel",e),()=>{document.removeEventListener("click",t),document.removeEventListener("wheel",e)}}),[]),(0,r.useEffect)((()=>{const t=async function(t,e){return"shopify"==t?(0,ft.Bi)():(0,vt.OM)(e)}((0,c.Ipo)(G),G);t.then((t=>t.json())).then((t=>{H(t.item_count)})).catch((t=>{console.error("Cart Add Error:",t)}))}),[N]);const[et,nt]=(0,r.useState)(0),ot=(0,F.F4)(ne||(ne=(0,k.Z)(["\n 0% {\n transform: translateY(100%);\n }\n "]))),rt="".concat(ot," 0.5s"),at=t.data.product.images;let lt=0,dt=at.length,st=0;for(let r=0,s=0;r<at.length;r++){var ct,ht;if((null===(ct=at[r])||void 0===ct||null===(ht=ct.variant_ids)||void 0===ht?void 0:ht.length)>0){if(s++,s===et+1){st=1,lt=r;continue}if(1==st){dt=r;break}}}return(0,g.jsxs)(s.kC,{sx:{"&::-webkit-scrollbar":{width:"0px"}},id:"whatmore-shopnow-view",position:"relative",maxHeight:"75vh",overflowY:"scroll",direction:"column",bg:"#FFF",height:"fit-content",opacity:"100%",borderTopRadius:"round"==(null===X||void 0===X?void 0:X.whatmoreUITheme)?"xl":null,animation:rt,children:[(0,g.jsx)($t,{setOpenShopNow:b,setLockSwiper:I,FONT_SIZE:f}),(0,g.jsx)(s.M5,{marginBottom:"10px",px:"20px",py:"5px",children:(0,g.jsx)(s.kC,{bg:"whiteAlpha.900",width:"fit-content",height:"fit-content",borderRadius:"round"==(null===X||void 0===X?void 0:X.whatmoreUITheme)?"lg":null,overflow:"hidden",sx:{borderWidth:(0,c.alU)(G),borderColor:(0,c.qPe)(G)},children:(0,g.jsx)(s.kC,{width:"100%",children:(0,g.jsx)(ie.P,{renderElement:t=>(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(s.xu,{width:x+"px",height:m+"px",children:(0,g.jsx)(v.Ee,{width:x+"px",height:m+"px",borderRadius:"round"==(null===X||void 0===X?void 0:X.whatmoreUITheme)?"lg":null,src:(0,kt.s)(t.eventData.src,"&width=400&height=400"),alt:S.handle,sx:{objectFit:(0,c.yOX)(G)+" !important"},fallback:(0,g.jsx)(J.Z,{width:x+"px",height:m+"px",borderRadius:"round"==(null===X||void 0===X?void 0:X.whatmoreUITheme)?"10px":"0px"})})})}),dataList:null===C||void 0===C||null===(e=C.product)||void 0===e?void 0:e.images.slice(lt,dt),spacing:10,defaultHeight:x+"px",defaultWidth:m+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})}),(0,g.jsx)(te,{data:C,product:S,PRODUCT_TILE_HEIGHT:p,PRODUCT_TILE_WIDTH:d,FONT_SIZE:f,getVariantPrice:ae,selectedVariantId:D,itemPrice:W,itemQuantity:M,setItemQuantity:K,thumbnailImage:B}),C.product.variants.length>0&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(s.M5,{paddingTop:"4px",width:"100%",children:(0,g.jsx)(s.iz,{color:(0,c.W8U)(G),size:"xs",width:"90%"})}),(0,g.jsx)(ee,{data:C,dividerColor:(0,c.W8U)(G),selectedColor:t=>{nt(t)},product:S,PRODUCT_TILE_HEIGHT:p,PRODUCT_TILE_WIDTH:d,FONT_SIZE:f,selectOptionFirstHandler:$,selectOptionSecondHandler:Q,selectOptionThirdHandler:tt,getVariantPrice:ae,selectedOptionFirst:E,selectedOptionSecond:P,selectedOptionThird:L,selectedVariantId:D})]}),c.$2G&&(null===C||void 0===C||null===(n=C.product)||void 0===n?void 0:n.body_html)&&(0,g.jsx)(Qt,{PRODUCT_TILE_HEIGHT:p,FONT_SIZE:f,data:C,handleToggle:()=>j(!w),show:w}),(0,g.jsx)(s.xu,{sx:{pointerEvents:"none"},paddingTop:"20px",opacity:0,children:(0,g.jsx)(Jt,{position:"relative",data:C,FONT_SIZE:f,product:S})}),(0,g.jsx)(Jt,{position:"fixed",selectedVariantId:D,data:C,FONT_SIZE:f,PRODUCT_TILE_WIDTH:d,product:S,itemQuantity:M,cartItemCount:q,addToCartFlag:N,setAddToCartFlag:Z,soldOutFlag:U,setSoldOutFlag:V,event:y})]})}const re=(t,e,n,i)=>{var o,r,a,l,d,s,c,h,u,p,x,g;if(void 0===e&&void 0===n&&void 0===i)return null===t||void 0===t||null===(o=t.product)||void 0===o||null===(r=o.variants)||void 0===r||null===(a=r[0])||void 0===a?void 0:a.id;if(void 0===i&&void 0===n)return null===(l=t.product.variants.find((t=>t.option1===e)))||void 0===l?void 0:l.id;if(void 0===i&&void 0===e)return null===(d=t.product.variants.find((t=>t.option2===n)))||void 0===d?void 0:d.id;if(void 0===n&&void 0===e)return null===(s=t.product.variants.find((t=>t.option3===i)))||void 0===s?void 0:s.id;if(void 0===n)return null===(c=t.product.variants.find((t=>t.option1===e&&t.option3===i)))||void 0===c?void 0:c.id;if(void 0===i)return null===(h=t.product.variants.find((t=>t.option1===e&&t.option2===n)))||void 0===h?void 0:h.id;if(void 0===e)return null===(u=t.product.variants.find((t=>t.option2===n&&t.option3===i)))||void 0===u?void 0:u.id;const m=t.product.variants.find((t=>t.option1===e&&t.option2===n&&t.option3===i));return void 0===m?null===t||void 0===t||null===(p=t.product)||void 0===p||null===(x=p.variants)||void 0===x||null===(g=x[0])||void 0===g?void 0:g.id:m.id},ae=(t,e)=>{var n;return null===(n=t.product.variants.find((t=>t.id===e)))||void 0===n?void 0:n.price},le=(t,e)=>{var n;return null===(n=t.product.variants.find((t=>t.id.toString()===e)))||void 0===n?void 0:n.option1},de=(t,e)=>{var n;return null===(n=t.product.variants.find((t=>t.id.toString()===e)))||void 0===n?void 0:n.option2},se=(t,e)=>{var n;return null===(n=t.product.variants.find((t=>t.id.toString()===e)))||void 0===n?void 0:n.option3},ce=(t,e)=>{var n;const i=null===(n=t.product)||void 0===n?void 0:n.images.find((t=>{var n;return null===t||void 0===t||null===(n=t.variant_ids)||void 0===n?void 0:n.find((t=>t===e))}));return void 0===i?null:i.src},he=(0,r.createContext)({setShowOptionsChart:null});var ue=function(t){const e=t.event,n=t.data,i=t.currentProduct,o=t.setOpenShopNow,a=t.setLockSwiper,[l,d]=(t.isLast,t.onCloseCallback,t.focusRef,(0,r.useState)(!1));return(0,g.jsx)(he.Provider,{value:{setShowOptionsChart:d},children:(0,g.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[(0,g.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",children:(0,g.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,g.jsx)(oe,{data:n,event:e,product:i,setOpenShopNow:o,setLockSwiper:a})})}),l?(0,g.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",style:{position:"relative",zIndex:1,bottom:"100%"},className:"whatmore-ios-css-relative-fix",id:"whatmore-size-chart",children:(0,g.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,g.jsx)(Ut,{data:n,event:e,product:i,setShowOptionsChart:()=>{d(!1)}})})}):(0,g.jsx)(g.Fragment,{})]})})};var pe=function(t){var e,[n,i,o,a]=(0,u.Z)();const[l,d]=(0,r.useState)(!1),[x,v]=(0,r.useState)(),[f,w]=(0,r.useState)(),j=(0,h.MO)("whatmoreShopId"),C=t.event,y=t.onBack,S=r.useRef(),b=t.isPlaying,I=t.isLast,k=t.setLockSwiper,_=t.selectedVariantId,F=null===(e=t.showOverlay)||void 0===e||e,E="center";return(0,g.jsx)(s.M5,{children:(0,g.jsxs)(s.xu,{width:a,height:o,sx:{overflow:"hidden"},children:[(0,g.jsx)(s.Kq,{direction:"column",justifyContent:E,height:"full",width:"full",children:(0,g.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,g.jsx)(s.oM,{width:"full",ratio:a/o,children:(0,g.jsx)(m,{height:"100%",width:"100%",url:C.event_hls_url,isPlaying:b,event:C})})})}),F?(0,g.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:E,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,g.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,g.jsx)(Zt,{focusRef:S,event:t.event,isLast:I,onCloseCallback:y,productClickHandler:async t=>{const e=await(0,p.gK)(t,(0,c.Ipo)(j),j);w(t),v(e),d(!0),k(!0)}})})}):(0,g.jsx)(g.Fragment,{}),!0===l?(0,g.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:E,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,g.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,g.jsx)(ue,{focusRef:S,event:t.event,isLast:I,onCloseCallback:()=>y(),setLockSwiper:k,data:x,currentProduct:f,setOpenShopNow:d,selectedVariantId:_})})}):(0,g.jsx)("div",{})]})})};const xe=function(t,e){return isNaN(t)||isNaN(e)||e<=0||t>e?0:Math.ceil(t/e*100)};function ge(t){var e,n,[i,o,r,a]=(0,u.Z)();const[l]=(0,h.j1)("whatmoreSecondaryColor"),[d]=(0,h.j1)("whatmoreSecondaryColorShade900"),c=t.progress,p=null!==(e=t.totalSiblings)&&void 0!==e?e:1,x=null!==(n=t.indexAmongSiblings)&&void 0!==n?n:0;return(0,g.jsx)(s.Kq,{width:"96%",height:"fit-content",direction:"row",justifyContent:"center",alignItems:"center",spacing:"1px",children:[...Array(p).keys()].map((t=>(0,g.jsx)(s.Kq,{width:"100%",height:.004*r+"px",backgroundColor:t<x?l:d+"99",borderRightRadius:"lg",borderLeftRadius:"lg",direction:"row",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",sx:{display:"block !important"},children:t==x?(0,g.jsx)(s.xu,{height:"100%",width:c+"%",bgColor:l,borderRightRadius:"lg",borderLeftRadius:"lg",sx:{display:"block !important"}}):(0,g.jsx)(g.Fragment,{})},"event-progress-bar-slab-"+t)))})}var me=n(868),ve=n(2630);const fe=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t;var we=n(8984);var je=function(t){var e,n,i,o=t.whatmoreShareTemplateId;const a=t.whatmoreShareStoryId,l=t.whatmoreShareEventId,p=t.event,x=null===(e=t.showShareText)||void 0===e||e,m=null!==(n=t.shareButtonBottomMargin)&&void 0!==n?n:0,v=(0,h.MO)("whatmoreShopId"),f=(0,h.MO)("isInDesignMode"),w=(0,h.MO)("isDemoBrand"),j=(0,h.MO)("whatmorePrimaryFont"),{whatmoreWidgetSourceDetails:C}=(0,r.useContext)(it.I),[y,S,b,I]=(0,u.Z)(),k=null!==(i=t.iconSize)&&void 0!==i?i:.1*I;function _(){const t=(0,h.MO)("whatmoreLandingLocationType");var e;!function(t){f||w||(async()=>{(0,d.x0)(t)})()}(p),(t.startsWith("product")||"embed"===t)&&(o="te"),e="event_product_link"===(0,c.EEC)(v)?p.products[0].product_link||"":window.location.pathname,e=("event_product_link"===(0,c.EEC)(v)?"":window.location.hostname)+e+"?wtt="+o+"&wsid="+a+"&weid="+l,(0,c.lj5)(v)&&(e=e+"&"+(0,c.awP)(v)+"&utm_campaign=video-share&utm_medium="+t);const n={title:(0,c.JNF)(v),text:"".concat((0,c.Qa8)(v)," \n ").concat(e," \n \n -via Whatmore")};navigator.share(n)}return(0,c.$Ii)(v)&&(0,we.eE)()?(0,g.jsx)(g.Fragment,{}):(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.Cd,{cursor:"pointer",style:{marginBottom:m+"px"},children:(0,g.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,g.jsx)(ve.Z,{sx:{boxShadow:3,transform:"scaleX(-1)",color:"white",fontSize:k,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),_(),(0,et.GF)({userInteractionType:nt.K.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:C,event:p,productList:p.products,ctaList:p.cta})}}),x&&(0,c.u8S)(v)?(0,g.jsxs)(s.xv,{fontSize:.3*k+"px",fontWeight:"semibold",align:"center",sx:{fontFamily:j+" !important",color:"white !important",paddingRight:"10%"},children:["\xa0",p.total_share>(0,c.LWl)(v)?fe(p.total_share):"Share","\xa0"]}):(0,g.jsx)(g.Fragment,{})]})})})},Ce=n(6524),ye=n(7933),Se=n(2785);var be=function(t){var e;const n=(0,h.MO)("whatmoreShopId"),i=(0,h.MO)("whatmorePrimaryFont"),o=(0,h.MO)("whatmoreLikedEvents"),a=((0,h.MO)("whatmoreSecondaryColor"),(0,h.MO)("isInDesignMode")),l=(0,h.MO)("isDemoBrand"),{whatmoreWidgetSourceDetails:p}=(0,r.useContext)(it.I),x=t.event,[m,v]=(0,r.useState)(null!==(e=o[x.event_id])&&void 0!==e&&e),[f,w,j,C]=(0,u.Z)(),y=.1*C;function S(t,e){a||l||(async()=>{(0,d.Z6)(t,e)})()}function b(){(0,h.bU)("whatmoreLikedEvents",{...o,[x.event_id]:!m}),m?(S(x,-1),(0,et.GF)({userInteractionType:nt.K.VIDEO_UNLIKED,widgetSourceDetails:p,event:x,productList:x.products,ctaList:x.cta})):(S(x,1),(0,et.GF)({userInteractionType:nt.K.VIDEO_LIKED,widgetSourceDetails:p,event:x,productList:x.products,ctaList:x.cta})),v(!m)}const I=x.total_like+(m?1:0);return(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.Cd,{cursor:"pointer",children:(0,g.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[m?(0,g.jsx)(Se.Z,{sx:{boxShadow:3,color:(0,c.dmX)(n),fontSize:y,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}):(0,g.jsx)(ye.Z,{sx:{boxShadow:3,color:"white",fontSize:y,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}),(0,g.jsx)(g.Fragment,{children:(0,c.CEM)(n)?(0,g.jsxs)(s.xv,{fontSize:.3*y+"px",fontWeight:"semibold",align:"center",sx:{fontFamily:i+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",I>=(0,c.zKg)(n)?fe(I):"Like","\xa0"]}):(0,g.jsx)(g.Fragment,{})})]})})})};const Ie=t=>{let{iconSize:e}=t;return(0,g.jsx)("div",{style:{backgroundColor:"#25D366",borderRadius:"50%",padding:.3*e},children:(0,g.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"white",class:"bi bi-whatsapp",viewBox:"0 0 16 16",children:(0,g.jsx)("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})})})};var ke=n(8866);function _e(t){var e;const n=t.event,[i,o,a,l]=(0,u.Z)(),[d]=(0,h.j1)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:p}=(0,r.useContext)(it.I),[x]=(0,h.j1)("whatmoreSecondaryColor"),[m]=(0,h.j1)("whatmoreShopId"),v=(0,c.f63)(m),f=null!==(e=(0,c.u2W)(m))&&void 0!==e?e:[x,v,x,v,x];return(0,g.jsx)(g.Fragment,{children:p?(0,g.jsx)(s.xu,{width:"100%",height:"fit-content",padding:"5px",children:(0,g.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-start",children:[(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.Cd,{overflow:"hidden",size:.14*l+"px",sx:{boxShadow:"0px 2px 1px 0px "+f[0]+"50, 0px -2px 1px 0px "+f[1]+"50, 2px 0px 1px 0px "+f[2]+"50, -2px 0px 1px 0px "+f[3]+"80, 2px -2px 1px 0px "+f[4]+"80, -2px 2px 1px 0px "+f[0]+"DA, 2px 2px 1px 0px "+f[1]+"DA, -2px -2px 1px 0px "+f[2]+"DA"},children:(0,g.jsx)("img",{src:(0,me.V)(n.storyset_thumbnail_image),style:{objectFit:"cover",height:"100%",width:"100%",backgroundColor:"white"}})})}),(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:.05*l+"px",fontWeight:"medium",lineHeight:"100%",sx:{fontFamily:d+" !important",color:"white !important",textShadow:"0px 0px 4px black !important;"},children:n.storyset_name})})]})}):(0,g.jsx)(g.Fragment,{})})}var Fe=function(t){const[e,n,i]=(0,ke.Z)(),[o]=(0,h.j1)("isInDesignMode"),[a]=(0,h.j1)("isDemoBrand"),[l,p]=(0,h.j1)("isProductSwiperCatalogOpen"),[x,m]=(0,h.j1)("isFirstIndicatorRenderDone"),[v]=(0,h.j1)("whatmoreShopId"),f=(0,r.useContext)(gn),{whatmoreEventsBrowsingTemplate:w}=(0,r.useContext)(it.I),[j,C,y,S]=(0,u.Z)(),b=(0,h.MO)("whatmorePrimaryFont"),k=t.event,_=t.storySetId,F=t.isLast,E=t.onCloseCallback,T=t.focusRef,P=t.productClickHandler,O=t.videoPlayingData,L=t.totalSiblingEvents,R=t.indexAmongSiblings,D=t.leftOpenSpaceClickHandler,z=t.midOpenSpaceClickHandler,M=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:K}=(0,r.useContext)(it.I),W=.1*S;return(0,g.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",children:(0,g.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,g.jsxs)(s.Kq,{width:"full",height:"fit-content",direction:"column",justifyContent:"flex-start",alignItems:"center",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:[f.showVideoPlayingData?(0,g.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,g.jsx)(ge,{progress:xe(O.current_time,O.video_duration),totalSiblings:L,indexAmongSiblings:R})}):(0,g.jsx)(g.Fragment,{}),(0,g.jsx)(s.xu,{width:"full",margin:"2px",marginTop:"5px",children:(0,g.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",paddingRight:"10px",paddingLeft:"10px",children:[(0,g.jsx)(_e,{event:k}),(0,g.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,Ce.ZK)(w)?(0,g.jsx)(je,{whatmoreShareTemplateId:(0,Ce.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:k.event_id,event:k,showShareText:!1,iconSize:.07*S,shareButtonBottomMargin:6}):(0,g.jsx)(g.Fragment,{}),(0,g.jsx)(I,{focusRef:T}),("landscape"!==e||t.showCloseOverlay)&&(0,g.jsx)(U,{event:k,onCloseCallback:E})]})]})})]}),(0,g.jsxs)(s.Kq,{width:"100%",height:"100%",direction:"row",justifyContent:"center",children:[(0,g.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{D()},sx:{display:"block !important"}}),(0,g.jsx)(s.xu,{width:"34%",height:"100%",onClick:()=>{z()},sx:{display:"block !important"}}),(0,g.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{M()},sx:{display:"block !important"}})]}),(0,g.jsxs)(s.xu,{width:"full",height:"fit-content",paddingX:"2%",children:[f.totalEvents>1&&!x&&f.showSwipeIndicator?(0,g.jsx)(s.xu,{width:"full",margin:"2px",children:(0,g.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,g.jsx)(G,{swipeUp:!F})})}):null,(0,c.slY)(v)&&!(0,Ce.ZK)(w)?(0,g.jsx)(s.xu,{ml:"auto",width:"fit-content",paddingY:"4%",children:(0,g.jsxs)(s.Kq,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:function(){var t;o||a||(async()=>{(0,d.lY)(k,1)})(),(0,et.GF)({userInteractionType:nt.K.WHATSAPP_ICON_CLICKED,widgetSourceDetails:K,event:k,productList:null===k||void 0===k?void 0:k.products,ctaList:null===k||void 0===k?void 0:k.cta});const e=k.products.map((t=>"".concat(t.product_link," \n"))),n=(0,c.gtK)(v),i="Hey, I am interested in ".concat(k.products.length>1?"these products":"this product"," I saw on ").concat(null===(t=k.products[0])||void 0===t?void 0:t.brand," store: \n").concat(e,". Could you please help me with some queries?");window.open(n+"&text=".concat(i,"&type=phone_number"),"_blank")},children:[(0,g.jsx)(Ie,{iconSize:.7*W,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,g.jsx)(s.xv,{fontSize:W*(0,c.Xod)(v)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:b+" !important",color:"white !important"},children:(0,c.UiZ)(v)})]})}):(0,g.jsx)(g.Fragment,{}),(0,c.jY3)(v)?(0,g.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,g.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",paddingX:"1.4%",children:(0,g.jsx)(be,{event:k})})}):(0,g.jsx)(g.Fragment,{}),(0,c.ROU)(v)&&!(0,Ce.ZK)(w)?(0,g.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,g.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",paddingX:"0.8%",children:(0,g.jsx)(je,{whatmoreShareTemplateId:(0,Ce.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:k.event_id,event:k})})}):(0,g.jsx)(g.Fragment,{}),(0,Kt.kT)(k)?(0,g.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(v)?(0,g.jsx)(s.xu,{w:"100%",children:(0,g.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,g.jsx)(A,{event:k,onToggle:t=>{p("minimize-button"!==t)}})})}):(0,g.jsx)(g.Fragment,{}),(0,g.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,g.jsx)(qt,{event:k,productClickHandler:P})})]}):(0,g.jsx)(g.Fragment,{})]})]})})},Ee=n(2279),Te=n.n(Ee),Pe=n(342);var Oe=function(t){var e,n,i,o,a,l,[d,m,v,f]=(0,u.Z)();const[w,j]=(0,r.useState)(!1),[C,y]=(0,r.useState)(),[S,b]=(0,r.useState)(),[I,k]=(0,r.useState)({current_time:0,video_duration:0,is_video_ended:!1}),_=(0,h.MO)("whatmoreShopId"),F=t.event,E=t.storyId,T=t.onBack,P=r.useRef(),O=t.isPlaying,L=t.isLast,R=t.setLockSwiper,D=t.onVideoEndedCallback,z=t.progressUpdateCallback,M=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,K=null!==(n=t.indexAmongSiblings)&&void 0!==n?n:0,W=null===(i=t.showOverlay)||void 0===i||i,A=null!==(o=t.leftOpenSpaceClickHandler)&&void 0!==o?o:()=>{},q=null!==(a=t.midOpenSpaceClickHandler)&&void 0!==a?a:()=>{},H=null!==(l=t.rightOpenSpaceClickHandler)&&void 0!==l?l:()=>{},{whatmoreWidgetSourceDetails:N}=(0,r.useContext)(it.I),Z="center";let U;try{U=Te()((()=>{D()}),1e3,{leading:!0,trailing:!1})}catch(V){console.log(V)}return(0,g.jsx)(s.M5,{children:(0,g.jsxs)(s.xu,{width:f,height:v,sx:{overflow:"hidden"},children:[(0,g.jsx)(s.Kq,{direction:"column",justifyContent:Z,height:"full",width:"full",children:(0,g.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,g.jsx)(s.oM,{width:"full",ratio:f/v,children:(0,g.jsx)(x.Z,{height:"100%",width:"100%",url:(0,me.V)((0,Pe.uv)(F)),isPlaying:O,timeUpdateCallback:function(t,e){const n=xe(t,e);z(n);const i=I.is_video_ended;n>=99&&O&&!i?(U(),k({current_time:t,video_duration:e,is_video_ended:!0})):k({current_time:t,video_duration:e,is_video_ended:i})},event:F,source:t.source})})})}),W?(0,g.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:Z,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,g.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,g.jsx)(Fe,{focusRef:P,event:t.event,isLast:L,onCloseCallback:()=>{T(),(0,et.Z2)({userInteractionType:nt.K.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:I.current_time},widgetSourceDetails:N,event:F,productList:F.products,ctaList:F.cta})},productClickHandler:async t=>{const e=await(0,p.gK)(t,(0,c.Ipo)(_),_);b(t),y(e),j(!0),R(!0),(0,et.GF)({userInteractionType:nt.K.SHOPNOW_CLICKED,widgetSourceDetails:N,event:F,productList:F.products,ctaList:F.cta}),(0,h.bU)("whatmoreAllowAutoSlide",!1)},videoPlayingData:I,totalSiblingEvents:M,indexAmongSiblings:K,leftOpenSpaceClickHandler:A,midOpenSpaceClickHandler:q,rightOpenSpaceClickHandler:H,storySetId:E,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay})})}):(0,g.jsx)(g.Fragment,{}),!0===w?(0,g.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:Z,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,g.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,g.jsx)(ue,{focusRef:P,event:t.event,isLast:L,onCloseCallback:()=>T(),setLockSwiper:R,data:C,currentProduct:S,setOpenShopNow:t=>{j(t),(0,h.bU)("whatmoreAllowAutoSlide",!t)}})})}):(0,g.jsx)("div",{})]})})},Le=n(7300),Re=n(58),De=n(9723);var ze=function(t){var[e,n,i,o]=(0,u.Z)();const r=(0,h.MO)("whatmoreShopId"),a=t.event,l=t.isPlaying,d="center";return(0,g.jsx)(s.M5,{children:(0,g.jsxs)(s.xu,{width:o,height:i,sx:{overflow:"hidden"},children:[(0,g.jsx)(s.Kq,{direction:"column",justifyContent:d,height:"full",width:"full",children:(0,g.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,g.jsx)(s.oM,{width:"full",ratio:o/i,children:(0,g.jsx)(x.Z,{height:"100%",width:"100%",url:(0,me.V)((0,Pe.uv)(a)),isPlaying:l,timeUpdateCallback:function(t,e){},event:a,source:t.source})})})}),(0,g.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:d,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,g.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",backdropFilter:"auto",backdropBlur:"10px",onClick:t=>{(0,Re.QV)()},children:(0,g.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"full",width:"full",children:[(0,g.jsx)(De.Z,{sx:{boxShadow:3,color:(0,c.Ya_)(r),fontSize:.4*o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{(0,Re.QV)()}}),(0,g.jsx)(s.xv,{color:"white",fontSize:.05*o+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},Me=n(3433);var Ke=function(t){var e,n;const r=t.event,a=null===(e=t.isPlaying)||void 0===e||e,l=t.onBack,d=t.isLast,s=t.setLockSwiper,c=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),u=t.progressUpdateCallback,[p,x]=(0,j.Z)(),[m]=(0,h.j1)("whatmoreVideoPlayerPoolBlessed"),v=null===(n=t.showOverlay)||void 0===n||n;function f(){x(!p)}if((0,we.KE)()&&0==m)return(0,g.jsx)(ze,{event:r,onBack:l,isPlaying:a,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:u,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:v,source:Me.j.CAROUSEL_EVENT_OPENED},"shopping-video-view"+r.event_id);if((0,Le.B6)(r)||(0,Le.WJ)(r))return(0,g.jsx)(Oe,{event:r,onBack:l,isPlaying:a,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:u,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:v,source:Me.j.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id);if((0,Le.yC)(r)){var{status:w,bannerText:C,timeToStartInMins:y}=i.Z.getEventStatus(r);if(w.name===o.Z.LIVE.name)return(0,g.jsx)(pe,{event:r,onBack:l,isPlaying:a,isLast:d,showOverlay:v},"shopping-live-view"+r.event_id)}return console.error("Can't render event which is neither video or a currently-live-event"),(0,g.jsx)("div",{})},We=n(9284),Ae=n.n(We),qe=n(7463),He=n(2154);function Ne(t){var e;const[n,i]=(0,r.useState)(!1),o=t.onClick,a=null!==(e=t.fontSize)&&void 0!==e?e:50;return(0,g.jsx)("div",{style:{height:"fit-content",width:"fit-content",backgroundColor:"black",opacity:.4,borderRadius:"50%"},className:[n?"whatmore-scale-on-tap":""].join(" "),children:"left"===t.type?(0,g.jsx)(He.Z,{sx:{color:"white",fontSize:a+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{i(!0),setTimeout((()=>{i(!1)}),500),o(t,"up")}}):(0,g.jsx)(qe.Z,{sx:{color:"white",fontSize:a+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{i(!0),setTimeout((()=>{i(!1)}),500),o(t,"down")}})})}var Ze=function(t){var e,n,i;const o=null!==(e=t.relativeBottomPercentage)&&void 0!==e?e:"30%",r=null!==(n=t.width)&&void 0!==n?n:"100%",a=null!==(i=t.fontSize)&&void 0!==i?i:50,l=t.handleClick;return(0,g.jsx)("div",{style:{position:"relative",zIndex:1,bottom:o,width:"100%",height:"fit-content",display:"flex",flexFlow:"row nowrap",justifyContent:"center"},id:"here",children:(0,g.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:r,height:"fit-content",paddingRight:"5px",paddingLeft:"5px",paddingTop:"5px",paddingBottom:"5px",justifyContent:"space-between",alignContent:"center"},children:[(0,g.jsx)(Ne,{type:"left",onClick:l,fontSize:a}),(0,g.jsx)(Ne,{type:"right",onClick:l,fontSize:a})]})})},Ue=n(2860),Ve=n(4669);var Be=function(t,e){function n(t,e){return 1==e?0:t<0?e+t:t>=e?t-e:t}const i=(0,r.useRef)({prevIndex:n(t-1,e),activeIndex:t,nextIndex:n(t+1,e)});return[function(){return i.current},function(t){i.current="right"==t?{prevIndex:n(i.current.activeIndex,e),activeIndex:n(i.current.activeIndex+1,e),nextIndex:n(i.current.activeIndex+2,e)}:{prevIndex:n(i.current.activeIndex-2,e),activeIndex:n(i.current.activeIndex-1,e),nextIndex:n(i.current.activeIndex,e)}},function(t){return n(i.current.activeIndex+t)}]};var Ye=function(t,e){const n=(0,r.useRef)({clientX:0,clientY:0});return[function(t){n.current.clientX=t.changedTouches[0].clientX,n.current.clientY=t.changedTouches[0].clientY},function(i){const o=n.current.clientX,r=n.current.clientY;var a=o-i.changedTouches[0].clientX,l=r-i.changedTouches[0].clientY;return"vertical"==t&&Math.abs(l)>e||"horizontal"==t&&Math.abs(a)>e?"vertical"==t?l>0?"right":"left":a>0?"right":"left":null}]};var Xe=function(t,e){const n=(0,r.useRef)(Te()(((t,e)=>{t(e)}),300,{leading:!0,trailing:!1}));return[function(i,o){var r=0;if(r="vertical"==t?i.deltaY:i.deltaX,Math.abs(r)<=e)return;const a=r>0?"right":"left";n.current(o,a)}]},Ge=n(5173);var Je=function(t){const e=t.events,n=t.eventIndex,i=t.onBack;var[o,p,x,m]=(0,u.Z)();const[v]=(0,h.j1)("isInDesignMode"),[f]=(0,h.j1)("isDemoBrand"),[w,j]=(0,r.useState)(!0),[C,y]=(0,h.j1)("isFirstIndicatorRenderDone"),[S,b]=(0,r.useState)(!1),{setCloseClickComponent:I}=(0,r.useContext)(gn),{slideDirection:k}=(0,r.useContext)(gn),[_]=(0,h.j1)("whatmoreShopId"),[F]=(0,h.j1)("whatmoreLandingLocationType"),[E,T]=Be(n,e.length),[P,O]=Ye(k,50),[L]=Xe("vertical",30),[R,D]=(0,r.useState)(!1),[z,M]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:K}=(0,r.useContext)(it.I);function W(){D(!1)}function A(){W(),setTimeout((()=>{i()}),500)}function q(){(0,h.MO)("whatmoreAllowAutoSlide")&&(T("right"),z.slideNext())}function H(t,e){T(e),function(t,e){z&&("left"===e?z.slidePrev():z.slideNext())}(0,e)}(0,r.useEffect)((()=>(D(!0),()=>{})),[]),I(A);const N=Math.round(.05*x);return(0,g.jsx)(Ae(),{isOpen:R,onAfterOpen:function(){},onRequestClose:W,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,g.jsx)(Ge.Z,{children:(0,g.jsxs)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:(0,Q.lA)("#000000",13)},onTouchStart:t=>{P(t)},onTouchEnd:t=>{const e=O(t);e&&H(0,e)},onWheel:t=>{L(t,(t=>{H(0,t)}))},children:[(0,g.jsx)(a.tq,{speed:400,threshold:N,slidesPerView:1,direction:k,modules:[l.tl,l.Gk],initialSlide:n,loop:1!=e.length,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,allowSlideNext:!S,allowSlidePrev:!S,allowTouchMove:!1,onSwiper:t=>{M(t)},onSlideChange:t=>{var n;w?j(!1):(C||y(!0),n=e[E().activeIndex],v||f||(async()=>{(0,d.wh)(n),"index"===F?((0,Ve.Tc)(_,Ue.Xh,Ue.pR),(0,mt.H4)(n.event_id,n.products,Ue.Xh,Ue.pR)):F.startsWith("product")||"embed"===F?((0,Ve.Tc)(_,Ue.h7,Ue.dU),(0,mt.H4)(n.event_id,n.products,Ue.h7,Ue.dU)):F.startsWith("collection")?((0,Ve.Tc)(_,Ue.U$,Ue.Pk),(0,mt.H4)(n.event_id,n.products,Ue.U$,Ue.Pk)):((0,Ve.Tc)(_,Ue.Xh,Ue.pR),(0,mt.H4)(n.event_id,n.products,Ue.Xh,Ue.pR))})(),(0,et.y4)({userInteractionType:nt.K.EVENT_VIEW,widgetSourceDetails:K,event:e[E().activeIndex],productList:e[E().activeIndex].products}))},children:[...Array(Math.min(e.length,3)).keys()].map((n=>(0,g.jsx)(a.o5,{children:n=>{let{isActive:i,isPrev:r,isNext:a,isVisible:l,isDuplicate:d}=n;const c=i?"activeIndex":r?"prevIndex":"nextIndex";return(0,g.jsx)(s.Kq,{direction:"column",height:o,justifyContent:"center",children:(0,g.jsx)(Ke,{event:e[E()[c]],onBack:A,isPlaying:1==e.length||i&&l,isLast:!1,setLockSwiper:b,onVideoEndedCallback:q,progressUpdateCallback:t=>{},showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay})})}},"event-vertical-scroll-slide-"+n)))}),e.length>1&&!S&&(0,c.h6H)(_)&&"horizontal"===(0,c.e8z)(_)&&"horizontal"===k?(0,g.jsx)(Ze,{relativeBottomPercentage:"50%",width:m,handleClick:(t,e)=>{H(0,"down"==e?"right":"left")},fontSize:parseInt(.12*m)}):(0,g.jsx)(g.Fragment,{})]})})})},$e=n(1168);n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811);const Qe=t=>{let{children:e,customClass:n,show:i,closeCallback:o}=t;return $e.createPortal((0,g.jsxs)("div",{className:"whatmore-landscape-modal whatmore-root ".concat(n),style:{display:i?"block":"none"},children:[(0,g.jsx)("div",{className:"whatmore-landscape-modal-overlay",onClick:o}),(0,g.jsx)("div",{className:"whatmore-landscape-modal-content",children:e})]}),document.body)};Qe.defaultProps={children:(0,g.jsx)("div",{children:"Empty Modal"}),customClass:"",show:!1,closeCallback:()=>!1};var tn=Qe;var en=function(t){var e;const[n]=(0,h.j1)("whatmorePrimaryFont"),i=null!==(e=t.fontSize)&&void 0!==e?e:"8";return(0,g.jsx)(s.rU,{href:"https://www.whatmore.live",isExternal:!0,children:(0,g.jsxs)(s.Kq,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"2px",paddingLeft:"2px",paddingRight:"2px",paddingBottom:"2px",marginBottom:"2px",children:[(0,g.jsx)("p",{style:{textAlign:"center",color:"white",fontFamily:n,fontWeight:"normal",fontSize:1.1*i+"px",margin:0,padding:0,lineHeight:"110%"},children:"powered by whatmore"}),(0,g.jsx)(s.xu,{width:"10px"}),(0,g.jsx)("img",{src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",width:1.7*i,backgroundColor:"transparent",borderRadius:"0px"}})]})})};var nn=function(t){var[e,n,i,o]=(0,u.Z)();const[p]=(0,h.j1)("isInDesignMode"),[x]=(0,h.j1)("isDemoBrand"),[m,v]=(0,h.j1)("isFirstIndicatorRenderDone"),[f,w]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:j}=(0,r.useContext)(gn),[C,y]=(0,r.useState)(!1),[S]=(0,h.j1)("whatmoreShopId"),[b]=(0,h.j1)("whatmoreLandingLocationType"),{whatmoreUITheme:I}=(0,r.useContext)(it.I),{whatmoreWidgetSourceDetails:k}=(0,r.useContext)(it.I),[_,F]=(0,r.useState)(!1),[E,T]=(0,r.useState)(null);function P(){F(!1)}const O=t.events,L=t.eventIndex,R=t.onBack;function D(){P(),setTimeout((()=>{R()}),500)}function z(){E&&!E.isEnd&&(0,h.MO)("whatmoreAllowAutoSlide")&&E.slideNext()}(0,r.useEffect)((()=>(F(!0),()=>{})),[]),j(D);const M=parseInt(Math.min(5,O.length));return(0,g.jsx)(tn,{show:_,closeCallback:P,customClass:"whatmore-landscape-modal-swipe-view",children:(0,g.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",aligntItems:"center",backgroundColor:(0,Q.lA)("#000000",13),children:[(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.xu,{height:"fit-content",width:o*M,children:(0,g.jsxs)(a.tq,{onInit:t=>{T(t)},slidesPerView:M,centeredSlides:!0,allowTouchMove:!1,initialSlide:L,modules:[l.lI,l.W_,l.Gk],navigation:M>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*i),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:o*M,watchSlidesProgress:!0,onSlideChange:t=>{var e;f?w(!1):(m||v(!0),e=O[t.activeIndex],p||x||(async()=>{(0,d.wh)(e),"index"===b?((0,Ve.Tc)(S,Ue.Xh,Ue.pR),(0,mt.H4)(e.event_id,e.products,Ue.Xh,Ue.pR)):b.startsWith("product")||"embed"===b?((0,Ve.Tc)(S,Ue.h7,Ue.dU),(0,mt.H4)(e.event_id,e.products,Ue.h7,Ue.dU)):b.startsWith("collection")?((0,Ve.Tc)(S,Ue.U$,Ue.Pk),(0,mt.H4)(e.event_id,e.products,Ue.U$,Ue.Pk)):((0,Ve.Tc)(S,Ue.Xh,Ue.pR),(0,mt.H4)(e.event_id,e.products,Ue.Xh,Ue.pR))})(),(0,et.y4)({userInteractionType:nt.K.EVENT_VIEW,widgetSourceDetails:k,event:O[t.activeIndex],productList:O[t.activeIndex].products,ctaList:O[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[O.length>2&&(0,g.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,g.jsx)(U,{onCloseCallback:R})}),O.map(((t,e)=>(0,g.jsx)(a.o5,{children:t=>{let{isActive:n,isPrev:r,isNext:a,isVisible:l,isDuplicate:d}=t;return n?(0,g.jsx)(s.Kq,{direction:"column",height:i,width:1*o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,g.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,g.jsx)(Ke,{event:O[e],onBack:D,isPlaying:!0,isLast:e===O.length-1,setLockSwiper:y,widthFactor:1,heightFactor:1,onVideoEndedCallback:z,progressUpdateCallback:t=>{},showCloseOverlay:(null===O||void 0===O?void 0:O.length)<=2})})}):a||r?(0,g.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{E.slideTo(e,300)},children:(0,g.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,g.jsx)(Ke,{event:O[e],onBack:D,isPlaying:!1,isLast:e===O.length-1,setLockSwiper:y,widthFactor:1,heightFactor:1,onVideoEndedCallback:z,progressUpdateCallback:t=>{},showOverlay:!1})})}):(0,g.jsx)(g.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id)))]})})}),(0,c.XFt)(S)?(0,g.jsx)(s.M5,{children:(0,g.jsx)(en,{height:.04*i,width:.1*o,fontSize:.02*i})}):(0,g.jsx)(g.Fragment,{})]})})},on=n(6090),rn=n(7616),an=n(9302),ln=n(2575);var dn=function(t){const[e,n,i,o]=(0,u.Z)(),[r]=(0,h.j1)("whatmorePrimaryColor"),[a]=(0,h.j1)("whatmoreSecondaryColor"),l="flex-end";return(0,g.jsx)(s.M5,{children:(0,g.jsxs)(s.xu,{width:o,height:i,backgroundColor:"whiteAlpha.200",backdropBlur:"10px",children:[(0,g.jsx)(s.Kq,{direction:"column",justifyContent:l,height:"full",width:"full",children:(0,g.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",children:(0,g.jsx)(s.oM,{width:"full",ratio:o/i,children:(0,g.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+r+", gray, "+a+")"})})})}),(0,g.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:l,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,g.jsx)(s.xu,{padding:"2px",margin:"5px",borderRadius:"md",backgroundColor:"transparent",children:(0,g.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,g.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",backdropFilter:"auto",backdropBlur:"5px"})})})})]})})};var sn=function(t){var e;const n=t.stories,i=t.onBack,o=t.onStoryCompleteCallback,l=t.isActive,c=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,p=n.events;var[x,m,v,f]=(0,u.Z)();const[w,C]=(0,j.Z)(),[y]=(0,h.j1)("isInDesignMode"),[S]=(0,h.j1)("isDemoBrand"),[b]=(0,h.j1)("whatmoreShopId"),[I,k]=(0,r.useState)(!0),[_,F]=(0,h.j1)("isFirstIndicatorRenderDone"),[E,T]=(0,r.useState)(null),[P,O]=(0,r.useState)(!1),{whatmoreWidgetSourceDetails:L}=(0,r.useContext)(it.I),[R,D]=Be(c,p.length);function z(){i()}function M(){if(!(0,h.MO)("whatmoreAllowAutoSlide"))return;R().activeIndex+1>=p.length?o("right"):(D("right"),E&&E.slideNext())}function K(t){const e=R().activeIndex;"right"==t&&e+1>=p.length||"left"==t&&e-1<0?o(t):(D(t),E&&("left"==t?E.slidePrev():E.slideNext()))}return p[R().activeIndex],(0,g.jsx)("div",{children:(0,g.jsx)(a.tq,{speed:1,slidesPerView:1,direction:"horizontal",initialSlide:0,loop:!0,height:v,width:f,watchSlidesProgress:!0,allowTouchMove:!1,onSwiper:t=>{T(t)},onSlideChange:t=>{var e;I?k(!1):(_||F(!0),e=p[R().activeIndex],y||S||(async()=>{(0,d.wh)(e),(0,Ve.Tc)(b,Ue.Xh,Ue.OW),(0,mt.H4)(e.event_id,e.products,"homepage","stories")})(),(0,et.GF)({userInteractionType:nt.K.EVENT_VIEW,widgetSourceDetails:L,event:p[R().activeIndex],productList:p[R().activeIndex].products,ctaList:p[R().activeIndex].cta}))},children:[...Array(Math.min(p.length,3)).keys()].map((e=>(0,g.jsx)(a.o5,{children:e=>{let{isActive:i,isPrev:o,isNext:r,isVisible:a,isDuplicate:d}=e;if(l){const e=i?"activeIndex":o?"prevIndex":"nextIndex",r=p[R()[e]];return(0,g.jsx)(s.Kq,{direction:"column",height:v,justifyContent:"center",children:(0,Le.B6)(r)||(0,Le.WJ)(r)?(0,g.jsx)(Oe,{event:r,totalSiblingEvents:p.length,indexAmongSiblings:R()[e],onBack:z,isPlaying:l&&i&&a,isLast:!1,setLockSwiper:O,onVideoEndedCallback:M,progressUpdateCallback:t=>{},leftOpenSpaceClickHandler:()=>{K("left")},midOpenSpaceClickHandler:()=>{C(!w)},rightOpenSpaceClickHandler:()=>{K("right")},storyId:n.id,source:Me.j.STORY_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id):(0,g.jsx)(g.Fragment,{})})}return(0,g.jsx)(s.Kq,{direction:"column",height:x,justifyContent:"center",children:(0,g.jsx)(dn,{})})}},"event-story-view-slide-"+e)))})})};var cn=function(t){const e=t.onBack,n=t.eventsStories,i=t.initialStoryIndex;var[o,c,p,x]=(0,u.Z)();const[m]=(0,h.j1)("isInDesignMode"),[v]=(0,h.j1)("isDemoBrand"),[f,w]=(0,r.useState)(!0),[j,C]=(0,h.j1)("isFirstIndicatorRenderDone"),[y,S]=(0,r.useState)(!1),{setCloseClickComponent:b}=(0,r.useContext)(gn),{slideDirection:I}=(0,r.useContext)(gn),[k]=(0,h.j1)("whatmoreShopId"),[_,F]=Be(i,n.length),[E,T]=Ye("horizontal",50),[P]=Xe("vertical",30),O=t.eventIndex,[L,R]=(0,r.useState)(!1),[D,z]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:M}=(0,r.useContext)(it.I);function K(){R(!1)}function W(){K(),setTimeout((()=>{e()}),500)}function A(t){D&&(0,h.MO)("whatmoreAllowAutoSlide")&&(F(t),"right"==t?D.slideNext():D.slidePrev())}function q(t,e){A(e)}return(0,r.useEffect)((()=>(R(!0),()=>{})),[]),b(W),(0,g.jsx)(Ae(),{isOpen:L,onAfterOpen:function(){},onRequestClose:K,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,g.jsx)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:"#00000088"},onTouchStart:t=>{E(t)},onTouchEnd:t=>{const e=T(t);e&&q(0,e)},onWheel:t=>{P(t,(t=>{q(0,t)}))},children:(0,g.jsx)(a.tq,{speed:1,slidesPerView:1,direction:"horizontal",modules:[l.SH,l.Gk],initialSlide:i,loop:n.length>1,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,onSwiper:t=>{z(t)},onSlideChange:t=>{var e,i,o;f?w(!1):(o=n[_().activeIndex].events[0],m||v||(async()=>{(0,d.wh)(o),(0,Ve.Tc)(k,Ue.Xh,Ue.OW),(0,mt.H4)(o.event_id,o.products,"homepage","stories")})(),(0,et.GF)({userInteractionType:nt.K.EVENT_VIEW,widgetSourceDetails:M,event:n[_().activeIndex].events[0],productList:null===(e=n[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=n[_().activeIndex].events[0])||void 0===i?void 0:i.cta}))},allowTouchMove:!1,cubeEffect:{shadow:!0,slideShadows:!0,shadowOffset:20,shadowScale:.94},children:[...Array(Math.min(n.length,3)).keys()].map((t=>(0,g.jsx)(a.o5,{children:t=>{let{isActive:e,isPrev:r,isNext:a,isVisible:l,isDuplicate:d}=t;const c=e?"activeIndex":r?"prevIndex":"nextIndex";return(0,g.jsx)(s.Kq,{direction:"column",height:o,justifyContent:"center",children:(0,g.jsx)(sn,{stories:n[_()[c]],onBack:W,isActive:e&&l,isNext:a,isPrev:r,onStoryCompleteCallback:A,nextStories:n[_().nextIndex],prevStories:n[_().prevIndex],initialEventIndex:i==_()[c]?O:0},"event-story-view-"+n[_()[c]].id)})}},"event-vertical-scroll-slide-"+t)))})})})},hn=n(4892);var un=function(t){var e,n,i,[o,a,l,d]=(0,u.Z)();const[c]=(0,h.j1)("whatmorePrimaryColor"),[p]=(0,h.j1)("whatmoreSecondaryColor"),x=t.event,m=(t.onBack,r.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),f=null!==(n=t.heightFactor)&&void 0!==n?n:1,w="flex-end";return d*=null!==(i=t.widthFactor)&&void 0!==i?i:1,l*=f,(0,g.jsx)(s.M5,{children:(0,g.jsxs)(s.xu,{width:d,height:l,children:[(0,g.jsx)(s.Kq,{direction:"column",justifyContent:w,height:"full",width:"full",children:(0,g.jsx)(s.xu,{children:(0,g.jsx)(s.oM,{width:"full",ratio:9/16,children:m?(0,Le.B6)(x)||(0,Le.WJ)(x)?(0,g.jsx)(hn.Z,{height:"100%",width:"100%",url:x.thumbnail_image,isPlaying:!1,pauseFromPlayTimeInMs:1e3,event:x}):(0,g.jsx)(v.Ee,{width:"full",height:"full",src:x.thumbnail_image,objectFit:"cover",borderRadius:"lg"}):(0,g.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+c+", gray, "+p+")"})})})}),(0,g.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:w,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,g.jsx)(s.xu,{children:(0,g.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,g.jsx)(s.xu,{width:"full",height:"full",backgroundColor:"blackAlpha.400"})})})})]})})};var pn=function(t){var[e,n,i,o]=(0,u.Z)();const[p]=(0,h.j1)("isInDesignMode"),[x]=(0,h.j1)("isDemoBrand"),[m,v]=(0,h.j1)("isFirstIndicatorRenderDone"),[f,w]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:j}=(0,r.useContext)(gn),[C,y]=(0,r.useState)(!1),[S]=(0,h.j1)("whatmoreShopId"),{whatmoreWidgetSourceDetails:b}=(0,r.useContext)(it.I),[I,k]=(0,r.useState)(!1),[_,F]=(0,r.useState)(null);function E(){k(!1)}t.events;const T=t.eventIndex,P=t.onBack,O=t.eventsStories,L=t.initialStoryIndex;function R(){E(),setTimeout((()=>{P()}),500)}function D(t){_&&!_.isEnd&&("right"==t?_.slideNext():_.slidePrev())}(0,r.useEffect)((()=>(k(!0),()=>{})),[]),j(R);const z=parseInt(Math.min(5,O.length));return(0,g.jsx)(tn,{show:I,closeCallback:E,customClass:"whatmore-landscape-modal-stories-view",children:(0,g.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",aligntItems:"center",backgroundColor:"blackAlpha.800",children:[(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.xu,{height:"fit-content",width:o*z,children:(0,g.jsxs)(a.tq,{onInit:t=>{F(t)},slidesPerView:z,centeredSlides:!0,allowTouchMove:!1,initialSlide:L,modules:[l.lI,l.W_,l.Gk],navigation:z>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*i),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:o*z,watchSlidesProgress:!0,onSlideChange:t=>{var e,n,i;f?w(!1):(m||v(!0),i=O[t.activeIndex].events[0],p||x||(async()=>{(0,d.wh)(i),(0,Ve.Tc)(S,Ue.Xh,Ue.OW),(0,mt.H4)(i.event_id,i.products,"homepage","stories")})(),(0,et.GF)({userInteractionType:nt.K.EVENT_VIEW,widgetSourceDetails:b,event:O[t.activeIndex].events[0],productList:null===(e=O[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=O[t.activeIndex].events[0])||void 0===n?void 0:n.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[O.length>2&&(0,g.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,g.jsx)(U,{onCloseCallback:P})}),O.map(((t,e)=>(0,g.jsx)(a.o5,{children:n=>{let{isActive:r,isPrev:a,isNext:l,isVisible:d,isDuplicate:c}=n;if(r){const n=1;return(0,g.jsx)(s.Kq,{direction:"column",height:i,width:o*n,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,g.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,g.jsx)(sn,{stories:t,onBack:R,isActive:r&&d,isNext:!1,isPrev:!1,onStoryCompleteCallback:D,initialEventIndex:L==e?T:0,showCloseOverlay:(null===O||void 0===O?void 0:O.length)<=2},"event-story-view-"+t.id)})})}return a||l?(0,g.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{_.slideTo(e,300)},children:(0,g.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,g.jsx)(un,{showPausedVideo:!0,event:O[e].events[0],onBack:R,isPlaying:!1,setLockSwiper:y})})}):(0,g.jsx)(g.Fragment,{})}},"event-horizontal-scroll-slide-"+e)))]})})}),(0,c.XFt)(S)?(0,g.jsx)(s.M5,{children:(0,g.jsx)(en,{height:.04*i,width:.1*o,fontSize:.02*i})}):(0,g.jsx)(g.Fragment,{})]})})};const xn=(0,ln.Z)({key:"whatmore-css-sv"}),gn=(0,r.createContext)({isIOS:!1,totalEvents:0,closeClickComponent:null,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:"vertical",showSwipeIndicator:!0});var mn=function(t){var e,n;const[i,o,a]=(0,ke.Z)(),[l]=(0,h.j1)("whatmoreShopId"),{whatmoreRootId:d}=(0,r.useContext)(it.I),{whatmoreIsStoriesTemplate:s}=(0,r.useContext)(it.I);var u=t.events,p=t.index,x=t.onBack,m=t.eventsStories,v=t.initialStoryIndex,f=(0,c.cX2)(l),w=(u[p],"portrait"===i?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(n=t.slideDirection)&&void 0!==n?n:u.length>1?"horizontal":"vertical"),j="portrait"===i?!(0,c.h6H)(l)&&!s:(0,c.n89)(l);return u[p],(0,r.useLayoutEffect)((()=>{(0,c.TLG)(l)&&(window.location.href.includes(f)?history.replaceState(null,"","#"+f):history.pushState(null,"","#"+f),window.addEventListener("popstate",(()=>{window.location.href.includes(f)||x()})))}),[]),delete rn.ZP.styles.global,s?(0,g.jsx)(an.C,{value:xn,children:(0,g.jsx)(on.x,{theme:rn.ZP,cssVarsRoot:d,resetCSS:!1,children:(0,g.jsx)(gn.Provider,{value:{isIOS:(0,we.KE)(),totalEvents:u.length,closeClickComponent:x,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:w,showSwipeIndicator:j},children:"portrait"===i?(0,g.jsx)(cn,{eventsStories:m,initialStoryIndex:v,onBack:x,eventIndex:p}):u.length>1&&(0,c.Bbr)(l)?(0,g.jsx)(pn,{eventsStories:m,initialStoryIndex:v,onBack:x,eventIndex:p}):(0,g.jsx)(cn,{eventsStories:m,initialStoryIndex:v,onBack:x,eventIndex:p})})})}):(0,g.jsx)(an.C,{value:xn,children:(0,g.jsx)(on.x,{theme:rn.ZP,cssVarsRoot:d,resetCSS:!1,children:(0,g.jsx)(gn.Provider,{value:{isIOS:(0,we.KE)(),totalEvents:u.length,closeClickComponent:x,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:w,showSwipeIndicator:j},children:"portrait"===i?(0,g.jsx)(Je,{events:u,eventIndex:p,onBack:x}):u.length>1?(0,g.jsx)(nn,{events:u,eventIndex:p,onBack:x}):(0,g.jsx)(Je,{events:u,eventIndex:p,onBack:x,showCloseOverlay:!0})})})})}},9316:function(t,e,n){n.d(e,{mT:function(){return s}});var i,o,r,a=n(168),l=n(686);const d=(0,l.F4)(i||(i=(0,a.Z)(["\n 0% { transform: scale(1); }\n 50%, { transform: scale(0.95); }\n 100% { transform: scale(1); }\n"]))),s="\n ".concat(d," 0.2s linear;\n"),c=(0,l.F4)(o||(o=(0,a.Z)(["\n 100% { \n -webkit-transform: rotate(360deg); \n transform:rotate(360deg); \n }\n"]))),h=("\n ".concat(c," 0.5s infinite linear;\n"),(0,l.F4)(r||(r=(0,a.Z)(["\n 0% { \n opacity: 1;\n transform: translateY(100%);\n }\n 10%{\n transform: translateY(0%);\n }\n 12%{\n transform: translateY(-5%);\n }\n 20%{\n transform: translateY(0%);\n }\n 95%{\n opacity: 1;\n transform: scale(1);\n }\n 100%{\n opacity: 0;\n }\n"]))));"\n ".concat(h," ").concat(3,"s ease-in-out;\n")},6163:function(t,e,n){n.r(e),n.d(e,{default:function(){return w}});var i=n(3271),o=n(5427),r=n(7313),a=n(7753),l=n(756),d=(n(4844),n(5160));var s=n(9316),c=n(9748),h=n(4209),u=n(9854),p=(n(7605),n(7053)),x=n(9039),g=n(7376),m=n(778),v=n(6417);function f(t){var e;const[n]=(0,a.j1)("whatmoreSecondaryColor"),[r]=(0,a.j1)("whatmorePrimaryFont"),l=null!==(e=t.baseFontSize)&&void 0!==e?e:10,d=t.width,s=t.height;return(0,v.jsx)(i.xu,{width:d,height:s,padding:"0px",boxShadow:"lg",borderRadius:"md",backgroundColor:"white",borderColor:n,borderWidth:"1px",children:(0,v.jsxs)(i.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"2px",justifyContent:"center",children:[(0,v.jsxs)(i.xv,{color:n,fontSize:1.3*l,fontWeight:"semibold",sx:{fontFamily:r+" !important"},children:["\xa0"," In Cart ","\xa0"]}),(0,v.jsx)(i.M5,{paddingX:"5px",children:(0,v.jsx)(o.Z,{sx:{color:n,fontSize:1.5*l}})})]})})}var w=function(t){var e,n,o,w;const[j]=(0,a.j1)("whatmorePrimaryFont"),[C]=(0,a.j1)("isInDesignMode"),[y]=(0,a.j1)("isDemoBrand"),[S,b]=(0,a.j1)("appCartData"),[I]=(0,a.j1)("whatmoreShopId"),[k]=[(0,u.hmr)(I)],_=(0,u.hmr)(I),[F,E]=(0,r.useState)(!1),[T,P]=(0,r.useState)({state:"initial"}),[O,L]=(0,r.useState)({loaded:!1,client_product_id:"",variant_id:"",variant_price:""}),{closeClickComponent:R}=(0,r.useContext)(h.EventClickComponentContext),{whatmoreWidgetSourceDetails:D}=(0,r.useContext)(x.I),z=t.event,M=t.product,K=null!==(e=t.baseFontSize)&&void 0!==e?e:10;function W(t,e,n){C||y||(async()=>{(0,d.JX)(t,e,n)})()}(0,r.useEffect)((()=>{!async function(){var t,e,n,i,o;const r=await(0,p.gK)(M,(0,u.Ipo)(I),I);L({loaded:!0,client_product_id:M.client_product_id,variant_id:null===(t=r.product)||void 0===t||null===(e=t.variants)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.id,variant_price:null===(i=r.product.variants)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.price})}()}),[]);const A=null!==(n=t.width)&&void 0!==n?n:"fit-content",q=null!==(o=t.height)&&void 0!==o?o:"fit-content",H=(null!==(w=(0,u.Jb1)(I))&&void 0!==w?w:2)+"px";return O.loaded?(0,v.jsx)("div",{style:{width:A,height:q},children:(0,v.jsx)("a",{href:"javascript:void(0)","data-variant-id":O.variant_id,"data-action-atc":"",rel:"nofollow","aria-describedby":"a11y-external-message",children:(0,v.jsx)(c.zx,{type:"submit",className:(0,u.Sl8)(I),sx:{width:A,height:q,minHeight:q},onClick:t=>{E(!0),W(z,M,1),(0,g.GF)({userInteractionType:m.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:D,event:z,productList:[M],ctaList:z.cta}),null!==R&&setTimeout((()=>{R()}),2e3)},children:"initial"===T.state?(0,v.jsx)(l.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:q,width:A},children:(0,v.jsx)(i.xu,{width:"100%",height:"100%",padding:H,boxShadow:"lg",borderRadius:"md",backgroundColor:_,borderColor:_,borderWidth:"1px",animation:F?s.mT:null,onAnimationEnd:()=>{E(!1)},children:(0,v.jsx)(i.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:(0,v.jsx)(i.M5,{children:(0,v.jsxs)(i.xv,{lineHeight:"100%",fontSize:1.3*K,fontWeight:"semibold",sx:{fontFamily:j+" !important",color:(0,u.KCy)(I)+" !important"},children:["\xa0"," ADD TO CART ","\xa0"]})})})})}):(0,v.jsx)(l.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:q,width:A},children:(0,v.jsx)(f,{event:z,product:M,baseFontSize:K,cartState:T,width:A,height:q})})})})}):(0,v.jsx)(v.Fragment,{})}},2634:function(t,e,n){var i=n(3271),o=n(4897),r=n(499),a=n(6417);e.Z=function(t){var e,n=t.event,l=t.fontSize,d=null!==(e=t.maxWidth)&&void 0!==e?e:"100%",{status:s,bannerText:c,timeToStartInMins:h}=o.Z.getEventStatus(n);return s.name===r.Z.LIVE.name?(0,a.jsx)(i.xu,{maxWidth:d,width:"fit-content",borderRadius:"md",paddingLeft:"2px",paddingRight:"2px",backgroundColor:"tomato",color:s.color,children:(0,a.jsx)(i.Kq,{direction:"row",justifyContent:"flex-start",width:"fit-content",alignContent:"center",paddingLeft:"2px",paddingRight:"2px",children:(0,a.jsx)(i.xv,{fontSize:l,fontWeight:"bold",color:"white",children:c})})}):(0,a.jsx)(i.xu,{maxWidth:d,borderRadius:"md",paddingLeft:"2px",paddingRight:"2px",backgroundColor:"white",color:s.color,children:(0,a.jsx)(i.Kq,{direction:"row",justifyContent:"flex-start",width:"fit-content",alignContent:"center",children:(0,a.jsx)(i.xv,{fontSize:l,fontWeight:"medium",children:c})})})}},7605:function(t,e,n){n.d(e,{a:function(){return i}});n(5160);const i=async function(t,e,n,i,o,r,a,l,d,s){}},1896:function(t,e,n){n.d(e,{Z:function(){return w}});var i=n(7313),o=n(7300),r=n(6422),a=n(4209),l=n(3175),d=n(2887),s=n(7753),c=n(58),h=n(3433),u=n(9854),p=n(4862),x=(n(8743),n(9039)),g=n(6417);function m(t){var e,n,o;const[a,d]=(0,r.Z)(),[m,v]=(0,i.useState)(i.useRef()),f=t.posterImage,[w,j]=(0,s.j1)("whatmoreVideoPlayerPoolBlessed"),[C,y]=(0,i.useState)(!0),[S,b]=(0,i.useState)(!1),I=t.timeUpdateCallback,{whatmoreIsPreviewMode:k}=(0,i.useContext)(x.I),_=null!==(e=t.isVideoMuted)&&void 0!==e?e:a,F=null!==(n=t.height)&&void 0!==n?n:"100%",E=null!==(o=t.width)&&void 0!==o?o:"100%",T=(0,s.MO)("whatmoreShopId");(0,i.useLayoutEffect)((()=>{var e;m.current&&w&&(0==m.current.children.length?((e=(0,c.Bi)(m.current,t.url,_||!t.isPlaying,t.isPlaying)).addEventListener("loadeddata",(()=>{y(!1)})),I&&e.addEventListener("timeupdate",(t=>{var n,i;e&&I(null!==(n=e.currentTime)&&void 0!==n?n:0,null!==(i=e.duration)&&void 0!==i?i:0)}))):((e=m.current.children[0]).muted=_||!t.isPlaying,t.isPlaying?e.play():(e.pause(),(0,u.dF_)(T)&&t.source==h.j.CAROUSEL_EVENT_OPENED&&(!t.isPlaying&&e.play(),setTimeout((()=>{!t.isPlaying&&e.pause()}),p.G6?1900:800)))))}),[_,t.isPlaying,w,C]),(0,i.useLayoutEffect)((()=>()=>{m.current&&0!=m.current.children.length&&(0,c.P7)(m.current)}),[]);return(0,g.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:E,height:F,overflow:"hidden",backgroundColor:k?(0,u.WNM)(T):(0,u.Gy3)(T)},children:[(0,g.jsx)("div",{ref:m,style:{width:C?"0px":"100%",height:C?"0px":k?(0,u.Yiq)(T):(0,u.MT6)(T)},className:"whatmore-video-player-ios-holder"}),C&&S?(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("div",{style:{width:"100%",height:"100%",position:"relative"},children:(0,g.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,g.jsx)("img",{src:f,height:F,width:E,style:{animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})})})}):C&&!S&&(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{style:{width:"100%",height:"100%",position:"relative"},children:[(0,g.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,g.jsx)("img",{src:f,height:F,width:E,onLoad:()=>{b(!0)},style:{animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})}),(0,g.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,g.jsx)(l.Z,{width:E,height:F,style:{position:"absolute",top:"50%",left:"50%",opacity:"0.6"}})})]})})]})}var v=function(t){var e;return(0,g.jsx)(m,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,isVideoMuted:null!==(e=t.isVideoMuted)&&void 0!==e?e:null,source:t.source,posterImage:t.posterImage})};function f(t){var e,n,o;const[a,d]=(0,r.Z)(),[c,m]=(0,i.useState)(!1),[v,f]=(0,i.useState)(!1),w=t.setDuration,j=(0,i.useRef)(null),C=(0,s.MO)("whatmoreShopId"),y=t.timeUpdateCallback,{whatmoreIsPreviewMode:S}=(0,i.useContext)(x.I),b=null!==(e=t.height)&&void 0!==e?e:"100%",I=null!==(n=t.width)&&void 0!==n?n:"100%",k=null!==(o=t.isVideoMuted)&&void 0!==o?o:a,_=null===t||void 0===t?void 0:t.posterImage;return(0,i.useEffect)((()=>{j.current&&(t.isPlaying?j.current.paused&&j.current.play():j.current.pause(),y&&j.current.addEventListener("timeupdate",(t=>{var e,n;j.current&&y(null!==(e=j.current.currentTime)&&void 0!==e?e:0,null!==(n=j.current.duration)&&void 0!==n?n:0)})))}),[t.isPlaying]),(0,g.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:I,height:b,overflow:"hidden",backgroundColor:S?(0,u.WNM)(C):(0,u.Gy3)(C)},children:[(0,g.jsx)("div",{style:{width:c?"100%":"0px",height:c?S?(0,u.Yiq)(C):(0,u.MT6)(C):"0px"},children:(0,g.jsx)("video",{ref:j,className:"whatmore-video-player",preload:"auto",loop:!0,playsInline:!0,muted:!(!k&&t.isPlaying),src:t.url,onLoadedData:()=>{m(!0),t.isPlaying&&j.current&&j.current.play(),(0,u.dF_)(C)&&t.source==h.j.CAROUSEL_EVENT_OPENED&&(!t.isPlaying&&j.current&&j.current.play(),setTimeout((()=>{!t.isPlaying&&j.current&&j.current.pause()}),p.G6?1900:800))},onLoadedMetadata:()=>{j.current&&w&&w(j.current.duration)},poster:_})}),!c&&v?(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("div",{style:{width:"100%",height:"100%",position:"relative"},children:(0,g.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,g.jsx)("img",{src:_,height:b,width:I,style:{animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})})})}):!c&&!v&&(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{style:{width:"100%",height:"100%",position:"relative"},children:[(0,g.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,g.jsx)("img",{src:_,height:b,width:I,onLoad:()=>{f(!0)},style:{animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})}),(0,g.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,g.jsx)(l.Z,{width:I,height:b,style:{position:"absolute",top:"50%",left:"50%",opacity:"0.6"}})})]})})]})}var w=function(t){var e,n,r,l;return(0,o.WJ)(t.event)?(0,g.jsx)(d.Z,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback}):1==(0,i.useContext)(a.EventClickComponentContext).isIOS&&1==(0,s.MO)("whatmoreVideoPlayerPoolBlessed")?(0,g.jsx)(v,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,isVideoMuted:null!==(r=t.isVideoMuted)&&void 0!==r?r:null,source:t.source,posterImage:null===(l=t.event)||void 0===l?void 0:l.poster_image}):(0,g.jsx)(f,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,isVideoMuted:null!==(e=t.isVideoMuted)&&void 0!==e?e:null,setDuration:t.setDuration,source:t.source,posterImage:null===(n=t.event)||void 0===n?void 0:n.poster_image})}},3433:function(t,e,n){n.d(e,{j:function(){return i}});const i={BANNER:"banner",CAROUSEL_EVENT_OPENED:"carousel_event_opened",CAROUSEL_THUMBNAIL_VIEW:"carousel_thumbnail_view",STORY_EVENT_OPENED:"story_event_opened",STORY_THUMBNAIL_VIEW:"story_thumbnail_view"}},6119:function(t,e,n){var i,o=n(168),r=n(3271),a=n(7313),l=n(7789),d=n(7753),s=n(686),c=n(9854),h=n(9039),u=n(5160),p=n(6417);const x=(0,s.F4)(i||(i=(0,o.Z)(["\n 0% { \n opacity: 0;\n }\n 10%{\n opacity: 0.5;\n }\n 20%{\n opacity: 1;\n }\n \n"]))),g=("\n ".concat(x," ").concat(3,"s ease-in-out;\n"),function(t,e){return(0,c.lj5)(e)?t+"?"+(0,c.awP)(e)+"&"+(0,c.n9s)(e)+"&"+(0,c.poG)(e):t});e.Z=function(t){var e;const[n,i,o,s]=(0,l.Z)(),[x,m]=(0,a.useState)(!1),{whatmoreUITheme:v}=(0,a.useContext)(h.I),f=(0,d.MO)("isInDesignMode"),w=(0,d.MO)("isDemoBrand"),j=(0,d.MO)("whatmoreSecondaryColor"),C=(0,d.MO)("whatmoreSecondaryColorShade1200"),y=(0,d.MO)("whatmorePrimaryFont"),S=(0,d.MO)("whatmoreShopId"),b=(t.event,t.cta),I=.05*s;return(0,p.jsx)(r.M5,{children:(0,p.jsx)(r.Kq,{direction:"row",height:"fit-content",width:"100%",justifyContent:"center",marginBottom:.03*s+"px",marginTop:.03*s+"px",children:(0,p.jsx)(r.rU,{href:g(b.cta_link,S),color:"white",onClick:()=>{f||w||(async()=>{(0,u.uD)(t)})()},children:(0,p.jsx)(r.xv,{fontSize:I*(null!==(e=t.fontFactor)&&void 0!==e?e:1)+"px",variant:"subtle",textColor:j,bgColor:C,sx:{borderRadius:"round"==v?"5px":"0px",borderWidth:(0,c.p5R)(S),borderColor:"#343434"===(0,c.yxc)(S)?j:(0,c.yxc)(S),fontFamily:y+" !important",textAlign:"center!important",fontWeight:"bold"},paddingY:"8px",paddingX:.05*s+"px",children:b.cta_title})})})})}},8782:function(t,e,n){n.d(e,{P:function(){return l}});var i=n(3933),o=n(7313),r=(n(123),n(6417));function a(t){const{ref:e,inView:n,entry:o}=(0,i.YD)({triggerOnce:t.retainAlreadyRenderedElements});return(0,r.jsx)("div",{ref:e,children:n?t.renderElement({eventData:t.data}):(0,r.jsx)("div",{style:{minWidth:t.defaultHeight,minHeight:t.defaultWidth}})})}function l(t){var e;return(0,o.useEffect)((()=>{const t=document.querySelector(".whatmore-carousel-horizontal-flex");let e,n=!1;function i(t){t.touches&&(null===t||void 0===t?void 0:t.touches.length)>0?(n=!0,e=t.touches[0].clientX):(n=!0,e=t.clientX)}function o(i){if(!n)return;const o=i.touches?i.touches[0].clientX:i.clientX;t.style.pointerEvents="none";const r=2*(e-o);t.scrollLeft+=r,e=o}function r(e){t.style.pointerEvents="auto",n=!1}return t&&("ontouchstart"in window&&(t.addEventListener("touchstart",i),t.addEventListener("touchmove",o),t.addEventListener("touchend",r)),t.addEventListener("mousedown",i),document.addEventListener("mousemove",o),document.addEventListener("mouseup",r)),()=>{t&&("ontouchstart"in window&&(t.removeEventListener("touchstart",i),t.removeEventListener("touchmove",o),t.removeEventListener("touchend",r)),t.removeEventListener("mousedown",i),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r))}}),[]),(0,r.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",height:"fit-content",width:"100%",gap:null!==(e=t.spacing)&&void 0!==e?e:3},className:"whatmore-carousel-horizontal-flex",children:t.dataList.map(((e,n)=>(0,r.jsx)(a,{renderElement:t.renderElement,data:e,defaultHeight:t.defaultHeight,defaultWidth:t.defaultWidth,retainAlreadyRenderedElements:t.retainAlreadyRenderedElements},"key-"+n)))})}},342:function(t,e,n){n.d(e,{WN:function(){return o},uv:function(){return i}});const i=function(t){var e;return"event_media_urls"in t?"image"===t.event_type?t.event_media_urls.primary.portrait.content_image_original:"secondary"in t.event_media_urls&&t.event_media_urls.secondary.portrait.content_video_1080p?t.event_media_urls.secondary.portrait.content_video_1080p:null!==(e=t.event_media_urls.primary.portrait.content_video_1080p)&&void 0!==e?e:null:t.event_hls_url},o=function(t){return"event_media_urls"in t?"image"===t.event_type?t.event_media_urls.primary.landscape.content_image_original:"secondary"in t.event_media_urls&&t.event_media_urls.secondary.landscape.content_video_1080p?t.event_media_urls.secondary.landscape.content_video_1080p:t.event_media_urls.primary.landscape.content_video_1080p:t.event_hls_url}},6422:function(t,e,n){var i=n(7313),o=n(7753);e.Z=function(t){const[e,n]=(0,o.j1)("muted");return(0,i.useEffect)((()=>{}),[]),[e,n]}},7789:function(t,e,n){var i=n(8866);e.Z=function(t){const[e,n,o]=(0,i.Z)();var r="landscape"==e?n*(9/16):o;if("landscape"==e){const t=.85;return[n,r,n*t,r*t]}return[n,r,n,r]}},7053:function(t,e,n){n.d(e,{gK:function(){return r},pO:function(){return a}});var i=n(2791),o=n(4844);async function r(t,e,n){return"shopify"==e?(0,o.dg)(t):(0,i.Y4)(t,n)}async function a(t,e,n){return"shopify"==e?(0,o.bN)(t):(0,i.ln)(t,n)}},9111:function(){}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[972],{3972:function(e,t,n){n.r(t),n.d(t,{default:function(){return q}});var a=n(7753),r=n(7313),i=n(2860),o=n(499),s=n(4897),l=n(5160),c=n(9854),u=n(6967),d=n(8984),h=n(58),p=n(4669),m=n(941),v=n(9039),g=n(7300),I=n(6524),S=n(7643),f=n(778),y=n(6417);const w=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(210),n.e(926),n.e(950),n.e(303),n.e(891)]).then(n.bind(n,4095)))),E=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(576),n.e(950),n.e(364),n.e(530)]).then(n.bind(n,5523)))),x=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(423),n.e(926),n.e(950),n.e(249),n.e(622)]).then(n.bind(n,3827)))),T=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(423),n.e(926),n.e(950),n.e(249),n.e(965)]).then(n.bind(n,6071)))),_=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(423),n.e(926),n.e(950),n.e(708)]).then(n.bind(n,1291)))),j=r.lazy((()=>Promise.all([n.e(302),n.e(580)]).then(n.bind(n,3580)))),M=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(576),n.e(210),n.e(955),n.e(926),n.e(303),n.e(209),n.e(790)]).then(n.bind(n,4209)))),O=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(210),n.e(926),n.e(950),n.e(959)]).then(n.bind(n,4048)))),L=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(303),n.e(554)]).then(n.bind(n,9085)))),C=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(576),n.e(950),n.e(303),n.e(364),n.e(67)]).then(n.bind(n,4362)))),b=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(576),n.e(210),n.e(955),n.e(926),n.e(303),n.e(209),n.e(196)]).then(n.bind(n,4658)))),D=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(423),n.e(926),n.e(950),n.e(84)]).then(n.bind(n,8767))));var P=function(e){const[t]=(0,a.j1)("isInDesignMode"),[n]=(0,a.j1)("isDemoBrand"),[P]=(0,a.j1)("whatmoreTopBottomPadding"),[G]=(0,a.j1)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:W}=(0,r.useContext)(v.I),[V]=(0,a.j1)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:k}=(0,r.useContext)(v.I),z=(0,a.MO)("isLandingSharedLink"),R=(0,a.MO)("whatmoreShareTemplateId"),U=(0,a.MO)("whatmoreShareStoryId"),q=(0,a.MO)("whatmoreShareEventId"),[A,F]=(0,r.useState)(-1),[N,Z]=(0,r.useState)(null);let K=e.events,B=[];if("template-banner-a"!==k){let e=0;for(let t=0;t<(null===K||void 0===K?void 0:K.length);t++){var H,Y,J,X;const n=(null===K||void 0===K||null===(H=K[t])||void 0===H||null===(Y=H.products)||void 0===Y?void 0:Y.length)>0&&(null===K||void 0===K||null===(J=K[t])||void 0===J||null===(X=J.products)||void 0===X?void 0:X.every((e=>"oos"===(null===e||void 0===e?void 0:e.product_status))));if(!(0,g.B6)(K[t])&&!(0,g.WJ)(K[t])||n){if((0,g.yC)(null===K||void 0===K?void 0:K[t])){var{status:Q,bannerText:$,timeToStartInMins:ee}=s.Z.getEventStatus(K[t]);Q.name===o.Z.LIVE.name&&(B.push({...null===K||void 0===K?void 0:K[t],index:e}),e++)}}else B.push({...null===K||void 0===K?void 0:K[t],index:e}),e++}}var te=null;function ne(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,d.KE)()&&!a&&(0,h.QV)(),t||n||(async()=>{const t=te[e].events[0];(0,l.wh)(t),(0,p.Tc)(V,i.Xh,i.OW),(0,u.H4)(t.event_id,t.products,"homepage","stories")})();var o=0;null!=r&&te[e].events.map(((e,t)=>{e.event_id==r&&(o=t)})),F(o),Z(e)}function ae(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,d.KE)()&&!a&&(0,h.QV)(),(0,g.B6)(e)||(0,g.WJ)(e))return t||n||(async()=>{(0,l.wh)(e),(0,p.Tc)(V,i.Xh,i.pR),(0,u.H4)(e.event_id,e.products,"homepage","carousel")})(),void F(e.index);const r=20;var{status:c,bannerText:m,timeToStartInMins:v}=s.Z.getEventStatus(e);v<=r&&c.name!==o.Z.LIVE.name?console.debug(" TODO : show toast on upcoming live event."):F(e.index)}function re(e){return(0,y.jsx)(y.Fragment,{})}return W&&!te&&(te=function(e){var t=e.reduce(((e,t,n)=>{var a=t.storyset_id;return a in e?(e[a].total_events=e[a].total_events+1,e[a].events.push(t)):e[a]={id:t.storyset_id,title:t.storyset_name,thumbnail_image:t.storyset_thumbnail_image,total_events:1,start_event_index:n,events:[t]},e}),{}),n=Object.values(t);return n.sort(((e,t)=>e.start_event_index-t.start_event_index)),n}(B)),(0,r.useEffect)((()=>{z&&k==(0,I.zv)(R)&&(null!=U&&W?te.forEach(((e,t)=>{U==e.id&&ne(t,!0,q)})):null!=q&&K.forEach(((e,t)=>{q==e.event_id&&ae(e,!0)})))}),[]),(0,y.jsxs)("div",{children:[(0,y.jsx)("div",{style:{marginTop:(W?G:P)+"px",marginBottom:(W?G:P)+"px"},children:"template-b"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(w,{events:B,onClick:ae,heading:e.heading})}):"template-a-1"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(E,{events:B,onClick:ae,heading:e.heading})}):"template-feed-a"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(C,{events:B,onClick:ae,heading:e.heading})}):"template-collections-a"===k||"template-c"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(S.u,{userInteractionType:f.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(x,{events:B,index:A,setScreen:F,onClick:ae,heading:e.heading})})}):"template-collections-b"===k||"template-d"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(S.u,{userInteractionType:f.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(T,{events:B,index:A,setScreen:F,onClick:ae,heading:e.heading})})}):"template-collections-c"===k||"template-e"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(S.u,{userInteractionType:f.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(_,{events:B,index:A,setScreen:F,onClick:ae,heading:e.heading})})}):"template-collections-d"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(S.u,{userInteractionType:f.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(w,{events:B,index:A,setScreen:F,onClick:ae,heading:e.heading})})}):"template-collections-e"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(S.u,{userInteractionType:f.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(O,{events:B,index:A,setScreen:F,onClick:ae,heading:e.heading})})}):"template-collections-stories"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(S.u,{userInteractionType:f.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(D,{events:B,index:A,setScreen:F,onClick:ae,heading:e.heading})})}):"template-f"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(S.u,{userInteractionType:f.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(L,{events:B,onClick:ae,heading:e.heading})})}):"template-banner-a"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(S.u,{userInteractionType:f.K.BANNER_WIDGET_VIEW,event:K[0],triggerFlag:!t&&!n,children:(0,y.jsx)(b,{events:K})})}):W?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(S.u,{userInteractionType:f.K.STORIES_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(j,{eventsStories:te,onClick:ne,template:k})})}):(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(S.u,{userInteractionType:f.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(O,{events:B,onClick:ae,heading:e.heading})})})}),-1==A||-2==A?(0,y.jsx)(re,{}):(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(S.u,{userInteractionType:f.K.EVENT_VIEW,event:K[A],productList:K[A].products,cta:K[A].cta,triggerFlag:!t&&!n,children:(0,y.jsx)(M,{events:B,index:A,onBack:function(e){(0,c.n2L)(V)&&(0,a.MO)("whatmoreAddedToCart")&&(0,m.D)(V,(()=>{}),100,window.location.hostname),F(-1)},slideDirection:W||"horizontal"===(0,c.e8z)(V)?"horizontal":"vertical",eventsStories:te,initialStoryIndex:N,template:k})})})]})};const G=function(e,t,n){const r=(0,a.MO)("whatmoreShopId");var i=t.reduce(((e,t,n)=>(t.products.map((e=>e.client_product_id)).forEach((t=>{t in e||(e[t]=!0)})),e)),{}),o=Object.keys(i);if("60960964855"==r&&"undefined"!=typeof fera&&"function"===typeof fera.getRatings){var s={};fera.getRatings(o,(e=>{new Promise(((t,n)=>{e.forEach((e=>{s[e.external_product_id]={avgRating:e.average,totalRatings:e.count}})),t(s)})).then((e=>n(e)))}))}if("23114481744"==r){const e="1e6MQXxzYR19mpw9Km6Dcm86";s={};fetch("https://api.juniphq.com/v1/products?filter[remote_ids]="+o.toString(),{headers:{"Junip-Store-Key":e}}).then((e=>e.json())).then((e=>(e.products.forEach((e=>{s[e.remote_id]={avgRating:parseFloat(e.rating_average).toFixed(1),totalRatings:e.rating_count}})),s))).then((e=>n(e))).catch((e=>console.error(e)))}};var W=n(3388),V=n(7381),k=n(7376),z=n(7008);var R=function(e){const[t,n]=(0,r.useState)(),[o,s]=(0,r.useState)(),{whatmoreIsStoriesTemplate:l}=(0,r.useContext)(v.I),{whatmoreIsCollectionsTemplate:p}=(0,r.useContext)(v.I),{whatmoreIsBannerTemplate:m}=(0,r.useContext)(v.I),[g]=(0,a.j1)("whatmoreShopId"),[S]=(0,a.j1)("whatmoreCollectionId"),w=(0,a.MO)("whatmoreLandingLocationType"),E=(0,a.MO)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:x}=(0,r.useContext)(v.I),{whatmoreCollectionUrl:T}=(0,r.useContext)(v.I),_=(0,c.cZT)(g)?(0,c._uv)(g)?T:window.location.href.split(/[?#]/)[0]:S,[j,M]=(0,a.j1)("productRatings"),[O,L]=(0,r.useState)(!1);var C=(0,c.efR)(g)?i.Dm+"/v2/events/":i.Gc+"/v2/events/",b=(0,c.efR)(g)?i.Dm+"/get_eventset/":i.Gc+"/get_eventset/",D=(0,c.efR)(g)?i.Dm+"/v2/collection":i.Gc+"/v2/collection",R=(0,c.efR)(g)?i.Dm+"/v2/brand/"+g+"/product-events":i.Gc+"/v2/brand/"+g+"/product-events",U=e.shopId,q="live,upcoming";return(0,r.useEffect)((()=>{(0,u.hb)();const e=()=>{const e="_whatmore_bulk_events",t=JSON.parse(localStorage.getItem(e))||[];t&&t.length>0&&((0,z.K)(t),localStorage.removeItem(e))};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[]),(0,r.useEffect)((()=>{null==t||0==t.length||o||!(0,d.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||(0,h.b5)(h.UD)}),[t]),(0,r.useEffect)((()=>{var e;if(w.startsWith("product")){var t=(0,a.MO)("whatmoreProductId");t=(0,c.iXA)(g)?function(e){return e.split(/[?#]/)[0]}(window.location.href):t,e=R.toString()+"?client_product_id="+t.toString()+"&status="+q.toString()+"&event_type=video"}else if(p||"invalid-url"!==T)e=D.toString()+"?store_id="+U.toString()+"&client_collection_id="+_;else if(m){const t=I.ls,n=(0,I.H1)(w);e=b.toString()+U.toString()+"?eventset_type="+t+"&source="+n+"&source_id="+g}else e=C.toString()+U.toString()+"?status="+q.toString()+"&is_active="+"true".toString()+(l?"&template_type=stories":"");fetch(e).then((e=>e.json())).then((e=>{if(m){const t=I.ls;return(0,W.OC)(e,t)}return(0,W.kW)(e,p||"invalid-url"!==T)})).then((e=>(E&&console.debug("initial received events size : "+e.length),l||m?e:(0,W.e8)(e,U)))).then((e=>(null!=e&&0!=e.length&&(0,c.LUY)(g)&&function(e,t,n){const r=setInterval((()=>{null===(0,a.MO)("productRatings")&&G(e,t,n)}),1e3);setTimeout((()=>{clearInterval(r)}),1e4)}(g,e,(e=>{M(e)})),e))).then((e=>{null==e||0==e.length||l||m||(0,c.NOv)(U,e),n(e),L(!0)})).catch((e=>{s(e.message)}))}),[]),(0,r.useEffect)((()=>{"index"===w?t&&t.length>0&&(0,k.PB)({userInteractionType:f.K.HOMEPAGE_VISITED,widgetSourceDetails:x}):"collection"===w&&(t&&t.length>0||(0,c.miB)(g))&&(0,k.PB)({userInteractionType:f.K.COLLECTION_PAGE_VISITED,widgetSourceDetails:x})}),[t]),(O&&(null==t||0==t.length)||o)&&v.$.forEach((e=>{var t,n,a,r;const i=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-stories-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-stories-a"]'),o=null!==(n=e.querySelector('.whatmore-template-type[data-wh="template-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-f"]')||e.querySelector('.whatmore-template-type[data-wh="template-e"]'))&&void 0!==n?n:e.querySelector('.whatmore-template-type[data="template-a"]')||e.querySelector('.whatmore-template-type[data="template-b"]')||e.querySelector('.whatmore-template-type[data="template-f"]')||e.querySelector('.whatmore-template-type[data="template-e"]'),s=null!==(a=e.querySelector('.whatmore-template-type[data-wh="template-collections-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-c"]'))&&void 0!==a?a:e.querySelector('.whatmore-template-type[data="template-collections-a"]')||e.querySelector('.whatmore-template-type[data="template-collections-b"]')||e.querySelector('.whatmore-template-type[data="template-collections-c"]'),l=null!==(r=e.querySelector('.whatmore-template-type[data-wh="template-banner-a"]'))&&void 0!==r?r:e.querySelector('.whatmore-template-type[data="template-banner-a"]'),c=e;(l||s||o||i)&&(o&&c||i&&c||l&&c||s&&c)&&(c.style.minHeight="0px")})),null==t||0==t.length||o?(0,y.jsx)("div",{}):(E&&(0,V.EI)(t),function(e){if(null!=e){var t=0;e.forEach((e=>{e.index=t++}))}}(t),E&&console.debug("final transformed events data : "+JSON.stringify(t)),E&&console.debug("valid events size : "+t.length),(0,y.jsx)("div",{children:(0,y.jsx)(P,{heading:e.heading,events:t})},"whatmore-main-coponent"))},U=n(3933);var q=function(e){const[t]=(0,a.j1)("isInDesignMode"),[n]=(0,a.j1)("isDemoBrand"),[o]=(0,a.j1)("whatmoreShopId"),[s]=(0,a.j1)("whatmoreHeading"),[l,u]=(0,r.useState)(["initial",window.pageYOffset]),[d,h]=(0,r.useState)(!1),m=(0,a.MO)("isLandingSharedLink");(0,r.useEffect)((()=>{if((0,p.ll)(o),!(0,c.wc0)(o))return;let e=window.pageYOffset,t=!1;const n=()=>{const n=window.pageYOffset;var a,r;Math.abs(n-e)<100?t=!1:(r=!0,u(a=[n>e?"scrolled-down":"scrolled-up",n]),a[1]>100&&h(r),e=n>0?n:0,t=!1)},a=()=>{t||(window.requestAnimationFrame(n),t=!0)};return window.addEventListener("scroll",a),()=>window.removeEventListener("scroll",a)}),[]);const[v,g,I]=(0,U.YD)({triggerOnce:!0});return(0,y.jsx)("div",{ref:v,children:d||g||m||!(0,c.wc0)(o)?(0,y.jsx)("div",{children:t||n?(0,y.jsx)("div",{children:(0,y.jsx)(R,{heading:s,shopId:i.aA})}):(0,y.jsx)("div",{children:(0,y.jsx)(R,{heading:s,shopId:o})})}):(0,y.jsx)(y.Fragment,{})})}},499:function(e,t){t.Z={LIVE:{name:"LIVE",color:"gray.600"},UPCOMING:{name:"UPCOMING",color:"gray.600"},DEFAULT:{name:"LIVE EVENT",color:"gray.600"},COMPLETED:{name:"ENDED",color:"gray.600"}}},4897:function(e,t,n){var a=n(499);t.Z=class{static getEventStatus(e){e.time_zone="GMT+5:30";var t=e.start_time+":00",n=e.end_time,r=e.scheduled_date,i=e.status,o=e.time_zone;if(i.toUpperCase()==a.Z.LIVE.name)return{status:a.Z.LIVE,bannerText:" "+a.Z.LIVE.name+" ",timeToStartInMins:0};if(i.toUpperCase()==a.Z.UPCOMING.name){var s=new Date(r+" "+t+" "+o),l=(new Date(r+" "+n+" "+o),function(e){var t=new Date,n=(e.getTime()-t.getTime())/1e3,r=n/60,i=r/60,o=i/24;return n<=0?{status:a.Z.COMPLETED,bannerText:" "+a.Z.COMPLETED.name+" ",timeToStartInMins:0}:n>=1&&n<=30?{status:a.Z.UPCOMING,bannerText:"Starts in "+Math.round(n)+" sec ",timeToStartInMins:n/60}:r<60?{status:a.Z.UPCOMING,bannerText:"Starts in "+Math.round(r)+" min ",timeToStartInMins:r}:i<24?{status:a.Z.UPCOMING,bannerText:"Starts in "+Math.round(i)+" hr ",timeToStartInMins:60*i}:o<7?{status:a.Z.UPCOMING,bannerText:" "+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()]+" ",timeToStartInMins:60*o*24}:{status:a.Z.UPCOMING,bannerText:"Upcoming",timeToStartInMins:2880}}(s));return{status:l.status,bannerText:l.bannerText,timeToStartInMins:l.timeToStartInMins}}return console.error("invalid status for event :: id : "+e.event_id+", status : "+e.status),{status:a.Z.DEFAULT,bannerText:"live event",timeToStartInMins:2880}}}},3388:function(e,t,n){n.d(t,{OC:function(){return s},e8:function(){return i},kT:function(){return a},kW:function(){return o},xg:function(){return r}});const a=function(e,t){return!((void 0==e.products||0==e.products.length)&&(void 0==e.cta||0==e.cta.length))},r=function(e,t){return!(void 0==e.products||0==e.products.length)},i=function(e,t){if(null!=e)return e.filter((e=>1==a(e)))},o=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null!=e)return t?e.events[0].events:e.events};const s=function(e,t){var n;if(null==e)return[];if(!("eventsets"in e))return[];const a=null!==(n=e.eventsets[t])&&void 0!==n?n:null;return a?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(a):[]}},7376:function(e,t,n){n.d(t,{GF:function(){return r},PB:function(){return s},Z2:function(){return i},y4:function(){return o}});var a=n(733);function r(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s}=e;(0,a.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s})}function i(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s}=e;(0,a.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s})}function o(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s}=e;(0,a.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s})}function s(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s}=e;(0,a.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s})}}}]);
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[972],{3972:function(e,t,n){n.r(t),n.d(t,{default:function(){return U}});var a=n(7753),r=n(7313),i=n(2860),o=n(499),s=n(4897),l=n(5160),c=n(9854),u=n(6967),d=n(8984),h=n(58),p=n(4669),m=n(941),v=n(9039),g=n(7300),S=n(6524),I=n(7643),f=n(778),y=n(6417);const w=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(210),n.e(926),n.e(950),n.e(303),n.e(891)]).then(n.bind(n,4095)))),E=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(576),n.e(950),n.e(364),n.e(530)]).then(n.bind(n,5523)))),x=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(423),n.e(926),n.e(950),n.e(249),n.e(622)]).then(n.bind(n,3827)))),T=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(423),n.e(926),n.e(950),n.e(249),n.e(965)]).then(n.bind(n,6071)))),_=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(423),n.e(926),n.e(950),n.e(708)]).then(n.bind(n,1291)))),j=r.lazy((()=>Promise.all([n.e(302),n.e(580)]).then(n.bind(n,3580)))),M=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(576),n.e(210),n.e(955),n.e(926),n.e(303),n.e(209),n.e(790)]).then(n.bind(n,4209)))),O=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(210),n.e(926),n.e(950),n.e(959)]).then(n.bind(n,4048)))),L=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(303),n.e(554)]).then(n.bind(n,9085)))),C=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(576),n.e(950),n.e(303),n.e(364),n.e(67)]).then(n.bind(n,4362)))),b=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(576),n.e(210),n.e(955),n.e(926),n.e(303),n.e(209),n.e(196)]).then(n.bind(n,4658)))),D=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(423),n.e(926),n.e(950),n.e(84)]).then(n.bind(n,8767))));var P=function(e){const[t]=(0,a.j1)("isInDesignMode"),[n]=(0,a.j1)("isDemoBrand"),[P]=(0,a.j1)("whatmoreTopBottomPadding"),[G]=(0,a.j1)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:W}=(0,r.useContext)(v.I),[V]=(0,a.j1)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:k}=(0,r.useContext)(v.I),q=(0,a.MO)("isLandingSharedLink"),z=(0,a.MO)("whatmoreShareTemplateId"),R=(0,a.MO)("whatmoreShareStoryId"),U=(0,a.MO)("whatmoreShareEventId"),[A,F]=(0,r.useState)(-1),[N,Z]=(0,r.useState)(null);let K=e.events,B=[];if("template-banner-a"!==k){let e=0;for(let t=0;t<(null===K||void 0===K?void 0:K.length);t++){var H,Y,J,X;const n=(null===K||void 0===K||null===(H=K[t])||void 0===H||null===(Y=H.products)||void 0===Y?void 0:Y.length)>0&&(null===K||void 0===K||null===(J=K[t])||void 0===J||null===(X=J.products)||void 0===X?void 0:X.every((e=>"oos"===(null===e||void 0===e?void 0:e.product_status))));if(!(0,g.B6)(K[t])&&!(0,g.WJ)(K[t])||n){if((0,g.yC)(null===K||void 0===K?void 0:K[t])){var{status:Q,bannerText:$,timeToStartInMins:ee}=s.Z.getEventStatus(K[t]);Q.name===o.Z.LIVE.name&&(B.push({...null===K||void 0===K?void 0:K[t],index:e}),e++)}}else B.push({...null===K||void 0===K?void 0:K[t],index:e}),e++}}var te=null;function ne(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,d.KE)()&&!a&&(0,h.QV)(),t||n||(async()=>{const t=te[e].events[0];(0,l.wh)(t),(0,p.Tc)(V,i.Xh,i.OW),(0,u.H4)(t.event_id,t.products,"homepage","stories")})();var o=0;null!=r&&te[e].events.map(((e,t)=>{e.event_id==r&&(o=t)})),F(o),Z(e)}function ae(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,d.KE)()&&!a&&(0,h.QV)(),(0,g.B6)(e)||(0,g.WJ)(e))return t||n||(async()=>{(0,l.wh)(e),(0,p.Tc)(V,i.Xh,i.pR),(0,u.H4)(e.event_id,e.products,"homepage","carousel")})(),void F(e.index);const r=20;var{status:c,bannerText:m,timeToStartInMins:v}=s.Z.getEventStatus(e);v<=r&&c.name!==o.Z.LIVE.name?console.debug(" TODO : show toast on upcoming live event."):F(e.index)}function re(e){return(0,y.jsx)(y.Fragment,{})}return W&&!te&&(te=function(e){var t=e.reduce(((e,t,n)=>{var a=t.storyset_id;return a in e?(e[a].total_events=e[a].total_events+1,e[a].events.push(t)):e[a]={id:t.storyset_id,title:t.storyset_name,thumbnail_image:t.storyset_thumbnail_image,total_events:1,start_event_index:n,events:[t]},e}),{}),n=Object.values(t);return n.sort(((e,t)=>e.start_event_index-t.start_event_index)),n}(B)),(0,r.useEffect)((()=>{q&&k==(0,S.zv)(z)&&(null!=R&&W?te.forEach(((e,t)=>{R==e.id&&ne(t,!0,U)})):null!=U&&K.forEach(((e,t)=>{U==e.event_id&&ae(e,!0)})))}),[]),(0,y.jsxs)("div",{children:[(0,y.jsx)("div",{style:{marginTop:(W?G:P)+"px",marginBottom:(W?G:P)+"px"},children:"template-b"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(w,{events:B,onClick:ae,heading:e.heading})}):"template-a-1"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(E,{events:B,onClick:ae,heading:e.heading})}):"template-feed-a"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(C,{events:B,onClick:ae,heading:e.heading})}):"template-collections-a"===k||"template-c"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(x,{events:B,index:A,setScreen:F,onClick:ae,heading:e.heading})})}):"template-collections-b"===k||"template-d"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(T,{events:B,index:A,setScreen:F,onClick:ae,heading:e.heading})})}):"template-collections-c"===k||"template-e"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(_,{events:B,index:A,setScreen:F,onClick:ae,heading:e.heading})})}):"template-collections-d"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(w,{events:B,index:A,setScreen:F,onClick:ae,heading:e.heading})})}):"template-collections-e"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(O,{events:B,index:A,setScreen:F,onClick:ae,heading:e.heading})})}):"template-collections-stories"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(D,{events:B,index:A,setScreen:F,onClick:ae,heading:e.heading})})}):"template-f"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(L,{events:B,onClick:ae,heading:e.heading})})}):"template-banner-a"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.BANNER_WIDGET_VIEW,event:K[0],triggerFlag:!t&&!n,children:(0,y.jsx)(b,{events:K})})}):W?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.STORIES_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(j,{eventsStories:te,onClick:ne,template:k})})}):(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(O,{events:B,onClick:ae,heading:e.heading})})})}),-1==A||-2==A?(0,y.jsx)(re,{}):(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.EVENT_VIEW,event:K[A],productList:K[A].products,cta:K[A].cta,triggerFlag:!t&&!n,children:(0,y.jsx)(M,{events:B,index:A,onBack:function(e){(0,c.n2L)(V)&&(0,a.MO)("whatmoreAddedToCart")&&(0,m.D)(V,(()=>{}),100,window.location.hostname),F(-1)},slideDirection:W||"horizontal"===(0,c.e8z)(V)?"horizontal":"vertical",eventsStories:te,initialStoryIndex:N,template:k})})})]})};const G=function(e,t,n){const r=(0,a.MO)("whatmoreShopId");var i=t.reduce(((e,t,n)=>(t.products.map((e=>e.client_product_id)).forEach((t=>{t in e||(e[t]=!0)})),e)),{}),o=Object.keys(i);if("60960964855"==r&&"undefined"!=typeof fera&&"function"===typeof fera.getRatings){var s={};fera.getRatings(o,(e=>{new Promise(((t,n)=>{e.forEach((e=>{s[e.external_product_id]={avgRating:e.average,totalRatings:e.count}})),t(s)})).then((e=>n(e)))}))}if("23114481744"==r){const e="1e6MQXxzYR19mpw9Km6Dcm86";s={};fetch("https://api.juniphq.com/v1/products?filter[remote_ids]="+o.toString(),{headers:{"Junip-Store-Key":e}}).then((e=>e.json())).then((e=>(e.products.forEach((e=>{s[e.remote_id]={avgRating:parseFloat(e.rating_average).toFixed(1),totalRatings:e.rating_count}})),s))).then((e=>n(e))).catch((e=>console.error(e)))}};var W=n(3388),V=n(7381),k=n(7376),q=n(7008);var z=function(e){const[t,n]=(0,r.useState)(),[o,s]=(0,r.useState)(),{whatmoreIsStoriesTemplate:l}=(0,r.useContext)(v.I),{whatmoreIsCollectionsTemplate:p}=(0,r.useContext)(v.I),{whatmoreIsBannerTemplate:m}=(0,r.useContext)(v.I),[g]=(0,a.j1)("whatmoreShopId"),[I]=(0,a.j1)("whatmoreCollectionId"),w=(0,a.MO)("whatmoreLandingLocationType"),E=(0,a.MO)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:x}=(0,r.useContext)(v.I),{whatmoreCollectionUrl:T}=(0,r.useContext)(v.I),_=(0,c.cZT)(g)?(0,c._uv)(g)?T:window.location.href.split(/[?#]/)[0]:I,[j,M]=(0,a.j1)("productRatings"),[O,L]=(0,r.useState)(!1);var C=(0,c.efR)(g)?i.Dm+"/v2/events/":i.Gc+"/v2/events/",b=(0,c.efR)(g)?i.Dm+"/get_eventset/":i.Gc+"/get_eventset/",D=(0,c.efR)(g)?i.Dm+"/v2/collection":i.Gc+"/v2/collection",z=(0,c.efR)(g)?i.Dm+"/v2/brand/"+g+"/product-events":i.Gc+"/v2/brand/"+g+"/product-events",R=e.shopId,U="live,upcoming";return(0,r.useEffect)((()=>{(0,u.hb)();const e=()=>{const e="_whatmore_bulk_events",t=JSON.parse(localStorage.getItem(e))||[];t&&t.length>0&&((0,q.K)(t),localStorage.removeItem(e))};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[]),(0,r.useEffect)((()=>{null==t||0==t.length||o||!(0,d.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||(0,h.b5)(h.UD)}),[t]),(0,r.useEffect)((()=>{var e;if(w.startsWith("product")){var t=(0,a.MO)("whatmoreProductId");t=(0,c.iXA)(g)?function(e){return e.split(/[?#]/)[0]}(window.location.href):t,e=z.toString()+"?client_product_id="+t.toString()+"&status="+U.toString()+"&event_type=video"}else if(p||"invalid-url"!==T)e=D.toString()+"?store_id="+R.toString()+"&client_collection_id="+_;else if(m){const t=S.ls,n=(0,S.H1)(w);e=b.toString()+R.toString()+"?eventset_type="+t+"&source="+n+"&source_id="+g}else e=C.toString()+R.toString()+"?status="+U.toString()+"&is_active="+"true".toString()+(l?"&template_type=stories":"");fetch(e).then((e=>e.json())).then((e=>{if(m){const t=S.ls;return(0,W.OC)(e,t)}return(0,W.kW)(e,p||"invalid-url"!==T)})).then((e=>(E&&console.debug("initial received events size : "+e.length),l||m?e:(0,W.e8)(e,R)))).then((e=>(null!=e&&0!=e.length&&(0,c.LUY)(g)&&function(e,t,n){const r=setInterval((()=>{null===(0,a.MO)("productRatings")&&G(e,t,n)}),1e3);setTimeout((()=>{clearInterval(r)}),1e4)}(g,e,(e=>{M(e)})),e))).then((e=>{null==e||0==e.length||l||m||(0,c.NOv)(R,e),n(e),L(!0)})).catch((e=>{s(e.message)}))}),[]),(0,r.useEffect)((()=>{"index"===w?t&&t.length>0&&(0,k.PB)({userInteractionType:f.K.HOMEPAGE_VISITED,widgetSourceDetails:x}):"collection"===w&&(t&&t.length>0||(0,c.miB)(g))&&(0,k.PB)({userInteractionType:f.K.COLLECTION_PAGE_VISITED,widgetSourceDetails:x})}),[t]),(O&&(null==t||0==t.length)||o)&&v.$.forEach((e=>{var t,n,a,r;const i=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-stories-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-stories-a"]'),o=null!==(n=e.querySelector('.whatmore-template-type[data-wh="template-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-f"]')||e.querySelector('.whatmore-template-type[data-wh="template-e"]'))&&void 0!==n?n:e.querySelector('.whatmore-template-type[data="template-a"]')||e.querySelector('.whatmore-template-type[data="template-b"]')||e.querySelector('.whatmore-template-type[data="template-f"]')||e.querySelector('.whatmore-template-type[data="template-e"]'),s=null!==(a=e.querySelector('.whatmore-template-type[data-wh="template-collections-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-c"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-stories"]'))&&void 0!==a?a:e.querySelector('.whatmore-template-type[data="template-collections-a"]')||e.querySelector('.whatmore-template-type[data="template-collections-b"]')||e.querySelector('.whatmore-template-type[data="template-collections-c"]')||e.querySelector('.whatmore-template-type[data="template-collections-stories"]'),l=null!==(r=e.querySelector('.whatmore-template-type[data-wh="template-banner-a"]'))&&void 0!==r?r:e.querySelector('.whatmore-template-type[data="template-banner-a"]'),c=e;(l||s||o||i)&&(o&&c||i&&c||l&&c||s&&c)&&(c.style.minHeight="0px")})),null==t||0==t.length||o?(0,y.jsx)("div",{}):(E&&(0,V.EI)(t),function(e){if(null!=e){var t=0;e.forEach((e=>{e.index=t++}))}}(t),E&&console.debug("final transformed events data : "+JSON.stringify(t)),E&&console.debug("valid events size : "+t.length),(0,y.jsx)("div",{children:(0,y.jsx)(P,{heading:e.heading,events:t})},"whatmore-main-coponent"))},R=n(3933);var U=function(e){const[t]=(0,a.j1)("isInDesignMode"),[n]=(0,a.j1)("isDemoBrand"),[o]=(0,a.j1)("whatmoreShopId"),[s]=(0,a.j1)("whatmoreHeading"),[l,u]=(0,r.useState)(["initial",window.pageYOffset]),[d,h]=(0,r.useState)(!1),m=(0,a.MO)("isLandingSharedLink");(0,r.useEffect)((()=>{if((0,p.ll)(o),!(0,c.wc0)(o))return;let e=window.pageYOffset,t=!1;const n=()=>{const n=window.pageYOffset;var a,r;Math.abs(n-e)<100?t=!1:(r=!0,u(a=[n>e?"scrolled-down":"scrolled-up",n]),a[1]>100&&h(r),e=n>0?n:0,t=!1)},a=()=>{t||(window.requestAnimationFrame(n),t=!0)};return window.addEventListener("scroll",a),()=>window.removeEventListener("scroll",a)}),[]);const[v,g,S]=(0,R.YD)({triggerOnce:!0});return(0,y.jsx)("div",{ref:v,children:d||g||m||!(0,c.wc0)(o)?(0,y.jsx)("div",{children:t||n?(0,y.jsx)("div",{children:(0,y.jsx)(z,{heading:s,shopId:i.aA})}):(0,y.jsx)("div",{children:(0,y.jsx)(z,{heading:s,shopId:o})})}):(0,y.jsx)(y.Fragment,{})})}},499:function(e,t){t.Z={LIVE:{name:"LIVE",color:"gray.600"},UPCOMING:{name:"UPCOMING",color:"gray.600"},DEFAULT:{name:"LIVE EVENT",color:"gray.600"},COMPLETED:{name:"ENDED",color:"gray.600"}}},4897:function(e,t,n){var a=n(499);t.Z=class{static getEventStatus(e){e.time_zone="GMT+5:30";var t=e.start_time+":00",n=e.end_time,r=e.scheduled_date,i=e.status,o=e.time_zone;if(i.toUpperCase()==a.Z.LIVE.name)return{status:a.Z.LIVE,bannerText:" "+a.Z.LIVE.name+" ",timeToStartInMins:0};if(i.toUpperCase()==a.Z.UPCOMING.name){var s=new Date(r+" "+t+" "+o),l=(new Date(r+" "+n+" "+o),function(e){var t=new Date,n=(e.getTime()-t.getTime())/1e3,r=n/60,i=r/60,o=i/24;return n<=0?{status:a.Z.COMPLETED,bannerText:" "+a.Z.COMPLETED.name+" ",timeToStartInMins:0}:n>=1&&n<=30?{status:a.Z.UPCOMING,bannerText:"Starts in "+Math.round(n)+" sec ",timeToStartInMins:n/60}:r<60?{status:a.Z.UPCOMING,bannerText:"Starts in "+Math.round(r)+" min ",timeToStartInMins:r}:i<24?{status:a.Z.UPCOMING,bannerText:"Starts in "+Math.round(i)+" hr ",timeToStartInMins:60*i}:o<7?{status:a.Z.UPCOMING,bannerText:" "+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()]+" ",timeToStartInMins:60*o*24}:{status:a.Z.UPCOMING,bannerText:"Upcoming",timeToStartInMins:2880}}(s));return{status:l.status,bannerText:l.bannerText,timeToStartInMins:l.timeToStartInMins}}return console.error("invalid status for event :: id : "+e.event_id+", status : "+e.status),{status:a.Z.DEFAULT,bannerText:"live event",timeToStartInMins:2880}}}},3388:function(e,t,n){n.d(t,{OC:function(){return s},e8:function(){return i},kT:function(){return a},kW:function(){return o},xg:function(){return r}});const a=function(e,t){return!((void 0==e.products||0==e.products.length)&&(void 0==e.cta||0==e.cta.length))},r=function(e,t){return!(void 0==e.products||0==e.products.length)},i=function(e,t){if(null!=e)return e.filter((e=>1==a(e)))},o=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null!=e)return t?e.events[0].events:e.events};const s=function(e,t){var n;if(null==e)return[];if(!("eventsets"in e))return[];const a=null!==(n=e.eventsets[t])&&void 0!==n?n:null;return a?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(a):[]}},7376:function(e,t,n){n.d(t,{GF:function(){return r},PB:function(){return s},Z2:function(){return i},y4:function(){return o}});var a=n(733);function r(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s}=e;(0,a.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s})}function i(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s}=e;(0,a.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s})}function o(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s}=e;(0,a.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s})}function s(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s}=e;(0,a.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s})}}}]);