whatmore-react-assets 1.0.583 → 1.0.585
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/static/js/972.98448882.chunk.js +1 -0
- package/static/js/chunk-collections.d7184f2c.chunk.js +1 -0
- package/static/js/{580.39a23064.chunk.js → chunk-stories.f2a2822f.chunk.js} +1 -1
- package/whatmore.js +2 -2
- package/static/css/708.73ff061b.chunk.css +0 -1
- package/static/css/84.73ff061b.chunk.css +0 -1
- package/static/css/965.73ff061b.chunk.css +0 -1
- package/static/js/249.0915f51d.chunk.js +0 -1
- package/static/js/622.68f87ebc.chunk.js +0 -1
- package/static/js/708.fba09212.chunk.js +0 -1
- package/static/js/84.daab96f7.chunk.js +0 -1
- package/static/js/965.5a825fca.chunk.js +0 -1
- package/static/js/972.dbd8717a.chunk.js +0 -1
- /package/static/css/{622.73ff061b.chunk.css → chunk-collections.73ff061b.chunk.css} +0 -0
- /package/static/css/{580.f913585c.chunk.css → chunk-stories.f913585c.chunk.css} +0 -0
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
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 U}});var a=n(7753),r=n(7313),i=n(2860),o=n(499),s=n(4897),l=n(5160),c=n(9854),u=n(6967),d=n(8984),h=n(58),p=n(4669),m=n(941),v=n(9039),g=n(7300),S=n(6524),I=n(7643),f=n(778),y=n(6417);const w=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(210),n.e(926),n.e(950),n.e(303),n.e(891)]).then(n.bind(n,4095)))),x=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(576),n.e(950),n.e(364),n.e(530)]).then(n.bind(n,5523)))),E=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(423),n.e(926),n.e(950),n.e(755)]).then(n.bind(n,3827)))),T=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(423),n.e(926),n.e(950),n.e(755)]).then(n.bind(n,6071)))),_=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(423),n.e(926),n.e(950),n.e(755)]).then(n.bind(n,1291)))),j=r.lazy((()=>Promise.all([n.e(302),n.e(789)]).then(n.bind(n,3580)))),M=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(576),n.e(210),n.e(955),n.e(926),n.e(303),n.e(209),n.e(790)]).then(n.bind(n,4209)))),O=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(210),n.e(926),n.e(950),n.e(959)]).then(n.bind(n,4048)))),L=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(303),n.e(554)]).then(n.bind(n,9085)))),C=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(576),n.e(950),n.e(303),n.e(364),n.e(67)]).then(n.bind(n,4362)))),b=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(576),n.e(210),n.e(955),n.e(926),n.e(303),n.e(209),n.e(196)]).then(n.bind(n,4658)))),D=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(367),n.e(423),n.e(926),n.e(950),n.e(755)]).then(n.bind(n,8767))));var P=function(e){const[t]=(0,a.j1)("isInDesignMode"),[n]=(0,a.j1)("isDemoBrand"),[P]=(0,a.j1)("whatmoreTopBottomPadding"),[G]=(0,a.j1)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:W}=(0,r.useContext)(v.I),[V]=(0,a.j1)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:k}=(0,r.useContext)(v.I),q=(0,a.MO)("isLandingSharedLink"),z=(0,a.MO)("whatmoreShareTemplateId"),R=(0,a.MO)("whatmoreShareStoryId"),U=(0,a.MO)("whatmoreShareEventId"),[A,F]=(0,r.useState)(-1),[N,Z]=(0,r.useState)(null);let K=e.events,B=[];if("template-banner-a"!==k){let e=0;for(let t=0;t<(null===K||void 0===K?void 0:K.length);t++){var H,Y,J,X;const n=(null===K||void 0===K||null===(H=K[t])||void 0===H||null===(Y=H.products)||void 0===Y?void 0:Y.length)>0&&(null===K||void 0===K||null===(J=K[t])||void 0===J||null===(X=J.products)||void 0===X?void 0:X.every((e=>"oos"===(null===e||void 0===e?void 0:e.product_status))));if(!(0,g.B6)(K[t])&&!(0,g.WJ)(K[t])||n){if((0,g.yC)(null===K||void 0===K?void 0:K[t])){var{status:Q,bannerText:$,timeToStartInMins:ee}=s.Z.getEventStatus(K[t]);Q.name===o.Z.LIVE.name&&(B.push({...null===K||void 0===K?void 0:K[t],index:e}),e++)}}else B.push({...null===K||void 0===K?void 0:K[t],index:e}),e++}}var te=null;function ne(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,d.KE)()&&!a&&(0,h.QV)(),t||n||(async()=>{const t=te[e].events[0];(0,l.wh)(t),(0,p.Tc)(V,i.Xh,i.OW),(0,u.H4)(t.event_id,t.products,"homepage","stories")})();var o=0;null!=r&&te[e].events.map(((e,t)=>{e.event_id==r&&(o=t)})),F(o),Z(e)}function ae(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,d.KE)()&&!a&&(0,h.QV)(),(0,g.B6)(e)||(0,g.WJ)(e))return t||n||(async()=>{(0,l.wh)(e),(0,p.Tc)(V,i.Xh,i.pR),(0,u.H4)(e.event_id,e.products,"homepage","carousel")})(),void F(e.index);const r=20;var{status:c,bannerText:m,timeToStartInMins:v}=s.Z.getEventStatus(e);v<=r&&c.name!==o.Z.LIVE.name?console.debug(" TODO : show toast on upcoming live event."):F(e.index)}function re(e){return(0,y.jsx)(y.Fragment,{})}return W&&!te&&(te=function(e){var t=e.reduce(((e,t,n)=>{var a=t.storyset_id;return a in e?(e[a].total_events=e[a].total_events+1,e[a].events.push(t)):e[a]={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}(B)),(0,r.useEffect)((()=>{q&&k==(0,S.zv)(z)&&(null!=R&&W?te.forEach(((e,t)=>{R==e.id&&ne(t,!0,U)})):null!=U&&K.forEach(((e,t)=>{U==e.event_id&&ae(e,!0)})))}),[]),(0,y.jsxs)("div",{children:[(0,y.jsx)("div",{style:{marginTop:(W?G:P)+"px",marginBottom:(W?G:P)+"px"},children:"template-b"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(w,{events:B,onClick:ae,heading:e.heading})}):"template-a-1"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(x,{events:B,onClick:ae,heading:e.heading})}):"template-feed-a"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(C,{events:B,onClick:ae,heading:e.heading})}):"template-collections-a"===k||"template-c"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(E,{events:B,index:A,setScreen:F,onClick:ae,heading:e.heading})})}):"template-collections-b"===k||"template-d"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(T,{events:B,index:A,setScreen:F,onClick:ae,heading:e.heading})})}):"template-collections-c"===k||"template-e"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(_,{events:B,index:A,setScreen:F,onClick:ae,heading:e.heading})})}):"template-collections-d"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(w,{events:B,index:A,setScreen:F,onClick:ae,heading:e.heading})})}):"template-collections-e"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(O,{events:B,index:A,setScreen:F,onClick:ae,heading:e.heading})})}):"template-collections-stories"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(D,{events:B,index:A,setScreen:F,onClick:ae,heading:e.heading})})}):"template-f"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(L,{events:B,onClick:ae,heading:e.heading})})}):"template-banner-a"===k?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.BANNER_WIDGET_VIEW,event:K[0],triggerFlag:!t&&!n,children:(0,y.jsx)(b,{events:K})})}):W?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.STORIES_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(j,{eventsStories:te,onClick:ne,template:k})})}):(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,y.jsx)(O,{events:B,onClick:ae,heading:e.heading})})})}),-1==A||-2==A?(0,y.jsx)(re,{}):(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I.u,{userInteractionType:f.K.EVENT_VIEW,event:K[A],productList:K[A].products,cta:K[A].cta,triggerFlag:!t&&!n,children:(0,y.jsx)(M,{events:B,index:A,onBack:function(e){(0,c.n2L)(V)&&(0,a.MO)("whatmoreAddedToCart")&&(0,m.D)(V,(()=>{}),100,window.location.hostname),F(-1)},slideDirection:W||"horizontal"===(0,c.e8z)(V)?"horizontal":"vertical",eventsStories:te,initialStoryIndex:N,template:k})})})]})};const G=function(e,t,n){const r=(0,a.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)),{}),o=Object.keys(i);if("60960964855"==r&&"undefined"!=typeof fera&&"function"===typeof fera.getRatings){var s={};fera.getRatings(o,(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]="+o.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 W=n(3388),V=n(7381),k=n(7376),q=n(7008);var z=function(e){const[t,n]=(0,r.useState)(),[o,s]=(0,r.useState)(),{whatmoreIsStoriesTemplate:l}=(0,r.useContext)(v.I),{whatmoreIsCollectionsTemplate:p}=(0,r.useContext)(v.I),{whatmoreIsBannerTemplate:m}=(0,r.useContext)(v.I),[g]=(0,a.j1)("whatmoreShopId"),[I]=(0,a.j1)("whatmoreCollectionId"),w=(0,a.MO)("whatmoreLandingLocationType"),x=(0,a.MO)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:E}=(0,r.useContext)(v.I),{whatmoreCollectionUrl:T}=(0,r.useContext)(v.I),_=(0,c.cZT)(g)?(0,c._uv)(g)?T:window.location.href.split(/[?#]/)[0]:I,[j,M]=(0,a.j1)("productRatings"),[O,L]=(0,r.useState)(!1);var C=(0,c.efR)(g)?i.Dm+"/v2/events/":i.Gc+"/v2/events/",b=(0,c.efR)(g)?i.Dm+"/get_eventset/":i.Gc+"/get_eventset/",D=(0,c.efR)(g)?i.Dm+"/v2/collection":i.Gc+"/v2/collection",z=(0,c.efR)(g)?i.Dm+"/v2/brand/"+g+"/product-events":i.Gc+"/v2/brand/"+g+"/product-events",R=e.shopId,U="live,upcoming";return(0,r.useEffect)((()=>{(0,u.hb)();const e=()=>{const e="_whatmore_bulk_events",t=JSON.parse(localStorage.getItem(e))||[];t&&t.length>0&&((0,q.K)(t),localStorage.removeItem(e))};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[]),(0,r.useEffect)((()=>{null==t||0==t.length||o||!(0,d.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||(0,h.b5)(h.UD)}),[t]),(0,r.useEffect)((()=>{var e;if(w.startsWith("product")){var t=(0,a.MO)("whatmoreProductId");t=(0,c.iXA)(g)?function(e){return e.split(/[?#]/)[0]}(window.location.href):t,e=z.toString()+"?client_product_id="+t.toString()+"&status="+U.toString()+"&event_type=video"}else if(p||"invalid-url"!==T)e=D.toString()+"?store_id="+R.toString()+"&client_collection_id="+_;else if(m){const t=S.ls,n=(0,S.H1)(w);e=b.toString()+R.toString()+"?eventset_type="+t+"&source="+n+"&source_id="+g}else e=C.toString()+R.toString()+"?status="+U.toString()+"&is_active="+"true".toString()+(l?"&template_type=stories":"");fetch(e).then((e=>e.json())).then((e=>{if(m){const t=S.ls;return(0,W.OC)(e,t)}return(0,W.kW)(e,p||"invalid-url"!==T)})).then((e=>(x&&console.debug("initial received events size : "+e.length),l||m?e:(0,W.e8)(e,R)))).then((e=>(null!=e&&0!=e.length&&(0,c.LUY)(g)&&function(e,t,n){const r=setInterval((()=>{null===(0,a.MO)("productRatings")&&G(e,t,n)}),1e3);setTimeout((()=>{clearInterval(r)}),1e4)}(g,e,(e=>{M(e)})),e))).then((e=>{null==e||0==e.length||l||m||(0,c.NOv)(R,e),n(e),L(!0)})).catch((e=>{s(e.message)}))}),[]),(0,r.useEffect)((()=>{"index"===w?t&&t.length>0&&(0,k.PB)({userInteractionType:f.K.HOMEPAGE_VISITED,widgetSourceDetails:E}):"collection"===w&&(t&&t.length>0||(0,c.miB)(g))&&(0,k.PB)({userInteractionType:f.K.COLLECTION_PAGE_VISITED,widgetSourceDetails:E})}),[t]),(O&&(null==t||0==t.length)||o)&&v.$.forEach((e=>{var t,n,a,r;const i=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"]'),o=null!==(n=e.querySelector('.whatmore-template-type[data-wh="template-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-e"]'))&&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-e"]'),s=null!==(a=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"]'))&&void 0!==a?a: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"]'),l=null!==(r=e.querySelector('.whatmore-template-type[data-wh="template-banner-a"]'))&&void 0!==r?r:e.querySelector('.whatmore-template-type[data="template-banner-a"]'),c=e;(l||s||o||i)&&(o&&c||i&&c||l&&c||s&&c)&&(c.style.minHeight="0px")})),null==t||0==t.length||o?(0,y.jsx)("div",{}):(x&&(0,V.EI)(t),function(e){if(null!=e){var t=0;e.forEach((e=>{e.index=t++}))}}(t),x&&console.debug("final transformed events data : "+JSON.stringify(t)),x&&console.debug("valid events size : "+t.length),(0,y.jsx)("div",{children:(0,y.jsx)(P,{heading:e.heading,events:t})},"whatmore-main-coponent"))},R=n(3933);var U=function(e){const[t]=(0,a.j1)("isInDesignMode"),[n]=(0,a.j1)("isDemoBrand"),[o]=(0,a.j1)("whatmoreShopId"),[s]=(0,a.j1)("whatmoreHeading"),[l,u]=(0,r.useState)(["initial",window.pageYOffset]),[d,h]=(0,r.useState)(!1),m=(0,a.MO)("isLandingSharedLink");(0,r.useEffect)((()=>{if((0,p.ll)(o),!(0,c.wc0)(o))return;let e=window.pageYOffset,t=!1;const n=()=>{const n=window.pageYOffset;var a,r;Math.abs(n-e)<100?t=!1:(r=!0,u(a=[n>e?"scrolled-down":"scrolled-up",n]),a[1]>100&&h(r),e=n>0?n:0,t=!1)},a=()=>{t||(window.requestAnimationFrame(n),t=!0)};return window.addEventListener("scroll",a),()=>window.removeEventListener("scroll",a)}),[]);const[v,g,S]=(0,R.YD)({triggerOnce:!0});return(0,y.jsx)("div",{id:"whatmore-visiblity",ref:v,style:{width:"58669793418"==o||"86297674048"==o?"5px":"",height:"58669793418"==o||"86297674048"==o?"5px":""},children:d||g||m||!(0,c.wc0)(o)?(0,y.jsx)("div",{children:t||n?(0,y.jsx)("div",{children:(0,y.jsx)(z,{heading:s,shopId:i.aA})}):(0,y.jsx)("div",{children:(0,y.jsx)(z,{heading:s,shopId:o})})}):(0,y.jsx)(y.Fragment,{})})}},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 a=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,o=e.time_zone;if(i.toUpperCase()==a.Z.LIVE.name)return{status:a.Z.LIVE,bannerText:" "+a.Z.LIVE.name+" ",timeToStartInMins:0};if(i.toUpperCase()==a.Z.UPCOMING.name){var s=new Date(r+" "+t+" "+o),l=(new Date(r+" "+n+" "+o),function(e){var t=new Date,n=(e.getTime()-t.getTime())/1e3,r=n/60,i=r/60,o=i/24;return n<=0?{status:a.Z.COMPLETED,bannerText:" "+a.Z.COMPLETED.name+" ",timeToStartInMins:0}:n>=1&&n<=30?{status:a.Z.UPCOMING,bannerText:"Starts in "+Math.round(n)+" sec ",timeToStartInMins:n/60}:r<60?{status:a.Z.UPCOMING,bannerText:"Starts in "+Math.round(r)+" min ",timeToStartInMins:r}:i<24?{status:a.Z.UPCOMING,bannerText:"Starts in "+Math.round(i)+" hr ",timeToStartInMins:60*i}:o<7?{status:a.Z.UPCOMING,bannerText:" "+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()]+" ",timeToStartInMins:60*o*24}:{status:a.Z.UPCOMING,bannerText:"Upcoming",timeToStartInMins:2880}}(s));return{status:l.status,bannerText:l.bannerText,timeToStartInMins:l.timeToStartInMins}}return console.error("invalid status for event :: id : "+e.event_id+", status : "+e.status),{status:a.Z.DEFAULT,bannerText:"live event",timeToStartInMins:2880}}}},3388:function(e,t,n){n.d(t,{OC:function(){return s},e8:function(){return i},kT:function(){return a},kW:function(){return o},xg:function(){return r}});const a=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==a(e)))},o=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null!=e)return t?e.events[0].events:e.events};const s=function(e,t){var n;if(null==e)return[];if(!("eventsets"in e))return[];const a=null!==(n=e.eventsets[t])&&void 0!==n?n:null;return a?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(a):[]}},7376:function(e,t,n){n.d(t,{GF:function(){return r},PB:function(){return s},Z2:function(){return i},y4:function(){return o}});var a=n(733);function r(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s}=e;(0,a.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s})}function i(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s}=e;(0,a.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s})}function o(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s}=e;(0,a.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s})}function s(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s}=e;(0,a.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:i,productList:o,ctaList:s})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[755],{3827:function(e,t,i){i.r(t);var o=i(7313),n=i(6090),r=i(7616),l=(i(6143),i(7850),i(4444),i(7244),i(123),i(5892),i(1811),i(9302)),a=i(2575),s=i(8866),d=i(7753),p=i(7129),c=i(9039),h=i(8631),x=i(6066),m=i(8782),u=i(9821),f=i(7381),g=i(5380),v=i(3933),w=i(9854),y=i(6417);const j=(0,a.Z)({key:"whatmore-css-cv"});t.default=function(e){const t=e.events,[i,a,b]=(0,s.Z)(),[C,S,M,k,P]=(0,u.Z)(),[R,E]=(0,o.useState)(Array(t.length).fill(0).map((()=>Math.random()))),Z=(0,d.MO)("whatmoreCollectionsTileSize"),L="portrait"==i?0:(0,d.MO)("whatmoreLandscapePadding"),O=(0,d.MO)("whatmoreCollectionsTilesSpacing"),{whatmoreIsCollectionsTemplate:z}=(0,o.useContext)(c.I),I=(0,d.MO)("whatmoreShopId"),{whatmoreRootId:A}=(0,o.useContext)(c.I),T=e.onClick;function B(e){T(e)}(0,o.useEffect)((()=>{(0,f.Oo)("Video shopping powered by Whatmore!")}),[]),delete r.ZP.styles.global;var F=[];for(let o=0,n=!1;o<t.length;)n&&o!=t.length-1&&R[o]>.2?(F.push((0,y.jsx)(x.Z,{event1:t[o],event2:t[o+1],onClick:()=>{B(t[o-1])}},"collections-tile-"+o)),o+=2,n=!n):(F.push((0,y.jsx)(h.Z,{event:t[o],onClick:()=>{B(t[o-1])},borderRadius:"10%",removeBorders:!1},"collections-tile-"+o)),o+=1,n=!n);(0,o.useEffect)((()=>{c.$.forEach((e=>{var t;if(!(null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-collections-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-collections-a"]')))return;e&&(e.style.minHeight="0px")}))}),[]);const[V,D,H]=(0,v.YD)({triggerOnce:!1});return(0,y.jsx)(l.C,{value:j,children:(0,y.jsx)("div",{children:(0,y.jsx)(n.x,{theme:r.ZP,cssVarsRoot:A,resetCSS:!1,children:(0,y.jsxs)(p.V.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:[(0,y.jsx)("div",{ref:V,style:{marginLeft:L+"px",marginRight:L+"px"},children:(0,y.jsx)(m.P,{renderElement:e=>(0,y.jsx)(y.Fragment,{children:e.eventData}),dataList:F,spacing:O,defaultHeight:C*Z*.01+"px",defaultWidth:S*Z*.01+"px",retainAlreadyRenderedElements:!0})}),(0,w.dhc)(I)&&z&&!D&&-1==e.index&&(0,y.jsx)(g.Z,{event:t[0],inVideoClick:B,closeClick:t=>{t.stopPropagation(),e.setScreen(-2)}})]})})})})}},6071:function(e,t,i){i.r(t);var o=i(7313),n=i(6090),r=i(7616),l=(i(6143),i(7850),i(4444),i(7244),i(123),i(5892),i(1811),i(9302)),a=i(2575),s=(i(8984),i(8866)),d=i(7753),p=i(7129),c=i(9039),h=i(8631),x=i(6066),m=i(8782),u=i(9821),f=i(7381),g=i(9854),v=i(5380),w=i(3933),y=i(6417);const j=(0,a.Z)({key:"whatmore-css-cv"});t.default=function(e){const t=e.events,[i,a,b]=(0,s.Z)(),[C,S]=(0,o.useState)(Array(t.length).fill(0).map((()=>Math.random()))),[M,k,P,R,E]=(0,u.Z)(),Z=(0,d.MO)("whatmoreCollectionsTileSize"),L="portrait"==i?0:(0,d.MO)("whatmoreLandscapePadding"),O=(0,d.MO)("whatmoreCollectionsTilesSpacing"),{whatmoreIsCollectionsTemplate:z}=(0,o.useContext)(c.I),I=(0,d.MO)("whatmoreShopId"),{whatmoreRootId:A}=(0,o.useContext)(c.I),T=e.onClick,[B,F,V]=(0,w.YD)({triggerOnce:!1});function D(e){T(e)}delete r.ZP.styles.global;var H=[];for(let o=0,n=!1;o<t.length;)n&&o!=t.length-1&&C[o]>.2?(H.push((0,y.jsx)(x.Z,{event1:t[o],event2:t[o+1],onClick:()=>{D(t[o-1])},removeBorders:!0},"collections-tile-"+o)),o+=2,n=!n):(H.push((0,y.jsx)(h.Z,{event:t[o],onClick:()=>{D(t[o-1])},removeBorders:!0,borderRadius:"0%"},"collections-tile-"+o)),o+=1,n=!n);return(0,o.useEffect)((()=>{(0,f.Oo)("Video shopping powered by Whatmore!")}),[]),(0,o.useEffect)((()=>{c.$.forEach((e=>{var t;if(!(null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-collections-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-d"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-collections-b"]')||e.querySelector('.whatmore-template-type[data="template-d"]')))return;e&&(e.style.minHeight="0px")}))}),[]),(0,y.jsx)(l.C,{value:j,children:(0,y.jsx)("div",{children:(0,y.jsx)(n.x,{theme:r.ZP,cssVarsRoot:A,resetCSS:!1,children:(0,y.jsxs)(p.V.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:[(0,y.jsx)("div",{ref:B,style:{marginLeft:L+"px",marginRight:L+"px"},children:(0,y.jsx)(m.P,{renderElement:e=>(0,y.jsx)(y.Fragment,{children:e.eventData}),dataList:H,spacing:O,defaultHeight:M*Z*.01+"px",defaultWidth:k*Z*.01+"px",retainAlreadyRenderedElements:!0})}),(0,g.dhc)(I)&&z&&!F&&-1==e.index&&(0,y.jsx)(v.Z,{event:t[0],inVideoClick:D,closeClick:t=>{t.stopPropagation(),e.setScreen(-2)}})]})})})})}},1291:function(e,t,i){i.r(t);var o=i(7313),n=i(6090),r=i(7616),l=i(9039),a=(i(6143),i(7850),i(4444),i(7244),i(123),i(5892),i(1811),i(9302)),s=i(2575),d=i(8866),p=i(7753),c=i(7129),h=i(8631),x=i(9821),m=i(8782),u=i(7381),f=i(9854),g=i(5380),v=i(3933),w=i(6417);const y=(0,s.Z)({key:"whatmore-css-cv"});t.default=function(e){var t;const[i,s,j]=(0,d.Z)(),[b,C,S,M,k]=(0,x.Z)(),P=(0,p.MO)("whatmoreCollectionsTileSize"),R="portrait"==i?0:(0,p.MO)("whatmoreLandscapePadding"),E=(0,p.MO)("whatmoreCollectionsTilesSpacing"),Z=(0,p.MO)("whatmoreShopId"),[L]=(0,p.MO)("whatmorePrimaryColor"),{whatmoreRootId:O}=(0,o.useContext)(l.I),{whatmoreIsCollectionsTemplate:z}=(0,o.useContext)(l.I),I=e.events,A=e.onClick,T=(0,p.MO)("whatmoreTitleFont"),B="portrait"==i?(0,p.MO)("whatmoreTitleFontSizePortrait"):(0,p.MO)("whatmoreTitleFontSize"),F=null!==(t=(0,f.aRS)(Z))&&void 0!==t?t:T;function V(e){A(e)}delete r.ZP.styles.global;var D=[];for(let o=0;o<I.length;)D.push((0,w.jsx)(h.Z,{event:I[o],onClick:()=>{V(I[o-1])},removeBorders:!0,borderRadius:"5%"},"collections-tile-"+o)),o+=1;(0,o.useEffect)((()=>{(0,u.Oo)("Video shopping powered by Whatmore!")}),[]),(0,o.useEffect)((()=>{l.$.forEach((e=>{var t;const i=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-collections-c"]')||e.querySelector('.whatmore-template-type[data-wh="template-e"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-collections-c"]')||e.querySelector('.whatmore-template-type[data="template-e"]');if(!i)return;i&&e&&(e.style.minHeight="0px")}))}),[]);const[H,W,q]=(0,v.YD)({triggerOnce:!1});return(0,w.jsx)(a.C,{value:y,children:(0,w.jsx)("div",{children:(0,w.jsx)(n.x,{theme:r.ZP,cssVarsRoot:O,resetCSS:!1,children:(0,w.jsxs)(c.V.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:[e.heading.trim().length>0?(0,w.jsx)("div",{className:"whatmore-events-carousel",style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,w.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-family",F,"important"),e.style.setProperty("font-size",B+"px","important"))},style:{color:L,backgroundClip:"text",textAlign:"center",fontWeight:(0,f.wOV)(Z),lineHeight:(0,f.vY4)(Z),letterSpacing:(0,f.X2K)(Z)},children:e.heading})}):(0,w.jsx)(w.Fragment,{}),(0,w.jsx)("div",{ref:H,style:{marginLeft:R+"px",marginRight:R+"px"},children:(0,w.jsx)(m.P,{renderElement:e=>(0,w.jsx)(w.Fragment,{children:e.eventData}),dataList:D,spacing:E,defaultHeight:b*P*.01+"px",defaultWidth:C*P*.01+"px",retainAlreadyRenderedElements:!0})}),(0,f.dhc)(Z)&&z&&!W&&-1==e.index&&(0,w.jsx)(g.Z,{event:I[0],inVideoClick:V,closeClick:t=>{t.stopPropagation(),e.setScreen(-2)}})]})})})})}},8767:function(e,t,i){i.r(t),i.d(t,{default:function(){return b}});var o=i(7313),n=i(6090),r=i(7616),l=i(9039),a=(i(6143),i(7850),i(4444),i(7244),i(123),i(5892),i(1811),i(9302)),s=i(2575),d=i(8866),p=i(7753),c=i(7129),h=i(9854),x=(i(9111),i(9778),i(4892)),m=i(9821),u=i(6417);var f=function(e){const[t,i,n,r,l]=(0,m.Z)(),a=(0,p.MO)("whatmoreSecondaryColor"),s=(0,p.MO)("whatmoreShopId"),d=(0,p.MO)("whatmoreCollectionsTileSize"),[c,f]=(0,o.useState)(!1),g=(0,h.f63)(s),v=e.event,w=e.onClick,y=e.removeBorders,j=i*d*.01,b=(0,h.eHp)(s);return(0,u.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,marginRight:y?"2px":(0,h.VwM)(s)+"px",marginTop:y?"2px":"5px",marginBottom:y?"2px":"5px",cursor:"pointer"},onClick:()=>{f(!0),w(v)},className:[c?"whatmore-scale-on-tap":""].join(" "),children:(0,u.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,borderRadius:"50%",overflow:"hidden",boxShadow:y?"":"0px 1px 1px 0px "+a+"50, 0px -1px 1px 0px "+g+"50, 1px 0px 1px 0px "+a+"50, -1px 0px 1px 0px "+g+"80, 1px -1px 1px 0px "+a+"80, -1px 1px 1px 0px "+g+"DA, 1px 1px 1px 0px "+a+"DA, -1px -1px 1px 0px "+g+"DA"},children:(0,u.jsx)(u.Fragment,{children:(0,u.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:j*b+"px",width:j*b+"px",borderRadius:"50%",backgroundColor:a,overflow:"hidden"},children:(0,u.jsx)(x.Z,{height:"100%",width:"100%",url:v.thumbnail_image,isPlaying:!0,event:v})})})})})},g=i(8782),v=i(7381),w=i(5380),y=i(3933);const j=(0,s.Z)({key:"whatmore-css-cv"});var b=function(e){var t;const[i,s,x]=(0,d.Z)(),[b,C,S,M,k]=(0,m.Z)(),P=(0,p.MO)("whatmoreCollectionsTileSize"),R="portrait"==i?0:(0,p.MO)("whatmoreLandscapePadding"),E=(0,p.MO)("whatmoreCollectionsTilesSpacing"),Z=(0,p.MO)("whatmoreShopId"),[L]=(0,p.MO)("whatmorePrimaryColor"),{whatmoreRootId:O}=(0,o.useContext)(l.I),z=e.events,I=e.onClick,A=(0,p.MO)("whatmoreTitleFont"),T="portrait"==i?(0,p.MO)("whatmoreTitleFontSizePortrait"):(0,p.MO)("whatmoreTitleFontSize"),B=null!==(t=(0,h.aRS)(Z))&&void 0!==t?t:A;function F(e){I(e)}const[V,D,H]=(0,y.YD)({triggerOnce:!1});delete r.ZP.styles.global;var W=[];for(let o=0;o<z.length;)W.push((0,u.jsx)(f,{event:z[o],onClick:()=>{F(z[o-1])},removeBorders:(0,h.Xtg)(Z)},"collections-tile-"+o)),o+=1;return(0,o.useEffect)((()=>{(0,v.Oo)("Video shopping powered by Whatmore!")}),[]),(0,o.useEffect)((()=>{l.$.forEach((e=>{var t;const i=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-collections-stories"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-collections-stories"]');if(!i)return;i&&e&&(e.style.minHeight="0px")}))}),[]),(0,u.jsx)(a.C,{value:j,children:(0,u.jsx)("div",{children:(0,u.jsx)(n.x,{theme:r.ZP,cssVarsRoot:O,resetCSS:!1,children:(0,u.jsxs)(c.V.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:[e.heading.trim().length>0?(0,u.jsx)("div",{className:"whatmore-events-carousel",style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,u.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-family",B,"important"),e.style.setProperty("font-size",T+"px","important"))},style:{color:L,backgroundClip:"text",textAlign:"center",fontWeight:(0,h.wOV)(Z),lineHeight:(0,h.vY4)(Z),letterSpacing:(0,h.X2K)(Z)},children:e.heading})}):(0,u.jsx)(u.Fragment,{}),(0,u.jsx)("div",{ref:V,style:{marginLeft:R+"px",marginRight:R+"px"},children:(0,u.jsx)(g.P,{renderElement:e=>(0,u.jsx)(u.Fragment,{children:e.eventData}),dataList:W,spacing:E,defaultHeight:b*P*.01+"px",defaultWidth:C*P*.01+"px",retainAlreadyRenderedElements:!0})}),(0,h.dhc)(Z)&&!D&&-1==e.index&&(0,u.jsx)(w.Z,{event:z[0],inVideoClick:F,closeClick:t=>{t.stopPropagation(),e.setScreen(-2)}})]})})})})}},7129:function(e,t,i){i.d(t,{V:function(){return o}});const o=(0,i(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},8631:function(e,t,i){var o=i(7313),n=i(9854),r=i(7753),l=(i(9111),i(123),i(9778),i(4892)),a=i(7129),s=i(9821),d=i(6417);t.Z=function(e){var t;const[i,p,c,h,x]=(0,s.Z)(),[m]=(0,r.j1)("whatmoreSecondaryColor"),[u]=(0,r.j1)("whatmoreShopId"),[f]=(0,r.j1)("whatmoreCollectionsTileSize"),[g,v]=(0,o.useState)(!1),w=(0,n.f63)(u);(0,o.useContext)(a.V);const y=e.event,j=e.onClick,b=e.removeBorders,C=i*f*.01,S=p*f*.01,M=null!==(t=e.borderRadius)&&void 0!==t?t:"0%";return(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:S+"px",marginLeft:b?"2px":"5px",marginRight:b?"2px":"5px",marginTop:b?"2px":"5px",marginBottom:b?"2px":"5px",cursor:"pointer"},onClick:()=>{v(!0),j(y)},className:[g?"whatmore-scale-on-tap":""].join(" "),children:(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:M,overflow:"hidden",boxShadow:b?"":"0px 1px 1px 0px "+m+"50, 0px -1px 1px 0px "+w+"50, 1px 0px 1px 0px "+m+"50, -1px 0px 1px 0px "+w+"80, 1px -1px 1px 0px "+m+"80, -1px 1px 1px 0px "+w+"DA, 1px 1px 1px 0px "+m+"DA, -1px -1px 1px 0px "+w+"DA"},children:(0,d.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:C+"px",width:S+"px",borderRadius:M,backgroundColor:"gray",overflow:"hidden"},children:(0,d.jsx)(l.Z,{height:"100%",width:"100%",url:y.thumbnail_image,isPlaying:!0,event:y})})})})}},6066:function(e,t,i){var o=i(7313),n=i(9854),r=i(7753),l=(i(9111),i(123),i(9778),i(4892)),a=i(7129),s=i(9821),d=i(6417);t.Z=function(e){var t;const[i,p,c,h,x]=(0,s.Z)(),[m]=(0,r.j1)("whatmoreSecondaryColor"),[u]=(0,r.j1)("whatmoreShopId"),[f]=(0,r.j1)("whatmoreCollectionsTileSize"),[g,v]=(0,o.useState)(!1),w=(0,n.f63)(u);(0,o.useContext)(a.V);const y=e.event1,j=e.event2,b=e.onClick,C=.01*f,S=i*C,M=i*C*.5,k=p*C,P=null!==(t=e.borderRadius)&&void 0!==t?t:"10%",R="15%",E=e.removeBorders;return(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",flexShrink:0,height:S+"px",width:k+"px",marginLeft:E?"2px":"5px",marginRight:E?"2px":"5px",marginTop:E?"2px":"5px",marginBottom:E?"2px":"5px",cursor:"pointer"},children:(0,d.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:E?"0px":P,boxShadow:E?"":"0px 1px 1px 0px "+m+"50, 0px -1px 1px 0px "+w+"50, 1px 0px 1px 0px "+m+"50, -1px 0px 1px 0px "+w+"80, 1px -1px 1px 0px "+m+"80, -1px 1px 1px 0px "+w+"DA, 1px 1px 1px 0px "+m+"DA, -1px -1px 1px 0px "+w+"DA"},onClick:()=>{v(!0),b(y)},className:[g?"whatmore-scale-on-tap":""].join(" "),children:[(0,d.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:M+"px",width:k+"px",borderTopLeftRadius:E?"0px":R,borderTopRightRadius:E?"0px":R,borderBottom:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,d.jsx)(l.Z,{height:"100%",width:"100%",url:y.thumbnail_image,isPlaying:!0,event:y})}),(0,d.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:M+"px",width:k+"px",borderBottomLeftRadius:E?"0px":R,borderBottomRightRadius:E?"0px":R,borderTop:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,d.jsx)(l.Z,{height:"100%",width:"100%",url:j.thumbnail_image,isPlaying:!0,event:j})})]})})}},8782:function(e,t,i){i.d(t,{P:function(){return a}});var o=i(3933),n=i(7313),r=(i(123),i(6417));function l(e){const{ref:t,inView:i,entry:n}=(0,o.YD)({triggerOnce:e.retainAlreadyRenderedElements});return(0,r.jsx)("div",{ref:t,children:i?e.renderElement({eventData:e.data}):(0,r.jsx)("div",{style:{minWidth:e.defaultHeight,minHeight:e.defaultWidth}})})}function a(e){var t;return(0,n.useEffect)((()=>{const e=document.querySelector(".whatmore-carousel-horizontal-flex");let t,i=!1;function o(e){e.touches&&(null===e||void 0===e?void 0:e.touches.length)>0?(i=!0,t=e.touches[0].clientX):(i=!0,t=e.clientX)}function n(o){if(!i)return;const n=o.touches?o.touches[0].clientX:o.clientX;e.style.pointerEvents="none";const r=2*(t-n);e.scrollLeft+=r,t=n}function r(t){e.style.pointerEvents="auto",i=!1}return e&&("ontouchstart"in window&&(e.addEventListener("touchstart",o),e.addEventListener("touchmove",n),e.addEventListener("touchend",r)),e.addEventListener("mousedown",o),document.addEventListener("mousemove",n),document.addEventListener("mouseup",r)),()=>{e&&("ontouchstart"in window&&(e.removeEventListener("touchstart",o),e.removeEventListener("touchmove",n),e.removeEventListener("touchend",r)),e.removeEventListener("mousedown",o),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",r))}}),[]),(0,r.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",height:"fit-content",width:"100%",gap:null!==(t=e.spacing)&&void 0!==t?t:3},className:"whatmore-carousel-horizontal-flex",children:e.dataList.map(((t,i)=>(0,r.jsx)(l,{renderElement:e.renderElement,data:t,defaultHeight:e.defaultHeight,defaultWidth:e.defaultWidth,retainAlreadyRenderedElements:e.retainAlreadyRenderedElements},"key-"+i)))})}},5380:function(e,t,i){i.d(t,{Z:function(){return v}});var o=i(4959),n=i(7313),r=i(4892),l=i(6805),a=i(7753),s=i(9821);var d=function(e){const[t,i,o,n,r]=(0,s.Z)(),[d]=(0,a.j1)("whatmoreEmbedAppVideoPlayerSizePortrait"),[p]=(0,a.j1)("whatmoreEmbedAppVideoPlayerSizeLandscape"),c=r[l.YP]===l.$w?p/100:d/100*1.2;return[t*c,i*c,r]},p=i(9723),c=i(9461),h=i.n(c),x=i(1195),m=i(7108),u=(i(7244),i(123),i(9854)),f=i(9039),g=i(6417);var v=function(e){var t;const i=n.useRef(null);var[s,c,v]=d();const{whatmoreUITheme:w}=(0,n.useContext)(f.I),[y]=(0,a.j1)("whatmoreEmbedAppVideoTitle"),[j]=(0,a.j1)("whatmoreEmbedAppPositionPortrait"),[b]=(0,a.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[C]=(0,a.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[S]=(0,a.j1)("whatmoreEmbedAppPositionLandscape"),[M]=(0,a.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[k]=(0,a.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),P=(0,a.MO)("whatmoreShopId");var R=j,E=b,Z=C;v[l.YP]===l.$w&&(R=S,E=M,Z=k);const[L,O]=(0,n.useState)(["initial",window.pageYOffset]),[z,I]=(0,n.useState)(!1),A=null!==(t=e.isSpotlight)&&void 0!==t&&t,T=v[l.YP]===l.$w?.7*(0,u.zGA)(P):(0,u.zGA)(P),B=A?T:1;s*=B,c*=B;const F=A?(0,u.G0o)(P):R,V=A?(0,u.X8j)(P):(0,u.lVn)(P),[D,H]=(0,n.useState)(!A&&(0,u.eXi)(P));function W(e,t){O(e),e[1]<=100?I(!1):t!=z&&(I(t),H(!1))}(0,n.useEffect)((()=>{let e=window.pageYOffset,t=!1;const i=()=>{const i=window.pageYOffset;Math.abs(i-e)<100||(W([i>e?"scrolled-down":"scrolled-up",i],!0),e=i>0?i:0),t=!1},o=()=>{t||(window.requestAnimationFrame(i),t=!0)};return window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)}),[L]),(0,o.O3)({ref:i,handler:()=>{W(["scrolled-up",L[1]],!0)}});const q=e.event,Y=e.inVideoClick,N=e.closeClick,$=.3*c,X=.6*c,_=.1*c,G=.1*(.5*c),K="round"==w?"10px":"0px",U=(0,u.Z$A)(P);var J=!1,Q=0,ee=0;function te(e){J=e}return(0,g.jsx)("div",{children:D&&!V?(0,g.jsx)(g.Fragment,{}):z&&V?(0,g.jsx)("div",{style:"left"===F?{left:"1px",bottom:A?(0,u.vnu)(P)+"px":Z+"px",position:"fixed",zIndex:U}:{right:"5px",bottom:A?(0,u.vnu)(P)+"px":Z+"px",position:"fixed",zIndex:U},children:(0,g.jsxs)("div",{onClick:()=>{W(["initial",L[1]],!1)},style:{margin:"1px",width:c+"px",height:s+"px"},className:"left"===F?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,g.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:K,overflow:"hidden"},children:(0,g.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,g.jsx)(r.Z,{url:q.thumbnail_image,isPlaying:!1,event:q})})}),(0,g.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,g.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,g.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,g.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,g.jsx)(x.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:$+"px"},style:{position:"relative",zIndex:1,left:G+"px",bottom:G+"px"},onClick:N})})}),(0,g.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,g.jsx)(m.Z,{sx:{color:"white",fontSize:2*$+"px",filter:"drop-shadow(0 0 15px black);"}})})]})})]})}):(0,g.jsx)(h(),{nodeRef:i,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 i,o;i=t.x,o=t.y,Q=i,ee=o},onDrag:(e,t)=>{te(!0)},onStop:(e,t)=>{J&&(Math.abs(t.x-Q)>5||Math.abs(t.y-ee)>5)?te(!1):Y(q)},children:(0,g.jsx)("div",{ref:i,style:"left"===F?{left:A?(0,u.$II)(P)+"px":E+"px",bottom:A?(0,u.vnu)(P)+"px":Z+"px",position:"fixed",zIndex:U}:{right:A?(0,u.$II)(P)+"px":E+"px",bottom:A?(0,u.vnu)(P)+"px":Z+"px",position:"fixed",zIndex:U},children:(0,g.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:c+"px",height:s+"px"}),className:"left"===F?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,g.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:K,overflow:"hidden",position:"relative"},children:(0,g.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,g.jsx)(r.Z,{url:q.thumbnail_image,isMuted:!0,isPlaying:!0,event:q})})}),(0,g.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,g.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,g.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,g.jsx)(x.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:$+"px"},onClick:N,style:{position:"relative",zIndex:1,left:_+"px",bottom:_+"px"}})}),(0,g.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,g.jsx)(p.Z,{sx:{color:(0,u.Ya_)(P),fontSize:X+"px",filter:"drop-shadow(0 0 15px black);"}})}),(0,g.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:K,borderBottomRightRadius:K,backgroundImage:y?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,g.jsxs)("p",{style:{textAlign:"center",color:"white",fontFamily:"Sans-serif",fontWeight:"semi-bold",fontSize:.4*$+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",y]})})]})})]})})})})}},9111:function(){},5892:function(){},4444:function(){},1811:function(){},6143:function(){},7850:function(){},9778:function(){}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[789],{3580:function(t,e,n){n.r(e),n.d(e,{default:function(){return u}});var r=n(7313),o=n(8866),i=n(7753),s=(n(9111),n(123),n(9778),n(9854)),a=n(868),l=n(6417);var d=function(t){var e,n;const[d,c,p]=(0,o.Z)(),h=(0,i.MO)("whatmorePrimaryFont"),u=(0,i.MO)("whatmoreSecondaryColor"),f=(0,i.MO)("whatmoreShopId"),[x,m]=(0,r.useState)(!1),w=t.storyId,g=(0,a.V)(t.imageUrl),y=t.title,v=t.onClick,b=t.template,j=(0,s.f63)(f),S="template-stories-a"===b?"50%":"30%",k="portrait"==d?1:(0,s.Zyc)(f),z=Math.floor(t.tileSize*k),C=.12*z*(0,s.LM2)(f),F=null!==(e=(0,s.QaQ)(f))&&void 0!==e?e:h,E=null!==(n=(0,s.u2W)(f))&&void 0!==n?n:[u,j,u,j,u];return(0,l.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignItems:"center",flexShrink:0,height:"fit-content",width:z*(0,s.jJ6)(f)+"px",marginLeft:"10px",marginRight:"10px",marginTop:"10px",marginBottom:"10px",cursor:"pointer"},onClick:()=>{m(!0),v(w)},className:[x?"whatmore-scale-on-tap":""].join(" "),children:[(0,l.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:S,boxShadow:"0px 2px 1px 0px "+E[0]+"50, 0px -2px 1px 0px "+E[1]+"50, 2px 0px 1px 0px "+E[2]+"50, -2px 0px 1px 0px "+E[3]+"80, 2px -2px 1px 0px "+E[4]+"80, -2px 2px 1px 0px "+E[0]+"DA, 2px 2px 1px 0px "+E[1]+"DA, -2px -2px 1px 0px "+E[2]+"DA"},children:(0,l.jsx)("div",{className:"whatmore-story-thumbnail-wrapper",style:{flexShrink:0,objectFit:"cover",height:z+"px",width:z+"px",borderRadius:S,border:"3px solid white",backgroundColor:"#343434"===u?"#d3d3d3":u,overflow:"hidden"},children:(0,l.jsx)("img",{className:"whatmore-story-thumbnail",src:g,loading:"lazy",style:{objectFit:"cover",height:z+"px",width:z+"px",backgroundColor:"white"},alt:"story image"})})}),(0,l.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"100%",marginTop:"10px"},children:(0,l.jsx)("p",{ref:t=>{t&&t.style.setProperty("font-size",C+"px","important")},style:{textAlign:"center",color:(0,s.WS3)(f),fontFamily:F,fontWeight:"normal",lineHeight:"110%",margin:0,padding:0,overflow:"hidden",textOverflow:"ellipsis",width:"auto"},children:y.substring(0,24)})})]})},c=n(9039),p=n(9302);const h=(0,n(2575).Z)({key:"whatmore-stories-css"});var u=function(t){const[e,n,a]=(0,o.Z)(),[u]=(0,i.j1)("whatmoreLandscapePadding"),[f]=(0,i.j1)("whatmoreStoryTileSize"),[x]=(0,i.j1)("whatmoreStoryTileSizeDesktop"),[m]=(0,i.j1)("whatmoreShopId"),[w,g]=(0,r.useState)("portrait"===e?"flex-start":"center"),y=(0,r.useRef)(null);var v=t.eventsStories;const b=t.onClick,j=t.template;(0,r.useEffect)((()=>{c.$.forEach((t=>{var e;if(!(null!==(e=t.querySelector('.whatmore-template-type[data-wh="template-stories-a"]'))&&void 0!==e?e:t.querySelector('.whatmore-template-type[data="template-stories-a"]')))return;t&&(t.style.minHeight="0px")}))}),[]);const S=t=>{if(y.current){const e="left"===t?4*-k:4*k;y.current.scrollBy({left:e,behavior:"smooth"})}};(0,r.useEffect)((()=>{!function(){if(y.current){const t=y.current.scrollWidth,e=y.current.offsetWidth;g(t>e?"flex-start":"center")}}()}),[w,a]);const k="landscape"===e?n*(x/100)*.3:a*(f/100)*.5;return(0,l.jsx)(p.C,{value:h,children:(0,l.jsx)("div",{style:{left:u+"px",right:u+"px",marginBottom:"portrait"==e?(0,s.cj$)(m):(0,s.TMR)(m)},children:(0,l.jsx)("div",{style:{display:"flex",alignItems:"center",position:"relative"},children:"landscape"==e&&!(0,s.DF0)(m)||"portrait"==e&&!(0,s.JaA)(m)?(0,l.jsx)(l.Fragment,{}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:w,height:"fit-content",width:"100%"},className:"whatmore-story-horizontal-flex",ref:y,children:v.map(((t,e)=>(0,l.jsx)(d,{storyId:t.id,tileSize:(0,s.OFP)(m)?100:k,onClick:t=>{b(e)},template:j,imageUrl:t.thumbnail_image,title:t.title},"whatmore-story-"+t.id)))}),"landscape"===e&&(0,s.sMW)(m)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("button",{onClick:()=>S("left"),style:{borderRadius:"4px",backgroundColor:"rgba(0, 0, 0, 0.4)",position:"absolute",top:"40%",transform:"translateY(-50%)",left:0},children:(0,l.jsx)("p",{style:{fontSize:"22px",color:"white",padding:"8px"},children:"<"})}),(0,l.jsx)("button",{onClick:()=>S("right"),style:{borderRadius:"4px",backgroundColor:"rgba(0, 0, 0, 0.4)",position:"absolute",top:"40%",transform:"translateY(-50%)",right:0},children:(0,l.jsx)("p",{style:{fontSize:"22px",color:"white",padding:"8px"},children:">"})})]})]})})})})}},868:function(t,e,n){n.d(e,{V:function(){return a}});var r=n(9854),o=n(7753);const i={"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,o.MO)("whatmoreShopId");if(!t)return t;if(t.startsWith("https://cdn.shopify.com"))return t;if("AWSCDN"==(0,r.zpr)(e))return t;if("AZURECDN"==(0,r.zpr)(e)){if(t.includes(".azureedge.net"))return t;if(t.includes(".cloudfront.net")){for(const e of Object.keys(i))if(t.includes(e))return t.replace(e,i[e]);return t}}if("BUNNYCDN"==(0,r.zpr)(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}},8866:function(t,e,n){var r=n(7313);function o(){return[window.innerHeight,window.innerWidth]}e.Z=function(t){var[e,n]=o();const[i,s]=(0,r.useState)([e>n?"portrait":"landscape",e,n]);return(0,r.useLayoutEffect)((()=>{function t(){var[t,e]=o();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)}}),[]),i}},9111:function(){},123:function(){},9778:function(){}}]);
|