whatmore-react-assets 1.0.1313 → 1.0.1315
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/static/js/{867.7d0d4066.chunk.js → 219.96210d14.chunk.js} +1 -1
- package/static/js/{app-main.af06d122.chunk.js → app-main.79ec627a.chunk.js} +1 -1
- package/static/js/banner-template-a.e3324528.chunk.js +1 -0
- package/static/js/{carousel-template-f.25f060b1.chunk.js → carousel-template-f.de9ba6d2.chunk.js} +1 -1
- package/static/js/{homepage-carousel-view.97dcd8de.chunk.js → homepage-carousel-view.bc0ef035.chunk.js} +1 -1
- package/static/js/product-page-view.330a55cd.chunk.js +1 -0
- package/static/js/spotlight-view.ab3e68b4.chunk.js +1 -0
- package/whatmore.js +2 -2
- package/static/js/banner-template-a.87dd87d9.chunk.js +0 -1
- package/static/js/product-page-view.2e2cbccb.chunk.js +0 -1
- package/static/js/spotlight-view.9daf6a30.chunk.js +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[876,950,842],{4658:function(t,e,n){n.r(e),n.d(e,{default:function(){return A}});var o=n(7313),i=n(6090),r=n(7616),a=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),l=n(2575),s=n(7129),d=n(364),c=(n(3439),n(7753)),p=n(7931),u=n(9018),v=n(9854),x=n(6775),f=n(8866),h=n(868),g=n(342),m=n(3437),y=n(3455),w=n(6417);var j=function(t){var e;const n=t.isMuted,o=null!==(e=t.iconSize)&&void 0!==e?e:30;function i(e){t.onToggle(e)}return(0,w.jsx)("div",{style:{cursor:"pointer"},children:n?(0,w.jsx)(y.Z,{sx:{color:"white",fontSize:o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{i(t)}}):(0,w.jsx)(m.Z,{sx:{color:"white",fontSize:o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{i(t)}})})},b=n(1896),I=n(8984),S=n(58),C=n(6119),M=n(32),P=n(4522),k=n(778),Z=n(3433),z=n(4892),R=n(653),L=n(7951);function E(t){const[e,n]=(0,o.useState)(t.initialMuteState),i=t.events,r=t.activeEventIndex,a=t.setActiveEventIndex,l=(0,c.MO)("whatmoreShopId"),s="portrait"===t.mode;function d(o){o.stopPropagation(),n(!e),(0,I.KE)()&&((0,R.j)()?(0,S.QV)():(0,L.B)()),t.onMuteToggle()}const x=t.event;return(0,w.jsx)("div",{style:{position:(0,v.SJ)(l)?"absolute":"relative",top:(0,v.SJ)(l)?0:"",zIndex:1,bottom:(0,v.SJ)(l)?"":"100%",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,w.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:[(0,w.jsxs)("div",{className:"banner-event-overlay",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:["video"==x.event_type&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("div",{style:{width:"100%",height:"100%"},onClick:t=>{d(t)}}),(0,w.jsx)(j,{isMuted:e,onToggle:t=>{d(t)}})]}),i.length>1&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("div",{classname:"banner-navigation-overlay",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(),a(0===r?i.length-1:r-1)},children:(0,w.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:"6px"},children:(0,w.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"20px",color:"#252525",height:"20px"},children:(0,w.jsx)(p.Z,{})})})}),(0,w.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(),a(r===i.length-1?0:r+1)},children:(0,w.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:"6px"},children:(0,w.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"20px",color:"#252525",height:"20px",textAlign:"center"},children:(0,w.jsx)(u.Z,{})})})}),(0,v.cRS)(l)&&(0,w.jsx)("div",{style:{display:"flex",position:"absolute",bottom:"7%",left:"50%",transform:"translateX(-50%)",gap:"24px",zIndex:1},children:i.map(((t,e)=>{const n=e===r;return(0,w.jsx)("button",{onClick:t=>{t.stopPropagation(),a(e)},style:{width:n?"25px":s?"12px":"14px",height:s?"12px":"14px",borderRadius:n?"10px":"50%",backgroundColor:n?(0,v.YFz)(l):"#f8eeec",boxShadow:"0px 0px 8px rgba(0, 0, 0, 0.3)"}},e)}))})]})]}),!(0,v.hr)(l)&&(0,w.jsx)("div",{style:{width:"100%",height:"100%"},onClick:d})]})})}var N=function(t){var e,n,i,r;const[a,l,s]=(0,f.Z)(),[p,u]=(0,o.useState)(!0),m=(0,c.MO)("whatmoreVideoTileSize"),[y,j,I]=(0,x.Z)({triggerOnce:!1}),{whatmoreWidgetSourceDetails:S}=(0,o.useContext)(d.I),R=(0,c.MO)("whatmoreShopId"),L=t.events,N=t.activeEventIndex,F=t.setActiveEventIndex,A=L[N],T=(0,g.uv)(A),B=(0,g.WN)(A);if((0,o.useEffect)((()=>{M.IR.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;t&&(t.style.minHeight="0px")}))}),[]),"portrait"===a&&!T)return(0,w.jsx)(w.Fragment,{});if("landscape"===a&&!B)return(0,w.jsx)(w.Fragment,{});const V=(0,h.V)("portrait"===a?T:B),_=m/100*(0,v.b4p)(R),O=m/100*(0,v.GmU)(R),D="portrait"===a?(0,v.oOc)(R):(0,v.snl)(R),J="portrait"===a?s*_:s*O,W=J*D,H=null!=(null===(e=A.cta)||void 0===e||null===(n=e[1])||void 0===n?void 0:n.cta_link);return(0,w.jsxs)("div",{ref:y,onClick:()=>{var t,e;(0,P.GF)({userInteractionType:k.K.BANNER_WIDGET_CLICKED,widgetSourceDetails:S,event:L[N]}),(0,v.hr)(R)&&H&&window.open(null===(t=A.cta)||void 0===t||null===(e=t[1])||void 0===e?void 0:e.cta_link,"_self")},style:{position:"relative",margin:"0 auto",width:(0,v.SJ)(R)?"100%":J,minHeight:(0,v.SJ)(R)?s*D:"",height:(0,v.SJ)(R)?"auto":W,borderWidth:(0,v.alU)(R),borderColor:(0,v.qPe)(R),overflow:"hidden",cursor:"pointer"},children:["28273541192"===R?(0,w.jsx)(z.Z,{height:"100%",width:"100%",url:V,isPlaying:j,event:A,isVideoMuted:!j||p,source:Z.j.BANNER}):(0,w.jsx)(b.Z,{height:"100%",width:"100%",url:V,isPlaying:j,event:A,isVideoMuted:!j||p,setDuration:t.setDuration,source:Z.j.BANNER}),(0,w.jsx)(E,{isCTAPresent:H,events:L,activeEventIndex:N,setActiveEventIndex:F,event:A,mode:a,onMuteToggle:()=>u(!p),initialMuteState:p}),(0,v.j1_)(R)&&(null===A||void 0===A||null===(i=A.cta)||void 0===i?void 0:i.length)>1&&(0,w.jsx)("div",{style:{position:"absolute",zIndex:1,bottom:"10%",left:"50%",transform:"translateX(-50%)"},className:"whatmore-ios-css-relative-fix",children:(0,w.jsx)(C.Z,{isBanner:!0,event:A,cta:null===A||void 0===A||null===(r=A.cta)||void 0===r?void 0:r[1],fontFactor:.6})})]})};const F=(0,l.Z)({key:"whatmore-css-bv"});var A=function(t){const{whatmoreRootId:e}=(0,o.useContext)(d.I),[n,l]=(0,o.useState)(0),c=t.events,[p,u]=(0,o.useState)(-1);let v;return(0,o.useEffect)((()=>{v&&clearInterval(v);const t="video"===c[n].event_type,e=t?1e3*p:6e3;return t?-1!=p&&(v=setInterval((()=>{l((t=>t===c.length-1?0:t+1))}),e)):v=setInterval((()=>{l((t=>t===c.length-1?0:t+1))}),e),()=>{clearInterval(v)}}),[p,n]),delete r.ZP.styles.global,(0,w.jsx)(a.C,{value:F,children:(0,w.jsx)("div",{className:"whatmore-banner-events",children:(0,w.jsx)(i.x,{theme:r.ZP,cssVarsRoot:e,resetCSS:!1,children:(0,w.jsx)(s.V.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:(0,w.jsx)(N,{activeEventIndex:n,events:c,setActiveEventIndex:l,setDuration:u})})})})})}},3867:function(t,e,n){var o=n(8816),i=n(417),r=n(4885),a=n(7753),l=n(6417);e.Z=function(t){var e;const n=(0,a.MO)("whatmoreUITheme"),[s]=(0,a.j1)("whatmoreSecondaryColor"),[d,c]=(0,a.j1)("productRatings"),p=(0,a.MO)("whatmorePrimaryFont"),u=t.productId,v=t.fontSize,x=null!==(e=t.fontColor)&&void 0!==e?e:"gray";if(null===d||"undefined"==typeof d||!(u in d)||d[u].avgRating>5)return(0,l.jsx)(l.Fragment,{});const f=d[u].avgRating,h=d[u].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(f))].map(((t,e)=>(0,l.jsx)(o.Z,{sx:{color:s,fontSize:v+"px"}},"star-icon"+e))),f-Math.floor(f)>.2?(0,l.jsx)(i.Z,{sx:{color:s,fontSize:v+"px"}},"star-half-icon"):f-Math.floor(f)==0?(0,l.jsx)(l.Fragment,{}):(0,l.jsx)(r.Z,{sx:{color:s,fontSize:v+"px"}},"star-outline-icon"),[...Array(Math.floor(5-f))].map(((t,e)=>(0,l.jsx)(r.Z,{sx:{color:s,fontSize:v+"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:s,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*v+"px","important"),t.style.setProperty("font-family",p,"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",f,"\xa0"]})})}),(0,l.jsx)("div",{children:(0,l.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color",x,"important"),t.style.setProperty("font-size",.8*v+"px","important"),t.style.setProperty("font-family",p,"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","("+h+")"]})})]})})}},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})},9363:function(t,e,n){n.d(e,{$:function(){return a},s:function(){return r}});var o=n(9854),i=n(7753);function r(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=(0,i.MO)("whatmoreShopId");return"shopify"!=(0,o.Ipo)(n)?"STRNV8MHJTF"==n?t+"?format=webp":t:t+e}function a(t){var e;if(null!==t&&void 0!==t&&t.includes("https://w-media.b-cdn.net/process-media"))return"image";const n=null===t||void 0===t||null===(e=t.trim())||void 0===e?void 0:e.split("?")[0],o=/\.(jpeg|jpg|gif|png|svg|webp)$/i,i=/\.(mp4|mov|wmv|avi|flv|mkv)$/i;return null!==o&&void 0!==o&&o.test(n)?"image":null!==i&&void 0!==i&&i.test(n)?"video":void 0}},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))}},1195:function(t,e,n){var o=n(5318);e.Z=void 0;var i=o(n(5045)),r=n(6417),a=(0,i.default)((0,r.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");e.Z=a},7931:function(t,e,n){var o=n(5318);e.Z=void 0;var i=o(n(5045)),r=n(6417),a=(0,i.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=a},9018:function(t,e,n){var o=n(5318);e.Z=void 0;var i=o(n(5045)),r=n(6417),a=(0,i.default)((0,r.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext");e.Z=a},9723:function(t,e,n){var o=n(5318);e.Z=void 0;var i=o(n(5045)),r=n(6417),a=(0,i.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=a},8816:function(t,e,n){var o=n(5318);e.Z=void 0;var i=o(n(5045)),r=n(6417),a=(0,i.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=a},417:function(t,e,n){var o=n(5318);e.Z=void 0;var i=o(n(5045)),r=n(6417),a=(0,i.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=a},4885:function(t,e,n){var o=n(5318);e.Z=void 0;var i=o(n(5045)),r=n(6417),a=(0,i.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=a},3439:function(){},7244:function(){},5892:function(){},4444:function(){},1811:function(){},7850:function(){}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[281],{8181:function(e,t,n){var i=n(7313),o=n(8866),r=n(7753),a=n(6417);const d=i.memo((()=>{if(!(0,r.MO)("isLandingSharedLink"))return(0,a.jsx)(a.Fragment,{});const[e]=(0,o.Z)();return(0,a.jsxs)("div",{className:"shimmer-container ".concat(e),children:["portrait"===e?(0,a.jsx)("div",{className:"shimmer-item portrait-full",children:(0,a.jsx)("div",{className:"shimmer-effect"})}):Array(3).fill().map(((e,t)=>(0,a.jsx)("div",{className:"shimmer-item landscape-item ".concat(1===t?"center-item":""),children:(0,a.jsx)("div",{className:"shimmer-effect"})},t))),(0,a.jsx)("style",{children:"\n .shimmer-container {\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n scroll-behavior: smooth;\n z-index: 1000;\n }\n\n .portrait {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.6);\n }\n\n .landscape {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.8);\n }\n\n .shimmer-item {\n scroll-snap-align: start;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n transition: transform 0.3s ease;\n }\n\n .portrait-full {\n width: 100vw;\n height: 100vh;\n margin: 0; \n }\n\n .landscape-item {\n width: 250px;\n height: 450px;\n background: #D3D3D3;\n border-radius: 8px;\n margin-left: -50px; \n }\n\n .center-item {\n width: 360px;\n height: 620px;\n box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5); \n z-index: 10; \n }\n\n .shimmer-effect {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.3) 75%);\n animation: shimmer 2s infinite;\n background-size: 200% 100%;\n }\n\n @keyframes shimmer {\n 0% {\n background-position: -200% 0;\n }\n 100% {\n background-position: 200% 0;\n }\n }\n "})]})}));t.Z=d},5380:function(e,t,n){n.d(t,{Z:function(){return w}});var i=n(4959),o=n(7313),r=n(4892),a=n(6805),d=n(7753),s=n(9821);var l=function(e){const[t,n,i,o,r]=(0,s.Z)(),[l]=(0,d.j1)("whatmoreEmbedAppVideoPlayerSizePortrait"),[c]=(0,d.j1)("whatmoreEmbedAppVideoPlayerSizeLandscape"),u=r[a.YP]===a.$w?c/100:l/100*1.2;return[t*u,n*u,r]},c=n(9723),u=n(9461),p=n.n(u),h=n(1195),v=n(7108),m=(n(7244),n(123),n(9854)),f=n(6417);var w=function(e){var t;const n=o.useRef(null);var[s,u,w]=l();const g=(0,d.MO)("whatmoreUITheme"),[x]=(0,d.j1)("whatmoreEmbedAppVideoTitle"),[_]=(0,d.j1)("whatmoreEmbedAppPositionPortrait"),[E]=(0,d.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[y]=(0,d.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[b]=(0,d.j1)("whatmoreEmbedAppPositionLandscape"),[I]=(0,d.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[j]=(0,d.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),S=(0,d.MO)("whatmoreShopId");var L=_,P=E,C=y;w[a.YP]===a.$w&&(L=b,P=I,C=j);const[D,O]=(0,o.useState)(["initial",window.pageYOffset]),[T,K]=(0,o.useState)(!1),A=null!==(t=e.isSpotlight)&&void 0!==t&&t,k=w[a.YP]===a.$w?.7*(0,m.zGA)(S):(0,m.zGA)(S),z=A?k:1;s*=z,u*=z;const V=A?(0,m.G0o)(S):L,M=A?(0,m.X8j)(S):(0,m.lVn)(S),[N,Y]=(0,o.useState)(!A&&(0,m.eXi)(S));function R(e,t){O(e),e[1]<=100?K(!1):t!=T&&(K(t),Y(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const n=()=>{const n=window.pageYOffset;Math.abs(n-e)<100||(R([n>e?"scrolled-down":"scrolled-up",n],!0),e=n>0?n:0),t=!1},i=()=>{t||(window.requestAnimationFrame(n),t=!0)};return window.addEventListener("scroll",i),()=>window.removeEventListener("scroll",i)}),[D]),(0,i.O3)({ref:n,handler:()=>{R(["scrolled-up",D[1]],!0)}});const Z=e.event,F=e.inVideoClick,W=e.closeClick,U=.3*u,B=.6*u,H=.1*u,$=.1*(.5*u),G="round"==g?"10px":"0px",q=(0,m.Z$A)(S);var J=!1,X=0,Q=0;function ee(e){J=e}return(0,f.jsx)("div",{children:N&&!M?(0,f.jsx)(f.Fragment,{}):T&&M?(0,f.jsx)("div",{style:"left"===V?{left:"1px",bottom:A?(0,m.vnu)(S)+"px":C+"px",position:"fixed",zIndex:q}:{right:"5px",bottom:A?(0,m.vnu)(S)+"px":C+"px",position:"fixed",zIndex:q},children:(0,f.jsxs)("div",{onClick:()=>{R(["initial",D[1]],!1)},style:{margin:"1px",width:u+"px",height:s+"px"},className:"left"===V?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,f.jsx)("div",{style:{overflow:"hidden"},children:(0,f.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,f.jsx)(r.Z,{url:Z.thumbnail_image,isPlaying:!1,event:Z})})}),(0,f.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,f.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,f.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,f.jsx)(h.Z,{sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:U+"px"},style:{position:"relative",zIndex:1,left:$+"px",bottom:$+"px"},onClick:W})})}),(0,f.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,f.jsx)(v.Z,{sx:{color:"white",fontSize:2*U+"px",filter:"drop-shadow(0 0 2px black);"}})})]})})]})}):(0,f.jsx)(p(),{nodeRef:n,cancel:".activate-button,.close-btn",defaultClassName:"whatmore-react-draggable",defaultClassNameDragging:"whatmore-react-draggable-dragging",defaultClassNameDragged:"whatmore-react-draggable-dragged",bounds:"html",onStart:(e,t)=>{var n,i;n=t.x,i=t.y,X=n,Q=i},onDrag:(e,t)=>{ee(!0)},onStop:(e,t)=>{J&&(Math.abs(t.x-X)>5||Math.abs(t.y-Q)>5)?ee(!1):F(Z)},children:(0,f.jsx)("div",{ref:n,style:"left"===V?{left:A?(0,m.$II)(S)+"px":P+"px",bottom:A?(0,m.vnu)(S)+"px":C+"px",position:"fixed",zIndex:q}:{right:A?(0,m.$II)(S)+"px":P+"px",bottom:A?(0,m.vnu)(S)+"px":C+"px",position:"fixed",zIndex:q},children:(0,f.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:e.isSpotlight&&"60122562760"==S?s+"px":u+"px",height:e.isSpotlight&&"60122562760"==S?u+"px":s+"px"}),className:"left"===V?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,f.jsx)("div",{style:{overflow:"hidden",position:"relative"},children:(0,f.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:e.isSpotlight&&"60122562760"==S?16/9:9/16},children:(0,f.jsx)(r.Z,{url:Z.thumbnail_image,isMuted:!0,isPlaying:!0,event:Z})})}),(0,f.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,f.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,f.jsx)(h.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:U+"px"},onClick:W,style:{position:"relative",zIndex:1,left:H+"px",bottom:H+"px"}})}),(0,f.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,f.jsx)(c.Z,{sx:{color:(0,m.Ya_)(S),fontSize:B+"px",filter:"drop-shadow(0 0 2px black);"}})}),(0,f.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:G,borderBottomRightRadius:G,backgroundImage:x?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,f.jsxs)("p",{style:{textAlign:"center",color:"white",fontFamily:"Sans-serif",fontWeight:"semi-bold",fontSize:.4*U+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",x]})})]})})]})})})})}},4284:function(e,t,n){n.r(t);var i=n(7313),o=n(9854),r=n(2860),a=n(7753),d=n(5160),s=n(6967),l=n(5380),c=n(58),u=n(8984),p=n(4669),h=n(513),v=n(9302),m=n(2575),f=n(7300),w=n(6524),g=n(364),x=n(4522),_=n(778),E=n(7643),y=n(7008),b=n(7381),I=n(8181),j=n(6095),S=n(653),L=n(7951),P=n(6417);const C=(0,m.Z)({key:"whatmore-css-ppv"}),D=i.lazy((()=>Promise.all([n.e(819),n.e(210),n.e(576),n.e(745),n.e(926),n.e(824),n.e(348),n.e(647)]).then(n.bind(n,6348))));function O(e){return e.split(/[?#]/)[0]}t.default=function(e){const[t,n]=(0,i.useState)(),[m,T]=(0,i.useState)(),{whatmoreIsPreviewMode:K}=(0,i.useContext)(g.I),[A]=(0,a.j1)("isInDesignMode"),[k]=(0,a.j1)("isDemoBrand"),[z]=(0,a.j1)("whatmoreEmbedAppUseVariant"),[V,M]=(0,i.useState)(-2),[N]=(0,a.j1)("whatmoreVariantId"),[Y]=(0,a.j1)("whatmoreShopId");var[R]=(0,a.j1)("whatmoreProductId");const Z=(0,a.MO)("isLandingSharedLink"),F=(0,a.MO)("whatmoreShareTemplateId"),W=(0,a.MO)("whatmoreShareEventId"),U=Z&&"template-embed"===(0,w.zv)(F),[B,H]=(0,i.useState)(U);R=(0,o.iXA)(Y)?O(window.location.href):R;const[$,G]=(0,i.useState)((()=>"true"===z?N:R));var q=r.Gc+"/v2/brand/"+Y+"/product-events";const{whatmoreWidgetSourceDetails:J}=(0,i.useContext)(g.I);(0,i.useEffect)((()=>{(0,b.Oo)("Video shopping powered by Whatmore!"),(0,s.hb)();const e=()=>{const e="_whatmore_bulk_events",t=JSON.parse(localStorage.getItem(e))||[];t&&t.length>0&&((0,y.K)(t),localStorage.removeItem(e))};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[]),(0,i.useEffect)((()=>{(0,p.ll)(Y)}),[]),(0,i.useEffect)((()=>{null==t||0==t.length||m||!(0,u.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||((0,S.j)()?(0,c.b5)(c.UD):(0,L.F)())}),[t]),(0,i.useEffect)((()=>{if(M(-1),(0,o.ly4)(Y)){const e="".concat(r.Gc,"/v2/brand/").concat(Y,"/product-events/recommendation"),t=(0,o.FSv)(Y);fetch("".concat(e,"?client_product_id=").concat($,"&limit=10&recommended=").concat(!t,"&origin=").concat(window.location.hostname,"&status=live,upcoming&event_type=video")).then((e=>e.json())).then((e=>{var i;const o=e=>{var t;return null===(t=e.products)||void 0===t?void 0:t.some((e=>"oos"!=(null===e||void 0===e?void 0:e.product_status)))},r=null===e||void 0===e||null===(i=e.events)||void 0===i?void 0:i.filter((e=>o(e)));if((null===r||void 0===r?void 0:r.length)>0){var a,d,s;const i=t?null===e||void 0===e||null===(a=e.all_events)||void 0===a?void 0:a.filter((e=>o(e))):null===e||void 0===e||null===(d=e.related_events)||void 0===d?void 0:d.filter((e=>o(e))).map((e=>({...e,isRelatedEvent:!0})));(null===i||void 0===i?void 0:i.length)>0&&(null===e||void 0===e||null===(s=e.product_info)||void 0===s?void 0:s.length)>0&&"6749782119"!=Y?n([...r,...i,{event_type:"recommended_images",product_list:[...e.product_info]}]):n([...r,...i])}else n([])})).catch((e=>T(e.message)))}else fetch(q.toString()+"?client_product_id="+$.toString()+"&status="+"upcoming".toString()+"&event_type=video").then((e=>e.json())).then((e=>e.events)).then((e=>(null!=e&&0!=e.length&&(0,o.Htz)(Y)&&(0,o.d0x)(e),n(e),e))).then((e=>((0,o.yoE)(Y)&&function(e,t){setTimeout((async()=>{const n=e.reduce(((e,t)=>[...e,...t.products]),[]).filter((e=>e.client_product_id==t))[0];if(!n||n.product_link==O(window.location.href))return;const i={product_id:n.product_id,product_link:O(window.location.href)};fetch(r.Gc+"/product",{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)})}),500)}(e,$),e))).catch((e=>{T(e.message)}))}),[$]),(0,i.useEffect)((()=>{var e,n;M(-2),(t&&t.length>0||(0,o.uO6)(Y))&&(0,x.PB)({userInteractionType:_.K.PDP_VISITED,widgetSourceDetails:J,event:null===t||void 0===t?void 0:t[0],productList:null===t||void 0===t||null===(e=t[0])||void 0===e?void 0:e.products,ctaList:null===t||void 0===t||null===(n=t[0])||void 0===n?void 0:n.cta})}),[t]),(0,i.useEffect)((()=>{let e=history.pushState;history.pushState=function(){let t=e.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),t};let t=history.replaceState;history.replaceState=function(){let e=t.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),e},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))})),window.addEventListener("locationchange",(function(){if("true"===z){const e=function(e){for(var t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var i=t[n].split("=");if(i[0]==e)return i[1]}return!1}("variant");e&&""!==e&&G(e)}}))}),[]),(0,i.useEffect)((()=>{if(null!=t&&0!==t.length&&!m&&U&&((0,j.A)("whatmore-video-player",(()=>{H(!1)})),null!=W)){const e=t.find((e=>W==e.event_id));if(e)return void ee(e,!0,t.indexOf(e))}}),[t]);const X=J.landingLocationType,Q=J.templateType,ee=async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if((0,u.KE)()&&!t&&await((0,S.j)()?(0,c.QV)():(0,L.B)()),(0,f.B6)(e)||(0,f.WJ)(e))return A||k||(async()=>{const t=(0,w.NY)(X)+(0,w.dS)(Q)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,d.wh)(e),(0,p.Tc)(Y,r.h7,r.dU),(0,s.H4)(e.event_id,e.products,"product_page","video_popup",t)})(),void M(n)};function te(){return(0,P.jsx)(P.Fragment,{})}return null==t||0==t.length||m?(0,P.jsx)("div",{}):(0,P.jsxs)(v.C,{value:C,children:[B&&(0,P.jsx)(I.Z,{}),"no-product"===$||-1===V||0===t.length?(0,P.jsx)(te,{}):-2===V&&t.length>0?(0,P.jsx)("div",{children:(0,P.jsx)(E.u,{userInteractionType:_.K.PDP_POPUP_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!A&&!k,children:(0,P.jsx)(l.Z,{event:t[0],inVideoClick:ee,closeClick:e=>{var n;e.stopPropagation(),M(-1),(0,x.GF)({userInteractionType:_.K.PDP_POPUP_CLOSED,widgetSourceDetails:J,event:null===t||void 0===t?void 0:t[0],productList:null===t||void 0===t||null===(n=t[0])||void 0===n?void 0:n.products})}})})}):(0,P.jsx)("div",{children:(0,P.jsx)(i.Suspense,{children:(0,P.jsx)(E.u,{userInteractionType:_.K.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!A&&!k,children:(0,P.jsx)(D,{events:t,index:V,onBack:function(e){(0,o.n2L)(Y)&&(0,a.MO)("whatmoreAddedToCart")&&(0,h.D)(Y,(()=>{}),100,window.location.hostname,e),M(-2),H(!1)},template:"template-product-page"})})})})]})}},6095:function(e,t,n){function i(e,t){let n=0;let i=new MutationObserver((function(){document.querySelector("."+e)?(t(),i.disconnect()):0==n&&(n=1,setTimeout((()=>{t(),i.disconnect()}),8e3))}));i.observe(document.body,{childList:!0,subtree:!0})}n.d(t,{A:function(){return i}})},6805:function(e,t,n){n.d(t,{$I:function(){return d},$w:function(){return l},AK:function(){return r},AL:function(){return a},YP:function(){return o},me:function(){return i},rE:function(){return s}});const i="device_type",o="device_mode",r="mobile",a="tablet",d="desktop",s="portrait",l="landscape"},9821:function(e,t,n){var i=n(7753),o=n(8866),r=n(6805),a=n(9854);t.Z=function(e){const[t,n,d]=(0,o.Z)(),[s]=(0,i.j1)("whatmoreLandscapePadding"),[l]=(0,i.j1)("whatmoreShopId"),[c]=(0,i.j1)("whatmoreVideoTileSize"),[u]=(0,i.j1)("whatmoreVideoTileSizePortrait"),p=d>=1025,h="portrait"==t?u:c,v=!("portrait"!=t||!(d>=481)),m=h/100*1.3*.5,f=h/100;var w=Math.min(d,n),[g,x,_,E]=[.6*w*(16/9),.6*w,1.4,0];function y(e){return Math.round(10*e)/10}var b={DEVICE_TYPE:r.AK,DEVICE_MODE:r.rE};if(p){const e=x*m,t=g*m;[g,x,_,E]=[t,e,(d-2*s-2*(0,a.mZU)(l))/(1.1*e),s],b[r.me]=r.$I,b[r.YP]=r.$w}else if(v){var I=.8*x,j=.8*g;"portrait"==t?(I*=f,j*=f,[g,x,_,E]=[j,I,y(d/(1.2*I)),0],b[r.me]=r.AL,b[r.YP]=r.rE):([g,x,_,E]=[j,I,(d-2*s)/(1.1*I),s],b[r.me]=r.AL,b[r.YP]=r.$w)}else{I=x,j=g;"portrait"==t?(I=I*f*.9,j=j*f*.9,[g,x,_,E]=[j,I,y(d/(1.15*I)),0],b[r.me]=r.AK,b[r.YP]=r.rE):(I=.7*x,j=.7*g,[g,x,_,E]=[j,I,(d-2*s)/(1.1*I),s],b[r.me]=r.AK,b[r.YP]=r.$w)}return[g,x,_,E,b]}},4522:function(e,t,n){n.d(t,{gW:function(){return s},GF:function(){return l},y4:function(){return u},PB:function(){return p},Z2:function(){return c}});var i=n(9854),o=n(7753),r=n(778);function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(0,o.MO)("whatmoreShopId");(e!=r.K.EVENT_VIEW||(0,i.UAB)(a))&&(e!=r.K.VIDEO_PLAYBACK||(0,i.JP0)(a))&&(e!=r.K.SHOPNOW_ATC_CLICKED&&e!=r.K.PRODUCT_TILE_ATC_CLICKED||(0,i.Tn_)(a))&&(e!=r.K.VIDEO_LIKED||(0,i.sKB)(a))&&(e!=r.K.VIDEO_SHARE_CTA_CLICKED||(0,i.YOU)(a))&&(e!=r.K.PRODUCT_TILE_SHOPNOW_CLICKED&&e!=r.K.SHOPNOW_CLICKED||(0,i.ejq)(a))&&"function"==typeof fbq&&(async()=>{fbq("trackCustom",s[e],{id:null===t||void 0===t?void 0:t.client_product_id,product_url:null===t||void 0===t?void 0:t.product_link,...e===r.K.VIDEO_PLAYBACK?{watch_time:n.watch_time,video_duration:n.video_duration}:{}})})()}var d=n(733);const s={[r.K.EVENT_VIEW]:"whatmore_video_click_event",[r.K.VIDEO_LIKED]:"whatmore_video_like_event",[r.K.VIDEO_SHARE_CTA_CLICKED]:"whatmore_video_share_event",[r.K.PRODUCT_TILE_ATC_CLICKED]:"whatmore_video_atc_event",[r.K.SHOPNOW_ATC_CLICKED]:"whatmore_video_atc_event",[r.K.SHOPNOW_CLICKED]:"whatmore_product_tile_click_event",[r.K.PRODUCT_TILE_SHOPNOW_CLICKED]:"whatmore_product_tile_click_event",[r.K.VIDEO_PLAYBACK]:"whatmore_video_watch_event"};function l(e){var t;let{userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}=e;(0,d.s)({userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}),n in s&&a(n,null!==(t=null===l||void 0===l?void 0:l[1])&&void 0!==t?t:null===l||void 0===l?void 0:l[0])}function c(e){var t;let{userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}=e;(0,d.s)({userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}),n in s&&a(n,null!==(t=null===l||void 0===l?void 0:l[1])&&void 0!==t?t:null===l||void 0===l?void 0:l[0],i)}function u(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a}=e;(0,d.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a})}function p(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a}=e;(0,d.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a})}},7244:function(){}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[312],{3388:function(e,t,n){n.d(t,{OC:function(){return l},e8:function(){return r},kT:function(){return i},kW:function(){return a},xg:function(){return o}});const i=function(e,t){return!((void 0==e.products||0==e.products.length)&&(void 0==e.cta||0==e.cta.length))},o=function(e,t){return!(void 0==e.products||0==e.products.length)},r=function(e,t){if(null!=e)return e},a=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 l=function(e,t){var n;if(null==e)return[];if(!("eventsets"in e))return[];const i=null!==(n=e.eventsets[t])&&void 0!==n?n:null;return i?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(i):[]}},5380:function(e,t,n){n.d(t,{Z:function(){return g}});var i=n(4959),o=n(7313),r=n(4892),a=n(6805),l=n(7753),s=n(9821);var d=function(e){const[t,n,i,o,r]=(0,s.Z)(),[d]=(0,l.j1)("whatmoreEmbedAppVideoPlayerSizePortrait"),[c]=(0,l.j1)("whatmoreEmbedAppVideoPlayerSizeLandscape"),h=r[a.YP]===a.$w?c/100:d/100*1.2;return[t*h,n*h,r]},c=n(9723),h=n(9461),u=n.n(h),p=n(1195),f=n(7108),m=(n(7244),n(123),n(9854)),x=n(6417);var g=function(e){var t;const n=o.useRef(null);var[s,h,g]=d();const v=(0,l.MO)("whatmoreUITheme"),[w]=(0,l.j1)("whatmoreEmbedAppVideoTitle"),[j]=(0,l.j1)("whatmoreEmbedAppPositionPortrait"),[b]=(0,l.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[y]=(0,l.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[E]=(0,l.j1)("whatmoreEmbedAppPositionLandscape"),[S]=(0,l.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[I]=(0,l.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),P=(0,l.MO)("whatmoreShopId");var z=j,_=b,L=y;g[a.YP]===a.$w&&(z=E,_=S,L=I);const[A,C]=(0,o.useState)(["initial",window.pageYOffset]),[k,O]=(0,o.useState)(!1),M=null!==(t=e.isSpotlight)&&void 0!==t&&t,T=g[a.YP]===a.$w?.7*(0,m.zGA)(P):(0,m.zGA)(P),V=M?T:1;s*=V,h*=V;const Y=M?(0,m.G0o)(P):z,Z=M?(0,m.X8j)(P):(0,m.lVn)(P),[D,F]=(0,o.useState)(!M&&(0,m.eXi)(P));function $(e,t){C(e),e[1]<=100?O(!1):t!=k&&(O(t),F(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const n=()=>{const n=window.pageYOffset;Math.abs(n-e)<100||($([n>e?"scrolled-down":"scrolled-up",n],!0),e=n>0?n:0),t=!1},i=()=>{t||(window.requestAnimationFrame(n),t=!0)};return window.addEventListener("scroll",i),()=>window.removeEventListener("scroll",i)}),[A]),(0,i.O3)({ref:n,handler:()=>{$(["scrolled-up",A[1]],!0)}});const R=e.event,N=e.inVideoClick,K=e.closeClick,B=.3*h,W=.6*h,G=.1*h,H=.1*(.5*h),U="round"==v?"10px":"0px",X=(0,m.Z$A)(P);var q=!1,J=0,Q=0;function ee(e){q=e}return(0,x.jsx)("div",{children:D&&!Z?(0,x.jsx)(x.Fragment,{}):k&&Z?(0,x.jsx)("div",{style:"left"===Y?{left:"1px",bottom:M?(0,m.vnu)(P)+"px":L+"px",position:"fixed",zIndex:X}:{right:"5px",bottom:M?(0,m.vnu)(P)+"px":L+"px",position:"fixed",zIndex:X},children:(0,x.jsxs)("div",{onClick:()=>{$(["initial",A[1]],!1)},style:{margin:"1px",width:h+"px",height:s+"px"},className:"left"===Y?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,x.jsx)("div",{style:{overflow:"hidden"},children:(0,x.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,x.jsx)(r.Z,{url:R.thumbnail_image,isPlaying:!1,event:R})})}),(0,x.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,x.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,x.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,x.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,x.jsx)(p.Z,{sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:B+"px"},style:{position:"relative",zIndex:1,left:H+"px",bottom:H+"px"},onClick:K})})}),(0,x.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,x.jsx)(f.Z,{sx:{color:"white",fontSize:2*B+"px",filter:"drop-shadow(0 0 2px black);"}})})]})})]})}):(0,x.jsx)(u(),{nodeRef:n,cancel:".activate-button,.close-btn",defaultClassName:"whatmore-react-draggable",defaultClassNameDragging:"whatmore-react-draggable-dragging",defaultClassNameDragged:"whatmore-react-draggable-dragged",bounds:"html",onStart:(e,t)=>{var n,i;n=t.x,i=t.y,J=n,Q=i},onDrag:(e,t)=>{ee(!0)},onStop:(e,t)=>{q&&(Math.abs(t.x-J)>5||Math.abs(t.y-Q)>5)?ee(!1):N(R)},children:(0,x.jsx)("div",{ref:n,style:"left"===Y?{left:M?(0,m.$II)(P)+"px":_+"px",bottom:M?(0,m.vnu)(P)+"px":L+"px",position:"fixed",zIndex:X}:{right:M?(0,m.$II)(P)+"px":_+"px",bottom:M?(0,m.vnu)(P)+"px":L+"px",position:"fixed",zIndex:X},children:(0,x.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:e.isSpotlight&&"60122562760"==P?s+"px":h+"px",height:e.isSpotlight&&"60122562760"==P?h+"px":s+"px"}),className:"left"===Y?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,x.jsx)("div",{style:{overflow:"hidden",position:"relative"},children:(0,x.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:e.isSpotlight&&"60122562760"==P?16/9:9/16},children:(0,x.jsx)(r.Z,{url:R.thumbnail_image,isMuted:!0,isPlaying:!0,event:R})})}),(0,x.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,x.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,x.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,x.jsx)(p.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:B+"px"},onClick:K,style:{position:"relative",zIndex:1,left:G+"px",bottom:G+"px"}})}),(0,x.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,x.jsx)(c.Z,{sx:{color:(0,m.Ya_)(P),fontSize:W+"px",filter:"drop-shadow(0 0 2px black);"}})}),(0,x.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:U,borderBottomRightRadius:U,backgroundImage:w?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,x.jsxs)("p",{style:{textAlign:"center",color:"white",fontFamily:"Sans-serif",fontWeight:"semi-bold",fontSize:.4*B+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",w]})})]})})]})})})})}},2209:function(e,t,n){n.r(t);var i=n(7313),o=n(9854),r=n(2860),a=n(7753),l=n(5160),s=n(6967),d=n(5380),c=n(58),h=n(8984),u=n(4669),p=n(513),f=n(9302),m=n(7381),x=n(2575),g=n(7300),v=n(6524),w=n(3388),j=n(7643),b=n(778),y=n(364),E=n(7951),S=n(653),I=n(6417);const P=(0,x.Z)({key:"whatmore-css-wsv"}),z=i.lazy((()=>Promise.all([n.e(819),n.e(210),n.e(576),n.e(745),n.e(926),n.e(824),n.e(348),n.e(311)]).then(n.bind(n,6348))));t.default=function(e){const[t,n]=(0,i.useState)(),[x,_]=(0,i.useState)(),[L]=(0,a.j1)("isInDesignMode"),[A]=(0,a.j1)("isDemoBrand"),[C,k]=(0,i.useState)(-2),[O]=(0,a.j1)("whatmoreShopId"),M=(0,a.MO)("isLandingSharedLink"),T=(0,a.MO)("whatmoreShareTemplateId"),V=((0,a.MO)("whatmoreShareStoryId"),(0,a.MO)("whatmoreShareEventId")),Y=(0,a.MO)("whatmoreLandingLocationType"),Z=(0,a.MO)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:D}=(0,i.useContext)(y.I);var F=(0,o.efR)(O)?r.Dm+"/get_eventset/":r.Gc+"/get_eventset/";(0,i.useEffect)((()=>{(0,s.hb)()}),[]),(0,i.useEffect)((()=>{(0,u.ll)(O)}),[]),(0,i.useEffect)((()=>{null==t||0==t.length||x||!(0,h.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||((0,S.j)()?(0,c.b5)(c.UD):(0,E.F)())}),[t]),(0,i.useEffect)((()=>{k(-1);const e=v.NX,t=(0,v.H1)(Y),i=F.toString()+O.toString()+"?eventset_type="+e+"&source="+t+"&source_id="+O;fetch(i).then((e=>e.json())).then((t=>(0,w.OC)(t,e))).then((e=>(n(e),e))).catch((e=>{_(e.message)}))}),[]),(0,i.useEffect)((()=>{k(-2)}),[t]),(0,i.useEffect)((()=>{null==t||0==t.length||x||M&&"template-embed"==(0,v.zv)(T)&&null!=V&&t.forEach(((e,t)=>{V==e.event_id&&N(e,!0,t)}))}),[t]);const $=D.landingLocationType,R=D.templateType,N=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if((0,h.KE)()&&!t&&((0,S.j)()?(0,c.QV)():(0,E.B)()),(0,g.B6)(e)||(0,g.WJ)(e))return L||A||(async()=>{const t=(0,v.NY)($)+(0,v.dS)(R)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,l.wh)(e),(0,u.Tc)(O,r.h7,r.dU),(0,s.H4)(e.event_id,e.products,"spotlight","video_popup",t)})(),void k(n)};function K(){return(0,I.jsx)(I.Fragment,{})}return null==t||0==t.length||x?(0,I.jsx)("div",{}):(Z&&(0,m.EI)(t),(0,o.B$L)(O)&&C<0&&null!==localStorage.getItem("_whatmore_spotlight_viewed")?(0,I.jsx)(I.Fragment,{}):(localStorage.setItem("_whatmore_spotlight_viewed",!0),(0,I.jsx)(f.C,{value:P,children:-1===C||0===t.length?(0,I.jsx)(K,{}):-2===C&&t.length>0?(0,I.jsx)("div",{children:(0,I.jsx)(j.u,{userInteractionType:b.K.SPOTLIGHT_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!L&&!A,children:(0,I.jsx)(d.Z,{event:t[0],inVideoClick:N,closeClick:e=>{e.stopPropagation(),k(-1)},isSpotlight:!0})})}):(0,I.jsx)("div",{children:(0,I.jsx)(i.Suspense,{children:(0,I.jsx)(j.u,{userInteractionType:b.K.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!L&&!A,children:(0,I.jsx)(z,{events:t,index:C,onBack:function(){(0,o.n2L)(O)&&(0,a.MO)("whatmoreAddedToCart")&&(0,p.D)(O,(()=>{}),100,window.location.hostname),k(-2)},template:"template-embed"})})})})})))}},6805:function(e,t,n){n.d(t,{$I:function(){return l},$w:function(){return d},AK:function(){return r},AL:function(){return a},YP:function(){return o},me:function(){return i},rE:function(){return s}});const i="device_type",o="device_mode",r="mobile",a="tablet",l="desktop",s="portrait",d="landscape"},9821:function(e,t,n){var i=n(7753),o=n(8866),r=n(6805),a=n(9854);t.Z=function(e){const[t,n,l]=(0,o.Z)(),[s]=(0,i.j1)("whatmoreLandscapePadding"),[d]=(0,i.j1)("whatmoreShopId"),[c]=(0,i.j1)("whatmoreVideoTileSize"),[h]=(0,i.j1)("whatmoreVideoTileSizePortrait"),u=l>=1025,p="portrait"==t?h:c,f=!("portrait"!=t||!(l>=481)),m=p/100*1.3*.5,x=p/100;var g=Math.min(l,n),[v,w,j,b]=[.6*g*(16/9),.6*g,1.4,0];function y(e){return Math.round(10*e)/10}var E={DEVICE_TYPE:r.AK,DEVICE_MODE:r.rE};if(u){const e=w*m,t=v*m;[v,w,j,b]=[t,e,(l-2*s-2*(0,a.mZU)(d))/(1.1*e),s],E[r.me]=r.$I,E[r.YP]=r.$w}else if(f){var S=.8*w,I=.8*v;"portrait"==t?(S*=x,I*=x,[v,w,j,b]=[I,S,y(l/(1.2*S)),0],E[r.me]=r.AL,E[r.YP]=r.rE):([v,w,j,b]=[I,S,(l-2*s)/(1.1*S),s],E[r.me]=r.AL,E[r.YP]=r.$w)}else{S=w,I=v;"portrait"==t?(S=S*x*.9,I=I*x*.9,[v,w,j,b]=[I,S,y(l/(1.15*S)),0],E[r.me]=r.AK,E[r.YP]=r.rE):(S=.7*w,I=.7*v,[v,w,j,b]=[I,S,(l-2*s)/(1.1*S),s],E[r.me]=r.AK,E[r.YP]=r.$w)}return[v,w,j,b,E]}},7244:function(){}}]);
|