whatmore-react-assets 1.0.1746 → 1.0.1747

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatmore-react-assets",
3
- "version": "1.0.1746",
3
+ "version": "1.0.1747",
4
4
  "description": "public repo for all whatmore js and css assets",
5
5
  "main": "whatmore.js",
6
6
  "scripts": {
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[571],{16:function(e,t,n){n.d(t,{A:function(){return s}});var i=n(9950),r=(n(5410),n(5830)),o=n(4459),d=n(4414);var l=function(e){return(0,i.useEffect)(()=>{const e=(0,o.E2)((0,r.Xd)("whatmoreSecondaryColor"));!function(e,t,n,i){const r=`rgba(${e},${t},${n},${i})`,o=`\n @keyframes whatmore-loading-indicator-keyframe {\n 0%,\n 100% {\n box-shadow: 0em -2.6em 0em 0em ${r}, 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.5), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.7);\n }\n 12.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.7), 1.8em -1.8em 0 0em ${r}, 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.5);\n }\n 25% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.5), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.7), 2.5em 0em 0 0em ${r}, 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2);\n }\n 37.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.5), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.7), 1.75em 1.75em 0 0em ${r}, 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2);\n }\n 50% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.5), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.7), 0em 2.5em 0 0em ${r}, -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2);\n }\n 62.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.5), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.7), -1.8em 1.8em 0 0em ${r}, -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2);\n }\n 75% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.5), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.7), -2.6em 0em 0 0em ${r}, -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2);\n }\n 87.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.5), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.7), -1.8em -1.8em 0 0em ${r};\n }\n }\n `,d=document.createElement("style");d.type="text/css",d.innerHTML=o,document.head.appendChild(d)}(e[0],e[1],e[2],.2)},[]),(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("span",{className:"whatmore-loading-indicator"})})},a=n(8781);var s=function(e){var t,n;const i=null!==(t=e.height)&&void 0!==t?t:"100%",r=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,d.jsxs)("div",{style:{width:r,height:i,overflow:"hidden",minHeight:i,minWidth:r},children:[(0,d.jsx)(a.A,{height:i,width:r}),(0,d.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,d.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",width:"100%",height:"fit-content"},children:(0,d.jsx)(l,{})})})]})}},1941:function(e,t,n){n.d(t,{A:function(){return c}});var i=n(5830),r=n(9950);function o(e){if(!e)return{};var t={};return Array.from(e.attributes).forEach(e=>{var n;t[e.name]=(n=e.value,isNaN(+n)?n:+n)}),t}function d(...e){try{var t;const n=document.getElementById("whatmorePreviewMode");if(!n)return null;const i=null===e||void 0===e?void 0:e[0];if(!i)return!0;let r={};return r=i.includes("function")?{}:o(n),null!==(t=r)&&void 0!==t&&t[i]?r[i]:null}catch(n){return null}}var l=function({disablePreview:e=!1}={}){var t,n,i=e?window.innerHeight:null!==(t=d("height-wh"))&&void 0!==t?t:window.innerHeight,o=e?window.innerWidth:null!==(n=d("width-wh"))&&void 0!==n?n:window.innerWidth,[l,a]=[i,o];const[s,m]=(0,r.useState)([l>a?"portrait":"landscape",l,a]);return(0,r.useLayoutEffect)(()=>{function t(){var t,n,i=e?window.innerHeight:null!==(t=d("height-wh"))&&void 0!==t?t:window.innerHeight,r=e?window.innerWidth:null!==(n=d("width-wh"))&&void 0!==n?n:window.innerWidth,[o,l]=[i,r];m(o>l?["portrait",o,l]:["landscape",o,l])}return window.addEventListener("resize",t),window.addEventListener("orientationchange",t),screen.orientation&&screen.orientation.addEventListener("change",t),t(),()=>{window.removeEventListener("resize",t),window.removeEventListener("orientationchange",t),screen.orientation&&screen.orientation.removeEventListener("change",t)}},[]),s},a=n(1348);const s=(0,i.Xd)("whatmoreShopId");function m(){if("STRI4V3OYCH"==s||"56517427254"==s||"19506115"==s||"STR4YVJTT37"===s){var e,t,n;let i=document.querySelector('.whatmore-base:has(.whatmore-widget[data-wh="carousel"])');i||(i=document.querySelector('.whatmore-base:has(.whatmore-widget[data-wh="collection"])'));let r=i;for(;r&&r!==document&&(r=r.parentElement,!r||r.classList.contains("whatmore-base")););return[window.innerHeight,(null!==(e=null===(t=r)||void 0===t||null===(n=t.getBoundingClientRect())||void 0===n?void 0:n.width)&&void 0!==e?e:window.innerWidth)+(0,a.$du)(s)]}return"51273072796"==s?[document.documentElement.clientHeight,document.documentElement.clientWidth]:[window.innerHeight,window.innerWidth]}var u=function(){var[e,t]=m();const[n,i]=(0,r.useState)([e>t?"portrait":"landscape",e,t]);return(0,r.useLayoutEffect)(()=>{function e(){var[e,t]=m();i(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)}},[]),n};var c=function(e){var t;const n=(0,i.Xd)("isWhatmorePreviewMode"),r=u(),o=l({disablePreview:null!==(t=null===e||void 0===e?void 0:e.disablePreview)&&void 0!==t&&t});return n?o:r}},3788:function(e,t,n){n.d(t,{s:function(){return l}});var i=n(1348),r=n(5830);const o={"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"},d={"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"},l=function(e){const t=(0,r.Xd)("whatmoreShopId");if(!e)return e;if(e.startsWith("https://cdn.shopify.com"))return e;if("AWSCDN"==(0,i.CfJ)(t))return e;if("AZURECDN"==(0,i.CfJ)(t)){if(e.includes(".azureedge.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(o))if(e.includes(t))return e.replace(t,o[t]);return e}}if("BUNNYCDN"==(0,i.CfJ)(t)){if(e.includes(".b-cdn.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(d))if(e.includes(t))return e.replace(t,d[t]);return e}}return e}},4033:function(e,t,n){n.d(t,{n:function(){return i}});const i=()=>{if("undefined"!==typeof window){const e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")&&navigator.vendor.includes("Apple")}return!1}},4365:function(){},5410:function(){},6493:function(e,t,n){n.d(t,{Cr:function(){return l},cb:function(){return d},lP:function(){return o},yD:function(){return a}});var i=n(1348);const r=(0,n(5830).Xd)("whatmoreShopId"),o=function(e){var t,n;return"event_media_urls"in e?"image"===e.event_type?e.event_media_urls.primary.portrait.content_image_original:"secondary"in e.event_media_urls&&e.event_media_urls.secondary.portrait.content_video_1080p?e.event_media_urls.secondary.portrait.content_video_1080p:null!==(t=e.event_media_urls.primary.portrait.content_video_1080p)&&void 0!==t?t:null===(n=e.event_media_urls.primary.landscape)||void 0===n?void 0:n.content_video_1080p:e.event_hls_url},d=function(e){var t;return"event_media_urls"in e?"image"===e.event_type?e.event_media_urls.primary.landscape.content_image_original:"secondary"in e.event_media_urls&&e.event_media_urls.secondary.landscape.content_video_1080p?e.event_media_urls.secondary.landscape.content_video_1080p:null!==(t=e.event_media_urls.primary.landscape.content_video_1080p)&&void 0!==t?t:e.event_media_urls.primary.portrait.content_video_1080p:e.event_hls_url},l=function(e){if(e.startsWith("https://cdn.shopify.com")&&e.includes("whatmore_")){const t=(0,i.ath)(r);if(!t)return e;return`https://whatmore-brand-video-assets-720p.b-cdn.net/${t}/${e.split("whatmore_")[1].split("?")[0]}`}return e},a=function(e){if(e.startsWith("https://cdn.shopify.com")&&e.includes("whatmore_")){const t=(0,i.ath)(r);if(!t)return e;return`https://whatmore-brand-thumbnail-video-assets.b-cdn.net/${t}/${e.split("whatmore_")[1].split("?")[0]}`}return e}},8781:function(e,t,n){var i=n(4414);t.A=function(e){var t,n,r;const o=null!==(t=e.height)&&void 0!==t?t:"100%",d=null!==(n=e.width)&&void 0!==n?n:"100%",l=null!==(r=e.borderRadius)&&void 0!==r?r:"10px";return(0,i.jsx)("div",{style:{height:o,width:o,borderRadius:l,overflow:"hidden",minHeight:o,minWidth:d,maxHeight:o,maxWidth:d},children:(0,i.jsx)("div",{style:{minHeight:o,minWidth:d},height:"100%",width:"100%",className:"whatmore-shimmer"})})}},9098:function(e,t,n){var i=n(9950),r=n(16),o=n(4414);t.A=function(e){var t,n,d;const[l,a]=(0,i.useState)(!1),s=i.useRef(0),m=(0,i.useRef)(null),u=null!==(t=e.timeUpdateCallback)&&void 0!==t?t:()=>{},c=null!==(n=e.height)&&void 0!==n?n:"100%",v=null!==(d=e.width)&&void 0!==d?d:"100%";return(0,i.useEffect)(()=>{s.current=0;const e=setInterval(()=>{s.current=s.current+.03,m.current&&u(s.current,5),s.current>=5&&(s.current=0)},30);return()=>{clearInterval(e)}},[e.isPlaying]),(0,o.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:v,height:"100%",overflow:"hidden"},children:[(0,o.jsx)("div",{style:{width:l?"100%":"0px",height:l?"100%":"0px"},children:(0,o.jsx)("img",{ref:m,src:e.url,style:{objectFit:"cover",height:"100%",width:v,backgroundColor:"white"},alt:"image player",onLoad:()=>{a(!0)}})}),l?(0,o.jsx)(o.Fragment,{}):(0,o.jsx)(r.A,{width:v,height:c})]})}},9879:function(e,t,n){n.d(t,{A:function(){return h}});var i=n(9950),r=n(6649),o=n(3788),d=n(6613),l=n(2039),a=n(9098),s=n(4033),m=n(5830),u=n(6493),c=n(4414);var v=function(e){var t,n,o,l,a,v,h,p,$,g,w,f,b,y,_,x,j,E,C,k,P,S,L,A,I,W,R;const z=(0,i.useRef)(null),[T,H,N]=(0,r.A)({triggerOnce:!0}),F=(0,m.Xd)("whatmoreShopId"),U=null!==(t=e.height)&&void 0!==t?t:"100%",D=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,i.useEffect)(()=>{z.current&&(e.isPlaying?z.current.play():(((0,s.n)()||(0,d.At)())&&z.current.play(),"57939755089"==F?setTimeout(()=>{z.current.pause()},300):z.current.pause()))},[e.isPlaying,H]),(0,c.jsx)("div",{ref:T,style:{width:U,height:D,overflow:"hidden",display:"flex",alignItems:"center"},children:H||"51394281658"==F||"8968077397"==F?(0,c.jsxs)("div",{itemScope:!0,itemtype:"https://schema.org/VideoObject",style:{width:D,height:U},children:[(0,c.jsx)("meta",{itemprop:"name",content:null!==(o=null!==(l=null===e||void 0===e||null===(a=e.event)||void 0===a||null===(v=a.products)||void 0===v||null===(h=v[0])||void 0===h?void 0:h.title)&&void 0!==l?l:null===e||void 0===e||null===(p=e.event)||void 0===p?void 0:p.event_id)&&void 0!==o?o:"0"}),(0,c.jsx)("meta",{itemprop:"description",content:null!==($=null===e||void 0===e||null===(g=e.event)||void 0===g||null===(w=g.products)||void 0===w||null===(f=w[0])||void 0===f?void 0:f.title)&&void 0!==$?$:""}),(0,c.jsx)("meta",{itemprop:"thumbnailUrl",content:null!==(b=null===e||void 0===e||null===(y=e.event)||void 0===y?void 0:y.poster_image)&&void 0!==b?b:""}),(0,c.jsx)("meta",{itemprop:"contentUrl",content:null!==(_=null===e||void 0===e||null===(x=e.event)||void 0===x?void 0:x.thumbnail_image)&&void 0!==_?_:""}),(0,c.jsx)("meta",{itemprop:"uploadDate",content:null!==(j=`${null===e||void 0===e||null===(E=e.event)||void 0===E?void 0:E.scheduled_date}T00:00:00Z`)&&void 0!==j?j:""}),(0,c.jsx)("meta",{itemprop:"duration",content:"PT3S"}),(0,c.jsx)("meta",{itemprop:"embedUrl",content:null!==(C=null===e||void 0===e||null===(k=e.event)||void 0===k||null===(P=k.products)||void 0===P||null===(S=P[0])||void 0===S?void 0:S.product_link)&&void 0!==C?C:""}),(0,c.jsx)("meta",{itemprop:"interactionCount",content:null!==(L=null===e||void 0===e||null===(A=e.event)||void 0===A?void 0:A.total_views)&&void 0!==L?L:0}),(0,c.jsxs)("video",{ref:z,className:"whatmore-video-player-muted",width:D,height:U,preload:"metadata",loop:!0,playsInline:!0,poster:e.isPlaying&&1!=(null===(I=e.event)||void 0===I?void 0:I.index)&&"STRTFEDEDAP"!==F&&"STRY2V4XO5L"!==F?e.url:null!==(W=e.poster)&&void 0!==W?W:e.url,muted:null===(R=e.isVideoMuted)||void 0===R||R,style:{backgroundColor:"white",borderRadius:e.borderRadius,objectFit:"cover"},children:[(0,c.jsx)("track",{src:"data:,",kind:"captions",srclang:"en",label:"english_captions"}),(0,c.jsx)("source",{src:e.url,type:"video/mp4"}),(0,c.jsx)("source",{src:(0,u.yD)(e.url),type:"video/mp4"})]})]}):(0,c.jsx)("div",{width:D,height:U,ref:e=>{e&&e.style.setProperty("display","block","important")}})})};var h=function(e){var t,n,s,h,p,$,g,w,f,b,y,_,x,j,E,C,k,P,S,L,A,I,W,R,z,T,H,N,F,U,D;const[M,V,q]=(0,r.A)({triggerOnce:!0}),O=(0,m.Xd)("whatmoreShopId"),X=(0,i.useRef)(null);if((0,i.useEffect)(()=>{X.current&&(e.isPlaying?X.current.play():X.current.pause())},[e.isPlaying,V]),(0,l.Il)(e.event))return(0,c.jsx)(a.A,{height:e.height,width:e.width,url:e.url,isPlaying:e.isPlaying,timeUpdateCallback:e.timeUpdateCallback});const J=null!==(t=e.pauseFromPlayTimeInMs)&&void 0!==t?t:200,Y=null!==e&&void 0!==e&&null!==(n=e.event)&&void 0!==n&&null!==(s=n.poster_image)&&void 0!==s&&s.startsWith("https://cdn.shopify.com")?(null===e||void 0===e||null===(h=e.event)||void 0===h||null===(p=h.poster_image)||void 0===p?void 0:p.split("?")[0])+"?width=400&height=400":null===e||void 0===e||null===($=e.event)||void 0===$?void 0:$.poster_image;if((0,d.MN)())return(0,c.jsx)(v,{isVideoMuted:e.isVideoMuted,event:null===e||void 0===e?void 0:e.event,borderRadius:e.borderRadius,height:"100%",width:"100%",poster:Y,url:(0,o.s)(e.url),isPlaying:e.isPlaying,pauseFromPlayTimeInMs:J});const B=null!==(g=e.height)&&void 0!==g?g:"100%",Z=null!==(w=e.width)&&void 0!==w?w:"100%";return(0,c.jsx)("div",{ref:M,style:{width:B,height:Z,overflow:"hidden",display:"flex",alignItems:"center"},children:V||"51394281658"==O||"8968077397"==O?(0,c.jsxs)("div",{itemScope:!0,itemtype:"https://schema.org/VideoObject",style:{width:B,height:Z},children:[(0,c.jsx)("meta",{itemprop:"name",content:null!==(f=null!==(b=null===e||void 0===e||null===(y=e.event)||void 0===y||null===(_=y.products)||void 0===_||null===(x=_[0])||void 0===x?void 0:x.title)&&void 0!==b?b:null===e||void 0===e||null===(j=e.event)||void 0===j?void 0:j.event_id)&&void 0!==f?f:"0"}),(0,c.jsx)("meta",{itemprop:"description",content:null!==(E=null===e||void 0===e||null===(C=e.event)||void 0===C||null===(k=C.products)||void 0===k||null===(P=k[0])||void 0===P?void 0:P.title)&&void 0!==E?E:""}),(0,c.jsx)("meta",{itemprop:"thumbnailUrl",content:null!==(S=null===e||void 0===e||null===(L=e.event)||void 0===L?void 0:L.poster_image)&&void 0!==S?S:""}),(0,c.jsx)("meta",{itemprop:"contentUrl",content:null!==(A=null===e||void 0===e||null===(I=e.event)||void 0===I?void 0:I.thumbnail_image)&&void 0!==A?A:""}),(0,c.jsx)("meta",{itemprop:"uploadDate",content:null!==(W=`${null===e||void 0===e||null===(R=e.event)||void 0===R?void 0:R.scheduled_date}T00:00:00Z`)&&void 0!==W?W:""}),(0,c.jsx)("meta",{itemprop:"duration",content:"PT3S"}),(0,c.jsx)("meta",{itemprop:"embedUrl",content:null!==(z=null===e||void 0===e||null===(T=e.event)||void 0===T||null===(H=T.products)||void 0===H||null===(N=H[0])||void 0===N?void 0:N.product_link)&&void 0!==z?z:""}),(0,c.jsx)("meta",{itemprop:"interactionCount",content:null!==(F=null===e||void 0===e||null===(U=e.event)||void 0===U?void 0:U.total_views)&&void 0!==F?F:0}),(0,c.jsxs)("video",{ref:X,className:"whatmore-video-player-muted",width:Z,height:B,preload:"metadata",loop:!0,playsInline:!0,muted:null===(D=e.isVideoMuted)||void 0===D||D,poster:"57939755089"==O?"":Y,style:{backgroundColor:"white",objectFit:"cover"},children:[(0,c.jsx)("track",{src:"data:,",kind:"captions",srclang:"en",label:"english_captions"}),(0,c.jsx)("source",{src:(0,o.s)(e.url),type:"video/mp4"}),(0,c.jsx)("source",{src:(0,u.yD)(e.url),type:"video/mp4"})]})]}):(0,c.jsx)("div",{width:Z,height:B,ref:e=>{e&&e.style.setProperty("display","block","important")}})})}}}]);
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[571],{16:function(e,t,n){n.d(t,{A:function(){return s}});var i=n(9950),r=(n(5410),n(5830)),o=n(4459),d=n(4414);var l=function(e){return(0,i.useEffect)(()=>{const e=(0,o.E2)((0,r.Xd)("whatmoreSecondaryColor"));!function(e,t,n,i){const r=`rgba(${e},${t},${n},${i})`,o=`\n @keyframes whatmore-loading-indicator-keyframe {\n 0%,\n 100% {\n box-shadow: 0em -2.6em 0em 0em ${r}, 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.5), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.7);\n }\n 12.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.7), 1.8em -1.8em 0 0em ${r}, 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.5);\n }\n 25% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.5), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.7), 2.5em 0em 0 0em ${r}, 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2);\n }\n 37.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.5), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.7), 1.75em 1.75em 0 0em ${r}, 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2);\n }\n 50% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.5), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.7), 0em 2.5em 0 0em ${r}, -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2);\n }\n 62.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.5), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.7), -1.8em 1.8em 0 0em ${r}, -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2);\n }\n 75% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.5), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.7), -2.6em 0em 0 0em ${r}, -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2);\n }\n 87.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.5), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.7), -1.8em -1.8em 0 0em ${r};\n }\n }\n `,d=document.createElement("style");d.type="text/css",d.innerHTML=o,document.head.appendChild(d)}(e[0],e[1],e[2],.2)},[]),(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("span",{className:"whatmore-loading-indicator"})})},a=n(8781);var s=function(e){var t,n;const i=null!==(t=e.height)&&void 0!==t?t:"100%",r=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,d.jsxs)("div",{style:{width:r,height:i,overflow:"hidden",minHeight:i,minWidth:r},children:[(0,d.jsx)(a.A,{height:i,width:r}),(0,d.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,d.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",width:"100%",height:"fit-content"},children:(0,d.jsx)(l,{})})})]})}},1941:function(e,t,n){n.d(t,{A:function(){return c}});var i=n(5830),r=n(9950);function o(e){if(!e)return{};var t={};return Array.from(e.attributes).forEach(e=>{var n;t[e.name]=(n=e.value,isNaN(+n)?n:+n)}),t}function d(...e){try{var t;const n=document.getElementById("whatmorePreviewMode");if(!n)return null;const i=null===e||void 0===e?void 0:e[0];if(!i)return!0;let r={};return r=i.includes("function")?{}:o(n),null!==(t=r)&&void 0!==t&&t[i]?r[i]:null}catch(n){return null}}var l=function({disablePreview:e=!1}={}){var t,n,i=e?window.innerHeight:null!==(t=d("height-wh"))&&void 0!==t?t:window.innerHeight,o=e?window.innerWidth:null!==(n=d("width-wh"))&&void 0!==n?n:window.innerWidth,[l,a]=[i,o];const[s,m]=(0,r.useState)([l>a?"portrait":"landscape",l,a]);return(0,r.useLayoutEffect)(()=>{function t(){var t,n,i=e?window.innerHeight:null!==(t=d("height-wh"))&&void 0!==t?t:window.innerHeight,r=e?window.innerWidth:null!==(n=d("width-wh"))&&void 0!==n?n:window.innerWidth,[o,l]=[i,r];m(o>l?["portrait",o,l]:["landscape",o,l])}return window.addEventListener("resize",t),window.addEventListener("orientationchange",t),screen.orientation&&screen.orientation.addEventListener("change",t),t(),()=>{window.removeEventListener("resize",t),window.removeEventListener("orientationchange",t),screen.orientation&&screen.orientation.removeEventListener("change",t)}},[]),s},a=n(1348);const s=(0,i.Xd)("whatmoreShopId");function m(){if("STRI4V3OYCH"==s||"56517427254"==s||"19506115"==s||"STR4YVJTT37"===s){var e,t,n;let i=document.querySelector('.whatmore-base:has(.whatmore-widget[data-wh="carousel"])');i||(i=document.querySelector('.whatmore-base:has(.whatmore-widget[data-wh="collection"])'));let r=i;for(;r&&r!==document&&(r=r.parentElement,!r||r.classList.contains("whatmore-base")););return[window.innerHeight,(null!==(e=null===(t=r)||void 0===t||null===(n=t.getBoundingClientRect())||void 0===n?void 0:n.width)&&void 0!==e?e:window.innerWidth)+(0,a.$du)(s)]}return"51273072796"==s?[document.documentElement.clientHeight,document.documentElement.clientWidth]:[window.innerHeight,window.innerWidth]}var u=function(){var[e,t]=m();const[n,i]=(0,r.useState)([e>t?"portrait":"landscape",e,t]);return(0,r.useLayoutEffect)(()=>{function e(){var[e,t]=m();i(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)}},[]),n};var c=function(e){var t;const n=(0,i.Xd)("isWhatmorePreviewMode"),r=u(),o=l({disablePreview:null!==(t=null===e||void 0===e?void 0:e.disablePreview)&&void 0!==t&&t});return n?o:r}},3788:function(e,t,n){n.d(t,{s:function(){return l}});var i=n(1348),r=n(5830);const o={"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"},d={"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"},l=function(e){const t=(0,r.Xd)("whatmoreShopId");if(!e)return e;if(e.startsWith("https://cdn.shopify.com"))return e;if("AWSCDN"==(0,i.CfJ)(t))return e;if("AZURECDN"==(0,i.CfJ)(t)){if(e.includes(".azureedge.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(o))if(e.includes(t))return e.replace(t,o[t]);return e}}if("BUNNYCDN"==(0,i.CfJ)(t)){if(e.includes(".b-cdn.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(d))if(e.includes(t))return e.replace(t,d[t]);return e}}return e}},4033:function(e,t,n){n.d(t,{n:function(){return i}});const i=()=>{if("undefined"!==typeof window){const e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")&&navigator.vendor.includes("Apple")}return!1}},4365:function(){},5410:function(){},6493:function(e,t,n){n.d(t,{Cr:function(){return l},cb:function(){return d},lP:function(){return o},yD:function(){return a}});var i=n(1348);const r=(0,n(5830).Xd)("whatmoreShopId"),o=function(e){var t,n;return"event_media_urls"in e?"image"===e.event_type?e.event_media_urls.primary.portrait.content_image_original:"secondary"in e.event_media_urls&&e.event_media_urls.secondary.portrait.content_video_1080p?e.event_media_urls.secondary.portrait.content_video_1080p:null!==(t=e.event_media_urls.primary.portrait.content_video_1080p)&&void 0!==t?t:null===(n=e.event_media_urls.primary.landscape)||void 0===n?void 0:n.content_video_1080p:e.event_hls_url},d=function(e){var t;return"event_media_urls"in e?"image"===e.event_type?e.event_media_urls.primary.landscape.content_image_original:"secondary"in e.event_media_urls&&e.event_media_urls.secondary.landscape.content_video_1080p?e.event_media_urls.secondary.landscape.content_video_1080p:null!==(t=e.event_media_urls.primary.landscape.content_video_1080p)&&void 0!==t?t:e.event_media_urls.primary.portrait.content_video_1080p:e.event_hls_url},l=function(e){if(e.startsWith("https://cdn.shopify.com")&&e.includes("whatmore_")){const t=(0,i.ath)(r);if(!t)return e;return`https://whatmore-brand-video-assets-720p.b-cdn.net/${t}/${e.split("whatmore_")[1].split("?")[0]}`}return e},a=function(e){if(e.startsWith("https://cdn.shopify.com")&&e.includes("whatmore_")){const t=(0,i.ath)(r);if(!t)return e;return`https://whatmore-brand-thumbnail-video-assets.b-cdn.net/${t}/${e.split("whatmore_")[1].split("?")[0]}`}return e}},8781:function(e,t,n){var i=n(4414);t.A=function(e){var t,n,r;const o=null!==(t=e.height)&&void 0!==t?t:"100%",d=null!==(n=e.width)&&void 0!==n?n:"100%",l=null!==(r=e.borderRadius)&&void 0!==r?r:"10px";return(0,i.jsx)("div",{style:{height:o,width:o,borderRadius:l,overflow:"hidden",minHeight:o,minWidth:d,maxHeight:o,maxWidth:d},children:(0,i.jsx)("div",{style:{minHeight:o,minWidth:d},height:"100%",width:"100%",className:"whatmore-shimmer"})})}},9098:function(e,t,n){var i=n(9950),r=n(16),o=n(4414);t.A=function(e){var t,n,d;const[l,a]=(0,i.useState)(!1),s=i.useRef(0),m=(0,i.useRef)(null),u=null!==(t=e.timeUpdateCallback)&&void 0!==t?t:()=>{},c=null!==(n=e.height)&&void 0!==n?n:"100%",v=null!==(d=e.width)&&void 0!==d?d:"100%";return(0,i.useEffect)(()=>{s.current=0;const e=setInterval(()=>{s.current=s.current+.03,m.current&&u(s.current,5),s.current>=5&&(s.current=0)},30);return()=>{clearInterval(e)}},[e.isPlaying]),(0,o.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:v,height:"100%",overflow:"hidden"},children:[(0,o.jsx)("div",{style:{width:l?"100%":"0px",height:l?"100%":"0px"},children:(0,o.jsx)("img",{ref:m,src:e.url,style:{objectFit:"cover",height:"100%",width:v,backgroundColor:"white"},alt:"image player",onLoad:()=>{a(!0)}})}),l?(0,o.jsx)(o.Fragment,{}):(0,o.jsx)(r.A,{width:v,height:c})]})}},9879:function(e,t,n){n.d(t,{A:function(){return h}});var i=n(9950),r=n(6649),o=n(3788),d=n(6613),l=n(2039),a=n(9098),s=n(4033),m=n(5830),u=n(6493),c=n(4414);var v=function(e){var t,n,o,l,a,v,h,p,$,g,w,f,b,y,_,x,j,E,C,k,P,S,L,A,I,W,R;const z=(0,i.useRef)(null),[T,H,N]=(0,r.A)({triggerOnce:!0}),F=(0,m.Xd)("whatmoreShopId"),U=null!==(t=e.height)&&void 0!==t?t:"100%",D=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,i.useEffect)(()=>{z.current&&(e.isPlaying?z.current.play():(((0,s.n)()||(0,d.At)())&&z.current.play(),"57939755089"==F?setTimeout(()=>{z.current.pause()},300):z.current.pause()))},[e.isPlaying,H]),(0,c.jsx)("div",{ref:T,style:{width:U,height:D,overflow:"hidden",display:"flex",alignItems:"center"},children:H||"51394281658"==F||"8968077397"==F?(0,c.jsxs)("div",{itemScope:!0,itemtype:"https://schema.org/VideoObject",style:{width:D,height:U},children:[(0,c.jsx)("meta",{itemprop:"name",content:null!==(o=null!==(l=null===e||void 0===e||null===(a=e.event)||void 0===a||null===(v=a.products)||void 0===v||null===(h=v[0])||void 0===h?void 0:h.title)&&void 0!==l?l:null===e||void 0===e||null===(p=e.event)||void 0===p?void 0:p.event_id)&&void 0!==o?o:"0"}),(0,c.jsx)("meta",{itemprop:"description",content:null!==($=null===e||void 0===e||null===(g=e.event)||void 0===g||null===(w=g.products)||void 0===w||null===(f=w[0])||void 0===f?void 0:f.title)&&void 0!==$?$:"whatmore-event"}),(0,c.jsx)("meta",{itemprop:"thumbnailUrl",content:null!==(b=null===e||void 0===e||null===(y=e.event)||void 0===y?void 0:y.poster_image)&&void 0!==b?b:""}),(0,c.jsx)("meta",{itemprop:"contentUrl",content:null!==(_=null===e||void 0===e||null===(x=e.event)||void 0===x?void 0:x.thumbnail_image)&&void 0!==_?_:""}),(0,c.jsx)("meta",{itemprop:"uploadDate",content:null!==(j=`${null===e||void 0===e||null===(E=e.event)||void 0===E?void 0:E.scheduled_date}T00:00:00Z`)&&void 0!==j?j:""}),(0,c.jsx)("meta",{itemprop:"duration",content:"PT3S"}),(0,c.jsx)("meta",{itemprop:"embedUrl",content:null!==(C=null===e||void 0===e||null===(k=e.event)||void 0===k||null===(P=k.products)||void 0===P||null===(S=P[0])||void 0===S?void 0:S.product_link)&&void 0!==C?C:""}),(0,c.jsx)("meta",{itemprop:"interactionCount",content:null!==(L=null===e||void 0===e||null===(A=e.event)||void 0===A?void 0:A.total_views)&&void 0!==L?L:0}),(0,c.jsxs)("video",{ref:z,className:"whatmore-video-player-muted",width:D,height:U,preload:"metadata",loop:!0,playsInline:!0,poster:e.isPlaying&&1!=(null===(I=e.event)||void 0===I?void 0:I.index)&&"STRTFEDEDAP"!==F&&"STRY2V4XO5L"!==F?e.url:null!==(W=e.poster)&&void 0!==W?W:e.url,muted:null===(R=e.isVideoMuted)||void 0===R||R,style:{backgroundColor:"white",borderRadius:e.borderRadius,objectFit:"cover"},children:[(0,c.jsx)("track",{src:"data:,",kind:"captions",srclang:"en",label:"english_captions"}),(0,c.jsx)("source",{src:e.url,type:"video/mp4"}),(0,c.jsx)("source",{src:(0,u.yD)(e.url),type:"video/mp4"})]})]}):(0,c.jsx)("div",{width:D,height:U,ref:e=>{e&&e.style.setProperty("display","block","important")}})})};var h=function(e){var t,n,s,h,p,$,g,w,f,b,y,_,x,j,E,C,k,P,S,L,A,I,W,R,z,T,H,N,F,U,D;const[M,V,q]=(0,r.A)({triggerOnce:!0}),O=(0,m.Xd)("whatmoreShopId"),X=(0,i.useRef)(null);if((0,i.useEffect)(()=>{X.current&&(e.isPlaying?X.current.play():X.current.pause())},[e.isPlaying,V]),(0,l.Il)(e.event))return(0,c.jsx)(a.A,{height:e.height,width:e.width,url:e.url,isPlaying:e.isPlaying,timeUpdateCallback:e.timeUpdateCallback});const J=null!==(t=e.pauseFromPlayTimeInMs)&&void 0!==t?t:200,Y=null!==e&&void 0!==e&&null!==(n=e.event)&&void 0!==n&&null!==(s=n.poster_image)&&void 0!==s&&s.startsWith("https://cdn.shopify.com")?(null===e||void 0===e||null===(h=e.event)||void 0===h||null===(p=h.poster_image)||void 0===p?void 0:p.split("?")[0])+"?width=400&height=400":null===e||void 0===e||null===($=e.event)||void 0===$?void 0:$.poster_image;if((0,d.MN)())return(0,c.jsx)(v,{isVideoMuted:e.isVideoMuted,event:null===e||void 0===e?void 0:e.event,borderRadius:e.borderRadius,height:"100%",width:"100%",poster:Y,url:(0,o.s)(e.url),isPlaying:e.isPlaying,pauseFromPlayTimeInMs:J});const B=null!==(g=e.height)&&void 0!==g?g:"100%",Z=null!==(w=e.width)&&void 0!==w?w:"100%";return(0,c.jsx)("div",{ref:M,style:{width:B,height:Z,overflow:"hidden",display:"flex",alignItems:"center"},children:V||"51394281658"==O||"8968077397"==O?(0,c.jsxs)("div",{itemScope:!0,itemtype:"https://schema.org/VideoObject",style:{width:B,height:Z},children:[(0,c.jsx)("meta",{itemprop:"name",content:null!==(f=null!==(b=null===e||void 0===e||null===(y=e.event)||void 0===y||null===(_=y.products)||void 0===_||null===(x=_[0])||void 0===x?void 0:x.title)&&void 0!==b?b:null===e||void 0===e||null===(j=e.event)||void 0===j?void 0:j.event_id)&&void 0!==f?f:"0"}),(0,c.jsx)("meta",{itemprop:"description",content:null!==(E=null===e||void 0===e||null===(C=e.event)||void 0===C||null===(k=C.products)||void 0===k||null===(P=k[0])||void 0===P?void 0:P.title)&&void 0!==E?E:"whatmore-event"}),(0,c.jsx)("meta",{itemprop:"thumbnailUrl",content:null!==(S=null===e||void 0===e||null===(L=e.event)||void 0===L?void 0:L.poster_image)&&void 0!==S?S:""}),(0,c.jsx)("meta",{itemprop:"contentUrl",content:null!==(A=null===e||void 0===e||null===(I=e.event)||void 0===I?void 0:I.thumbnail_image)&&void 0!==A?A:""}),(0,c.jsx)("meta",{itemprop:"uploadDate",content:null!==(W=`${null===e||void 0===e||null===(R=e.event)||void 0===R?void 0:R.scheduled_date}T00:00:00Z`)&&void 0!==W?W:""}),(0,c.jsx)("meta",{itemprop:"duration",content:"PT3S"}),(0,c.jsx)("meta",{itemprop:"embedUrl",content:null!==(z=null===e||void 0===e||null===(T=e.event)||void 0===T||null===(H=T.products)||void 0===H||null===(N=H[0])||void 0===N?void 0:N.product_link)&&void 0!==z?z:""}),(0,c.jsx)("meta",{itemprop:"interactionCount",content:null!==(F=null===e||void 0===e||null===(U=e.event)||void 0===U?void 0:U.total_views)&&void 0!==F?F:0}),(0,c.jsxs)("video",{ref:X,className:"whatmore-video-player-muted",width:Z,height:B,preload:"metadata",loop:!0,playsInline:!0,muted:null===(D=e.isVideoMuted)||void 0===D||D,poster:"57939755089"==O?"":Y,style:{backgroundColor:"white",objectFit:"cover"},children:[(0,c.jsx)("track",{src:"data:,",kind:"captions",srclang:"en",label:"english_captions"}),(0,c.jsx)("source",{src:(0,o.s)(e.url),type:"video/mp4"}),(0,c.jsx)("source",{src:(0,u.yD)(e.url),type:"video/mp4"})]})]}):(0,c.jsx)("div",{width:Z,height:B,ref:e=>{e&&e.style.setProperty("display","block","important")}})})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[199],{1019:function(e,t,n){n.d(t,{B:function(){return a}});var i=n(1348),o=n(964);function a(e){return`${(0,i.jpW)(e)?o.$$:o.MT}/v2/brand/${e}/product-events/recommendation/cdn`}},1351:function(e,t,n){n.d(t,{PG:function(){return s},kz:function(){return c},UM:function(){return u},yP:function(){return p},DG:function(){return d}});var i=n(1348),o=n(3330),a=n(6157);function l(e,t,n={},i){var o;const l=s[e];if(!l)return;const r=l.isActionEnabled(),c=null===i||void 0===i||null===(o=i.meta_actions)||void 0===o?void 0:o[l.customAction];(r||c)&&"function"==typeof fbq&&(async()=>{const i={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===a.O.VIDEO_PLAYBACK&&{watch_time:n.watch_time,video_duration:n.video_duration}};fbq("trackCustom",l.action,i),c&&setTimeout(()=>{null===c||void 0===c||c.forEach(e=>{fbq("trackCustom",e,i)})},500)})()}var r=n(7145);const s={[a.O.EVENT_VIEW]:{isActionEnabled:i.NFF,action:"whatmore_video_click_event",customAction:"video_clicked"},[a.O.VIDEO_PLAYBACK]:{isActionEnabled:i.Eel,action:"whatmore_video_watch_event",customAction:"video_watched"},[a.O.VIDEO_LIKED]:{isActionEnabled:i.Mz3,action:"whatmore_video_like_event",customAction:"video_liked"},[a.O.VIDEO_SHARE_CTA_CLICKED]:{isActionEnabled:i.OLZ,action:"whatmore_video_share_event",customAction:"video_shared"},[a.O.SHOPNOW_ATC_CLICKED]:{isActionEnabled:i.T9r,action:"whatmore_video_atc_event",customAction:"video_atc_clicked"},[a.O.PRODUCT_TILE_ATC_CLICKED]:{isActionEnabled:i.T9r,action:"whatmore_video_atc_event",customAction:"video_atc_clicked"},[a.O.SHOPNOW_CLICKED]:{isActionEnabled:i.nEf,action:"whatmore_product_tile_click_event",customAction:"video_product_tile_clicked"},[a.O.PRODUCT_TILE_SHOPNOW_CLICKED]:{isActionEnabled:i.nEf,action:"whatmore_product_tile_click_event",customAction:"video_product_tile_clicked"}};function c({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:c}){var d,u,p,m;((0,r.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:c}),e in s)&&(l(e,null!==(d=null===a||void 0===a?void 0:a[1])&&void 0!==d?d:null===a||void 0===a?void 0:a[0],t,i),(0,o.n)({page_type:n.landingLocationType,selection_type:e,video_name:i.event_id,video_percentage:"NA",product_name:null!==(u=null===a||void 0===a||null===(p=a[1])||void 0===p?void 0:p.title)&&void 0!==u?u:null===a||void 0===a||null===(m=a[0])||void 0===m?void 0:m.title}))}function d({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:c}){var d,u,p,m;((0,r.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:c}),e in s)&&(l(e,null!==(d=null===a||void 0===a?void 0:a[1])&&void 0!==d?d:null===a||void 0===a?void 0:a[0],t,i),(0,o.n)({page_type:n.landingLocationType,selection_type:e,video_name:i.event_id,video_percentage:t.video_duration>0?Math.ceil(t.watch_time/t.video_duration*100):"NA",product_name:null!==(u=null===a||void 0===a||null===(p=a[1])||void 0===p?void 0:p.title)&&void 0!==u?u:null===a||void 0===a||null===(m=a[0])||void 0===m?void 0:m.title}))}function u({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:l}){var c,d,u;((0,r.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:l}),e in s)&&(0,o.n)({page_type:n.landingLocationType,selection_type:e,video_name:i.event_id,video_percentage:"NA",product_name:null!==(c=null===a||void 0===a||null===(d=a[1])||void 0===d?void 0:d.title)&&void 0!==c?c:null===a||void 0===a||null===(u=a[0])||void 0===u?void 0:u.title})}function p({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:a}){(0,r.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:a})}},3350:function(e,t,n){n.r(t),n.d(t,{default:function(){return z}});var i=n(9950),o=n(964),a=n(140),l=n(5830),r=n(1348),s=n(4533),c=n(6613),d=n(1085),u=n(5551),p=n(2039),m=n(4833),v=n(2979),h=n(6157),g=n(8945),_=n(9821),y=n(4414);const S=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(340),n.e(571),n.e(987),n.e(411),n.e(261),n.e(665)]).then(n.bind(n,5213))),w=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(607),n.e(571),n.e(620),n.e(116)]).then(n.bind(n,7144))),I=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(257),n.e(571),n.e(987),n.e(714),n.e(423)]).then(n.bind(n,517))),E=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(257),n.e(571),n.e(987),n.e(714),n.e(412)]).then(n.bind(n,7646))),T=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(257),n.e(571),n.e(987),n.e(714),n.e(221)]).then(n.bind(n,5451))),f=i.lazy(()=>Promise.all([n.e(283),n.e(59),n.e(571),n.e(491)]).then(n.bind(n,4295))),x=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(534),n.e(571),n.e(987),n.e(411),n.e(688),n.e(142),n.e(620),n.e(474)]).then(n.bind(n,6945))),O=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(184),n.e(571),n.e(987),n.e(411),n.e(688),n.e(485)]).then(n.bind(n,4431))),C=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(571),n.e(987),n.e(676)]).then(n.bind(n,3369))),j=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(534),n.e(571),n.e(987),n.e(411),n.e(688),n.e(142),n.e(891)]).then(n.bind(n,7178))),D=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(534),n.e(571),n.e(987),n.e(411),n.e(688),n.e(142),n.e(306)]).then(n.bind(n,9406))),b=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(946),n.e(571),n.e(987),n.e(411),n.e(497)]).then(n.bind(n,3795))),L=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(340),n.e(571),n.e(987),n.e(411),n.e(688),n.e(261),n.e(933)]).then(n.bind(n,6989))),A=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(744),n.e(571),n.e(987),n.e(411),n.e(688),n.e(806)]).then(n.bind(n,3278))),P=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(257),n.e(571),n.e(987),n.e(1)]).then(n.bind(n,4596))),q=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(571),n.e(987),n.e(411),n.e(688),n.e(906)]).then(n.bind(n,4688))),W=i.lazy(()=>n.e(374).then(n.bind(n,5100)));var k=function(e){var t,k;const[G]=(0,l.QN)("isInDesignMode"),[N]=(0,l.QN)("isDemoBrand"),[$]=(0,l.QN)("whatmoreTopBottomPadding"),[V]=(0,l.QN)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:B}=(0,i.useContext)(u.B),[M]=(0,l.QN)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:F}=(0,i.useContext)(u.B),z=(0,l.Xd)("isLandingSharedLink"),R=(0,l.Xd)("whatmoreShareTemplateId"),H=(0,l.Xd)("whatmoreShareStoryId"),K=(0,l.Xd)("whatmoreShareEventId"),{whatmoreWidgetSourceDetails:U,whatmoreUserInfo:J}=(0,i.useContext)(u.B),Q=z&&F===(0,m.Mm)(R),[X,Y]=(0,i.useState)(Q),[Z,ee]=(0,i.useState)(-1),[te,ne]=(0,i.useState)(null);let ie=e.events;const oe=e.allEvents;var ae=null;B&&!ae&&(ae=function(e){var t=e.reduce((e,t,n)=>{var i,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,storyset_dynamic_thumbnail:null!==(i=null===t||void 0===t?void 0:t.storyset_dynamic_thumbnail)&&void 0!==i&&i,events:[t]},e},{}),n=Object.values(t);return n.sort((e,t)=>e.start_event_index-t.start_event_index),n}(ie));const le=U.landingLocationType,re=U.templateType;function se(e,t=!1,i=null){(0,c.MN)()&&(0,_._)()&&!t&&(0,d.bo)(),G||N||(async()=>{const{initializeGA:t,sendVideoViewEventToGA:i}=await Promise.resolve().then(n.bind(n,3330));t();const l=ae[e].events[0],r=(0,m.Wd)(le)+(0,m.gf)(re)+(null!==l&&void 0!==l&&l.isRelatedEvent?"R":"E")+"_"+(null===l||void 0===l?void 0:l.event_id);(0,a.lB)(l),i(M,o.TB,o.OL),(0,s.Ch)(l.event_id,l.products,"homepage","stories",r,null===l||void 0===l?void 0:l.location,null===J||void 0===J?void 0:J.userType)})();var l=0;null!=i&&ae[e].events.map((e,t)=>{e.event_id==i&&(l=t)}),ee(l),ne(e)}async function ce(e,t=!1){(0,c.MN)()&&(0,_._)()&&!t&&await(0,d.bo)(),ee(e.index),((0,p.ij)(e)||(0,p.Il)(e))&&(G||N||(async()=>{const{initializeGA:t,sendVideoViewEventToGA:i}=await Promise.resolve().then(n.bind(n,3330));t();const l=(0,m.Wd)(le)+(0,m.gf)(re)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,a.lB)(e),i(M,o.TB,o.Dk),(0,s.Ch)(e.event_id,e.products,"homepage","carousel",l)})())}function de(e){return(0,y.jsx)(y.Fragment,{})}return(0,i.useEffect)(()=>{if(Q)if((0,g.H)("whatmore-video-player",()=>{Y(!1)}),null!=H&&B){const e=ae.find(e=>H==e.id);if(e)return void se(ae.indexOf(e),!0,K)}else if(null!=K){const e=ie.find(e=>K==e.event_id);if(e)return void ce(e,!0)}},[]),(0,y.jsxs)(y.Fragment,{children:[X&&(0,y.jsx)(W,{}),-1==Z||-2==Z?(0,y.jsx)(de,{}):(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.EVENT_VIEW,event:ie[Z],productList:null===(t=ie[Z])||void 0===t?void 0:t.products,cta:null===(k=ie[Z])||void 0===k?void 0:k.cta,triggerFlag:!G&&!N,children:(0,y.jsx)(q,{events:oe,index:Z,onBack:async function(){ee(-1),Y(!1)},slideDirection:B||"horizontal"===(0,r.br0)(M)?"horizontal":"vertical",eventsStories:ae,initialStoryIndex:te,template:F})})}),(0,y.jsx)("div",{className:"whatmore-widget-container",style:{height:"100%",marginTop:(B?V:$)+"px",marginBottom:(B?V:$)+"px"},children:"template-b"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(S,{events:ie,onClick:ce,heading:e.heading})})}):"template-a-1"===F||"template-collections-a-1"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(w,{events:ie,onClick:ce,heading:e.heading})}):"template-feed-a"===F||"template-collections-feed-a"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(L,{events:ie,onClick:ce,heading:e.heading})}):"template-collections-a"===F||"template-c"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(I,{events:ie,index:Z,setScreen:ee,onClick:ce,heading:e.heading})})}):"template-collections-b"===F||"template-d"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(E,{events:ie,index:Z,setScreen:ee,onClick:ce,heading:e.heading})})}):"template-collections-c"===F||"template-e"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(T,{events:ie,index:Z,setScreen:ee,onClick:ce,heading:e.heading})})}):"template-collections-d"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(S,{events:ie,index:Z,setScreen:ee,onClick:ce,heading:e.heading})})}):"template-collections-e"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(x,{events:ie,index:Z,setScreen:ee,onClick:ce,heading:e.heading})})}):"template-collections-stories"===F||"template-stories"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(P,{events:ie,index:Z,setScreen:ee,onClick:ce,heading:e.heading})})}):"template-f"===F||"template-collections-f"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(O,{events:ie,onClick:ce,heading:e.heading})})}):"template-g"===F||"template-collections-g"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(C,{events:ie,onClick:ce,heading:e.heading})})}):"template-h"===F||"template-collections-h"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(j,{events:ie,onClick:ce,heading:e.heading})})}):"template-i"===F||"template-collections-i"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(D,{index:Z,events:ie,onClick:ce,heading:e.heading})})}):"template-j"===F||"template-collections-j"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(b,{events:ie,onClick:ce,heading:e.heading})})}):"template-banner-a"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.BANNER_WIDGET_VIEW,event:ie[0],triggerFlag:!G&&!N,children:(0,y.jsx)(A,{events:ie})})}):B?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.STORIES_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(f,{eventsStories:ae,onClick:se,template:F})})}):(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!N,children:(0,y.jsx)(x,{events:ie,onClick:ce,heading:e.heading})})})})]})},G=n(7802),N=n(6641),$=n(1351),V=n(5873),B=n(1019);function M(e){return e.split(/[?#]/)[0]}function F(e){return e.split(/[?#]/)[0]}var z=function(e){const[t,a]=(0,i.useState)(),[p,v]=(0,i.useState)(),[g,S]=(0,i.useState)(),{whatmoreIsStoriesTemplate:w}=(0,i.useContext)(u.B),{whatmoreIsCollectionsTemplate:I}=(0,i.useContext)(u.B),{whatmoreIsBannerTemplate:E}=(0,i.useContext)(u.B),[T]=(0,l.QN)("whatmoreShopId"),{whatmoreCollectionId:f}=(0,i.useContext)(u.B),x=(0,l.Xd)("whatmoreLandingLocationType"),O=(0,l.Xd)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:C}=(0,i.useContext)(u.B),{whatmoreUserInfo:j,whatmoreIsPreviewMode:D}=(0,i.useContext)(u.B),b=(0,l.Xd)("whatmoreCollectionUrl"),[L]=(0,l.QN)("isInDesignMode"),[A]=(0,l.QN)("isDemoBrand"),P="19506115"==T?"343270603":(0,r.mJ$)(T)?(0,r.jLA)(T)?b:M(window.location.href):f||M(window.location.href),[q,W]=(0,l.QN)("productRatings"),[z,R]=(0,i.useState)(!1);var H=(0,r.SOt)(T)?o.aD+"/v2/events/":o.$$+"/v2/events/",K=(0,r.SOt)(T)?o.aD+"/v3/events/":o.$$+"/v3/events/",U=(0,r.SOt)(T)?o.aD+"/v4/events/":o.$$+"/v4/events/",J=(0,r.SOt)(T)?o.aD+"/v5/events/":o.$$+"/v5/events/",Q=((0,r.SOt)(T)?o.aD:o.$$,(0,r.SOt)(T)?o.aD+"/get_eventset/":o.$$+"/get_eventset/"),X=(0,r.SOt)(T)?o.aD+"/v2/collection":o.$$+"/v2/collection",Y=(0,r.SOt)(T)?o.aD+"/v3/collection":o.$$+"/v3/collection",Z=(0,r.SOt)(T)?o.aD+"/v4/collection":o.$$+"/v4/collection",ee=((0,r.jpW)(T)?o.$$:o.MT)+"/v2/brand/"+T+"/product-events",te=e.shopId,ne="live,upcoming",ie="true";return(0,i.useEffect)(()=>{null!=t&&0!=t.length&&!g&&(0,c.MN)()&&!(0,l.Xd)("whatmoreVideoPlayerPoolInitiated")&&(0,_._)()&&(0,d.Pc)(d.F5)},[t]),(0,i.useEffect)(()=>{var e,t,i,o;if((0,s.wm)(),x.startsWith("product")){var c=(0,l.Xd)("whatmoreProductId");if(c=(0,r.BcY)(T)?function(e){return"STRQMPNF7QK"==e?encodeURIComponent(window.location.href):"STR6HARJ3QY"==e||"STRI4V3OYCH"==e||"STRGZ9TGDEQ"==e||"STRJ2T2QPKI"==e?F(window.location.href).split("/").pop():F(window.location.href)}(T):c,(0,r.vvU)(T))o=H.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString()+(w?"&template_type=stories":"");else if((0,r.WH1)(T)){o=(0,B.B)(T);const e=(0,r.buK)(T);o=`${o}?client_product_id=${c}&limit=10&recommended=${!e}&origin=${window.location.hostname}&status=live,upcoming&event_type=video`}else o=ee.toString()+"?client_product_id="+c.toString()+"&status="+ne.toString()+"&event_type=video"}else if(I||"invalid-url"!==b)o=(0,r.JwJ)(T)?`${Y.toString()}?store_id=${te.toString()}&client_collection_id=${"index"==x&&(0,r.FKG)(T).length>0?(0,r.FKG)(T)[0]:P}`:"78232846646"==T?`${Z.toString()}?store_id=${te.toString()}&client_collection_id=${"index"==x&&(0,r.FKG)(T).length>0?(0,r.FKG)(T)[0]:P}`:`${X.toString()}?store_id=${te.toString()}&client_collection_id=${"index"==x&&1==(0,r.FKG)(T).length?(0,r.FKG)(T)[0]:P}`;else if(E){const e=m.Jh,t=(0,m.t6)(x);o=Q.toString()+te.toString()+"?eventset_type="+e+"&source="+t+"&source_id="+T}else{var d,u,p,h;if(("72201044272"==T||"2665447536"==T&&D)&&!w)o=K.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString()+"&latitude="+(null!==(d=null===(u=JSON.parse(localStorage.getItem("_user_wh_lc")))||void 0===u?void 0:u.latitude)&&void 0!==d?d:"")+"&longitude="+(null!==(p=null===(h=JSON.parse(localStorage.getItem("_user_wh_lc")))||void 0===h?void 0:h.longitude)&&void 0!==p?p:"")+"&user_type="+(null!==j&&void 0!==j&&j.userType?"olduser":"newuser");else o=(0,r.JwJ)(T)&&!w?U.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString():"78232846646"!=T||w?H.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString()+(w?"&template_type=stories":""):J.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString()}const g=null===(e=window)||void 0===e||null===(t=e.whatmore)||void 0===t||null===(i=t.storyEvents)||void 0===i?void 0:i.events;w&&x.startsWith("index")&&"object"==typeof g&&(null===g||void 0===g?void 0:g.length)>0?(a(g),v(g),R(!0)):fetch(o).then(e=>e.json()).then(e=>{var t;if(o.includes("v2/events")&&"39893827751"===T&&e&&Array.isArray(e.events)&&e.events.sort((e,t)=>{const n=e=>{if(e&&Array.isArray(e.products)&&e.products.length>0&&e.products[0]&&void 0!==e.products[0].price){const t=parseFloat(e.products[0].price);return isNaN(t)?0:t}return 0},i=n(e);return n(t)-i}),E){const t=m.Jh;return(0,G.Po)(e,t)}return(0,r.JwJ)(T)&&(null===e||void 0===e||null===(t=e.questions)||void 0===t?void 0:t.length)>0&&(null==localStorage.getItem("_whatmore_qview_index")&&localStorage.setItem("_whatmore_qview_index",0),(0,s.d3)(null===e||void 0===e?void 0:e.questions)),(0,G.Np)(e,I||"invalid-url"!==b)}).then(e=>{var t,n;O&&console.debug("initial received events size : "+e.length);let i=[...null===e||void 0===e?void 0:e.events,...null===e||void 0===e?void 0:e.all_events];i=(0,r.xku)(T)?(0,G.d8)(i):(0,G.Zf)(i),v(i);const o=null!==(t=null===e||void 0===e||null===(n=e.events)||void 0===n?void 0:n.length)&&void 0!==t?t:0;return i.slice(0,o)}).then(e=>{if((A||L)&&(null==e||e&&0==(null===e||void 0===e?void 0:e.length))){const e=async()=>{const{eventsData:e,storiesData:t,bannerData:i}=await n.e(365).then(n.bind(n,6018));a(w?t:E?i:e)};e()}else a(e);R(!0)}).catch(e=>{S(e.message),R(!0)})},[]),(0,i.useEffect)(()=>{"index"===x?t&&t.length>0&&(0,$.yP)({userInteractionType:h.O.HOMEPAGE_VISITED,widgetSourceDetails:C}):"collection"===x?(t&&t.length>0||"Scale"==(0,r.yt9)(T)||"Enterprise"==(0,r.yt9)(T)||"Premium"==(0,r.yt9)(T))&&(0,$.yP)({userInteractionType:h.O.COLLECTION_PAGE_VISITED,widgetSourceDetails:C}):"product"===x&&(t&&t.length>0||"Scale"==(0,r.yt9)(T)||"Enterprise"==(0,r.yt9)(T)||"Premium"==(0,r.yt9)(T))&&(0,$.yP)({userInteractionType:h.O.PDP_VISITED,widgetSourceDetails:C})},[t]),z&&(null==t||0==t.length||g)&&V.Sn.forEach(e=>{var t,n,i,o;const a=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-stories-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-stories-a"]'),l=null!==(n=e.querySelector('.whatmore-template-type[data-wh="template-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-feed-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-f"]')||e.querySelector('.whatmore-template-type[data-wh="template-stories"]')||e.querySelector('.whatmore-template-type[data-wh="template-e"]')||e.querySelector('.whatmore-template-type[data-wh="template-a-1"]')||e.querySelector('.whatmore-template-type[data-wh="template-g"]')||e.querySelector('.whatmore-template-type[data-wh="template-h"]')||e.querySelector('.whatmore-template-type[data-wh="template-j"]'))&&void 0!==n?n:e.querySelector('.whatmore-template-type[data="template-a"]')||e.querySelector('.whatmore-template-type[data="template-b"]')||e.querySelector('.whatmore-template-type[data="template-f"]')||e.querySelector('.whatmore-template-type[data="template-stories"]')||e.querySelector('.whatmore-template-type[data="template-e"]')||e.querySelector('.whatmore-template-type[data="template-a-1"]')||e.querySelector('.whatmore-template-type[data="template-g"]')||e.querySelector('.whatmore-template-type[data="template-h"]')||e.querySelector('.whatmore-template-type[data="template-j"]'),r=null!==(i=e.querySelector('.whatmore-template-type[data-wh="template-collections-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-c"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-stories"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-d"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-e"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-f"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-g"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-h"]'))&&void 0!==i?i:e.querySelector('.whatmore-template-type[data="template-collections-a"]')||e.querySelector('.whatmore-template-type[data="template-collections-b"]')||e.querySelector('.whatmore-template-type[data="template-collections-c"]')||e.querySelector('.whatmore-template-type[data="template-collections-stories"]')||e.querySelector('.whatmore-template-type[data="template-collections-e"]')||e.querySelector('.whatmore-template-type[data="template-collections-d"]')||e.querySelector('.whatmore-template-type[data="template-collections-f"]')||e.querySelector('.whatmore-template-type[data="template-collections-g"]')||e.querySelector('.whatmore-template-type[data="template-collections-h"]')||e.querySelector('.whatmore-template-type[data="template-collections-j"]'),s=null!==(o=e.querySelector('.whatmore-template-type[data-wh="template-banner-a"]'))&&void 0!==o?o:e.querySelector('.whatmore-template-type[data="template-banner-a"]'),c=e;if(w){const t=e.querySelector(".whatmore-shimmer-stories");t&&(t.style.display="none")}else if(!I){const t=e.querySelector(".loading-skeleton-wrapper");t&&(t.style.display="none")}(s||r||l||a)&&(l&&c||a&&c||s&&c||r&&c)&&(c.style.minHeight="0px")}),null==t||0==t.length||g?(0,y.jsx)("div",{}):(O&&(0,N.xv)(t),O&&console.debug("final transformed events data : "+JSON.stringify(t)),O&&console.debug("valid events size : "+t.length),(0,y.jsx)(k,{heading:e.heading,events:t,allEvents:p}))}},8945: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,{H:function(){return i}})}}]);
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[199],{1019:function(e,t,n){n.d(t,{B:function(){return a}});var i=n(1348),o=n(964);function a(e){return`${(0,i.jpW)(e)?o.$$:o.MT}/v2/brand/${e}/product-events/recommendation/cdn`}},1351:function(e,t,n){n.d(t,{PG:function(){return s},kz:function(){return c},UM:function(){return u},yP:function(){return p},DG:function(){return d}});var i=n(1348),o=n(3330),a=n(6157);function l(e,t,n={},i){var o;const l=s[e];if(!l)return;const r=l.isActionEnabled(),c=null===i||void 0===i||null===(o=i.meta_actions)||void 0===o?void 0:o[l.customAction];(r||c)&&"function"==typeof fbq&&(async()=>{const i={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===a.O.VIDEO_PLAYBACK&&{watch_time:n.watch_time,video_duration:n.video_duration}};fbq("trackCustom",l.action,i),c&&setTimeout(()=>{null===c||void 0===c||c.forEach(e=>{fbq("trackCustom",e,i)})},500)})()}var r=n(7145);const s={[a.O.EVENT_VIEW]:{isActionEnabled:i.NFF,action:"whatmore_video_click_event",customAction:"video_clicked"},[a.O.VIDEO_PLAYBACK]:{isActionEnabled:i.Eel,action:"whatmore_video_watch_event",customAction:"video_watched"},[a.O.VIDEO_LIKED]:{isActionEnabled:i.Mz3,action:"whatmore_video_like_event",customAction:"video_liked"},[a.O.VIDEO_SHARE_CTA_CLICKED]:{isActionEnabled:i.OLZ,action:"whatmore_video_share_event",customAction:"video_shared"},[a.O.SHOPNOW_ATC_CLICKED]:{isActionEnabled:i.T9r,action:"whatmore_video_atc_event",customAction:"video_atc_clicked"},[a.O.PRODUCT_TILE_ATC_CLICKED]:{isActionEnabled:i.T9r,action:"whatmore_video_atc_event",customAction:"video_atc_clicked"},[a.O.SHOPNOW_CLICKED]:{isActionEnabled:i.nEf,action:"whatmore_product_tile_click_event",customAction:"video_product_tile_clicked"},[a.O.PRODUCT_TILE_SHOPNOW_CLICKED]:{isActionEnabled:i.nEf,action:"whatmore_product_tile_click_event",customAction:"video_product_tile_clicked"}};function c({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:c}){var d,u,p,m;((0,r.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:c}),e in s)&&(l(e,null!==(d=null===a||void 0===a?void 0:a[1])&&void 0!==d?d:null===a||void 0===a?void 0:a[0],t,i),(0,o.n)({page_type:n.landingLocationType,selection_type:e,video_name:i.event_id,video_percentage:"NA",product_name:null!==(u=null===a||void 0===a||null===(p=a[1])||void 0===p?void 0:p.title)&&void 0!==u?u:null===a||void 0===a||null===(m=a[0])||void 0===m?void 0:m.title}))}function d({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:c}){var d,u,p,m;((0,r.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:c}),e in s)&&(l(e,null!==(d=null===a||void 0===a?void 0:a[1])&&void 0!==d?d:null===a||void 0===a?void 0:a[0],t,i),(0,o.n)({page_type:n.landingLocationType,selection_type:e,video_name:i.event_id,video_percentage:t.video_duration>0?Math.ceil(t.watch_time/t.video_duration*100):"NA",product_name:null!==(u=null===a||void 0===a||null===(p=a[1])||void 0===p?void 0:p.title)&&void 0!==u?u:null===a||void 0===a||null===(m=a[0])||void 0===m?void 0:m.title}))}function u({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:l}){var c,d,u;((0,r.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:a,ctaList:l}),e in s)&&(0,o.n)({page_type:n.landingLocationType,selection_type:e,video_name:i.event_id,video_percentage:"NA",product_name:null!==(c=null===a||void 0===a||null===(d=a[1])||void 0===d?void 0:d.title)&&void 0!==c?c:null===a||void 0===a||null===(u=a[0])||void 0===u?void 0:u.title})}function p({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:a}){(0,r.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:a})}},3350:function(e,t,n){n.r(t),n.d(t,{default:function(){return z}});var i=n(9950),o=n(964),a=n(140),l=n(5830),r=n(1348),s=n(4533),c=n(6613),d=n(1085),u=n(5551),p=n(2039),m=n(4833),v=n(2979),h=n(6157),_=n(8945),g=n(9821),y=n(4414);const S=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(340),n.e(571),n.e(987),n.e(411),n.e(261),n.e(665)]).then(n.bind(n,5213))),w=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(607),n.e(571),n.e(620),n.e(116)]).then(n.bind(n,7144))),I=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(257),n.e(571),n.e(987),n.e(714),n.e(423)]).then(n.bind(n,517))),E=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(257),n.e(571),n.e(987),n.e(714),n.e(412)]).then(n.bind(n,7646))),T=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(257),n.e(571),n.e(987),n.e(714),n.e(221)]).then(n.bind(n,5451))),x=i.lazy(()=>Promise.all([n.e(283),n.e(59),n.e(571),n.e(491)]).then(n.bind(n,4295))),f=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(534),n.e(571),n.e(987),n.e(411),n.e(688),n.e(142),n.e(620),n.e(474)]).then(n.bind(n,6945))),O=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(184),n.e(571),n.e(987),n.e(411),n.e(688),n.e(485)]).then(n.bind(n,4431))),C=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(571),n.e(987),n.e(676)]).then(n.bind(n,3369))),j=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(534),n.e(571),n.e(987),n.e(411),n.e(688),n.e(142),n.e(891)]).then(n.bind(n,7178))),D=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(534),n.e(571),n.e(987),n.e(411),n.e(688),n.e(142),n.e(306)]).then(n.bind(n,9406))),b=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(946),n.e(571),n.e(987),n.e(411),n.e(497)]).then(n.bind(n,3795))),L=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(340),n.e(571),n.e(987),n.e(411),n.e(688),n.e(261),n.e(933)]).then(n.bind(n,6989))),A=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(744),n.e(571),n.e(987),n.e(411),n.e(688),n.e(806)]).then(n.bind(n,3278))),P=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(257),n.e(571),n.e(987),n.e(1)]).then(n.bind(n,4596))),q=i.lazy(()=>Promise.all([n.e(283),n.e(304),n.e(59),n.e(946),n.e(607),n.e(187),n.e(571),n.e(987),n.e(411),n.e(688),n.e(906)]).then(n.bind(n,4688))),W=i.lazy(()=>n.e(374).then(n.bind(n,5100)));var k=function(e){var t,k;const[G]=(0,l.QN)("isInDesignMode"),[$]=(0,l.QN)("isDemoBrand"),[N]=(0,l.QN)("whatmoreTopBottomPadding"),[V]=(0,l.QN)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:B}=(0,i.useContext)(u.B),[M]=(0,l.QN)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:F}=(0,i.useContext)(u.B),z=(0,l.Xd)("isLandingSharedLink"),R=(0,l.Xd)("whatmoreShareTemplateId"),H=(0,l.Xd)("whatmoreShareStoryId"),K=(0,l.Xd)("whatmoreShareEventId"),{whatmoreWidgetSourceDetails:U,whatmoreUserInfo:J}=(0,i.useContext)(u.B),Q=z&&F===(0,m.Mm)(R),[X,Y]=(0,i.useState)(Q),[Z,ee]=(0,i.useState)(-1),[te,ne]=(0,i.useState)(null);let ie=e.events;const oe=e.allEvents;var ae=null;B&&!ae&&(ae=function(e){var t=e.reduce((e,t,n)=>{var i,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,storyset_dynamic_thumbnail:null!==(i=null===t||void 0===t?void 0:t.storyset_dynamic_thumbnail)&&void 0!==i&&i,events:[t]},e},{}),n=Object.values(t);return n.sort((e,t)=>e.start_event_index-t.start_event_index),n}(ie));const le=U.landingLocationType,re=U.templateType;function se(e,t=!1,i=null){(0,c.MN)()&&(0,g._)()&&!t&&(0,d.bo)(),G||$||(async()=>{const{initializeGA:t,sendVideoViewEventToGA:i}=await Promise.resolve().then(n.bind(n,3330));t();const l=ae[e].events[0],r=(0,m.Wd)(le)+(0,m.gf)(re)+(null!==l&&void 0!==l&&l.isRelatedEvent?"R":"E")+"_"+(null===l||void 0===l?void 0:l.event_id);(0,a.lB)(l),i(M,o.TB,o.OL),(0,s.Ch)(l.event_id,l.products,"homepage","stories",r,null===l||void 0===l?void 0:l.location,null===J||void 0===J?void 0:J.userType)})();var l=0;null!=i&&ae[e].events.map((e,t)=>{e.event_id==i&&(l=t)}),ee(l),ne(e)}async function ce(e,t=!1){(0,c.MN)()&&(0,g._)()&&!t&&await(0,d.bo)(),ee(e.index),((0,p.ij)(e)||(0,p.Il)(e))&&(G||$||(async()=>{const{initializeGA:t,sendVideoViewEventToGA:i}=await Promise.resolve().then(n.bind(n,3330));t();const l=(0,m.Wd)(le)+(0,m.gf)(re)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,a.lB)(e),i(M,o.TB,o.Dk),(0,s.Ch)(e.event_id,e.products,"homepage","carousel",l)})())}function de(e){return(0,y.jsx)(y.Fragment,{})}return(0,i.useEffect)(()=>{if(Q)if((0,_.H)("whatmore-video-player",()=>{Y(!1)}),null!=H&&B){const e=ae.find(e=>H==e.id);if(e)return void se(ae.indexOf(e),!0,K)}else if(null!=K){const e=ie.find(e=>K==e.event_id);if(e)return void ce(e,!0)}},[]),(0,y.jsxs)(y.Fragment,{children:[X&&(0,y.jsx)(W,{}),-1==Z||-2==Z?(0,y.jsx)(de,{}):(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.EVENT_VIEW,event:ie[Z],productList:null===(t=ie[Z])||void 0===t?void 0:t.products,cta:null===(k=ie[Z])||void 0===k?void 0:k.cta,triggerFlag:!G&&!$,children:(0,y.jsx)(q,{events:oe,index:Z,onBack:async function(){ee(-1),Y(!1)},slideDirection:B||"horizontal"===(0,r.br0)(M)?"horizontal":"vertical",eventsStories:ae,initialStoryIndex:te,template:F})})}),(0,y.jsx)("div",{className:"whatmore-widget-container",style:{height:"100%",marginTop:(B?V:N)+"px",marginBottom:(B?V:N)+"px"},children:"template-b"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!$,children:(0,y.jsx)(S,{events:ie,onClick:ce,heading:e.heading})})}):"template-a-1"===F||"template-collections-a-1"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(w,{events:ie,onClick:ce,heading:e.heading})}):"template-feed-a"===F||"template-collections-feed-a"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(L,{events:ie,onClick:ce,heading:e.heading})}):"template-collections-a"===F||"template-c"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!$,children:(0,y.jsx)(I,{events:ie,index:Z,setScreen:ee,onClick:ce,heading:e.heading})})}):"template-collections-b"===F||"template-d"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!$,children:(0,y.jsx)(E,{events:ie,index:Z,setScreen:ee,onClick:ce,heading:e.heading})})}):"template-collections-c"===F||"template-e"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!$,children:(0,y.jsx)(T,{events:ie,index:Z,setScreen:ee,onClick:ce,heading:e.heading})})}):"template-collections-d"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!$,children:(0,y.jsx)(S,{events:ie,index:Z,setScreen:ee,onClick:ce,heading:e.heading})})}):"template-collections-e"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!$,children:(0,y.jsx)(f,{events:ie,index:Z,setScreen:ee,onClick:ce,heading:e.heading})})}):"template-collections-stories"===F||"template-stories"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!G&&!$,children:(0,y.jsx)(P,{events:ie,index:Z,setScreen:ee,onClick:ce,heading:e.heading})})}):"template-f"===F||"template-collections-f"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!$,children:(0,y.jsx)(O,{events:ie,onClick:ce,heading:e.heading})})}):"template-g"===F||"template-collections-g"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!$,children:(0,y.jsx)(C,{events:ie,onClick:ce,heading:e.heading})})}):"template-h"===F||"template-collections-h"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!$,children:(0,y.jsx)(j,{events:ie,onClick:ce,heading:e.heading})})}):"template-i"===F||"template-collections-i"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!$,children:(0,y.jsx)(D,{index:Z,events:ie,onClick:ce,heading:e.heading})})}):"template-j"===F||"template-collections-j"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!$,children:(0,y.jsx)(b,{events:ie,onClick:ce,heading:e.heading})})}):"template-banner-a"===F?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.BANNER_WIDGET_VIEW,event:ie[0],triggerFlag:!G&&!$,children:(0,y.jsx)(A,{events:ie})})}):B?(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.STORIES_WIDGET_VIEW,triggerFlag:!G&&!$,children:(0,y.jsx)(x,{eventsStories:ae,onClick:se,template:F})})}):(0,y.jsx)(i.Suspense,{children:(0,y.jsx)(v.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!G&&!$,children:(0,y.jsx)(f,{events:ie,onClick:ce,heading:e.heading})})})})]})},G=n(7802),$=n(6641),N=n(1351),V=n(5873),B=n(1019);function M(e){return e.split(/[?#]/)[0]}function F(e){return e.split(/[?#]/)[0]}var z=function(e){const[t,a]=(0,i.useState)(),[p,v]=(0,i.useState)(),[_,S]=(0,i.useState)(),{whatmoreIsStoriesTemplate:w}=(0,i.useContext)(u.B),{whatmoreIsCollectionsTemplate:I}=(0,i.useContext)(u.B),{whatmoreIsBannerTemplate:E}=(0,i.useContext)(u.B),[T]=(0,l.QN)("whatmoreShopId"),{whatmoreCollectionId:x}=(0,i.useContext)(u.B),f=(0,l.Xd)("whatmoreLandingLocationType"),O=(0,l.Xd)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:C}=(0,i.useContext)(u.B),{whatmoreUserInfo:j,whatmoreIsPreviewMode:D}=(0,i.useContext)(u.B),b=(0,l.Xd)("whatmoreCollectionUrl"),[L]=(0,l.QN)("isInDesignMode"),[A]=(0,l.QN)("isDemoBrand"),P="19506115"==T?"343270603":(0,r.mJ$)(T)?(0,r.jLA)(T)?b:M(window.location.href):x||M(window.location.href),[q,W]=(0,l.QN)("productRatings"),[z,R]=(0,i.useState)(!1);var H=(0,r.SOt)(T)?o.aD+"/v2/events/":o.$$+"/v2/events/",K=(0,r.SOt)(T)?o.aD+"/v3/events/":o.$$+"/v3/events/",U=(0,r.SOt)(T)?o.aD+"/v4/events/":o.$$+"/v4/events/",J=(0,r.SOt)(T)?o.aD+"/v5/events/":o.$$+"/v5/events/",Q=((0,r.SOt)(T)?o.aD:o.$$,(0,r.SOt)(T)?o.aD+"/get_eventset/":o.$$+"/get_eventset/"),X=(0,r.SOt)(T)?o.aD+"/v2/collection":o.$$+"/v2/collection",Y=(0,r.SOt)(T)?o.aD+"/v3/collection":o.$$+"/v3/collection",Z=(0,r.SOt)(T)?o.aD+"/v4/collection":o.$$+"/v4/collection",ee=((0,r.jpW)(T)?o.$$:o.MT)+"/v2/brand/"+T+"/product-events",te=e.shopId,ne="live,upcoming",ie="true";return(0,i.useEffect)(()=>{null!=t&&0!=t.length&&!_&&(0,c.MN)()&&!(0,l.Xd)("whatmoreVideoPlayerPoolInitiated")&&(0,g._)()&&(0,d.Pc)(d.F5)},[t]),(0,i.useEffect)(()=>{var e,t,i,o;if((0,s.wm)(),f.startsWith("product")){var c=(0,l.Xd)("whatmoreProductId");if(c=(0,r.BcY)(T)?function(e){return"STRQMPNF7QK"==e?encodeURIComponent(window.location.href):"STR6HARJ3QY"==e||"STRI4V3OYCH"==e||"STRGZ9TGDEQ"==e||"STRJ2T2QPKI"==e?F(window.location.href).split("/").pop():F(window.location.href)}(T):c,(0,r.vvU)(T))o=H.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString()+(w?"&template_type=stories":"");else if((0,r.WH1)(T)){o=`${o=(0,B.B)(T)}?client_product_id=${c}&limit=10&recommended=${!(0,r.buK)(T)}&origin=${window.location.hostname}&status=live,upcoming&event_type=video`}else o=ee.toString()+"?client_product_id="+c.toString()+"&status="+ne.toString()+"&event_type=video"}else if(I||"invalid-url"!==b)o=(0,r.JwJ)(T)?`${Y.toString()}?store_id=${te.toString()}&client_collection_id=${"index"==f&&(0,r.FKG)(T).length>0?(0,r.FKG)(T)[0]:P}`:"78232846646"==T?`${Z.toString()}?store_id=${te.toString()}&client_collection_id=${"index"==f&&(0,r.FKG)(T).length>0?(0,r.FKG)(T)[0]:P}`:`${X.toString()}?store_id=${te.toString()}&client_collection_id=${"index"==f&&1==(0,r.FKG)(T).length?(0,r.FKG)(T)[0]:P}`;else if(E){const e=m.Jh,t=(0,m.t6)(f);o=Q.toString()+te.toString()+"?eventset_type="+e+"&source="+t+"&source_id="+T}else{var d,u,p,h;if(("72201044272"==T||"2665447536"==T&&D)&&!w)o=K.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString()+"&latitude="+(null!==(d=null===(u=JSON.parse(localStorage.getItem("_user_wh_lc")))||void 0===u?void 0:u.latitude)&&void 0!==d?d:"")+"&longitude="+(null!==(p=null===(h=JSON.parse(localStorage.getItem("_user_wh_lc")))||void 0===h?void 0:h.longitude)&&void 0!==p?p:"")+"&user_type="+(null!==j&&void 0!==j&&j.userType?"olduser":"newuser");else o=(0,r.JwJ)(T)&&!w?U.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString():"78232846646"!=T||w?H.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString()+(w?"&template_type=stories":""):J.toString()+te.toString()+"?status="+ne.toString()+"&is_active="+ie.toString()}const _=null===(e=window)||void 0===e||null===(t=e.whatmore)||void 0===t||null===(i=t.storyEvents)||void 0===i?void 0:i.events;w&&f.startsWith("index")&&"object"==typeof _&&(null===_||void 0===_?void 0:_.length)>0?(a(_),v(_),R(!0)):fetch(o).then(e=>e.json()).then(e=>{var t;if(E){const t=m.Jh;return(0,G.Po)(e,t)}return(0,r.JwJ)(T)&&(null===e||void 0===e||null===(t=e.questions)||void 0===t?void 0:t.length)>0&&(null==localStorage.getItem("_whatmore_qview_index")&&localStorage.setItem("_whatmore_qview_index",0),(0,s.d3)(null===e||void 0===e?void 0:e.questions)),(0,G.Np)(e,I||"invalid-url"!==b)}).then(e=>{var t,n;O&&console.debug("initial received events size : "+e.length);let i=[...null===e||void 0===e?void 0:e.events,...null===e||void 0===e?void 0:e.all_events];i=(0,r.xku)(T)?(0,G.d8)(i):(0,G.Zf)(i),v(i);const o=null!==(t=null===e||void 0===e||null===(n=e.events)||void 0===n?void 0:n.length)&&void 0!==t?t:0;return i.slice(0,o)}).then(e=>{if((A||L)&&(null==e||e&&0==(null===e||void 0===e?void 0:e.length))){const e=async()=>{const{eventsData:e,storiesData:t,bannerData:i}=await n.e(365).then(n.bind(n,6018));a(w?t:E?i:e)};e()}else a(e);R(!0)}).catch(e=>{S(e.message),R(!0)})},[]),(0,i.useEffect)(()=>{"index"===f?t&&t.length>0&&(0,N.yP)({userInteractionType:h.O.HOMEPAGE_VISITED,widgetSourceDetails:C}):"collection"===f?(t&&t.length>0||"Scale"==(0,r.yt9)(T)||"Enterprise"==(0,r.yt9)(T)||"Premium"==(0,r.yt9)(T))&&(0,N.yP)({userInteractionType:h.O.COLLECTION_PAGE_VISITED,widgetSourceDetails:C}):"product"===f&&(t&&t.length>0||"Scale"==(0,r.yt9)(T)||"Enterprise"==(0,r.yt9)(T)||"Premium"==(0,r.yt9)(T))&&(0,N.yP)({userInteractionType:h.O.PDP_VISITED,widgetSourceDetails:C})},[t]),z&&(null==t||0==t.length||_)&&V.Sn.forEach(e=>{var t,n,i,o;const a=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-stories-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-stories-a"]'),l=null!==(n=e.querySelector('.whatmore-template-type[data-wh="template-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-feed-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-f"]')||e.querySelector('.whatmore-template-type[data-wh="template-stories"]')||e.querySelector('.whatmore-template-type[data-wh="template-e"]')||e.querySelector('.whatmore-template-type[data-wh="template-a-1"]')||e.querySelector('.whatmore-template-type[data-wh="template-g"]')||e.querySelector('.whatmore-template-type[data-wh="template-h"]')||e.querySelector('.whatmore-template-type[data-wh="template-j"]'))&&void 0!==n?n:e.querySelector('.whatmore-template-type[data="template-a"]')||e.querySelector('.whatmore-template-type[data="template-b"]')||e.querySelector('.whatmore-template-type[data="template-f"]')||e.querySelector('.whatmore-template-type[data="template-stories"]')||e.querySelector('.whatmore-template-type[data="template-e"]')||e.querySelector('.whatmore-template-type[data="template-a-1"]')||e.querySelector('.whatmore-template-type[data="template-g"]')||e.querySelector('.whatmore-template-type[data="template-h"]')||e.querySelector('.whatmore-template-type[data="template-j"]'),r=null!==(i=e.querySelector('.whatmore-template-type[data-wh="template-collections-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-c"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-stories"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-d"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-e"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-f"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-g"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-h"]'))&&void 0!==i?i:e.querySelector('.whatmore-template-type[data="template-collections-a"]')||e.querySelector('.whatmore-template-type[data="template-collections-b"]')||e.querySelector('.whatmore-template-type[data="template-collections-c"]')||e.querySelector('.whatmore-template-type[data="template-collections-stories"]')||e.querySelector('.whatmore-template-type[data="template-collections-e"]')||e.querySelector('.whatmore-template-type[data="template-collections-d"]')||e.querySelector('.whatmore-template-type[data="template-collections-f"]')||e.querySelector('.whatmore-template-type[data="template-collections-g"]')||e.querySelector('.whatmore-template-type[data="template-collections-h"]')||e.querySelector('.whatmore-template-type[data="template-collections-j"]'),s=null!==(o=e.querySelector('.whatmore-template-type[data-wh="template-banner-a"]'))&&void 0!==o?o:e.querySelector('.whatmore-template-type[data="template-banner-a"]'),c=e;if(w){const t=e.querySelector(".whatmore-shimmer-stories");t&&(t.style.display="none")}else if(!I){const t=e.querySelector(".loading-skeleton-wrapper");t&&(t.style.display="none")}(s||r||l||a)&&(l&&c||a&&c||s&&c||r&&c)&&(c.style.minHeight="0px")}),null==t||0==t.length||_?(0,y.jsx)("div",{}):(O&&(0,$.xv)(t),O&&console.debug("final transformed events data : "+JSON.stringify(t)),O&&console.debug("valid events size : "+t.length),(0,y.jsx)(k,{heading:e.heading,events:t,allEvents:p}))}},8945: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,{H:function(){return i}})}}]);