whatmore-react-assets 1.0.1353 → 1.0.1355
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[892],{5090:function(e,t,i){i.r(t),i.d(t,{default:function(){return Z}});var n=i(7313),o=i(6090),r=i(7616),s=i(32),l=(i(6143),i(7850),i(4444),i(7244),i(123),i(5892),i(1811),i(9302)),a=i(2575),d=i(2210),c=i(8486),p=i(9821),h=i(8866),u=i(2279),m=i.n(u),x=i(7753),v=i(7129),f=i(1855),y=i(9854),g=i(364),w=i(4522),j=i(778),b=i(7381),P=(i(3439),i(4892)),S=i(8390),C=i(6775),I=i(8984),M=i(9212),O=i(6417);function k(e){const[t]=(0,x.j1)("whatmoreShopId"),[i,n,o]=(0,C.Z)({triggerOnce:!0}),r=e.event,s=(0,I.gE)()?e.isOnFocus:n;return(0,O.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"200%",overflow:"hidden",width:"100%",height:"100%",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,O.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",alignItems:"center",height:"100%",width:"100%"},children:[(0,O.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,O.jsx)("p",{children:" "})}),(0,O.jsx)("div",{ref:i,children:s&&(0,y.PWD)(t)?(0,O.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,O.jsx)(S.Z,{event:r})}):(0,O.jsx)("div",{height:"20px"})})]})})}var E=function(e){var t,i,o,r,s;const[l,a,d,c,h]=(0,p.Z)();var u=(0,n.useContext)(v.V);const m=(0,x.MO)("whatmoreUITheme"),f=(0,x.MO)("whatmoreShopId"),g=(0,x.MO)("whatmorePrimaryFont"),w=(0,x.MO)("whatmoreSecondaryColor"),j=e.event,b=e.onClick,S=null===(t=e.isOnFocus)||void 0===t||t,C=null!==(i=e.playOnUnfocus)&&void 0!==i&&i,I=null!==(o=e.animateOnFocus&&(0,y.iWI)(f))&&void 0!==o&&o,E=(0,y.nzC)(f);return(0,O.jsxs)("div",{ref:e=>{e&&(e.style.setProperty("margin-top",u.tileTopMargin+"px"),e.style.setProperty("margin-bottom",u.tileBottomMMargin+"px"))},style:{margin:"0 10px",width:"8968077397"==f||"19501891"==f?void 0:a,aspectRatio:"8968077397"==f||"19501891"==f?9/16:void 0,height:"8968077397"==f||"19501891"==f?"100%":l,borderRadius:"round"==m?"5px":"0px",boxShadow:"round"==m||"61187850326"==f||"19501891"==f?E:null,borderWidth:(0,y.alU)(f),borderColor:(0,y.qPe)(f),overflow:"hidden",cursor:"pointer",position:"relative"},className:I?S?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",onClick:()=>{var e,t;"12326200"==f&&"image"==j.event_type?window.location.href=null===(e=j.products)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.product_link:b(j)},children:[(0,O.jsx)(P.Z,{height:(0,y.dXm)(f)+" !important",width:"100%",url:j.thumbnail_image,isPlaying:S||C,event:j}),""!==(null===j||void 0===j?void 0:j.title)?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("div",{className:"wht-overlay-text",style:{position:"absolute",bottom:"4%",left:"50%",transform:"translateX(-50%)",color:"white",padding:"0.5rem 0rem 0rem 0.5rem",zIndex:1,width:"90%",maxWidth:"100%",wordWrap:"break-word",textShadow:"2px 2px 4px rgba(0, 0, 0, 0.5)",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,overflow:"hidden",textOverflow:"ellipsis"},children:(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"1px",alignItems:"center"},children:[(0,O.jsx)("p",{style:{fontFamily:g,fontSize:.1*a+"px",fontWeight:"600"},children:"12326200"==f?null===j||void 0===j||null===(r=j.title)||void 0===r?void 0:r.slice(7):null===j||void 0===j?void 0:j.title}),"12326200"==f&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("p",{style:{fontFamily:'"brandon-grotesque"',fontSize:.08*a+"px",fontWeight:"normal"},children:null===j||void 0===j||null===(s=j.title)||void 0===s?void 0:s.slice(0,7)}),(0,O.jsx)("button",{style:{fontFamily:"sans-serif",fontWeight:"600",borderRadius:"200px",marginTop:"4px",fontSize:.05*a+"px",backgroundColor:w,padding:"8px 28px"},children:"SHOP NOW"})]})]})}),(0,O.jsx)("div",{className:"wht-shopping-icon",style:{position:"absolute",top:"10px",right:"10px",zIndex:2},children:(0,O.jsx)(M.Z,{sx:{color:"white",fontSize:"1.3rem",filter:"drop-shadow(0 0 5px black)"}})})]}):(0,y.wxm)(f)&&(0,O.jsxs)("div",{style:{width:a,height:l},children:[(0,O.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",overflow:"hidden",width:"100%",height:"100%",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix"}),(0,O.jsx)(k,{event:j,unfocusedDisplay:!S,isOnFocus:S})]})]})};const F=(0,a.Z)({key:"whatmore-css-hv"});function W(e){const[t,i,o]=(0,p.Z)(),r=(0,x.MO)("whatmoreShopId"),s=e.events,l=e.onClick,a=o*(0,y.u6l)(r),c=(0,y.yBw)(r),[h,u]=(0,n.useState)(c?s.length:a),{whatmoreWidgetSourceDetails:m}=(0,n.useContext)(g.I);return(0,n.useEffect)((()=>{h<=a&&u((e=>e+a))}),[a]),(0,O.jsx)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,O.jsx)("div",{style:{width:window.innerWidth,height:"fit-content"},children:(0,O.jsx)(d.tq,{slidesPerView:2,initialSlide:0,centeredSlides:!1,centeredSlidesBounds:!1,watchSlidesProgress:!0,touchRatio:1,onSlideChange:e=>{(0,w.y4)({userInteractionType:j.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:m}),e.realIndex>e.previousIndex&&u((e=>e+a))},loop:c,children:s.map(((e,t)=>t<=h&&(0,O.jsx)(d.o5,{children:t=>{let{isActive:i,isPrev:n,isNext:o,isVisible:r}=t;return n||o||i?(0,O.jsx)(E,{isOnFocus:r,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{l(e)}}):(0,O.jsx)(f.Z,{})}},"whatmore-event-tile-portrait-"+e.index)))})})})}function V(e){const[t,i,o,r]=(0,p.Z)(),[s,l]=(0,n.useState)(-1),a=(0,x.MO)("whatmoreShopId"),h=e.onClick,u=e.events,v=(0,y.yBw)(a),[b,P]=(0,n.useState)(v?u.length:o),S=Math.min(o,u.length),{whatmoreWidgetSourceDetails:C}=(0,n.useContext)(g.I),I=(0,n.useRef)(null);return(0,n.useEffect)((()=>{if(I.current){const e=i*S*(0,y.Su5)(a)+"px";u.length<4?I.current.style.setProperty("width",e,"important"):I.current.style.width=e}}),[i,S,a,b,u.length]),(0,n.useEffect)((()=>{b<=o&&P((e=>e+o))}),[o]),(0,O.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",paddingLeft:r+"px",paddingRight:r+"px"},className:"whatmore-events-carousel-landscape",children:(0,O.jsx)("div",{ref:I,style:{height:"100%"},children:(0,O.jsx)(d.tq,{slidesPerView:S,watchSlidesProgress:!0,modules:[c.W_],navigation:!0,slidesPerGroup:parseInt(S),onSlideChange:e=>{(0,w.y4)({userInteractionType:j.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:C}),e.realIndex>e.previousIndex&&P((e=>e+o))},spaceBetween:0,loop:v&&u.length>4,style:{height:"100%"},children:u.map(((e,t)=>{const i=m()((()=>l(t)),300);return t<=b&&(0,O.jsx)(d.o5,{onMouseEnter:()=>{i()},onMouseLeave:()=>{i.cancel(),l(-1)},style:{height:"100%"},children:i=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l}=i;return l||o||r?(0,O.jsx)(E,{isOnFocus:t==s,playOnUnfocus:!(0,y.dHy)(a)||t==parseInt(S/2)&&-1==s,animateOnFocus:!0,event:e,onClick:()=>{h(e)}}):(0,O.jsx)(f.Z,{})}},"whatmore-event-tile-landscape-"+e.index)}))})})})}var Z=function(e){const[t,i,a]=(0,h.Z)(),[d]=(0,x.j1)("whatmoreShopId"),[c]=(0,x.j1)("whatmorePrimaryColor"),[p]=(0,x.j1)("whatmoreTitleFont"),u="portrait"==t?(0,x.MO)("whatmoreTitleFontSizePortrait"):(0,x.MO)("whatmoreTitleFontSize"),{whatmoreRootId:m}=(0,n.useContext)(g.I),f=(0,x.MO)("whatmoreCollectionHeading"),{whatmoreIsCollectionsTemplate:w}=(0,n.useContext)(g.I),j=e.events,P=e.onClick,S=p;function C(e){P(e)}return(0,n.useEffect)((()=>{(0,b.Oo)("Video shopping powered by Whatmore!")}),[]),(0,n.useEffect)((()=>{s.IR.forEach((e=>{var t;const i=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-g"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-g"]');if(!i)return;i&&e&&(e.style.minHeight="0px")}))}),[]),delete r.ZP.styles.global,(0,O.jsx)(l.C,{value:F,children:(0,O.jsx)("div",{className:"whatmore-carousel-events",style:{height:"100%"},children:(0,O.jsx)(o.x,{theme:r.ZP,cssVarsRoot:m,resetCSS:!1,children:(0,O.jsxs)(v.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[e.heading.trim().length>0||w?(0,O.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:(0,O.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-family",S),e.style.setProperty("font-size",u+"px","important"))},style:{color:c,backgroundClip:"text",textAlign:"center",fontWeight:(0,y.wOV)(d),lineHeight:(0,y.vY4)(d),letterSpacing:(0,y.X2K)(d)},children:w?"W"!==f?f:"":e.heading})}):(0,O.jsx)(O.Fragment,{}),"landscape"===t?(0,O.jsx)(V,{events:j,onClick:C}):(0,O.jsx)(W,{events:j,onClick:C})]})})})})}},7129:function(e,t,i){i.d(t,{V:function(){return n}});const n=(0,i(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},5945:function(e,t,i){i.d(t,{s:function(){return o}});var n=i(7753);function o(e,t){const i=(0,n.MO)("whatmoreShopId");return"undefined"==typeof e||"undefined"==e||null==e?"":"6873415750"==i||"72442478904"==i||"58562281529"==i?e:"66168324332"==i&&"prod-tile"!=t?null===e||void 0===e||null===(o=e.split("- "))||void 0===o?void 0:o[0]:e.replace(/\w\S*/g,(function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}));var o}},1855:function(e,t,i){var n=i(7313),o=i(9821),r=i(7129),s=i(7753),l=i(6417);t.Z=function(e){var[t,i]=(0,o.Z)();(0,n.useContext)(r.V);const a=(0,s.MO)("whatmoreShopId");return e.event,(0,l.jsx)("div",{style:{margin:"0 auto",width:"8968077397"==a?void 0:i,aspectRatio:"8968077397"==a?9/16:void 0,height:"8968077397"==a?"100%":t,overflow:"hidden"}})}},8390:function(e,t,i){var n=i(7313),o=i(7753),r=i(9821),s=i(5945),l=(i(3439),i(9854)),a=i(9363),d=i(6417);t.Z=function(e){var t,i,c,p,[h,u]=(0,r.Z)();const m=(0,o.MO)("whatmoreUITheme"),[x]=(0,o.j1)("whatmorePrimaryFont"),[v,f]=(0,n.useState)(0),y=(0,o.MO)("whatmoreShopId"),g=e.event;if(0==g.products.length)return(0,d.jsx)(d.Fragment,{});const w=.3*u,j=w+"px",b=w+"px",P=.07*u,S=P+"px";return(0,d.jsx)("div",{style:{width:u+"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,d.jsxs)("div",{ref:e=>{e&&e.style.setProperty("height","fit-content","important")},style:{display:"flex",flexFlow:"row nowrap",width:"100%",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,d.jsx)("div",{ref:e=>{e&&e.style.setProperty("height",b,"important")},style:{width:(0,l.uNj)(y)?j:"auto",boxShadow:"round"==m?"0px 0px 5px 2px #B0B0B0":null,borderRadius:"round"==m?"5px":"0px",borderWidth:(0,l.alU)(y),borderColor:(0,l.qPe)(y),overflow:"hidden",backgroundColor:"rgb(220, 220, 220, 1)"},children:(0,d.jsx)("img",{ref:e=>{e&&(e.style.setProperty("object-fit",(0,l.yOX)(y),"important"),e.style.setProperty("max-width",j,"important"))},src:(0,a.s)(g.products[v].thumbnail_image,"&width=".concat(400,"&height=",400)),style:{width:"100%",height:"100%",borderRadius:"round"==m?"5px":"0px"},alt:"product image"})}),(0,d.jsxs)("div",{style:{width:u-5-w+"px",height:"100%",borderRadius:"round"==m?"5px":"0px",overflow:"visible"},children:[(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"fit-content",justifyContent:"center",alignItems:"center",paddingBottom:"4px"},children:(0,d.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color","white","important"),e.style.setProperty("font-size",S,"important"),e.style.setProperty("line-height","120%","important"),e.style.setProperty("font-family",x,"important"),e.style.setProperty("-webkit-line-clamp",3,"important"),e.style.setProperty("line-clamp",3,"important"),e.style.setProperty("-webkit-box-orient","vertical","important"),e.style.setProperty("display","-webkit-box","important"),e.style.setProperty("overflow","hidden","important"),e.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"normal"},children:(0,s.s)(g.products[v].title)})}),(null===(t=g.products[v])||void 0===t||null===(i=t.product_metadata)||void 0===i?void 0:i.product_type)&&(0,d.jsx)("div",{style:{display:"flex",opacity:.8,width:"fit-content",maxWidth:u-5-w+"px",padding:"3px 6px",backgroundColor:"#D3D3D3",borderRadius:"round"==m?"3px":"0"},children:(0,d.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color","#000","important"),e.style.setProperty("maxWidth",u-5-w+"px","important"),e.style.setProperty("font-size",.7*P+"px","important"),e.style.setProperty("font-family",x,"important"),e.style.setProperty("font-weight","bold","important"),e.style.setProperty("text-overflow","ellipsis","important"),e.style.setProperty("overflow","hidden","important"),e.style.setProperty("-webkit-line-clamp",1,"important"),e.style.setProperty("line-clamp",1,"important"),e.style.setProperty("-webkit-box-orient","vertical","important"),e.style.setProperty("display","-webkit-box","important"))},children:null===(c=g.products[v])||void 0===c||null===(p=c.product_metadata)||void 0===p?void 0:p.product_type})})]})]},v)})}},9363:function(e,t,i){i.d(t,{$:function(){return s},s:function(){return r}});var n=i(9854),o=i(7753);function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const i=(0,o.MO)("whatmoreShopId");return"shopify"!=(0,n.Ipo)(i)?"STRNV8MHJTF"==i?e+"?format=webp":e:e+t}function s(e){var t;if(null!==e&&void 0!==e&&e.includes("https://w-media.b-cdn.net/process-media"))return"image";const i=null===e||void 0===e||null===(t=e.trim())||void 0===t?void 0:t.split("?")[0],n=/\.(jpeg|jpg|gif|png|svg|webp)$/i,o=/\.(mp4|mov|wmv|avi|flv|mkv)$/i;return null!==n&&void 0!==n&&n.test(i)?"image":null!==o&&void 0!==o&&o.test(i)?"video":void 0}},6805:function(e,t,i){i.d(t,{$I:function(){return l},$w:function(){return d},AK:function(){return r},AL:function(){return s},YP:function(){return o},me:function(){return n},rE:function(){return a}});const n="device_type",o="device_mode",r="mobile",s="tablet",l="desktop",a="portrait",d="landscape"},9821:function(e,t,i){var n=i(7753),o=i(8866),r=i(6805),s=i(9854);t.Z=function(e){const[t,i,l]=(0,o.Z)(),[a]=(0,n.j1)("whatmoreLandscapePadding"),[d]=(0,n.j1)("whatmoreShopId"),[c]=(0,n.j1)("whatmoreVideoTileSize"),[p]=(0,n.j1)("whatmoreVideoTileSizePortrait"),h=l>=1025,u="portrait"==t?p:c,m=!("portrait"!=t||!(l>=481)),x=u/100*1.3*.5,v=u/100;var f=Math.min(l,i),[y,g,w,j]=[.6*f*(16/9),.6*f,1.4,0];function b(e){return Math.round(10*e)/10}var P={DEVICE_TYPE:r.AK,DEVICE_MODE:r.rE};if(h){const e=g*x,t=y*x;[y,g,w,j]=[t,e,(l-2*a-2*(0,s.mZU)(d))/(1.1*e),a],P[r.me]=r.$I,P[r.YP]=r.$w}else if(m){var S=.8*g,C=.8*y;"portrait"==t?(S*=v,C*=v,[y,g,w,j]=[C,S,b(l/(1.2*S)),0],P[r.me]=r.AL,P[r.YP]=r.rE):([y,g,w,j]=[C,S,(l-2*a)/(1.1*S),a],P[r.me]=r.AL,P[r.YP]=r.$w)}else{S=g,C=y;"portrait"==t?(S=S*v*.9,C=C*v*.9,[y,g,w,j]=[C,S,b(l/(1.15*S)),0],P[r.me]=r.AK,P[r.YP]=r.rE):(S=.7*g,C=.7*y,[y,g,w,j]=[C,S,(l-2*a)/(1.1*S),a],P[r.me]=r.AK,P[r.YP]=r.$w)}return[y,g,w,j,P]}},9212:function(e,t,i){var n=i(5318);t.Z=void 0;var o=n(i(5045)),r=i(6417),s=(0,o.default)([(0,r.jsx)("path",{d:"M18 20H6V8h2v2c0 .55.45 1 1 1s1-.45 1-1V8h4v2c0 .55.45 1 1 1s1-.45 1-1V8h2v12z",opacity:".3"},"0"),(0,r.jsx)("path",{d:"M18 6h-2c0-2.21-1.79-4-4-4S8 3.79 8 6H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-6-2c1.1 0 2 .9 2 2h-4c0-1.1.9-2 2-2zm6 16H6V8h2v2c0 .55.45 1 1 1s1-.45 1-1V8h4v2c0 .55.45 1 1 1s1-.45 1-1V8h2v12z"},"1")],"ShoppingBagTwoTone");t.Z=s},3439:function(){},7244:function(){},5892:function(){},4444:function(){},1811:function(){},6143:function(){},7850:function(){}}]);
|