whatmore-react-assets 1.0.679 → 1.0.680

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatmore-react-assets",
3
- "version": "1.0.679",
3
+ "version": "1.0.680",
4
4
  "description": "public repo for all whatmore js and css assets",
5
5
  "main": "whatmore.js",
6
6
  "scripts": {
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[582],{5582:function(e,t,a){a.r(t),a.d(t,{default:function(){return z}});var n=a(7753),i=a(7313),s=a(2860),r=a(499),o=a(4897),l=a(5160),c=a(9854),d=a(6967),u=a(8984),_=a(58),p=a(4669),m=a(513),h=a(9039),v=a(7300),f=a(6524),g=a(7643),y=a(778),b=a(6417);const w=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(240),a.e(367),a.e(351),a.e(926),a.e(950),a.e(303),a.e(891)]).then(a.bind(a,4095)))),S=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(240),a.e(367),a.e(576),a.e(950),a.e(364),a.e(530)]).then(a.bind(a,5523)))),I=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(240),a.e(367),a.e(423),a.e(926),a.e(950),a.e(249),a.e(622)]).then(a.bind(a,3827)))),k=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(240),a.e(367),a.e(423),a.e(926),a.e(950),a.e(249),a.e(965)]).then(a.bind(a,6071)))),T=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(240),a.e(367),a.e(423),a.e(926),a.e(950),a.e(708)]).then(a.bind(a,1291)))),E=i.lazy((()=>Promise.all([a.e(302),a.e(580)]).then(a.bind(a,3580)))),x=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(240),a.e(576),a.e(351),a.e(955),a.e(926),a.e(303),a.e(91),a.e(790)]).then(a.bind(a,6091)))),j=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(240),a.e(367),a.e(351),a.e(926),a.e(950),a.e(303),a.e(197)]).then(a.bind(a,1492)))),L=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(367),a.e(926),a.e(950),a.e(303),a.e(189)]).then(a.bind(a,9085)))),C=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(240),a.e(367),a.e(576),a.e(950),a.e(303),a.e(364),a.e(299)]).then(a.bind(a,4362)))),M=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(240),a.e(576),a.e(351),a.e(955),a.e(926),a.e(303),a.e(91),a.e(196)]).then(a.bind(a,4658)))),O=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(240),a.e(367),a.e(423),a.e(926),a.e(950),a.e(84)]).then(a.bind(a,8767))));var A=function(e){const[t]=(0,n.j1)("isInDesignMode"),[a]=(0,n.j1)("isDemoBrand"),[A]=(0,n.j1)("whatmoreTopBottomPadding"),[D]=(0,n.j1)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:N}=(0,i.useContext)(h.I),[P]=(0,n.j1)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:R}=(0,i.useContext)(h.I),G=(0,n.MO)("isLandingSharedLink"),q=(0,n.MO)("whatmoreShareTemplateId"),W=(0,n.MO)("whatmoreShareStoryId"),K=(0,n.MO)("whatmoreShareEventId"),[z,V]=(0,i.useState)(-1),[B,H]=(0,i.useState)(null);let U=e.events,F=[];if("template-banner-a"!==R){let e=0;for(let t=0;t<(null===U||void 0===U?void 0:U.length);t++){var Z,Y,J,X;const a=(null===U||void 0===U||null===(Z=U[t])||void 0===Z||null===(Y=Z.products)||void 0===Y?void 0:Y.length)>0&&(null===U||void 0===U||null===(J=U[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,v.B6)(U[t])&&!(0,v.WJ)(U[t])||a){if((0,v.yC)(null===U||void 0===U?void 0:U[t])){var{status:Q,bannerText:$,timeToStartInMins:ee}=o.Z.getEventStatus(U[t]);Q.name===r.Z.LIVE.name&&(F.push({...null===U||void 0===U?void 0:U[t],index:e}),e++)}}else F.push({...null===U||void 0===U?void 0:U[t],index:e}),e++}}var te=null;function ae(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,u.KE)()&&!n&&(0,_.QV)(),t||a||(async()=>{const t=te[e].events[0];(0,l.wh)(t),(0,p.Tc)(P,s.Xh,s.OW),(0,d.H4)(t.event_id,t.products,"homepage","stories")})();var r=0;null!=i&&te[e].events.map(((e,t)=>{e.event_id==i&&(r=t)})),V(r),H(e)}function ne(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,u.KE)()&&!n&&(0,_.QV)(),(0,v.B6)(e)||(0,v.WJ)(e))return t||a||(async()=>{(0,l.wh)(e),(0,p.Tc)(P,s.Xh,s.pR),(0,d.H4)(e.event_id,e.products,"homepage","carousel")})(),void V(e.index);const i=20;var{status:c,bannerText:m,timeToStartInMins:h}=o.Z.getEventStatus(e);h<=i&&c.name!==r.Z.LIVE.name?console.debug(" TODO : show toast on upcoming live event."):V(e.index)}function ie(e){return(0,b.jsx)(b.Fragment,{})}return N&&!te&&(te=function(e){var t=e.reduce(((e,t,a)=>{var n=t.storyset_id;return n in e?(e[n].total_events=e[n].total_events+1,e[n].events.push(t)):e[n]={id:t.storyset_id,title:t.storyset_name,thumbnail_image:t.storyset_thumbnail_image,total_events:1,start_event_index:a,events:[t]},e}),{}),a=Object.values(t);return a.sort(((e,t)=>e.start_event_index-t.start_event_index)),a}(F)),(0,i.useEffect)((()=>{G&&R==(0,f.zv)(q)&&(null!=W&&N?te.forEach(((e,t)=>{W==e.id&&ae(t,!0,K)})):null!=K&&F.forEach(((e,t)=>{K==e.event_id&&ne(e,!0)})))}),[]),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:{marginTop:(N?D:A)+"px",marginBottom:(N?D:A)+"px"},children:"template-b"===R?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(w,{events:F,onClick:ne,heading:e.heading})}):"template-a-1"===R?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(S,{events:F,onClick:ne,heading:e.heading})}):"template-feed-a"===R?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(C,{events:F,onClick:ne,heading:e.heading})}):"template-collections-a"===R||"template-c"===R?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!a,children:(0,b.jsx)(I,{events:F,index:z,setScreen:V,onClick:ne,heading:e.heading})})}):"template-collections-b"===R||"template-d"===R?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!a,children:(0,b.jsx)(k,{events:F,index:z,setScreen:V,onClick:ne,heading:e.heading})})}):"template-collections-c"===R||"template-e"===R?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!a,children:(0,b.jsx)(T,{events:F,index:z,setScreen:V,onClick:ne,heading:e.heading})})}):"template-collections-d"===R?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!a,children:(0,b.jsx)(w,{events:F,index:z,setScreen:V,onClick:ne,heading:e.heading})})}):"template-collections-e"===R?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!a,children:(0,b.jsx)(j,{events:F,index:z,setScreen:V,onClick:ne,heading:e.heading})})}):"template-collections-stories"===R?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!a,children:(0,b.jsx)(O,{events:F,index:z,setScreen:V,onClick:ne,heading:e.heading})})}):"template-f"===R?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!a,children:(0,b.jsx)(L,{events:F,onClick:ne,heading:e.heading})})}):"template-banner-a"===R?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.BANNER_WIDGET_VIEW,event:U[0],triggerFlag:!t&&!a,children:(0,b.jsx)(M,{events:U})})}):N?(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.STORIES_WIDGET_VIEW,triggerFlag:!t&&!a,children:(0,b.jsx)(E,{eventsStories:te,onClick:ae,template:R})})}):(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!a,children:(0,b.jsx)(j,{events:F,onClick:ne,heading:e.heading})})})}),-1==z||-2==z?(0,b.jsx)(ie,{}):(0,b.jsx)(i.Suspense,{children:(0,b.jsx)(g.u,{userInteractionType:y.K.EVENT_VIEW,event:U[z],productList:U[z].products,cta:U[z].cta,triggerFlag:!t&&!a,children:(0,b.jsx)(x,{events:F,index:z,onBack:function(e){(0,c.n2L)(P)&&(0,n.MO)("whatmoreAddedToCart")&&(0,m.D)(P,(()=>{}),100,window.location.hostname),V(-1)},slideDirection:N||"horizontal"===(0,c.e8z)(P)?"horizontal":"vertical",eventsStories:te,initialStoryIndex:B,template:R})})})]})};const D=function(e,t,a){const i=(0,n.MO)("whatmoreShopId");var s=t.reduce(((e,t,a)=>(t.products.map((e=>e.client_product_id)).forEach((t=>{t in e||(e[t]=!0)})),e)),{}),r=Object.keys(s);if("60960964855"==i&&"undefined"!=typeof fera&&"function"===typeof fera.getRatings){var o={};fera.getRatings(r,(e=>{new Promise(((t,a)=>{e.forEach((e=>{o[e.external_product_id]={avgRating:e.average,totalRatings:e.count}})),t(o)})).then((e=>a(e)))}))}if("23114481744"==i){const e="1e6MQXxzYR19mpw9Km6Dcm86";o={};fetch("https://api.juniphq.com/v1/products?filter[remote_ids]="+r.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=>a(e))).catch((e=>console.error(e)))}};var N=a(3388),P=a(7381),R=a(7376),G=a(7008);const q=[{event_id:2333,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:204,brand:"whatmore-dev",product_link:"https://www.aachho.com/products/sadabahaar-chanderi-suit-set",client_product_id:"6780183806018",price:"2800.00",currency:"INR",title:"Sadabahaar Chanderi Suit Set",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/2542/7564/products/5_72f81f91-e027-4497-9dfe-20480b862c54.jpg?v=1684509430",compare_price:"6999.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2022-12-27",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_b9c6f02e-6d5e-4250-97f8-71551c18c4e8.mp4",discount_coupon_image:"",event_hls_url:"https://d3syezql093hs1.cloudfront.net/whatmoredev/b9c6f02e-6d5e-4250-97f8-71551c18c4e8.mp4",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:1,event_state:"ready",poster_image:null,total_views:37,total_like:1,total_share:0,total_whatsapp:0},{event_id:2335,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:2108,brand:"whatmore-dev",product_link:"https://www.ordinaree.com/products/grease-black-designer-blackless-long-dress-for-women-online",client_product_id:"7210211311652",price:"5040.00",currency:"INR",title:"Grease Backless Long Dress",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0106/4897/7444/products/DSC_0377_45ee56eb-1240-4a17-9332-841809f132cf.jpg?v=1673001396",compare_price:"5600.00",product_metadata:null,product_status:"active"},{product_id:1955,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/black-anarkali-and-pant-with-dupatta",client_product_id:"7600010723466",price:"4125.00",currency:"INR",title:"BLACK ANARKALI AND PANT WITH DUPATTA",description:"BLACK ANARKALI AND PANT WITH DUPATTA",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/salwarsuitonlineindia-07285.jpg?v=1669434027&width=823",compare_price:"5200.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2022-12-27",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_e433898b-a5ec-4af6-b74f-2153ad609ffb.mp4",discount_coupon_image:"",event_hls_url:"https://d3syezql093hs1.cloudfront.net/whatmoredev/e433898b-a5ec-4af6-b74f-2153ad609ffb.mp4",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:4,event_state:"ready",poster_image:null,total_views:31,total_like:0,total_share:0,total_whatsapp:0},{event_id:2336,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:632,brand:"whatmore-dev",product_link:"https://www.meerasplussizestore.com/products/basil-brick-ajrakh-handblock-printed-kurta",client_product_id:"6864880173194",price:"876.00",currency:"INR",title:"Basil & Brick Ajrakh Handblock Printed Kurta",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0363/0075/0986/products/Dark-Green-Maroon-Pati-Ajrakh-Kurti-SCL_6948.jpg?v=1653729466",compare_price:"2190.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2022-12-27",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_5ddea9a1-4839-4db8-aa1c-843c14dd1cbb.mp4",discount_coupon_image:"",event_hls_url:"https://d3syezql093hs1.cloudfront.net/whatmoredev/5ddea9a1-4839-4db8-aa1c-843c14dd1cbb.mp4",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:5,event_state:"ready",poster_image:null,total_views:21,total_like:0,total_share:0,total_whatsapp:0},{event_id:2338,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:1728,brand:"whatmore-dev",product_link:"https://suta.in/products/ratri-kamal",client_product_id:"6916488003649",price:"4200.00",currency:"INR",title:"Ratri kamal",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0026/6544/7536/products/ratri-kamal-293774.jpg?v=1668084259",compare_price:null,product_metadata:null,product_status:"active"},{product_id:1732,brand:"whatmore-dev",product_link:"https://suta.in/products/kedar-ki-dor-blouse",client_product_id:"6625859502145",price:"4200.00",currency:"INR",title:"Kedar Ki Dor",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0026/6544/7536/files/DSC01009.jpg?v=1712326816",compare_price:null,product_metadata:null,product_status:"active"},{product_id:1736,brand:"whatmore-dev",product_link:"https://suta.in/products/swarna-kamal",client_product_id:"6916483317825",price:"4200.00",currency:"INR",title:"Swarna Kamal",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0026/6544/7536/products/swarna-kamal-472043.jpg?v=1668093054",compare_price:null,product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2022-12-27",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_496a26de-50cd-4823-8731-a97e0757efcf.mp4",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_496a26de-50cd-4823-8731-a97e0757efcf.mp4?v=1677477938",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:6,event_state:"ready",poster_image:null,total_views:28,total_like:0,total_share:0,total_whatsapp:0},{event_id:3255,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:3636,brand:"whatmore-dev",product_link:"https://buysohi.com/products/sohear8383",client_product_id:"7679599771864",price:"543.00",currency:"INR",title:"Gold Plated Pearl Stud",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0626/0218/2872/products/SS22_SOHEAR8383_1.jpg?v=1651755514",compare_price:"1699.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2023-01-24",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_b0045891-f042-47d4-a87a-187c96a1857e.mp4",discount_coupon_image:"",event_hls_url:"https://d3syezql093hs1.cloudfront.net/whatmoredev/b0045891-f042-47d4-a87a-187c96a1857e.mp4",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:7,event_state:"ready",poster_image:null,total_views:36,total_like:1,total_share:3,total_whatsapp:0},{event_id:3877,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:1955,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/black-anarkali-and-pant-with-dupatta",client_product_id:"7600010723466",price:"4125.00",currency:"INR",title:"BLACK ANARKALI AND PANT WITH DUPATTA",description:"BLACK ANARKALI AND PANT WITH DUPATTA",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/salwarsuitonlineindia-07285.jpg?v=1669434027&width=823",compare_price:"5200.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2023-02-03",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_CoH_liSAYOj.mp4",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_CoH_liSAYOj_b1999a62-134d-4301-9808-5d09e64a8979.mp4?v=1677477812",presenter_email:null,presenter_phone:null,room_id:null,event_type:"video",is_active:!0,rank:20,event_state:"ready",poster_image:null,total_views:16,total_like:0,total_share:0,total_whatsapp:0},{event_id:4188,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:4459,brand:"whatmore-dev",product_link:"https://theethnic.co/products/black-ruching-jacket-kurta-set",client_product_id:"8011323769076",price:"7499.00",currency:"INR",title:"Black Ruching Jacket Kurta Set",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0650/7937/8164/products/1_5102cd2e-a419-4682-abf1-d9619e6e96d7.jpg?v=1674275880",compare_price:"9999.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2023-02-07",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_c398aa0e-f0ac-4aba-91f5-4b1bcc5b1d51.mp4",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_7acda7d8-9762-47c7-9ee2-35e14db4c3fb.mp4?v=1677477803",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:23,event_state:"ready",poster_image:null,total_views:8,total_like:0,total_share:1,total_whatsapp:0},{event_id:28701,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[],cta:[{cta_id:364,cta_link:"https://lovechild.in/collections/fragrances",client_cta_id:"https://lovechild.in/collections/fragrances",cta_title:"Explore",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-01-10",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_20c05e5e-43cd-45cd-b1a4-5c942fb732d1.mp4",discount_coupon_image:"",event_hls_url:"https://d1zl4k1t5o4s75.cloudfront.net/whatmoredev/1080p_20c05e5e-43cd-45cd-b1a4-5c942fb732d1.mp4",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:57,event_state:"ready",poster_image:null,total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:28767,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:26392,brand:"whatmore-dev",product_link:"https://www.aachho.com/products/shimmering-mustard-sequin-georgette-suit-set",client_product_id:"6981740691522",price:"4199.00",currency:"INR",title:"Shimmering Mustard Sequin Georgette Suit Set",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/2542/7564/files/0H8A1426.jpg?v=1697874844",compare_price:"5999.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-01-11",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_4820fd98-246f-46b7-8af6-be1e949ff0e2.mp4?v=1704973716",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_4820fd98-246f-46b7-8af6-be1e949ff0e2.mp4?v=1704973708",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:58,event_state:"ready",poster_image:null,total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:48,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:24,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/evil-eye-adjustable-ring-gold",client_product_id:"6923301748874",price:"1250.00",currency:"INR",title:"Evil Eye adjustable ring - Gold",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/WhatsAppImage2020-09-21at11.38.01AM_1_700x_c51dd690-b6d8-4059-b3e0-13a2edf3feea.jpg?v=1656673474",compare_price:"1300",product_metadata:null,product_status:"active"},{product_id:23,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/rose-water-200ml",client_product_id:"6923319771274",price:"250.00",currency:"INR",title:"ROSE WATER 200ML",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/RoseWaterFront-01_250x_2x_c4cd34f3-625d-463a-bf36-3b159322b7ed.png?v=1656673764",compare_price:null,product_metadata:null,product_status:"active"},{product_id:21,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/honey-lemon-face-cleanser-200ml-1",client_product_id:"6923307647114",price:"1300.00",currency:"INR",title:"HONEY & LEMON FACE CLEANSER 200ML",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/C5D_9156-01_250x_2x_2f91ab64-e5a4-42f1-baf3-5f3ecffb2b50_1.png?v=1656673584",compare_price:"1340",product_metadata:null,product_status:"active"},{product_id:22,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/honey-lemon-face-cleanser-200ml-1",client_product_id:"6923317051530",price:"350.00",currency:"INR",title:"HONEY AND ROSE BODY CREAM 200ML",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/2_250x_2x_47ffd4b3-4100-4afb-b4c8-a09867e40ddb.png?v=1656673726",compare_price:null,product_metadata:null,product_status:"active"}],cta:[{cta_id:73,cta_link:"https://honeyandspice.in/collections/central-indian",client_cta_id:"https://honeyandspice.in/collections/central-indian",cta_title:"Shop Now",thumbnail_image:"",cta_type:""}],title:"BTS of HoneyAndSpice",description:"",brand:"whatmore-dev",scheduled_date:"2023-08-10",status:"upcoming",start_time:"19:00",end_time:"20:00",actual_start_time:null,actual_end_time:null,presenter_name:"Honey and Spice",thumbnail_image:"https://d28nus7q7qajdn.cloudfront.net/videos/whatmore-video-01942fec-68a5-4417-aa28-a0bff121a3ec.mp4",discount_coupon_image:"",event_hls_url:"https://d28nus7q7qajdn.cloudfront.net/videos/whatmore-video-2f0d18e6-a519-4e70-b8b3-529b90a04c28.mp4",presenter_email:null,presenter_phone:"+919888988889",room_id:null,event_type:"video",is_active:!0,rank:59,event_state:"ready",poster_image:null,total_views:13,total_like:0,total_share:0,total_whatsapp:0},{event_id:33888,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:26392,brand:"whatmore-dev",product_link:"https://www.aachho.com/products/shimmering-mustard-sequin-georgette-suit-set",client_product_id:"6981740691522",price:"4199.00",currency:"INR",title:"Shimmering Mustard Sequin Georgette Suit Set",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/2542/7564/files/0H8A1426.jpg?v=1697874844",compare_price:"5999.00",product_metadata:null,product_status:"active"}],cta:[{cta_id:402,cta_link:"https://custom.com",client_cta_id:"https://custom.com",cta_title:"custom",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-02-26",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_2b78b138-b18f-45e3-b8dc-6ce59075872f.mp4?v=1708937498",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_2b78b138-b18f-45e3-b8dc-6ce59075872f.mp4?v=1708937490",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:60,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_2b78b138-b18f-45e3-b8dc-6ce59075872f.webp?v=1708937505",total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:33890,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:26392,brand:"whatmore-dev",product_link:"https://www.aachho.com/products/shimmering-mustard-sequin-georgette-suit-set",client_product_id:"6981740691522",price:"4199.00",currency:"INR",title:"Shimmering Mustard Sequin Georgette Suit Set",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/2542/7564/files/0H8A1426.jpg?v=1697874844",compare_price:"5999.00",product_metadata:null,product_status:"active"}],cta:[{cta_id:402,cta_link:"https://custom.com",client_cta_id:"https://custom.com",cta_title:"custom",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-02-26",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_08ec5ed2-3aca-4d32-b51e-d3f88123cca8.mp4?v=1708937809",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_08ec5ed2-3aca-4d32-b51e-d3f88123cca8.mp4?v=1708937801",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:61,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_08ec5ed2-3aca-4d32-b51e-d3f88123cca8.webp?v=1708937816",total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:33947,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[],cta:[{cta_id:403,cta_link:"https://test.com",client_cta_id:"https://test.com",cta_title:"test",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-02-26",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_81844dee-68c7-425e-96bf-d3ac63c664e7.mp4?v=1708947355",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_81844dee-68c7-425e-96bf-d3ac63c664e7.mp4?v=1708947347",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:62,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_81844dee-68c7-425e-96bf-d3ac63c664e7.webp?v=1708947362",total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:41975,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[],cta:[{cta_id:482,cta_link:"https://tests.com",client_cta_id:"https://tests.com",cta_title:"",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-04-25",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_51411814-cff2-491f-aca3-303e84307049.mp4?v=1714033522",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_51411814-cff2-491f-aca3-303e84307049.mp4?v=1714033514",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:69,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_51411814-cff2-491f-aca3-303e84307049.webp?v=1714033531",total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:41976,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[],cta:[{cta_id:481,cta_link:"https://test1231.com",client_cta_id:"https://test1231.com",cta_title:" ",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-04-25",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_c2a47941-cafb-4765-ac6c-d6414679c6bd.mp4?v=1714033522",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_c2a47941-cafb-4765-ac6c-d6414679c6bd.mp4?v=1714033514",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:70,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_c2a47941-cafb-4765-ac6c-d6414679c6bd.webp?v=1714033530",total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:41977,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[],cta:[{cta_id:403,cta_link:"https://test.com",client_cta_id:"https://test.com",cta_title:"test",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-04-25",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_a0f26d1d-462b-4548-848c-806702cf9c95.mp4?v=1714033522",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_a0f26d1d-462b-4548-848c-806702cf9c95.mp4?v=1714033513",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:71,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_a0f26d1d-462b-4548-848c-806702cf9c95.webp?v=1714033530",total_views:0,total_like:0,total_share:0,total_whatsapp:0}];var W=function(e){const[t,a]=(0,i.useState)(),[r,o]=(0,i.useState)(),{whatmoreIsStoriesTemplate:l}=(0,i.useContext)(h.I),{whatmoreIsCollectionsTemplate:p}=(0,i.useContext)(h.I),{whatmoreIsBannerTemplate:m}=(0,i.useContext)(h.I),[v]=(0,n.j1)("whatmoreShopId"),[g]=(0,n.j1)("whatmoreCollectionId"),w=(0,n.MO)("whatmoreLandingLocationType"),S=(0,n.MO)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:I}=(0,i.useContext)(h.I),{whatmoreCollectionUrl:k}=(0,i.useContext)(h.I),[T]=(0,n.j1)("isInDesignMode"),[E]=(0,n.j1)("isDemoBrand"),x=(0,c.cZT)(v)?(0,c._uv)(v)?k:window.location.href.split(/[?#]/)[0]:g,[j,L]=(0,n.j1)("productRatings"),[C,M]=(0,i.useState)(!1);var O=(0,c.efR)(v)?s.Dm+"/v2/events/":s.Gc+"/v2/events/",W=(0,c.efR)(v)?s.Dm+"/get_eventset/":s.Gc+"/get_eventset/",K=(0,c.efR)(v)?s.Dm+"/v2/collection":s.Gc+"/v2/collection",z=(0,c.efR)(v)?s.Dm+"/v2/brand/"+v+"/product-events":s.Gc+"/v2/brand/"+v+"/product-events",V=e.shopId,B="live,upcoming";return(0,i.useEffect)((()=>{(0,d.hb)();const e=()=>{const e="_whatmore_bulk_events",t=JSON.parse(localStorage.getItem(e))||[];t&&t.length>0&&((0,G.K)(t),localStorage.removeItem(e))};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[]),(0,i.useEffect)((()=>{null==t||0==t.length||r||!(0,u.KE)()||(0,n.MO)("whatmoreVideoPlayerPoolInitiated")||(0,_.b5)(_.UD)}),[t]),(0,i.useEffect)((()=>{var e;if(w.startsWith("product")){var t=(0,n.MO)("whatmoreProductId");t=(0,c.iXA)(v)?function(e){return e.split(/[?#]/)[0]}(window.location.href):t,e=z.toString()+"?client_product_id="+t.toString()+"&status="+B.toString()+"&event_type=video"}else if(p||"invalid-url"!==k)e=K.toString()+"?store_id="+V.toString()+"&client_collection_id="+x;else if(m){const t=f.ls,a=(0,f.H1)(w);e=W.toString()+V.toString()+"?eventset_type="+t+"&source="+a+"&source_id="+v}else e=O.toString()+V.toString()+"?status="+B.toString()+"&is_active="+"true".toString()+(l?"&template_type=stories":"");fetch(e).then((e=>e.json())).then((e=>{if(m){const t=f.ls;return(0,N.OC)(e,t)}return(0,N.kW)(e,p||"invalid-url"!==k)})).then((e=>(S&&console.debug("initial received events size : "+e.length),l||p||m?e:(0,N.e8)(e,V)))).then((e=>(null!=e&&0!=e.length&&(0,c.LUY)(v)&&function(e,t,a){const i=setInterval((()=>{null===(0,n.MO)("productRatings")&&D(e,t,a)}),1e3);setTimeout((()=>{clearInterval(i)}),1e4)}(v,e,(e=>{L(e)})),e))).then((e=>{null==e||0==e.length||l||m||(0,c.NOv)(V,e),a((E||T)&&null==e?q:e),M(!0)})).catch((e=>{o(e.message)}))}),[]),(0,i.useEffect)((()=>{"index"===w?t&&t.length>0&&(0,R.PB)({userInteractionType:y.K.HOMEPAGE_VISITED,widgetSourceDetails:I}):"collection"===w&&(t&&t.length>0||(0,c.miB)(v))&&(0,R.PB)({userInteractionType:y.K.COLLECTION_PAGE_VISITED,widgetSourceDetails:I})}),[t]),(C&&(null==t||0==t.length)||r)&&h.$.forEach((e=>{var t,a,n,i;const s=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"]'),r=null!==(a=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!==a?a: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"]'),o=null!==(n=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!==n?n: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!==(i=e.querySelector('.whatmore-template-type[data-wh="template-banner-a"]'))&&void 0!==i?i:e.querySelector('.whatmore-template-type[data="template-banner-a"]'),c=e;(l||o||r||s)&&(r&&c||s&&c||l&&c||o&&c)&&(c.style.minHeight="0px")})),null==t||0==t.length||r?(0,b.jsx)("div",{}):(S&&(0,P.EI)(t),function(e){if(null!=e){var t=0;e.forEach((e=>{e.index=t++}))}}(t),S&&console.debug("final transformed events data : "+JSON.stringify(t)),S&&console.debug("valid events size : "+t.length),(0,b.jsx)(A,{heading:e.heading,events:t}))},K=a(3933);var z=function(e){const[t]=(0,n.j1)("whatmoreShopId"),[a]=(0,n.j1)("whatmoreHeading"),[s,r]=(0,i.useState)(["initial",window.pageYOffset]),[o,l]=(0,i.useState)(!1),d=(0,n.MO)("isLandingSharedLink");(0,i.useEffect)((()=>{if((0,p.ll)(t),!(0,c.wc0)(t))return;let e=window.pageYOffset,a=!1;const n=()=>{const t=window.pageYOffset;var n,i;Math.abs(t-e)<10?a=!1:(i=!0,r(n=[t>e?"scrolled-down":"scrolled-up",t]),n[1]>10&&l(i),e=t>0?t:0,a=!1)},i=()=>{a||(window.requestAnimationFrame(n),a=!0)};return window.addEventListener("scroll",i),()=>window.removeEventListener("scroll",i)}),[]);const[u,_,m]=(0,K.YD)({triggerOnce:!0});return(0,b.jsx)("div",{ref:u,style:{display:"block"},children:o||_||d||!(0,c.wc0)(t)?(0,b.jsx)(W,{heading:a,shopId:t}):(0,b.jsx)("div",{})})}},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,a){var n=a(499);t.Z=class{static getEventStatus(e){e.time_zone="GMT+5:30";var t=e.start_time+":00",a=e.end_time,i=e.scheduled_date,s=e.status,r=e.time_zone;if(s.toUpperCase()==n.Z.LIVE.name)return{status:n.Z.LIVE,bannerText:" "+n.Z.LIVE.name+" ",timeToStartInMins:0};if(s.toUpperCase()==n.Z.UPCOMING.name){var o=new Date(i+" "+t+" "+r),l=(new Date(i+" "+a+" "+r),function(e){var t=new Date,a=(e.getTime()-t.getTime())/1e3,i=a/60,s=i/60,r=s/24;return a<=0?{status:n.Z.COMPLETED,bannerText:" "+n.Z.COMPLETED.name+" ",timeToStartInMins:0}:a>=1&&a<=30?{status:n.Z.UPCOMING,bannerText:"Starts in "+Math.round(a)+" sec ",timeToStartInMins:a/60}:i<60?{status:n.Z.UPCOMING,bannerText:"Starts in "+Math.round(i)+" min ",timeToStartInMins:i}:s<24?{status:n.Z.UPCOMING,bannerText:"Starts in "+Math.round(s)+" hr ",timeToStartInMins:60*s}:r<7?{status:n.Z.UPCOMING,bannerText:" "+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()]+" ",timeToStartInMins:60*r*24}:{status:n.Z.UPCOMING,bannerText:"Upcoming",timeToStartInMins:2880}}(o));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:n.Z.DEFAULT,bannerText:"live event",timeToStartInMins:2880}}}},3388:function(e,t,a){a.d(t,{OC:function(){return o},e8:function(){return s},kT:function(){return n},kW:function(){return r},xg:function(){return i}});const n=function(e,t){return!((void 0==e.products||0==e.products.length)&&(void 0==e.cta||0==e.cta.length))},i=function(e,t){return!(void 0==e.products||0==e.products.length)},s=function(e,t){if(null!=e)return e.filter((e=>1==n(e)))},r=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 a;if(null==e)return[];if(!("eventsets"in e))return[];const n=null!==(a=e.eventsets[t])&&void 0!==a?a:null;return n?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(n):[]}},7376:function(e,t,a){a.d(t,{GF:function(){return i},PB:function(){return o},Z2:function(){return s},y4:function(){return r}});var n=a(733);function i(e){let{userInteractionType:t,userInteractionMetadata:a,widgetSourceDetails:i,event:s,productList:r,ctaList:o}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:a,widgetSourceDetails:i,event:s,productList:r,ctaList:o})}function s(e){let{userInteractionType:t,userInteractionMetadata:a,widgetSourceDetails:i,event:s,productList:r,ctaList:o}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:a,widgetSourceDetails:i,event:s,productList:r,ctaList:o})}function r(e){let{userInteractionType:t,userInteractionMetadata:a,widgetSourceDetails:i,event:s,productList:r,ctaList:o}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:a,widgetSourceDetails:i,event:s,productList:r,ctaList:o})}function o(e){let{userInteractionType:t,userInteractionMetadata:a,widgetSourceDetails:i,event:s,productList:r,ctaList:o}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:a,widgetSourceDetails:i,event:s,productList:r,ctaList:o})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[692],{3388:function(e,t,i){i.d(t,{OC:function(){return l},e8:function(){return r},kT:function(){return n},kW:function(){return a},xg:function(){return o}});const n=function(e,t){return!((void 0==e.products||0==e.products.length)&&(void 0==e.cta||0==e.cta.length))},o=function(e,t){return!(void 0==e.products||0==e.products.length)},r=function(e,t){if(null!=e)return e.filter((e=>1==n(e)))},a=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 l=function(e,t){var i;if(null==e)return[];if(!("eventsets"in e))return[];const n=null!==(i=e.eventsets[t])&&void 0!==i?i:null;return n?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(n):[]}},5380:function(e,t,i){i.d(t,{Z:function(){return v}});var n=i(4959),o=i(7313),r=i(4892),a=i(6805),l=i(7753),s=i(9821);var d=function(e){const[t,i,n,o,r]=(0,s.Z)(),[d]=(0,l.j1)("whatmoreEmbedAppVideoPlayerSizePortrait"),[c]=(0,l.j1)("whatmoreEmbedAppVideoPlayerSizeLandscape"),h=r[a.YP]===a.$w?c/100:d/100*1.2;return[t*h,i*h,r]},c=i(9723),h=i(9461),p=i.n(h),u=i(1195),x=i(7108),f=(i(7244),i(123),i(9854)),g=i(9039),m=i(6417);var v=function(e){var t;const i=o.useRef(null);var[s,h,v]=d();const{whatmoreUITheme:w}=(0,o.useContext)(g.I),[j]=(0,l.j1)("whatmoreEmbedAppVideoTitle"),[b]=(0,l.j1)("whatmoreEmbedAppPositionPortrait"),[y]=(0,l.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[S]=(0,l.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[I]=(0,l.j1)("whatmoreEmbedAppPositionLandscape"),[E]=(0,l.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[z]=(0,l.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),P=(0,l.MO)("whatmoreShopId");var k=b,C=y,_=S;v[a.YP]===a.$w&&(k=I,C=E,_=z);const[L,O]=(0,o.useState)(["initial",window.pageYOffset]),[A,M]=(0,o.useState)(!1),T=null!==(t=e.isSpotlight)&&void 0!==t&&t,V=v[a.YP]===a.$w?.7*(0,f.zGA)(P):(0,f.zGA)(P),B=T?V:1;s*=B,h*=B;const F=T?(0,f.G0o)(P):k,R=T?(0,f.X8j)(P):(0,f.lVn)(P),[Z,D]=(0,o.useState)(!T&&(0,f.eXi)(P));function N(e,t){O(e),e[1]<=100?M(!1):t!=A&&(M(t),D(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const i=()=>{const i=window.pageYOffset;Math.abs(i-e)<100||(N([i>e?"scrolled-down":"scrolled-up",i],!0),e=i>0?i:0),t=!1},n=()=>{t||(window.requestAnimationFrame(i),t=!0)};return window.addEventListener("scroll",n),()=>window.removeEventListener("scroll",n)}),[L]),(0,n.O3)({ref:i,handler:()=>{N(["scrolled-up",L[1]],!0)}});const Y=e.event,$=e.inVideoClick,G=e.closeClick,H=.3*h,W=.6*h,K=.1*h,U=.1*(.5*h),X="round"==w?"10px":"0px",q=(0,f.Z$A)(P);var J=!1,Q=0,ee=0;function te(e){J=e}return(0,m.jsx)("div",{children:Z&&!R?(0,m.jsx)(m.Fragment,{}):A&&R?(0,m.jsx)("div",{style:"left"===F?{left:"1px",bottom:T?(0,f.vnu)(P)+"px":_+"px",position:"fixed",zIndex:q}:{right:"5px",bottom:T?(0,f.vnu)(P)+"px":_+"px",position:"fixed",zIndex:q},children:(0,m.jsxs)("div",{onClick:()=>{N(["initial",L[1]],!1)},style:{margin:"1px",width:h+"px",height:s+"px"},className:"left"===F?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,m.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:X,overflow:"hidden"},children:(0,m.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,m.jsx)(r.Z,{url:Y.thumbnail_image,isPlaying:!1,event:Y})})}),(0,m.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,m.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,m.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,m.jsx)(u.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:H+"px"},style:{position:"relative",zIndex:1,left:U+"px",bottom:U+"px"},onClick:G})})}),(0,m.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,m.jsx)(x.Z,{sx:{color:"white",fontSize:2*H+"px",filter:"drop-shadow(0 0 15px black);"}})})]})})]})}):(0,m.jsx)(p(),{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,n;i=t.x,n=t.y,Q=i,ee=n},onDrag:(e,t)=>{te(!0)},onStop:(e,t)=>{J&&(Math.abs(t.x-Q)>5||Math.abs(t.y-ee)>5)?te(!1):$(Y)},children:(0,m.jsx)("div",{ref:i,style:"left"===F?{left:T?(0,f.$II)(P)+"px":C+"px",bottom:T?(0,f.vnu)(P)+"px":_+"px",position:"fixed",zIndex:q}:{right:T?(0,f.$II)(P)+"px":C+"px",bottom:T?(0,f.vnu)(P)+"px":_+"px",position:"fixed",zIndex:q},children:(0,m.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:h+"px",height:s+"px"}),className:"left"===F?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,m.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:X,overflow:"hidden",position:"relative"},children:(0,m.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,m.jsx)(r.Z,{url:Y.thumbnail_image,isMuted:!0,isPlaying:!0,event:Y})})}),(0,m.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,m.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,m.jsx)(u.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:H+"px"},onClick:G,style:{position:"relative",zIndex:1,left:K+"px",bottom:K+"px"}})}),(0,m.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,m.jsx)(c.Z,{sx:{color:(0,f.Ya_)(P),fontSize:W+"px",filter:"drop-shadow(0 0 15px black);"}})}),(0,m.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:X,borderBottomRightRadius:X,backgroundImage:j?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,m.jsxs)("p",{style:{textAlign:"center",color:"white",fontFamily:"Sans-serif",fontWeight:"semi-bold",fontSize:.4*H+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",j]})})]})})]})})})})}},2209:function(e,t,i){i.r(t);var n=i(7313),o=i(9854),r=i(2860),a=i(7753),l=i(5160),s=i(6967),d=i(5380),c=i(58),h=i(8984),p=i(4669),u=i(6870),x=i(9302),f=i(7381),g=i(2575),m=i(7300),v=i(6524),w=i(3388),j=i(7643),b=i(778),y=i(6417);const S=(0,g.Z)({key:"whatmore-css-wsv"}),I=n.lazy((()=>Promise.all([i.e(819),i.e(576),i.e(351),i.e(955),i.e(926),i.e(303),i.e(91),i.e(62)]).then(i.bind(i,6091))));t.default=function(e){const[t,i]=(0,n.useState)(),[g,E]=(0,n.useState)(),[z]=(0,a.j1)("isInDesignMode"),[P]=(0,a.j1)("isDemoBrand"),[k,C]=(0,n.useState)(-2),[_]=(0,a.j1)("whatmoreShopId"),L=(0,a.MO)("isLandingSharedLink"),O=(0,a.MO)("whatmoreShareTemplateId"),A=((0,a.MO)("whatmoreShareStoryId"),(0,a.MO)("whatmoreShareEventId")),M=(0,a.MO)("whatmoreLandingLocationType"),T=(0,a.MO)("whatmoreLoggingActive");var V=(0,o.efR)(_)?r.Dm+"/get_eventset/":r.Gc+"/get_eventset/";(0,n.useEffect)((()=>{(0,s.hb)()}),[]),(0,n.useEffect)((()=>{(0,p.ll)(_)}),[]),(0,n.useEffect)((()=>{null==t||0==t.length||g||!(0,h.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||(0,c.b5)(c.UD)}),[t]),(0,n.useEffect)((()=>{C(-1);const e=v.NX,t=(0,v.H1)(M),n=V.toString()+_.toString()+"?eventset_type="+e+"&source="+t+"&source_id="+_;fetch(n).then((e=>e.json())).then((t=>(0,w.OC)(t,e))).then((e=>(i(e),e))).catch((e=>{E(e.message)}))}),[]),(0,n.useEffect)((()=>{C(-2)}),[t]),(0,n.useEffect)((()=>{null==t||0==t.length||g||L&&"template-embed"==(0,v.zv)(O)&&null!=A&&t.forEach(((e,t)=>{A==e.event_id&&B(e,!0,t)}))}),[t]);const B=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if((0,h.KE)()&&!t&&(0,c.QV)(),(0,m.B6)(e)||(0,m.WJ)(e))return z||P||(async()=>{(0,l.wh)(e),(0,p.Tc)(_,r.h7,r.dU),(0,s.H4)(e.event_id,e.products,"spotlight","video_popup")})(),void C(i)};function F(){return(0,y.jsx)(y.Fragment,{})}return null==t||0==t.length||g?(0,y.jsx)("div",{}):(T&&(0,f.EI)(t),(0,o.B$L)(_)&&k<0&&null!==localStorage.getItem("_whatmore_spotlight_viewed")?(0,y.jsx)(y.Fragment,{}):(localStorage.setItem("_whatmore_spotlight_viewed",!0),(0,y.jsx)(x.C,{value:S,children:-1===k||0===t.length?(0,y.jsx)(F,{}):-2===k&&t.length>0?(0,y.jsx)("div",{children:(0,y.jsx)(j.u,{userInteractionType:b.K.SPOTLIGHT_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!z&&!P,children:(0,y.jsx)(d.Z,{event:t[0],inVideoClick:B,closeClick:e=>{e.stopPropagation(),C(-1)},isSpotlight:!0})})}):(0,y.jsx)("div",{children:(0,y.jsx)(n.Suspense,{children:(0,y.jsx)(j.u,{userInteractionType:b.K.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!z&&!P,children:(0,y.jsx)(I,{events:t,index:k,onBack:function(){(0,o.n2L)(_)&&(0,a.MO)("whatmoreAddedToCart")&&(0,u.D)(_,(()=>{}),100,window.location.hostname),C(-2)},template:"template-embed"})})})})})))}}}]);
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[692],{3388:function(e,t,i){i.d(t,{OC:function(){return l},e8:function(){return r},kT:function(){return n},kW:function(){return a},xg:function(){return o}});const n=function(e,t){return!((void 0==e.products||0==e.products.length)&&(void 0==e.cta||0==e.cta.length))},o=function(e,t){return!(void 0==e.products||0==e.products.length)},r=function(e,t){if(null!=e)return e.filter((e=>1==n(e)))},a=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 l=function(e,t){var i;if(null==e)return[];if(!("eventsets"in e))return[];const n=null!==(i=e.eventsets[t])&&void 0!==i?i:null;return n?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(n):[]}},5380:function(e,t,i){i.d(t,{Z:function(){return v}});var n=i(4959),o=i(7313),r=i(4892),a=i(6805),l=i(7753),s=i(9821);var d=function(e){const[t,i,n,o,r]=(0,s.Z)(),[d]=(0,l.j1)("whatmoreEmbedAppVideoPlayerSizePortrait"),[c]=(0,l.j1)("whatmoreEmbedAppVideoPlayerSizeLandscape"),h=r[a.YP]===a.$w?c/100:d/100*1.2;return[t*h,i*h,r]},c=i(9723),h=i(9461),p=i.n(h),u=i(1195),x=i(7108),f=(i(7244),i(123),i(9854)),g=i(9039),m=i(6417);var v=function(e){var t;const i=o.useRef(null);var[s,h,v]=d();const{whatmoreUITheme:w}=(0,o.useContext)(g.I),[j]=(0,l.j1)("whatmoreEmbedAppVideoTitle"),[b]=(0,l.j1)("whatmoreEmbedAppPositionPortrait"),[y]=(0,l.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[S]=(0,l.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[I]=(0,l.j1)("whatmoreEmbedAppPositionLandscape"),[E]=(0,l.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[z]=(0,l.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),P=(0,l.MO)("whatmoreShopId");var k=b,C=y,_=S;v[a.YP]===a.$w&&(k=I,C=E,_=z);const[L,O]=(0,o.useState)(["initial",window.pageYOffset]),[A,M]=(0,o.useState)(!1),T=null!==(t=e.isSpotlight)&&void 0!==t&&t,V=v[a.YP]===a.$w?.7*(0,f.zGA)(P):(0,f.zGA)(P),B=T?V:1;s*=B,h*=B;const F=T?(0,f.G0o)(P):k,R=T?(0,f.X8j)(P):(0,f.lVn)(P),[Z,D]=(0,o.useState)(!T&&(0,f.eXi)(P));function N(e,t){O(e),e[1]<=100?M(!1):t!=A&&(M(t),D(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const i=()=>{const i=window.pageYOffset;Math.abs(i-e)<100||(N([i>e?"scrolled-down":"scrolled-up",i],!0),e=i>0?i:0),t=!1},n=()=>{t||(window.requestAnimationFrame(i),t=!0)};return window.addEventListener("scroll",n),()=>window.removeEventListener("scroll",n)}),[L]),(0,n.O3)({ref:i,handler:()=>{N(["scrolled-up",L[1]],!0)}});const Y=e.event,$=e.inVideoClick,G=e.closeClick,H=.3*h,W=.6*h,K=.1*h,U=.1*(.5*h),X="round"==w?"10px":"0px",q=(0,f.Z$A)(P);var J=!1,Q=0,ee=0;function te(e){J=e}return(0,m.jsx)("div",{children:Z&&!R?(0,m.jsx)(m.Fragment,{}):A&&R?(0,m.jsx)("div",{style:"left"===F?{left:"1px",bottom:T?(0,f.vnu)(P)+"px":_+"px",position:"fixed",zIndex:q}:{right:"5px",bottom:T?(0,f.vnu)(P)+"px":_+"px",position:"fixed",zIndex:q},children:(0,m.jsxs)("div",{onClick:()=>{N(["initial",L[1]],!1)},style:{margin:"1px",width:h+"px",height:s+"px"},className:"left"===F?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,m.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:X,overflow:"hidden"},children:(0,m.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,m.jsx)(r.Z,{url:Y.thumbnail_image,isPlaying:!1,event:Y})})}),(0,m.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,m.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,m.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,m.jsx)(u.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:H+"px"},style:{position:"relative",zIndex:1,left:U+"px",bottom:U+"px"},onClick:G})})}),(0,m.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,m.jsx)(x.Z,{sx:{color:"white",fontSize:2*H+"px",filter:"drop-shadow(0 0 15px black);"}})})]})})]})}):(0,m.jsx)(p(),{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,n;i=t.x,n=t.y,Q=i,ee=n},onDrag:(e,t)=>{te(!0)},onStop:(e,t)=>{J&&(Math.abs(t.x-Q)>5||Math.abs(t.y-ee)>5)?te(!1):$(Y)},children:(0,m.jsx)("div",{ref:i,style:"left"===F?{left:T?(0,f.$II)(P)+"px":C+"px",bottom:T?(0,f.vnu)(P)+"px":_+"px",position:"fixed",zIndex:q}:{right:T?(0,f.$II)(P)+"px":C+"px",bottom:T?(0,f.vnu)(P)+"px":_+"px",position:"fixed",zIndex:q},children:(0,m.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:h+"px",height:s+"px"}),className:"left"===F?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,m.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:X,overflow:"hidden",position:"relative"},children:(0,m.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,m.jsx)(r.Z,{url:Y.thumbnail_image,isMuted:!0,isPlaying:!0,event:Y})})}),(0,m.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,m.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,m.jsx)(u.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:H+"px"},onClick:G,style:{position:"relative",zIndex:1,left:K+"px",bottom:K+"px"}})}),(0,m.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,m.jsx)(c.Z,{sx:{color:(0,f.Ya_)(P),fontSize:W+"px",filter:"drop-shadow(0 0 15px black);"}})}),(0,m.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:X,borderBottomRightRadius:X,backgroundImage:j?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,m.jsxs)("p",{style:{textAlign:"center",color:"white",fontFamily:"Sans-serif",fontWeight:"semi-bold",fontSize:.4*H+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",j]})})]})})]})})})})}},2209:function(e,t,i){i.r(t);var n=i(7313),o=i(9854),r=i(2860),a=i(7753),l=i(5160),s=i(6967),d=i(5380),c=i(58),h=i(8984),p=i(4669),u=i(513),x=i(9302),f=i(7381),g=i(2575),m=i(7300),v=i(6524),w=i(3388),j=i(7643),b=i(778),y=i(6417);const S=(0,g.Z)({key:"whatmore-css-wsv"}),I=n.lazy((()=>Promise.all([i.e(819),i.e(576),i.e(351),i.e(955),i.e(926),i.e(303),i.e(91),i.e(62)]).then(i.bind(i,6091))));t.default=function(e){const[t,i]=(0,n.useState)(),[g,E]=(0,n.useState)(),[z]=(0,a.j1)("isInDesignMode"),[P]=(0,a.j1)("isDemoBrand"),[k,C]=(0,n.useState)(-2),[_]=(0,a.j1)("whatmoreShopId"),L=(0,a.MO)("isLandingSharedLink"),O=(0,a.MO)("whatmoreShareTemplateId"),A=((0,a.MO)("whatmoreShareStoryId"),(0,a.MO)("whatmoreShareEventId")),M=(0,a.MO)("whatmoreLandingLocationType"),T=(0,a.MO)("whatmoreLoggingActive");var V=(0,o.efR)(_)?r.Dm+"/get_eventset/":r.Gc+"/get_eventset/";(0,n.useEffect)((()=>{(0,s.hb)()}),[]),(0,n.useEffect)((()=>{(0,p.ll)(_)}),[]),(0,n.useEffect)((()=>{null==t||0==t.length||g||!(0,h.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||(0,c.b5)(c.UD)}),[t]),(0,n.useEffect)((()=>{C(-1);const e=v.NX,t=(0,v.H1)(M),n=V.toString()+_.toString()+"?eventset_type="+e+"&source="+t+"&source_id="+_;fetch(n).then((e=>e.json())).then((t=>(0,w.OC)(t,e))).then((e=>(i(e),e))).catch((e=>{E(e.message)}))}),[]),(0,n.useEffect)((()=>{C(-2)}),[t]),(0,n.useEffect)((()=>{null==t||0==t.length||g||L&&"template-embed"==(0,v.zv)(O)&&null!=A&&t.forEach(((e,t)=>{A==e.event_id&&B(e,!0,t)}))}),[t]);const B=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if((0,h.KE)()&&!t&&(0,c.QV)(),(0,m.B6)(e)||(0,m.WJ)(e))return z||P||(async()=>{(0,l.wh)(e),(0,p.Tc)(_,r.h7,r.dU),(0,s.H4)(e.event_id,e.products,"spotlight","video_popup")})(),void C(i)};function F(){return(0,y.jsx)(y.Fragment,{})}return null==t||0==t.length||g?(0,y.jsx)("div",{}):(T&&(0,f.EI)(t),(0,o.B$L)(_)&&k<0&&null!==localStorage.getItem("_whatmore_spotlight_viewed")?(0,y.jsx)(y.Fragment,{}):(localStorage.setItem("_whatmore_spotlight_viewed",!0),(0,y.jsx)(x.C,{value:S,children:-1===k||0===t.length?(0,y.jsx)(F,{}):-2===k&&t.length>0?(0,y.jsx)("div",{children:(0,y.jsx)(j.u,{userInteractionType:b.K.SPOTLIGHT_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!z&&!P,children:(0,y.jsx)(d.Z,{event:t[0],inVideoClick:B,closeClick:e=>{e.stopPropagation(),C(-1)},isSpotlight:!0})})}):(0,y.jsx)("div",{children:(0,y.jsx)(n.Suspense,{children:(0,y.jsx)(j.u,{userInteractionType:b.K.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!z&&!P,children:(0,y.jsx)(I,{events:t,index:k,onBack:function(){(0,o.n2L)(_)&&(0,a.MO)("whatmoreAddedToCart")&&(0,u.D)(_,(()=>{}),100,window.location.hostname),C(-2)},template:"template-embed"})})})})})))}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[725],{513:function(e,t,n){n.d(t,{D:function(){return c}});const o=function(){fetch("/cart.json").then((e=>e.json())).then((e=>{fetch("/cart?view=item").then((e=>e.text())).then((t=>{const n=(new DOMParser).parseFromString(t,"text/html"),o=n.getElementById("CartDrawer"),r=document.getElementById("CartDrawer");o&&r&&(r.innerHTML=o.innerHTML);n.querySelector("#CartDrawer .totals__subtotal-value");const c=document.querySelector("cart-drawer");c&&c.classList.remove("is-empty");const i=document.querySelector("cart-drawer-items");i&&i.classList.remove("is-empty");const a=document.getElementById("cart-icon-bubble");if(a.querySelector(".cart-count-bubble")){a.querySelectorAll('.cart-count-bubble span[aria-hidden="true"]').forEach((t=>{t.textContent=e.item_count}))}else{const t=document.createElement("div");t.className="cart-count-bubble",t.innerHTML='\n <span aria-hidden="true">'.concat(e.item_count,'</span>\n <span class="visually-hidden">').concat(e.item_count," items</span>\n "),a.appendChild(t)}a.click();document.getElementById("CartDrawer-Overlay").addEventListener("click",(()=>{const e=document.querySelector("cart-drawer");e&&e.classList.remove("active"),document.body.classList.remove("overflow-hidden")}))}))}))},r=()=>{if(0!==Object.keys(cartContent).length){const e=document.querySelector("#halo-cart-sidebar .halo-sidebar-wrapper .previewCart-wrapper"),t='\n <div class="loading-overlay loading-overlay--custom">\n <div class="loading-overlay__spinner">\n <svg aria-hidden="true" focusable="false" role="presentation" class="spinner" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg">\n <circle class="path" fill="none" stroke-width="6" cx="33" cy="33" r="30"></circle>\n </svg>\n </div>\n </div>\n ',n="is-loading";e.classList.add(n),e.insertAdjacentHTML("afterbegin",t),fetch(window.routes.root+"/cart?view=ajax_side_cart",{method:"GET",cache:"no-cache"}).then((e=>e.text())).then((t=>{const o=(new DOMParser).parseFromString(t,"text/html");e.innerHTML=o.body.innerHTML,e.classList.remove(n)})).finally((()=>{document.body.querySelector("[data-cart-count]").textContent=cart.item_count,document.dispatchEvent(new CustomEvent("cart-update",{detail:cartContent}));document.getElementById("cart-icon-bubble").click()}))}},c=async function(e,t,n,c){if("STRNV8MHJTF"!=e&&"STR6HU283UZ"!=e&&"STR9T3LLEJB"!=e&&"STRWJMIOJNX"!=e&&"STRUDQ36YAC"!=e&&"STR1D5ONOZX"!=e){var i=await fetch("https://"+window.location.hostname+"/cart.js",{cache:"reload"}).then((e=>e.json()));if("57939755089"==e||"27358003275"==e||"63748341981"==e||"68237558034"==e||"63046287536"==e||"9734029408"==e||"83411075365"==e||"36300750986"==e||"16957273"==e||"9483952"==e||"57265094752"==e||"58538459329"==e||"80266658086"==e||"46784020646"==e||"52982579389"==e||"76291703063"==e)document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0,detail:{cart:i,openMiniCart:!0}}));else if("19506115"==e)window.PXUTheme.jsAjaxCart.showDrawer(),window.PXUTheme.jsAjaxCart.updateView();else if("54465429691"==e||"41096085665"==e)refreshCart(i),window.setTimeout((function(){$.fancybox.close(),$(".cart-button").click()}),500);else if("25427564"==e||"4243849314"==e||"57708314789"==e){(new theme.CartDrawer).open()}else if("62602182872"==e||"57362710572"==e)CartJS.getCart(),$(".block-cart").addClass("active");else if("83096174866"==e||"63791857821"==e||"70963003672"==e||"20157815"==e||"60492578980"==e||"12183765088"==e||"58546946211"==e||"42070737058"==e||"71321583919"==e||"68492624171"==e||"74541891876"==e||"21187677"==e||"74021110038"==e||"58193838255"==e||"25151799349"==e||"72651899165"==e||"52022313149"==e||"64983957725"==e)document.documentElement.dispatchEvent(new CustomEvent("ajaxProduct:added",{bubbles:!0,detail:{}})),document.documentElement.dispatchEvent(new CustomEvent("cart:open",{bubbles:!0,detail:{}}));else if("2665447536"==e||"51364757670"==e)fetch("/?section_id=cart-drawer").then((e=>e.text())).then((e=>{const t=(new DOMParser).parseFromString(e,"text/html").getElementById("cart-drawer").innerHTML;$("#cart-drawer").html(t),$('[aria-controls="cart-drawer"]')[0].click(),$(".header__cart-count .count-bubble ").html(cart.item_count).css("opacity",1)}));else if("57824805033"==e||"59504656436"==e||"58112966749"==e||"9989358"==e||"26958037078"==e)o();else if("80856187185"==e||"71256211737"==e)fetch("/cart?section_id=mini-cart").then((e=>e.text())).then((e=>{const t=(new DOMParser).parseFromString(e,"text/html").querySelector(".mini-cart__inner").innerHTML;$(".mini-cart__inner").html(t).addClass("active__drawer")})).catch((e=>{console.error(e)})),o();else if("61094723750"==e||"45034766485"==e)SLIDECART&&(SLIDECART_UPDATE(),SLIDECART_OPEN());else if("10272035"==e){const e=document.querySelector(".cart-drawer"),t=e.parentNode;t.classList.add("menu-opening"),t.setAttribute("open","open"),e.style.visibility="visible",e.style.transform="translate(0)"}else if("1972174947"==e||"55194878152"==e||"49198989466"==e)document.documentElement.dispatchEvent(new CustomEvent("cart:refresh:opend",{bubbles:!0,detail:{}}));else if("64463667449"==e||"63897370681"==e||"81998840121"==e||"70964478228"==e)document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0})),document.documentElement.dispatchEvent(new CustomEvent("cart:updated",{bubbles:!0,detail:{cart:i}})),document.getElementById("mini-cart").open=!0;else if("81545986363"==e)document.dispatchEvent(new CustomEvent("theme:cartchanged",{bubbles:!0})),document.dispatchEvent(new CustomEvent("theme:open-cart-drawer",{bubbles:!0}));else if("41346334884"==e||"74448077083"==e||"26562420"==e||"26759856318"==e)document.dispatchEvent(new CustomEvent("dispatch:cart-drawer:refresh")),document.dispatchEvent(new CustomEvent("dispatch:cart-drawer:open"));else if("6873415750"==e)document.dispatchEvent(new CustomEvent("cart:change",{bubbles:!0,detail:{cart:i}})),document.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0}));else if("59547517063"==e)(()=>{var e=document.querySelector("cart-notification")||document.querySelector("cart-drawer"),t=window.location.origin?window.location.origin+"/":window.location.protocol+"//"+window.location.host+"/";Shopify.locale.length>0&&(t+=Shopify.locale+"/"),null!==e&&"function"===typeof e.renderContents&&fetch(t+"cart?sections=cart-drawer,cart-icon-bubble",{method:"GET",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"}}).then((function(t){var n=document.querySelector("cart-drawer.drawer.is-empty");null!==n&&n.classList.remove("is-empty");try{return t.clone().json().then((function(t){try{var n={sections:t};e.renderContents(n)}catch(o){console.error(o)}}))}catch(o){console.error(o)}}))})();else if("61086662810"==e)(()=>{try{var e=document.querySelector("mini-cart")||document.querySelector("cart-drawer")||document.querySelector("product-form"),t=window.location.origin?window.location.origin+"/":window.location.protocol+"//"+window.location.host+"/";if(Shopify.locale.length>0&&(t+=Shopify.locale+"/"),null!==e&&"function"===typeof e.renderContents){var n=e.getSectionsToRender().map((e=>e.id));fetch(t+"cart?sections="+n.toString(),{method:"GET",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"}}).then((function(t){try{return t.clone().json().then((function(t){try{var n={sections:t};e.renderContents(n)}catch(o){console.error(o)}}))}catch(n){console.error(n)}}))}}catch(o){console.error(o)}})();else if("5827756145"==e){let e=document.getElementById("cart-config");e=JSON.parse(e.innerHTML||"{}"),"undefined"!==typeof window.Shopify&&"undefined"!==typeof window.Shopify.theme&&"undefined"!==typeof window.Shopify.theme.ajaxCart&&"function"===typeof window.Shopify.theme.ajaxCart.updateView&&(Shopify.theme.ajaxCart.updateView({cart_url:"/cart"},i),Shopify.theme.ajaxCart.showDrawer(e))}else"73454354741"==e?r():document.documentElement.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{}}));setTimeout(t,n)}else{console.log("Executing cart refresh script..");document.getElementById("whatsmorecart").value=Math.random()}}},58:function(e,t,n){n.d(t,{Bi:function(){return a},P7:function(){return d},QV:function(){return s},UD:function(){return r},b5:function(){return i}});var o=n(7753);const r=6;function c(){const e=(0,o.MO)("whatmoreVideoPlayerPool");var t=document.createElement("video");return t.setAttribute("class","whatmore-video-player whatmore-main-video-player-from-pool"),t.setAttribute("width","100%"),t.setAttribute("src","https://whatmore-other-assets.b-cdn.net/whatmore/dummy_for_video_pool_3s_muted_11kb.mp4"),t.muted=!0,t.setAttribute("height","100%"),t.setAttribute("preload","metadata"),t.setAttribute("loop",""),t.setAttribute("playsinline",""),t.setAttribute("x-webkit-airplay","allow"),t.controls=!1,e.appendChild(t),t}const i=function(e){for(let t=1;t<=e;t++)c();(0,o.bU)("whatmoreVideoPlayerPoolInitiated",!0)};const a=function(e,t,n,r){(0,o.MO)("whatmoreVideoPlayerPool");const c=function(e,t,n){var r=(c=(0,o.MO)("whatmoreVideoPlayerPool").children,c.length>0?c[0]:null);var c;if(!r)throw new Error("Whatmore :: not enough blessed videos available in video pool.");return r.setAttribute("src",e),r.muted=t,r.play().then((()=>{!n&&r.pause()})).catch((e=>{})),r}(t,n,r);return e.innerHTML="",e.appendChild(c),c},s=async function(){const e=(0,o.MO)("whatmoreVideoPlayerPool"),t=(0,o.MO)("whatmoreVideoPlayerPoolInitiated");t||i(r);var n=[];for(let o of e.children){o.muted=!0;var c=o.play().then((e=>(!t&&o.pause(),e)));n.push(c)}await Promise.all(n).then((e=>{(0,o.bU)("whatmoreVideoPlayerPoolBlessed",!0)})).catch((e=>{console.error("Whatmore :: Error while blessing "+e.message)}))},d=function(e){const t=(0,o.MO)("whatmoreVideoPlayerPool"),n=e.children[0];n.muted=!0,!n.paused&&n.pause(),t.appendChild(n)}},8984:function(e,t,n){n.d(t,{KE:function(){return c},gE:function(){return r}});var o=n(4862);const r=function(){return o.gn},c=function(){return r()||o.Q5}},7300:function(e,t,n){n.d(t,{B6:function(){return o},WJ:function(){return r},yC:function(){return c}});const o=function(e){return"video"===e.event_type},r=function(e){return"image"===e.event_type},c=function(e){return"livestream"===e.event_type}},5160:function(e,t,n){n.d(t,{$L:function(){return p},JX:function(){return l},Z6:function(){return a},lY:function(){return d},rp:function(){return h},uD:function(){return m},wh:function(){return i},wz:function(){return u},x0:function(){return s}});var o,r=n(2860);const c=null!==(o="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==o&&o;function i(e){c&&console.debug("updating user view count for event.");const t={event_id:e.event_id,increase_by:1};fetch(r.Gc+"/event/metrics/views",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(c&&console.debug("updating user view count response : HTTP "+e.status),e.json()))).then((e=>{c&&console.debug("updating user view count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating user view count user for event : ",e)}))}function a(e,t){c&&console.debug("updating like count for event.");const n={event_id:e.event_id,increase_by:t};fetch(r.Gc+"/event/metrics/like",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(c&&console.debug("updating like count response : HTTP "+e.status),e.json()))).then((e=>{c&&console.debug("updating like count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating like count user for event : ",e)}))}function s(e){c&&console.debug("updating share count for event.");const t={event_id:e.event_id,increase_by:1};fetch(r.Gc+"/event/metrics/share",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(c&&console.debug("updating share count response : HTTP "+e.status),e.json()))).then((e=>{c&&console.debug("updating share count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating share count user for event : ",e)}))}function d(e,t){c&&console.debug("updating wa click count for event.");const n={event_id:e.event_id,increase_by:t};fetch(r.Gc+"/event/metrics/whatsapp",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(c&&console.debug("updating whatsapp click count response : HTTP "+e.status),e.json()))).then((e=>{c&&console.debug("updating whatsapp click count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating whatsapp click count user for event : ",e)}))}function u(e,t){c&&console.debug("updating event-product click count for event {} and product {}.",e.event_id,t.product_id);const n={event_id:e.event_id,product_id:t.product_id,increase_by:1};fetch(r.Gc+"/event/metrics/clicks",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(c&&console.debug("updating user event-product click count response : HTTP "+e.status),e.json()))).then((e=>{c&&console.debug("updating user event-product click count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product click count for event {} : ",e.event_id,t)}))}function l(e,t,n){c&&console.debug("updating event-product add to cart count for event {} and product {}.",e.event_id,t.product_id);const o={event_id:e.event_id,product_id:t.product_id,increase_by:n};fetch(r.Gc+"/event/metrics/add_to_cart",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(o)}).then((e=>(c&&console.debug("updating user event-product add to cart count response : HTTP "+e.status),e.json()))).then((e=>{c&&console.debug("updating user event-product add to cart count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product add to cart count for event {} : ",e.event_id,t)}))}function p(e,t){c&&console.debug("updating event-product buy now count for event {} and product {}.",e.event_id,t.product_id);const n={event_id:e.event_id,product_id:t.product_id,increase_by:1};fetch(r.Gc+"/event/metrics/buy_now",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(c&&console.debug("updating user event-product buy now count response : HTTP "+e.status),e.json()))).then((e=>{c&&console.debug("updating user event-product buy now count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product buy now count for event {} : ",e.event_id,t)}))}async function h(){let{storeId:e="",eventId:t=0,productId:n="",variantId:o="",cartToken:i="",checkoutToken:a="",quantity:s=0,price:d="",actionType:u="",trackingId:l=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},p={event_id:t,product_id:n,cart_token:i,checkout_token:a,quantity:s,price:d,variant_id:o,action_type:u,tracking_id:l};c&&console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} ",t,n,o);const h=await fetch(r.Gc+"/cart-metadata/"+e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(p)}).then((e=>(c&&console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} : HTTP "+e.status),e.json()))).catch((e=>{console.error("error initiating ATC metadata event for eventId {}, productId {}, variantId {} : ",t,n,o)}));return h}function m(e){const t={event_id:e.event.event_id,cta_id:e.cta.cta_id,increase_by:1};fetch(r.Gc+"/event/metrics/cta/clicks",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(c&&console.debug("updating user cta click count response : HTTP "+e.status),e.json()))).then((e=>{c&&console.debug("updating user cta click count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating cta click count : ",e)}))}},4669:function(e,t,n){n.d(t,{Tc:function(){return h},ll:function(){return p}});var o,r=n(1824),c=n(7786),i=n(9854);const a="Whatmore Video Shopping",s=null!==(o="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==o&&o,d="Video View",u={carousel:"Carousel",stories:"Stories",video_popup:"Video Popup"},l={homepage:"Home Page",product_page:"Product Page"};async function p(e){if((0,i.DvX)(e)&&null!==(0,i.hfN)(e)&&(c.ZP.initialize((0,i.hfN)(e)),s&&console.debug("Whatmore: initialized GA4")),(0,i.hvq)(e)&&null!==(0,i.BHj)(e)){const t=(0,i.OQz)(e);r.ZP.initialize((0,i.BHj)(e),{useExistingGa:t}),s&&console.debug("Whatmore: initialized GA3")}}async function h(e,t,n){(0,i.hvq)(e)&&null!==(0,i.BHj)(e)&&(r.ZP.event({category:a,action:d,label:l[t]+":"+u[n]}),s&&console.debug("Whatmore: pushed view event to GA3")),(0,i.DvX)(e)&&null!==(0,i.hfN)(e)&&(c.ZP.event({category:a,action:d+":"+l[t]+":"+u[n],value:1,nonInteraction:!1}),s&&console.debug("Whatmore: pushed view event to GA4"))}},733:function(e,t,n){n.d(t,{s:function(){return p}});var o=n(7381),r=n(9854),c=n(7753),i=n(7008);const a=function(e,t,n,o){var r;return{landing_location_type:t.landingLocationType,template_type:t.templateType,whatmore_event:{id:e.event_id,eventset_id:null!==(r=e.eventset_id)&&void 0!==r?r:null,cta_list:o.map((e=>e.cta_id)),product_list:n.map((e=>e.product_id))}}};var s=n(778),d=n(2751),u=n(6967);const l=function(){return{user_id:(0,u.hb)(),session_id:(0,u.sQ)(),user_group:"group-a",user_agent:navigator.userAgent,store_id:(0,c.MO)("whatmoreShopId"),hostname:window.location.hostname,page_path:window.location.pathname,event_id:(0,d.x0)(),event_timestamp:Math.round((new Date).getTime()/1e3)}},p=function(){let{userInteractionType:e="",userInteractionMetadata:t={},widgetSourceDetails:n={},event:d="",productList:u=[],ctaList:p=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const h=(0,c.MO)("isInDesignMode"),m=(0,c.MO)("isDemoBrand"),v=(0,c.MO)("whatmoreShopId");if(!(0,r.AAS)(v)||m||h)return;const f="_whatmore_bulk_events",g=l(),w=(0,s.r)(e,t),_=a(d,n,u,p),y=(0,c.MO)("whatmoreLoggingActive"),b={...g,interaction_data:w,data:_},E=JSON.parse(localStorage.getItem(f))||[];if(E.push(b),localStorage.setItem(f,JSON.stringify(E)),y&&(0,o.EI)(b),clearTimeout(localStorage.getItem("_whatmore_bulk_timer_id")),E.length>=10)(0,i.K)(E),localStorage.removeItem(f);else if(E.length>0){let e=setTimeout((()=>{(0,i.K)(E),localStorage.removeItem(f)}),14e3);localStorage.setItem("_whatmore_bulk_timer_id",e)}}},778:function(e,t,n){n.d(t,{K:function(){return o},r:function(){return r}});const o=Object.freeze({EVENT_VIEW:"event-view",PRODUCT_CTA_VIEW:"product-cta-view",SHOPNOW_ATC_CLICKED:"shop-now-atc-clicked",SHOPNOW_BUYNOW_CLICKED:"shop-now-buy-now-clicked",PRODUCT_TILE_ATC_CLICKED:"product-tile-atc-clicked",PRODUCT_TILE_SHOPNOW_CLICKED:"product-tile-shopnow-clicked",VIDEO_LIKED:"video-liked",VIDEO_UNLIKED:"video-unliked",VIDEO_SHARE_CTA_CLICKED:"video-share-cta-clicked",VIDEO_MUTED:"video-muted",HOMEPAGE_CAROUSEL_SWIPED:"homepage-carousel-swiped",HOMEPAGE_VISITED:"homepage-visited",COLLECTION_PAGE_VISITED:"collection-page-visited",PDP_VISITED:"product-page-visited",HOMEPAGE_CAROUSEL_WIDGET_VIEW:"homepage-carousel-widget-view",BANNER_WIDGET_VIEW:"banner-widget-view",STORIES_WIDGET_VIEW:"stories-widget-view",COLLECTION_WIDGET_VIEW:"collection-widget-view",SPOTLIGHT_WIDGET_VIEW:"spotlight-widget-view",PDP_POPUP_WIDGET_VIEW:"pdp-popup-widget-view",VIDEO_PLAYBACK:"video-playback",SHOPNOW_CLICKED:"shopnow-clicked",WHATSAPP_ICON_CLICKED:"whatsapp-icon-clicked",BANNER_WIDGET_CLICKED:"banner-widget-clicked"}),r=function(e,t){return{name:e,metadata:JSON.stringify(t)}}},7643:function(e,t,n){n.d(t,{u:function(){return s}});var o=n(3933),r=n(9039),c=n(7313),i=n(733),a=n(6417);const s=function(e){var t;const{ref:n,inView:s,entry:d}=(0,o.YD)({triggerOnce:!1,threshold:null!==(t=e.threshold)&&void 0!==t?t:1}),{whatmoreWidgetSourceDetails:u}=(0,c.useContext)(r.I);return(0,c.useEffect)((()=>{var t,n,o,r;s&&null!==(t=e.triggerFlag)&&void 0!==t&&t&&(0,i.s)({userInteractionType:e.userInteractionType,userInteractionMetadata:null!==(n=e.userInteractionMetadata)&&void 0!==n?n:{},widgetSourceDetails:u,event:e.event,productList:null!==(o=e.productList)&&void 0!==o?o:[],ctaList:null!==(r=e.ctaList)&&void 0!==r?r:[]})}),[s]),(0,a.jsx)("div",{ref:n,children:e.children})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[74],{5380:function(e,t,i){i.d(t,{Z:function(){return g}});var n=i(4959),o=i(7313),a=i(4892),r=i(6805),s=i(7753),d=i(9821);var l=function(e){const[t,i,n,o,a]=(0,d.Z)(),[l]=(0,s.j1)("whatmoreEmbedAppVideoPlayerSizePortrait"),[c]=(0,s.j1)("whatmoreEmbedAppVideoPlayerSizeLandscape"),p=a[r.YP]===r.$w?c/100:l/100*1.2;return[t*p,i*p,a]},c=i(9723),p=i(9461),u=i.n(p),h=i(1195),w=i(7108),x=(i(7244),i(123),i(9854)),f=i(9039),v=i(6417);var g=function(e){var t;const i=o.useRef(null);var[d,p,g]=l();const{whatmoreUITheme:m}=(0,o.useContext)(f.I),[y]=(0,s.j1)("whatmoreEmbedAppVideoTitle"),[b]=(0,s.j1)("whatmoreEmbedAppPositionPortrait"),[j]=(0,s.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[I]=(0,s.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[S]=(0,s.j1)("whatmoreEmbedAppPositionLandscape"),[E]=(0,s.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[L]=(0,s.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),P=(0,s.MO)("whatmoreShopId");var z=b,_=j,k=I;g[r.YP]===r.$w&&(z=S,_=E,k=L);const[T,C]=(0,o.useState)(["initial",window.pageYOffset]),[D,M]=(0,o.useState)(!1),A=null!==(t=e.isSpotlight)&&void 0!==t&&t,V=g[r.YP]===r.$w?.7*(0,x.zGA)(P):(0,x.zGA)(P),O=A?V:1;d*=O,p*=O;const B=A?(0,x.G0o)(P):z,F=A?(0,x.X8j)(P):(0,x.lVn)(P),[Z,R]=(0,o.useState)(!A&&(0,x.eXi)(P));function N(e,t){C(e),e[1]<=100?M(!1):t!=D&&(M(t),R(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const i=()=>{const i=window.pageYOffset;Math.abs(i-e)<100||(N([i>e?"scrolled-down":"scrolled-up",i],!0),e=i>0?i:0),t=!1},n=()=>{t||(window.requestAnimationFrame(i),t=!0)};return window.addEventListener("scroll",n),()=>window.removeEventListener("scroll",n)}),[T]),(0,n.O3)({ref:i,handler:()=>{N(["scrolled-up",T[1]],!0)}});const G=e.event,W=e.inVideoClick,Y=e.closeClick,K=.3*p,U=.6*p,$=.1*p,H=.1*(.5*p),J="round"==m?"10px":"0px",X=(0,x.Z$A)(P);var q=!1,Q=0,ee=0;function te(e){q=e}return(0,v.jsx)("div",{children:Z&&!F?(0,v.jsx)(v.Fragment,{}):D&&F?(0,v.jsx)("div",{style:"left"===B?{left:"1px",bottom:A?(0,x.vnu)(P)+"px":k+"px",position:"fixed",zIndex:X}:{right:"5px",bottom:A?(0,x.vnu)(P)+"px":k+"px",position:"fixed",zIndex:X},children:(0,v.jsxs)("div",{onClick:()=>{N(["initial",T[1]],!1)},style:{margin:"1px",width:p+"px",height:d+"px"},className:"left"===B?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,v.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:J,overflow:"hidden"},children:(0,v.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,v.jsx)(a.Z,{url:G.thumbnail_image,isPlaying:!1,event:G})})}),(0,v.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,v.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,v.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,v.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,v.jsx)(h.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:K+"px"},style:{position:"relative",zIndex:1,left:H+"px",bottom:H+"px"},onClick:Y})})}),(0,v.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,v.jsx)(w.Z,{sx:{color:"white",fontSize:2*K+"px",filter:"drop-shadow(0 0 15px black);"}})})]})})]})}):(0,v.jsx)(u(),{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,n;i=t.x,n=t.y,Q=i,ee=n},onDrag:(e,t)=>{te(!0)},onStop:(e,t)=>{q&&(Math.abs(t.x-Q)>5||Math.abs(t.y-ee)>5)?te(!1):W(G)},children:(0,v.jsx)("div",{ref:i,style:"left"===B?{left:A?(0,x.$II)(P)+"px":_+"px",bottom:A?(0,x.vnu)(P)+"px":k+"px",position:"fixed",zIndex:X}:{right:A?(0,x.$II)(P)+"px":_+"px",bottom:A?(0,x.vnu)(P)+"px":k+"px",position:"fixed",zIndex:X},children:(0,v.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:p+"px",height:d+"px"}),className:"left"===B?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,v.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:J,overflow:"hidden",position:"relative"},children:(0,v.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,v.jsx)(a.Z,{url:G.thumbnail_image,isMuted:!0,isPlaying:!0,event:G})})}),(0,v.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,v.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,v.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,v.jsx)(h.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:K+"px"},onClick:Y,style:{position:"relative",zIndex:1,left:$+"px",bottom:$+"px"}})}),(0,v.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,v.jsx)(c.Z,{sx:{color:(0,x.Ya_)(P),fontSize:U+"px",filter:"drop-shadow(0 0 15px black);"}})}),(0,v.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:J,borderBottomRightRadius:J,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,v.jsxs)("p",{style:{textAlign:"center",color:"white",fontFamily:"Sans-serif",fontWeight:"semi-bold",fontSize:.4*K+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",y]})})]})})]})})})})}},4284:function(e,t,i){i.r(t);var n=i(7313),o=i(9854),a=i(2860),r=i(7753),s=i(5160),d=i(6967),l=i(5380),c=i(58),p=i(8984),u=i(4669),h=i(6870),w=i(9302),x=i(2575),f=i(7300),v=i(6524),g=i(9039),m=i(7376),y=i(778),b=i(7643),j=i(7008),I=i(7381),S=i(6417);const E=(0,x.Z)({key:"whatmore-css-ppv"}),L=n.lazy((()=>Promise.all([i.e(819),i.e(576),i.e(351),i.e(955),i.e(926),i.e(303),i.e(91),i.e(903)]).then(i.bind(i,6091))));function P(e){return e.split(/[?#]/)[0]}t.default=function(e){const[t,i]=(0,n.useState)(),[x,z]=(0,n.useState)(),[_]=(0,r.j1)("isInDesignMode"),[k]=(0,r.j1)("isDemoBrand"),[T]=(0,r.j1)("whatmoreEmbedAppUseVariant"),[C,D]=(0,n.useState)(-2),[M]=(0,r.j1)("whatmoreVariantId"),[A]=(0,r.j1)("whatmoreShopId");var[V]=(0,r.j1)("whatmoreProductId");const O=(0,r.MO)("isLandingSharedLink"),B=(0,r.MO)("whatmoreShareTemplateId"),F=(0,r.MO)("whatmoreShareEventId");V=(0,o.iXA)(A)?P(window.location.href):V;const[Z,R]=(0,n.useState)((()=>"true"===T?M:V));var N=a.Gc+"/v2/brand/"+A+"/product-events";const{whatmoreWidgetSourceDetails:G}=(0,n.useContext)(g.I);(0,n.useEffect)((()=>{(0,I.Oo)("Video shopping powered by Whatmore!"),(0,d.hb)();const e=()=>{const e="_whatmore_bulk_events",t=JSON.parse(localStorage.getItem(e))||[];t&&t.length>0&&((0,j.K)(t),localStorage.removeItem(e))};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[]),(0,n.useEffect)((()=>{(0,u.ll)(A)}),[]),(0,n.useEffect)((()=>{null==t||0==t.length||x||!(0,p.KE)()||(0,r.MO)("whatmoreVideoPlayerPoolInitiated")||(0,c.b5)(c.UD)}),[t]),(0,n.useEffect)((()=>{D(-1),fetch(N.toString()+"?client_product_id="+Z.toString()+"&status="+"upcoming".toString()+"&event_type=video").then((e=>e.json())).then((e=>e.events)).then((e=>(null!=e&&0!=e.length&&"47837511839"==A&&(0,o.d0x)(e),i(e),e))).then((e=>((0,o.yoE)(A)&&function(e,t){setTimeout((async()=>{const i=e.reduce(((e,t)=>[...e,...t.products]),[]).filter((e=>e.client_product_id==t))[0];if(!i||i.product_link==P(window.location.href))return;const n={product_id:i.product_id,product_link:P(window.location.href)};fetch(a.Gc+"/product",{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)})}),500)}(e,Z),e))).catch((e=>{z(e.message)}))}),[Z]),(0,n.useEffect)((()=>{var e,i;D(-2),(t&&t.length>0||(0,o.uO6)(A))&&(0,m.PB)({userInteractionType:y.K.PDP_VISITED,widgetSourceDetails:G,event:null===t||void 0===t?void 0:t[0],productList:null===t||void 0===t||null===(e=t[0])||void 0===e?void 0:e.products,ctaList:null===t||void 0===t||null===(i=t[0])||void 0===i?void 0:i.cta})}),[t]),(0,n.useEffect)((()=>{let e=history.pushState;history.pushState=function(){let t=e.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),t};let t=history.replaceState;history.replaceState=function(){let e=t.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),e},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))})),window.addEventListener("locationchange",(function(){if("true"===T){const e=function(e){for(var t=window.location.search.substring(1).split("&"),i=0;i<t.length;i++){var n=t[i].split("=");if(n[0]==e)return n[1]}return!1}("variant");e&&""!==e&&R(e)}}))}),[]),(0,n.useEffect)((()=>{null==t||0==t.length||x||O&&"template-embed"==(0,v.zv)(B)&&null!=F&&t.forEach(((e,t)=>{F==e.event_id&&W(e,!0,t)}))}),[t]);const W=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if((0,p.KE)()&&!t&&(0,c.QV)(),(0,f.B6)(e)||(0,f.WJ)(e))return _||k||(async()=>{(0,s.wh)(e),(0,u.Tc)(A,a.h7,a.dU),(0,d.H4)(e.event_id,e.products,"product_page","video_popup")})(),void D(i)};function Y(){return(0,S.jsx)(S.Fragment,{})}return null==t||0==t.length||x?(0,S.jsx)("div",{}):(0,S.jsx)(w.C,{value:E,children:"no-product"===Z||-1===C||0===t.length?(0,S.jsx)(Y,{}):-2===C&&t.length>0?(0,S.jsx)("div",{children:(0,S.jsx)(b.u,{userInteractionType:y.K.PDP_POPUP_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!_&&!k,children:(0,S.jsx)(l.Z,{event:t[0],inVideoClick:W,closeClick:e=>{e.stopPropagation(),D(-1)}})})}):(0,S.jsx)("div",{children:(0,S.jsx)(n.Suspense,{children:(0,S.jsx)(b.u,{userInteractionType:y.K.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!_&&!k,children:(0,S.jsx)(L,{events:t,index:C,onBack:function(){(0,o.n2L)(A)&&(0,r.MO)("whatmoreAddedToCart")&&(0,h.D)(A,(()=>{}),100,window.location.hostname),D(-2)},template:"template-product-page"})})})})})}},7376:function(e,t,i){i.d(t,{GF:function(){return o},PB:function(){return s},Z2:function(){return a},y4:function(){return r}});var n=i(733);function o(e){let{userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s})}function a(e){let{userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s})}function r(e){let{userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s})}function s(e){let{userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s})}}}]);
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[74],{5380:function(e,t,i){i.d(t,{Z:function(){return g}});var n=i(4959),o=i(7313),a=i(4892),r=i(6805),s=i(7753),d=i(9821);var l=function(e){const[t,i,n,o,a]=(0,d.Z)(),[l]=(0,s.j1)("whatmoreEmbedAppVideoPlayerSizePortrait"),[c]=(0,s.j1)("whatmoreEmbedAppVideoPlayerSizeLandscape"),p=a[r.YP]===r.$w?c/100:l/100*1.2;return[t*p,i*p,a]},c=i(9723),p=i(9461),u=i.n(p),h=i(1195),w=i(7108),x=(i(7244),i(123),i(9854)),f=i(9039),v=i(6417);var g=function(e){var t;const i=o.useRef(null);var[d,p,g]=l();const{whatmoreUITheme:m}=(0,o.useContext)(f.I),[y]=(0,s.j1)("whatmoreEmbedAppVideoTitle"),[b]=(0,s.j1)("whatmoreEmbedAppPositionPortrait"),[j]=(0,s.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[I]=(0,s.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[S]=(0,s.j1)("whatmoreEmbedAppPositionLandscape"),[E]=(0,s.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[L]=(0,s.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),P=(0,s.MO)("whatmoreShopId");var z=b,_=j,k=I;g[r.YP]===r.$w&&(z=S,_=E,k=L);const[T,C]=(0,o.useState)(["initial",window.pageYOffset]),[D,M]=(0,o.useState)(!1),A=null!==(t=e.isSpotlight)&&void 0!==t&&t,V=g[r.YP]===r.$w?.7*(0,x.zGA)(P):(0,x.zGA)(P),O=A?V:1;d*=O,p*=O;const B=A?(0,x.G0o)(P):z,F=A?(0,x.X8j)(P):(0,x.lVn)(P),[Z,R]=(0,o.useState)(!A&&(0,x.eXi)(P));function N(e,t){C(e),e[1]<=100?M(!1):t!=D&&(M(t),R(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const i=()=>{const i=window.pageYOffset;Math.abs(i-e)<100||(N([i>e?"scrolled-down":"scrolled-up",i],!0),e=i>0?i:0),t=!1},n=()=>{t||(window.requestAnimationFrame(i),t=!0)};return window.addEventListener("scroll",n),()=>window.removeEventListener("scroll",n)}),[T]),(0,n.O3)({ref:i,handler:()=>{N(["scrolled-up",T[1]],!0)}});const G=e.event,W=e.inVideoClick,Y=e.closeClick,K=.3*p,U=.6*p,$=.1*p,H=.1*(.5*p),J="round"==m?"10px":"0px",X=(0,x.Z$A)(P);var q=!1,Q=0,ee=0;function te(e){q=e}return(0,v.jsx)("div",{children:Z&&!F?(0,v.jsx)(v.Fragment,{}):D&&F?(0,v.jsx)("div",{style:"left"===B?{left:"1px",bottom:A?(0,x.vnu)(P)+"px":k+"px",position:"fixed",zIndex:X}:{right:"5px",bottom:A?(0,x.vnu)(P)+"px":k+"px",position:"fixed",zIndex:X},children:(0,v.jsxs)("div",{onClick:()=>{N(["initial",T[1]],!1)},style:{margin:"1px",width:p+"px",height:d+"px"},className:"left"===B?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,v.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:J,overflow:"hidden"},children:(0,v.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,v.jsx)(a.Z,{url:G.thumbnail_image,isPlaying:!1,event:G})})}),(0,v.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,v.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,v.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,v.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,v.jsx)(h.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:K+"px"},style:{position:"relative",zIndex:1,left:H+"px",bottom:H+"px"},onClick:Y})})}),(0,v.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,v.jsx)(w.Z,{sx:{color:"white",fontSize:2*K+"px",filter:"drop-shadow(0 0 15px black);"}})})]})})]})}):(0,v.jsx)(u(),{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,n;i=t.x,n=t.y,Q=i,ee=n},onDrag:(e,t)=>{te(!0)},onStop:(e,t)=>{q&&(Math.abs(t.x-Q)>5||Math.abs(t.y-ee)>5)?te(!1):W(G)},children:(0,v.jsx)("div",{ref:i,style:"left"===B?{left:A?(0,x.$II)(P)+"px":_+"px",bottom:A?(0,x.vnu)(P)+"px":k+"px",position:"fixed",zIndex:X}:{right:A?(0,x.$II)(P)+"px":_+"px",bottom:A?(0,x.vnu)(P)+"px":k+"px",position:"fixed",zIndex:X},children:(0,v.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:p+"px",height:d+"px"}),className:"left"===B?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,v.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:J,overflow:"hidden",position:"relative"},children:(0,v.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,v.jsx)(a.Z,{url:G.thumbnail_image,isMuted:!0,isPlaying:!0,event:G})})}),(0,v.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,v.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,v.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,v.jsx)(h.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:K+"px"},onClick:Y,style:{position:"relative",zIndex:1,left:$+"px",bottom:$+"px"}})}),(0,v.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,v.jsx)(c.Z,{sx:{color:(0,x.Ya_)(P),fontSize:U+"px",filter:"drop-shadow(0 0 15px black);"}})}),(0,v.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:J,borderBottomRightRadius:J,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,v.jsxs)("p",{style:{textAlign:"center",color:"white",fontFamily:"Sans-serif",fontWeight:"semi-bold",fontSize:.4*K+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",y]})})]})})]})})})})}},4284:function(e,t,i){i.r(t);var n=i(7313),o=i(9854),a=i(2860),r=i(7753),s=i(5160),d=i(6967),l=i(5380),c=i(58),p=i(8984),u=i(4669),h=i(513),w=i(9302),x=i(2575),f=i(7300),v=i(6524),g=i(9039),m=i(7376),y=i(778),b=i(7643),j=i(7008),I=i(7381),S=i(6417);const E=(0,x.Z)({key:"whatmore-css-ppv"}),L=n.lazy((()=>Promise.all([i.e(819),i.e(576),i.e(351),i.e(955),i.e(926),i.e(303),i.e(91),i.e(903)]).then(i.bind(i,6091))));function P(e){return e.split(/[?#]/)[0]}t.default=function(e){const[t,i]=(0,n.useState)(),[x,z]=(0,n.useState)(),[_]=(0,r.j1)("isInDesignMode"),[k]=(0,r.j1)("isDemoBrand"),[T]=(0,r.j1)("whatmoreEmbedAppUseVariant"),[C,D]=(0,n.useState)(-2),[M]=(0,r.j1)("whatmoreVariantId"),[A]=(0,r.j1)("whatmoreShopId");var[V]=(0,r.j1)("whatmoreProductId");const O=(0,r.MO)("isLandingSharedLink"),B=(0,r.MO)("whatmoreShareTemplateId"),F=(0,r.MO)("whatmoreShareEventId");V=(0,o.iXA)(A)?P(window.location.href):V;const[Z,R]=(0,n.useState)((()=>"true"===T?M:V));var N=a.Gc+"/v2/brand/"+A+"/product-events";const{whatmoreWidgetSourceDetails:G}=(0,n.useContext)(g.I);(0,n.useEffect)((()=>{(0,I.Oo)("Video shopping powered by Whatmore!"),(0,d.hb)();const e=()=>{const e="_whatmore_bulk_events",t=JSON.parse(localStorage.getItem(e))||[];t&&t.length>0&&((0,j.K)(t),localStorage.removeItem(e))};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[]),(0,n.useEffect)((()=>{(0,u.ll)(A)}),[]),(0,n.useEffect)((()=>{null==t||0==t.length||x||!(0,p.KE)()||(0,r.MO)("whatmoreVideoPlayerPoolInitiated")||(0,c.b5)(c.UD)}),[t]),(0,n.useEffect)((()=>{D(-1),fetch(N.toString()+"?client_product_id="+Z.toString()+"&status="+"upcoming".toString()+"&event_type=video").then((e=>e.json())).then((e=>e.events)).then((e=>(null!=e&&0!=e.length&&"47837511839"==A&&(0,o.d0x)(e),i(e),e))).then((e=>((0,o.yoE)(A)&&function(e,t){setTimeout((async()=>{const i=e.reduce(((e,t)=>[...e,...t.products]),[]).filter((e=>e.client_product_id==t))[0];if(!i||i.product_link==P(window.location.href))return;const n={product_id:i.product_id,product_link:P(window.location.href)};fetch(a.Gc+"/product",{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)})}),500)}(e,Z),e))).catch((e=>{z(e.message)}))}),[Z]),(0,n.useEffect)((()=>{var e,i;D(-2),(t&&t.length>0||(0,o.uO6)(A))&&(0,m.PB)({userInteractionType:y.K.PDP_VISITED,widgetSourceDetails:G,event:null===t||void 0===t?void 0:t[0],productList:null===t||void 0===t||null===(e=t[0])||void 0===e?void 0:e.products,ctaList:null===t||void 0===t||null===(i=t[0])||void 0===i?void 0:i.cta})}),[t]),(0,n.useEffect)((()=>{let e=history.pushState;history.pushState=function(){let t=e.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),t};let t=history.replaceState;history.replaceState=function(){let e=t.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),e},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))})),window.addEventListener("locationchange",(function(){if("true"===T){const e=function(e){for(var t=window.location.search.substring(1).split("&"),i=0;i<t.length;i++){var n=t[i].split("=");if(n[0]==e)return n[1]}return!1}("variant");e&&""!==e&&R(e)}}))}),[]),(0,n.useEffect)((()=>{null==t||0==t.length||x||O&&"template-embed"==(0,v.zv)(B)&&null!=F&&t.forEach(((e,t)=>{F==e.event_id&&W(e,!0,t)}))}),[t]);const W=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if((0,p.KE)()&&!t&&(0,c.QV)(),(0,f.B6)(e)||(0,f.WJ)(e))return _||k||(async()=>{(0,s.wh)(e),(0,u.Tc)(A,a.h7,a.dU),(0,d.H4)(e.event_id,e.products,"product_page","video_popup")})(),void D(i)};function Y(){return(0,S.jsx)(S.Fragment,{})}return null==t||0==t.length||x?(0,S.jsx)("div",{}):(0,S.jsx)(w.C,{value:E,children:"no-product"===Z||-1===C||0===t.length?(0,S.jsx)(Y,{}):-2===C&&t.length>0?(0,S.jsx)("div",{children:(0,S.jsx)(b.u,{userInteractionType:y.K.PDP_POPUP_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!_&&!k,children:(0,S.jsx)(l.Z,{event:t[0],inVideoClick:W,closeClick:e=>{e.stopPropagation(),D(-1)}})})}):(0,S.jsx)("div",{children:(0,S.jsx)(n.Suspense,{children:(0,S.jsx)(b.u,{userInteractionType:y.K.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!_&&!k,children:(0,S.jsx)(L,{events:t,index:C,onBack:function(){(0,o.n2L)(A)&&(0,r.MO)("whatmoreAddedToCart")&&(0,h.D)(A,(()=>{}),100,window.location.hostname),D(-2)},template:"template-product-page"})})})})})}},7376:function(e,t,i){i.d(t,{GF:function(){return o},PB:function(){return s},Z2:function(){return a},y4:function(){return r}});var n=i(733);function o(e){let{userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s})}function a(e){let{userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s})}function r(e){let{userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s})}function s(e){let{userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s})}}}]);