whatmore-react-assets 1.0.433 → 1.0.435

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.
Files changed (23) hide show
  1. package/package.json +1 -1
  2. package/static/js/{108.b2ddec17.chunk.js → 108.583164c7.chunk.js} +1 -1
  3. package/static/js/{171.c2b5cb4e.chunk.js → 171.26455cc2.chunk.js} +1 -1
  4. package/static/js/334.ec77bfb6.chunk.js +1 -0
  5. package/static/js/{358.347c196f.chunk.js → 358.63dbf340.chunk.js} +1 -1
  6. package/static/js/{364.a56265ea.chunk.js → 364.d352e411.chunk.js} +1 -1
  7. package/static/js/{530.575b81b1.chunk.js → 530.d83d90b8.chunk.js} +1 -1
  8. package/static/js/{554.c4d0ef66.chunk.js → 554.6485833a.chunk.js} +1 -1
  9. package/static/js/{565.02b6cec1.chunk.js → 565.08707eae.chunk.js} +1 -1
  10. package/static/js/{580.e333ab57.chunk.js → 580.9ecdeeec.chunk.js} +1 -1
  11. package/static/js/{607.ca99feff.chunk.js → 607.4183c5f4.chunk.js} +1 -1
  12. package/static/js/{67.c5b3a991.chunk.js → 67.f468b254.chunk.js} +1 -1
  13. package/static/js/{68.4a214ffd.chunk.js → 68.cbb67a34.chunk.js} +1 -1
  14. package/static/js/{692.614af1da.chunk.js → 692.dba8c6f4.chunk.js} +1 -1
  15. package/static/js/{708.01e6fdce.chunk.js → 708.8200af77.chunk.js} +1 -1
  16. package/static/js/{74.b894f74c.chunk.js → 74.441112fc.chunk.js} +1 -1
  17. package/static/js/{891.4972f95a.chunk.js → 891.3bed7a50.chunk.js} +1 -1
  18. package/static/js/{950.e86f8ad9.chunk.js → 950.ee92528a.chunk.js} +1 -1
  19. package/static/js/{959.8ec7f90c.chunk.js → 959.11cd5ed4.chunk.js} +1 -1
  20. package/static/js/{972.bafc997a.chunk.js → 972.635bf98b.chunk.js} +1 -1
  21. package/static/js/{986.df6827ee.chunk.js → 986.f84d39d3.chunk.js} +1 -1
  22. package/whatmore.js +2 -2
  23. package/static/js/334.98b6f3d7.chunk.js +0 -1
@@ -1 +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 i=n(7753),r=n(7313),a=n(2860),s=n(499),o=n(4897),c=n(5160),l=n(9854),u=n(6967),d=n(8984),h=n(58),g=n(4669),v=n(941),m=n(4136),p=n(7300),I=n(6524),f=n(7643),T=n(778),E=n(6417);const S=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),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(367),n.e(240),n.e(576),n.e(950),n.e(364),n.e(530)]).then(n.bind(n,5523)))),_=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(358)]).then(n.bind(n,3827)))),j=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(607)]).then(n.bind(n,6071)))),y=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(986)]).then(n.bind(n,1291)))),w=r.lazy((()=>Promise.all([n.e(302),n.e(580)]).then(n.bind(n,3580)))),M=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(210),n.e(576),n.e(803),n.e(926),n.e(303),n.e(171),n.e(68)]).then(n.bind(n,8171)))),C=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(210),n.e(926),n.e(950),n.e(959)]).then(n.bind(n,4048)))),O=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(210),n.e(926),n.e(950),n.e(303),n.e(554)]).then(n.bind(n,9085)))),L=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(576),n.e(950),n.e(303),n.e(364),n.e(67)]).then(n.bind(n,4362)))),D=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(210),n.e(576),n.e(803),n.e(926),n.e(303),n.e(171),n.e(334)]).then(n.bind(n,4658))));var b=function(e){const[t]=(0,i.j1)("isInDesignMode"),[n]=(0,i.j1)("isDemoBrand"),[b]=(0,i.j1)("whatmoreTopBottomPadding"),[P]=(0,i.j1)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:G}=(0,r.useContext)(m.I),[W]=(0,i.j1)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:V}=(0,r.useContext)(m.I),k=(0,i.MO)("isLandingSharedLink"),U=(0,i.MO)("whatmoreShareTemplateId"),z=(0,i.MO)("whatmoreShareStoryId"),N=(0,i.MO)("whatmoreShareEventId"),[F,Z]=(0,r.useState)(-1),[K,A]=(0,r.useState)(null);var R=e.events,B=null;function H(e){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,d.KE)()&&!i&&(0,h.QV)(),t||n||(async()=>{const t=B[e].events[0];(0,c.wh)(t),(0,g.Tc)(W,a.Xh,a.OW),(0,u.H4)(t.event_id,t.products,"homepage","stories")})();var s=0;null!=r&&B[e].events.map(((e,t)=>{e.event_id==r&&(s=t)})),Z(s),A(e)}function X(e){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,d.KE)()&&!i&&(0,h.QV)(),(0,p.B6)(e)||(0,p.WJ)(e))return t||n||(async()=>{(0,c.wh)(e),(0,g.Tc)(W,a.Xh,a.pR),(0,u.H4)(e.event_id,e.products,"homepage","carousel")})(),void Z(e.index);const r=20;var{status:l,bannerText:v,timeToStartInMins:m}=o.Z.getEventStatus(e);m<=r&&l.name!==s.Z.LIVE.name?console.debug(" TODO : show toast on upcoming live event."):Z(e.index)}function J(e){return(0,E.jsx)(E.Fragment,{})}return G&&!B&&(B=function(e){var t=e.reduce(((e,t,n)=>{var i=t.storyset_id;return i in e?(e[i].total_events=e[i].total_events+1,e[i].events.push(t)):e[i]={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}(R)),(0,r.useEffect)((()=>{k&&V==(0,I.zv)(U)&&(null!=z&&G?B.forEach(((e,t)=>{z==e.id&&H(t,!0,N)})):null!=N&&R.forEach(((e,t)=>{N==e.event_id&&X(e,!0)})))}),[]),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{style:{marginTop:(G?P:b)+"px",marginBottom:(G?P:b)+"px"},children:"template-b"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(S,{events:R,onClick:X,heading:e.heading})}):"template-a-1"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(x,{events:R,onClick:X,heading:e.heading})}):"template-feed-a"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(L,{events:R,onClick:X,heading:e.heading})}):"template-collections-a"===V||"template-c"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(_,{events:R,onClick:X,heading:e.heading})})}):"template-collections-b"===V||"template-d"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(j,{events:R,onClick:X,heading:e.heading})})}):"template-collections-c"===V||"template-e"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(y,{events:R,onClick:X,heading:e.heading})})}):"template-collections-d"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(S,{events:R,onClick:X,heading:e.heading})})}):"template-collections-e"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(C,{events:R,onClick:X,heading:e.heading})})}):"template-f"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(O,{events:R,onClick:X,heading:e.heading})})}):"template-banner-a"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.BANNER_WIDGET_VIEW,event:R[0],triggerFlag:!t&&!n,children:(0,E.jsx)(D,{events:R})})}):G?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.STORIES_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(w,{eventsStories:B,onClick:H,template:V})})}):(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(C,{events:R,onClick:X,heading:e.heading})})})}),-1==F?(0,E.jsx)(J,{}):(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.EVENT_VIEW,event:R[F],productList:R[F].products,cta:R[F].cta,triggerFlag:!t&&!n,children:(0,E.jsx)(M,{events:R,index:F,onBack:function(e){(0,l.n2)(W)&&(0,i.MO)("whatmoreAddedToCart")&&(0,v.D)(W,(()=>{}),100,window.location.hostname),Z(-1)},slideDirection:G||"horizontal"===(0,l.e8)(W)?"horizontal":"vertical",eventsStories:B,initialStoryIndex:K,template:V})})})]})};const P=function(e,t,n){const r=(0,i.MO)("whatmoreShopId");var a=t.reduce(((e,t,n)=>(t.products.map((e=>e.client_product_id)).forEach((t=>{t in e||(e[t]=!0)})),e)),{}),s=Object.keys(a);if("60960964855"==r&&"undefined"!=typeof fera&&"function"===typeof fera.getRatings){var o={};fera.getRatings(s,(e=>{new Promise(((t,n)=>{e.forEach((e=>{o[e.external_product_id]={avgRating:e.average,totalRatings:e.count}})),t(o)})).then((e=>n(e)))}))}if("23114481744"==r){const e="1e6MQXxzYR19mpw9Km6Dcm86";o={};fetch("https://api.juniphq.com/v1/products?filter[remote_ids]="+s.toString(),{headers:{"Junip-Store-Key":e}}).then((e=>e.json())).then((e=>(e.products.forEach((e=>{o[e.remote_id]={avgRating:parseFloat(e.rating_average).toFixed(1),totalRatings:e.rating_count}})),o))).then((e=>n(e))).catch((e=>console.error(e)))}};var G=n(3388),W=n(7381),V=n(7376);var k=function(e){const[t,n]=(0,r.useState)(),[s,o]=(0,r.useState)(),{whatmoreIsStoriesTemplate:c}=(0,r.useContext)(m.I),{whatmoreIsCollectionsTemplate:g}=(0,r.useContext)(m.I),{whatmoreIsBannerTemplate:v}=(0,r.useContext)(m.I),[p]=(0,i.j1)("whatmoreShopId"),[f]=(0,i.j1)("whatmoreCollectionId"),S=(0,i.MO)("whatmoreLandingLocationType"),x=(0,i.MO)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:_}=(0,r.useContext)(m.I),{whatmoreCollectionUrl:j}=(0,r.useContext)(m.I),y=(0,l.cZ)(p)?(0,l._u)(p)?j:window.location.href.split(/[?#]/)[0]:f,[w,M]=(0,i.j1)("productRatings");var C=(0,l.ef)(p)?a.Dm+"/v2/events/":a.Gc+"/v2/events/",O=(0,l.ef)(p)?a.Dm+"/get_eventset/":a.Gc+"/get_eventset/",L=(0,l.ef)(p)?a.Dm+"/v2/collection":a.Gc+"/v2/collection",D=(0,l.ef)(p)?a.Dm+"/v2/brand/"+p+"/product-events":a.Gc+"/v2/brand/"+p+"/product-events",k=e.shopId,U="live,upcoming";return(0,r.useEffect)((()=>{(0,u.hb)()}),[]),(0,r.useEffect)((()=>{null==t||0==t.length||s||!(0,d.KE)()||(0,i.MO)("whatmoreVideoPlayerPoolInitiated")||(0,h.b5)(h.UD)}),[t]),(0,r.useEffect)((()=>{var e;if(S.startsWith("product")){var t=(0,i.MO)("whatmoreProductId");t=(0,l.iX)(p)?function(e){return e.split(/[?#]/)[0]}(window.location.href):t,e=D.toString()+"?client_product_id="+t.toString()+"&status="+U.toString()+"&event_type=video"}else if(g||"invalid-url"!==j)e=L.toString()+"?store_id="+k.toString()+"&client_collection_id="+y;else if(v){const t=I.ls,n=(0,I.H1)(S);e=O.toString()+k.toString()+"?eventset_type="+t+"&source="+n+"&source_id="+p}else e=C.toString()+k.toString()+"?status="+U.toString()+"&is_active="+"true".toString()+(c?"&template_type=stories":"");fetch(e).then((e=>e.json())).then((e=>{if(v){const t=I.ls;return(0,G.OC)(e,t)}return(0,G.kW)(e,g||"invalid-url"!==j)})).then((e=>(x&&console.debug("initial received events size : "+e.length),c||v?e:(0,G.e8)(e,k)))).then((e=>(null!=e&&0!=e.length&&(0,l.LU)(p)&&function(e,t,n){const r=setInterval((()=>{null===(0,i.MO)("productRatings")&&P(e,t,n)}),1e3);setTimeout((()=>{clearInterval(r)}),1e4)}(p,e,(e=>{M(e)})),e))).then((e=>{null==e||0==e.length||c||(0,l.NO)(k,e),n(e)})).catch((e=>{o(e.message)}))}),[]),(0,r.useEffect)((()=>{"index"===S?t&&t.length>0&&(0,V.PB)({userInteractionType:T.K.HOMEPAGE_VISITED,widgetSourceDetails:_}):"collection"===S&&t&&t.length>0&&(0,V.PB)({userInteractionType:T.K.COLLECTION_PAGE_VISITED,widgetSourceDetails:_})}),[t]),null==t||0==t.length||s?(0,E.jsx)("div",{}):(x&&(0,W.EI)(t),function(e,t){if(null!=e){var n=0;e.forEach((e=>{e.index=n++}))}}(t),x&&console.debug("final transformed events data : "+JSON.stringify(t)),x&&console.debug("valid events size : "+t.length),(0,E.jsx)("div",{children:(0,E.jsx)(b,{heading:e.heading,events:t})},"whatmore-main-coponent"))};var U=function(e){const[t]=(0,i.j1)("isInDesignMode"),[n]=(0,i.j1)("isDemoBrand"),[s]=(0,i.j1)("whatmoreShopId"),[o]=(0,i.j1)("whatmoreHeading"),[c]=(0,i.j1)("whatmorePrimaryColor"),[l]=(0,i.j1)("whatmoreSecondaryColor");return(0,r.useEffect)((()=>{(0,g.ll)(s)}),[]),(0,E.jsx)(E.Fragment,{children:(0,E.jsx)("div",{children:t||n?(0,E.jsx)("div",{children:(0,E.jsx)(k,{heading:o,shopId:a.aA})}):(0,E.jsx)("div",{children:(0,E.jsx)(k,{heading:o,shopId:s})})})})}},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 i=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,a=e.status,s=e.time_zone;if(a.toUpperCase()==i.Z.LIVE.name)return{status:i.Z.LIVE,bannerText:" "+i.Z.LIVE.name+" ",timeToStartInMins:0};if(a.toUpperCase()==i.Z.UPCOMING.name){var o=new Date(r+" "+t+" "+s),c=(new Date(r+" "+n+" "+s),function(e){var t=new Date,n=(e.getTime()-t.getTime())/1e3,r=n/60,a=r/60,s=a/24;return n<=0?{status:i.Z.COMPLETED,bannerText:" "+i.Z.COMPLETED.name+" ",timeToStartInMins:0}:n>=1&&n<=30?{status:i.Z.UPCOMING,bannerText:"Starts in "+Math.round(n)+" sec ",timeToStartInMins:n/60}:r<60?{status:i.Z.UPCOMING,bannerText:"Starts in "+Math.round(r)+" min ",timeToStartInMins:r}:a<24?{status:i.Z.UPCOMING,bannerText:"Starts in "+Math.round(a)+" hr ",timeToStartInMins:60*a}:s<7?{status:i.Z.UPCOMING,bannerText:" "+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()]+" ",timeToStartInMins:60*s*24}:{status:i.Z.UPCOMING,bannerText:"Upcoming",timeToStartInMins:2880}}(o));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:i.Z.DEFAULT,bannerText:"live event",timeToStartInMins:2880}}}},3388:function(e,t,n){n.d(t,{OC:function(){return o},e8:function(){return a},kT:function(){return i},kW:function(){return s},xg:function(){return r}});const i=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)},a=function(e,t){if(null!=e)return e.filter((e=>1==i(e)))},s=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 o=function(e,t){var n;if(null==e)return[];if(!("eventsets"in e))return[];const i=null!==(n=e.eventsets[t])&&void 0!==n?n:null;return i?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(i):[]}},7376:function(e,t,n){n.d(t,{GF:function(){return r},PB:function(){return o},Z2:function(){return a},y4:function(){return s}});var i=n(795);function r(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o}=e;(0,i.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o})}function a(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o}=e;(0,i.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o})}function s(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o}=e;(0,i.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o})}function o(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o}=e;(0,i.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o})}}}]);
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 i=n(7753),r=n(7313),a=n(2860),s=n(499),o=n(4897),c=n(5160),l=n(9854),u=n(6967),d=n(8984),h=n(58),g=n(4669),v=n(941),m=n(7592),p=n(7300),I=n(6524),f=n(7643),T=n(778),E=n(6417);const S=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),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(367),n.e(240),n.e(576),n.e(950),n.e(364),n.e(530)]).then(n.bind(n,5523)))),_=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(358)]).then(n.bind(n,3827)))),j=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(607)]).then(n.bind(n,6071)))),y=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(986)]).then(n.bind(n,1291)))),w=r.lazy((()=>Promise.all([n.e(302),n.e(580)]).then(n.bind(n,3580)))),M=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(210),n.e(576),n.e(803),n.e(926),n.e(303),n.e(171),n.e(68)]).then(n.bind(n,8171)))),C=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(210),n.e(926),n.e(950),n.e(959)]).then(n.bind(n,4048)))),O=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(210),n.e(926),n.e(950),n.e(303),n.e(554)]).then(n.bind(n,9085)))),L=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(576),n.e(950),n.e(303),n.e(364),n.e(67)]).then(n.bind(n,4362)))),D=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(210),n.e(576),n.e(803),n.e(926),n.e(303),n.e(171),n.e(334)]).then(n.bind(n,4658))));var b=function(e){const[t]=(0,i.j1)("isInDesignMode"),[n]=(0,i.j1)("isDemoBrand"),[b]=(0,i.j1)("whatmoreTopBottomPadding"),[P]=(0,i.j1)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:G}=(0,r.useContext)(m.I),[W]=(0,i.j1)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:V}=(0,r.useContext)(m.I),k=(0,i.MO)("isLandingSharedLink"),U=(0,i.MO)("whatmoreShareTemplateId"),z=(0,i.MO)("whatmoreShareStoryId"),N=(0,i.MO)("whatmoreShareEventId"),[F,Z]=(0,r.useState)(-1),[K,A]=(0,r.useState)(null);var R=e.events,B=null;function H(e){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,d.KE)()&&!i&&(0,h.QV)(),t||n||(async()=>{const t=B[e].events[0];(0,c.wh)(t),(0,g.Tc)(W,a.Xh,a.OW),(0,u.H4)(t.event_id,t.products,"homepage","stories")})();var s=0;null!=r&&B[e].events.map(((e,t)=>{e.event_id==r&&(s=t)})),Z(s),A(e)}function X(e){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,d.KE)()&&!i&&(0,h.QV)(),(0,p.B6)(e)||(0,p.WJ)(e))return t||n||(async()=>{(0,c.wh)(e),(0,g.Tc)(W,a.Xh,a.pR),(0,u.H4)(e.event_id,e.products,"homepage","carousel")})(),void Z(e.index);const r=20;var{status:l,bannerText:v,timeToStartInMins:m}=o.Z.getEventStatus(e);m<=r&&l.name!==s.Z.LIVE.name?console.debug(" TODO : show toast on upcoming live event."):Z(e.index)}function J(e){return(0,E.jsx)(E.Fragment,{})}return G&&!B&&(B=function(e){var t=e.reduce(((e,t,n)=>{var i=t.storyset_id;return i in e?(e[i].total_events=e[i].total_events+1,e[i].events.push(t)):e[i]={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}(R)),(0,r.useEffect)((()=>{k&&V==(0,I.zv)(U)&&(null!=z&&G?B.forEach(((e,t)=>{z==e.id&&H(t,!0,N)})):null!=N&&R.forEach(((e,t)=>{N==e.event_id&&X(e,!0)})))}),[]),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{style:{marginTop:(G?P:b)+"px",marginBottom:(G?P:b)+"px"},children:"template-b"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(S,{events:R,onClick:X,heading:e.heading})}):"template-a-1"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(x,{events:R,onClick:X,heading:e.heading})}):"template-feed-a"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(L,{events:R,onClick:X,heading:e.heading})}):"template-collections-a"===V||"template-c"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(_,{events:R,onClick:X,heading:e.heading})})}):"template-collections-b"===V||"template-d"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(j,{events:R,onClick:X,heading:e.heading})})}):"template-collections-c"===V||"template-e"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(y,{events:R,onClick:X,heading:e.heading})})}):"template-collections-d"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(S,{events:R,onClick:X,heading:e.heading})})}):"template-collections-e"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(C,{events:R,onClick:X,heading:e.heading})})}):"template-f"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(O,{events:R,onClick:X,heading:e.heading})})}):"template-banner-a"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.BANNER_WIDGET_VIEW,event:R[0],triggerFlag:!t&&!n,children:(0,E.jsx)(D,{events:R})})}):G?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.STORIES_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(w,{eventsStories:B,onClick:H,template:V})})}):(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(C,{events:R,onClick:X,heading:e.heading})})})}),-1==F?(0,E.jsx)(J,{}):(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.EVENT_VIEW,event:R[F],productList:R[F].products,cta:R[F].cta,triggerFlag:!t&&!n,children:(0,E.jsx)(M,{events:R,index:F,onBack:function(e){(0,l.n2)(W)&&(0,i.MO)("whatmoreAddedToCart")&&(0,v.D)(W,(()=>{}),100,window.location.hostname),Z(-1)},slideDirection:G||"horizontal"===(0,l.e8)(W)?"horizontal":"vertical",eventsStories:B,initialStoryIndex:K,template:V})})})]})};const P=function(e,t,n){const r=(0,i.MO)("whatmoreShopId");var a=t.reduce(((e,t,n)=>(t.products.map((e=>e.client_product_id)).forEach((t=>{t in e||(e[t]=!0)})),e)),{}),s=Object.keys(a);if("60960964855"==r&&"undefined"!=typeof fera&&"function"===typeof fera.getRatings){var o={};fera.getRatings(s,(e=>{new Promise(((t,n)=>{e.forEach((e=>{o[e.external_product_id]={avgRating:e.average,totalRatings:e.count}})),t(o)})).then((e=>n(e)))}))}if("23114481744"==r){const e="1e6MQXxzYR19mpw9Km6Dcm86";o={};fetch("https://api.juniphq.com/v1/products?filter[remote_ids]="+s.toString(),{headers:{"Junip-Store-Key":e}}).then((e=>e.json())).then((e=>(e.products.forEach((e=>{o[e.remote_id]={avgRating:parseFloat(e.rating_average).toFixed(1),totalRatings:e.rating_count}})),o))).then((e=>n(e))).catch((e=>console.error(e)))}};var G=n(3388),W=n(7381),V=n(7376);var k=function(e){const[t,n]=(0,r.useState)(),[s,o]=(0,r.useState)(),{whatmoreIsStoriesTemplate:c}=(0,r.useContext)(m.I),{whatmoreIsCollectionsTemplate:g}=(0,r.useContext)(m.I),{whatmoreIsBannerTemplate:v}=(0,r.useContext)(m.I),[p]=(0,i.j1)("whatmoreShopId"),[f]=(0,i.j1)("whatmoreCollectionId"),S=(0,i.MO)("whatmoreLandingLocationType"),x=(0,i.MO)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:_}=(0,r.useContext)(m.I),{whatmoreCollectionUrl:j}=(0,r.useContext)(m.I),y=(0,l.cZ)(p)?(0,l._u)(p)?j:window.location.href.split(/[?#]/)[0]:f,[w,M]=(0,i.j1)("productRatings");var C=(0,l.ef)(p)?a.Dm+"/v2/events/":a.Gc+"/v2/events/",O=(0,l.ef)(p)?a.Dm+"/get_eventset/":a.Gc+"/get_eventset/",L=(0,l.ef)(p)?a.Dm+"/v2/collection":a.Gc+"/v2/collection",D=(0,l.ef)(p)?a.Dm+"/v2/brand/"+p+"/product-events":a.Gc+"/v2/brand/"+p+"/product-events",k=e.shopId,U="live,upcoming";return(0,r.useEffect)((()=>{(0,u.hb)()}),[]),(0,r.useEffect)((()=>{null==t||0==t.length||s||!(0,d.KE)()||(0,i.MO)("whatmoreVideoPlayerPoolInitiated")||(0,h.b5)(h.UD)}),[t]),(0,r.useEffect)((()=>{var e;if(S.startsWith("product")){var t=(0,i.MO)("whatmoreProductId");t=(0,l.iX)(p)?function(e){return e.split(/[?#]/)[0]}(window.location.href):t,e=D.toString()+"?client_product_id="+t.toString()+"&status="+U.toString()+"&event_type=video"}else if(g||"invalid-url"!==j)e=L.toString()+"?store_id="+k.toString()+"&client_collection_id="+y;else if(v){const t=I.ls,n=(0,I.H1)(S);e=O.toString()+k.toString()+"?eventset_type="+t+"&source="+n+"&source_id="+p}else e=C.toString()+k.toString()+"?status="+U.toString()+"&is_active="+"true".toString()+(c?"&template_type=stories":"");fetch(e).then((e=>e.json())).then((e=>{if(v){const t=I.ls;return(0,G.OC)(e,t)}return(0,G.kW)(e,g||"invalid-url"!==j)})).then((e=>(x&&console.debug("initial received events size : "+e.length),c||v?e:(0,G.e8)(e,k)))).then((e=>(null!=e&&0!=e.length&&(0,l.LU)(p)&&function(e,t,n){const r=setInterval((()=>{null===(0,i.MO)("productRatings")&&P(e,t,n)}),1e3);setTimeout((()=>{clearInterval(r)}),1e4)}(p,e,(e=>{M(e)})),e))).then((e=>{null==e||0==e.length||c||(0,l.NO)(k,e),n(e)})).catch((e=>{o(e.message)}))}),[]),(0,r.useEffect)((()=>{"index"===S?t&&t.length>0&&(0,V.PB)({userInteractionType:T.K.HOMEPAGE_VISITED,widgetSourceDetails:_}):"collection"===S&&t&&t.length>0&&(0,V.PB)({userInteractionType:T.K.COLLECTION_PAGE_VISITED,widgetSourceDetails:_})}),[t]),null==t||0==t.length||s?(0,E.jsx)("div",{}):(x&&(0,W.EI)(t),function(e,t){if(null!=e){var n=0;e.forEach((e=>{e.index=n++}))}}(t),x&&console.debug("final transformed events data : "+JSON.stringify(t)),x&&console.debug("valid events size : "+t.length),(0,E.jsx)("div",{children:(0,E.jsx)(b,{heading:e.heading,events:t})},"whatmore-main-coponent"))};var U=function(e){const[t]=(0,i.j1)("isInDesignMode"),[n]=(0,i.j1)("isDemoBrand"),[s]=(0,i.j1)("whatmoreShopId"),[o]=(0,i.j1)("whatmoreHeading"),[c]=(0,i.j1)("whatmorePrimaryColor"),[l]=(0,i.j1)("whatmoreSecondaryColor");return(0,r.useEffect)((()=>{(0,g.ll)(s)}),[]),(0,E.jsx)(E.Fragment,{children:(0,E.jsx)("div",{children:t||n?(0,E.jsx)("div",{children:(0,E.jsx)(k,{heading:o,shopId:a.aA})}):(0,E.jsx)("div",{children:(0,E.jsx)(k,{heading:o,shopId:s})})})})}},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 i=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,a=e.status,s=e.time_zone;if(a.toUpperCase()==i.Z.LIVE.name)return{status:i.Z.LIVE,bannerText:" "+i.Z.LIVE.name+" ",timeToStartInMins:0};if(a.toUpperCase()==i.Z.UPCOMING.name){var o=new Date(r+" "+t+" "+s),c=(new Date(r+" "+n+" "+s),function(e){var t=new Date,n=(e.getTime()-t.getTime())/1e3,r=n/60,a=r/60,s=a/24;return n<=0?{status:i.Z.COMPLETED,bannerText:" "+i.Z.COMPLETED.name+" ",timeToStartInMins:0}:n>=1&&n<=30?{status:i.Z.UPCOMING,bannerText:"Starts in "+Math.round(n)+" sec ",timeToStartInMins:n/60}:r<60?{status:i.Z.UPCOMING,bannerText:"Starts in "+Math.round(r)+" min ",timeToStartInMins:r}:a<24?{status:i.Z.UPCOMING,bannerText:"Starts in "+Math.round(a)+" hr ",timeToStartInMins:60*a}:s<7?{status:i.Z.UPCOMING,bannerText:" "+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()]+" ",timeToStartInMins:60*s*24}:{status:i.Z.UPCOMING,bannerText:"Upcoming",timeToStartInMins:2880}}(o));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:i.Z.DEFAULT,bannerText:"live event",timeToStartInMins:2880}}}},3388:function(e,t,n){n.d(t,{OC:function(){return o},e8:function(){return a},kT:function(){return i},kW:function(){return s},xg:function(){return r}});const i=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)},a=function(e,t){if(null!=e)return e.filter((e=>1==i(e)))},s=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 o=function(e,t){var n;if(null==e)return[];if(!("eventsets"in e))return[];const i=null!==(n=e.eventsets[t])&&void 0!==n?n:null;return i?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(i):[]}},7376:function(e,t,n){n.d(t,{GF:function(){return r},PB:function(){return o},Z2:function(){return a},y4:function(){return s}});var i=n(795);function r(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o}=e;(0,i.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o})}function a(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o}=e;(0,i.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o})}function s(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o}=e;(0,i.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o})}function o(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o}=e;(0,i.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[986],{1291:function(e,t,n){n.r(t);var r=n(7313),i=n(6090),o=n(7616),l=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),a=n(2575),x=n(8866),p=n(7753),d=n(7129),s=n(4136),h=n(8631),c=(n(6066),n(9821)),u=n(8782),f=n(4862),m=n(6417);const g=(0,a.Z)({key:"whatmore-css-cv"});t.default=function(e){const[t,n,a]=(0,x.Z)(),[w,v,j,y,C]=(0,c.Z)(),b=(0,p.MO)("whatmoreCollectionsTileSize"),S="portrait"==t?0:(0,p.MO)("whatmoreLandscapePadding"),R=(0,p.MO)("whatmoreCollectionsTilesSpacing"),{whatmoreRootId:k}=(0,r.useContext)(s.I),P=e.events,L=e.onClick;delete o.ZP.styles.global;var Z=[];for(let r=0;r<P.length;)Z.push((0,m.jsx)(h.Z,{event:P[r],onClick:()=>{var e;e=P[r-1],L(e)},removeBorders:!0,borderRadius:"5%"},"collections-tile-"+r)),r+=1;return(0,m.jsx)(l.C,{value:g,children:(0,m.jsx)("div",{children:(0,m.jsx)(i.x,{theme:o.ZP,cssVarsRoot:k,resetCSS:!1,children:(0,m.jsx)(d.V.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:(0,m.jsx)("div",{style:{marginLeft:S+"px",marginRight:S+"px"},children:(0,m.jsx)(u.P,{renderElement:e=>(0,m.jsx)(m.Fragment,{children:e.eventData}),dataList:Z,spacing:R,defaultHeight:w*b*.01+"px",defaultWidth:v*b*.01+"px",retainAlreadyRenderedElements:!0,isScroll:f.gn})})})})})})}},7129:function(e,t,n){n.d(t,{V:function(){return r}});const r=(0,n(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},8631:function(e,t,n){var r=n(7313),i=n(9854),o=n(7753),l=(n(9111),n(123),n(9778),n(4892)),a=n(7129),x=n(9821),p=n(6417);t.Z=function(e){var t;const[n,d,s,h,c]=(0,x.Z)(),[u]=(0,o.j1)("whatmorePrimaryFont"),[f]=(0,o.j1)("whatmorePrimaryColor"),[m]=(0,o.j1)("whatmoreSecondaryColor"),[g]=(0,o.j1)("whatmoreShopId"),[w]=(0,o.j1)("whatmoreCollectionsTileSize"),[v,j]=(0,r.useState)(!1),y=(0,i.f6)(g);(0,r.useContext)(a.V);const C=e.event,b=e.onClick,S=e.removeBorders,R=n*w*.01,k=d*w*.01,P=null!==(t=e.borderRadius)&&void 0!==t?t:"0%";return(0,p.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:k+"px",marginLeft:S?"2px":"5px",marginRight:S?"2px":"5px",marginTop:S?"2px":"5px",marginBottom:S?"2px":"5px",cursor:"pointer"},onClick:()=>{j(!0),b(C)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:(0,p.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:P,overflow:"hidden",boxShadow:S?"":"0px 1px 1px 0px "+m+"50, 0px -1px 1px 0px "+y+"50, 1px 0px 1px 0px "+m+"50, -1px 0px 1px 0px "+y+"80, 1px -1px 1px 0px "+m+"80, -1px 1px 1px 0px "+y+"DA, 1px 1px 1px 0px "+m+"DA, -1px -1px 1px 0px "+y+"DA"},children:(0,p.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:R+"px",width:k+"px",borderRadius:P,backgroundColor:"gray",overflow:"hidden"},children:(0,p.jsx)(l.Z,{height:"100%",width:"100%",url:C.thumbnail_image,isPlaying:!0,event:C})})})})}},6066:function(e,t,n){var r=n(7313),i=n(9854),o=n(7753),l=(n(9111),n(123),n(9778),n(4892)),a=n(7129),x=n(9821),p=n(6417);t.Z=function(e){var t;const[n,d,s,h,c]=(0,x.Z)(),[u]=(0,o.j1)("whatmorePrimaryFont"),[f]=(0,o.j1)("whatmorePrimaryColor"),[m]=(0,o.j1)("whatmoreSecondaryColor"),[g]=(0,o.j1)("whatmoreShopId"),[w]=(0,o.j1)("whatmoreCollectionsTileSize"),[v,j]=(0,r.useState)(!1),y=(0,i.f6)(g);(0,r.useContext)(a.V);const C=e.event1,b=e.event2,S=e.onClick,R=.01*w,k=n*R,P=n*R*.5,L=d*R,Z=null!==(t=e.borderRadius)&&void 0!==t?t:"10%",M="15%",B=e.removeBorders;return(0,p.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",flexShrink:0,height:k+"px",width:L+"px",marginLeft:B?"2px":"5px",marginRight:B?"2px":"5px",marginTop:B?"2px":"5px",marginBottom:B?"2px":"5px",cursor:"pointer"},children:(0,p.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:B?"0px":Z,boxShadow:B?"":"0px 1px 1px 0px "+m+"50, 0px -1px 1px 0px "+y+"50, 1px 0px 1px 0px "+m+"50, -1px 0px 1px 0px "+y+"80, 1px -1px 1px 0px "+m+"80, -1px 1px 1px 0px "+y+"DA, 1px 1px 1px 0px "+m+"DA, -1px -1px 1px 0px "+y+"DA"},onClick:()=>{j(!0),S(C)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:[(0,p.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:P+"px",width:L+"px",borderTopLeftRadius:B?"0px":M,borderTopRightRadius:B?"0px":M,borderBottom:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,p.jsx)(l.Z,{height:"100%",width:"100%",url:C.thumbnail_image,isPlaying:!0,event:C})}),(0,p.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:P+"px",width:L+"px",borderBottomLeftRadius:B?"0px":M,borderBottomRightRadius:B?"0px":M,borderTop:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,p.jsx)(l.Z,{height:"100%",width:"100%",url:b.thumbnail_image,isPlaying:!0,event:b})})]})})}},8782:function(e,t,n){n.d(t,{P:function(){return x}});var r=n(3933),i=n(8866),o=n(7313),l=(n(123),n(6417));function a(e){const{ref:t,inView:n,entry:i}=(0,r.YD)({triggerOnce:e.retainAlreadyRenderedElements});return(0,l.jsx)("div",{ref:t,children:n?e.renderElement({eventData:e.data}):(0,l.jsx)("div",{style:{minWidth:e.defaultHeight,minHeight:e.defaultWidth}})})}function x(e){var t;const[n,r,x]=(0,i.Z)();return(0,o.useEffect)((()=>{function t(e){e.preventDefault(),e.stopPropagation(),n.scrollLeft+=e.deltaX,n.scrollLeft+=e.deltaY}const n=document.querySelector(".whatmore-carousel-horizontal-flex");return e.isScroll&&(null===n||void 0===n||n.addEventListener("wheel",t)),()=>{document.removeEventListener("wheel",t)}}),[]),(0,l.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",height:"fit-content",width:"100%",gap:null!==(t=e.spacing)&&void 0!==t?t:3,overflowX:"auto"},className:"whatmore-carousel-horizontal-flex",children:e.dataList.map(((t,n)=>(0,l.jsx)(a,{renderElement:e.renderElement,data:t,defaultHeight:e.defaultHeight,defaultWidth:e.defaultWidth,retainAlreadyRenderedElements:e.retainAlreadyRenderedElements},"key-"+n)))})}},9111:function(){},5892:function(){},4444:function(){},1811:function(){},6143:function(){},7850:function(){},9778:function(){}}]);
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[986],{1291:function(e,t,n){n.r(t);var r=n(7313),i=n(6090),o=n(7616),l=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),a=n(2575),x=n(8866),p=n(7753),d=n(7129),s=n(7592),h=n(8631),c=(n(6066),n(9821)),u=n(8782),f=n(4862),m=n(6417);const g=(0,a.Z)({key:"whatmore-css-cv"});t.default=function(e){const[t,n,a]=(0,x.Z)(),[w,v,j,y,C]=(0,c.Z)(),b=(0,p.MO)("whatmoreCollectionsTileSize"),S="portrait"==t?0:(0,p.MO)("whatmoreLandscapePadding"),R=(0,p.MO)("whatmoreCollectionsTilesSpacing"),{whatmoreRootId:k}=(0,r.useContext)(s.I),P=e.events,L=e.onClick;delete o.ZP.styles.global;var Z=[];for(let r=0;r<P.length;)Z.push((0,m.jsx)(h.Z,{event:P[r],onClick:()=>{var e;e=P[r-1],L(e)},removeBorders:!0,borderRadius:"5%"},"collections-tile-"+r)),r+=1;return(0,m.jsx)(l.C,{value:g,children:(0,m.jsx)("div",{children:(0,m.jsx)(i.x,{theme:o.ZP,cssVarsRoot:k,resetCSS:!1,children:(0,m.jsx)(d.V.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:(0,m.jsx)("div",{style:{marginLeft:S+"px",marginRight:S+"px"},children:(0,m.jsx)(u.P,{renderElement:e=>(0,m.jsx)(m.Fragment,{children:e.eventData}),dataList:Z,spacing:R,defaultHeight:w*b*.01+"px",defaultWidth:v*b*.01+"px",retainAlreadyRenderedElements:!0,isScroll:f.gn})})})})})})}},7129:function(e,t,n){n.d(t,{V:function(){return r}});const r=(0,n(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},8631:function(e,t,n){var r=n(7313),i=n(9854),o=n(7753),l=(n(9111),n(123),n(9778),n(4892)),a=n(7129),x=n(9821),p=n(6417);t.Z=function(e){var t;const[n,d,s,h,c]=(0,x.Z)(),[u]=(0,o.j1)("whatmorePrimaryFont"),[f]=(0,o.j1)("whatmorePrimaryColor"),[m]=(0,o.j1)("whatmoreSecondaryColor"),[g]=(0,o.j1)("whatmoreShopId"),[w]=(0,o.j1)("whatmoreCollectionsTileSize"),[v,j]=(0,r.useState)(!1),y=(0,i.f6)(g);(0,r.useContext)(a.V);const C=e.event,b=e.onClick,S=e.removeBorders,R=n*w*.01,k=d*w*.01,P=null!==(t=e.borderRadius)&&void 0!==t?t:"0%";return(0,p.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:k+"px",marginLeft:S?"2px":"5px",marginRight:S?"2px":"5px",marginTop:S?"2px":"5px",marginBottom:S?"2px":"5px",cursor:"pointer"},onClick:()=>{j(!0),b(C)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:(0,p.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:P,overflow:"hidden",boxShadow:S?"":"0px 1px 1px 0px "+m+"50, 0px -1px 1px 0px "+y+"50, 1px 0px 1px 0px "+m+"50, -1px 0px 1px 0px "+y+"80, 1px -1px 1px 0px "+m+"80, -1px 1px 1px 0px "+y+"DA, 1px 1px 1px 0px "+m+"DA, -1px -1px 1px 0px "+y+"DA"},children:(0,p.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:R+"px",width:k+"px",borderRadius:P,backgroundColor:"gray",overflow:"hidden"},children:(0,p.jsx)(l.Z,{height:"100%",width:"100%",url:C.thumbnail_image,isPlaying:!0,event:C})})})})}},6066:function(e,t,n){var r=n(7313),i=n(9854),o=n(7753),l=(n(9111),n(123),n(9778),n(4892)),a=n(7129),x=n(9821),p=n(6417);t.Z=function(e){var t;const[n,d,s,h,c]=(0,x.Z)(),[u]=(0,o.j1)("whatmorePrimaryFont"),[f]=(0,o.j1)("whatmorePrimaryColor"),[m]=(0,o.j1)("whatmoreSecondaryColor"),[g]=(0,o.j1)("whatmoreShopId"),[w]=(0,o.j1)("whatmoreCollectionsTileSize"),[v,j]=(0,r.useState)(!1),y=(0,i.f6)(g);(0,r.useContext)(a.V);const C=e.event1,b=e.event2,S=e.onClick,R=.01*w,k=n*R,P=n*R*.5,L=d*R,Z=null!==(t=e.borderRadius)&&void 0!==t?t:"10%",M="15%",B=e.removeBorders;return(0,p.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",flexShrink:0,height:k+"px",width:L+"px",marginLeft:B?"2px":"5px",marginRight:B?"2px":"5px",marginTop:B?"2px":"5px",marginBottom:B?"2px":"5px",cursor:"pointer"},children:(0,p.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:B?"0px":Z,boxShadow:B?"":"0px 1px 1px 0px "+m+"50, 0px -1px 1px 0px "+y+"50, 1px 0px 1px 0px "+m+"50, -1px 0px 1px 0px "+y+"80, 1px -1px 1px 0px "+m+"80, -1px 1px 1px 0px "+y+"DA, 1px 1px 1px 0px "+m+"DA, -1px -1px 1px 0px "+y+"DA"},onClick:()=>{j(!0),S(C)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:[(0,p.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:P+"px",width:L+"px",borderTopLeftRadius:B?"0px":M,borderTopRightRadius:B?"0px":M,borderBottom:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,p.jsx)(l.Z,{height:"100%",width:"100%",url:C.thumbnail_image,isPlaying:!0,event:C})}),(0,p.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:P+"px",width:L+"px",borderBottomLeftRadius:B?"0px":M,borderBottomRightRadius:B?"0px":M,borderTop:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,p.jsx)(l.Z,{height:"100%",width:"100%",url:b.thumbnail_image,isPlaying:!0,event:b})})]})})}},8782:function(e,t,n){n.d(t,{P:function(){return x}});var r=n(3933),i=n(8866),o=n(7313),l=(n(123),n(6417));function a(e){const{ref:t,inView:n,entry:i}=(0,r.YD)({triggerOnce:e.retainAlreadyRenderedElements});return(0,l.jsx)("div",{ref:t,children:n?e.renderElement({eventData:e.data}):(0,l.jsx)("div",{style:{minWidth:e.defaultHeight,minHeight:e.defaultWidth}})})}function x(e){var t;const[n,r,x]=(0,i.Z)();return(0,o.useEffect)((()=>{function t(e){e.preventDefault(),e.stopPropagation(),n.scrollLeft+=e.deltaX,n.scrollLeft+=e.deltaY}const n=document.querySelector(".whatmore-carousel-horizontal-flex");return e.isScroll&&(null===n||void 0===n||n.addEventListener("wheel",t)),()=>{document.removeEventListener("wheel",t)}}),[]),(0,l.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",height:"fit-content",width:"100%",gap:null!==(t=e.spacing)&&void 0!==t?t:3,overflowX:"auto"},className:"whatmore-carousel-horizontal-flex",children:e.dataList.map(((t,n)=>(0,l.jsx)(a,{renderElement:e.renderElement,data:t,defaultHeight:e.defaultHeight,defaultWidth:e.defaultWidth,retainAlreadyRenderedElements:e.retainAlreadyRenderedElements},"key-"+n)))})}},9111:function(){},5892:function(){},4444:function(){},1811:function(){},6143:function(){},7850:function(){},9778:function(){}}]);