whatmore-react-assets 1.0.367 → 1.0.369
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 +1 -1
- package/static/js/108.23835899.chunk.js +1 -0
- package/static/js/{143.e0163ed7.chunk.js → 143.11d4ffa5.chunk.js} +1 -1
- package/static/js/184.72b4e2f6.chunk.js +1 -0
- package/static/js/303.208b8342.chunk.js +2 -0
- package/static/js/334.84842919.chunk.js +1 -0
- package/static/js/364.30e2338d.chunk.js +1 -0
- package/static/js/530.575b81b1.chunk.js +1 -0
- package/static/js/607.70a43142.chunk.js +1 -0
- package/static/js/67.4ca59d65.chunk.js +1 -0
- package/static/js/68.f1be6d7d.chunk.js +1 -0
- package/static/js/736.12c32ff7.chunk.js +1 -0
- package/static/js/891.7c25eeaa.chunk.js +1 -0
- package/static/js/972.5a85ed0a.chunk.js +1 -0
- package/whatmore.js +2 -2
- package/static/js/166.c59f20bd.chunk.js +0 -1
- package/static/js/184.5f4b68a9.chunk.js +0 -1
- package/static/js/204.fb4f8ecd.chunk.js +0 -1
- package/static/js/26.634dea1e.chunk.js +0 -1
- package/static/js/282.04d1c7e5.chunk.js +0 -2
- package/static/js/468.2c5b7309.chunk.js +0 -1
- package/static/js/517.f5cefba0.chunk.js +0 -1
- package/static/js/602.05967c40.chunk.js +0 -1
- package/static/js/607.1390eb7e.chunk.js +0 -1
- package/static/js/667.1b2b1955.chunk.js +0 -1
- package/static/js/891.d2418050.chunk.js +0 -1
- package/static/js/972.aaca7b6b.chunk.js +0 -1
- /package/static/css/{204.3c3dc8c6.chunk.css → 108.3c3dc8c6.chunk.css} +0 -0
- /package/static/css/{667.b9d66740.chunk.css → 334.b9d66740.chunk.css} +0 -0
- /package/static/css/{517.4d5cedea.chunk.css → 530.4d5cedea.chunk.css} +0 -0
- /package/static/css/{602.4d5cedea.chunk.css → 67.4d5cedea.chunk.css} +0 -0
- /package/static/css/{166.50b9b14a.chunk.css → 68.50b9b14a.chunk.css} +0 -0
- /package/static/css/{26.3c3dc8c6.chunk.css → 736.3c3dc8c6.chunk.css} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[667,166,12],{51:function(e,t,n){n.d(t,{Z:function(){return i}});var c=n(7313),o=n(7753),a=n(5254),r=n(6417);var i=function(e){return(0,c.useEffect)((()=>{const e=(0,a.oo)((0,o.MO)("whatmoreSecondaryColor"));!function(e,t,n,c){const o="rgba(".concat(e,",").concat(t,",").concat(n,",").concat(c,")"),a="\n @keyframes whatmore-loading-indicator-keyframe {\n 0%,\n 100% {\n box-shadow: 0em -2.6em 0em 0em ".concat(o,", 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7);\n }\n 12.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), 1.8em -1.8em 0 0em ").concat(o,", 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5);\n }\n 25% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), 2.5em 0em 0 0em ").concat(o,", 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2);\n }\n 37.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), 1.75em 1.75em 0 0em ").concat(o,", 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2);\n }\n 50% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), 0em 2.5em 0 0em ").concat(o,", -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2);\n }\n 62.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), -1.8em 1.8em 0 0em ").concat(o,", -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2);\n }\n 75% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), -2.6em 0em 0 0em ").concat(o,", -1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2);\n }\n 87.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.5), -2.6em 0em 0 0em rgba(").concat(e,", ").concat(t,", ").concat(n,", 0.7), -1.8em -1.8em 0 0em ").concat(o,";\n }\n }\n "),r=document.createElement("style");r.type="text/css",r.innerHTML=a,document.head.appendChild(r)}(e[0],e[1],e[2],.2)}),[]),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("span",{className:"whatmore-loading-indicator"})})}},4658:function(e,t,n){n.r(t),n.d(t,{default:function(){return z}});var c=n(7313),o=n(6090),a=n(7616),r=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),i=n(2575),s=n(8866),m=n(7753),d=n(7129),l=n(4136),h=(n(3439),n(4892),n(9854)),u=n(3933),g=n(868),f=n(342),b=n(3437),w=n(3455),v=n(6417);var p=function(e){var t;const n=e.isMuted,c=null!==(t=e.iconSize)&&void 0!==t?t:30;function o(){e.onToggle()}return(0,v.jsx)("div",{style:{cursor:"pointer"},children:n?(0,v.jsx)(w.Z,{sx:{color:"white",fontSize:c,filter:"drop-shadow(0 0 5px black);"},onClick:()=>{o()}}):(0,v.jsx)(b.Z,{sx:{color:"white",fontSize:c,filter:"drop-shadow(0 0 5px black);"},onClick:()=>{o()}})})},x=(n(6422),n(264)),y=n(8984),j=n(58);function C(e){const[t,n]=(0,c.useState)(e.initialMuteState);function o(){n(!t),(0,y.KE)()&&(0,j.QV)(),e.onMuteToggle()}e.event;return(0,v.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,v.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:[(0,v.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:[(0,v.jsx)("div",{style:{width:"100%",height:"100%"},onClick:()=>o()}),(0,v.jsx)(p,{isMuted:t,onToggle:()=>{o()}})]}),(0,v.jsx)("div",{style:{width:"100%",height:"100%"},onClick:()=>o()})]})})}var M=function(e){const[t,n,o]=(0,s.Z)(),[a,r]=(0,c.useState)(!0),{whatmoreUITheme:i}=(0,c.useContext)(l.I),d=(0,m.MO)("whatmoreVideoTileSize"),{ref:b,inView:w,entry:p}=(0,u.YD)({triggerOnce:!1}),y=(0,m.MO)("whatmoreShopId"),j=e.event,M=(0,h.nz)(y),k=(0,f.uv)(j),z=(0,f.WN)(j);if("portrait"===t&&!k)return(0,v.jsx)(v.Fragment,{});if("landscape"===t&&!z)return(0,v.jsx)(v.Fragment,{});const P=(0,g.V)("portrait"===t?k:z),Z="portrait"===t?o*(d/100):o*(d/100*.8),S="portrait"===t?Z*(16/9):Z*(9/16);return(0,v.jsxs)("div",{ref:b,style:{margin:"0 auto",width:Z,height:S,padding:"0px",borderRadius:"round"==i?"5px":"0px",boxShadow:"round"==i?M:null,borderWidth:(0,h.al)(y),borderColor:(0,h.qP)(y),overflow:"hidden",cursor:"pointer"},children:[(0,v.jsx)(x.Z,{height:"100%",width:"100%",url:P,isPlaying:w,event:j,isVideoMuted:a}),(0,v.jsx)(C,{event:j,onMuteToggle:()=>r(!a),initialMuteState:a})]})};const k=(0,i.Z)({key:"whatmore-css-bv"});var z=function(e){const[t,n,i]=(0,s.Z)(),{whatmoreRootId:h}=((0,m.MO)("whatmorePrimaryColor"),(0,m.MO)("whatmoreShopId"),(0,m.MO)("whatmoreSecondaryColor"),(0,m.MO)("whatmoreTitleFont"),(0,c.useContext)(l.I)),u=e.events;return delete a.ZP.styles.global,(0,v.jsx)(r.C,{value:k,children:(0,v.jsx)("div",{children:(0,v.jsx)(o.x,{theme:a.ZP,cssVarsRoot:h,resetCSS:!1,children:(0,v.jsx)(d.V.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:(0,v.jsx)(M,{event:u[0]})})})})})}},7129:function(e,t,n){n.d(t,{V:function(){return c}});const c=(0,n(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},3175:function(e,t,n){var c=n(51),o=n(5180),a=n(6417);t.Z=function(e){var t,n;const r=null!==(t=e.height)&&void 0!==t?t:"100%",i=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,a.jsxs)("div",{style:{width:i,height:r,overflow:"hidden",minHeight:r,minWidth:i},children:[(0,a.jsx)(o.Z,{height:r,width:i}),(0,a.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,a.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",width:"100%",height:"fit-content"},children:(0,a.jsx)(c.Z,{})})})]})}},5180:function(e,t,n){var c=n(6417);t.Z=function(e){var t,n,o;const a=null!==(t=e.height)&&void 0!==t?t:"100%",r=null!==(n=e.width)&&void 0!==n?n:"100%",i=null!==(o=e.borderRadius)&&void 0!==o?o:"10px";return(0,c.jsx)("div",{style:{height:a,width:a,borderRadius:i,overflow:"hidden",minHeight:a,minWidth:r,maxHeight:a,maxWidth:r},children:(0,c.jsx)("div",{style:{minHeight:a,minWidth:r},height:"100%",width:"100%",className:"whatmore-shimmer"})})}},2887:function(e,t,n){var c=n(7313),o=(n(6422),n(3175)),a=n(6417);t.Z=function(e){var t,n,r;const[i,s]=(0,c.useState)(!1),m=c.useRef(0),d=(0,c.useRef)(null),l=null!==(t=e.timeUpdateCallback)&&void 0!==t?t:()=>{},h=null!==(n=e.height)&&void 0!==n?n:"100%",u=null!==(r=e.width)&&void 0!==r?r:"100%";return(0,c.useEffect)((()=>{m.current=0;const e=setInterval((()=>{m.current=m.current+.03,d.current&&l(m.current,5),m.current>=5&&(m.current=0)}),30);return()=>{clearInterval(e)}}),[e.isPlaying]),(0,a.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:u,height:h,overflow:"hidden"},children:[(0,a.jsx)("div",{style:{width:i?"100%":"0px",height:i?"100%":"0px"},children:(0,a.jsx)("img",{ref:d,src:e.url,style:{objectFit:"cover",height:h,width:u,backgroundColor:"white"},alt:"image player",onLoad:()=>{s(!0)}})}),i?(0,a.jsx)(a.Fragment,{}):(0,a.jsx)(o.Z,{width:u,height:h})]})}},4892:function(e,t,n){n.d(t,{Z:function(){return l}});var c=n(7313),o=n(3933),a=n(868),r=n(8984),i=n(7300),s=(n(6422),n(2887)),m=n(6417);var d=function(e){var t,n;const a=(0,c.useRef)(null),[r,i,s]=(0,o.YD)({triggerOnce:!0}),d=null!==(t=e.height)&&void 0!==t?t:"100%",l=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,c.useEffect)((()=>{a.current&&(e.isPlaying?a.current.play():a.current.pause())}),[e.isPlaying,i]),(0,m.jsx)("div",{ref:r,style:{width:d,height:l,overflow:"hidden"},children:i?(0,m.jsx)("video",{ref:a,className:"whatmore-video-player",width:l,height:d,preload:"auto",loop:!0,playsInline:!0,muted:!0,autoPlay:!0,src:e.url,style:{backgroundColor:"white"}}):(0,m.jsx)("div",{width:l,height:d,ref:e=>{e&&e.style.setProperty("display","block","important")}})})};var l=function(e){var t,n,l;const[h,u,g]=(0,o.YD)({triggerOnce:!0});if((0,i.WJ)(e.event))return(0,m.jsx)(s.Z,{height:e.height,width:e.width,url:e.url,isPlaying:e.isPlaying,timeUpdateCallback:e.timeUpdateCallback});const f=null!==(t=e.pauseFromPlayTimeInMs)&&void 0!==t?t:200;if((0,r.KE)())return(0,m.jsx)(d,{height:"100%",width:"100%",url:(0,a.V)(e.url),isPlaying:e.isPlaying,pauseFromPlayTimeInMs:f});const b=(0,c.useRef)(null),w=null!==(n=e.height)&&void 0!==n?n:"100%",v=null!==(l=e.width)&&void 0!==l?l:"100%";return(0,c.useEffect)((()=>{b.current&&(e.isPlaying?b.current.play():b.current.pause())}),[e.isPlaying,u]),(0,m.jsx)("div",{ref:h,style:{width:w,height:v,overflow:"hidden"},children:u?(0,m.jsx)("video",{ref:b,className:"whatmore-video-player",width:v,height:w,preload:"auto",loop:!0,playsInline:!0,muted:!0,src:(0,a.V)(e.url),style:{backgroundColor:"white"}}):(0,m.jsx)("div",{width:v,height:w,ref:e=>{e&&e.style.setProperty("display","block","important")}})})}},868:function(e,t,n){n.d(t,{V:function(){return i}});var c=n(9854),o=n(7753);const a={"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"},r={"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(e){const t=(0,o.MO)("whatmoreShopId");if(!e)return e;if(e.startsWith("https://cdn.shopify.com"))return e;if("AWSCDN"==(0,c.zp)(t))return e;if("AZURECDN"==(0,c.zp)(t)){if(e.includes(".azureedge.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(a))if(e.includes(t))return e.replace(t,a[t]);return e}}if("BUNNYCDN"==(0,c.zp)(t)){if(e.includes(".b-cdn.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(r))if(e.includes(t))return e.replace(t,r[t]);return e}}return e}},6422:function(e,t,n){var c=n(7313),o=n(7753);t.Z=function(e){const[t,n]=(0,o.j1)("muted");return(0,c.useEffect)((()=>{}),[]),[t,n]}},8866:function(e,t,n){var c=n(7313);function o(){return[window.innerHeight,window.innerWidth]}t.Z=function(e){var[t,n]=o();const[a,r]=(0,c.useState)(["portrait",t,n]);return(0,c.useLayoutEffect)((()=>{function e(){var[e,t]=o();r(e>t?["portrait",e,t]:["landscape",e,t])}return window.addEventListener("resize",e),window.addEventListener("orientationchange",e),screen.orientation&&screen.orientation.addEventListener("change",e),e(),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e),screen.orientation&&screen.orientation.removeEventListener("change",e)}}),[]),a}},9723:function(e,t,n){var c=n(5318);t.Z=void 0;var o=c(n(5045)),a=n(6417),r=(0,o.default)((0,a.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");t.Z=r},3439:function(){},123:function(){},7244:function(){}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[891],{4095:function(e,t,i){i.r(t),i.d(t,{default:function(){return Z}});var n=i(7313),r=i(6090),o=i(7616),s=(i(6143),i(7850),i(4444),i(7244),i(123),i(5892),i(1811),i(9302)),l=i(2575),a=i(2210),d=i(8486),p=i(9821),c=i(8866),h=i(2279),x=i.n(h),m=i(7753),y=i(7129),u=i(9854),f=i(4136),g=i(1855),w=i(4892),v=i(3933),j=i(1092),C=i(5945),P=i(5456),b=i(3867),I=i(9219),k=i(6417);const F=n.lazy((()=>Promise.all([i.e(576),i.e(803),i.e(607),i.e(12)]).then(i.bind(i,6163))));var O=function(e){const{whatmoreUITheme:t}=(0,n.useContext)(f.I);var[i,r]=(0,p.Z)();const[o]=(0,m.j1)("whatmorePrimaryFont"),[s]=(0,m.j1)("whatmoreSecondaryColorShade900"),[l]=(0,m.j1)("whatmoreShopId"),[a,d]=(0,n.useState)(0),[c,h]=(0,n.useState)(e.event),x=e.onClick,y=c.products.length;if(0==y)return(0,k.jsx)(k.Fragment,{});(0,n.useEffect)((()=>{const e=setInterval((()=>{d((e=>(e+1)%y))}),4e3);return()=>{clearInterval(e)}}),[]),(0,n.useEffect)((()=>{(0,u.N8)(l)&&(0,I.p_)(c,(0,u.Ip)(l),l).then((e=>{h(e)}))}),[]);const g=.3*r,w=g+"px",v=g+"px",j=.05*r+"px",O=.07*r,S=O+"px",M=.05*r;return(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-around",alignItems:"center",marginTop:"2px",marginBottom:"2px",gap:"0px"},children:[(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:.95*r,height:"fit-content",paddingLeft:"4px",paddingRight:"4px",justifyContent:"space-between",alignItems:"center",gap:"4px"},className:"whatmore-event-tile-product-scale-in-and-out-animation",onClick:x,children:[(0,k.jsx)("div",{style:{width:w,height:v,overflow:"hidden",backgroundColor:s,borderRadius:"round"==t?"5px":"0px",borderWidth:"0px"==(0,u.al)(l)?"2px":(0,u.al)(l),borderColor:"white"==(0,u.qP)(l)?s:(0,u.qP)(l)},children:(0,k.jsx)("img",{ref:e=>{e&&e.style.setProperty("object-fit",(0,u.yO)(l),"important")},src:c.products[a].thumbnail_image,style:{width:w,height:w,borderRadius:"round"==t?"5px":"0px",backgroundColor:s},alt:"product image"})}),(0,k.jsx)("div",{style:{width:.7*r+"px",height:"100%",overflow:"visible",marginBottom:"2px",marginRight:"2px",borderRadius:"round"==t?"5px":"0px"},children:(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",paddingTop:"5px"},children:[(0,k.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,k.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color","black","important"),e.style.setProperty("font-size",j,"important"),e.style.setProperty("line-height","140%","important"),e.style.setProperty("font-family",o,"important"),e.style.setProperty("-webkit-line-clamp",2,"important"),e.style.setProperty("line-clamp",2,"important"),e.style.setProperty("-webkit-box-orient","vertical","important"),e.style.setProperty("display","-webkit-box","important"),e.style.setProperty("overflow","hidden","important"),e.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"medium"},children:(0,C.s)(c.products[a].title)})}),(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center",gap:"4px"},children:[(0,k.jsxs)("p",{ref:e=>{e&&(e.style.setProperty("color","black","important"),e.style.setProperty("font-size",S,"important"),e.style.setProperty("line-height","140%","important"),e.style.setProperty("font-family",o,"important"))},style:{textAlign:"left",fontWeight:"medium",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:1,overflow:"hidden",textOverflow:"ellipsis"},children:[" ",(0,I.jx)(parseFloat(c.products[a].price),"",l,c.products[a].currency)]}),(0,k.jsx)("div",{children:(0,P.B)(c.products[a].price,c.products[a].compare_price)?(0,k.jsxs)("strike",{ref:e=>{e&&(e.style.setProperty("color","gray","important"),e.style.setProperty("font-size",.9*O+"px","important"),e.style.setProperty("line-height","140%","important"),e.style.setProperty("font-family",o,"important"),e.style.setProperty("text-decoration","line-through","important"))},style:{textAlign:"left",fontWeight:"medium",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:1,overflow:"hidden",textOverflow:"ellipsis"},children:[" ",(0,I.jx)(parseFloat(c.products[a].compare_price),"",l,c.products[a].currency)]}):(0,k.jsx)(k.Fragment,{})})]}),(0,k.jsx)(b.Z,{storeId:l,productId:c.products[a].client_product_id,productLink:c.products[a].product_link,fontSize:M})]})})]},a),(0,u.IX)(l)?(0,k.jsx)(n.Suspense,{children:(0,k.jsx)(F,{baseFontSize:.05*r,event:c,product:c.products[0],width:.9*r,height:"fit-content"})}):(0,k.jsx)(k.Fragment,{})]})},S=i(3388);function M(e){const[t,i,r,o,s]=(0,p.Z)(),{whatmoreUITheme:l}=(0,n.useContext)(f.I),a=(0,m.MO)("whatmoreShowViews"),d=(0,m.MO)("whatmoreShopId"),c=((0,m.MO)("whatmoreSecondaryColorShade600"),e.PRODUCT_BOX_HEIGHT),h=e.PRODUCT_BOX_HEIGHT_IN_PX,x=e.PRODUCT_BOX_MARGIN,[y,g,w]=(0,v.YD)({triggerOnce:!0}),C=e.event;e.isOnFocus;return(0,k.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:[(0,k.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"flex-start",alignItems:"center",width:"100%"},onClick:()=>{e.onClick(C)},children:"show"===a?(0,k.jsx)("div",{style:{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px"},children:(0,k.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",paddingLeft:"5px",width:"fit-content",height:"fit-content",justifyContent:"space-between",alignItems:"center"},children:(0,k.jsx)(j.Z,{event:C,fontSize:.07*i+"px"})})}):(0,k.jsx)(k.Fragment,{})}),(0,k.jsx)("div",{style:{display:"flex",width:"100%",height:t-c+"px"},onClick:()=>{e.onClick(C)}}),(0,S.xg)(C,d)?(0,k.jsx)("div",{style:{position:"relative",zIndex:1,bottom:x+"px",display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignItems:"center",width:.95*i,height:h,marginLeft:x+"px",marginRight:x+"px",backgroundColor:"white",borderRadius:"round"==l?"5px":"0px",borderWidth:(0,u.al)(d),borderColor:(0,u.qP)(d),paddingLeft:"5px",paddingRight:"5px",overflow:"hidden"},children:(0,k.jsx)("div",{ref:y,children:g&&(0,u.PW)(d)?(0,k.jsx)(O,{event:C,onClick:()=>{e.onClick(C)}}):(0,k.jsx)("div",{height:"20px"})})}):(0,k.jsx)(k.Fragment,{})]})})}var _=function(e){var t,i,r;const[o,s,l,a,d]=(0,p.Z)();var c=(0,n.useContext)(y.V);const{whatmoreUITheme:h}=(0,n.useContext)(f.I),x=(0,m.MO)("whatmoreShopId"),g=(0,m.MO)("whatmoreSecondaryColorShade600"),v=e.event,j=e.onClick,C=null===(t=e.isOnFocus)||void 0===t||t,P=null!==(i=e.playOnUnfocus)&&void 0!==i&&i,b=null!==(r=e.animateOnFocus&&(0,u.iW)(x))&&void 0!==r&&r,I=(0,u.IX)(x)?.7:.8,F=o*I+"px",O=1-I,_=o*O,R=o*O+"px",T=o*O*.1,z=(0,u.nz)(x);return(0,k.jsxs)("div",{ref:e=>{e&&(e.style.setProperty("margin-top",c.tileTopMargin+"px","important"),e.style.setProperty("margin-bottom",c.tileBottomMMargin+"px","important"))},style:{margin:"0 auto",width:s+"px",height:1.2*o+"px",borderRadius:"round"==h?"5px":"0px",boxShadow:"round"==h?z:null,borderWidth:(0,u.al)(x),borderColor:(0,u.qP)(x),overflow:"hidden",cursor:"pointer",position:"relative"},className:b?C?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",onClick:()=>{},children:[(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"flex-start",alignItems:"center"},children:[(0,k.jsx)(w.Z,{height:F,width:"100%",url:v.thumbnail_image,isPlaying:C||P,event:v}),(0,S.xg)(v,x)?(0,k.jsx)("div",{style:{width:"100%",height:R,backgroundColor:g}}):(0,k.jsx)(k.Fragment,{})]}),(0,k.jsx)(M,{event:v,isOnFocus:C,PRODUCT_BOX_HEIGHT:_,PRODUCT_BOX_HEIGHT_IN_PX:R,PRODUCT_BOX_MARGIN:T,onClick:j})]})};const R=(0,l.Z)({key:"whatmore-css-hv"});function T(e){const[t,i,n]=(0,p.Z)(),r=(0,m.MO)("whatmoreShopId"),o=e.events,s=e.onClick;return(0,k.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,k.jsx)("div",{style:{width:window.innerWidth,height:"fit-content"},children:(0,k.jsx)(a.tq,{slidesPerView:n*(0,u.u6)(r),initialSlide:o.length>1?1:0,centeredSlides:!0,centeredSlidesBounds:!0,watchSlidesProgress:!0,touchRatio:.5,children:o.map((e=>(0,k.jsx)(a.o5,{children:t=>{let{isActive:i,isPrev:n,isNext:r,isVisible:o}=t;return n||r||i?(0,k.jsx)(_,{isOnFocus:i&&o,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{s(e)}}):(0,k.jsx)(g.Z,{})}},"whatmore-event-tile-portrait-"+e.index)))})})})}function z(e){const[t,i,r,o]=(0,p.Z)(),[s,l]=(0,n.useState)((c=r,Math.floor(Math.random()*Math.floor(c))));var c;const h=e.onClick,m=e.events,y=Math.min(r,m.length);return(0,k.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:o+"px",paddingRight:o+"px"},children:(0,k.jsx)("div",{style:{width:i*y*1.1+"px"},children:(0,k.jsx)(a.tq,{slidesPerView:y,watchSlidesProgress:!0,modules:[d.W_],navigation:!0,slidesPerGroup:parseInt(y),children:m.map(((e,t)=>{const i=x()((()=>l(t)),300);return(0,k.jsx)(a.o5,{onMouseEnter:()=>{i()},onMouseLeave:()=>{i.cancel()},children:i=>{let{isActive:n,isPrev:r,isNext:o,isVisible:l}=i;return l?(0,k.jsx)(_,{isOnFocus:t==s,playOnUnfocus:!0,animateOnFocus:!0,event:e,onClick:()=>{h(e)}}):(0,k.jsx)(g.Z,{})}},"whatmore-event-tile-landscape-"+e.index)}))})})})}var Z=function(e){var t;const[i,l,a]=(0,c.Z)(),[d]=(0,m.j1)("whatmorePrimaryColor"),[p]=(0,m.j1)("whatmoreShopId"),[h]=(0,m.j1)("whatmoreSecondaryColor"),[x]=(0,m.j1)("whatmoreTitleFont"),g="portrait"==i?(0,m.MO)("whatmoreTitleFontSizePortrait"):(0,m.MO)("whatmoreTitleFontSize"),{whatmoreRootId:w}=(0,n.useContext)(f.I),v=e.events,j=e.onClick,C=null!==(t=(0,u.aR)(p))&&void 0!==t?t:x;function P(e){j(e)}return delete o.ZP.styles.global,(0,k.jsx)(s.C,{value:R,children:(0,k.jsx)("div",{children:(0,k.jsx)(r.x,{theme:o.ZP,cssVarsRoot:w,resetCSS:!1,children:(0,k.jsxs)(y.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!1},children:[e.heading.trim().length>0?(0,k.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,k.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-family",C,"important"),e.style.setProperty("font-size",g+"px","important"))},style:{color:d,backgroundClip:"text",textAlign:"center"},children:e.heading})}):(0,k.jsx)(k.Fragment,{}),"landscape"===i?(0,k.jsx)(z,{events:v,onClick:P}):(0,k.jsx)(T,{events:v,onClick:P})]})})})})}},1092:function(e,t,i){var n=i(237),r=i(9854),o=i(7753),s=i(4136),l=i(7313),a=i(6417);function d(e){return e<1e3?e:e<1e5?(e/1e3).toFixed(0)+"K":(e/1e5).toFixed(0)+"L"}t.Z=function(e){const{whatmoreUITheme:t}=(0,l.useContext)(s.I),i=(0,o.MO)("whatmoreShopId"),p=(0,o.MO)("whatmorePrimaryFont"),c=e.event,h=e.fontSize;if(c.total_views<=0)return(0,a.jsx)(a.Fragment,{});const x=(0,r.S_)(i);return"template-icon"==x?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,r.XC)(i),color:"white",borderRadius:"round"==t?"5px":"0px",borderWidth:(0,r.al)(i),borderColor:(0,r.qP)(i)},children:(0,a.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:[(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)(n.Z,{sx:{color:(0,r.aL)(i)+" !important",fontSize:h,fontWeight:"normal"}})}),(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,r.aL)(i),"important"),e.style.setProperty("line-height","120%","important"),e.style.setProperty("font-family",p,"important"),e.style.setProperty("font-size",h,"important"),e.style.setProperty("display","flex","important"))},style:{alignItems:"center",fontWeight:"normal"},children:" "+d(c.total_views)+" "})})]})})}):"template-text"==x?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,r.XC)(i),color:"white",borderRadius:"round"==t?"5px":"0px",borderWidth:(0,r.al)(i),borderColor:(0,r.qP)(i)},children:(0,a.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,r.aL)(i),"important"),e.style.setProperty("line-height","120%","important"),e.style.setProperty("font-family",p,"important"))},style:{fontSize:h,fontWeight:"bold"},children:" "+d(c.total_views)+" views"})})})})}):void 0}},7129:function(e,t,i){i.d(t,{V:function(){return n}});const n=(0,i(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},1855:function(e,t,i){var n=i(7313),r=i(9821),o=i(7129),s=i(6417);t.Z=function(e){var[t,i]=(0,r.Z)();return(0,n.useContext)(o.V),e.event,(0,s.jsx)("div",{style:{margin:"0 auto",width:i,height:t,overflow:"hidden"}})}},237:function(e,t,i){var n=i(5318);t.Z=void 0;var r=n(i(5045)),o=i(6417),s=(0,r.default)((0,o.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");t.Z=s}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[972],{7381:function(e,t,n){n.d(t,{E:function(){return r}});function o(e){console.debug("Whatmore : "+e)}function r(e){var t;const n=null!==(t="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==t&&t;n&&(o("total events received : "+(e&&e.length)),o("events data : "+JSON.stringify(e)))}},3972:function(e,t,n){n.r(t),n.d(t,{default:function(){return L}});var o=n(7753),r=n(7313),i=n(2860),a=n(499),s=n(4897),c=n(5160),u=n(9854),d=n(6967),l=n(8984),h=n(58),p=n(4669),v=n(941),m=n(4136),g=n(7300),f=n(6524),y=n(6417);const b=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(319),n.e(367),n.e(240),n.e(210),n.e(926),n.e(950),n.e(282),n.e(891)]).then(n.bind(n,4095)))),S=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(319),n.e(367),n.e(240),n.e(576),n.e(950),n.e(468),n.e(517)]).then(n.bind(n,5523)))),_=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(319),n.e(367),n.e(926),n.e(950),n.e(358)]).then(n.bind(n,3827)))),T=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(319),n.e(367),n.e(926),n.e(950),n.e(870)]).then(n.bind(n,6071)))),w=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(319),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)))),I=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(319),n.e(240),n.e(576),n.e(210),n.e(803),n.e(926),n.e(607),n.e(282),n.e(166)]).then(n.bind(n,2607)))),x=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(319),n.e(367),n.e(240),n.e(210),n.e(926),n.e(950),n.e(959)]).then(n.bind(n,4048)))),C=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(319),n.e(367),n.e(240),n.e(576),n.e(950),n.e(468),n.e(602)]).then(n.bind(n,8091)))),E=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(319),n.e(240),n.e(576),n.e(210),n.e(803),n.e(926),n.e(607),n.e(282),n.e(667)]).then(n.bind(n,4658))));var O=function(e){const[t]=(0,o.j1)("isInDesignMode"),[n]=(0,o.j1)("isDemoBrand"),[O]=(0,o.j1)("whatmoreTopBottomPadding"),[P]=(0,o.j1)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:M}=(0,r.useContext)(m.I),[k]=(0,o.j1)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:D}=(0,r.useContext)(m.I),L=(0,o.MO)("isLandingSharedLink"),N=(0,o.MO)("whatmoreShareTemplateId"),A=(0,o.MO)("whatmoreShareStoryId"),G=(0,o.MO)("whatmoreShareEventId"),[J,Z]=(0,r.useState)(-1),[z,H]=(0,r.useState)(null);var U=e.events,B=null;function R(e){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,l.KE)()&&!o&&(0,h.QV)(),t||n||(async()=>{const t=B[e].events[0];(0,c.wh)(t),(0,p.Tc)(k,i.Xh,i.OW),(0,d.H4)(t.event_id,t.products,"homepage","stories")})();var a=0;null!=r&&B[e].events.map(((e,t)=>{e.event_id==r&&(a=t)})),Z(a),H(e)}function V(e){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,l.KE)()&&!o&&(0,h.QV)(),(0,g.B6)(e)||(0,g.WJ)(e))return t||n||(async()=>{(0,c.wh)(e),(0,p.Tc)(k,i.Xh,i.pR),(0,d.H4)(e.event_id,e.products,"homepage","carousel")})(),void Z(e.index);const r=20;var{status:u,bannerText:v,timeToStartInMins:m}=s.Z.getEventStatus(e);m<=r&&u.name!==a.Z.LIVE.name?console.debug(" TODO : show toast on upcoming live event."):Z(e.index)}function W(e){return(0,y.jsx)(y.Fragment,{})}return M&&!B&&(B=function(e){var t=e.reduce(((e,t,n)=>{var o=t.storyset_id;return o in e?(e[o].total_events=e[o].total_events+1,e[o].events.push(t)):e[o]={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}(U)),(0,r.useEffect)((()=>{L&&D==(0,f.zv)(N)&&(null!=A&&M?B.forEach(((e,t)=>{A==e.id&&R(t,!0,G)})):null!=G&&U.forEach(((e,t)=>{G==e.event_id&&V(e,!0)})))}),[]),(0,y.jsxs)("div",{children:[(0,y.jsx)("div",{style:{marginTop:(M?P:O)+"px",marginBottom:(M?P:O)+"px"},children:"template-b"===D?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(b,{events:U,onClick:V,heading:e.heading})}):"template-a-1"===D?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(S,{events:U,onClick:V,heading:e.heading})}):"template-feed-a"===D?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(C,{events:U,onClick:V,heading:e.heading})}):"template-collections-a"===D||"template-c"===D?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(_,{events:U,onClick:V,heading:e.heading})}):"template-collections-b"===D||"template-d"===D?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(T,{events:U,onClick:V,heading:e.heading})}):"template-collections-c"===D||"template-e"===D?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(w,{events:U,onClick:V,heading:e.heading})}):"template-collections-d"===D?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(b,{events:U,onClick:V,heading:e.heading})}):"template-collections-e"===D?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(x,{events:U,onClick:V,heading:e.heading})}):"template-banner-a"===D?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(E,{events:U})}):M?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(j,{eventsStories:B,onClick:R,template:D})}):(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(x,{events:U,onClick:V,heading:e.heading})})}),-1==J?(0,y.jsx)(W,{}):(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I,{events:U,index:J,onBack:function(e){(0,u.n2)(k)&&(0,o.MO)("whatmoreAddedToCart")&&(0,v.D)(k,(()=>{}),100,window.location.hostname),Z(-1)},slideDirection:M||"horizontal"===(0,u.e8)(k)?"horizontal":"vertical",eventsStories:B,initialStoryIndex:z,template:D})})]})};const P=function(e,t,n){const r=(0,o.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)),{}),a=Object.keys(i);if("60960964855"==r&&"undefined"!=typeof fera&&"function"===typeof fera.getRatings){var s={};fera.getRatings(a,(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]="+a.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 M=n(3388),k=n(7381);var D=function(e){const[t,n]=(0,r.useState)(),[a,s]=(0,r.useState)(),{whatmoreIsStoriesTemplate:c}=(0,r.useContext)(m.I),{whatmoreIsCollectionsTemplate:p}=(0,r.useContext)(m.I),{whatmoreIsBannerTemplate:v}=(0,r.useContext)(m.I),[g]=(0,o.j1)("whatmoreShopId"),[b]=(0,o.j1)("whatmoreCollectionId"),S=(0,o.MO)("whatmoreLandingLocationType"),_=(0,o.MO)("whatmoreLoggingActive"),T=(0,u.cZ)(g)?window.location.href.split(/[?#]/)[0]:b,[w,j]=(0,o.j1)("productRatings");var I=(0,u.ef)(g)?i.Dm+"/v2/events/":i.Gc+"/v2/events/",x=(0,u.ef)(g)?i.Dm+"/get_eventset/":i.Gc+"/get_eventset/",C=(0,u.ef)(g)?i.Dm+"/v2/collection":i.Gc+"/v2/collection",E=(0,u.ef)(g)?i.Dm+"/v2/brand/"+g+"/product-events":i.Gc+"/v2/brand/"+g+"/product-events",D=e.shopId,L="live,upcoming";return(0,r.useEffect)((()=>{(0,d.hb)()}),[]),(0,r.useEffect)((()=>{null==t||0==t.length||a||!(0,l.KE)()||(0,o.MO)("whatmoreVideoPlayerPoolInitiated")||(0,h.b5)(h.UD)}),[t]),(0,r.useEffect)((()=>{var e;if(S.startsWith("product")){const t=(0,o.MO)("whatmoreProductId");e=E.toString()+"?client_product_id="+t.toString()+"&status="+L.toString()+"&event_type=video"}else if(p)e=C.toString()+"?store_id="+D.toString()+"&client_collection_id="+T;else if(v){const t=f.ls,n=(0,f.H1)(S);e=x.toString()+D.toString()+"?eventset_type="+t+"&source="+n+"&source_id="+g}else e=I.toString()+D.toString()+"?status="+L.toString()+"&is_active="+"true".toString()+(c?"&template_type=stories":"");fetch(e).then((e=>e.json())).then((e=>{if(v){const t=f.ls;return(0,M.OC)(e,t)}return(0,M.kW)(e,p)})).then((e=>(_&&console.debug("initial received events size : "+e.length),c||v?e:(0,M.e8)(e,D)))).then((e=>(null!=e&&0!=e.length&&(0,u.LU)(g)&&function(e,t,n){const r=setInterval((()=>{null===(0,o.MO)("productRatings")&&P(e,t,n)}),1e3);setTimeout((()=>{clearInterval(r)}),1e4)}(g,e,(e=>{j(e)})),e))).then((e=>{null==e||0==e.length||c||(0,u.NO)(D,e),n(e)})).catch((e=>{s(e.message)}))}),[]),null==t||0==t.length||a?(0,y.jsx)("div",{}):(_&&(0,k.E)(t),function(e,t){if(null!=e){var n=0;e.forEach((e=>{e.index=n++}))}}(t),_&&console.debug("final transformed events data : "+JSON.stringify(t)),_&&console.debug("valid events size : "+t.length),(0,y.jsx)("div",{children:(0,y.jsx)(O,{heading:e.heading,events:t})},"whatmore-main-coponent"))};var L=function(e){const[t]=(0,o.j1)("isInDesignMode"),[n]=(0,o.j1)("isDemoBrand"),[a]=(0,o.j1)("whatmoreShopId"),[s]=(0,o.j1)("whatmoreHeading"),[c]=(0,o.j1)("whatmorePrimaryColor"),[u]=(0,o.j1)("whatmoreSecondaryColor");return(0,r.useEffect)((()=>{(0,p.ll)(a)}),[]),(0,y.jsx)(y.Fragment,{children:(0,y.jsx)("div",{children:t||n?(0,y.jsx)("div",{children:(0,y.jsx)(D,{heading:s,shopId:i.aA})}):(0,y.jsx)("div",{children:(0,y.jsx)(D,{heading:s,shopId:a})})})})}},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 o=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,a=e.time_zone;if(i.toUpperCase()==o.Z.LIVE.name)return{status:o.Z.LIVE,bannerText:" "+o.Z.LIVE.name+" ",timeToStartInMins:0};if(i.toUpperCase()==o.Z.UPCOMING.name){var s=new Date(r+" "+t+" "+a),c=(new Date(r+" "+n+" "+a),function(e){var t=new Date,n=(e.getTime()-t.getTime())/1e3,r=n/60,i=r/60,a=i/24;return n<=0?{status:o.Z.COMPLETED,bannerText:" "+o.Z.COMPLETED.name+" ",timeToStartInMins:0}:n>=1&&n<=30?{status:o.Z.UPCOMING,bannerText:"Starts in "+Math.round(n)+" sec ",timeToStartInMins:n/60}:r<60?{status:o.Z.UPCOMING,bannerText:"Starts in "+Math.round(r)+" min ",timeToStartInMins:r}:i<24?{status:o.Z.UPCOMING,bannerText:"Starts in "+Math.round(i)+" hr ",timeToStartInMins:60*i}:a<7?{status:o.Z.UPCOMING,bannerText:" "+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()]+" ",timeToStartInMins:60*a*24}:{status:o.Z.UPCOMING,bannerText:"Upcoming",timeToStartInMins:2880}}(s));return{status:c.status,bannerText:c.bannerText,timeToStartInMins:c.timeToStartInMins}}return console.error("invalid status for event :: id : "+e.event_id+", status : "+e.status),{status:o.Z.DEFAULT,bannerText:"live event",timeToStartInMins:2880}}}},941:function(e,t,n){n.d(t,{D:function(){return o}});const o=async function(e,t,n,o){if("STRNV8MHJTF"!=e&&"STR6HU283UZ"!=e&&"STR9T3LLEJB"!=e&&"STRWJMIOJNX"!=e&&"STRUDQ36YAC"!=e&&"STR1D5ONOZX"!=e){var r=await fetch("https://"+window.location.hostname+"/cart.js",{cache:"reload"}).then((e=>e.json()));if("27358003275"==e||"63748341981"==e||"68237558034"==e)document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0,detail:{cart:r,openMiniCart:!0}}));else if("19506115"==e)window.PXUTheme.jsAjaxCart.showDrawer(),window.PXUTheme.jsAjaxCart.updateView();else if("54465429691"==e)refreshCart(r),window.setTimeout((function(){$.fancybox.close(),$(".cart-button").click()}),500);else if("25427564"==e||"4243849314"==e||"57708314789"==e){(new theme.CartDrawer).open()}else if("62602182872"==e||"57362710572"==e)CartJS.getCart(),$(".block-cart").addClass("active");else if("60492578980"==e||"12183765088"==e||"58546946211"==e||"42070737058"==e||"71321583919"==e||"68492624171"==e||"74541891876"==e)document.documentElement.dispatchEvent(new CustomEvent("ajaxProduct:added",{bubbles:!0,detail:{}})),document.documentElement.dispatchEvent(new CustomEvent("cart:open",{bubbles:!0,detail:{}}));else if("2665447536"==e)fetch("/?section_id=cart-drawer").then((e=>e.text())).then((e=>{const t=(new DOMParser).parseFromString(e,"text/html").getElementById("cart-drawer").innerHTML;$("#cart-drawer").html(t),$('[aria-controls="cart-drawer"]')[0].click(),$(".header__cart-count .count-bubble ").html(cart.item_count).css("opacity",1)}));else if("57824805033"==e||"59504656436"==e||"58112966749"==e)fetch("/cart.json").then((e=>e.json())).then((e=>{fetch("/cart?view=item").then((e=>e.text())).then((t=>{const n=(new DOMParser).parseFromString(t,"text/html"),o=n.getElementById("CartDrawer"),r=document.getElementById("CartDrawer");o&&r&&(r.innerHTML=o.innerHTML),n.querySelector("#CartDrawer .totals__subtotal-value");const i=document.querySelector("cart-drawer");i&&i.classList.remove("is-empty");const a=document.querySelector("cart-drawer-items");a&&a.classList.remove("is-empty");const s=document.getElementById("cart-icon-bubble");if(s.querySelector(".cart-count-bubble"))s.querySelectorAll('.cart-count-bubble span[aria-hidden="true"]').forEach((t=>{t.textContent=e.item_count}));else{const t=document.createElement("div");t.className="cart-count-bubble",t.innerHTML='\n <span aria-hidden="true">'.concat(e.item_count,'</span>\n <span class="visually-hidden">').concat(e.item_count," items</span>\n "),s.appendChild(t)}s.click(),document.getElementById("CartDrawer-Overlay").addEventListener("click",(()=>{const e=document.querySelector("cart-drawer");e&&e.classList.remove("active"),document.body.classList.remove("overflow-hidden")}))}))}));else if("61094723750"==e)SLIDECART&&(SLIDECART_UPDATE(),SLIDECART_OPEN());else if("10272035"==e){const e=document.querySelector(".cart-drawer"),t=e.parentNode;t.classList.add("menu-opening"),t.setAttribute("open","open"),e.style.visibility="visible",e.style.transform="translate(0)"}else document.documentElement.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{}}));setTimeout(t,n)}else{console.log("Executing cart refresh script..");document.getElementById("whatsmorecart").value=Math.random()}}},3388:function(e,t,n){n.d(t,{OC:function(){return s},e8:function(){return i},kT:function(){return o},kW:function(){return a},xg:function(){return r}});const o=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==o(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 s=function(e,t){var n;if(null==e)return[];if(!("eventsets"in e))return[];const o=null!==(n=e.eventsets[t])&&void 0!==n?n:null;return o?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(o):[]}},7300:function(e,t,n){n.d(t,{B6:function(){return o},WJ:function(){return r},yC:function(){return i}});const o=function(e){return"video"===e.event_type},r=function(e){return"image"===e.event_type},i=function(e){return"livestream"===e.event_type}},5160:function(e,t,n){n.d(t,{$L:function(){return l},JX:function(){return d},Z6:function(){return s},rp:function(){return h},wh:function(){return a},wz:function(){return u},x0:function(){return c}});var o,r=n(2860);n(7753);const i=null!==(o="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==o&&o;function a(e){i&&console.debug("updating user view count for event.");const t={event_id:e.event_id,increase_by:1};fetch(r.Gc+"/event/metrics/views",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(i&&console.debug("updating user view count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating user view count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating user view count user for event : ",e)}))}function s(e,t){i&&console.debug("updating like count for event.");const n={event_id:e.event_id,increase_by:t};fetch(r.Gc+"/event/metrics/like",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(i&&console.debug("updating like count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating like count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating like count user for event : ",e)}))}function c(e){i&&console.debug("updating share count for event.");const t={event_id:e.event_id,increase_by:1};fetch(r.Gc+"/event/metrics/share",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(i&&console.debug("updating share count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating share count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating share count user for event : ",e)}))}function u(e,t){i&&console.debug("updating event-product click count for event {} and product {}.",e.event_id,t.product_id);const n={event_id:e.event_id,product_id:t.product_id,increase_by:1};fetch(r.Gc+"/event/metrics/clicks",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(i&&console.debug("updating user event-product click count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating user event-product click count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product click count for event {} : ",e.event_id,t)}))}function d(e,t,n){i&&console.debug("updating event-product add to cart count for event {} and product {}.",e.event_id,t.product_id);const o={event_id:e.event_id,product_id:t.product_id,increase_by:n};fetch(r.Gc+"/event/metrics/add_to_cart",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(o)}).then((e=>(i&&console.debug("updating user event-product add to cart count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating user event-product add to cart count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product add to cart count for event {} : ",e.event_id,t)}))}function l(e,t){i&&console.debug("updating event-product buy now count for event {} and product {}.",e.event_id,t.product_id);const n={event_id:e.event_id,product_id:t.product_id,increase_by:1};fetch(r.Gc+"/event/metrics/buy_now",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(i&&console.debug("updating user event-product buy now count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating user event-product buy now count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product buy now count for event {} : ",e.event_id,t)}))}async function h(){let{storeId:e="",eventId:t=0,productId:n="",variantId:o="",cartToken:a="",checkoutToken:s="",quantity:c=0,price:u="",actionType:d="",trackingId:l=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},h={event_id:t,product_id:n,cart_token:a,checkout_token:s,quantity:c,price:u,variant_id:o,action_type:d,tracking_id:l};i&&console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} ",t,n,o);const p=await fetch(r.Gc+"/cart-metadata/"+e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(h)}).then((e=>(i&&console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} : HTTP "+e.status),e.json()))).catch((e=>{console.error("error initiating ATC metadata event for eventId {}, productId {}, variantId {} : ",t,n,o)}));return p}},4669:function(e,t,n){n.d(t,{Tc:function(){return p},ll:function(){return h}});var o,r=n(1824),i=n(7786),a=n(9854);n(7753);const s="Whatmore Video Shopping",c=null!==(o="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==o&&o,u="Video View",d={carousel:"Carousel",stories:"Stories",video_popup:"Video Popup"},l={homepage:"Home Page",product_page:"Product Page"};async function h(e){if((0,a.Dv)(e)&&null!==(0,a.hf)(e)&&(i.ZP.initialize((0,a.hf)(e)),c&&console.debug("Whatmore: initialized GA4")),(0,a.hv)(e)&&null!==(0,a.BH)(e)){const t=(0,a.OQ)(e);r.ZP.initialize((0,a.BH)(e),{useExistingGa:t}),c&&console.debug("Whatmore: initialized GA3")}}async function p(e,t,n){(0,a.hv)(e)&&null!==(0,a.BH)(e)&&(r.ZP.event({category:s,action:u,label:l[t]+":"+d[n]}),c&&console.debug("Whatmore: pushed view event to GA3")),(0,a.Dv)(e)&&null!==(0,a.hf)(e)&&(i.ZP.event({category:s,action:u+":"+l[t]+":"+d[n],value:1,nonInteraction:!1}),c&&console.debug("Whatmore: pushed view event to GA4"))}}}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|