whatmore-react-assets 1.0.321 → 1.0.323
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/css/136.12771958.chunk.css +1 -0
- package/static/css/{55.15ad4f53.chunk.css → 143.45067b01.chunk.css} +1 -1
- package/static/css/{166.6e010f1d.chunk.css → 166.37ad93ee.chunk.css} +1 -1
- package/static/css/184.45067b01.chunk.css +1 -0
- package/static/css/245.12771958.chunk.css +1 -0
- package/static/css/26.b9791533.chunk.css +1 -0
- package/static/css/517.9c45858a.chunk.css +1 -0
- package/static/css/{580.1849eaac.chunk.css → 580.dcf567f2.chunk.css} +1 -1
- package/static/css/602.9c45858a.chunk.css +1 -0
- package/static/css/723.ca6138f6.chunk.css +1 -0
- package/static/css/850.ca6138f6.chunk.css +1 -0
- package/static/css/92.12771958.chunk.css +1 -0
- package/static/css/95.2e5202b9.chunk.css +1 -0
- package/static/js/143.c68bda3b.chunk.js +1 -0
- package/static/js/184.5b4384ea.chunk.js +1 -0
- package/static/js/204.83c78c22.chunk.js +1 -0
- package/static/js/244.e43fe023.chunk.js +1 -0
- package/static/js/26.634dea1e.chunk.js +1 -0
- package/static/js/310.ea2907b1.chunk.js +1 -0
- package/static/js/516.3b99a3c5.chunk.js +1 -0
- package/static/js/517.385ac108.chunk.js +1 -0
- package/static/js/{602.91c715e6.chunk.js → 602.c548c7a9.chunk.js} +1 -1
- package/static/js/{642.9b4aeb53.chunk.js → 642.ceaa86be.chunk.js} +1 -1
- package/static/js/723.f86a6856.chunk.js +1 -0
- package/static/js/{850.b913d034.chunk.js → 850.cecf4b57.chunk.js} +1 -1
- package/static/js/972.d9bae2ca.chunk.js +1 -0
- package/whatmore.js +2 -2
- package/static/css/136.6572a5b0.chunk.css +0 -1
- package/static/css/245.6572a5b0.chunk.css +0 -1
- package/static/css/517.fbff760e.chunk.css +0 -1
- package/static/css/602.fbff760e.chunk.css +0 -1
- package/static/css/850.1582bd5c.chunk.css +0 -1
- package/static/css/92.6572a5b0.chunk.css +0 -1
- package/static/css/95.10d95045.chunk.css +0 -1
- package/static/js/204.fcae35ae.chunk.js +0 -1
- package/static/js/310.cc344a71.chunk.js +0 -1
- package/static/js/517.84bd1306.chunk.js +0 -1
- package/static/js/55.ce20154c.chunk.js +0 -1
- package/static/js/664.36967423.chunk.js +0 -1
- package/static/js/972.54949ba1.chunk.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[55],{51:function(e,t,n){n.d(t,{Z:function(){return i}});n(7313);var o=n(6417);var i=function(e){return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("span",{className:"whatmore-loading-indicator"})})}},3175:function(e,t,n){var o=n(208),i=n(51),r=n(6417);t.Z=function(e){var t,n;const a=null!==(t=e.height)&&void 0!==t?t:"100%",s=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,r.jsxs)("div",{style:{width:s,height:a,overflow:"hidden"},children:[(0,r.jsx)(o.Od,{height:"100%",width:"100%",speed:0,startColor:"#202020",endColor:"#606060"}),(0,r.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignContent:"center",width:"100%",height:"100%",position:"relative",zIndex:1,bottom:"100%",className:"whatmore-ios-css-relative-fix"},children:(0,r.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",width:"100%",height:"fit-content"},children:(0,r.jsx)(i.Z,{})})})]})}},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 i=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:i,openMiniCart:!0}}));else if("19506115"==e)window.PXUTheme.jsAjaxCart.showDrawer(),window.PXUTheme.jsAjaxCart.updateView();else if("54465429691"==e)refreshCart(i),window.setTimeout((function(){$.fancybox.close(),$(".cart-button").click()}),500);else if("25427564"==e||"4243849314"==e){(new theme.CartDrawer).open()}else"62602182872"==e||"57362710572"==e?(CartJS.getCart(),$(".block-cart").addClass("active")):"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:{}}))):"36300750986"==e||"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)})):"57824805033"==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"),i=document.getElementById("CartDrawer");o&&i&&(i.innerHTML=o.innerHTML),n.querySelector("#CartDrawer .totals__subtotal-value");const r=document.querySelector("cart-drawer");r&&r.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")}))}))})):"61094723750"==e?SLIDECART&&(SLIDECART_UPDATE(),SLIDECART_OPEN()):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()}}},2887:function(e,t,n){var o=n(7313),i=(n(6422),n(3175)),r=n(6417);t.Z=function(e){var t,n,a;const[s,c]=(0,o.useState)(!1),d=o.useRef(0),l=(0,o.useRef)(null),u=null!==(t=e.timeUpdateCallback)&&void 0!==t?t:()=>{},h=null!==(n=e.height)&&void 0!==n?n:"100%",p=null!==(a=e.width)&&void 0!==a?a:"100%";return(0,o.useEffect)((()=>{d.current=0;const e=setInterval((()=>{d.current=d.current+.03,l.current&&u(d.current,5),d.current>=5&&(d.current=0)}),30);return()=>{clearInterval(e)}}),[e.isPlaying]),(0,r.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:p,height:h,overflow:"hidden"},children:[(0,r.jsx)("div",{style:{width:s?"100%":"0px",height:s?"100%":"0px"},children:(0,r.jsx)("img",{ref:l,src:e.url,style:{objectFit:"cover",height:h,width:p,backgroundColor:"white"},alt:"image player",onLoad:()=>{c(!0)}})}),s?(0,r.jsx)(r.Fragment,{}):(0,r.jsx)(i.Z,{width:"100%",height:"100%"})]})}},4892:function(e,t,n){n.d(t,{Z:function(){return u}});var o=n(7313),i=n(3933),r=n(868),a=n(8984),s=n(7300),c=(n(6422),n(2887)),d=n(6417);var l=function(e){var t,n;const r=(0,o.useRef)(null),[a,s,c]=(0,i.YD)({triggerOnce:!0}),l=null!==(t=e.height)&&void 0!==t?t:"100%",u=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,o.useEffect)((()=>{r.current&&(e.isPlaying?r.current.play():r.current.pause())}),[e.isPlaying,s]),(0,d.jsx)("div",{ref:a,style:{width:l,height:u,overflow:"hidden"},children:s?(0,d.jsx)("video",{ref:r,className:"whatmore-video-player",width:u,height:l,preload:"auto",loop:!0,playsInline:!0,muted:!0,autoPlay:!0,src:e.url,style:{backgroundColor:"white"}}):(0,d.jsx)("div",{width:u,height:l,ref:e=>{e&&e.style.setProperty("display","block","important")}})})};var u=function(e){var t,n,u;const[h,p,f]=(0,i.YD)({triggerOnce:!0});if((0,s.WJ)(e.event))return(0,d.jsx)(c.Z,{height:e.height,width:e.width,url:e.url,isPlaying:e.isPlaying,timeUpdateCallback:e.timeUpdateCallback});const v=null!==(t=e.pauseFromPlayTimeInMs)&&void 0!==t?t:200;if((0,a.KE)())return(0,d.jsx)(l,{height:"100%",width:"100%",url:(0,r.V)(e.url),isPlaying:e.isPlaying,pauseFromPlayTimeInMs:v});const m=(0,o.useRef)(null),g=null!==(n=e.height)&&void 0!==n?n:"100%",w=null!==(u=e.width)&&void 0!==u?u:"100%";return(0,o.useEffect)((()=>{m.current&&(e.isPlaying?m.current.play():m.current.pause())}),[e.isPlaying,p]),(0,d.jsx)("div",{ref:h,style:{width:g,height:w,overflow:"hidden"},children:p?(0,d.jsx)("video",{ref:m,className:"whatmore-video-player",width:w,height:g,preload:"auto",loop:!0,playsInline:!0,muted:!0,src:(0,r.V)(e.url),style:{backgroundColor:"white"}}):(0,d.jsx)("div",{width:w,height:g,ref:e=>{e&&e.style.setProperty("display","block","important")}})})}},6055:function(e,t,n){n.r(t),n.d(t,{default:function(){return z}});var o=n(7313),i=n(9854),r=n(2860),a=n(7753),s=n(5160),c=(n(4844),n(6967)),d=n(4959),l=n(4892),u=n(6805),h=n(9821);var p=function(e){const[t,n,o,i,r]=(0,h.Z)(),[s]=(0,a.j1)("whatmoreEmbedAppVideoPlayerSizePortrait"),[c]=(0,a.j1)("whatmoreEmbedAppVideoPlayerSizeLandscape"),d=r[u.YP]===u.$w?c/100:s/100*1.2;return[t*d,n*d,r]},f=n(9723),v=n(9461),m=n.n(v),g=n(1195),w=n(7108),y=(n(7244),n(123),n(6417));var b=function(e){const t=o.useRef(null);var[n,r,s]=p();const[c]=(0,a.j1)("whatmoreEmbedAppVideoTitle"),[h]=(0,a.j1)("whatmoreEmbedAppPositionPortrait"),[v]=(0,a.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[b]=(0,a.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[x]=(0,a.j1)("whatmoreEmbedAppPositionLandscape"),[j]=(0,a.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[E]=(0,a.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),S=(0,a.MO)("whatmoreShopId");var _=h,P=v,C=b;s[u.YP]===u.$w&&(_=x,P=j,C=E);const[T,k]=(0,o.useState)(["initial",window.pageYOffset]),[I,O]=(0,o.useState)(!1);function z(e,t){k(e),e[1]<=100?O(!1):t!=I&&O(t)}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const n=()=>{const n=window.pageYOffset;Math.abs(n-e)<100||(z([n>e?"scrolled-down":"scrolled-up",n],!0),e=n>0?n:0),t=!1},o=()=>{t||(window.requestAnimationFrame(n),t=!0)};return window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)}),[T]),(0,d.O3)({ref:t,handler:()=>{z(["scrolled-up",T[1]],!0)}});const A=e.event,L=e.inVideoClick,N=e.closeClick,D=.3*r,M=.6*r,Z=.1*r,R=.1*(.5*r),V="10px",B=(0,i.Z$)(S);var J=!1,H=0,F=0;function q(e){J=e}return(0,y.jsx)("div",{children:I&&(0,i.lV)(S)?(0,y.jsx)("div",{style:"left"===_?{left:"1px",bottom:C+"px",position:"fixed",zIndex:B}:{right:"5px",bottom:C+"px",position:"fixed",zIndex:B},children:(0,y.jsxs)("div",{onClick:()=>{z(["initial",T[1]],!1)},style:{margin:"1px",width:r+"px",height:n+"px"},className:"left"===_?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,y.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:V,overflow:"hidden"},children:(0,y.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,y.jsx)(l.Z,{url:A.thumbnail_image,isPlaying:!1,event:A})})}),(0,y.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,y.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,y.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,y.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,y.jsx)(g.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:D+"px"},style:{position:"relative",zIndex:1,left:R+"px",bottom:R+"px"},onClick:N})})}),(0,y.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,y.jsx)(w.Z,{sx:{color:"white",fontSize:2*D+"px",filter:"drop-shadow(0 0 15px black);"}})})]})})]})}):(0,y.jsx)(m(),{nodeRef:t,cancel:".activate-button,.close-btn",defaultClassName:"whatmore-react-draggable",defaultClassNameDragging:"whatmore-react-draggable-dragging",defaultClassNameDragged:"whatmore-react-draggable-dragged",bounds:"html",onStart:(e,t)=>{var n,o;n=t.x,o=t.y,H=n,F=o},onDrag:(e,t)=>{q(!0)},onStop:(e,t)=>{J&&(Math.abs(t.x-H)>5||Math.abs(t.y-F)>5)?q(!1):L(A)},children:(0,y.jsx)("div",{ref:t,style:"left"===_?{left:P+"px",bottom:C+"px",position:"fixed",zIndex:B}:{right:P+"px",bottom:C+"px",position:"fixed",zIndex:B},children:(0,y.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:r+"px",height:n+"px"}),className:"left"===_?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,y.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:V,overflow:"hidden",position:"relative"},children:(0,y.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,y.jsx)(l.Z,{url:A.thumbnail_image,isMuted:!0,isPlaying:!0,event:A})})}),(0,y.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,y.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,y.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,y.jsx)(g.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:D+"px"},onClick:N,style:{position:"relative",zIndex:1,left:Z+"px",bottom:Z+"px"}})}),(0,y.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,y.jsx)(f.Z,{sx:{color:"white",fontSize:M+"px",filter:"drop-shadow(0 0 15px black);"}})}),(0,y.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:V,borderBottomRightRadius:V,backgroundImage:c?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,y.jsxs)("p",{style:{textAlign:"center",color:"white",fontFamily:"Sans-serif",fontWeight:"semi-bold",fontSize:.4*D+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",c]})})]})})]})})})})},x=n(58),j=n(8984),E=(n(7247),n(1824),n(4669)),S=n(941),_=n(9302),P=n(2575),C=n(7300),T=n(6524);const k=(0,P.Z)({key:"whatmore-css-ppv"}),I=o.lazy((()=>Promise.all([n.e(648),n.e(576),n.e(853),n.e(843),n.e(926),n.e(310),n.e(282),n.e(204)]).then(n.bind(n,1862))));function O(e){return e.split(/[?#]/)[0]}var z=function(e){const[t,n]=(0,o.useState)(),[d,l]=(0,o.useState)(),[u]=(0,a.j1)("isInDesignMode"),[h]=(0,a.j1)("isDemoBrand"),[p]=(0,a.j1)("whatmoreEmbedAppUseVariant"),[f,v]=(0,o.useState)(-2),[m]=(0,a.j1)("whatmoreVariantId"),[g]=(0,a.j1)("whatmoreShopId");var[w]=(0,a.j1)("whatmoreProductId");const P=(0,a.MO)("isLandingSharedLink"),z=(0,a.MO)("whatmoreShareTemplateId"),A=((0,a.MO)("whatmoreShareStoryId"),(0,a.MO)("whatmoreShareEventId"));w=(0,i.iX)(g)?O(window.location.href):w;const[L,N]=(0,o.useState)((()=>"true"===p?m:w));var D=r.Gc+"/v1/brand/"+g+"/product-events";(0,o.useEffect)((()=>{(0,c.hb)()}),[]),(0,o.useEffect)((()=>{(0,E.ll)(g)}),[]),(0,o.useEffect)((()=>{null==t||0==t.length||d||!(0,j.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||(0,x.b5)(x.UD)}),[t]),(0,o.useEffect)((()=>{v(-1),fetch(D.toString()+"?client_product_id="+L.toString()+"&status="+"upcoming".toString()+"&event_type=video").then((e=>e.json())).then((e=>(n(e),e))).then((e=>((0,i.yo)(g)&&function(e,t){setTimeout((async()=>{const n=e.reduce(((e,t)=>[...e,...t.products]),[]).filter((e=>e.client_product_id==t))[0];if(!n||n.product_link==O(window.location.href))return;const o={product_id:n.product_id,product_link:O(window.location.href)};fetch(r.Gc+"/product",{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(o)})}),500)}(e,L),e))).catch((e=>{l(e.message)}))}),[L]),(0,o.useEffect)((()=>{v(-2)}),[t]),(0,o.useEffect)((()=>{let e=history.pushState;history.pushState=function(){let t=e.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),t};let t=history.replaceState;history.replaceState=function(){let e=t.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),e},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))})),window.addEventListener("locationchange",(function(){if("true"===p){const e=function(e){for(var t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var o=t[n].split("=");if(o[0]==e)return o[1]}return!1}("variant");e&&""!==e&&N(e)}}))}),[]),(0,o.useEffect)((()=>{null==t||0==t.length||d||P&&"template-embed"==(0,T.zv)(z)&&null!=A&&t.forEach(((e,t)=>{A==e.event_id&&M(e,!0,t)}))}),[t]);const M=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if((0,j.KE)()&&!t&&(0,x.QV)(),(0,C.B6)(e)||(0,C.WJ)(e))return u||h||(async()=>{(0,s.wh)(e),(0,E.Tc)(g,r.h7,r.dU),(0,c.H4)(e.event_id,e.products,"product_page","video_popup")})(),void v(n)};function Z(){return(0,y.jsx)(y.Fragment,{})}return null==t||0==t.length||d?(0,y.jsx)("div",{}):(0,y.jsx)(_.C,{value:k,children:"no-product"===L||-1===f||0===t.length?(0,y.jsx)(Z,{}):-2===f&&t.length>0?(0,y.jsx)("div",{children:(0,y.jsx)(b,{event:t[0],inVideoClick:M,closeClick:e=>{e.stopPropagation(),v(-1)}})}):(0,y.jsx)("div",{children:(0,y.jsx)(o.Suspense,{children:(0,y.jsx)(I,{events:t,index:f,onBack:function(){(0,i.n2)(g)&&(0,a.MO)("whatmoreAddedToCart")&&(0,S.D)(g,(()=>{}),100,window.location.hostname),v(-2)},template:"template-product-page"})})})})}},868:function(e,t,n){n.d(t,{V:function(){return s}});var o=n(9854),i=n(7753);const r={"https://d3syezql093hs1.cloudfront.net":"https://whatmore-brand-video-assets.azureedge.net","https://d2r0bijhs9mx1s.cloudfront.net":"https://whatmore-brand-thumbnail-video-assets.azureedge.net","https://d2oouab8j9eigo.cloudfront.net":"https://whatmore-brand-story-assets.azureedge.net","https://d28nus7q7qajdn.cloudfront.net":"https://whatmore-video-assets.azureedge.net","https://d1zl4k1t5o4s75.cloudfront.net":"https://whatmore-brand-video-assets-720p.azureedge.net"},a={"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"},s=function(e){const t=(0,i.MO)("whatmoreShopId");if(e.startsWith("https://cdn.shopify.com"))return e;if("AWSCDN"==(0,o.zp)(t))return e;if("AZURECDN"==(0,o.zp)(t)){if(e.includes(".azureedge.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}}if("BUNNYCDN"==(0,o.zp)(t)){if(e.includes(".b-cdn.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}}return e}},7300:function(e,t,n){n.d(t,{B6:function(){return o},WJ:function(){return i},yC:function(){return r}});const o=function(e){return"video"===e.event_type},i=function(e){return"image"===e.event_type},r=function(e){return"livestream"===e.event_type}},6805:function(e,t,n){n.d(t,{$I:function(){return s},$w:function(){return d},AK:function(){return r},AL:function(){return a},YP:function(){return i},me:function(){return o},rE:function(){return c}});const o="device_type",i="device_mode",r="mobile",a="tablet",s="desktop",c="portrait",d="landscape"},6422:function(e,t,n){var o=n(7313),i=n(7753);t.Z=function(e){const[t,n]=(0,i.j1)("muted");return(0,o.useEffect)((()=>{}),[]),[t,n]}},8866:function(e,t,n){var o=n(7313);function i(){return[window.innerHeight,window.innerWidth]}t.Z=function(e){var[t,n]=i();const[r,a]=(0,o.useState)(["portrait",t,n]);return(0,o.useLayoutEffect)((()=>{function e(){var[e,t]=i();a(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)}}),[]),r}},9821:function(e,t,n){var o=n(6367),i=n(7753),r=n(8866),a=n(6805);t.Z=function(e){const[t,n,s]=(0,r.Z)(),[c]=(0,i.j1)("whatmoreLandscapePadding"),[d]=(0,i.j1)("whatmoreVideoTileSize"),l=(0,o.useMediaQuery)({query:"(min-width: 1025px)"}),u=(0,o.useMediaQuery)({query:"(min-width: 481px)"}),h=!("portrait"!=t||!u),p=d/100*1.3*.5,f=d/100;var v=Math.min(s,n),[m,g,w,y]=[.6*v*(16/9),.6*v,1.4,0];function b(e){return Math.round(10*e)/10}var x={DEVICE_TYPE:a.AK,DEVICE_MODE:a.rE};if(l){const e=g*p,t=m*p;[m,g,w,y]=[t,e,(s-2*c)/(1.1*e),c],x[a.me]=a.$I,x[a.YP]=a.$w}else if(h){var j=.8*g,E=.8*m;"portrait"==t?(j*=f,E*=f,[m,g,w,y]=[E,j,b(s/(1.2*j)),0],x[a.me]=a.AL,x[a.YP]=a.rE):([m,g,w,y]=[E,j,(s-2*c)/(1.1*j),c],x[a.me]=a.AL,x[a.YP]=a.$w)}else{j=g,E=m;"portrait"==t?(j*=f,E*=f,[m,g,w,y]=[E,j,b(s/(1.15*j)),0],x[a.me]=a.AK,x[a.YP]=a.rE):(j=.7*g,E=.7*m,[m,g,w,y]=[E,j,(s-2*c)/(1.1*j),c],x[a.me]=a.AK,x[a.YP]=a.$w)}return[m,g,w,y,x]}},5160:function(e,t,n){n.d(t,{$L:function(){return d},JX:function(){return c},Z6:function(){return r},rp:function(){return l},wh:function(){return i},wz:function(){return s},x0:function(){return a}});var o=n(2860);n(7753);function i(e){console.debug("updating user view count for event.");const t={event_id:e.event_id,increase_by:1};fetch(o.Gc+"/event/metrics/views",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(console.debug("updating user view count response : HTTP "+e.status),e.json()))).then((e=>{console.debug("updating user view count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating user view count user for event : ",e)}))}function r(e,t){console.debug("updating like count for event.");const n={event_id:e.event_id,increase_by:t};fetch(o.Gc+"/event/metrics/like",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(console.debug("updating like count response : HTTP "+e.status),e.json()))).then((e=>{console.debug("updating like count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating like count user for event : ",e)}))}function a(e){console.debug("updating share count for event.");const t={event_id:e.event_id,increase_by:1};fetch(o.Gc+"/event/metrics/share",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(console.debug("updating share count response : HTTP "+e.status),e.json()))).then((e=>{console.debug("updating share count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating share count user for event : ",e)}))}function s(e,t){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(o.Gc+"/event/metrics/clicks",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(console.debug("updating user event-product click count response : HTTP "+e.status),e.json()))).then((e=>{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 c(e,t,n){console.debug("updating event-product add to cart count for event {} and product {}.",e.event_id,t.product_id);const i={event_id:e.event_id,product_id:t.product_id,increase_by:n};fetch(o.Gc+"/event/metrics/add_to_cart",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)}).then((e=>(console.debug("updating user event-product add to cart count response : HTTP "+e.status),e.json()))).then((e=>{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 d(e,t){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(o.Gc+"/event/metrics/buy_now",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(console.debug("updating user event-product buy now count response : HTTP "+e.status),e.json()))).then((e=>{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 l(){let{storeId:e="",eventId:t=0,productId:n="",variantId:i="",cartToken:r="",checkoutToken:a="",quantity:s=0,price:c="",actionType:d="",trackingId:l=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},u={event_id:t,product_id:n,cart_token:r,checkout_token:a,quantity:s,price:c,variant_id:i,action_type:d,tracking_id:l};console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} ",t,n,i);const h=await fetch(o.Gc+"/cart-metadata/"+e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(u)}).then((e=>(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,i)}));return h}},4669:function(e,t,n){n.d(t,{Tc:function(){return u},ll:function(){return l}});var o=n(1824),i=n(7786),r=n(9854);n(7753);const a="Whatmore Video Shopping",s="Video View",c={carousel:"Carousel",stories:"Stories",video_popup:"Video Popup"},d={homepage:"Home Page",product_page:"Product Page"};async function l(e){if((0,r.Dv)(e)&&null!==(0,r.hf)(e)&&(i.ZP.initialize((0,r.hf)(e)),console.debug("Whatmore: initialized GA4")),(0,r.hv)(e)&&null!==(0,r.BH)(e)){const t=(0,r.OQ)(e);o.ZP.initialize((0,r.BH)(e),{useExistingGa:t}),console.debug("Whatmore: initialized GA3")}}async function u(e,t,n){(0,r.hv)(e)&&null!==(0,r.BH)(e)&&(o.ZP.event({category:a,action:s,label:d[t]+":"+c[n]}),console.debug("Whatmore: pushed view event to GA3")),(0,r.Dv)(e)&&null!==(0,r.hf)(e)&&(i.ZP.event({category:a,action:s+":"+d[t]+":"+c[n],value:1,nonInteraction:!1}),console.debug("Whatmore: pushed view event to GA4"))}},123:function(){},7244:function(){}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[664],{51:function(t,e,n){n.d(e,{Z:function(){return r}});n(7313);var i=n(6417);var r=function(t){return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("span",{className:"whatmore-loading-indicator"})})}},1092:function(t,e,n){var i=n(237),r=n(9854),o=n(7753),s=n(6417);function a(t){return t<1e3?t:t<1e5?(t/1e3).toFixed(0)+"K":(t/1e5).toFixed(0)+"L"}e.Z=function(t){const e=(0,o.MO)("whatmoreShopId"),n=(0,o.MO)("whatmoreUITheme"),l=(0,o.MO)("whatmorePrimaryFont"),d=t.event,c=t.fontSize;if(d.total_views<=0)return(0,s.jsx)(s.Fragment,{});const h=(0,r.S_)(e);return"template-icon"==h?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,r.XC)(e),color:"white",borderRadius:"round"==n?"5px":"0px",borderWidth:(0,r.al)(e),borderColor:(0,r.qP)(e)},children:(0,s.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:[(0,s.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,s.jsx)(i.Z,{sx:{color:(0,r.aL)(e)+" !important",fontSize:c,fontWeight:"normal"}})}),(0,s.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,s.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,r.aL)(e),"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",l,"important"),t.style.setProperty("font-size",c,"important"))},style:{fontWeight:"normal"},children:" "+a(d.total_views)+" "})})]})})}):"template-text"==h?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,r.XC)(e),color:"white",borderRadius:"round"==n?"5px":"0px",borderWidth:(0,r.al)(e),borderColor:(0,r.qP)(e)},children:(0,s.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:(0,s.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,s.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,r.aL)(e),"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",l,"important"))},style:{fontSize:c,fontWeight:"bold"},children:" "+a(d.total_views)+" views"})})})})}):void 0}},7129:function(t,e,n){n.d(e,{V:function(){return i}});const i=(0,n(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},3175:function(t,e,n){var i=n(208),r=n(51),o=n(6417);e.Z=function(t){var e,n;const s=null!==(e=t.height)&&void 0!==e?e:"100%",a=null!==(n=t.width)&&void 0!==n?n:"100%";return(0,o.jsxs)("div",{style:{width:a,height:s,overflow:"hidden"},children:[(0,o.jsx)(i.Od,{height:"100%",width:"100%",speed:0,startColor:"#202020",endColor:"#606060"}),(0,o.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,o.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",width:"100%",height:"fit-content"},children:(0,o.jsx)(r.Z,{})})})]})}},5945:function(t,e,n){function i(t){return"undefined"==typeof t||"undefined"==t||null==t?"":t.replace(/\w\S*/g,(function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}))}n.d(e,{s:function(){return i}})},2887:function(t,e,n){var i=n(7313),r=(n(6422),n(3175)),o=n(6417);e.Z=function(t){var e,n,s;const[a,l]=(0,i.useState)(!1),d=i.useRef(0),c=(0,i.useRef)(null),h=null!==(e=t.timeUpdateCallback)&&void 0!==e?e:()=>{},u=null!==(n=t.height)&&void 0!==n?n:"100%",p=null!==(s=t.width)&&void 0!==s?s:"100%";return(0,i.useEffect)((()=>{d.current=0;const t=setInterval((()=>{d.current=d.current+.03,c.current&&h(d.current,5),d.current>=5&&(d.current=0)}),30);return()=>{clearInterval(t)}}),[t.isPlaying]),(0,o.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:p,height:u,overflow:"hidden"},children:[(0,o.jsx)("div",{style:{width:a?"100%":"0px",height:a?"100%":"0px"},children:(0,o.jsx)("img",{ref:c,src:t.url,style:{objectFit:"cover",height:u,width:p,backgroundColor:"white"},alt:"image player",onLoad:()=>{l(!0)}})}),a?(0,o.jsx)(o.Fragment,{}):(0,o.jsx)(r.Z,{width:"100%",height:"100%"})]})}},4892:function(t,e,n){n.d(e,{Z:function(){return h}});var i=n(7313),r=n(3933),o=n(868),s=n(8984),a=n(7300),l=(n(6422),n(2887)),d=n(6417);var c=function(t){var e,n;const o=(0,i.useRef)(null),[s,a,l]=(0,r.YD)({triggerOnce:!0}),c=null!==(e=t.height)&&void 0!==e?e:"100%",h=null!==(n=t.width)&&void 0!==n?n:"100%";return(0,i.useEffect)((()=>{o.current&&(t.isPlaying?o.current.play():o.current.pause())}),[t.isPlaying,a]),(0,d.jsx)("div",{ref:s,style:{width:c,height:h,overflow:"hidden"},children:a?(0,d.jsx)("video",{ref:o,className:"whatmore-video-player",width:h,height:c,preload:"auto",loop:!0,playsInline:!0,muted:!0,autoPlay:!0,src:t.url,style:{backgroundColor:"white"}}):(0,d.jsx)("div",{width:h,height:c,ref:t=>{t&&t.style.setProperty("display","block","important")}})})};var h=function(t){var e,n,h;const[u,p,f]=(0,r.YD)({triggerOnce:!0});if((0,a.WJ)(t.event))return(0,d.jsx)(l.Z,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback});const m=null!==(e=t.pauseFromPlayTimeInMs)&&void 0!==e?e:200;if((0,s.KE)())return(0,d.jsx)(c,{height:"100%",width:"100%",url:(0,o.V)(t.url),isPlaying:t.isPlaying,pauseFromPlayTimeInMs:m});const x=(0,i.useRef)(null),w=null!==(n=t.height)&&void 0!==n?n:"100%",g=null!==(h=t.width)&&void 0!==h?h:"100%";return(0,i.useEffect)((()=>{x.current&&(t.isPlaying?x.current.play():x.current.pause())}),[t.isPlaying,p]),(0,d.jsx)("div",{ref:u,style:{width:w,height:g,overflow:"hidden"},children:p?(0,d.jsx)("video",{ref:x,className:"whatmore-video-player",width:g,height:w,preload:"auto",loop:!0,playsInline:!0,muted:!0,src:(0,o.V)(t.url),style:{backgroundColor:"white"}}):(0,d.jsx)("div",{width:g,height:w,ref:t=>{t&&t.style.setProperty("display","block","important")}})})}},7148:function(t,e,n){n.d(e,{Z:function(){return y}});var i=n(7313),r=n(9821),o=n(9723),s=n(7753),a=n(4892),l=n(7129),d=n(6805),c=n(9854),h=n(1092),u=n(5945),p=n(6417);var f=function(t){var[e,n]=(0,r.Z)();const[o]=(0,s.j1)("whatmorePrimaryFont"),[a]=(0,s.j1)("whatmorePrimaryColor"),[l]=(0,s.j1)("whatmoreSecondaryColor"),[d,h]=(0,i.useState)(0),f=(0,s.MO)("whatmoreShopId"),m=(0,s.MO)("whatmoreUITheme"),x=t.event,w=x.products.length;if(0==w)return(0,p.jsx)(p.Fragment,{});(0,i.useEffect)((()=>{const t=setInterval((()=>{h((t=>(t+1)%w))}),3e3);return()=>{clearInterval(t)}}),[]);const g=.3*n,y=g+"px",v=g+"px",j=.07*n+"px";return(0,p.jsx)("div",{style:{width:n+"px",height:"fit-content",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0.3)"},children:(0,p.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"space-between",alignItems:"center",paddingLeft:"5px",paddingRight:"5px",paddingTop:"5px",paddingBottom:"5px",gap:"5px"},className:"whatmore-event-tile-product-scale-in-and-out-animation",children:[(0,p.jsx)("div",{style:{width:y,height:v,boxShadow:"round"==m?"0px 0px 5px 2px #B0B0B0":null,borderRadius:"round"==m?"5px":"0px",borderWidth:(0,c.al)(f),borderColor:(0,c.qP)(f),overflow:"hidden",backgroundColor:"rgb(220, 220, 220, 1)"},children:(0,p.jsx)("img",{ref:t=>{t&&t.style.setProperty("object-fit",(0,c.yO)(f),"important")},src:x.products[d].thumbnail_image,style:{width:"100%",height:"100%",borderRadius:"round"==m?"5px":"0px"},alt:"product image"})}),(0,p.jsx)("div",{style:{width:n-5-g+"px",height:v,borderRadius:"round"==m?"5px":"0px",overflow:"visible"},children:(0,p.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"fit-content",height:"100%",justifyContent:"center",alignItems:"center"},children:(0,p.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","white","important"),t.style.setProperty("font-size",j,"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",o,"important"),t.style.setProperty("-webkit-line-clamp",3,"important"),t.style.setProperty("line-clamp",3,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"normal"},children:(0,u.s)(x.products[d].title)})})})]},d)})},m=n(3933);function x(t){var e,[n,a]=(0,r.Z)();const[d]=(0,s.j1)("whatmoreShopId"),[h,u,x]=(0,m.YD)({triggerOnce:!0});var w=(0,i.useContext)(l.V);const g=t.event,y=null!==(e=t.unfocusedDisplay)&&void 0!==e&&e,v=.5*a;return(0,p.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"200%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,p.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",alignItems:"center",height:"100%",width:"100%"},children:[(0,p.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,p.jsx)("p",{children:" "})}),w.showPlayButton&&!y?(0,p.jsx)("div",{style:{position:"relative",top:"10%",overflow:"hidden",marginLeft:"5px",marginRight:"5px",width:"100%"},children:(0,p.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",alignItems:"center"},children:(0,p.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,p.jsx)(o.Z,{sx:{color:"#F5F5F5 !important",opacity:.8,fontSize:v,filter:"drop-shadow(0 0 15px black);"}})})})}):(0,p.jsx)(p.Fragment,{}),(0,p.jsx)("div",{ref:h,children:u&&(0,c.PW)(d)?(0,p.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,p.jsx)(f,{event:g})}):(0,p.jsx)("div",{height:"20px"})})]})})}function w(t){var[e,n]=(0,r.Z)();const[i]=(0,s.j1)("whatmorePrimaryFont"),o=t.event;return o.title.trim().length?(0,p.jsx)("div",{style:{width:"100%",height:"fit-content",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))"},children:(0,p.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"flex-end",alignContent:"center",width:"100%",height:"100%"},children:(0,p.jsx)("div",{style:{width:"100%",padding:"2px"},children:(0,p.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",alignItems:"flex-start",marginLeft:"5px",marginRight:"5px",marginBottom:"2px"},children:[(0,p.jsx)("p",{style:{color:"white",fontSize:.08*n+"px",fontWeight:"normal",textAlign:"left"},children:" "}),(0,p.jsx)("p",{ref:t=>{t&&t.style.setProperty("font-family",i,"important")},style:{color:"white",fontSize:.08*n+"px",fontWeight:"normal",textAlign:"left"},children:o.title.substring(0,60)})]})})})}):(0,p.jsx)(p.Fragment,{})}function g(t){const[e,n,i,o,a]=(0,r.Z)(),[l]=(0,s.j1)("whatmoreShowViews"),c=t.event,u=t.isOnFocus;return(0,p.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,p.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:[(0,p.jsx)("div",{style:{width:"100%",backgroundImage:"linear-gradient(to top, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0.3))"},children:(0,p.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"flex-start",alignItems:"center"},children:"show"===l?(0,p.jsx)("div",{style:{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px"},children:(0,p.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",paddingLeft:"5px",width:"fit-content",height:"fit-content",justifyContent:"space-between",alignItems:"center"},children:(0,p.jsx)(h.Z,{event:c,fontSize:.07*n+"px"})})}):(0,p.jsx)(p.Fragment,{})})}),d.$w===a[d.YP]?(0,p.jsx)(p.Fragment,{}):u?(0,p.jsx)("div",{className:"whatmore-event-tile-component-fade-out-animation",children:(0,p.jsx)(w,{event:c})}):(0,p.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,p.jsx)(w,{event:c})})]})})}var y=function(t){var e,n,o;const[h,u,f,m,w]=(0,r.Z)();var y=(0,i.useContext)(l.V);const v=(0,s.MO)("whatmoreShopId"),j=(0,s.MO)("whatmoreUITheme"),b=t.event,P=t.onClick,C=null===(e=t.isOnFocus)||void 0===e||e,F=null!==(n=t.playOnUnfocus)&&void 0!==n&&n,I=null!==(o=t.animateOnFocus&&(0,c.iW)(v))&&void 0!==o&&o,z=(0,c.nz)(v);return(0,p.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top",y.tileTopMargin+"px","important"),t.style.setProperty("margin-bottom",y.tileBottomMMargin+"px","important"))},style:{margin:"0 auto",width:u,height:h,borderRadius:"round"==j?"5px":"0px",boxShadow:"round"==j?z:null,borderWidth:(0,c.al)(v),borderColor:(0,c.qP)(v),overflow:"hidden",cursor:"pointer"},className:I?C?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",onClick:()=>{P(b)},children:[(0,p.jsx)(a.Z,{height:"100%",width:"100%",url:b.thumbnail_image,isPlaying:C||F,event:b}),(0,p.jsxs)("div",{style:{width:u,height:h},children:[(0,p.jsx)(g,{event:b,isOnFocus:C}),C||d.$w===w[d.YP]?(0,p.jsx)(x,{event:b,unfocusedDisplay:!C}):null]})]})}},868:function(t,e,n){n.d(e,{V:function(){return a}});var i=n(9854),r=n(7753);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"},s={"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"},a=function(t){const e=(0,r.MO)("whatmoreShopId");if(t.startsWith("https://cdn.shopify.com"))return t;if("AWSCDN"==(0,i.zp)(e))return t;if("AZURECDN"==(0,i.zp)(e)){if(t.includes(".azureedge.net"))return t;if(t.includes(".cloudfront.net")){for(const e of Object.keys(o))if(t.includes(e))return t.replace(e,o[e]);return t}}if("BUNNYCDN"==(0,i.zp)(e)){if(t.includes(".b-cdn.net"))return t;if(t.includes(".cloudfront.net")){for(const e of Object.keys(s))if(t.includes(e))return t.replace(e,s[e]);return t}}return t}},6805:function(t,e,n){n.d(e,{$I:function(){return a},$w:function(){return d},AK:function(){return o},AL:function(){return s},YP:function(){return r},me:function(){return i},rE:function(){return l}});const i="device_type",r="device_mode",o="mobile",s="tablet",a="desktop",l="portrait",d="landscape"},6422:function(t,e,n){var i=n(7313),r=n(7753);e.Z=function(t){const[e,n]=(0,r.j1)("muted");return(0,i.useEffect)((()=>{}),[]),[e,n]}},8866:function(t,e,n){var i=n(7313);function r(){return[window.innerHeight,window.innerWidth]}e.Z=function(t){var[e,n]=r();const[o,s]=(0,i.useState)(["portrait",e,n]);return(0,i.useLayoutEffect)((()=>{function t(){var[t,e]=r();s(t>e?["portrait",t,e]:["landscape",t,e])}return window.addEventListener("resize",t),window.addEventListener("orientationchange",t),screen.orientation&&screen.orientation.addEventListener("change",t),t(),()=>{window.removeEventListener("resize",t),window.removeEventListener("orientationchange",t),screen.orientation&&screen.orientation.removeEventListener("change",t)}}),[]),o}},9821:function(t,e,n){var i=n(6367),r=n(7753),o=n(8866),s=n(6805);e.Z=function(t){const[e,n,a]=(0,o.Z)(),[l]=(0,r.j1)("whatmoreLandscapePadding"),[d]=(0,r.j1)("whatmoreVideoTileSize"),c=(0,i.useMediaQuery)({query:"(min-width: 1025px)"}),h=(0,i.useMediaQuery)({query:"(min-width: 481px)"}),u=!("portrait"!=e||!h),p=d/100*1.3*.5,f=d/100;var m=Math.min(a,n),[x,w,g,y]=[.6*m*(16/9),.6*m,1.4,0];function v(t){return Math.round(10*t)/10}var j={DEVICE_TYPE:s.AK,DEVICE_MODE:s.rE};if(c){const t=w*p,e=x*p;[x,w,g,y]=[e,t,(a-2*l)/(1.1*t),l],j[s.me]=s.$I,j[s.YP]=s.$w}else if(u){var b=.8*w,P=.8*x;"portrait"==e?(b*=f,P*=f,[x,w,g,y]=[P,b,v(a/(1.2*b)),0],j[s.me]=s.AL,j[s.YP]=s.rE):([x,w,g,y]=[P,b,(a-2*l)/(1.1*b),l],j[s.me]=s.AL,j[s.YP]=s.$w)}else{b=w,P=x;"portrait"==e?(b*=f,P*=f,[x,w,g,y]=[P,b,v(a/(1.15*b)),0],j[s.me]=s.AK,j[s.YP]=s.rE):(b=.7*w,P=.7*x,[x,w,g,y]=[P,b,(a-2*l)/(1.1*b),l],j[s.me]=s.AK,j[s.YP]=s.$w)}return[x,w,g,y,j]}},9723:function(t,e,n){var i=n(5318);e.Z=void 0;var r=i(n(5045)),o=n(6417),s=(0,r.default)((0,o.jsx)("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82z"}),"PlayArrowRounded");e.Z=s},237:function(t,e,n){var i=n(5318);e.Z=void 0;var r=i(n(5045)),o=n(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");e.Z=s},123:function(){},7244:function(){},6143:function(){}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[972],{3972:function(e,t,n){n.r(t),n.d(t,{default:function(){return k}});var o=n(7753),r=n(7313),i=n(2860),a=n(499),s=n(4897),c=n(5160),d=n(9854),u=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(725),n.e(648),n.e(367),n.e(240),n.e(853),n.e(926),n.e(282),n.e(95)]).then(n.bind(n,4095)))),T=r.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(367),n.e(240),n.e(576),n.e(664),n.e(517)]).then(n.bind(n,5523)))),_=r.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(367),n.e(926),n.e(642),n.e(136)]).then(n.bind(n,3827)))),S=r.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(367),n.e(926),n.e(642),n.e(92)]).then(n.bind(n,6071)))),w=r.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(367),n.e(926),n.e(642),n.e(245)]).then(n.bind(n,1291)))),j=r.lazy((()=>Promise.all([n.e(302),n.e(580)]).then(n.bind(n,3580)))),x=r.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(240),n.e(576),n.e(853),n.e(843),n.e(926),n.e(310),n.e(282),n.e(166)]).then(n.bind(n,1862)))),I=r.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(367),n.e(240),n.e(853),n.e(926),n.e(664),n.e(850)]).then(n.bind(n,4048)))),C=r.lazy((()=>Promise.all([n.e(302),n.e(725),n.e(648),n.e(367),n.e(240),n.e(576),n.e(664),n.e(602)]).then(n.bind(n,8091))));var E=function(e){const[t]=(0,o.j1)("isInDesignMode"),[n]=(0,o.j1)("isDemoBrand"),[E]=(0,o.j1)("whatmoreTopBottomPadding"),[P]=(0,o.j1)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:O}=(0,r.useContext)(m.I),[M]=(0,o.j1)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:k}=(0,r.useContext)(m.I),D=(0,o.MO)("isLandingSharedLink"),L=(0,o.MO)("whatmoreShareTemplateId"),N=(0,o.MO)("whatmoreShareStoryId"),A=(0,o.MO)("whatmoreShareEventId"),[Z,G]=(0,r.useState)(-1),[J,U]=(0,r.useState)(null);var z=e.events,H=null;function B(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=H[e].events[0];(0,c.wh)(t),(0,p.Tc)(M,i.Xh,i.OW),(0,u.H4)(t.event_id,t.products,"homepage","stories")})();var a=0;null!=r&&H[e].events.map(((e,t)=>{e.event_id==r&&(a=t)})),G(a),U(e)}function R(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)(M,i.Xh,i.pR),(0,u.H4)(e.event_id,e.products,"homepage","carousel")})(),void G(e.index);const r=20;var{status:d,bannerText:v,timeToStartInMins:m}=s.Z.getEventStatus(e);m<=r&&d.name!==a.Z.LIVE.name?console.debug(" TODO : show toast on upcoming live event."):G(e.index)}function V(e){return(0,y.jsx)(y.Fragment,{})}return O&&!H&&(H=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}(z)),(0,r.useEffect)((()=>{D&&k==(0,f.zv)(L)&&(null!=N&&O?H.forEach(((e,t)=>{N==e.id&&B(t,!0,A)})):null!=A&&z.forEach(((e,t)=>{A==e.event_id&&R(e,!0)})))}),[]),(0,y.jsxs)("div",{children:[(0,y.jsx)("div",{style:{marginTop:(O?P:E)+"px",marginBottom:(O?P:E)+"px"},children:"template-b"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(b,{events:z,onClick:R,heading:e.heading})}):"template-a-1"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(T,{events:z,onClick:R,heading:e.heading})}):"template-feed-a"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(C,{events:z,onClick:R,heading:e.heading})}):"template-collections-a"===k||"template-c"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(_,{events:z,onClick:R,heading:e.heading})}):"template-collections-b"===k||"template-d"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(S,{events:z,onClick:R,heading:e.heading})}):"template-collections-c"===k||"template-e"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(w,{events:z,onClick:R,heading:e.heading})}):"template-collections-d"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(b,{events:z,onClick:R,heading:e.heading})}):"template-collections-e"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I,{events:z,onClick:R,heading:e.heading})}):O?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(j,{eventsStories:H,onClick:B,template:k})}):(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I,{events:z,onClick:R,heading:e.heading})})}),-1==Z?(0,y.jsx)(V,{}):(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(x,{events:z,index:Z,onBack:function(e){(0,d.n2)(M)&&(0,o.MO)("whatmoreAddedToCart")&&(0,v.D)(M,(()=>{}),100,window.location.hostname),G(-1)},slideDirection:O||"horizontal"===(0,d.e8)(M)?"horizontal":"vertical",eventsStories:H,initialStoryIndex:J,template:k})})]})};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 O=n(3388);var M=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),[v]=(0,o.j1)("whatmoreShopId"),[g]=(0,o.j1)("whatmoreCollectionId"),f=(0,d.cZ)(v)?window.location.href.split(/[?#]/)[0]:g,[b,T]=(0,o.j1)("productRatings");var _=(0,d.ef)(v)?i.Dm+"/v1/events/":i.Gc+"/v1/events/",S=(0,d.ef)(v)?i.Dm+"/collection/":i.Gc+"/collection/",w=e.shopId;return(0,r.useEffect)((()=>{(0,u.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;e=p?S.toString()+"?store_id="+w.toString()+"&client_collection_id="+f:_.toString()+w.toString()+"?status="+"live,upcoming".toString()+"&is_active="+"true".toString()+(c?"&template_type=stories":""),fetch(e).then((e=>e.json())).then((e=>(0,O.kW)(e,p))).then((e=>c?e:(0,O.e8)(e,w))).then((e=>(null!=e&&0!=e.length&&(0,d.LU)(v)&&function(e,t,n){const r=setInterval((()=>{null===(0,o.MO)("productRatings")&&P(e,t,n)}),1e3);setTimeout((()=>{clearInterval(r)}),1e4)}(v,e,(e=>{T(e)})),e))).then((e=>{null==e||0==e.length||c||(0,d.NO)(w,e),n(e)})).catch((e=>{s(e.message)}))}),[]),null==t||0==t.length||a?(0,y.jsx)("div",{}):(function(e,t){if(null!=e){var n=0;e.forEach((e=>{e.index=n++}))}}(t),(0,y.jsx)("div",{children:(0,y.jsx)(E,{heading:e.heading,events:t})},"whatmore-main-coponent"))};var k=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"),[d]=(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)(M,{heading:s,shopId:i.aA})}):(0,y.jsx)("div",{children:(0,y.jsx)(M,{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){(new theme.CartDrawer).open()}else"62602182872"==e||"57362710572"==e?(CartJS.getCart(),$(".block-cart").addClass("active")):"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:{}}))):"36300750986"==e||"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)})):"57824805033"==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")}))}))})):"61094723750"==e?SLIDECART&&(SLIDECART_UPDATE(),SLIDECART_OPEN()):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,{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,t){if(null!=e)return t?e[0].events:e}},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 d},JX:function(){return c},Z6:function(){return i},rp:function(){return u},wh:function(){return r},wz:function(){return s},x0:function(){return a}});var o=n(2860);n(7753);function r(e){console.debug("updating user view count for event.");const t={event_id:e.event_id,increase_by:1};fetch(o.Gc+"/event/metrics/views",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(console.debug("updating user view count response : HTTP "+e.status),e.json()))).then((e=>{console.debug("updating user view count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating user view count user for event : ",e)}))}function i(e,t){console.debug("updating like count for event.");const n={event_id:e.event_id,increase_by:t};fetch(o.Gc+"/event/metrics/like",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(console.debug("updating like count response : HTTP "+e.status),e.json()))).then((e=>{console.debug("updating like count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating like count user for event : ",e)}))}function a(e){console.debug("updating share count for event.");const t={event_id:e.event_id,increase_by:1};fetch(o.Gc+"/event/metrics/share",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(console.debug("updating share count response : HTTP "+e.status),e.json()))).then((e=>{console.debug("updating share count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating share count user for event : ",e)}))}function s(e,t){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(o.Gc+"/event/metrics/clicks",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(console.debug("updating user event-product click count response : HTTP "+e.status),e.json()))).then((e=>{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 c(e,t,n){console.debug("updating event-product add to cart count for event {} and product {}.",e.event_id,t.product_id);const r={event_id:e.event_id,product_id:t.product_id,increase_by:n};fetch(o.Gc+"/event/metrics/add_to_cart",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(r)}).then((e=>(console.debug("updating user event-product add to cart count response : HTTP "+e.status),e.json()))).then((e=>{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 d(e,t){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(o.Gc+"/event/metrics/buy_now",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(console.debug("updating user event-product buy now count response : HTTP "+e.status),e.json()))).then((e=>{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 u(){let{storeId:e="",eventId:t=0,productId:n="",variantId:r="",cartToken:i="",checkoutToken:a="",quantity:s=0,price:c="",actionType:d="",trackingId:u=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l={event_id:t,product_id:n,cart_token:i,checkout_token:a,quantity:s,price:c,variant_id:r,action_type:d,tracking_id:u};console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} ",t,n,r);const h=await fetch(o.Gc+"/cart-metadata/"+e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(l)}).then((e=>(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,r)}));return h}},4669:function(e,t,n){n.d(t,{Tc:function(){return l},ll:function(){return u}});var o=n(1824),r=n(7786),i=n(9854);n(7753);const a="Whatmore Video Shopping",s="Video View",c={carousel:"Carousel",stories:"Stories",video_popup:"Video Popup"},d={homepage:"Home Page",product_page:"Product Page"};async function u(e){if((0,i.Dv)(e)&&null!==(0,i.hf)(e)&&(r.ZP.initialize((0,i.hf)(e)),console.debug("Whatmore: initialized GA4")),(0,i.hv)(e)&&null!==(0,i.BH)(e)){const t=(0,i.OQ)(e);o.ZP.initialize((0,i.BH)(e),{useExistingGa:t}),console.debug("Whatmore: initialized GA3")}}async function l(e,t,n){(0,i.hv)(e)&&null!==(0,i.BH)(e)&&(o.ZP.event({category:a,action:s,label:d[t]+":"+c[n]}),console.debug("Whatmore: pushed view event to GA3")),(0,i.Dv)(e)&&null!==(0,i.hf)(e)&&(r.ZP.event({category:a,action:s+":"+d[t]+":"+c[n],value:1,nonInteraction:!1}),console.debug("Whatmore: pushed view event to GA4"))}}}]);
|