whatmore-react-assets 1.0.560 → 1.0.561

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.560",
3
+ "version": "1.0.561",
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([[196,790,12],{1332:function(t,e,n){var o=n(7313),a=(n(8743),n(7753)),r=n(5254),c=n(6417);e.Z=function(t){return(0,o.useEffect)((()=>{const t=(0,r.oo)((0,a.MO)("whatmoreSecondaryColor"));!function(t,e,n,o){const a="rgba(".concat(t,",").concat(e,",").concat(n,",").concat(o,")"),r="\n @keyframes whatmore-loading-indicator-keyframe {\n 0%,\n 100% {\n box-shadow: 0em -2.6em 0em 0em ".concat(a,", 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7);\n }\n 12.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), 1.8em -1.8em 0 0em ").concat(a,", 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5);\n }\n 25% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), 2.5em 0em 0 0em ").concat(a,", 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2);\n }\n 37.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), 1.75em 1.75em 0 0em ").concat(a,", 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2);\n }\n 50% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), 0em 2.5em 0 0em ").concat(a,", -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2);\n }\n 62.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), -1.8em 1.8em 0 0em ").concat(a,", -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2);\n }\n 75% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), -2.6em 0em 0 0em ").concat(a,", -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2);\n }\n 87.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), -1.8em -1.8em 0 0em ").concat(a,";\n }\n }\n "),c=document.createElement("style");c.type="text/css",c.innerHTML=r,document.head.appendChild(c)}(t[0],t[1],t[2],.2)}),[]),(0,c.jsx)(c.Fragment,{children:(0,c.jsx)("span",{className:"whatmore-loading-indicator"})})}},4658:function(t,e,n){n.r(e),n.d(e,{default:function(){return L}});var o=n(7313),a=n(6090),r=n(7616),c=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),i=n(2575),s=n(7129),l=n(9039),d=(n(3439),n(7753)),m=n(7931),h=n(9018),u=n(9854),p=n(3933),g=n(8866),f=n(868),v=n(342),x=n(3437),y=n(3455),b=n(6417);var w=function(t){var e;const n=t.isMuted,o=null!==(e=t.iconSize)&&void 0!==e?e:30;function a(){t.onToggle()}return(0,b.jsx)("div",{style:{cursor:"pointer"},children:n?(0,b.jsx)(y.Z,{sx:{color:"white",fontSize:o,filter:"drop-shadow(0 0 5px black);"},onClick:()=>{a()}}):(0,b.jsx)(x.Z,{sx:{color:"white",fontSize:o,filter:"drop-shadow(0 0 5px black);"},onClick:()=>{a()}})})},j=n(1896),C=n(8984),I=n(58),P=n(6119),k=n(7376),S=n(778),z=n(3433);function Z(t){const[e,n]=(0,o.useState)(t.initialMuteState),a=t.events,r=t.activeEventIndex,c=t.setActiveEventIndex,i=(0,d.MO)("whatmoreShopId"),s="portrait"===t.mode;function l(){(0,u.hr)(i)&&t.isCTAPresent||(n(!e),(0,C.KE)()&&(0,I.QV)(),t.onMuteToggle())}const p=t.event;return(0,b.jsx)("div",{style:{position:(0,u.SJ)(i)?"absolute":"relative",top:(0,u.SJ)(i)?0:"",zIndex:1,bottom:(0,u.SJ)(i)?"":"100%",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,b.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:[(0,b.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"space-between",alignItems:"center",width:"100%",paddingRight:"1%",paddingLeft:"1%",paddingTop:"1%",backgroundImage:"linear-gradient(to top, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0.3))"},children:[!(t.isCTAPresent&&(0,u.hr)(i)||"video"!==p.event_type)&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:{width:"100%",height:"100%"},onClick:()=>l()}),(0,b.jsx)(w,{isMuted:e,onToggle:()=>{l()}})]}),a.length>1&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:{position:"absolute",left:"10px",top:"50%",transform:"translateY(-50%)",backgroundColor:"transparent",borderRadius:"50%",zIndex:2,border:"2px solid white",padding:"2px",cursor:"pointer"},onClick:t=>{t.stopPropagation(),c(0===r?a.length-1:r-1)},children:(0,b.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:"6px"},children:(0,b.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"20px",color:"#252525",height:"20px"},children:(0,b.jsx)(m.Z,{})})})}),(0,b.jsx)("div",{style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",backgroundColor:"transparent",borderRadius:"50%",zIndex:2,border:"2px solid white",padding:"2px",cursor:"pointer"},onClick:t=>{t.stopPropagation(),c(r===a.length-1?0:r+1)},children:(0,b.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:"6px"},children:(0,b.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"20px",color:"#252525",height:"20px",textAlign:"center"},children:(0,b.jsx)(h.Z,{})})})}),(0,u.cRS)(i)&&(0,b.jsx)("div",{style:{display:"flex",position:"absolute",bottom:"7%",left:"50%",transform:"translateX(-50%)",gap:"24px",zIndex:1},children:a.map(((t,e)=>{const n=e===r;return(0,b.jsx)("button",{onClick:t=>{t.stopPropagation(),c(e)},style:{width:n?"25px":s?"12px":"14px",height:s?"12px":"14px",borderRadius:n?"10px":"50%",backgroundColor:n?(0,u.YFz)(i):"#f8eeec",boxShadow:"0px 0px 8px rgba(0, 0, 0, 0.3)"}},e)}))})]})]}),(0,b.jsx)("div",{style:{width:"100%",height:"100%"},onClick:()=>l()})]})})}var M=function(t){var e,n;const[a,r,c]=(0,g.Z)(),[i,s]=(0,o.useState)(!0),{whatmoreUITheme:m}=(0,o.useContext)(l.I),h=(0,d.MO)("whatmoreVideoTileSize"),{ref:x,inView:y,entry:w}=(0,p.YD)({triggerOnce:!1}),{whatmoreWidgetSourceDetails:C}=(0,o.useContext)(l.I),I=(0,d.MO)("whatmoreShopId"),M=t.events,E=t.activeEventIndex,L=t.setActiveEventIndex,R=M[E],F=((0,u.nzC)(I),(0,v.uv)(R)),N=(0,v.WN)(R);if("portrait"===a&&!F)return console.log("enter"),(0,b.jsx)(b.Fragment,{});if("landscape"===a&&!N)return console.log("enter"),(0,b.jsx)(b.Fragment,{});const T=(0,f.V)("portrait"===a?F:N),A=h/100*(0,u.b4p)(I),O=h/100*(0,u.GmU)(I),W="portrait"===a?(0,u.oOc)(I):(0,u.snl)(I),D="portrait"===a?c*A:c*O,V=D*W,_=null!=(null===(e=R.cta)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.cta_link);return(0,o.useEffect)((()=>{l.$.forEach((t=>{var e;if(!(null!==(e=t.querySelector('.whatmore-template-type[data-wh="template-banner-a"]'))&&void 0!==e?e:t.querySelector('.whatmore-template-type[data="template-banner-a"]')))return;const n=t.querySelector(".whatmore-render-root");n&&(n.style.minHeight="0px")}))}),[]),(0,b.jsxs)("div",{ref:x,onClick:()=>{var t,e;(0,k.GF)({userInteractionType:S.K.BANNER_WIDGET_CLICKED,widgetSourceDetails:C,event:M[E]}),(0,u.hr)(I)&&_&&!(0,u.j1_)(I)&&window.open(null===(t=R.cta)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.cta_link,"_self")},style:{position:"relative",margin:"0 auto",width:(0,u.SJ)(I)?"100%":D,minHeight:(0,u.SJ)(I)?c*W:"",height:(0,u.SJ)(I)?"auto":V,borderWidth:(0,u.alU)(I),borderColor:(0,u.qPe)(I),overflow:"hidden",cursor:"pointer"},children:[(0,b.jsx)(j.Z,{height:"100%",width:"100%",url:T,isPlaying:y,event:R,isVideoMuted:i,setDuration:t.setDuration,source:z.j.BANNER}),(0,b.jsx)(Z,{isCTAPresent:_,events:M,activeEventIndex:E,setActiveEventIndex:L,event:R,mode:a,onMuteToggle:()=>s(!i),initialMuteState:i}),(0,u.j1_)(I)&&(0,b.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"portrait"===a?"12%":"20%"},className:"whatmore-ios-css-relative-fix",children:(0,b.jsx)("div",{children:(0,b.jsx)(P.Z,{event:R,cta:R.cta[0],fontFactor:.6})})})]})};const E=(0,i.Z)({key:"whatmore-css-bv"});var L=function(t){const{whatmoreRootId:e}=(0,o.useContext)(l.I),[n,i]=(0,o.useState)(0),d=t.events,[m,h]=(0,o.useState)(-1);let u;return(0,o.useEffect)((()=>{u&&clearInterval(u);const t="video"===d[n].event_type,e=t?1e3*m:6e3;return t?-1!=m&&(u=setInterval((()=>{i((t=>t===d.length-1?0:t+1))}),e)):u=setInterval((()=>{i((t=>t===d.length-1?0:t+1))}),e),()=>{clearInterval(u)}}),[m,n]),delete r.ZP.styles.global,(0,b.jsx)(c.C,{value:E,children:(0,b.jsx)("div",{children:(0,b.jsx)(a.x,{theme:r.ZP,cssVarsRoot:e,resetCSS:!1,children:(0,b.jsx)(s.V.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:(0,b.jsx)(M,{activeEventIndex:n,events:d,setActiveEventIndex:i,setDuration:h})})})})})}},3867:function(t,e,n){var o=n(8816),a=n(417),r=n(4885),c=n(7753),i=n(9039),s=n(7313),l=n(6417);e.Z=function(t){var e;const{whatmoreUITheme:n}=(0,s.useContext)(i.I),[d]=(0,c.j1)("whatmoreSecondaryColor"),[m,h]=(0,c.j1)("productRatings"),u=(0,c.MO)("whatmorePrimaryFont"),p=(t.storeId,t.productId),g=(t.productLink,t.fontSize),f=null!==(e=t.fontColor)&&void 0!==e?e:"gray";if(null===m||"undefined"==typeof m||!(p in m)||m[p].avgRating>5)return(0,l.jsx)(l.Fragment,{});const v=m[p].avgRating,x=m[p].totalRatings;return(0,l.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,l.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center",gap:"0px"},children:[[...Array(Math.floor(v))].map(((t,e)=>(0,l.jsx)(o.Z,{sx:{color:d,fontSize:g+"px"}},"star-icon"+e))),v-Math.floor(v)>.2?(0,l.jsx)(a.Z,{sx:{color:d,fontSize:g+"px"}},"star-half-icon"):v-Math.floor(v)==0?(0,l.jsx)(l.Fragment,{}):(0,l.jsx)(r.Z,{sx:{color:d,fontSize:g+"px"}},"star-outline-icon"),[...Array(Math.floor(5-v))].map(((t,e)=>(0,l.jsx)(r.Z,{sx:{color:d,fontSize:g+"px"}},"star-outline-icon-"+e))),(0,l.jsx)("div",{children:(0,l.jsx)("div",{width:"2px"})}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{style:{backgroundColor:d,borderRadius:"round"==n?"2px":"0px",padding:"1px",overflow:"hidden"},children:(0,l.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color","white","important"),t.style.setProperty("font-size",.8*g+"px","important"),t.style.setProperty("font-family",u,"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"))},style:{textAlign:"left",fontWeight:"medium"},children:["\xa0",v,"\xa0"]})})}),(0,l.jsx)("div",{children:(0,l.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color",f,"important"),t.style.setProperty("font-size",.8*g+"px","important"),t.style.setProperty("font-family",u,"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"))},style:{textAlign:"left",fontWeight:"medium"},children:["\xa0","("+x+")"]})})]})})}},7129:function(t,e,n){n.d(e,{V:function(){return o}});const o=(0,n(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},3175:function(t,e,n){var o=n(1332),a=n(5180),r=n(6417);e.Z=function(t){var e,n;const c=null!==(e=t.height)&&void 0!==e?e:"100%",i=null!==(n=t.width)&&void 0!==n?n:"100%";return(0,r.jsxs)("div",{style:{width:i,height:c,overflow:"hidden",minHeight:c,minWidth:i},children:[(0,r.jsx)(a.Z,{height:c,width:i}),(0,r.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignContent:"center",width:"100%",height:"100%",position:"relative",zIndex:1,bottom:"100%",className:"whatmore-ios-css-relative-fix"},children:(0,r.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",width:"100%",height:"fit-content"},children:(0,r.jsx)(o.Z,{})})})]})}},5180:function(t,e,n){var o=n(6417);e.Z=function(t){var e,n,a;const r=null!==(e=t.height)&&void 0!==e?e:"100%",c=null!==(n=t.width)&&void 0!==n?n:"100%",i=null!==(a=t.borderRadius)&&void 0!==a?a:"10px";return(0,o.jsx)("div",{style:{height:r,width:r,borderRadius:i,overflow:"hidden",minHeight:r,minWidth:c,maxHeight:r,maxWidth:c},children:(0,o.jsx)("div",{style:{minHeight:r,minWidth:c},height:"100%",width:"100%",className:"whatmore-shimmer"})})}},2887:function(t,e,n){var o=n(7313),a=n(3175),r=n(6417);e.Z=function(t){var e,n,c;const[i,s]=(0,o.useState)(!1),l=o.useRef(0),d=(0,o.useRef)(null),m=null!==(e=t.timeUpdateCallback)&&void 0!==e?e:()=>{},h=null!==(n=t.height)&&void 0!==n?n:"100%",u=null!==(c=t.width)&&void 0!==c?c:"100%";return(0,o.useEffect)((()=>{l.current=0;const t=setInterval((()=>{l.current=l.current+.03,d.current&&m(l.current,5),l.current>=5&&(l.current=0)}),30);return()=>{clearInterval(t)}}),[t.isPlaying]),(0,r.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:u,height:h,overflow:"hidden"},children:[(0,r.jsx)("div",{style:{width:i?"100%":"0px",height:i?"100%":"0px"},children:(0,r.jsx)("img",{ref:d,src:t.url,style:{objectFit:"cover",height:h,width:u,backgroundColor:"white"},alt:"image player",onLoad:()=>{s(!0)}})}),i?(0,r.jsx)(r.Fragment,{}):(0,r.jsx)(a.Z,{width:u,height:h})]})}},4892:function(t,e,n){n.d(e,{Z:function(){return h}});var o=n(7313),a=n(3933),r=n(868),c=n(8984),i=n(7300),s=n(2887),l=n(4862),d=n(6417);var m=function(t){var e,n;const r=(0,o.useRef)(null),[c,i,s]=(0,a.YD)({triggerOnce:!0}),m=null!==(e=t.height)&&void 0!==e?e:"100%",h=null!==(n=t.width)&&void 0!==n?n:"100%";return(0,o.useEffect)((()=>{r.current&&(t.isPlaying?r.current.play():(l.G6&&r.current.play(),r.current.pause()))}),[t.isPlaying,i]),(0,d.jsx)("div",{ref:c,style:{width:m,height:h,overflow:"hidden"},children:i?(0,d.jsx)("video",{ref:r,className:"whatmore-video-player",width:h,height:m,preload:"metadata",loop:!0,playsInline:!0,poster:t.isPlaying?t.url:"",muted:!0,src:t.url,style:{backgroundColor:"white"}}):(0,d.jsx)("div",{width:h,height:m,ref:t=>{t&&t.style.setProperty("display","block","important")}})})};var h=function(t){var e,n,l;const[h,u,p]=(0,a.YD)({triggerOnce:!0});if((0,i.WJ)(t.event))return(0,d.jsx)(s.Z,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback});const g=null!==(e=t.pauseFromPlayTimeInMs)&&void 0!==e?e:200;if((0,c.KE)())return(0,d.jsx)(m,{height:"100%",width:"100%",url:(0,r.V)(t.url),isPlaying:t.isPlaying,pauseFromPlayTimeInMs:g});const f=(0,o.useRef)(null),v=null!==(n=t.height)&&void 0!==n?n:"100%",x=null!==(l=t.width)&&void 0!==l?l:"100%";return(0,o.useEffect)((()=>{f.current&&(t.isPlaying?f.current.play():f.current.pause())}),[t.isPlaying,u]),(0,d.jsx)("div",{ref:h,style:{width:v,height:x,overflow:"hidden"},children:u?(0,d.jsx)("video",{ref:f,className:"whatmore-video-player",width:x,height:v,preload:"metadata",loop:!0,playsInline:!0,muted:!0,src:(0,r.V)(t.url),style:{backgroundColor:"white"}}):(0,d.jsx)("div",{width:x,height:v,ref:t=>{t&&t.style.setProperty("display","block","important")}})})}},868:function(t,e,n){n.d(e,{V:function(){return i}});var o=n(9854),a=n(7753);const r={"https://d3syezql093hs1.cloudfront.net":"https://whatmore-brand-video-assets.azureedge.net","https://d2r0bijhs9mx1s.cloudfront.net":"https://whatmore-brand-thumbnail-video-assets.azureedge.net","https://d2oouab8j9eigo.cloudfront.net":"https://whatmore-brand-story-assets.azureedge.net","https://d28nus7q7qajdn.cloudfront.net":"https://whatmore-video-assets.azureedge.net","https://d1zl4k1t5o4s75.cloudfront.net":"https://whatmore-brand-video-assets-720p.azureedge.net"},c={"https://d3syezql093hs1.cloudfront.net":"https://whatmore-brand-video-assets.b-cdn.net","https://d2r0bijhs9mx1s.cloudfront.net":"https://whatmore-brand-thumbnail-video-assets.b-cdn.net","https://d2oouab8j9eigo.cloudfront.net":"https://whatmore-brand-story-assets.b-cdn.net","https://d28nus7q7qajdn.cloudfront.net":"https://whatmore-video-assets-old.b-cdn.net","https://d1zl4k1t5o4s75.cloudfront.net":"https://whatmore-brand-video-assets-720p.b-cdn.net"},i=function(t){const e=(0,a.MO)("whatmoreShopId");if(!t)return t;if(t.startsWith("https://cdn.shopify.com"))return t;if("AWSCDN"==(0,o.zpr)(e))return t;if("AZURECDN"==(0,o.zpr)(e)){if(t.includes(".azureedge.net"))return t;if(t.includes(".cloudfront.net")){for(const e of Object.keys(r))if(t.includes(e))return t.replace(e,r[e]);return t}}if("BUNNYCDN"==(0,o.zpr)(e)){if(t.includes(".b-cdn.net"))return t;if(t.includes(".cloudfront.net")){for(const e of Object.keys(c))if(t.includes(e))return t.replace(e,c[e]);return t}}return t}},9363:function(t,e,n){n.d(e,{s:function(){return r}});var o=n(9854),a=n(7753);function r(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=(0,a.MO)("whatmoreShopId");return"shopify"!=(0,o.Ipo)(n)?t:t+e}},5456:function(t,e,n){n.d(e,{B:function(){return o}});const o=function(t,e){return!(isNaN(e)||!e||("string"===typeof e||e instanceof String)&&!e.trim().length)&&!(parseInt(e)<=parseInt(t))}},8866:function(t,e,n){var o=n(7313);function a(){return[window.innerHeight,window.innerWidth]}e.Z=function(t){var[e,n]=a();const[r,c]=(0,o.useState)([e>n?"portrait":"landscape",e,n]);return(0,o.useLayoutEffect)((()=>{function t(){var[t,e]=a();c(t>e?["portrait",t,e]:["landscape",t,e])}return window.addEventListener("resize",t),window.addEventListener("orientationchange",t),screen.orientation&&screen.orientation.addEventListener("change",t),t(),()=>{window.removeEventListener("resize",t),window.removeEventListener("orientationchange",t),screen.orientation&&screen.orientation.removeEventListener("change",t)}}),[]),r}},7931:function(t,e,n){var o=n(5318);e.Z=void 0;var a=o(n(5045)),r=n(6417),c=(0,a.default)((0,r.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore");e.Z=c},9018:function(t,e,n){var o=n(5318);e.Z=void 0;var a=o(n(5045)),r=n(6417),c=(0,a.default)((0,r.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext");e.Z=c},9723:function(t,e,n){var o=n(5318);e.Z=void 0;var a=o(n(5045)),r=n(6417),c=(0,a.default)((0,r.jsx)("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82z"}),"PlayArrowRounded");e.Z=c},8816:function(t,e,n){var o=n(5318);e.Z=void 0;var a=o(n(5045)),r=n(6417),c=(0,a.default)((0,r.jsx)("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star");e.Z=c},417:function(t,e,n){var o=n(5318);e.Z=void 0;var a=o(n(5045)),r=n(6417),c=(0,a.default)((0,r.jsx)("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarHalf");e.Z=c},4885:function(t,e,n){var o=n(5318);e.Z=void 0;var a=o(n(5045)),r=n(6417),c=(0,a.default)((0,r.jsx)("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarOutline");e.Z=c},8743:function(){},3439:function(){},123:function(){},7244:function(){},5892:function(){},4444:function(){},1811:function(){},7850:function(){}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[358],{3827:function(e,t,n){n.r(t);var o=n(7313),i=n(6090),r=n(7616),l=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),a=n(2575),s=n(8866),d=n(7753),p=n(7129),x=n(9039),c=n(8631),h=n(6066),u=n(8782),m=n(9821),f=(n(8984),n(7381)),v=n(6417);const g=(0,a.Z)({key:"whatmore-css-cv"});t.default=function(e){const t=e.events,[n,a,w]=(0,s.Z)(),[y,j,b,C,E]=(0,m.Z)(),[S,k]=(0,o.useState)(Array(t.length).fill(0).map((()=>Math.random()))),L=(0,d.MO)("whatmoreCollectionsTileSize"),R="portrait"==n?0:(0,d.MO)("whatmoreLandscapePadding"),M=(0,d.MO)("whatmoreCollectionsTilesSpacing"),{whatmoreRootId:Z}=(0,o.useContext)(x.I),B=e.onClick;function A(e){B(e)}(0,o.useEffect)((()=>{(0,f.Oo)("Video shopping powered by Whatmore!")}),[]),delete r.ZP.styles.global;var P=[];for(let o=0,i=!1;o<t.length;)i&&o!=t.length-1&&S[o]>.2?(P.push((0,v.jsx)(h.Z,{event1:t[o],event2:t[o+1],onClick:()=>{A(t[o-1])}},"collections-tile-"+o)),o+=2,i=!i):(P.push((0,v.jsx)(c.Z,{event:t[o],onClick:()=>{A(t[o-1])},borderRadius:"10%",removeBorders:!1},"collections-tile-"+o)),o+=1,i=!i);return(0,o.useEffect)((()=>{x.$.forEach((e=>{var t;if(!(null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-collections-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-collections-a"]')))return;const n=e.querySelector(".whatmore-render-root");n&&(n.style.minHeight="0px")}))}),[]),(0,v.jsx)(l.C,{value:g,children:(0,v.jsx)("div",{children:(0,v.jsx)(i.x,{theme:r.ZP,cssVarsRoot:Z,resetCSS:!1,children:(0,v.jsx)(p.V.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:(0,v.jsx)("div",{style:{marginLeft:R+"px",marginRight:R+"px"},children:(0,v.jsx)(u.P,{renderElement:e=>(0,v.jsx)(v.Fragment,{children:e.eventData}),dataList:P,spacing:M,defaultHeight:y*L*.01+"px",defaultWidth:j*L*.01+"px",retainAlreadyRenderedElements:!0})})})})})})}},7129:function(e,t,n){n.d(t,{V:function(){return o}});const o=(0,n(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},8631:function(e,t,n){var o=n(7313),i=n(9854),r=n(7753),l=(n(9111),n(123),n(9778),n(4892)),a=n(7129),s=n(9821),d=n(6417);t.Z=function(e){var t;const[n,p,x,c,h]=(0,s.Z)(),[u]=(0,r.j1)("whatmoreSecondaryColor"),[m]=(0,r.j1)("whatmoreShopId"),[f]=(0,r.j1)("whatmoreCollectionsTileSize"),[v,g]=(0,o.useState)(!1),w=(0,i.f63)(m);(0,o.useContext)(a.V);const y=e.event,j=e.onClick,b=e.removeBorders,C=n*f*.01,E=p*f*.01,S=null!==(t=e.borderRadius)&&void 0!==t?t:"0%";return(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:E+"px",marginLeft:b?"2px":"5px",marginRight:b?"2px":"5px",marginTop:b?"2px":"5px",marginBottom:b?"2px":"5px",cursor:"pointer"},onClick:()=>{g(!0),j(y)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:S,overflow:"hidden",boxShadow:b?"":"0px 1px 1px 0px "+u+"50, 0px -1px 1px 0px "+w+"50, 1px 0px 1px 0px "+u+"50, -1px 0px 1px 0px "+w+"80, 1px -1px 1px 0px "+u+"80, -1px 1px 1px 0px "+w+"DA, 1px 1px 1px 0px "+u+"DA, -1px -1px 1px 0px "+w+"DA"},children:(0,d.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:C+"px",width:E+"px",borderRadius:S,backgroundColor:"gray",overflow:"hidden"},children:(0,d.jsx)(l.Z,{height:"100%",width:"100%",url:y.thumbnail_image,isPlaying:!0,event:y})})})})}},6066:function(e,t,n){var o=n(7313),i=n(9854),r=n(7753),l=(n(9111),n(123),n(9778),n(4892)),a=n(7129),s=n(9821),d=n(6417);t.Z=function(e){var t;const[n,p,x,c,h]=(0,s.Z)(),[u]=(0,r.j1)("whatmoreSecondaryColor"),[m]=(0,r.j1)("whatmoreShopId"),[f]=(0,r.j1)("whatmoreCollectionsTileSize"),[v,g]=(0,o.useState)(!1),w=(0,i.f63)(m);(0,o.useContext)(a.V);const y=e.event1,j=e.event2,b=e.onClick,C=.01*f,E=n*C,S=n*C*.5,k=p*C,L=null!==(t=e.borderRadius)&&void 0!==t?t:"10%",R="15%",M=e.removeBorders;return(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",flexShrink:0,height:E+"px",width:k+"px",marginLeft:M?"2px":"5px",marginRight:M?"2px":"5px",marginTop:M?"2px":"5px",marginBottom:M?"2px":"5px",cursor:"pointer"},children:(0,d.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:M?"0px":L,boxShadow:M?"":"0px 1px 1px 0px "+u+"50, 0px -1px 1px 0px "+w+"50, 1px 0px 1px 0px "+u+"50, -1px 0px 1px 0px "+w+"80, 1px -1px 1px 0px "+u+"80, -1px 1px 1px 0px "+w+"DA, 1px 1px 1px 0px "+u+"DA, -1px -1px 1px 0px "+w+"DA"},onClick:()=>{g(!0),b(y)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:[(0,d.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:S+"px",width:k+"px",borderTopLeftRadius:M?"0px":R,borderTopRightRadius:M?"0px":R,borderBottom:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,d.jsx)(l.Z,{height:"100%",width:"100%",url:y.thumbnail_image,isPlaying:!0,event:y})}),(0,d.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:S+"px",width:k+"px",borderBottomLeftRadius:M?"0px":R,borderBottomRightRadius:M?"0px":R,borderTop:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,d.jsx)(l.Z,{height:"100%",width:"100%",url:j.thumbnail_image,isPlaying:!0,event:j})})]})})}},8782:function(e,t,n){n.d(t,{P:function(){return a}});var o=n(3933),i=n(7313),r=(n(123),n(6417));function l(e){const{ref:t,inView:n,entry:i}=(0,o.YD)({triggerOnce:e.retainAlreadyRenderedElements});return(0,r.jsx)("div",{ref:t,children:n?e.renderElement({eventData:e.data}):(0,r.jsx)("div",{style:{minWidth:e.defaultHeight,minHeight:e.defaultWidth}})})}function a(e){var t;return(0,i.useEffect)((()=>{const e=document.querySelector(".whatmore-carousel-horizontal-flex");let t,n=!1;function o(e){e.touches&&(null===e||void 0===e?void 0:e.touches.length)>0?(n=!0,t=e.touches[0].clientX):(n=!0,t=e.clientX)}function i(o){if(!n)return;const i=o.touches?o.touches[0].clientX:o.clientX;e.style.pointerEvents="none";const r=2*(t-i);e.scrollLeft+=r,t=i}function r(t){e.style.pointerEvents="auto",n=!1}return e&&("ontouchstart"in window&&(e.addEventListener("touchstart",o),e.addEventListener("touchmove",i),e.addEventListener("touchend",r)),e.addEventListener("mousedown",o),document.addEventListener("mousemove",i),document.addEventListener("mouseup",r)),()=>{e&&("ontouchstart"in window&&(e.removeEventListener("touchstart",o),e.removeEventListener("touchmove",i),e.removeEventListener("touchend",r)),e.removeEventListener("mousedown",o),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",r))}}),[]),(0,r.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",height:"fit-content",width:"100%",gap:null!==(t=e.spacing)&&void 0!==t?t:3},className:"whatmore-carousel-horizontal-flex",children:e.dataList.map(((t,n)=>(0,r.jsx)(l,{renderElement:e.renderElement,data:t,defaultHeight:e.defaultHeight,defaultWidth:e.defaultWidth,retainAlreadyRenderedElements:e.retainAlreadyRenderedElements},"key-"+n)))})}},9111:function(){},5892:function(){},4444:function(){},1811:function(){},6143:function(){},7850:function(){},9778:function(){}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[607],{6071:function(e,t,n){n.r(t);var o=n(7313),i=n(6090),r=n(7616),l=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),a=n(2575),s=(n(8984),n(8866)),d=n(7753),p=n(7129),x=n(9039),c=n(8631),h=n(6066),u=n(8782),m=n(9821),f=(n(4862),n(7381)),v=n(6417);const g=(0,a.Z)({key:"whatmore-css-cv"});t.default=function(e){const t=e.events,[n,a,w]=(0,s.Z)(),[y,j]=(0,o.useState)(Array(t.length).fill(0).map((()=>Math.random()))),[b,C,E,S,k]=(0,m.Z)(),L=(0,d.MO)("whatmoreCollectionsTileSize"),R="portrait"==n?0:(0,d.MO)("whatmoreLandscapePadding"),M=(0,d.MO)("whatmoreCollectionsTilesSpacing"),{whatmoreRootId:Z}=(0,o.useContext)(x.I),B=e.onClick;function A(e){B(e)}delete r.ZP.styles.global;var P=[];for(let o=0,i=!1;o<t.length;)i&&o!=t.length-1&&y[o]>.2?(P.push((0,v.jsx)(h.Z,{event1:t[o],event2:t[o+1],onClick:()=>{A(t[o-1])},removeBorders:!0},"collections-tile-"+o)),o+=2,i=!i):(P.push((0,v.jsx)(c.Z,{event:t[o],onClick:()=>{A(t[o-1])},removeBorders:!0,borderRadius:"0%"},"collections-tile-"+o)),o+=1,i=!i);return(0,o.useEffect)((()=>{(0,f.Oo)("Video shopping powered by Whatmore!")}),[]),(0,o.useEffect)((()=>{x.$.forEach((e=>{var t;if(!(null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-collections-b"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-collections-b"]')))return;const n=e.querySelector(".whatmore-render-root");n&&(n.style.minHeight="0px")}))}),[]),(0,v.jsx)(l.C,{value:g,children:(0,v.jsx)("div",{children:(0,v.jsx)(i.x,{theme:r.ZP,cssVarsRoot:Z,resetCSS:!1,children:(0,v.jsx)(p.V.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:(0,v.jsx)("div",{style:{marginLeft:R+"px",marginRight:R+"px"},children:(0,v.jsx)(u.P,{renderElement:e=>(0,v.jsx)(v.Fragment,{children:e.eventData}),dataList:P,spacing:M,defaultHeight:b*L*.01+"px",defaultWidth:C*L*.01+"px",retainAlreadyRenderedElements:!0})})})})})})}},7129:function(e,t,n){n.d(t,{V:function(){return o}});const o=(0,n(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},8631:function(e,t,n){var o=n(7313),i=n(9854),r=n(7753),l=(n(9111),n(123),n(9778),n(4892)),a=n(7129),s=n(9821),d=n(6417);t.Z=function(e){var t;const[n,p,x,c,h]=(0,s.Z)(),[u]=(0,r.j1)("whatmoreSecondaryColor"),[m]=(0,r.j1)("whatmoreShopId"),[f]=(0,r.j1)("whatmoreCollectionsTileSize"),[v,g]=(0,o.useState)(!1),w=(0,i.f63)(m);(0,o.useContext)(a.V);const y=e.event,j=e.onClick,b=e.removeBorders,C=n*f*.01,E=p*f*.01,S=null!==(t=e.borderRadius)&&void 0!==t?t:"0%";return(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:E+"px",marginLeft:b?"2px":"5px",marginRight:b?"2px":"5px",marginTop:b?"2px":"5px",marginBottom:b?"2px":"5px",cursor:"pointer"},onClick:()=>{g(!0),j(y)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:S,overflow:"hidden",boxShadow:b?"":"0px 1px 1px 0px "+u+"50, 0px -1px 1px 0px "+w+"50, 1px 0px 1px 0px "+u+"50, -1px 0px 1px 0px "+w+"80, 1px -1px 1px 0px "+u+"80, -1px 1px 1px 0px "+w+"DA, 1px 1px 1px 0px "+u+"DA, -1px -1px 1px 0px "+w+"DA"},children:(0,d.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:C+"px",width:E+"px",borderRadius:S,backgroundColor:"gray",overflow:"hidden"},children:(0,d.jsx)(l.Z,{height:"100%",width:"100%",url:y.thumbnail_image,isPlaying:!0,event:y})})})})}},6066:function(e,t,n){var o=n(7313),i=n(9854),r=n(7753),l=(n(9111),n(123),n(9778),n(4892)),a=n(7129),s=n(9821),d=n(6417);t.Z=function(e){var t;const[n,p,x,c,h]=(0,s.Z)(),[u]=(0,r.j1)("whatmoreSecondaryColor"),[m]=(0,r.j1)("whatmoreShopId"),[f]=(0,r.j1)("whatmoreCollectionsTileSize"),[v,g]=(0,o.useState)(!1),w=(0,i.f63)(m);(0,o.useContext)(a.V);const y=e.event1,j=e.event2,b=e.onClick,C=.01*f,E=n*C,S=n*C*.5,k=p*C,L=null!==(t=e.borderRadius)&&void 0!==t?t:"10%",R="15%",M=e.removeBorders;return(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",flexShrink:0,height:E+"px",width:k+"px",marginLeft:M?"2px":"5px",marginRight:M?"2px":"5px",marginTop:M?"2px":"5px",marginBottom:M?"2px":"5px",cursor:"pointer"},children:(0,d.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:M?"0px":L,boxShadow:M?"":"0px 1px 1px 0px "+u+"50, 0px -1px 1px 0px "+w+"50, 1px 0px 1px 0px "+u+"50, -1px 0px 1px 0px "+w+"80, 1px -1px 1px 0px "+u+"80, -1px 1px 1px 0px "+w+"DA, 1px 1px 1px 0px "+u+"DA, -1px -1px 1px 0px "+w+"DA"},onClick:()=>{g(!0),b(y)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:[(0,d.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:S+"px",width:k+"px",borderTopLeftRadius:M?"0px":R,borderTopRightRadius:M?"0px":R,borderBottom:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,d.jsx)(l.Z,{height:"100%",width:"100%",url:y.thumbnail_image,isPlaying:!0,event:y})}),(0,d.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:S+"px",width:k+"px",borderBottomLeftRadius:M?"0px":R,borderBottomRightRadius:M?"0px":R,borderTop:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,d.jsx)(l.Z,{height:"100%",width:"100%",url:j.thumbnail_image,isPlaying:!0,event:j})})]})})}},8782:function(e,t,n){n.d(t,{P:function(){return a}});var o=n(3933),i=n(7313),r=(n(123),n(6417));function l(e){const{ref:t,inView:n,entry:i}=(0,o.YD)({triggerOnce:e.retainAlreadyRenderedElements});return(0,r.jsx)("div",{ref:t,children:n?e.renderElement({eventData:e.data}):(0,r.jsx)("div",{style:{minWidth:e.defaultHeight,minHeight:e.defaultWidth}})})}function a(e){var t;return(0,i.useEffect)((()=>{const e=document.querySelector(".whatmore-carousel-horizontal-flex");let t,n=!1;function o(e){e.touches&&(null===e||void 0===e?void 0:e.touches.length)>0?(n=!0,t=e.touches[0].clientX):(n=!0,t=e.clientX)}function i(o){if(!n)return;const i=o.touches?o.touches[0].clientX:o.clientX;e.style.pointerEvents="none";const r=2*(t-i);e.scrollLeft+=r,t=i}function r(t){e.style.pointerEvents="auto",n=!1}return e&&("ontouchstart"in window&&(e.addEventListener("touchstart",o),e.addEventListener("touchmove",i),e.addEventListener("touchend",r)),e.addEventListener("mousedown",o),document.addEventListener("mousemove",i),document.addEventListener("mouseup",r)),()=>{e&&("ontouchstart"in window&&(e.removeEventListener("touchstart",o),e.removeEventListener("touchmove",i),e.removeEventListener("touchend",r)),e.removeEventListener("mousedown",o),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",r))}}),[]),(0,r.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",height:"fit-content",width:"100%",gap:null!==(t=e.spacing)&&void 0!==t?t:3},className:"whatmore-carousel-horizontal-flex",children:e.dataList.map(((t,n)=>(0,r.jsx)(l,{renderElement:e.renderElement,data:t,defaultHeight:e.defaultHeight,defaultWidth:e.defaultWidth,retainAlreadyRenderedElements:e.retainAlreadyRenderedElements},"key-"+n)))})}},9111:function(){},5892:function(){},4444:function(){},1811:function(){},6143:function(){},7850:function(){},9778:function(){}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[708],{1291:function(e,t,n){n.r(t);var o=n(7313),r=n(6090),i=n(7616),l=n(9039),a=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),s=n(2575),c=n(8866),d=n(7753),h=n(7129),u=n(8631),p=n(9821),m=n(8782),x=n(7381),f=n(9854),v=n(6417);const g=(0,s.Z)({key:"whatmore-css-cv"});t.default=function(e){var t;const[n,s,w]=(0,c.Z)(),[y,j,E,C,S]=(0,p.Z)(),L=(0,d.MO)("whatmoreCollectionsTileSize"),M="portrait"==n?0:(0,d.MO)("whatmoreLandscapePadding"),k=(0,d.MO)("whatmoreCollectionsTilesSpacing"),R=(0,d.MO)("whatmoreShopId"),[b]=(0,d.MO)("whatmorePrimaryColor"),{whatmoreRootId:P}=(0,o.useContext)(l.I),O=e.events,F=e.onClick,T=(0,d.MO)("whatmoreTitleFont"),Z="portrait"==n?(0,d.MO)("whatmoreTitleFontSizePortrait"):(0,d.MO)("whatmoreTitleFontSize"),A=null!==(t=(0,f.aRS)(R))&&void 0!==t?t:T;delete i.ZP.styles.global;var z=[];for(let o=0;o<O.length;)z.push((0,v.jsx)(u.Z,{event:O[o],onClick:()=>{var e;e=O[o-1],F(e)},removeBorders:!0,borderRadius:"5%"},"collections-tile-"+o)),o+=1;return(0,o.useEffect)((()=>{(0,x.Oo)("Video shopping powered by Whatmore!")}),[]),(0,o.useEffect)((()=>{l.$.forEach((e=>{var t;const n=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-collections-c"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-collections-c"]');if(!n)return;const o=e.querySelector(".whatmore-render-root");n&&o&&(o.style.minHeight="0px")}))}),[]),(0,v.jsx)(a.C,{value:g,children:(0,v.jsx)("div",{children:(0,v.jsx)(r.x,{theme:i.ZP,cssVarsRoot:P,resetCSS:!1,children:(0,v.jsxs)(h.V.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:[e.heading.trim().length>0?(0,v.jsx)("div",{className:"whatmore-events-carousel",style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,v.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-family",A,"important"),e.style.setProperty("font-size",Z+"px","important"))},style:{color:b,backgroundClip:"text",textAlign:"center",fontWeight:(0,f.wOV)(R),lineHeight:(0,f.vY4)(R),letterSpacing:(0,f.X2K)(R)},children:e.heading})}):(0,v.jsx)(v.Fragment,{}),(0,v.jsx)("div",{style:{marginLeft:M+"px",marginRight:M+"px"},children:(0,v.jsx)(m.P,{renderElement:e=>(0,v.jsx)(v.Fragment,{children:e.eventData}),dataList:z,spacing:k,defaultHeight:y*L*.01+"px",defaultWidth:j*L*.01+"px",retainAlreadyRenderedElements:!0})})]})})})})}},7129:function(e,t,n){n.d(t,{V:function(){return o}});const o=(0,n(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},8631:function(e,t,n){var o=n(7313),r=n(9854),i=n(7753),l=(n(9111),n(123),n(9778),n(4892)),a=n(7129),s=n(9821),c=n(6417);t.Z=function(e){var t;const[n,d,h,u,p]=(0,s.Z)(),[m]=(0,i.j1)("whatmoreSecondaryColor"),[x]=(0,i.j1)("whatmoreShopId"),[f]=(0,i.j1)("whatmoreCollectionsTileSize"),[v,g]=(0,o.useState)(!1),w=(0,r.f63)(x);(0,o.useContext)(a.V);const y=e.event,j=e.onClick,E=e.removeBorders,C=n*f*.01,S=d*f*.01,L=null!==(t=e.borderRadius)&&void 0!==t?t:"0%";return(0,c.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:S+"px",marginLeft:E?"2px":"5px",marginRight:E?"2px":"5px",marginTop:E?"2px":"5px",marginBottom:E?"2px":"5px",cursor:"pointer"},onClick:()=>{g(!0),j(y)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:(0,c.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:L,overflow:"hidden",boxShadow:E?"":"0px 1px 1px 0px "+m+"50, 0px -1px 1px 0px "+w+"50, 1px 0px 1px 0px "+m+"50, -1px 0px 1px 0px "+w+"80, 1px -1px 1px 0px "+m+"80, -1px 1px 1px 0px "+w+"DA, 1px 1px 1px 0px "+m+"DA, -1px -1px 1px 0px "+w+"DA"},children:(0,c.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:C+"px",width:S+"px",borderRadius:L,backgroundColor:"gray",overflow:"hidden"},children:(0,c.jsx)(l.Z,{height:"100%",width:"100%",url:y.thumbnail_image,isPlaying:!0,event:y})})})})}},8782:function(e,t,n){n.d(t,{P:function(){return a}});var o=n(3933),r=n(7313),i=(n(123),n(6417));function l(e){const{ref:t,inView:n,entry:r}=(0,o.YD)({triggerOnce:e.retainAlreadyRenderedElements});return(0,i.jsx)("div",{ref:t,children:n?e.renderElement({eventData:e.data}):(0,i.jsx)("div",{style:{minWidth:e.defaultHeight,minHeight:e.defaultWidth}})})}function a(e){var t;return(0,r.useEffect)((()=>{const e=document.querySelector(".whatmore-carousel-horizontal-flex");let t,n=!1;function o(e){e.touches&&(null===e||void 0===e?void 0:e.touches.length)>0?(n=!0,t=e.touches[0].clientX):(n=!0,t=e.clientX)}function r(o){if(!n)return;const r=o.touches?o.touches[0].clientX:o.clientX;e.style.pointerEvents="none";const i=2*(t-r);e.scrollLeft+=i,t=r}function i(t){e.style.pointerEvents="auto",n=!1}return e&&("ontouchstart"in window&&(e.addEventListener("touchstart",o),e.addEventListener("touchmove",r),e.addEventListener("touchend",i)),e.addEventListener("mousedown",o),document.addEventListener("mousemove",r),document.addEventListener("mouseup",i)),()=>{e&&("ontouchstart"in window&&(e.removeEventListener("touchstart",o),e.removeEventListener("touchmove",r),e.removeEventListener("touchend",i)),e.removeEventListener("mousedown",o),document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",i))}}),[]),(0,i.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",height:"fit-content",width:"100%",gap:null!==(t=e.spacing)&&void 0!==t?t:3},className:"whatmore-carousel-horizontal-flex",children:e.dataList.map(((t,n)=>(0,i.jsx)(l,{renderElement:e.renderElement,data:t,defaultHeight:e.defaultHeight,defaultWidth:e.defaultWidth,retainAlreadyRenderedElements:e.retainAlreadyRenderedElements},"key-"+n)))})}},9111:function(){},5892:function(){},4444:function(){},1811:function(){},6143:function(){},7850:function(){},9778:function(){}}]);
@@ -0,0 +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 R}});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),m=n(4669),p=n(941),g=n(9039),v=n(7300),I=n(6524),f=n(7643),S=n(778),w=n(6417);const y=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),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(367),n.e(240),n.e(576),n.e(950),n.e(364),n.e(530)]).then(n.bind(n,5523)))),T=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(358)]).then(n.bind(n,3827)))),x=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(607)]).then(n.bind(n,6071)))),_=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),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(367),n.e(240),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(367),n.e(240),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))));var D=function(e){const[t]=(0,a.j1)("isInDesignMode"),[n]=(0,a.j1)("isDemoBrand"),[D]=(0,a.j1)("whatmoreTopBottomPadding"),[P]=(0,a.j1)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:G}=(0,r.useContext)(g.I),[W]=(0,a.j1)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:V}=(0,r.useContext)(g.I),k=(0,a.MO)("isLandingSharedLink"),z=(0,a.MO)("whatmoreShareTemplateId"),N=(0,a.MO)("whatmoreShareStoryId"),R=(0,a.MO)("whatmoreShareEventId"),[U,q]=(0,r.useState)(-1),[F,A]=(0,r.useState)(null);var K=e.events,Z=null;function B(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=Z[e].events[0];(0,l.wh)(t),(0,m.Tc)(W,i.Xh,i.OW),(0,u.H4)(t.event_id,t.products,"homepage","stories")})();var o=0;null!=r&&Z[e].events.map(((e,t)=>{e.event_id==r&&(o=t)})),q(o),A(e)}function H(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,d.KE)()&&!a&&(0,h.QV)(),(0,v.B6)(e)||(0,v.WJ)(e))return t||n||(async()=>{(0,l.wh)(e),(0,m.Tc)(W,i.Xh,i.pR),(0,u.H4)(e.event_id,e.products,"homepage","carousel")})(),void q(e.index);const r=20;var{status:c,bannerText:p,timeToStartInMins:g}=s.Z.getEventStatus(e);g<=r&&c.name!==o.Z.LIVE.name?console.debug(" TODO : show toast on upcoming live event."):q(e.index)}function Y(e){return(0,w.jsx)(w.Fragment,{})}return G&&!Z&&(Z=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}(K)),(0,r.useEffect)((()=>{k&&V==(0,I.zv)(z)&&(null!=N&&G?Z.forEach(((e,t)=>{N==e.id&&B(t,!0,R)})):null!=R&&K.forEach(((e,t)=>{R==e.event_id&&H(e,!0)})))}),[]),(0,w.jsxs)("div",{children:[(0,w.jsx)("div",{style:{marginTop:(G?P:D)+"px",marginBottom:(G?P:D)+"px"},children:"template-b"===V?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(y,{events:K,onClick:H,heading:e.heading})}):"template-a-1"===V?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(E,{events:K,onClick:H,heading:e.heading})}):"template-feed-a"===V?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(C,{events:K,onClick:H,heading:e.heading})}):"template-collections-a"===V||"template-c"===V?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(f.u,{userInteractionType:S.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,w.jsx)(T,{events:K,onClick:H,heading:e.heading})})}):"template-collections-b"===V||"template-d"===V?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(f.u,{userInteractionType:S.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,w.jsx)(x,{events:K,onClick:H,heading:e.heading})})}):"template-collections-c"===V||"template-e"===V?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(f.u,{userInteractionType:S.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,w.jsx)(_,{events:K,onClick:H,heading:e.heading})})}):"template-collections-d"===V?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(f.u,{userInteractionType:S.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,w.jsx)(y,{events:K,onClick:H,heading:e.heading})})}):"template-collections-e"===V?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(f.u,{userInteractionType:S.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,w.jsx)(O,{events:K,onClick:H,heading:e.heading})})}):"template-f"===V?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(f.u,{userInteractionType:S.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,w.jsx)(L,{events:K,onClick:H,heading:e.heading})})}):"template-banner-a"===V?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(f.u,{userInteractionType:S.K.BANNER_WIDGET_VIEW,event:K[0],triggerFlag:!t&&!n,children:(0,w.jsx)(b,{events:K})})}):G?(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(f.u,{userInteractionType:S.K.STORIES_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,w.jsx)(j,{eventsStories:Z,onClick:B,template:V})})}):(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(f.u,{userInteractionType:S.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,w.jsx)(O,{events:K,onClick:H,heading:e.heading})})})}),-1==U?(0,w.jsx)(Y,{}):(0,w.jsx)(r.Suspense,{children:(0,w.jsx)(f.u,{userInteractionType:S.K.EVENT_VIEW,event:K[U],productList:K[U].products,cta:K[U].cta,triggerFlag:!t&&!n,children:(0,w.jsx)(M,{events:K,index:U,onBack:function(e){(0,c.n2L)(W)&&(0,a.MO)("whatmoreAddedToCart")&&(0,p.D)(W,(()=>{}),100,window.location.hostname),q(-1)},slideDirection:G||"horizontal"===(0,c.e8z)(W)?"horizontal":"vertical",eventsStories:Z,initialStoryIndex:F,template:V})})})]})};const P=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 G=n(3388),W=n(7381),V=n(7376),k=n(7008);var z=function(e){const[t,n]=(0,r.useState)(),[o,s]=(0,r.useState)(),{whatmoreIsStoriesTemplate:l}=(0,r.useContext)(g.I),{whatmoreIsCollectionsTemplate:m}=(0,r.useContext)(g.I),{whatmoreIsBannerTemplate:p}=(0,r.useContext)(g.I),[v]=(0,a.j1)("whatmoreShopId"),[f]=(0,a.j1)("whatmoreCollectionId"),y=(0,a.MO)("whatmoreLandingLocationType"),E=(0,a.MO)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:T}=(0,r.useContext)(g.I),{whatmoreCollectionUrl:x}=(0,r.useContext)(g.I),_=(0,c.cZT)(v)?(0,c._uv)(v)?x:window.location.href.split(/[?#]/)[0]:f,[j,M]=(0,a.j1)("productRatings"),[O,L]=(0,r.useState)(!1);var C=(0,c.efR)(v)?i.Dm+"/v2/events/":i.Gc+"/v2/events/",b=(0,c.efR)(v)?i.Dm+"/get_eventset/":i.Gc+"/get_eventset/",z=(0,c.efR)(v)?i.Dm+"/v2/collection":i.Gc+"/v2/collection",N=(0,c.efR)(v)?i.Dm+"/v2/brand/"+v+"/product-events":i.Gc+"/v2/brand/"+v+"/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,k.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(y.startsWith("product")){var t=(0,a.MO)("whatmoreProductId");t=(0,c.iXA)(v)?function(e){return e.split(/[?#]/)[0]}(window.location.href):t,e=N.toString()+"?client_product_id="+t.toString()+"&status="+U.toString()+"&event_type=video"}else if(m||"invalid-url"!==x)e=z.toString()+"?store_id="+R.toString()+"&client_collection_id="+_;else if(p){const t=I.ls,n=(0,I.H1)(y);e=b.toString()+R.toString()+"?eventset_type="+t+"&source="+n+"&source_id="+v}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(p){const t=I.ls;return(0,G.OC)(e,t)}return(0,G.kW)(e,m||"invalid-url"!==x)})).then((e=>(E&&console.debug("initial received events size : "+e.length),l||p?e:(0,G.e8)(e,R)))).then((e=>(null!=e&&0!=e.length&&(0,c.LUY)(v)&&function(e,t,n){const r=setInterval((()=>{null===(0,a.MO)("productRatings")&&P(e,t,n)}),1e3);setTimeout((()=>{clearInterval(r)}),1e4)}(v,e,(e=>{M(e)})),e))).then((e=>{null==e||0==e.length||l||p||(0,c.NOv)(R,e),n(e),L(!0)})).catch((e=>{s(e.message)}))}),[]),(0,r.useEffect)((()=>{"index"===y?t&&t.length>0&&(0,V.PB)({userInteractionType:S.K.HOMEPAGE_VISITED,widgetSourceDetails:T}):"collection"===y&&(t&&t.length>0||(0,c.miB)(v))&&(0,V.PB)({userInteractionType:S.K.COLLECTION_PAGE_VISITED,widgetSourceDetails:T})}),[t]),(O&&(null==t||0==t.length)||o)&&g.$.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-f"]')||e.querySelector('.whatmore-template-type[data-wh="template-b"]'))&&void 0!==n?n:e.querySelector('.whatmore-template-type[data="template-a"]')||e.querySelector('.whatmore-template-type[data="template-f"]')||e.querySelector('.whatmore-template-type[data="template-b"]'),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.querySelector(".whatmore-render-root");(l||s||o||i)&&(o&&c||i&&c||l&&c||s&&c)&&(c.style.minHeight="0px")})),null==t||0==t.length||o?(0,w.jsx)("div",{}):(E&&(0,W.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,w.jsx)("div",{children:(0,w.jsx)(D,{heading:e.heading,events:t})},"whatmore-main-coponent"))},N=n(3933);var R=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),p=(0,a.MO)("isLandingSharedLink");(0,r.useEffect)((()=>{if((0,m.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[g,v,I]=(0,N.YD)({triggerOnce:!0});return(0,w.jsx)("div",{ref:g,children:d||v||p||!(0,c.wc0)(o)?(0,w.jsx)("div",{children:t||n?(0,w.jsx)("div",{children:(0,w.jsx)(z,{heading:s,shopId:i.aA})}):(0,w.jsx)("div",{children:(0,w.jsx)(z,{heading:s,shopId:o})})}):(0,w.jsx)(w.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})}}}]);