whatmore-react-assets 1.0.899 → 1.0.901

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.899",
3
+ "version": "1.0.901",
4
4
  "description": "public repo for all whatmore js and css assets",
5
5
  "main": "whatmore.js",
6
6
  "scripts": {
@@ -69,11 +69,11 @@
69
69
  0% {
70
70
  transform: translateY(100%);
71
71
  }
72
- `} 0.5s`;return(0,x.jsx)(s.Kq,{bg:"black",height:"100%",opacity:"100%",width:"100%",borderTopRadius:"xl",animation:w,justifyContent:"center",alignItems:"center",children:(0,x.jsxs)(s.xu,{width:"100%",height:"100%",children:[(0,x.jsx)(g.Ee,{width:"100%",height:"auto",src:(0,c.Zb8)(a)?d:(0,c.KM)(a),objectFit:"contain",borderTopRadius:"xl"}),(0,x.jsx)(s.Kq,{width:"100%",height:"100%",direction:"column",justifyContent:"flex-start",style:{position:"relative",zIndex:1,bottom:"90%"},className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",onClick:t=>{t.stopPropagation(),m(!1)},cursor:"pointer",padding:"4px",children:(0,x.jsx)(P.Z,{sx:{boxShadow:3,color:"white !important",fontSize:1.6*f,filter:"drop-shadow(0 0 5px black);"}})})})]})})}var zt=n(5630),Rt=(n(1332),n(6665));function Mt(t){var e;const[n,i]=(0,r.useState)(null),o=t.product;return(0,r.useEffect)((()=>{(0,lt.bN)(o).then((t=>{i(t.variants)}))}),[]),null==n?(0,x.jsx)(x.Fragment,{}):(0,x.jsx)("div",{style:{width:null!==(e=t.width)&&void 0!==e?e:"100%",borderRadius:"6px",height:1.5*t.height,backgroundColor:"white"},children:(0,x.jsxs)("form",{method:"post",action:"/cart/add","accept-charset":"UTF-8",class:"shopify-product-form",enctype:"multipart/form-data",is:"product-form",children:[(0,x.jsx)("input",{type:"hidden",name:"form_type",value:"product"}),(0,x.jsx)("input",{type:"hidden",name:"utf8",value:"\u2713"}),(0,x.jsx)("input",{type:"hidden",name:"id",value:t.variantId}),(0,x.jsx)("input",{type:"hidden",value:t.product.product_link,name:"productUrl"}),(0,x.jsx)("div",{class:"shiprocket-headless","data-type":"product"}),(0,x.jsx)("textarea",{"data-variant-json":"",class:"hide","aria-hidden":"true","aria-label":"Product JSON",children:JSON.stringify(n).toString()})]})})}function Dt(t){const e=t.product;return(0,x.jsx)(Mt,{product:e,variantId:t.variantId,height:t.height,width:t.width})}function Kt(t){var e,n;const[i]=(0,u.j1)("isInDesignMode"),[o]=(0,u.j1)("isDemoBrand"),[l]=(0,u.j1)("whatmoreShopId"),[a]=(0,u.j1)("whatmorePrimaryFont"),[h]=(0,u.j1)("whatmoreSecondaryColor"),{whatmoreUITheme:p}=(0,r.useContext)(V.I),{whatmoreWidgetSourceDetails:v,whatmoreUserInfo:m}=(0,r.useContext)(V.I),[g,f]=(0,r.useState)(!1),{closeClickComponent:w}=(0,r.useContext)(ln),[j,y]=(0,r.useState)(!1),C=t.FONT_SIZE,S=t.data,b=t.event,k=t.selectedVariantId,_=t.product,F=t.itemQuantity,T=t.PRODUCT_TILE_WIDTH,E=t.cartItemCount,P=t.addToCartFlag,O=t.setAddToCartFlag,L=t.soldOutFlag,z=t.setSoldOutFlag,R=v.landingLocationType,M=v.templateType,D=(0,mt.NY)(R)+(0,mt.dS)(M)+"_"+(null===b||void 0===b?void 0:b.event_id);const K=t=>{var e,n;(function(t,e){i||o||(async()=>{(0,d.$L)(t,e)})()}(b,_),"buy-now"==t)&&(!function(t,e,n,i,o,r,l){"shopify"==n?(0,lt.bj)(t,e,i,o,r,l):(0,rt.rY)(t,e,i)}(void 0!==k?k:null===S||void 0===S||null===(e=S.variants)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.id,F,(0,c.Ipo)(l),l,D,null===b||void 0===b?void 0:b.location,null===m||void 0===m?void 0:m.userType),(0,q.GF)({userInteractionType:H.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:v,event:b,productList:[_],ctaList:b.cta}));"view-more"==t&&((0,c.lj5)(l)?window.location.href=_.product_link+"?"+(0,c.awP)(l)+"&"+(0,c.n9s)(l)+"&"+(0,c.vaK)(l)+((0,c.C0m)(l)?"&currency="+_.currency:""):window.location.href=_.product_link+((0,c.C0m)(l)?"?currency="+_.currency:""))};return(0,x.jsxs)(s.Kq,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.2) 0px 4px 6px -2px",position:t.position,bg:"27951333450"==l?"#fff":"#D3D3D3",borderRadius:"10px",bottom:"10px",left:"50%",zIndex:"1",transform:"translateX(-50%)",direction:"row",width:"95%",paddingX:"20px",paddingTop:"15px",paddingBottom:"15px",spacing:"15px",fontSize:.9*C,children:[" ",L?(0,x.jsx)(J.zx,{width:"90%",bg:"#252324",variant:"outline",opacity:4,_hover:{bg:"#252324"},height:2.5*C,disabled:!0,sx:{borderRadius:"round"==p?"5px":"0px",borderWidth:(0,c.alU)(l),borderColor:(0,c.qPe)(l)},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"white !important",fontFamily:a+" !important"},children:"Sold Out"})}):(0,x.jsxs)(s.Kq,{direction:"vertical"==(0,c.rc3)(l)?"column":"row",width:"100%",spacing:"15px",fontSize:.9*C,justifyContent:"center",children:[(0,c.$bv)(l)?(0,x.jsx)(J.zx,{width:"90%",height:2.5*C,onClick:async t=>{var e,n,r;if(t.stopPropagation(),f(!0),function(t,e,n){i||o||(async()=>{(0,d.JX)(t,e,n)})()}(b,_,F),(0,q.GF)({userInteractionType:H.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:v,event:b,productList:[_],ctaList:b.cta}),void 0===k)return void console.log("ERROR ! Select the option.");const a=void 0!==k?k:null===S||void 0===S||null===(e=S.variants)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.id;null===(r=S.variants.filter((t=>t.id==a)))||void 0===r||r.price;st(a,F,(0,c.Ipo)(l),l,b,_,D,null===b||void 0===b?void 0:b.location,null===m||void 0===m?void 0:m.userType).then((t=>{if(!t.ok)throw new Error(t.status);return f(!1),O(!0),t.json()})).then((t=>((0,u.bU)("whatmoreAddedToCart",!0),(0,c.kad)(l)&&(i||(async()=>{await(0,lt.Mj)().then((t=>t.json())).catch((t=>{console.error("Whatmore :: Error while fetching cart_token for initiateOrderTrackingEvent.",t)}))})()),t))).catch((t=>{f(!1),z(!0),console.error("Error:",t)}))},sx:{paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:"#343434"===(0,c.FdS)(l)?h+" !important":(0,c.FdS)(l)+" !important",borderRadius:"round"==p?"27951333450"==l?"50px":"5px":"0px",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?h:(0,c.yxc)(l),_hover:{backgroundColor:"transparent !important",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?h:(0,c.yxc)(l)}},children:g?(0,x.jsx)(zt.$,{display:"flex !important",color:"white"}):(0,x.jsx)(s.xv,{fontWeight:"extrabold !important",sx:{color:(0,c.eSJ)(l)+" !important",fontFamily:a+" !important"},fontSize:C+"px !important",children:(0,c.tan)(l)})}):(0,x.jsx)(x.Fragment,{}),(0,c.cDD)(l)?(0,x.jsx)(x.Fragment,{children:(0,c.H$w)(l)?(0,x.jsx)(Dt,{variantId:void 0!==k?k:null===S||void 0===S||null===(e=S.variants)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.id,product:_,height:2.5*C,width:"90%",fontSize:C,fontFamily:a}):(0,x.jsx)(x.Fragment,{children:(0,c.Stj)(l)?(0,x.jsx)(J.zx,{width:"90%",variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*C,onClick:()=>K("view-more"),sx:{backgroundColor:(0,c.IIW)(l)+" !important",borderRadius:"round"==p?"27951333450"==l?"50px":"5px":"0px",borderWidth:(0,c.alU)(l),borderColor:(0,c.qPe)(l)},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"#343434"===(0,c.iKW)(l)?h+" !important":(0,c.iKW)(l)+" !important",fontFamily:a+" !important"},fontSize:C,children:(0,c.Z59)(l)})}):(0,x.jsx)(J.zx,{width:"90%",variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*C,onClick:t=>{K("buy-now")},sx:{backgroundColor:(0,c.IIW)(l)+" !important",borderRadius:"round"==p?"27951333450"==l?"50px":"5px":"0px",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?h:(0,c.yxc)(l),_hover:{backgroundColor:"transparent !important"}},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold !important",sx:{color:"#343434"===(0,c.iKW)(l)?h+" !important":(0,c.iKW)(l)+" !important",fontFamily:a+" !important"},fontSize:C+"px !important",children:(0,c.ZuH)(l)})})})}):(0,x.jsx)(x.Fragment,{})]}),(0,x.jsx)(x.Fragment,{children:(0,c.$bv)(l)?(0,x.jsx)(x.Fragment,{children:j?(0,x.jsx)(s.kC,{width:"10%",spacing:"0",right:0,children:(0,x.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,x.jsx)(Rt.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*C}})})}):(0,x.jsxs)(s.kC,{animation:P?I:"none",onAnimationEnd:()=>O(!1),width:"10%",spacing:"0",right:0,onClick:()=>{"do_nothing"!==(0,c.v9M)(l)&&("go_to_cart_page"!==(0,c.v9M)(l)?(y(!0),function(t){"open_cart_slider"!==(0,c.v9M)(t)||null!==w&&w()}(l)):ct((0,c.Ipo)(l),l))},cursor:"pointer",children:[(0,x.jsx)(G.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*C}}),E>0?(0,x.jsx)(s.Cd,{padding:"2px",bg:"white",size:1.1*C,top:.03*-T,verticalAlign:"top",position:"relative",left:.11*-T,zIndex:"1",children:(0,x.jsx)(s.xv,{sx:{color:"black !important",fontFamily:a+" !important"},fontWeight:"bold !important",fontSize:.7*C+"px !important",children:E})}):(0,x.jsx)(x.Fragment,{})]})}):(0,x.jsx)(x.Fragment,{})})]})}function At(t){const[e]=(0,u.j1)("whatmorePrimaryFont"),n=((0,u.MO)("whatmoreShopId"),t.setOpenShopNow),i=t.FONT_SIZE,o=t.setLockSwiper;return(0,x.jsxs)(s.kC,{justifyContent:"center",paddingTop:"10px",paddingBottom:"8px",width:"100%",children:[(0,x.jsx)(s.kC,{width:"10%",display:"flex !important"}),(0,x.jsx)(s.kC,{width:"90%",justifyContent:"center",children:(0,x.jsx)(s.xv,{align:"center",fontSize:1.25*i,fontWeight:"semibold",sx:{color:"black !important",fontFamily:e+" !important"},as:"b",children:"Shop Now"})}),(0,x.jsx)(s.kC,{justifyContent:"center",width:"10%",alignItems:"center",onClick:t=>{t.stopPropagation(),n(!1),o(!1)},cursor:"pointer",children:(0,x.jsx)(P.Z,{sx:{boxShadow:3,color:"black !important",fontSize:1.2*i,filter:"drop-shadow(0 0 5px black);"}})})]})}function Wt(t){var e;const[n]=(0,u.j1)("whatmorePrimaryFont"),i=((0,u.MO)("whatmoreShopId"),t.FONT_SIZE),o=t.data;return(0,x.jsxs)(s.Kq,{direction:"column",paddingX:"20px",height:"fit-content",children:[(0,x.jsx)(s.Kq,{children:(0,x.jsx)(s.xv,{fontSize:i+"px !important",fontWeight:"bold !important",justifyContent:"center",sx:{color:"black !important",fontFamily:n+" !important"},children:"Description"})}),(0,x.jsx)(s.Kq,{children:(0,x.jsx)(s.xu,{overflowY:"auto",scrollBehavior:"smooth",sx:{"::-webkit-scrollbar":{display:"none"}},children:(0,x.jsx)(s.xv,{fontSize:.8*i+"px !important",justifyContent:"normal",fontWeight:"normal !important",dangerouslySetInnerHTML:{__html:(r=null!==(e=null===o||void 0===o?void 0:o.description)&&void 0!==e?e:null===o||void 0===o?void 0:o.body_html,r.replace(/style="[^"]*color[^"]*"/gi,""))},sx:{fontFamily:n+" !important",lineHeight:"140% !important"}})})})]});var r}const Nt=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{color:"black",paddingTop:"2px"},children:(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-box-arrow-up-right",viewBox:"0 0 16 16",style:{stroke:"black",strokeWidth:"0.4"},children:[(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5"}),(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0z"})]})})};var qt=n(5416);function Ht(t){var e,n;const[i,o]=(0,r.useState)(t.product),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d]=(0,u.j1)("whatmoreSecondaryColor");(0,r.useEffect)((()=>{(0,c.N8M)(a)&&(0,xt.Rb)(i,(0,c.Ipo)(a),a).then((t=>{o(t)}))}),[]);const h=t.FONT_SIZE,p=t.data,v=t.itemPrice;const m=null===p||void 0===p||null===(e=p.variants)||void 0===e||null===(n=e.find((e=>e.id==t.selectedVariantId)))||void 0===n?void 0:n.compare_at_price,g=m&&0!=m&&m>v?Math.round((m-v)/m*100):NaN;return(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(s.kC,{direction:"column",paddingLeft:"20px",paddingRight:"20px",paddingY:"5px",children:[(0,x.jsx)(s.rU,{href:function(t){return(0,c.lj5)(a)?t.product_link+"?"+(0,c.awP)(a)+"&"+(0,c.n9s)(a)+"&"+(0,c.vaK)(a)+((0,c.C0m)(a)?"&currency="+t.currency:""):t.product_link+((0,c.C0m)(a)?"?currency="+t.currency:"")}(i),color:"white",width:"fit-content",children:(0,x.jsxs)(s.kC,{sx:{display:"flex",gap:"6px"},children:[(0,x.jsx)(s.xv,{isTruncated:!0,noOfLines:2,padding:"2px",fontSize:h,sx:{color:"black !important",lineHeight:"140% !important",fontFamily:l+" !important"},as:"b",children:null===p||void 0===p?void 0:p.title}),(0,x.jsx)(Nt,{iconSize:1.1*h})]})}),(0,x.jsxs)(s.kC,{direction:"row",gap:"6px",paddingTop:"4px",children:[m&&m>v&&(0,x.jsx)(s.xv,{as:"s",padding:"2px",fontSize:1.2*h,fontWeight:"semibold",sx:{color:"gray !important",fontFamily:l+" !important"},children:(0,xt.jx)(parseFloat((0,qt.G)()?m/100:m)," ",a,i.currency,!0)}),(0,x.jsx)(s.xv,{as:"b",padding:"2px",fontSize:1.2*h,fontWeight:"semibold !important",sx:{color:"black !important",fontFamily:l+" !important"},children:(0,xt.jx)(parseFloat((0,qt.G)()?v/100:v)," ",a,i.currency,!0)}),!isNaN(g)&&0!=g&&(0,x.jsx)(s.xu,{display:"flex",backgroundColor:"green"==(0,c.ZJm)(a)?"#343434"==d?(0,c.ZJm)(a):d:(0,c.ZJm)(a),alignItems:"center",borderRadius:"4px",width:"fit-content",px:"6px",children:(0,x.jsx)(s.xv,{fontSize:(0,c.sTg)(a)?"14px !important":1.1*h,fontWeight:"normal !important",sx:{color:(0,c.mso)(a)+" !important",fontFamily:l+" !important"},children:(0,c.sTg)(a)?`${g}% off`:`Save ${(0,xt.jx)(parseFloat(m/100-v/100)," ",a,i.currency)}`})})]})]})})}function Vt(t){var e,n;const[i]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),{setShowOptionsChart:l}=(0,r.useContext)(Qt),[a,d]=(0,r.useState)({}),h=(0,u.MO)("whatmoreSecondaryColorShade300"),p=t.setSelectedColor,v=t.selectOptionFirstHandler,m=t.selectOptionSecondHandler,f=t.selectOptionThirdHandler,w=t.FONT_SIZE,j=t.data,y=(t,e,n)=>{if(2==n)d((n=>({...n,[t]:e})));else if(1==n)d((n=>{var i,o,r,l;return{...n,[t]:e,[null===j||void 0===j||null===(i=j.options)||void 0===i||null===(o=i[2])||void 0===o?void 0:o.name]:null===j||void 0===j||null===(r=j.variants)||void 0===r||null===(l=r.find((t=>(null===t||void 0===t?void 0:t.option2)==e)))||void 0===l?void 0:l.option3}}));else{var i,o;const n=null===j||void 0===j||null===(i=j.variants)||void 0===i||null===(o=i.find((t=>(null===t||void 0===t?void 0:t.option1)==e)))||void 0===o?void 0:o.option2;d((i=>{var o,r,l,a,d,s,c,u;return{...i,[null===j||void 0===j||null===(o=j.options)||void 0===o||null===(r=o[1])||void 0===r?void 0:r.name]:null===j||void 0===j||null===(l=j.variants)||void 0===l||null===(a=l.find((t=>(null===t||void 0===t?void 0:t.option1)==e)))||void 0===a?void 0:a.option2,[null===j||void 0===j||null===(d=j.options)||void 0===d||null===(s=d[2])||void 0===s?void 0:s.name]:null===j||void 0===j||null===(c=j.variants)||void 0===c||null===(u=c.find((t=>(null===t||void 0===t?void 0:t.option2)==n)))||void 0===u?void 0:u.option3,[t]:e}}))}};(0,r.useEffect)((()=>{d((t=>{var e,n,i,o,r,l,a,d,s,c,u,h;return{...t,[null===j||void 0===j||null===(e=j.options)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.name]:null===j||void 0===j||null===(i=j.variants)||void 0===i||null===(o=i.find((t=>{var e,n,i;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(n=e[0])||void 0===n||null===(i=n.values)||void 0===i?void 0:i.includes(null===t||void 0===t?void 0:t.option1))&&(null===t||void 0===t?void 0:t.available)})))||void 0===o?void 0:o.option1,[null===j||void 0===j||null===(r=j.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name]:null===j||void 0===j||null===(a=j.variants)||void 0===a||null===(d=a.find((t=>{var e,n,i;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(n=e[1])||void 0===n||null===(i=n.values)||void 0===i?void 0:i.includes(null===t||void 0===t?void 0:t.option2))&&(null===t||void 0===t?void 0:t.available)})))||void 0===d?void 0:d.option2,[null===j||void 0===j||null===(s=j.options)||void 0===s||null===(c=s[2])||void 0===c?void 0:c.name]:null===j||void 0===j||null===(u=j.variants)||void 0===u||null===(h=u.find((t=>{var e,n,i;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(n=e[2])||void 0===n||null===(i=n.values)||void 0===i?void 0:i.includes(null===t||void 0===t?void 0:t.option3))&&(null===t||void 0===t?void 0:t.available)})))||void 0===h?void 0:h.option3}}))}),[]);return(0,x.jsx)(s.kC,{direction:"row",paddingLeft:"20px",paddingRight:"20px",paddingY:"10px",children:(null===j||void 0===j||null===(e=j.options)||void 0===e?void 0:e.length)>0&&(0,x.jsx)(s.kC,{direction:"column",width:"100%",gap:"4px",children:null===j||void 0===j||null===(n=j.options)||void 0===n?void 0:n.map(((e,n)=>{var r,d,u,C,S,b;return(0,x.jsx)(x.Fragment,{children:((null===e||void 0===e||null===(r=e.values)||void 0===r?void 0:r.length)>1||"Colour"===(null===e||void 0===e?void 0:e.name)||(null===e||void 0===e||null===(d=e.name)||void 0===d?void 0:d.toLowerCase().includes("color"))||1==(null===e||void 0===e||null===(u=e.values)||void 0===u?void 0:u.length)&&(null===e||void 0===e?void 0:e.position)==(null===j||void 0===j||null===(C=j.options)||void 0===C?void 0:C.length))&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(s.kC,{justifyContent:"space-between",alignItems:"center",children:[(0,x.jsx)(s.xv,{fontSize:1*w+"px !important",sx:{color:"black !important",fontFamily:i+" !important",fontWeight:"bold !important"},children:null===e||void 0===e?void 0:e.name}),"Size"===e.name&&(0,c.Ip6)(o)?(0,x.jsx)(s.kC,{marginTop:"4px",whiteSpace:"nowrap",cursor:"pointer",children:(0,x.jsx)(s.xv,{fontSize:.7*w,as:"u",sx:{color:"black !important",fontFamily:i+" !important"},onClick:()=>{null!==l&&l(!0)},children:(0,c.meb)(o)})}):(0,x.jsx)(x.Fragment,{})]}),(0,x.jsx)(s.Ug,{spacing:0,flexWrap:"wrap",alignContent:"flex-start",alignItems:"center",justifyContent:"flex-start",children:null===e||void 0===e||null===(S=e.values)||void 0===S?void 0:S.map((r=>{var l,d,u,C,S,b,I,k,_;const F=((t,e)=>{var n,i,o,r,l,d,s,c;if(null!==j&&void 0!==j&&j.options&&(null===j||void 0===j||null===(n=j.options)||void 0===n?void 0:n.length)>0)switch(null===j||void 0===j||null===(c=j.options)||void 0===c?void 0:c.length){case 1:return null===j||void 0===j||null===(i=j.variants)||void 0===i||null===(o=i.find((e=>(null===e||void 0===e?void 0:e.option1)===t)))||void 0===o?void 0:o.available;case 2:return 0==e||(null===j||void 0===j||null===(r=j.variants)||void 0===r||null===(l=r.find((e=>{var n,i;return(null===e||void 0===e?void 0:e.option2)===t&&(null===e||void 0===e?void 0:e.option1)===a[null===j||void 0===j||null===(n=j.options)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.name]})))||void 0===l?void 0:l.available);case 3:return 0==e||1==e||(null===j||void 0===j||null===(d=j.variants)||void 0===d||null===(s=d.find((e=>{var n,i,o,r;return(null===e||void 0===e?void 0:e.option3)===t&&(null===e||void 0===e?void 0:e.option1)===a[null===j||void 0===j||null===(n=j.options)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.name]&&(null===e||void 0===e?void 0:e.option2)===a[null===j||void 0===j||null===(o=j.options)||void 0===o||null===(r=o[1])||void 0===r?void 0:r.name]})))||void 0===s?void 0:s.available);default:return!0}})(r,n),T=0==n||j.variants.find((t=>{var e,i;return t[`option${n}`]==(null===(e=Object.entries(a))||void 0===e||null===(i=e[n-1])||void 0===i?void 0:i[1])&&t[`option${n+1}`]==r}));return("Colour"===(null===e||void 0===e?void 0:e.name)||null!==e&&void 0!==e&&e.name.toLowerCase().includes("color"))&&T&&((null===t||void 0===t||null===(l=t.finalArr)||void 0===l?void 0:l.length)>0&&(null===t||void 0===t||null===(d=t.finalArr)||void 0===d||!d.includes(null))||(null===t||void 0===t||null===(u=t.finalArrExternal)||void 0===u?void 0:u.length)>0)?(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s.kC,{paddingBottom:"8px",px:"2px",paddingRight:"8px",children:(0,x.jsx)(s.xu,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px",borderRadius:(0,c.lmH)(o),size:"sm",border:a[null===e||void 0===e?void 0:e.name]===r?`2px solid ${(0,c.ua_)(o)} !important`:"",cursor:"pointer",width:"fit-content !important",onClick:()=>{y(null===e||void 0===e?void 0:e.name,r,n),p(r),0===n&&v(r),1===n&&m(r),2===n&&f(r)},children:(0,x.jsx)(g.Ee,{padding:"2px",borderRadius:(0,c.lmH)(o),width:"58px",height:"58px",src:(0,pt.s)(null!==(C=null===t||void 0===t||null===(S=t.finalArr)||void 0===S||null===(b=S.find((t=>(null===t||void 0===t?void 0:t.color)==r)))||void 0===b?void 0:b.src)&&void 0!==C?C:null===t||void 0===t||null===(I=t.finalArrExternal)||void 0===I||null===(k=I.find((t=>(null===t||void 0===t?void 0:t.color)==r)))||void 0===k?void 0:k.optionsrc,"?width=400&height=400")})})},r)}):T&&(0,x.jsx)(s.kC,{paddingBottom:"8px",paddingRight:"8px",children:(0,x.jsx)(J.zx,{isDisabled:!F,size:"sm",px:"8px !important",bg:a[null===e||void 0===e?void 0:e.name]===r&&F?(null!==(_=(0,c.CPm)(o))&&void 0!==_?_:h)+" !important":(0,c.bC3)(o)+" !important",width:"fit-content !important",onClick:()=>{y(null===e||void 0===e?void 0:e.name,r,n),0===n&&v(r),1===n&&m(r),2===n&&f(r)},children:(0,x.jsx)(s.xv,{as:F?"p":"s",fontSize:.9*w+"px !important",sx:{fontFamily:i+" !important",fontWeight:"normal !important",color:a[null===e||void 0===e?void 0:e.name]===r&&F?(0,c.cY_)(o)+" !important":(0,c.FbM)(o)+" !important"},children:r})})},r)}))}),n===(null===j||void 0===j||null===(b=j.options)||void 0===b?void 0:b.length)-1&&(0,x.jsx)(s.M5,{paddingTop:"8px",width:"100%",children:(0,x.jsx)(s.iz,{color:t.dividerColor,size:"xs"})})]})})}))})})}var Zt=n(8782);function Ut(t){var e,n,i,o,l,a,d,p,v,m,f,w,j,y,C,b,I,k,_,F,T;const[E,P,O,L]=(0,h.Z)();var z=.4*L*.8,R=z*(16/9)*.6*.8;const M=1.1*z,D=M*(16/9)*.8;var A=.12*z;const[W,N]=(0,r.useState)(!1),q=t.data,H=t.event,Z=t.product,U=t.setOpenShopNow,B=t.setLockSwiper,[Y]=(0,u.j1)("whatmoreEmbedAppUseVariant"),[X,G]=(0,r.useState)((()=>{if("true"===Y)return Xt(q,Z.client_product_id)})),[$,J]=(0,r.useState)((()=>{if("true"===Y)return Gt(q,Z.client_product_id)})),[Q,tt]=(0,r.useState)((()=>{if("true"===Y)return $t(q,Z.client_product_id)})),[et,nt]=(0,r.useState)(),[it,ot]=(0,r.useState)(1),[at,dt]=(0,r.useState)(),[st,ct]=(0,r.useState)(0),[ut,ht]=(0,r.useState)(!1),[vt,xt]=(0,r.useState)(!1),[mt,gt]=(0,r.useState)(Z.thumbnail_image),ft=(0,r.useContext)(V.I),wt=(0,u.MO)("whatmoreShopId"),jt=(0,r.useCallback)((t=>{G(t)}),[]),yt=(0,r.useCallback)((t=>{J(t)}),[]),Ct=(0,r.useCallback)((t=>{tt(t)}),[]);(0,r.useEffect)((()=>{const t=Bt(q,X,$,Q);nt(t),dt(Yt(q,t)),ot(1),xt(!1);const e=Jt(q,t);null!==e&&gt(e)}),[X,$,Q]),(0,r.useEffect)((()=>{var t,e;const n=void 0===et?null===q||void 0===q||null===(t=q.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.price:Yt(q,et);dt(n*it)}),[it]),(0,r.useEffect)((()=>{function t(t){const e=document.getElementById("whatmore-shopnow-view"),n=document.getElementById("whatmore-size-chart");n&&n.contains(t.target)||!e||e.contains(t.target)||(U(!1),B(!1))}function e(t){t.preventDefault(),t.stopPropagation(),n.scrollTop+=t.deltaY}document.addEventListener("click",t);const n=document.getElementById("whatmore-shopnow-view");return null===n||void 0===n||n.addEventListener("wheel",e),()=>{document.removeEventListener("click",t),document.removeEventListener("wheel",e)}}),[]),(0,r.useEffect)((()=>{const t=async function(t,e){return"shopify"==t?(0,lt.Bi)():(0,rt.OM)(e)}((0,c.Ipo)(wt),wt);t.then((t=>t.json())).then((t=>{ct(t.item_count)})).catch((t=>{console.error("Cart Add Error:",t)}))}),[ut]);const St=`${S.F4`
72
+ `} 0.5s`;return(0,x.jsx)(s.Kq,{bg:"black",height:"100%",opacity:"100%",width:"100%",borderTopRadius:"xl",animation:w,justifyContent:"center",alignItems:"center",children:(0,x.jsxs)(s.xu,{width:"100%",height:"100%",children:[(0,x.jsx)(g.Ee,{width:"100%",height:"auto",src:(0,c.Zb8)(a)?d:(0,c.KM)(a),objectFit:"contain",borderTopRadius:"xl"}),(0,x.jsx)(s.Kq,{width:"100%",height:"100%",direction:"column",justifyContent:"flex-start",style:{position:"relative",zIndex:1,bottom:"90%"},className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",onClick:t=>{t.stopPropagation(),m(!1)},cursor:"pointer",padding:"4px",children:(0,x.jsx)(P.Z,{sx:{boxShadow:3,color:"white !important",fontSize:1.6*f,filter:"drop-shadow(0 0 5px black);"}})})})]})})}var zt=n(5630),Rt=(n(1332),n(6665));function Mt(t){var e;const[n,i]=(0,r.useState)(null),o=t.product;return(0,r.useEffect)((()=>{(0,lt.bN)(o).then((t=>{i(t.variants)}))}),[]),null==n?(0,x.jsx)(x.Fragment,{}):(0,x.jsx)("div",{style:{width:null!==(e=t.width)&&void 0!==e?e:"100%",borderRadius:"6px",height:1.5*t.height,backgroundColor:"white"},children:(0,x.jsxs)("form",{method:"post",action:"/cart/add","accept-charset":"UTF-8",class:"shopify-product-form",enctype:"multipart/form-data",is:"product-form",children:[(0,x.jsx)("input",{type:"hidden",name:"form_type",value:"product"}),(0,x.jsx)("input",{type:"hidden",name:"utf8",value:"\u2713"}),(0,x.jsx)("input",{type:"hidden",name:"id",value:t.variantId}),(0,x.jsx)("input",{type:"hidden",value:t.product.product_link,name:"productUrl"}),(0,x.jsx)("div",{class:"shiprocket-headless","data-type":"product"}),(0,x.jsx)("textarea",{"data-variant-json":"",class:"hide","aria-hidden":"true","aria-label":"Product JSON",children:JSON.stringify(n).toString()})]})})}function Dt(t){const e=t.product;return(0,x.jsx)(Mt,{product:e,variantId:t.variantId,height:t.height,width:t.width})}function Kt(t){var e,n;const[i]=(0,u.j1)("isInDesignMode"),[o]=(0,u.j1)("isDemoBrand"),[l]=(0,u.j1)("whatmoreShopId"),[a]=(0,u.j1)("whatmorePrimaryFont"),[h]=(0,u.j1)("whatmoreSecondaryColor"),{whatmoreUITheme:p}=(0,r.useContext)(V.I),{whatmoreWidgetSourceDetails:v,whatmoreUserInfo:m}=(0,r.useContext)(V.I),[g,f]=(0,r.useState)(!1),{closeClickComponent:w}=(0,r.useContext)(ln),[j,y]=(0,r.useState)(!1),C=t.FONT_SIZE,S=t.data,b=t.event,k=t.selectedVariantId,_=t.product,F=t.itemQuantity,T=t.PRODUCT_TILE_WIDTH,E=t.cartItemCount,P=t.addToCartFlag,O=t.setAddToCartFlag,L=t.soldOutFlag,z=t.setSoldOutFlag,R=v.landingLocationType,M=v.templateType,D=(0,mt.NY)(R)+(0,mt.dS)(M)+"_"+(null===b||void 0===b?void 0:b.event_id);const K=t=>{var e,n;(function(t,e){i||o||(async()=>{(0,d.$L)(t,e)})()}(b,_),"buy-now"==t)&&(!function(t,e,n,i,o,r,l){"shopify"==n?(0,lt.bj)(t,e,i,o,r,l):(0,rt.rY)(t,e,i)}(void 0!==k?k:null===S||void 0===S||null===(e=S.variants)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.id,F,(0,c.Ipo)(l),l,D,null===b||void 0===b?void 0:b.location,null===m||void 0===m?void 0:m.userType),(0,q.GF)({userInteractionType:H.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:v,event:b,productList:[_],ctaList:b.cta}));"view-more"==t&&((0,c.lj5)(l)?window.location.href=_.product_link+"?"+(0,c.awP)(l)+"&"+(0,c.n9s)(l)+"&"+(0,c.vaK)(l)+((0,c.C0m)(l)?"&currency="+_.currency:""):window.location.href=_.product_link+((0,c.C0m)(l)?"?currency="+_.currency:""))};return(0,x.jsxs)(s.Kq,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.2) 0px 4px 6px -2px",position:t.position,bg:"27951333450"==l?"#fff":"#D3D3D3",borderRadius:"10px",bottom:"10px",left:"50%",zIndex:"1",transform:"translateX(-50%)",direction:"row",width:"95%",paddingX:"20px",paddingTop:"15px",paddingBottom:"15px",spacing:"15px",fontSize:.9*C,children:[" ",L?(0,x.jsx)(J.zx,{width:"90%",bg:"#252324",variant:"outline",opacity:4,_hover:{bg:"#252324"},height:2.5*C,disabled:!0,sx:{borderRadius:"round"==p?"5px":"0px",borderWidth:(0,c.alU)(l),borderColor:(0,c.qPe)(l)},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"white !important",fontFamily:a+" !important"},children:"Sold Out"})}):(0,x.jsxs)(s.Kq,{direction:"vertical"==(0,c.rc3)(l)?"column":"row",width:"100%",spacing:"15px",fontSize:.9*C,justifyContent:"center",children:[(0,c.$bv)(l)?(0,x.jsx)(J.zx,{width:"90%",height:2.5*C,onClick:async t=>{var e,n,r;if(t.stopPropagation(),f(!0),function(t,e,n){i||o||(async()=>{(0,d.JX)(t,e,n)})()}(b,_,F),(0,q.GF)({userInteractionType:H.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:v,event:b,productList:[_],ctaList:b.cta}),void 0===k)return void console.log("ERROR ! Select the option.");const a=void 0!==k?k:null===S||void 0===S||null===(e=S.variants)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.id;null===(r=S.variants.filter((t=>t.id==a)))||void 0===r||r.price;st(a,F,(0,c.Ipo)(l),l,b,_,D,null===b||void 0===b?void 0:b.location,null===m||void 0===m?void 0:m.userType).then((t=>{if(!t.ok)throw new Error(t.status);return f(!1),O(!0),t.json()})).then((t=>((0,u.bU)("whatmoreAddedToCart",!0),(0,c.kad)(l)&&(i||(async()=>{await(0,lt.Mj)().then((t=>t.json())).catch((t=>{console.error("Whatmore :: Error while fetching cart_token for initiateOrderTrackingEvent.",t)}))})()),t))).catch((t=>{f(!1),z(!0),console.error("Error:",t)}))},sx:{paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:"#343434"===(0,c.FdS)(l)?h+" !important":(0,c.FdS)(l)+" !important",borderRadius:"round"==p?"27951333450"==l?"50px":"5px":"0px",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?h:(0,c.yxc)(l),_hover:{backgroundColor:"transparent !important",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?h:(0,c.yxc)(l)}},children:g?(0,x.jsx)(zt.$,{display:"flex !important",color:"white"}):(0,x.jsx)(s.xv,{fontWeight:"extrabold !important",sx:{color:(0,c.eSJ)(l)+" !important",fontFamily:a+" !important"},fontSize:C+"px !important",children:(0,c.tan)(l)})}):(0,x.jsx)(x.Fragment,{}),(0,c.cDD)(l)?(0,x.jsx)(x.Fragment,{children:(0,c.H$w)(l)?(0,x.jsx)(Dt,{variantId:void 0!==k?k:null===S||void 0===S||null===(e=S.variants)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.id,product:_,height:2.5*C,width:"90%",fontSize:C,fontFamily:a}):(0,x.jsx)(x.Fragment,{children:(0,c.Stj)(l)?(0,x.jsx)(J.zx,{width:"90%",variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*C,onClick:()=>K("view-more"),sx:{backgroundColor:(0,c.IIW)(l)+" !important",borderRadius:"round"==p?"27951333450"==l?"50px":"5px":"0px",borderWidth:(0,c.alU)(l),borderColor:(0,c.qPe)(l)},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"#343434"===(0,c.iKW)(l)?h+" !important":(0,c.iKW)(l)+" !important",fontFamily:a+" !important"},fontSize:C,children:(0,c.Z59)(l)})}):(0,x.jsx)(J.zx,{width:"90%",variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*C,onClick:t=>{K("buy-now")},sx:{backgroundColor:(0,c.IIW)(l)+" !important",borderRadius:"round"==p?"27951333450"==l?"50px":"5px":"0px",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?h:(0,c.yxc)(l),_hover:{backgroundColor:"transparent !important"}},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold !important",sx:{color:"#343434"===(0,c.iKW)(l)?h+" !important":(0,c.iKW)(l)+" !important",fontFamily:a+" !important"},fontSize:C+"px !important",children:(0,c.ZuH)(l)})})})}):(0,x.jsx)(x.Fragment,{})]}),(0,x.jsx)(x.Fragment,{children:(0,c.$bv)(l)?(0,x.jsx)(x.Fragment,{children:j?(0,x.jsx)(s.kC,{width:"10%",spacing:"0",right:0,children:(0,x.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,x.jsx)(Rt.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*C}})})}):(0,x.jsxs)(s.kC,{animation:P?I:"none",onAnimationEnd:()=>O(!1),width:"10%",spacing:"0",right:0,onClick:()=>{"do_nothing"!==(0,c.v9M)(l)&&("go_to_cart_page"!==(0,c.v9M)(l)?(y(!0),function(t){"open_cart_slider"!==(0,c.v9M)(t)||null!==w&&w()}(l)):ct((0,c.Ipo)(l),l))},cursor:"pointer",children:[(0,x.jsx)(G.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*C}}),E>0?(0,x.jsx)(s.Cd,{padding:"2px",bg:"white",size:1.1*C,top:.03*-T,verticalAlign:"top",position:"relative",left:.11*-T,zIndex:"1",children:(0,x.jsx)(s.xv,{sx:{color:"black !important",fontFamily:a+" !important"},fontWeight:"bold !important",fontSize:.7*C+"px !important",children:E})}):(0,x.jsx)(x.Fragment,{})]})}):(0,x.jsx)(x.Fragment,{})})]})}function At(t){const[e]=(0,u.j1)("whatmorePrimaryFont"),n=((0,u.MO)("whatmoreShopId"),t.setOpenShopNow),i=t.FONT_SIZE,o=t.setLockSwiper;return(0,x.jsxs)(s.kC,{justifyContent:"center",paddingTop:"10px",paddingBottom:"8px",width:"100%",children:[(0,x.jsx)(s.kC,{width:"10%",display:"flex !important"}),(0,x.jsx)(s.kC,{width:"90%",justifyContent:"center",children:(0,x.jsx)(s.xv,{align:"center",fontSize:1.25*i,fontWeight:"semibold",sx:{color:"black !important",fontFamily:e+" !important"},as:"b",children:"Shop Now"})}),(0,x.jsx)(s.kC,{justifyContent:"center",width:"10%",alignItems:"center",onClick:t=>{t.stopPropagation(),n(!1),o(!1)},cursor:"pointer",children:(0,x.jsx)(P.Z,{sx:{boxShadow:3,color:"black !important",fontSize:1.2*i,filter:"drop-shadow(0 0 5px black);"}})})]})}function Wt(t){var e;const[n]=(0,u.j1)("whatmorePrimaryFont"),i=((0,u.MO)("whatmoreShopId"),t.FONT_SIZE),o=t.data;return(0,x.jsxs)(s.Kq,{direction:"column",paddingX:"20px",height:"fit-content",children:[(0,x.jsx)(s.Kq,{children:(0,x.jsx)(s.xv,{fontSize:i+"px !important",fontWeight:"bold !important",justifyContent:"center",sx:{color:"black !important",fontFamily:n+" !important"},children:"Description"})}),(0,x.jsx)(s.Kq,{children:(0,x.jsx)(s.xu,{overflowY:"auto",scrollBehavior:"smooth",sx:{"::-webkit-scrollbar":{display:"none"}},children:(0,x.jsx)(s.xv,{fontSize:.8*i+"px !important",justifyContent:"normal",fontWeight:"normal !important",dangerouslySetInnerHTML:{__html:(r=null!==(e=null===o||void 0===o?void 0:o.description)&&void 0!==e?e:null===o||void 0===o?void 0:o.body_html,r.replace(/style="[^"]*color[^"]*"/gi,""))},sx:{fontFamily:n+" !important",lineHeight:"140% !important"}})})})]});var r}const Nt=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{color:"black",paddingTop:"2px"},children:(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-box-arrow-up-right",viewBox:"0 0 16 16",style:{stroke:"black",strokeWidth:"0.4"},children:[(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5"}),(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0z"})]})})};var qt=n(5416);function Ht(t){var e,n;const[i,o]=(0,r.useState)(t.product),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d]=(0,u.j1)("whatmoreSecondaryColor");(0,r.useEffect)((()=>{(0,c.N8M)(a)&&(0,xt.Rb)(i,(0,c.Ipo)(a),a).then((t=>{o(t)}))}),[]);const h=t.FONT_SIZE,p=t.data,v=t.itemPrice;const m=null===p||void 0===p||null===(e=p.variants)||void 0===e||null===(n=e.find((e=>e.id==t.selectedVariantId)))||void 0===n?void 0:n.compare_at_price,g=m&&0!=m&&m>v?Math.round((m-v)/m*100):NaN;return(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(s.kC,{direction:"column",paddingLeft:"20px",paddingRight:"20px",paddingY:"5px",children:[(0,x.jsx)(s.rU,{href:function(t){return(0,c.lj5)(a)?t.product_link+"?"+(0,c.awP)(a)+"&"+(0,c.n9s)(a)+"&"+(0,c.vaK)(a)+((0,c.C0m)(a)?"&currency="+t.currency:""):t.product_link+((0,c.C0m)(a)?"?currency="+t.currency:"")}(i),color:"white",width:"fit-content",children:(0,x.jsxs)(s.kC,{sx:{display:"flex",gap:"6px"},children:[(0,x.jsx)(s.xv,{isTruncated:!0,noOfLines:2,padding:"2px",fontSize:h,sx:{color:"black !important",lineHeight:"140% !important",fontFamily:l+" !important"},as:"b",children:null===p||void 0===p?void 0:p.title}),(0,x.jsx)(Nt,{iconSize:1.1*h})]})}),(0,x.jsxs)(s.kC,{direction:"row",gap:"6px",paddingTop:"4px",children:[m&&m>v&&(0,x.jsx)(s.xv,{as:"s",padding:"2px",fontSize:1.2*h,fontWeight:"semibold",sx:{color:"gray !important",fontFamily:l+" !important"},children:(0,xt.jx)(parseFloat((0,qt.G)()?m/100:m)," ",a,i.currency,!0)}),(0,x.jsx)(s.xv,{as:"b",padding:"2px",fontSize:1.2*h,fontWeight:"semibold !important",sx:{color:"black !important",fontFamily:l+" !important"},children:(0,xt.jx)(parseFloat((0,qt.G)()?v/100:v)," ",a,i.currency,!0)}),!isNaN(g)&&0!=g&&(0,x.jsx)(s.xu,{display:"flex",backgroundColor:"green"==(0,c.ZJm)(a)?"#343434"==d?(0,c.ZJm)(a):d:(0,c.ZJm)(a),alignItems:"center",borderRadius:"4px",width:"fit-content",px:"6px",children:(0,x.jsx)(s.xv,{fontSize:(0,c.sTg)(a)?"14px !important":1.1*h,fontWeight:"normal !important",sx:{color:(0,c.mso)(a)+" !important",fontFamily:l+" !important"},children:(0,c.sTg)(a)?`${g}% off`:`Save ${(0,xt.jx)(parseFloat(m/100-v/100)," ",a,i.currency)}`})})]})]})})}function Vt(t){var e,n;const[i]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),{setShowOptionsChart:l}=(0,r.useContext)(Qt),[a,d]=(0,r.useState)({}),h=(0,u.MO)("whatmoreSecondaryColorShade300"),p=t.setSelectedColor,v=t.selectOptionFirstHandler,m=t.selectOptionSecondHandler,f=t.selectOptionThirdHandler,w=t.FONT_SIZE,j=t.data,y=(t,e,n)=>{if(2==n)d((n=>({...n,[t]:e})));else if(1==n)d((n=>{var i,o,r,l;return{...n,[t]:e,[null===j||void 0===j||null===(i=j.options)||void 0===i||null===(o=i[2])||void 0===o?void 0:o.name]:null===j||void 0===j||null===(r=j.variants)||void 0===r||null===(l=r.find((t=>(null===t||void 0===t?void 0:t.option2)==e)))||void 0===l?void 0:l.option3}}));else{var i,o;const n=null===j||void 0===j||null===(i=j.variants)||void 0===i||null===(o=i.find((t=>(null===t||void 0===t?void 0:t.option1)==e)))||void 0===o?void 0:o.option2;d((i=>{var o,r,l,a,d,s,c,u;return{...i,[null===j||void 0===j||null===(o=j.options)||void 0===o||null===(r=o[1])||void 0===r?void 0:r.name]:null===j||void 0===j||null===(l=j.variants)||void 0===l||null===(a=l.find((t=>(null===t||void 0===t?void 0:t.option1)==e)))||void 0===a?void 0:a.option2,[null===j||void 0===j||null===(d=j.options)||void 0===d||null===(s=d[2])||void 0===s?void 0:s.name]:null===j||void 0===j||null===(c=j.variants)||void 0===c||null===(u=c.find((t=>(null===t||void 0===t?void 0:t.option2)==n)))||void 0===u?void 0:u.option3,[t]:e}}))}};(0,r.useEffect)((()=>{d((t=>{var e,n,i,o,r,l,a,d,s,c,u,h;return{...t,[null===j||void 0===j||null===(e=j.options)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.name]:null===j||void 0===j||null===(i=j.variants)||void 0===i||null===(o=i.find((t=>{var e,n,i;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(n=e[0])||void 0===n||null===(i=n.values)||void 0===i?void 0:i.includes(null===t||void 0===t?void 0:t.option1))&&(null===t||void 0===t?void 0:t.available)})))||void 0===o?void 0:o.option1,[null===j||void 0===j||null===(r=j.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name]:null===j||void 0===j||null===(a=j.variants)||void 0===a||null===(d=a.find((t=>{var e,n,i;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(n=e[1])||void 0===n||null===(i=n.values)||void 0===i?void 0:i.includes(null===t||void 0===t?void 0:t.option2))&&(null===t||void 0===t?void 0:t.available)})))||void 0===d?void 0:d.option2,[null===j||void 0===j||null===(s=j.options)||void 0===s||null===(c=s[2])||void 0===c?void 0:c.name]:null===j||void 0===j||null===(u=j.variants)||void 0===u||null===(h=u.find((t=>{var e,n,i;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(n=e[2])||void 0===n||null===(i=n.values)||void 0===i?void 0:i.includes(null===t||void 0===t?void 0:t.option3))&&(null===t||void 0===t?void 0:t.available)})))||void 0===h?void 0:h.option3}}))}),[]);return(0,x.jsx)(s.kC,{direction:"row",paddingLeft:"20px",paddingRight:"20px",paddingY:"10px",children:(null===j||void 0===j||null===(e=j.options)||void 0===e?void 0:e.length)>0&&(0,x.jsx)(s.kC,{direction:"column",width:"100%",gap:"4px",children:null===j||void 0===j||null===(n=j.options)||void 0===n?void 0:n.map(((e,n)=>{var r,d,u,C,S,b;return(0,x.jsx)(x.Fragment,{children:((null===e||void 0===e||null===(r=e.values)||void 0===r?void 0:r.length)>1||"Colour"===(null===e||void 0===e?void 0:e.name)||(null===e||void 0===e||null===(d=e.name)||void 0===d?void 0:d.toLowerCase().includes("color"))||1==(null===e||void 0===e||null===(u=e.values)||void 0===u?void 0:u.length)&&(null===e||void 0===e?void 0:e.position)>1&&(null===e||void 0===e?void 0:e.position)==(null===j||void 0===j||null===(C=j.options)||void 0===C?void 0:C.length))&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(s.kC,{justifyContent:"space-between",alignItems:"center",children:[(0,x.jsx)(s.xv,{fontSize:1*w+"px !important",sx:{color:"black !important",fontFamily:i+" !important",fontWeight:"bold !important"},children:null===e||void 0===e?void 0:e.name}),"Size"===e.name&&(0,c.Ip6)(o)?(0,x.jsx)(s.kC,{marginTop:"4px",whiteSpace:"nowrap",cursor:"pointer",children:(0,x.jsx)(s.xv,{fontSize:.7*w,as:"u",sx:{color:"black !important",fontFamily:i+" !important"},onClick:()=>{null!==l&&l(!0)},children:(0,c.meb)(o)})}):(0,x.jsx)(x.Fragment,{})]}),(0,x.jsx)(s.Ug,{spacing:0,flexWrap:"wrap",alignContent:"flex-start",alignItems:"center",justifyContent:"flex-start",children:null===e||void 0===e||null===(S=e.values)||void 0===S?void 0:S.map((r=>{var l,d,u,C,S,b,I,k,_;const F=((t,e)=>{var n,i,o,r,l,d,s,c;if(null!==j&&void 0!==j&&j.options&&(null===j||void 0===j||null===(n=j.options)||void 0===n?void 0:n.length)>0)switch(null===j||void 0===j||null===(c=j.options)||void 0===c?void 0:c.length){case 1:return null===j||void 0===j||null===(i=j.variants)||void 0===i||null===(o=i.find((e=>(null===e||void 0===e?void 0:e.option1)===t)))||void 0===o?void 0:o.available;case 2:return 0==e||(null===j||void 0===j||null===(r=j.variants)||void 0===r||null===(l=r.find((e=>{var n,i;return(null===e||void 0===e?void 0:e.option2)===t&&(null===e||void 0===e?void 0:e.option1)===a[null===j||void 0===j||null===(n=j.options)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.name]})))||void 0===l?void 0:l.available);case 3:return 0==e||1==e||(null===j||void 0===j||null===(d=j.variants)||void 0===d||null===(s=d.find((e=>{var n,i,o,r;return(null===e||void 0===e?void 0:e.option3)===t&&(null===e||void 0===e?void 0:e.option1)===a[null===j||void 0===j||null===(n=j.options)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.name]&&(null===e||void 0===e?void 0:e.option2)===a[null===j||void 0===j||null===(o=j.options)||void 0===o||null===(r=o[1])||void 0===r?void 0:r.name]})))||void 0===s?void 0:s.available);default:return!0}})(r,n),T=0==n||j.variants.find((t=>{var e,i;return t[`option${n}`]==(null===(e=Object.entries(a))||void 0===e||null===(i=e[n-1])||void 0===i?void 0:i[1])&&t[`option${n+1}`]==r}));return("Colour"===(null===e||void 0===e?void 0:e.name)||null!==e&&void 0!==e&&e.name.toLowerCase().includes("color"))&&T&&((null===t||void 0===t||null===(l=t.finalArr)||void 0===l?void 0:l.length)>0&&(null===t||void 0===t||null===(d=t.finalArr)||void 0===d||!d.includes(null))||(null===t||void 0===t||null===(u=t.finalArrExternal)||void 0===u?void 0:u.length)>0)?(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s.kC,{paddingBottom:"8px",px:"2px",paddingRight:"8px",children:(0,x.jsx)(s.xu,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px",borderRadius:(0,c.lmH)(o),size:"sm",border:a[null===e||void 0===e?void 0:e.name]===r?`2px solid ${(0,c.ua_)(o)} !important`:"",cursor:"pointer",width:"fit-content !important",onClick:()=>{y(null===e||void 0===e?void 0:e.name,r,n),p(r),0===n&&v(r),1===n&&m(r),2===n&&f(r)},children:(0,x.jsx)(g.Ee,{padding:"2px",borderRadius:(0,c.lmH)(o),width:"58px",height:"58px",src:(0,pt.s)(null!==(C=null===t||void 0===t||null===(S=t.finalArr)||void 0===S||null===(b=S.find((t=>(null===t||void 0===t?void 0:t.color)==r)))||void 0===b?void 0:b.src)&&void 0!==C?C:null===t||void 0===t||null===(I=t.finalArrExternal)||void 0===I||null===(k=I.find((t=>(null===t||void 0===t?void 0:t.color)==r)))||void 0===k?void 0:k.optionsrc,"?width=400&height=400")})})},r)}):T&&(0,x.jsx)(s.kC,{paddingBottom:"8px",paddingRight:"8px",children:(0,x.jsx)(J.zx,{isDisabled:!F,size:"sm",px:"8px !important",bg:a[null===e||void 0===e?void 0:e.name]===r&&F?(null!==(_=(0,c.CPm)(o))&&void 0!==_?_:h)+" !important":(0,c.bC3)(o)+" !important",width:"fit-content !important",onClick:()=>{y(null===e||void 0===e?void 0:e.name,r,n),0===n&&v(r),1===n&&m(r),2===n&&f(r)},children:(0,x.jsx)(s.xv,{as:F?"p":"s",fontSize:.9*w+"px !important",sx:{fontFamily:i+" !important",fontWeight:"normal !important",color:a[null===e||void 0===e?void 0:e.name]===r&&F?(0,c.cY_)(o)+" !important":(0,c.FbM)(o)+" !important"},children:r})})},r)}))}),n===(null===j||void 0===j||null===(b=j.options)||void 0===b?void 0:b.length)-1&&(0,x.jsx)(s.M5,{paddingTop:"8px",width:"100%",children:(0,x.jsx)(s.iz,{color:t.dividerColor,size:"xs"})})]})})}))})})}var Zt=n(8782);function Ut(t){var e,n,i,o,l,a,d,p,v,m,f,w,j,y,C,b,I,k,_,F,T;const[E,P,O,L]=(0,h.Z)();var z=.4*L*.8,R=z*(16/9)*.6*.8;const M=1.1*z,D=M*(16/9)*.8;var A=.12*z;const[W,N]=(0,r.useState)(!1),q=t.data,H=t.event,Z=t.product,U=t.setOpenShopNow,B=t.setLockSwiper,[Y]=(0,u.j1)("whatmoreEmbedAppUseVariant"),[X,G]=(0,r.useState)((()=>{if("true"===Y)return Xt(q,Z.client_product_id)})),[$,J]=(0,r.useState)((()=>{if("true"===Y)return Gt(q,Z.client_product_id)})),[Q,tt]=(0,r.useState)((()=>{if("true"===Y)return $t(q,Z.client_product_id)})),[et,nt]=(0,r.useState)(),[it,ot]=(0,r.useState)(1),[at,dt]=(0,r.useState)(),[st,ct]=(0,r.useState)(0),[ut,ht]=(0,r.useState)(!1),[vt,xt]=(0,r.useState)(!1),[mt,gt]=(0,r.useState)(Z.thumbnail_image),ft=(0,r.useContext)(V.I),wt=(0,u.MO)("whatmoreShopId"),jt=(0,r.useCallback)((t=>{G(t)}),[]),yt=(0,r.useCallback)((t=>{J(t)}),[]),Ct=(0,r.useCallback)((t=>{tt(t)}),[]);(0,r.useEffect)((()=>{const t=Bt(q,X,$,Q);nt(t),dt(Yt(q,t)),ot(1),xt(!1);const e=Jt(q,t);null!==e&&gt(e)}),[X,$,Q]),(0,r.useEffect)((()=>{var t,e;const n=void 0===et?null===q||void 0===q||null===(t=q.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.price:Yt(q,et);dt(n*it)}),[it]),(0,r.useEffect)((()=>{function t(t){const e=document.getElementById("whatmore-shopnow-view"),n=document.getElementById("whatmore-size-chart");n&&n.contains(t.target)||!e||e.contains(t.target)||(U(!1),B(!1))}function e(t){t.stopPropagation(),n.scrollTop+=t.deltaY}document.addEventListener("click",t);const n=document.getElementById("whatmore-shopnow-view");return null===n||void 0===n||n.addEventListener("wheel",e),()=>{document.removeEventListener("click",t),n.removeEventListener("wheel",e)}}),[]),(0,r.useEffect)((()=>{const t=async function(t,e){return"shopify"==t?(0,lt.Bi)():(0,rt.OM)(e)}((0,c.Ipo)(wt),wt);t.then((t=>t.json())).then((t=>{ct(t.item_count)})).catch((t=>{console.error("Cart Add Error:",t)}))}),[ut]);const St=`${S.F4`
73
73
  0% {
74
74
  transform: translateY(100%);
75
75
  }
76
- `} 0.5s`,bt=null===q||void 0===q||null===(e=q.options)||void 0===e?void 0:e.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})),[It,kt]=(0,r.useState)(-1!==bt?null===(n=q.options)||void 0===n||null===(i=n[bt])||void 0===i||null===(o=i.values)||void 0===o?void 0:o[0]:""),[_t,Ft]=(0,r.useState)({});(0,r.useEffect)((()=>{-1!==bt&&"whatmore"!==(0,c.Ipo)(wt)&&async function(){const t=await(0,lt.m3)(Z);Ft(t)}()}),[]);let Tt=-1,Et=-1!==bt&&null!==_t&&void 0!==_t&&_t.product&&(null===_t||void 0===_t||null===(l=_t.product)||void 0===l||null===(a=l.images)||void 0===a?void 0:a.length)>=(null===_t||void 0===_t||null===(d=_t.product)||void 0===d||null===(p=d.options)||void 0===p||null===(v=p[bt])||void 0===v||null===(m=v.values)||void 0===m?void 0:m.length)?null===_t||void 0===_t||null===(f=_t.product)||void 0===f||null===(w=f.images)||void 0===w?void 0:w.map((t=>{var e,n,i,o,r,l,a,d,s,c,u,h,p,v;const x=null===_t||void 0===_t||null===(e=_t.product)||void 0===e||null===(n=e.options)||void 0===n?void 0:n.findIndex((t=>"Color"==(null===t||void 0===t?void 0:t.name)||"Colour"==(null===t||void 0===t?void 0:t.name)||"COLOR"==(null===t||void 0===t?void 0:t.name)));return{color:(null===t||void 0===t?void 0:t.variant_ids.length)>0?null===_t||void 0===_t||null===(i=_t.product)||void 0===i||null===(o=i.options)||void 0===o||null===(r=o[x])||void 0===r||null===(l=r.values)||void 0===l?void 0:l[Math.min(++Tt,(null===_t||void 0===_t||null===(a=_t.product)||void 0===a||null===(d=a.options)||void 0===d||null===(s=d[bt])||void 0===s||null===(c=s.values)||void 0===c?void 0:c.length)-1)]:null===_t||void 0===_t||null===(u=_t.product)||void 0===u||null===(h=u.options)||void 0===h||null===(p=h[x])||void 0===p||null===(v=p.values)||void 0===v?void 0:v[Math.max(0,Tt)],src:null===t||void 0===t?void 0:t.src}})):[],Pt=[];if("whatmore"==(0,c.Ipo)(wt)&&(null===q||void 0===q||null===(j=q.images)||void 0===j?void 0:j.length)>0){var Ot;var Lt;if(-1!==(null===q||void 0===q||null===(Ot=q.options)||void 0===Ot?void 0:Ot.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))}))))Pt=null===q||void 0===q||null===(Lt=q.images)||void 0===Lt?void 0:Lt.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc})))}return Tt+1<(null===_t||void 0===_t||null===(y=_t.product)||void 0===y||null===(C=y.options)||void 0===C||null===(b=C[bt])||void 0===b||null===(I=b.values)||void 0===I?void 0:I.length)&&(Et=[]),(0,x.jsxs)(s.kC,{sx:{"&::-webkit-scrollbar":{width:"0px"}},id:"whatmore-shopnow-view",position:"relative",maxHeight:"75vh",overflowY:"scroll",direction:"column",bg:"#FFF",height:"fit-content",opacity:"100%",borderTopRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"xl":null,animation:St,children:[(0,x.jsx)(At,{setOpenShopNow:U,setLockSwiper:B,FONT_SIZE:A}),(0,x.jsx)(s.M5,{marginBottom:"10px",px:"20px",py:"5px",children:(0,x.jsx)(s.kC,{bg:"whiteAlpha.900",width:"fit-content",height:"fit-content",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"lg":null,overflow:"hidden",sx:{borderWidth:(0,c.alU)(wt),borderColor:(0,c.qPe)(wt)},children:(0,x.jsx)(s.kC,{width:"100%",children:(0,x.jsx)(Zt.P,{renderElement:t=>(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s.xu,{width:M+"px",height:D+"px",children:(0,x.jsx)(g.Ee,{width:M+"px",height:D+"px",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"lg":null,src:(0,pt.s)(t.eventData.src,"&width=400&height=400"),alt:Z.handle,sx:{objectFit:(0,c.yOX)(wt)+" !important"},fallback:(0,x.jsx)(K.Z,{width:M+"px",height:D+"px",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"10px":"0px"})})})}),dataList:Et.length>0&&!Et.includes(null)?null===(k=Et)||void 0===k?void 0:k.filter((t=>(null===t||void 0===t?void 0:t.color)==It)):Pt.length>0?[null===(_=Pt)||void 0===_?void 0:_.find((t=>(null===t||void 0===t?void 0:t.color)==It))]:null===q||void 0===q||null===(F=q.images)||void 0===F?void 0:F.map((t=>({src:t.includes("https")?t:"https:"+t}))),spacing:10,defaultHeight:M+"px",defaultWidth:D+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})}),(0,x.jsx)(Ht,{data:q,product:Z,PRODUCT_TILE_HEIGHT:R,PRODUCT_TILE_WIDTH:z,FONT_SIZE:A,getVariantPrice:Yt,selectedVariantId:et,itemPrice:at,itemQuantity:it,setItemQuantity:ot,thumbnailImage:mt}),(null===q||void 0===q||null===(T=q.variants)||void 0===T?void 0:T.length)>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s.M5,{paddingTop:"4px",width:"100%",children:(0,x.jsx)(s.iz,{color:(0,c.W8U)(wt),size:"xs",width:"90%"})}),(0,x.jsx)(Vt,{data:q,dividerColor:(0,c.W8U)(wt),setSelectedColor:kt,finalArr:Et,finalArrExternal:Pt,product:Z,PRODUCT_TILE_HEIGHT:R,PRODUCT_TILE_WIDTH:z,FONT_SIZE:A,selectOptionFirstHandler:jt,selectOptionSecondHandler:yt,selectOptionThirdHandler:Ct,getVariantPrice:Yt,selectedOptionFirst:X,selectedOptionSecond:$,selectedOptionThird:Q,selectedVariantId:et})]}),c.$2G&&((null===q||void 0===q?void 0:q.description)||(null===q||void 0===q?void 0:q.body_html))&&(0,x.jsx)(Wt,{PRODUCT_TILE_HEIGHT:R,FONT_SIZE:A,data:q,handleToggle:()=>N(!W),show:W}),(0,x.jsx)(s.xu,{sx:{pointerEvents:"none"},paddingTop:"20px",opacity:0,children:(0,x.jsx)(Kt,{position:"relative",data:q,FONT_SIZE:A,product:Z})}),(0,x.jsx)(Kt,{position:"fixed",selectedVariantId:et,data:q,FONT_SIZE:A,PRODUCT_TILE_WIDTH:z,product:Z,itemQuantity:it,cartItemCount:st,addToCartFlag:ut,setAddToCartFlag:ht,soldOutFlag:vt,setSoldOutFlag:xt,event:H})]})}const Bt=(t,e,n,i)=>{var o,r,l,a,d,s,c,u,h,p;if(void 0===e&&void 0===n&&void 0===i)return null===t||void 0===t||null===(o=t.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id;if(void 0===i&&void 0===n)return null===(l=t.variants.find((t=>t.option1===e)))||void 0===l?void 0:l.id;if(void 0===i&&void 0===e)return null===(a=t.variants.find((t=>t.option2===n)))||void 0===a?void 0:a.id;if(void 0===n&&void 0===e)return null===(d=t.variants.find((t=>t.option3===i)))||void 0===d?void 0:d.id;if(void 0===n)return null===(s=t.variants.find((t=>t.option1===e&&t.option3===i)))||void 0===s?void 0:s.id;if(void 0===i)return null===(c=t.variants.find((t=>t.option1===e&&t.option2===n)))||void 0===c?void 0:c.id;if(void 0===e)return null===(u=t.variants.find((t=>t.option2===n&&t.option3===i)))||void 0===u?void 0:u.id;const v=null===t||void 0===t?void 0:t.variants.find((t=>t.option1===e&&t.option2===n&&t.option3===i));return void 0===v?null===t||void 0===t||null===(h=t.variants)||void 0===h||null===(p=h[0])||void 0===p?void 0:p.id:v.id},Yt=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id===e)))||void 0===i?void 0:i.price},Xt=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id.toString()===e)))||void 0===i?void 0:i.option1},Gt=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id.toString()===e)))||void 0===i?void 0:i.option2},$t=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id.toString()===e)))||void 0===i?void 0:i.option3},Jt=(t,e)=>{var n;const i=null===t||void 0===t||null===(n=t.variants)||void 0===n?void 0:n.find((t=>t.id==e));return void 0===i?null:null===i||void 0===i||null===(o=i.featured_image)||void 0===o?void 0:o.src;var o},Qt=(0,r.createContext)({setShowOptionsChart:null});var te=function(t){const e=t.event,n=t.data,i=t.currentProduct,o=t.setOpenShopNow,l=t.setLockSwiper,[a,d]=(0,r.useState)(!1);return(0,x.jsx)(Qt.Provider,{value:{setShowOptionsChart:d},children:(0,x.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[(0,x.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",children:(0,x.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,x.jsx)(Ut,{data:n,event:e,product:i,setOpenShopNow:o,setLockSwiper:l})})}),a?(0,x.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",style:{position:"relative",zIndex:1,bottom:"100%"},className:"whatmore-ios-css-relative-fix",id:"whatmore-size-chart",children:(0,x.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,x.jsx)(Lt,{data:n,event:e,product:i,setShowOptionsChart:()=>{d(!1)}})})}):(0,x.jsx)(x.Fragment,{})]})})};var ee=function(t){var e,[n,i,o,l]=(0,h.Z)();const[a,d]=(0,r.useState)(!1),[v,g]=(0,r.useState)(),[f,w]=(0,r.useState)(),j=(0,u.MO)("whatmoreShopId"),y=t.event,C=t.onBack,S=r.useRef(),b=t.isPlaying,I=t.isLast,k=t.setLockSwiper,_=t.selectedVariantId,F=null===(e=t.showOverlay)||void 0===e||e,T="center";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:l,height:o,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:T,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:l/o,children:(0,x.jsx)(m,{height:"100%",width:"100%",url:y.event_hls_url,isPlaying:b,event:y})})})}),F?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:T,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(Ot,{focusRef:S,event:t.event,isLast:I,onCloseCallback:C,productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(j),j);w(t),g(e),d(!0),k(!0)}})})}):(0,x.jsx)(x.Fragment,{}),!0===a?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:T,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(te,{focusRef:S,event:t.event,isLast:I,onCloseCallback:()=>C(),setLockSwiper:k,data:v,currentProduct:f,setOpenShopNow:d,selectedVariantId:_})})}):(0,x.jsx)("div",{})]})})};const ne=function(t,e){return isNaN(t)||isNaN(e)||e<=0||t>e?0:Math.ceil(t/e*100)};function ie(t){var e,n,[i,o,r,l]=(0,h.Z)();const[a]=(0,u.j1)("whatmoreSecondaryColor"),[d]=(0,u.j1)("whatmoreSecondaryColorShade900"),c=t.progress,p=null!==(e=t.totalSiblings)&&void 0!==e?e:1,v=null!==(n=t.indexAmongSiblings)&&void 0!==n?n:0;return(0,x.jsx)(s.Kq,{width:"96%",height:"fit-content",direction:"row",justifyContent:"center",alignItems:"center",spacing:"1px",children:[...Array(p).keys()].map((t=>(0,x.jsx)(s.Kq,{width:"100%",height:.004*r+"px",backgroundColor:t<v?a:d+"99",borderRightRadius:"lg",borderLeftRadius:"lg",direction:"row",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",sx:{display:"block !important"},children:t==v?(0,x.jsx)(s.xu,{height:"100%",width:c+"%",bgColor:a,borderRightRadius:"lg",borderLeftRadius:"lg",sx:{display:"block !important"}}):(0,x.jsx)(x.Fragment,{})},"event-progress-bar-slab-"+t)))})}var oe=n(868),re=n(2630);const le=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t;var ae=n(4862);var de=function(t){var e,n,i,o=t.whatmoreShareTemplateId;const l=t.whatmoreShareStoryId,a=t.whatmoreShareEventId,p=t.event,v=null===(e=t.showShareText)||void 0===e||e,m=null!==(n=t.shareButtonBottomMargin)&&void 0!==n?n:0,g=(0,u.MO)("whatmoreShopId"),f=(0,u.MO)("isInDesignMode"),w=(0,u.MO)("isDemoBrand"),j=(0,u.MO)("whatmorePrimaryFont"),{whatmoreWidgetSourceDetails:y}=(0,r.useContext)(V.I),[C,S,b,I]=(0,h.Z)(),k=null!==(i=t.iconSize)&&void 0!==i?i:.1*I;function _(){const e=(0,u.MO)("whatmoreLandingLocationType");var n;!function(t){f||w||(async()=>{(0,d.x0)(t)})()}(p),(e.startsWith("product")||"embed"===e)&&(o="te"),n="event_product_link"===(0,c.EEC)(g)?p.products[0].product_link||"":window.location.pathname,n=("event_product_link"===(0,c.EEC)(g)?"":window.location.hostname)+n+"?wtt="+o+"&wsid="+l+"&weid="+a,(0,c.lj5)(g)&&(n=n+"&"+(0,c.awP)(g)+"&utm_campaign=video-share&utm_medium="+e);const i={title:(0,c.JNF)(g),text:`${(0,c.Qa8)(g)} \n ${n} ${(0,c.AWG)(g)?"\n \n -via Whatmore":""}`};navigator.share&&!ae.nI?navigator.share(i):(t.setIsModalOpen(!0),t.setShareText([i,n]))}return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",style:{marginBottom:m+"px"},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,x.jsx)(re.Z,{sx:{boxShadow:3,transform:"scaleX(-1)",color:"white",fontSize:k,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),_(),(0,q.GF)({userInteractionType:H.K.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:y,event:p,productList:p.products,ctaList:p.cta})}}),v&&(0,c.u8S)(g)?(0,x.jsxs)(s.xv,{fontSize:.3*k+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:j+" !important",color:"white !important",paddingRight:"10%"},children:["\xa0",p.total_share>(0,c.LWl)(g)?le(p.total_share):"Share","\xa0"]}):(0,x.jsx)(x.Fragment,{})]})})})},se=n(7933),ce=n(2785);var ue=function(t){var e;const n=(0,u.MO)("whatmoreShopId"),i=(0,u.MO)("whatmorePrimaryFont"),o=(0,u.MO)("whatmoreLikedEvents"),l=((0,u.MO)("whatmoreSecondaryColor"),(0,u.MO)("isInDesignMode")),a=(0,u.MO)("isDemoBrand"),{whatmoreWidgetSourceDetails:p}=(0,r.useContext)(V.I),v=t.event,[m,g]=(0,r.useState)(null!==(e=o[v.event_id])&&void 0!==e&&e),[f,w,j,y]=(0,h.Z)(),C=.1*y;function S(t,e){l||a||(async()=>{(0,d.Z6)(t,e)})()}function b(){(0,u.bU)("whatmoreLikedEvents",{...o,[v.event_id]:!m}),m?(S(v,-1),(0,q.GF)({userInteractionType:H.K.VIDEO_UNLIKED,widgetSourceDetails:p,event:v,productList:v.products,ctaList:v.cta})):(S(v,1),(0,q.GF)({userInteractionType:H.K.VIDEO_LIKED,widgetSourceDetails:p,event:v,productList:v.products,ctaList:v.cta})),g(!m)}const I=v.total_like+(m?1:0);return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[m?(0,x.jsx)(ce.Z,{sx:{boxShadow:3,color:(0,c.dmX)(n),fontSize:C,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}):(0,x.jsx)(se.Z,{sx:{boxShadow:3,color:"white",fontSize:C,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}),(0,x.jsx)(x.Fragment,{children:(0,c.CEM)(n)?(0,x.jsxs)(s.xv,{fontSize:.3*C+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:i+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",I>=(0,c.zKg)(n)?le(I):"Like","\xa0"]}):(0,x.jsx)(x.Fragment,{})})]})})})};const he=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#25D366",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"white",class:"bi bi-whatsapp",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})})})};var pe=n(8866);const ve=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-twitter-x",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{d:"M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865z"})})})},xe=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-copy",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z"})})})};var me=t=>{const e=t.shareText,[n,i]=(0,r.useState)("Copy link"),[o,l]=(0,r.useState)("");return(0,x.jsx)(x.Fragment,{children:t.isModalOpen&&(0,x.jsxs)("div",{className:"modal-overlay",style:{backgroundColor:"white",borderRadius:"10px",padding:"12px 12px 20px 12px"},children:[(0,x.jsxs)("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",paddingBottom:"6px"},children:[(0,x.jsx)("img",{onClick:()=>{window.location.href="https://whatmore.ai"},src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",backgroundColor:"transparent",borderRadius:"0px",width:Math.min(t.iconSize,28)+"px"}}),(0,x.jsx)(P.Z,{onClick:e=>{e.stopPropagation(),t.setIsModalOpen(!1)}})]}),(0,x.jsx)("div",{}),(0,x.jsx)(s.iz,{color:"blackAlpha.500",size:"1px",width:"100%"}),(0,x.jsxs)("div",{className:"social-icons",style:{display:"flex",gap:"20px",justifyContent:"center",paddingTop:"12px"},children:[(0,x.jsxs)("div",{onClick:t=>{var n;t.stopPropagation();const i=encodeURIComponent(null===(n=e[0])||void 0===n?void 0:n.text);window.open(`https://wa.me/?text=${i}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(he,{iconSize:Math.min(t.iconSize,30)}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"Whatsapp"})]}),(0,x.jsxs)("div",{onClick:t=>{var n;t.stopPropagation();const i=encodeURIComponent(null===(n=e[0])||void 0===n?void 0:n.text);window.open(`https://twitter.com/intent/tweet?text=${i}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(ve,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"X"})]}),(0,x.jsxs)("div",{onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(e[1]),i("Link copied"),l("green")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(xe,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14),color:o},children:n})]})]})]})})};function ge(t){var e;const n=t.event,[i,o,l,a]=(0,h.Z)(),[d]=(0,u.j1)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:p}=(0,r.useContext)(V.I),[v]=(0,u.j1)("whatmoreSecondaryColor"),[m]=(0,u.j1)("whatmoreShopId"),g=(0,c.f63)(m),f=null!==(e=(0,c.u2W)(m))&&void 0!==e?e:[v,g,v,g,v],w=(0,r.useRef)(null);return(0,r.useEffect)((()=>{w.current&&w.current.play()}),[]),(0,x.jsx)(x.Fragment,{children:p?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",padding:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-start",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{overflow:"hidden",size:.14*a+"px",sx:{boxShadow:"0px 2px 1px 0px "+f[0]+"50, 0px -2px 1px 0px "+f[1]+"50, 2px 0px 1px 0px "+f[2]+"50, -2px 0px 1px 0px "+f[3]+"80, 2px -2px 1px 0px "+f[4]+"80, -2px 2px 1px 0px "+f[0]+"DA, 2px 2px 1px 0px "+f[1]+"DA, -2px -2px 1px 0px "+f[2]+"DA"},children:"video"==(0,pt.$)((0,oe.V)(n.storyset_thumbnail_image))?(0,x.jsx)("video",{className:"whatmore-story-thumbnail",ref:w,preload:"metadata",loop:!0,playsInline:!0,src:(0,oe.V)(n.storyset_thumbnail_image),muted:!0,alt:"story image"}):(0,x.jsx)("img",{src:(0,oe.V)(n.storyset_thumbnail_image),style:{objectFit:"cover",height:"100%",width:"100%",backgroundColor:"white"}})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:.05*a+"px",fontWeight:"medium",lineHeight:"100%",sx:{fontFamily:d+" !important",color:"white !important",textShadow:"0px 0px 4px black !important;"},children:n.storyset_name})})]})}):(0,x.jsx)(x.Fragment,{})})}var fe=function(t){const[e,n,i]=(0,pe.Z)(),[o]=(0,u.j1)("isInDesignMode"),[l]=(0,u.j1)("isDemoBrand"),[a,p]=(0,u.j1)("isProductSwiperCatalogOpen"),[v,m]=(0,u.j1)("isFirstIndicatorRenderDone"),[g]=(0,u.j1)("whatmoreShopId"),f=(0,r.useContext)(ln),{whatmoreEventsBrowsingTemplate:w}=(0,r.useContext)(V.I),[j,C,S,b]=(0,h.Z)(),I=(0,u.MO)("whatmorePrimaryFont"),k=t.event,_=t.storySetId,F=t.isLast,E=t.onCloseCallback,P=t.focusRef,L=t.productClickHandler,z=t.videoPlayingData,R=t.totalSiblingEvents,M=t.indexAmongSiblings,K=t.leftOpenSpaceClickHandler,A=t.midOpenSpaceClickHandler,W=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:N}=(0,r.useContext)(V.I),Z=.1*b,[U,B]=(0,r.useState)(!1),[Y,X]=(0,r.useState)([]),G=t=>{$.current&&!$.current.contains(t.target)&&B(!1)},$=(0,r.useRef)(null);return(0,r.useEffect)((()=>(U?document.addEventListener("click",G):document.removeEventListener("click",G),()=>{document.removeEventListener("click",G)})),[U]),(0,x.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[U&&(0,x.jsx)("div",{ref:$,className:"whatmore-share-modal",style:{zIndex:100,position:"absolute",boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.6)",width:"75%",top:"45%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},children:(0,x.jsx)(me,{shareText:Y,setShareText:X,iconSize:Z,isModalOpen:U,setIsModalOpen:B})}),(0,x.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,x.jsxs)(s.Kq,{width:"full",height:"fit-content",direction:"column",justifyContent:"flex-start",alignItems:"center",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:[f.showVideoPlayingData?(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,x.jsx)(ie,{progress:ne(z.current_time,z.video_duration),totalSiblings:R,indexAmongSiblings:M})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{width:"full",margin:"2px",marginTop:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",paddingRight:"10px",paddingLeft:"10px",children:[(0,x.jsx)(ge,{event:k}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,mt.ZK)(w)?(0,x.jsx)(de,{whatmoreShareTemplateId:(0,mt.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:k.event_id,event:k,showShareText:!1,iconSize:.07*b,shareButtonBottomMargin:6,setIsModalOpen:B,setShareText:X}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(y,{focusRef:P}),("landscape"!==e||t.showCloseOverlay)&&(0,x.jsx)(O,{event:k,onCloseCallback:E})]})]})})]}),(0,x.jsxs)(s.Kq,{width:"100%",height:"100%",direction:"row",justifyContent:"center",children:[(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{K()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"34%",height:"100%",onClick:()=>{A()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{W()},sx:{display:"block !important"}})]}),(0,x.jsxs)(s.xu,{width:"full",height:"fit-content",children:[f.totalEvents>1&&!v&&f.showSwipeIndicator?(0,x.jsx)(s.xu,{width:"full",margin:"2px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,x.jsx)(D,{swipeUp:!F})})}):null,(0,x.jsxs)(s.xu,{width:"fit-content",height:"fit-content",position:"absolute",right:0,bottom:"25%",children:[(0,c.slY)(g)&&!(0,mt.ZK)(w)?(0,x.jsx)(s.xu,{ml:"auto",width:"fit-content",paddingY:"12px",paddingX:"8px",children:(0,x.jsxs)(s.Kq,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:function(){var t;o||l||(async()=>{(0,d.lY)(k,1)})(),(0,q.GF)({userInteractionType:H.K.WHATSAPP_ICON_CLICKED,widgetSourceDetails:N,event:k,productList:null===k||void 0===k?void 0:k.products,ctaList:null===k||void 0===k?void 0:k.cta});const e=k.products.map((t=>`${t.product_link} \n`)),n=(0,c.gtK)(g),i=`Hey, I am interested in ${k.products.length>1?"these products":"this product"} I saw on ${null===(t=k.products[0])||void 0===t?void 0:t.brand} store: \n${e}. Could you please help me with some queries?`;window.open(n+`&text=${i}&type=phone_number`,"_blank")},children:[(0,x.jsx)(he,{iconSize:.7*Z,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)(s.xv,{fontSize:Z*(0,c.Xod)(g)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:I+" !important",color:"white !important"},children:(0,c.UiZ)(g)})]})}):(0,x.jsx)(x.Fragment,{}),(0,c.jY3)(g)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(ue,{event:k})})}):(0,x.jsx)(x.Fragment,{}),(0,c.ROU)(g)&&!(0,mt.ZK)(w)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(de,{whatmoreShareTemplateId:(0,mt.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:k.event_id,event:k,setIsModalOpen:B,setShareText:X})})}):(0,x.jsx)(x.Fragment,{})]}),(0,_t.kT)(k)?(0,x.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(g)?(0,x.jsx)(s.xu,{w:"100%",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(T,{event:k,onToggle:t=>{p("minimize-button"!==t)}})})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,x.jsx)(Et,{event:k,productClickHandler:L})})]}):(0,x.jsx)(x.Fragment,{})]})]})]})},we=n(2279),je=n.n(we),ye=n(342);var Ce=function(t){var e,n,i,o,l,a,[d,m,g,f]=(0,h.Z)();const[w,j]=(0,r.useState)(!1),[y,C]=(0,r.useState)(),[S,b]=(0,r.useState)(),[I,k]=(0,r.useState)({current_time:0,video_duration:0,is_video_ended:!1}),_=(0,u.MO)("whatmoreShopId"),F=t.event,T=t.storyId,E=t.onBack,P=r.useRef(),O=t.isPlaying,L=t.isLast,z=t.setLockSwiper,R=t.onVideoEndedCallback,M=t.progressUpdateCallback,D=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,K=null!==(n=t.indexAmongSiblings)&&void 0!==n?n:0,A=null===(i=t.showOverlay)||void 0===i||i,W=null!==(o=t.leftOpenSpaceClickHandler)&&void 0!==o?o:()=>{},N=null!==(l=t.midOpenSpaceClickHandler)&&void 0!==l?l:()=>{},Z=null!==(a=t.rightOpenSpaceClickHandler)&&void 0!==a?a:()=>{},{whatmoreWidgetSourceDetails:U}=(0,r.useContext)(V.I),B="center";let Y;try{Y=je()((()=>{R()}),1e3,{leading:!0,trailing:!1})}catch(X){console.log(X)}return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:f,height:g,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:B,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:f/g,children:(0,x.jsx)(v.Z,{height:"100%",width:"100%",url:(0,oe.V)((0,ye.uv)(F)),isPlaying:O,timeUpdateCallback:function(t,e){const n=ne(t,e);M(n);const i=I.is_video_ended;n>=99&&O&&!i?(Y(),k({current_time:t,video_duration:e,is_video_ended:!0})):k({current_time:t,video_duration:e,is_video_ended:i})},event:F,source:t.source})})})}),A?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:B,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(fe,{focusRef:P,event:t.event,isLast:L,onCloseCallback:t=>{E(t),(0,q.Z2)({userInteractionType:H.K.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:I.current_time},widgetSourceDetails:U,event:F,productList:F.products,ctaList:F.cta})},productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(_),_);b(t),C(e),j(!0),z(!0),(0,q.GF)({userInteractionType:H.K.SHOPNOW_CLICKED,widgetSourceDetails:U,event:F,productList:F.products,ctaList:F.cta}),(0,u.bU)("whatmoreAllowAutoSlide",!1)},videoPlayingData:I,totalSiblingEvents:D,indexAmongSiblings:K,leftOpenSpaceClickHandler:W,midOpenSpaceClickHandler:N,rightOpenSpaceClickHandler:Z,storySetId:T,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay})})}):(0,x.jsx)(x.Fragment,{}),!0===w?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:B,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(te,{focusRef:P,event:t.event,isLast:L,onCloseCallback:()=>E(),setLockSwiper:z,data:y,currentProduct:S,setOpenShopNow:t=>{j(t),(0,u.bU)("whatmoreAllowAutoSlide",!t)}})})}):(0,x.jsx)("div",{})]})})},Se=n(7300),be=n(8984),Ie=n(58),ke=n(9723);var _e=function(t){var[e,n,i,o]=(0,h.Z)();const r=(0,u.MO)("whatmoreShopId"),l=t.event,a=t.isPlaying,d="center";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:o,height:i,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:d,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:o/i,children:(0,x.jsx)(v.Z,{height:"100%",width:"100%",url:(0,oe.V)((0,ye.uv)(l)),isPlaying:a,timeUpdateCallback:function(t,e){},event:l,source:t.source})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:d,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",backdropFilter:"auto",backdropBlur:"10px",onClick:t=>{(0,Ie.QV)()},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"full",width:"full",children:[(0,x.jsx)(ke.Z,{sx:{boxShadow:3,color:(0,c.Ya_)(r),fontSize:.4*o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{(0,Ie.QV)()}}),(0,x.jsx)(s.xv,{color:"white",fontSize:.05*o+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},Fe=n(3433);var Te=function(t){var e,n;const r=t.event,l=null===(e=t.isPlaying)||void 0===e||e,a=t.onBack,d=t.isLast,s=t.setLockSwiper,c=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),h=t.progressUpdateCallback,[p,v]=(0,j.Z)(),[m]=(0,u.j1)("whatmoreVideoPlayerPoolBlessed"),g=null===(n=t.showOverlay)||void 0===n||n;function f(){v(!p)}if((0,be.KE)()&&0==m)return(0,x.jsx)(_e,{event:r,onBack:a,isPlaying:l,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:h,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:g,source:Fe.j.CAROUSEL_EVENT_OPENED},"shopping-video-view"+r.event_id);if((0,Se.B6)(r)||(0,Se.WJ)(r))return(0,x.jsx)(Ce,{event:r,onBack:a,isPlaying:l,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:h,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:g,source:Fe.j.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id);if((0,Se.yC)(r)){var{status:w,bannerText:y,timeToStartInMins:C}=i.Z.getEventStatus(r);if(w.name===o.Z.LIVE.name)return(0,x.jsx)(ee,{event:r,onBack:a,isPlaying:l,isLast:d,showOverlay:g},"shopping-live-view"+r.event_id)}return console.error("Can't render event which is neither video or a currently-live-event"),(0,x.jsx)("div",{})},Ee=n(9284),Pe=n.n(Ee),Oe=n(7463),Le=n(2154);function ze(t){var e;const[n,i]=(0,r.useState)(!1),o=t.onClick,l=null!==(e=t.fontSize)&&void 0!==e?e:50;return(0,x.jsx)("div",{style:{height:"fit-content",width:"fit-content",backgroundColor:"black",opacity:.4,borderRadius:"50%"},className:[n?"whatmore-scale-on-tap":""].join(" "),children:"left"===t.type?(0,x.jsx)(Le.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{i(!0),setTimeout((()=>{i(!1)}),500),o(t,"up")}}):(0,x.jsx)(Oe.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{i(!0),setTimeout((()=>{i(!1)}),500),o(t,"down")}})})}var Re=function(t){var e,n,i;const o=null!==(e=t.relativeBottomPercentage)&&void 0!==e?e:"30%",r=null!==(n=t.width)&&void 0!==n?n:"100%",l=null!==(i=t.fontSize)&&void 0!==i?i:50,a=t.handleClick;return(0,x.jsx)("div",{style:{position:"relative",zIndex:1,bottom:o,width:"100%",height:"fit-content",display:"flex",flexFlow:"row nowrap",justifyContent:"center"},id:"here",children:(0,x.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:r,height:"fit-content",paddingRight:"5px",paddingLeft:"5px",paddingTop:"5px",paddingBottom:"5px",justifyContent:"space-between",alignContent:"center"},children:[(0,x.jsx)(ze,{type:"left",onClick:a,fontSize:l}),(0,x.jsx)(ze,{type:"right",onClick:a,fontSize:l})]})})},Me=n(2860),De=n(4669);var Ke=function(t,e){function n(t,e){return 1==e?0:t<0?e+t:t>=e?t-e:t}const i=(0,r.useRef)({prevIndex:n(t-1,e),activeIndex:t,nextIndex:n(t+1,e)});return[function(){return i.current},function(t){i.current="right"==t?{prevIndex:n(i.current.activeIndex,e),activeIndex:n(i.current.activeIndex+1,e),nextIndex:n(i.current.activeIndex+2,e)}:{prevIndex:n(i.current.activeIndex-2,e),activeIndex:n(i.current.activeIndex-1,e),nextIndex:n(i.current.activeIndex,e)}},function(t){return n(i.current.activeIndex+t)}]};var Ae=function(t,e){const n=(0,r.useRef)({clientX:0,clientY:0});return[function(t){n.current.clientX=t.changedTouches[0].clientX,n.current.clientY=t.changedTouches[0].clientY},function(i){const o=n.current.clientX,r=n.current.clientY;var l=o-i.changedTouches[0].clientX,a=r-i.changedTouches[0].clientY;return"vertical"==t&&Math.abs(a)>e||"horizontal"==t&&Math.abs(l)>e?"vertical"==t?a>0?"right":"left":l>0?"right":"left":null}]};var We=function(t,e){const n=(0,r.useRef)(je()(((t,e)=>{t(e)}),300,{leading:!0,trailing:!1}));return[function(i,o){var r=0;if(r="vertical"==t?i.deltaY:i.deltaX,Math.abs(r)<=e)return;const l=r>0?"right":"left";n.current(o,l)}]},Ne=n(5173);var qe=function(t){const e=t.events,n=t.eventIndex,i=t.onBack;var[o,p,v,m]=(0,h.Z)();const[g]=(0,u.j1)("isInDesignMode"),[f]=(0,u.j1)("isDemoBrand"),[w,j]=(0,r.useState)(!0),[y,C]=(0,u.j1)("isFirstIndicatorRenderDone"),[S,b]=(0,r.useState)(!1),{setCloseClickComponent:I}=(0,r.useContext)(ln),{slideDirection:k}=(0,r.useContext)(ln),[_]=(0,u.j1)("whatmoreShopId"),[F]=(0,u.j1)("whatmoreLandingLocationType"),[T,E]=Ke(n,e.length),[P,O]=Ae(k,50),[L]=We("vertical",30),[z,R]=(0,r.useState)(!1),[M,D]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:K,whatmoreUserInfo:A}=(0,r.useContext)(V.I);function N(){R(!1)}function Z(t){N(),setTimeout((()=>{i(t)}),500)}(0,r.useEffect)((()=>(R(!0),()=>{})),[]);const U=K.landingLocationType,B=K.templateType;function Y(){(0,u.MO)("whatmoreAllowAutoSlide")&&(E("right"),M.slideNext())}function X(t,e){E(e),function(t,e){M&&("left"===e?M.slidePrev():M.slideNext())}(0,e)}I(Z);const G=Math.round(.05*v);return(0,x.jsx)(Pe(),{isOpen:z,onAfterOpen:function(){},onRequestClose:N,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)(Ne.Z,{children:(0,x.jsxs)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:(0,W.lA)("#000000",13)},onTouchStart:t=>{P(t)},onTouchEnd:t=>{const e=O(t);e&&X(0,e)},onWheel:t=>{L(t,(t=>{X(0,t)}))},children:[(0,x.jsx)(l.tq,{speed:400,threshold:G,slidesPerView:1,direction:k,modules:[a.tl,a.Gk],initialSlide:n,loop:1!=e.length,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,allowSlideNext:!S,allowSlidePrev:!S,allowTouchMove:!1,onSwiper:t=>{D(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:K,event:e[T().activeIndex],productList:e[T().activeIndex].products})},onSlideChange:t=>{var n;w?j(!1):(y||C(!0),n=e[T().activeIndex],g||f||(async()=>{const t=(0,mt.NY)(U)+(0,mt.dS)(B)+"_"+(null===n||void 0===n?void 0:n.event_id);(0,d.wh)(n),"index"===F?((0,De.Tc)(_,Me.Xh,Me.pR),(0,ot.H4)(n.event_id,n.products,Me.Xh,Me.pR,t,null===n||void 0===n?void 0:n.location,null===A||void 0===A?void 0:A.userType)):F.startsWith("product")||"embed"===F?((0,De.Tc)(_,Me.h7,Me.dU),(0,ot.H4)(n.event_id,n.products,Me.h7,Me.dU,t)):F.startsWith("collection")?((0,De.Tc)(_,Me.U$,Me.Pk),(0,ot.H4)(n.event_id,n.products,Me.U$,Me.Pk,t)):((0,De.Tc)(_,Me.Xh,Me.pR),(0,ot.H4)(n.event_id,n.products,Me.Xh,Me.pR,t))})(),(0,q.y4)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:K,event:e[T().activeIndex],productList:e[T().activeIndex].products}))},children:[...Array(Math.min(e.length,3)).keys()].map((n=>(0,x.jsx)(l.o5,{children:n=>{let{isActive:i,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=n;const d=i?"activeIndex":o?"prevIndex":"nextIndex";return(0,x.jsx)(s.Kq,{direction:"column",height:window.innerHeight,justifyContent:"center",children:(0,x.jsx)(Te,{event:e[T()[d]],onBack:Z,isPlaying:1==e.length||i&&l,isLast:!1,setLockSwiper:b,onVideoEndedCallback:Y,progressUpdateCallback:t=>{},showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay})})}},"event-vertical-scroll-slide-"+n)))}),e.length>1&&!S&&(0,c.h6H)(_)&&"horizontal"===(0,c.e8z)(_)&&"horizontal"===k?(0,x.jsx)(Re,{relativeBottomPercentage:"50%",width:m,handleClick:(t,e)=>{X(0,"down"==e?"right":"left")},fontSize:parseInt(.12*m)}):(0,x.jsx)(x.Fragment,{})]})})})},He=n(1168);n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811);const Ve=t=>{let{children:e,customClass:n,show:i,closeCallback:o}=t;return He.createPortal((0,x.jsxs)("div",{className:`whatmore-landscape-modal whatmore-root ${n}`,style:{display:i?"block":"none"},children:[(0,x.jsx)("div",{className:"whatmore-landscape-modal-overlay",onClick:o}),(0,x.jsx)("div",{className:"whatmore-landscape-modal-content",children:e})]}),document.body)};Ve.defaultProps={children:(0,x.jsx)("div",{children:"Empty Modal"}),customClass:"",show:!1,closeCallback:()=>!1};var Ze=Ve;var Ue=function(t){var e;const n=(0,u.MO)("whatmorePrimaryFont"),i=(0,u.MO)("whatmoreShopId"),o=null!==(e=t.fontSize)&&void 0!==e?e:"8";return(0,x.jsx)(s.rU,{href:"https://www.whatmore.ai/shoppable-videos",isExternal:!0,children:(0,c.XFt)(i)&&(0,x.jsxs)(s.Kq,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"2px",paddingLeft:"2px",paddingRight:"2px",paddingBottom:"2px",marginBottom:"2px",children:[(0,x.jsx)("p",{style:{textAlign:"center",color:"white",fontFamily:n,fontWeight:"normal",fontSize:1.1*o+"px",margin:0,padding:0,lineHeight:"110%"},children:"powered by Whatmore"}),(0,x.jsx)(s.xu,{width:"10px"}),(0,x.jsx)("img",{src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",width:1.7*o,backgroundColor:"transparent",borderRadius:"0px"}})]})})};var Be=function(t){var[e,n,i,o]=(0,h.Z)();const[p]=(0,u.j1)("isInDesignMode"),[v]=(0,u.j1)("isDemoBrand"),[m,g]=(0,u.j1)("isFirstIndicatorRenderDone"),[f,w]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:j}=(0,r.useContext)(ln),[y,C]=(0,r.useState)(!1),[S]=(0,u.j1)("whatmoreShopId"),[b]=(0,u.j1)("whatmoreLandingLocationType"),{whatmoreUITheme:I}=(0,r.useContext)(V.I),{whatmoreWidgetSourceDetails:k,whatmoreUserInfo:_}=(0,r.useContext)(V.I),[F,T]=(0,r.useState)(!1),[E,P]=(0,r.useState)(null);function L(){T(!1)}const z=t.events,R=t.eventIndex,M=t.onBack,D=z.concat(z),K=z.length,A=(0,r.useRef)(0);function N(t){L(),setTimeout((()=>{M(t)}),500)}function Z(){E&&!E.isEnd&&(0,u.MO)("whatmoreAllowAutoSlide")&&E.slideNext()}(0,r.useEffect)((()=>(T(!0),()=>{})),[]),j(N);const U=k.landingLocationType,B=k.templateType,Y=parseInt(Math.min(5,z.length));return(0,x.jsx)(Ze,{show:F,closeCallback:L,customClass:"whatmore-landscape-modal-swipe-view",children:(0,x.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",aligntItems:"center",backgroundColor:(0,W.lA)("#000000",13),children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:o*Y,children:(0,x.jsxs)(l.tq,{onInit:t=>{P(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:k,event:z[t.activeIndex],productList:z[t.activeIndex].products,ctaList:z[t.activeIndex].cta})},slidesPerView:Y,centeredSlides:!0,allowTouchMove:!1,initialSlide:R,modules:[a.lI,a.W_,a.Gk,a.pt,a.tl],navigation:Y>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*i),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:o*Y,watchSlidesProgress:!0,onSlideChange:t=>{var e;f?w(!1):(m||g(!0),e=z[t.activeIndex],p||v||(async()=>{const t=(0,mt.NY)(U)+(0,mt.dS)(B)+"_"+(null===e||void 0===e?void 0:e.event_id);(0,d.wh)(e),"index"===b?((0,De.Tc)(S,Me.Xh,Me.pR),(0,ot.H4)(e.event_id,e.products,Me.Xh,Me.pR,t,null===e||void 0===e?void 0:e.location,null===_||void 0===_?void 0:_.userType)):b.startsWith("product")||"embed"===b?((0,De.Tc)(S,Me.h7,Me.dU),(0,ot.H4)(e.event_id,e.products,Me.h7,Me.dU,t)):b.startsWith("collection")?((0,De.Tc)(S,Me.U$,Me.Pk),(0,ot.H4)(e.event_id,e.products,Me.U$,Me.Pk,t)):((0,De.Tc)(S,Me.Xh,Me.pR),(0,ot.H4)(e.event_id,e.products,Me.Xh,Me.pR,t))})(),(0,q.y4)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:k,event:z[t.activeIndex],productList:z[t.activeIndex].products,ctaList:z[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[z.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(O,{onCloseCallback:M})}),D.slice(R,z.length+R).map(((t,e)=>(0,x.jsx)(l.o5,{children:t=>{let{isActive:n,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=t;if(n)return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:1*o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Te,{event:z[e%K],onBack:N,isPlaying:!0,isLast:e%K===z.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:Z,progressUpdateCallback:t=>{},showCloseOverlay:(null===z||void 0===z?void 0:z.length)<=2})})});if(l)return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{E.slideTo(e%K,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Te,{event:z[e%K],onBack:N,isPlaying:!1,isLast:e%K===z.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:Z,progressUpdateCallback:t=>{},showOverlay:!1})})});if(r&&1===A.current)return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{E.slideTo(e%K,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Te,{event:z[e%K],onBack:N,isPlaying:!1,isLast:e%K===z.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:Z,progressUpdateCallback:t=>{},showOverlay:!1})})});try{R+e>=K-1&&(A.current=1)}catch(u){console.log(u)}return(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(Ue,{height:.04*i,width:.1*o,fontSize:.02*i})})]})})},Ye=n(6090),Xe=n(7616),Ge=n(9302),$e=n(2575);var Je=function(t){const[e,n,i,o]=(0,h.Z)(),[r]=(0,u.j1)("whatmorePrimaryColor"),[l]=(0,u.j1)("whatmoreSecondaryColor"),a="flex-end";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:o,height:i,backgroundColor:"whiteAlpha.200",backdropBlur:"10px",children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:a,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.oM,{width:"full",ratio:o/i,children:(0,x.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+r+", gray, "+l+")"})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:a,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{padding:"2px",margin:"5px",borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,x.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",backdropFilter:"auto",backdropBlur:"5px"})})})})]})})};var Qe=function(t){var e;const n=t.stories,i=t.onBack,o=t.onStoryCompleteCallback,a=t.isActive,c=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,p=n.events;var[v,m,g,f]=(0,h.Z)();const[w,y]=(0,j.Z)(),[C]=(0,u.j1)("isInDesignMode"),[S]=(0,u.j1)("isDemoBrand"),[b]=(0,u.j1)("whatmoreShopId"),[I,k]=(0,r.useState)(!0),[_,F]=(0,u.j1)("isFirstIndicatorRenderDone"),[T,E]=(0,r.useState)(null),[P,O]=(0,r.useState)(!1),{whatmoreWidgetSourceDetails:L,whatmoreUserInfo:z}=(0,r.useContext)(V.I),[R,M]=Ke(c,p.length);function D(t){i(t)}const K=L.landingLocationType,A=L.templateType;function W(){if(!(0,u.MO)("whatmoreAllowAutoSlide"))return;R().activeIndex+1>=p.length?o("right"):(M("right"),T&&T.slideNext())}function N(t){const e=R().activeIndex;"right"==t&&e+1>=p.length||"left"==t&&e-1<0?o(t):(M(t),T&&("left"==t?T.slidePrev():T.slideNext()))}return p[R().activeIndex],(0,x.jsx)("div",{children:(0,x.jsx)(l.tq,{speed:1,slidesPerView:1,direction:"horizontal",initialSlide:0,loop:!0,height:g,width:f,watchSlidesProgress:!0,allowTouchMove:!1,onSwiper:t=>{E(t)},onSlideChange:t=>{I?k(!1):(_||F(!0),function(t){const e=(0,mt.NY)(K)+(0,mt.dS)(A)+"_"+(null===t||void 0===t?void 0:t.event_id);C||S||(async()=>{(0,d.wh)(t),(0,De.Tc)(b,Me.Xh,Me.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===z||void 0===z?void 0:z.userType)})()}(p[R().activeIndex]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:L,event:p[R().activeIndex],productList:p[R().activeIndex].products,ctaList:p[R().activeIndex].cta}))},children:[...Array(Math.min(p.length,3)).keys()].map((e=>(0,x.jsx)(l.o5,{children:e=>{let{isActive:i,isPrev:o,isNext:r,isVisible:l,isDuplicate:d}=e;if(a){const e=i?"activeIndex":o?"prevIndex":"nextIndex",r=p[R()[e]];return(0,x.jsx)(s.Kq,{direction:"column",height:g,justifyContent:"center",children:(0,Se.B6)(r)||(0,Se.WJ)(r)?(0,x.jsx)(Ce,{event:r,totalSiblingEvents:p.length,indexAmongSiblings:R()[e],onBack:D,isPlaying:a&&i&&l,isLast:!1,setLockSwiper:O,onVideoEndedCallback:W,progressUpdateCallback:t=>{},leftOpenSpaceClickHandler:()=>{N("left")},midOpenSpaceClickHandler:()=>{y(!w)},rightOpenSpaceClickHandler:()=>{N("right")},storyId:n.id,source:Fe.j.STORY_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id):(0,x.jsx)(x.Fragment,{})})}return(0,x.jsx)(s.Kq,{direction:"column",height:v,justifyContent:"center",children:(0,x.jsx)(Je,{})})}},"event-story-view-slide-"+e)))})})};var tn=function(t){const e=t.onBack,n=t.eventsStories,i=t.initialStoryIndex;var[o,c,p,v]=(0,h.Z)();const[m]=(0,u.j1)("isInDesignMode"),[g]=(0,u.j1)("isDemoBrand"),[f,w]=(0,r.useState)(!0),[j,y]=(0,u.j1)("isFirstIndicatorRenderDone"),[C,S]=(0,r.useState)(!1),{setCloseClickComponent:b}=(0,r.useContext)(ln),{slideDirection:I}=(0,r.useContext)(ln),[k]=(0,u.j1)("whatmoreShopId"),[_,F]=Ke(i,n.length),[T,E]=Ae("horizontal",50),[P]=We("vertical",30),O=t.eventIndex,[L,z]=(0,r.useState)(!1),[R,M]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:D,whatmoreUserInfo:K}=(0,r.useContext)(V.I);function A(){z(!1)}function W(t){A(),setTimeout((()=>{e(t)}),500)}(0,r.useEffect)((()=>(z(!0),()=>{})),[]),b(W);const N=D.landingLocationType,Z=D.templateType;function U(t){R&&(0,u.MO)("whatmoreAllowAutoSlide")&&(F(t),"right"==t?R.slideNext():R.slidePrev())}function B(t,e){U(e)}return(0,x.jsx)(Pe(),{isOpen:L,onAfterOpen:function(){},onRequestClose:A,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:"#00000088"},onTouchStart:t=>{T(t)},onTouchEnd:t=>{const e=E(t);e&&B(0,e)},onWheel:t=>{P(t,(t=>{B(0,t)}))},children:(0,x.jsx)(l.tq,{speed:1,slidesPerView:1,direction:"horizontal",modules:[a.SH,a.Gk],initialSlide:i,loop:n.length>1,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,onSwiper:t=>{var e,i;M(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:D,event:n[_().activeIndex].events[0],productList:null===(e=n[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=n[_().activeIndex].events[0])||void 0===i?void 0:i.cta})},onSlideChange:t=>{var e,i;f?w(!1):(!function(t){const e=(0,mt.NY)(N)+(0,mt.dS)(Z)+"_"+(null===t||void 0===t?void 0:t.event_id);m||g||(async()=>{(0,d.wh)(t),(0,De.Tc)(k,Me.Xh,Me.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===K||void 0===K?void 0:K.userType)})()}(n[_().activeIndex].events[0]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:D,event:n[_().activeIndex].events[0],productList:null===(e=n[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=n[_().activeIndex].events[0])||void 0===i?void 0:i.cta}))},allowTouchMove:!1,cubeEffect:{shadow:!0,slideShadows:!0,shadowOffset:20,shadowScale:.94},children:[...Array(Math.min(n.length,3)).keys()].map((t=>(0,x.jsx)(l.o5,{children:t=>{let{isActive:e,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=t;const c=e?"activeIndex":r?"prevIndex":"nextIndex";return(0,x.jsx)(s.Kq,{direction:"column",height:o,justifyContent:"center",children:(0,x.jsx)(Qe,{stories:n[_()[c]],onBack:W,isActive:e&&a,isNext:l,isPrev:r,onStoryCompleteCallback:U,nextStories:n[_().nextIndex],prevStories:n[_().prevIndex],initialEventIndex:i==_()[c]?O:0},"event-story-view-"+n[_()[c]].id)})}},"event-vertical-scroll-slide-"+t)))})})})},en=n(4892);var nn=function(t){var e,n,i,[o,l,a,d]=(0,h.Z)();const[c]=(0,u.j1)("whatmorePrimaryColor"),[p]=(0,u.j1)("whatmoreSecondaryColor"),v=t.event,m=(t.onBack,r.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),f=null!==(n=t.heightFactor)&&void 0!==n?n:1,w="flex-end";return d*=null!==(i=t.widthFactor)&&void 0!==i?i:1,a*=f,(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:d,height:a,children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:w,height:"full",width:"full",children:(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:m?(0,Se.B6)(v)||(0,Se.WJ)(v)?(0,x.jsx)(en.Z,{height:"100%",width:"100%",url:v.thumbnail_image,isPlaying:!1,pauseFromPlayTimeInMs:1e3,event:v}):(0,x.jsx)(g.Ee,{width:"full",height:"full",src:v.thumbnail_image,objectFit:"cover",borderRadius:"lg"}):(0,x.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+c+", gray, "+p+")"})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:w,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,x.jsx)(s.xu,{width:"full",height:"full",backgroundColor:"blackAlpha.400"})})})})]})})};var on=function(t){var[e,n,i,o]=(0,h.Z)();const[c]=(0,u.j1)("isInDesignMode"),[p]=(0,u.j1)("isDemoBrand"),[v,m]=(0,u.j1)("isFirstIndicatorRenderDone"),[g,f]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:w}=(0,r.useContext)(ln),[j,y]=(0,r.useState)(!1),[C]=(0,u.j1)("whatmoreShopId"),{whatmoreWidgetSourceDetails:S,whatmoreUserInfo:b}=(0,r.useContext)(V.I),[I,k]=(0,r.useState)(!1),[_,F]=(0,r.useState)(null);function T(){k(!1)}t.events;const E=t.eventIndex,P=t.onBack,L=t.eventsStories,z=t.initialStoryIndex;function R(t){T(),setTimeout((()=>{P(t)}),500)}(0,r.useEffect)((()=>(k(!0),()=>{})),[]),w(R);const M=S.landingLocationType,D=S.templateType;function K(t){_&&!_.isEnd&&("right"==t?_.slideNext():_.slidePrev())}const A=parseInt(Math.min(5,L.length));return(0,x.jsx)(Ze,{show:I,closeCallback:T,customClass:"whatmore-landscape-modal-stories-view",children:(0,x.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",aligntItems:"center",backgroundColor:"blackAlpha.800",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:o*A,children:(0,x.jsxs)(l.tq,{onInit:t=>{var e,n;F(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:S,event:L[t.activeIndex].events[0],productList:null===(e=L[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=L[t.activeIndex].events[0])||void 0===n?void 0:n.cta})},slidesPerView:A,centeredSlides:!0,allowTouchMove:!1,initialSlide:z,modules:[a.lI,a.W_,a.Gk],navigation:A>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*i),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:o*A,watchSlidesProgress:!0,onSlideChange:t=>{var e,n;g?f(!1):(v||m(!0),function(t){const e=(0,mt.NY)(M)+(0,mt.dS)(D)+"_"+(null===t||void 0===t?void 0:t.event_id);c||p||(async()=>{(0,d.wh)(t),(0,De.Tc)(C,Me.Xh,Me.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===b||void 0===b?void 0:b.userType)})()}(L[t.activeIndex].events[0]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:S,event:L[t.activeIndex].events[0],productList:null===(e=L[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=L[t.activeIndex].events[0])||void 0===n?void 0:n.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[L.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(O,{onCloseCallback:P})}),L.map(((t,e)=>(0,x.jsx)(l.o5,{children:n=>{let{isActive:r,isPrev:l,isNext:a,isVisible:d,isDuplicate:c}=n;if(r){const n=1;return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o*n,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(Qe,{stories:t,onBack:R,isActive:r&&d,isNext:!1,isPrev:!1,onStoryCompleteCallback:K,initialEventIndex:z==e?E:0,showCloseOverlay:(null===L||void 0===L?void 0:L.length)<=2},"event-story-view-"+t.id)})})}return l||a?(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{_.slideTo(e,300)},children:(0,x.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(nn,{showPausedVideo:!0,event:L[e].events[0],onBack:R,isPlaying:!1,setLockSwiper:y})})}):(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide-"+e)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(Ue,{height:.04*i,width:.1*o,fontSize:.02*i})})]})})};const rn=(0,$e.Z)({key:"whatmore-css-sv"}),ln=(0,r.createContext)({isIOS:!1,totalEvents:0,closeClickComponent:null,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:"vertical",showSwipeIndicator:!0});var an=function(t){var e,n;const[i,o,l]=(0,pe.Z)(),[a]=(0,u.j1)("whatmoreShopId"),{whatmoreRootId:d}=(0,r.useContext)(V.I),{whatmoreIsStoriesTemplate:s}=(0,r.useContext)(V.I);var h=t.events,p=t.index,v=t.onBack,m=t.eventsStories,g=t.initialStoryIndex,f=(0,c.cX2)(a),w=(h[p],"portrait"===i?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(n=t.slideDirection)&&void 0!==n?n:h.length>1?"horizontal":"vertical"),j="portrait"===i?!(0,c.h6H)(a)&&!s:(0,c.n89)(a);return h[p],(0,r.useLayoutEffect)((()=>{(0,c.TLG)(a)&&(window.location.href.includes(f)?history.replaceState(null,"","#"+f):history.pushState(null,"","#"+f),window.addEventListener("popstate",(()=>{window.location.href.includes(f)||v()})))}),[]),delete Xe.ZP.styles.global,s?(0,x.jsx)(Ge.C,{value:rn,children:(0,x.jsx)(Ye.x,{theme:Xe.ZP,cssVarsRoot:d,resetCSS:!1,children:(0,x.jsx)(ln.Provider,{value:{isIOS:(0,be.KE)(),totalEvents:h.length,closeClickComponent:v,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:w,showSwipeIndicator:j},children:"portrait"===i?(0,x.jsx)(tn,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p}):(0,c.Bbr)(a)?(0,x.jsx)(on,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p}):(0,x.jsx)(tn,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p})})})}):(0,x.jsx)(Ge.C,{value:rn,children:(0,x.jsx)(Ye.x,{theme:Xe.ZP,cssVarsRoot:d,resetCSS:!1,children:(0,x.jsx)(ln.Provider,{value:{isIOS:(0,be.KE)(),totalEvents:h.length,closeClickComponent:v,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:w,showSwipeIndicator:j},children:"portrait"===i?(0,x.jsx)(qe,{events:h,eventIndex:p,onBack:v}):(0,x.jsx)(Be,{events:h,eventIndex:p,onBack:v})})})})}},9316:function(t,e,n){n.d(e,{mT:function(){return o}});var i=n(686);const o=`\n ${i.F4`
76
+ `} 0.5s`,bt=null===q||void 0===q||null===(e=q.options)||void 0===e?void 0:e.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})),[It,kt]=(0,r.useState)(-1!==bt?null===(n=q.options)||void 0===n||null===(i=n[bt])||void 0===i||null===(o=i.values)||void 0===o?void 0:o[0]:""),[_t,Ft]=(0,r.useState)({});(0,r.useEffect)((()=>{-1!==bt&&"whatmore"!==(0,c.Ipo)(wt)&&async function(){const t=await(0,lt.m3)(Z);Ft(t)}()}),[]);let Tt=-1,Et=-1!==bt&&null!==_t&&void 0!==_t&&_t.product&&(null===_t||void 0===_t||null===(l=_t.product)||void 0===l||null===(a=l.images)||void 0===a?void 0:a.length)>=(null===_t||void 0===_t||null===(d=_t.product)||void 0===d||null===(p=d.options)||void 0===p||null===(v=p[bt])||void 0===v||null===(m=v.values)||void 0===m?void 0:m.length)?null===_t||void 0===_t||null===(f=_t.product)||void 0===f||null===(w=f.images)||void 0===w?void 0:w.map((t=>{var e,n,i,o,r,l,a,d,s,c,u,h,p,v;const x=null===_t||void 0===_t||null===(e=_t.product)||void 0===e||null===(n=e.options)||void 0===n?void 0:n.findIndex((t=>"Color"==(null===t||void 0===t?void 0:t.name)||"Colour"==(null===t||void 0===t?void 0:t.name)||"COLOR"==(null===t||void 0===t?void 0:t.name)));return{color:(null===t||void 0===t?void 0:t.variant_ids.length)>0?null===_t||void 0===_t||null===(i=_t.product)||void 0===i||null===(o=i.options)||void 0===o||null===(r=o[x])||void 0===r||null===(l=r.values)||void 0===l?void 0:l[Math.min(++Tt,(null===_t||void 0===_t||null===(a=_t.product)||void 0===a||null===(d=a.options)||void 0===d||null===(s=d[bt])||void 0===s||null===(c=s.values)||void 0===c?void 0:c.length)-1)]:null===_t||void 0===_t||null===(u=_t.product)||void 0===u||null===(h=u.options)||void 0===h||null===(p=h[x])||void 0===p||null===(v=p.values)||void 0===v?void 0:v[Math.max(0,Tt)],src:null===t||void 0===t?void 0:t.src}})):[],Pt=[];if("whatmore"==(0,c.Ipo)(wt)&&(null===q||void 0===q||null===(j=q.images)||void 0===j?void 0:j.length)>0){var Ot;var Lt;if(-1!==(null===q||void 0===q||null===(Ot=q.options)||void 0===Ot?void 0:Ot.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))}))))Pt=null===q||void 0===q||null===(Lt=q.images)||void 0===Lt?void 0:Lt.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc})))}return Tt+1<(null===_t||void 0===_t||null===(y=_t.product)||void 0===y||null===(C=y.options)||void 0===C||null===(b=C[bt])||void 0===b||null===(I=b.values)||void 0===I?void 0:I.length)&&(Et=[]),(0,x.jsxs)(s.kC,{sx:{"&::-webkit-scrollbar":{width:"0px"}},id:"whatmore-shopnow-view",position:"relative",maxHeight:"75vh",overflowY:"scroll",direction:"column",bg:"#FFF",height:"fit-content",opacity:"100%",borderTopRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"xl":null,animation:St,children:[(0,x.jsx)(At,{setOpenShopNow:U,setLockSwiper:B,FONT_SIZE:A}),(0,x.jsx)(s.M5,{marginBottom:"10px",px:"20px",py:"5px",children:(0,x.jsx)(s.kC,{bg:"whiteAlpha.900",width:"fit-content",height:"fit-content",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"lg":null,overflow:"hidden",sx:{borderWidth:(0,c.alU)(wt),borderColor:(0,c.qPe)(wt)},children:(0,x.jsx)(s.kC,{width:"100%",children:(0,x.jsx)(Zt.P,{renderElement:t=>(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s.xu,{width:M+"px",height:D+"px",children:(0,x.jsx)(g.Ee,{width:M+"px",height:D+"px",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"lg":null,src:(0,pt.s)(t.eventData.src,"&width=400&height=400"),alt:Z.handle,sx:{objectFit:(0,c.yOX)(wt)+" !important"},fallback:(0,x.jsx)(K.Z,{width:M+"px",height:D+"px",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"10px":"0px"})})})}),dataList:Et.length>0&&!Et.includes(null)?null===(k=Et)||void 0===k?void 0:k.filter((t=>(null===t||void 0===t?void 0:t.color)==It)):Pt.length>0?[null===(_=Pt)||void 0===_?void 0:_.find((t=>(null===t||void 0===t?void 0:t.color)==It))]:null===q||void 0===q||null===(F=q.images)||void 0===F?void 0:F.map((t=>({src:t.includes("https")?t:"https:"+t}))),spacing:10,defaultHeight:M+"px",defaultWidth:D+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})}),(0,x.jsx)(Ht,{data:q,product:Z,PRODUCT_TILE_HEIGHT:R,PRODUCT_TILE_WIDTH:z,FONT_SIZE:A,getVariantPrice:Yt,selectedVariantId:et,itemPrice:at,itemQuantity:it,setItemQuantity:ot,thumbnailImage:mt}),(null===q||void 0===q||null===(T=q.variants)||void 0===T?void 0:T.length)>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s.M5,{paddingTop:"4px",width:"100%",children:(0,x.jsx)(s.iz,{color:(0,c.W8U)(wt),size:"xs",width:"90%"})}),(0,x.jsx)(Vt,{data:q,dividerColor:(0,c.W8U)(wt),setSelectedColor:kt,finalArr:Et,finalArrExternal:Pt,product:Z,PRODUCT_TILE_HEIGHT:R,PRODUCT_TILE_WIDTH:z,FONT_SIZE:A,selectOptionFirstHandler:jt,selectOptionSecondHandler:yt,selectOptionThirdHandler:Ct,getVariantPrice:Yt,selectedOptionFirst:X,selectedOptionSecond:$,selectedOptionThird:Q,selectedVariantId:et})]}),c.$2G&&((null===q||void 0===q?void 0:q.description)||(null===q||void 0===q?void 0:q.body_html))&&(0,x.jsx)(Wt,{PRODUCT_TILE_HEIGHT:R,FONT_SIZE:A,data:q,handleToggle:()=>N(!W),show:W}),(0,x.jsx)(s.xu,{sx:{pointerEvents:"none"},paddingTop:"20px",opacity:0,children:(0,x.jsx)(Kt,{position:"relative",data:q,FONT_SIZE:A,product:Z})}),(0,x.jsx)(Kt,{position:"fixed",selectedVariantId:et,data:q,FONT_SIZE:A,PRODUCT_TILE_WIDTH:z,product:Z,itemQuantity:it,cartItemCount:st,addToCartFlag:ut,setAddToCartFlag:ht,soldOutFlag:vt,setSoldOutFlag:xt,event:H})]})}const Bt=(t,e,n,i)=>{var o,r,l,a,d,s,c,u,h,p;if(void 0===e&&void 0===n&&void 0===i)return null===t||void 0===t||null===(o=t.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id;if(void 0===i&&void 0===n)return null===(l=t.variants.find((t=>t.option1===e)))||void 0===l?void 0:l.id;if(void 0===i&&void 0===e)return null===(a=t.variants.find((t=>t.option2===n)))||void 0===a?void 0:a.id;if(void 0===n&&void 0===e)return null===(d=t.variants.find((t=>t.option3===i)))||void 0===d?void 0:d.id;if(void 0===n)return null===(s=t.variants.find((t=>t.option1===e&&t.option3===i)))||void 0===s?void 0:s.id;if(void 0===i)return null===(c=t.variants.find((t=>t.option1===e&&t.option2===n)))||void 0===c?void 0:c.id;if(void 0===e)return null===(u=t.variants.find((t=>t.option2===n&&t.option3===i)))||void 0===u?void 0:u.id;const v=null===t||void 0===t?void 0:t.variants.find((t=>t.option1===e&&t.option2===n&&t.option3===i));return void 0===v?null===t||void 0===t||null===(h=t.variants)||void 0===h||null===(p=h[0])||void 0===p?void 0:p.id:v.id},Yt=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id===e)))||void 0===i?void 0:i.price},Xt=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id.toString()===e)))||void 0===i?void 0:i.option1},Gt=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id.toString()===e)))||void 0===i?void 0:i.option2},$t=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id.toString()===e)))||void 0===i?void 0:i.option3},Jt=(t,e)=>{var n;const i=null===t||void 0===t||null===(n=t.variants)||void 0===n?void 0:n.find((t=>t.id==e));return void 0===i?null:null===i||void 0===i||null===(o=i.featured_image)||void 0===o?void 0:o.src;var o},Qt=(0,r.createContext)({setShowOptionsChart:null});var te=function(t){const e=t.event,n=t.data,i=t.currentProduct,o=t.setOpenShopNow,l=t.setLockSwiper,[a,d]=(0,r.useState)(!1);return(0,x.jsx)(Qt.Provider,{value:{setShowOptionsChart:d},children:(0,x.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[(0,x.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",children:(0,x.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,x.jsx)(Ut,{data:n,event:e,product:i,setOpenShopNow:o,setLockSwiper:l})})}),a?(0,x.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",style:{position:"relative",zIndex:1,bottom:"100%"},className:"whatmore-ios-css-relative-fix",id:"whatmore-size-chart",children:(0,x.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,x.jsx)(Lt,{data:n,event:e,product:i,setShowOptionsChart:()=>{d(!1)}})})}):(0,x.jsx)(x.Fragment,{})]})})};var ee=function(t){var e,[n,i,o,l]=(0,h.Z)();const[a,d]=(0,r.useState)(!1),[v,g]=(0,r.useState)(),[f,w]=(0,r.useState)(),j=(0,u.MO)("whatmoreShopId"),y=t.event,C=t.onBack,S=r.useRef(),b=t.isPlaying,I=t.isLast,k=t.setLockSwiper,_=t.selectedVariantId,F=null===(e=t.showOverlay)||void 0===e||e,T="center";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:l,height:o,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:T,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:l/o,children:(0,x.jsx)(m,{height:"100%",width:"100%",url:y.event_hls_url,isPlaying:b,event:y})})})}),F?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:T,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(Ot,{focusRef:S,event:t.event,isLast:I,onCloseCallback:C,productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(j),j);w(t),g(e),d(!0),k(!0)}})})}):(0,x.jsx)(x.Fragment,{}),!0===a?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:T,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(te,{focusRef:S,event:t.event,isLast:I,onCloseCallback:()=>C(),setLockSwiper:k,data:v,currentProduct:f,setOpenShopNow:d,selectedVariantId:_})})}):(0,x.jsx)("div",{})]})})};const ne=function(t,e){return isNaN(t)||isNaN(e)||e<=0||t>e?0:Math.ceil(t/e*100)};function ie(t){var e,n,[i,o,r,l]=(0,h.Z)();const[a]=(0,u.j1)("whatmoreSecondaryColor"),[d]=(0,u.j1)("whatmoreSecondaryColorShade900"),c=t.progress,p=null!==(e=t.totalSiblings)&&void 0!==e?e:1,v=null!==(n=t.indexAmongSiblings)&&void 0!==n?n:0;return(0,x.jsx)(s.Kq,{width:"96%",height:"fit-content",direction:"row",justifyContent:"center",alignItems:"center",spacing:"1px",children:[...Array(p).keys()].map((t=>(0,x.jsx)(s.Kq,{width:"100%",height:.004*r+"px",backgroundColor:t<v?a:d+"99",borderRightRadius:"lg",borderLeftRadius:"lg",direction:"row",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",sx:{display:"block !important"},children:t==v?(0,x.jsx)(s.xu,{height:"100%",width:c+"%",bgColor:a,borderRightRadius:"lg",borderLeftRadius:"lg",sx:{display:"block !important"}}):(0,x.jsx)(x.Fragment,{})},"event-progress-bar-slab-"+t)))})}var oe=n(868),re=n(2630);const le=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t;var ae=n(4862);var de=function(t){var e,n,i,o=t.whatmoreShareTemplateId;const l=t.whatmoreShareStoryId,a=t.whatmoreShareEventId,p=t.event,v=null===(e=t.showShareText)||void 0===e||e,m=null!==(n=t.shareButtonBottomMargin)&&void 0!==n?n:0,g=(0,u.MO)("whatmoreShopId"),f=(0,u.MO)("isInDesignMode"),w=(0,u.MO)("isDemoBrand"),j=(0,u.MO)("whatmorePrimaryFont"),{whatmoreWidgetSourceDetails:y}=(0,r.useContext)(V.I),[C,S,b,I]=(0,h.Z)(),k=null!==(i=t.iconSize)&&void 0!==i?i:.1*I;function _(){const e=(0,u.MO)("whatmoreLandingLocationType");var n;!function(t){f||w||(async()=>{(0,d.x0)(t)})()}(p),(e.startsWith("product")||"embed"===e)&&(o="te"),n="event_product_link"===(0,c.EEC)(g)?p.products[0].product_link||"":window.location.pathname,n=("event_product_link"===(0,c.EEC)(g)?"":window.location.hostname)+n+"?wtt="+o+"&wsid="+l+"&weid="+a,(0,c.lj5)(g)&&(n=n+"&"+(0,c.awP)(g)+"&utm_campaign=video-share&utm_medium="+e);const i={title:(0,c.JNF)(g),text:`${(0,c.Qa8)(g)} \n ${n} ${(0,c.AWG)(g)?"\n \n -via Whatmore":""}`};navigator.share&&!ae.nI?navigator.share(i):(t.setIsModalOpen(!0),t.setShareText([i,n]))}return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",style:{marginBottom:m+"px"},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,x.jsx)(re.Z,{sx:{boxShadow:3,transform:"scaleX(-1)",color:"white",fontSize:k,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),_(),(0,q.GF)({userInteractionType:H.K.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:y,event:p,productList:p.products,ctaList:p.cta})}}),v&&(0,c.u8S)(g)?(0,x.jsxs)(s.xv,{fontSize:.3*k+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:j+" !important",color:"white !important",paddingRight:"10%"},children:["\xa0",p.total_share>(0,c.LWl)(g)?le(p.total_share):"Share","\xa0"]}):(0,x.jsx)(x.Fragment,{})]})})})},se=n(7933),ce=n(2785);var ue=function(t){var e;const n=(0,u.MO)("whatmoreShopId"),i=(0,u.MO)("whatmorePrimaryFont"),o=(0,u.MO)("whatmoreLikedEvents"),l=((0,u.MO)("whatmoreSecondaryColor"),(0,u.MO)("isInDesignMode")),a=(0,u.MO)("isDemoBrand"),{whatmoreWidgetSourceDetails:p}=(0,r.useContext)(V.I),v=t.event,[m,g]=(0,r.useState)(null!==(e=o[v.event_id])&&void 0!==e&&e),[f,w,j,y]=(0,h.Z)(),C=.1*y;function S(t,e){l||a||(async()=>{(0,d.Z6)(t,e)})()}function b(){(0,u.bU)("whatmoreLikedEvents",{...o,[v.event_id]:!m}),m?(S(v,-1),(0,q.GF)({userInteractionType:H.K.VIDEO_UNLIKED,widgetSourceDetails:p,event:v,productList:v.products,ctaList:v.cta})):(S(v,1),(0,q.GF)({userInteractionType:H.K.VIDEO_LIKED,widgetSourceDetails:p,event:v,productList:v.products,ctaList:v.cta})),g(!m)}const I=v.total_like+(m?1:0);return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[m?(0,x.jsx)(ce.Z,{sx:{boxShadow:3,color:(0,c.dmX)(n),fontSize:C,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}):(0,x.jsx)(se.Z,{sx:{boxShadow:3,color:"white",fontSize:C,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}),(0,x.jsx)(x.Fragment,{children:(0,c.CEM)(n)?(0,x.jsxs)(s.xv,{fontSize:.3*C+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:i+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",I>=(0,c.zKg)(n)?le(I):"Like","\xa0"]}):(0,x.jsx)(x.Fragment,{})})]})})})};const he=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#25D366",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"white",class:"bi bi-whatsapp",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})})})};var pe=n(8866);const ve=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-twitter-x",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{d:"M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865z"})})})},xe=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-copy",viewBox:"0 0 16 16",children:(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z"})})})};var me=t=>{const e=t.shareText,[n,i]=(0,r.useState)("Copy link"),[o,l]=(0,r.useState)("");return(0,x.jsx)(x.Fragment,{children:t.isModalOpen&&(0,x.jsxs)("div",{className:"modal-overlay",style:{backgroundColor:"white",borderRadius:"10px",padding:"12px 12px 20px 12px"},children:[(0,x.jsxs)("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",paddingBottom:"6px"},children:[(0,x.jsx)("img",{onClick:()=>{window.location.href="https://whatmore.ai"},src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",backgroundColor:"transparent",borderRadius:"0px",width:Math.min(t.iconSize,28)+"px"}}),(0,x.jsx)(P.Z,{onClick:e=>{e.stopPropagation(),t.setIsModalOpen(!1)}})]}),(0,x.jsx)("div",{}),(0,x.jsx)(s.iz,{color:"blackAlpha.500",size:"1px",width:"100%"}),(0,x.jsxs)("div",{className:"social-icons",style:{display:"flex",gap:"20px",justifyContent:"center",paddingTop:"12px"},children:[(0,x.jsxs)("div",{onClick:t=>{var n;t.stopPropagation();const i=encodeURIComponent(null===(n=e[0])||void 0===n?void 0:n.text);window.open(`https://wa.me/?text=${i}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(he,{iconSize:Math.min(t.iconSize,30)}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"Whatsapp"})]}),(0,x.jsxs)("div",{onClick:t=>{var n;t.stopPropagation();const i=encodeURIComponent(null===(n=e[0])||void 0===n?void 0:n.text);window.open(`https://twitter.com/intent/tweet?text=${i}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(ve,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"X"})]}),(0,x.jsxs)("div",{onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(e[1]),i("Link copied"),l("green")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(xe,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14),color:o},children:n})]})]})]})})};function ge(t){var e;const n=t.event,[i,o,l,a]=(0,h.Z)(),[d]=(0,u.j1)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:p}=(0,r.useContext)(V.I),[v]=(0,u.j1)("whatmoreSecondaryColor"),[m]=(0,u.j1)("whatmoreShopId"),g=(0,c.f63)(m),f=null!==(e=(0,c.u2W)(m))&&void 0!==e?e:[v,g,v,g,v],w=(0,r.useRef)(null);return(0,r.useEffect)((()=>{w.current&&w.current.play()}),[]),(0,x.jsx)(x.Fragment,{children:p?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",padding:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-start",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{overflow:"hidden",size:.14*a+"px",sx:{boxShadow:"0px 2px 1px 0px "+f[0]+"50, 0px -2px 1px 0px "+f[1]+"50, 2px 0px 1px 0px "+f[2]+"50, -2px 0px 1px 0px "+f[3]+"80, 2px -2px 1px 0px "+f[4]+"80, -2px 2px 1px 0px "+f[0]+"DA, 2px 2px 1px 0px "+f[1]+"DA, -2px -2px 1px 0px "+f[2]+"DA"},children:"video"==(0,pt.$)((0,oe.V)(n.storyset_thumbnail_image))?(0,x.jsx)("video",{className:"whatmore-story-thumbnail",ref:w,preload:"metadata",loop:!0,playsInline:!0,src:(0,oe.V)(n.storyset_thumbnail_image),muted:!0,alt:"story image"}):(0,x.jsx)("img",{src:(0,oe.V)(n.storyset_thumbnail_image),style:{objectFit:"cover",height:"100%",width:"100%",backgroundColor:"white"}})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:.05*a+"px",fontWeight:"medium",lineHeight:"100%",sx:{fontFamily:d+" !important",color:"white !important",textShadow:"0px 0px 4px black !important;"},children:n.storyset_name})})]})}):(0,x.jsx)(x.Fragment,{})})}var fe=function(t){const[e,n,i]=(0,pe.Z)(),[o]=(0,u.j1)("isInDesignMode"),[l]=(0,u.j1)("isDemoBrand"),[a,p]=(0,u.j1)("isProductSwiperCatalogOpen"),[v,m]=(0,u.j1)("isFirstIndicatorRenderDone"),[g]=(0,u.j1)("whatmoreShopId"),f=(0,r.useContext)(ln),{whatmoreEventsBrowsingTemplate:w}=(0,r.useContext)(V.I),[j,C,S,b]=(0,h.Z)(),I=(0,u.MO)("whatmorePrimaryFont"),k=t.event,_=t.storySetId,F=t.isLast,E=t.onCloseCallback,P=t.focusRef,L=t.productClickHandler,z=t.videoPlayingData,R=t.totalSiblingEvents,M=t.indexAmongSiblings,K=t.leftOpenSpaceClickHandler,A=t.midOpenSpaceClickHandler,W=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:N}=(0,r.useContext)(V.I),Z=.1*b,[U,B]=(0,r.useState)(!1),[Y,X]=(0,r.useState)([]),G=t=>{$.current&&!$.current.contains(t.target)&&B(!1)},$=(0,r.useRef)(null);return(0,r.useEffect)((()=>(U?document.addEventListener("click",G):document.removeEventListener("click",G),()=>{document.removeEventListener("click",G)})),[U]),(0,x.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[U&&(0,x.jsx)("div",{ref:$,className:"whatmore-share-modal",style:{zIndex:100,position:"absolute",boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.6)",width:"75%",top:"45%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},children:(0,x.jsx)(me,{shareText:Y,setShareText:X,iconSize:Z,isModalOpen:U,setIsModalOpen:B})}),(0,x.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,x.jsxs)(s.Kq,{width:"full",height:"fit-content",direction:"column",justifyContent:"flex-start",alignItems:"center",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:[f.showVideoPlayingData?(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,x.jsx)(ie,{progress:ne(z.current_time,z.video_duration),totalSiblings:R,indexAmongSiblings:M})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{width:"full",margin:"2px",marginTop:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",paddingRight:"10px",paddingLeft:"10px",children:[(0,x.jsx)(ge,{event:k}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,mt.ZK)(w)?(0,x.jsx)(de,{whatmoreShareTemplateId:(0,mt.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:k.event_id,event:k,showShareText:!1,iconSize:.07*b,shareButtonBottomMargin:6,setIsModalOpen:B,setShareText:X}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(y,{focusRef:P}),("landscape"!==e||t.showCloseOverlay)&&(0,x.jsx)(O,{event:k,onCloseCallback:E})]})]})})]}),(0,x.jsxs)(s.Kq,{width:"100%",height:"100%",direction:"row",justifyContent:"center",children:[(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{K()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"34%",height:"100%",onClick:()=>{A()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{W()},sx:{display:"block !important"}})]}),(0,x.jsxs)(s.xu,{width:"full",height:"fit-content",children:[f.totalEvents>1&&!v&&f.showSwipeIndicator?(0,x.jsx)(s.xu,{width:"full",margin:"2px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,x.jsx)(D,{swipeUp:!F})})}):null,(0,x.jsxs)(s.xu,{width:"fit-content",height:"fit-content",position:"absolute",right:0,bottom:"25%",children:[(0,c.slY)(g)&&!(0,mt.ZK)(w)?(0,x.jsx)(s.xu,{ml:"auto",width:"fit-content",paddingY:"12px",paddingX:"8px",children:(0,x.jsxs)(s.Kq,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:function(){var t;o||l||(async()=>{(0,d.lY)(k,1)})(),(0,q.GF)({userInteractionType:H.K.WHATSAPP_ICON_CLICKED,widgetSourceDetails:N,event:k,productList:null===k||void 0===k?void 0:k.products,ctaList:null===k||void 0===k?void 0:k.cta});const e=k.products.map((t=>`${t.product_link} \n`)),n=(0,c.gtK)(g),i=`Hey, I am interested in ${k.products.length>1?"these products":"this product"} I saw on ${null===(t=k.products[0])||void 0===t?void 0:t.brand} store: \n${e}. Could you please help me with some queries?`;window.open(n+`&text=${i}&type=phone_number`,"_blank")},children:[(0,x.jsx)(he,{iconSize:.7*Z,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)(s.xv,{fontSize:Z*(0,c.Xod)(g)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:I+" !important",color:"white !important"},children:(0,c.UiZ)(g)})]})}):(0,x.jsx)(x.Fragment,{}),(0,c.jY3)(g)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(ue,{event:k})})}):(0,x.jsx)(x.Fragment,{}),(0,c.ROU)(g)&&!(0,mt.ZK)(w)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(de,{whatmoreShareTemplateId:(0,mt.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:k.event_id,event:k,setIsModalOpen:B,setShareText:X})})}):(0,x.jsx)(x.Fragment,{})]}),(0,_t.kT)(k)?(0,x.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(g)?(0,x.jsx)(s.xu,{w:"100%",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(T,{event:k,onToggle:t=>{p("minimize-button"!==t)}})})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,x.jsx)(Et,{event:k,productClickHandler:L})})]}):(0,x.jsx)(x.Fragment,{})]})]})]})},we=n(2279),je=n.n(we),ye=n(342);var Ce=function(t){var e,n,i,o,l,a,[d,m,g,f]=(0,h.Z)();const[w,j]=(0,r.useState)(!1),[y,C]=(0,r.useState)(),[S,b]=(0,r.useState)(),[I,k]=(0,r.useState)({current_time:0,video_duration:0,is_video_ended:!1}),_=(0,u.MO)("whatmoreShopId"),F=t.event,T=t.storyId,E=t.onBack,P=r.useRef(),O=t.isPlaying,L=t.isLast,z=t.setLockSwiper,R=t.onVideoEndedCallback,M=t.progressUpdateCallback,D=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,K=null!==(n=t.indexAmongSiblings)&&void 0!==n?n:0,A=null===(i=t.showOverlay)||void 0===i||i,W=null!==(o=t.leftOpenSpaceClickHandler)&&void 0!==o?o:()=>{},N=null!==(l=t.midOpenSpaceClickHandler)&&void 0!==l?l:()=>{},Z=null!==(a=t.rightOpenSpaceClickHandler)&&void 0!==a?a:()=>{},{whatmoreWidgetSourceDetails:U}=(0,r.useContext)(V.I),B="center";let Y;try{Y=je()((()=>{R()}),1e3,{leading:!0,trailing:!1})}catch(X){console.log(X)}return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:f,height:g,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:B,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:f/g,children:(0,x.jsx)(v.Z,{height:"100%",width:"100%",url:(0,oe.V)((0,ye.uv)(F)),isPlaying:O,timeUpdateCallback:function(t,e){const n=ne(t,e);M(n);const i=I.is_video_ended;n>=99&&O&&!i?(Y(),k({current_time:t,video_duration:e,is_video_ended:!0})):k({current_time:t,video_duration:e,is_video_ended:i})},event:F,source:t.source})})})}),A?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:B,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(fe,{focusRef:P,event:t.event,isLast:L,onCloseCallback:t=>{E(t),(0,q.Z2)({userInteractionType:H.K.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:I.current_time},widgetSourceDetails:U,event:F,productList:F.products,ctaList:F.cta})},productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(_),_);b(t),C(e),j(!0),z(!0),(0,q.GF)({userInteractionType:H.K.SHOPNOW_CLICKED,widgetSourceDetails:U,event:F,productList:F.products,ctaList:F.cta}),(0,u.bU)("whatmoreAllowAutoSlide",!1)},videoPlayingData:I,totalSiblingEvents:D,indexAmongSiblings:K,leftOpenSpaceClickHandler:W,midOpenSpaceClickHandler:N,rightOpenSpaceClickHandler:Z,storySetId:T,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay})})}):(0,x.jsx)(x.Fragment,{}),!0===w?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:B,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(te,{focusRef:P,event:t.event,isLast:L,onCloseCallback:()=>E(),setLockSwiper:z,data:y,currentProduct:S,setOpenShopNow:t=>{j(t),(0,u.bU)("whatmoreAllowAutoSlide",!t)}})})}):(0,x.jsx)("div",{})]})})},Se=n(7300),be=n(8984),Ie=n(58),ke=n(9723);var _e=function(t){var[e,n,i,o]=(0,h.Z)();const r=(0,u.MO)("whatmoreShopId"),l=t.event,a=t.isPlaying,d="center";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:o,height:i,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:d,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:o/i,children:(0,x.jsx)(v.Z,{height:"100%",width:"100%",url:(0,oe.V)((0,ye.uv)(l)),isPlaying:a,timeUpdateCallback:function(t,e){},event:l,source:t.source})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:d,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",backdropFilter:"auto",backdropBlur:"10px",onClick:t=>{(0,Ie.QV)()},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"full",width:"full",children:[(0,x.jsx)(ke.Z,{sx:{boxShadow:3,color:(0,c.Ya_)(r),fontSize:.4*o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{(0,Ie.QV)()}}),(0,x.jsx)(s.xv,{color:"white",fontSize:.05*o+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},Fe=n(3433);var Te=function(t){var e,n;const r=t.event,l=null===(e=t.isPlaying)||void 0===e||e,a=t.onBack,d=t.isLast,s=t.setLockSwiper,c=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),h=t.progressUpdateCallback,[p,v]=(0,j.Z)(),[m]=(0,u.j1)("whatmoreVideoPlayerPoolBlessed"),g=null===(n=t.showOverlay)||void 0===n||n;function f(){v(!p)}if((0,be.KE)()&&0==m)return(0,x.jsx)(_e,{event:r,onBack:a,isPlaying:l,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:h,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:g,source:Fe.j.CAROUSEL_EVENT_OPENED},"shopping-video-view"+r.event_id);if((0,Se.B6)(r)||(0,Se.WJ)(r))return(0,x.jsx)(Ce,{event:r,onBack:a,isPlaying:l,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:h,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:g,source:Fe.j.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id);if((0,Se.yC)(r)){var{status:w,bannerText:y,timeToStartInMins:C}=i.Z.getEventStatus(r);if(w.name===o.Z.LIVE.name)return(0,x.jsx)(ee,{event:r,onBack:a,isPlaying:l,isLast:d,showOverlay:g},"shopping-live-view"+r.event_id)}return console.error("Can't render event which is neither video or a currently-live-event"),(0,x.jsx)("div",{})},Ee=n(9284),Pe=n.n(Ee),Oe=n(7463),Le=n(2154);function ze(t){var e;const[n,i]=(0,r.useState)(!1),o=t.onClick,l=null!==(e=t.fontSize)&&void 0!==e?e:50;return(0,x.jsx)("div",{style:{height:"fit-content",width:"fit-content",backgroundColor:"black",opacity:.4,borderRadius:"50%"},className:[n?"whatmore-scale-on-tap":""].join(" "),children:"left"===t.type?(0,x.jsx)(Le.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{i(!0),setTimeout((()=>{i(!1)}),500),o(t,"up")}}):(0,x.jsx)(Oe.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{i(!0),setTimeout((()=>{i(!1)}),500),o(t,"down")}})})}var Re=function(t){var e,n,i;const o=null!==(e=t.relativeBottomPercentage)&&void 0!==e?e:"30%",r=null!==(n=t.width)&&void 0!==n?n:"100%",l=null!==(i=t.fontSize)&&void 0!==i?i:50,a=t.handleClick;return(0,x.jsx)("div",{style:{position:"relative",zIndex:1,bottom:o,width:"100%",height:"fit-content",display:"flex",flexFlow:"row nowrap",justifyContent:"center"},id:"here",children:(0,x.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:r,height:"fit-content",paddingRight:"5px",paddingLeft:"5px",paddingTop:"5px",paddingBottom:"5px",justifyContent:"space-between",alignContent:"center"},children:[(0,x.jsx)(ze,{type:"left",onClick:a,fontSize:l}),(0,x.jsx)(ze,{type:"right",onClick:a,fontSize:l})]})})},Me=n(2860),De=n(4669);var Ke=function(t,e){function n(t,e){return 1==e?0:t<0?e+t:t>=e?t-e:t}const i=(0,r.useRef)({prevIndex:n(t-1,e),activeIndex:t,nextIndex:n(t+1,e)});return[function(){return i.current},function(t){i.current="right"==t?{prevIndex:n(i.current.activeIndex,e),activeIndex:n(i.current.activeIndex+1,e),nextIndex:n(i.current.activeIndex+2,e)}:{prevIndex:n(i.current.activeIndex-2,e),activeIndex:n(i.current.activeIndex-1,e),nextIndex:n(i.current.activeIndex,e)}},function(t){return n(i.current.activeIndex+t)}]};var Ae=function(t,e){const n=(0,r.useRef)({clientX:0,clientY:0});return[function(t){n.current.clientX=t.changedTouches[0].clientX,n.current.clientY=t.changedTouches[0].clientY},function(i){const o=n.current.clientX,r=n.current.clientY;var l=o-i.changedTouches[0].clientX,a=r-i.changedTouches[0].clientY;return"vertical"==t&&Math.abs(a)>e||"horizontal"==t&&Math.abs(l)>e?"vertical"==t?a>0?"right":"left":l>0?"right":"left":null}]};var We=function(t,e){const n=(0,r.useRef)(je()(((t,e)=>{t(e)}),300,{leading:!0,trailing:!1}));return[function(i,o){var r=0;if(r="vertical"==t?i.deltaY:i.deltaX,Math.abs(r)<=e)return;const l=r>0?"right":"left";n.current(o,l)}]},Ne=n(5173);var qe=function(t){const e=t.events,n=t.eventIndex,i=t.onBack;var[o,p,v,m]=(0,h.Z)();const[g]=(0,u.j1)("isInDesignMode"),[f]=(0,u.j1)("isDemoBrand"),[w,j]=(0,r.useState)(!0),[y,C]=(0,u.j1)("isFirstIndicatorRenderDone"),[S,b]=(0,r.useState)(!1),{setCloseClickComponent:I}=(0,r.useContext)(ln),{slideDirection:k}=(0,r.useContext)(ln),[_]=(0,u.j1)("whatmoreShopId"),[F]=(0,u.j1)("whatmoreLandingLocationType"),[T,E]=Ke(n,e.length),[P,O]=Ae(k,50),[L]=We("vertical",30),[z,R]=(0,r.useState)(!1),[M,D]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:K,whatmoreUserInfo:A}=(0,r.useContext)(V.I);function N(){R(!1)}function Z(t){N(),setTimeout((()=>{i(t)}),500)}(0,r.useEffect)((()=>(R(!0),()=>{})),[]);const U=K.landingLocationType,B=K.templateType;function Y(){(0,u.MO)("whatmoreAllowAutoSlide")&&(E("right"),M.slideNext())}function X(t,e){E(e),function(t,e){M&&("left"===e?M.slidePrev():M.slideNext())}(0,e)}I(Z);const G=Math.round(.05*v);return(0,x.jsx)(Pe(),{isOpen:z,onAfterOpen:function(){},onRequestClose:N,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)(Ne.Z,{children:(0,x.jsxs)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:(0,W.lA)("#000000",13)},onTouchStart:t=>{P(t)},onTouchEnd:t=>{if(S)return;const e=O(t);e&&X(0,e)},onWheel:t=>{S||L(t,(t=>{X(0,t)}))},children:[(0,x.jsx)(l.tq,{speed:400,threshold:G,slidesPerView:1,direction:k,modules:[a.tl,a.Gk],initialSlide:n,loop:1!=e.length,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,allowSlideNext:!S,allowSlidePrev:!S,allowTouchMove:!1,onSwiper:t=>{D(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:K,event:e[T().activeIndex],productList:e[T().activeIndex].products})},onSlideChange:t=>{var n;w?j(!1):(y||C(!0),n=e[T().activeIndex],g||f||(async()=>{const t=(0,mt.NY)(U)+(0,mt.dS)(B)+"_"+(null===n||void 0===n?void 0:n.event_id);(0,d.wh)(n),"index"===F?((0,De.Tc)(_,Me.Xh,Me.pR),(0,ot.H4)(n.event_id,n.products,Me.Xh,Me.pR,t,null===n||void 0===n?void 0:n.location,null===A||void 0===A?void 0:A.userType)):F.startsWith("product")||"embed"===F?((0,De.Tc)(_,Me.h7,Me.dU),(0,ot.H4)(n.event_id,n.products,Me.h7,Me.dU,t)):F.startsWith("collection")?((0,De.Tc)(_,Me.U$,Me.Pk),(0,ot.H4)(n.event_id,n.products,Me.U$,Me.Pk,t)):((0,De.Tc)(_,Me.Xh,Me.pR),(0,ot.H4)(n.event_id,n.products,Me.Xh,Me.pR,t))})(),(0,q.y4)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:K,event:e[T().activeIndex],productList:e[T().activeIndex].products}))},children:[...Array(Math.min(e.length,3)).keys()].map((n=>(0,x.jsx)(l.o5,{children:n=>{let{isActive:i,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=n;const d=i?"activeIndex":o?"prevIndex":"nextIndex";return(0,x.jsx)(s.Kq,{direction:"column",height:window.innerHeight,justifyContent:"center",children:(0,x.jsx)(Te,{event:e[T()[d]],onBack:Z,isPlaying:1==e.length||i&&l,isLast:!1,setLockSwiper:b,onVideoEndedCallback:Y,progressUpdateCallback:t=>{},showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay})})}},"event-vertical-scroll-slide-"+n)))}),e.length>1&&!S&&(0,c.h6H)(_)&&"horizontal"===(0,c.e8z)(_)&&"horizontal"===k?(0,x.jsx)(Re,{relativeBottomPercentage:"50%",width:m,handleClick:(t,e)=>{X(0,"down"==e?"right":"left")},fontSize:parseInt(.12*m)}):(0,x.jsx)(x.Fragment,{})]})})})},He=n(1168);n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811);const Ve=t=>{let{children:e,customClass:n,show:i,closeCallback:o}=t;return He.createPortal((0,x.jsxs)("div",{className:`whatmore-landscape-modal whatmore-root ${n}`,style:{display:i?"block":"none"},children:[(0,x.jsx)("div",{className:"whatmore-landscape-modal-overlay",onClick:o}),(0,x.jsx)("div",{className:"whatmore-landscape-modal-content",children:e})]}),document.body)};Ve.defaultProps={children:(0,x.jsx)("div",{children:"Empty Modal"}),customClass:"",show:!1,closeCallback:()=>!1};var Ze=Ve;var Ue=function(t){var e;const n=(0,u.MO)("whatmorePrimaryFont"),i=(0,u.MO)("whatmoreShopId"),o=null!==(e=t.fontSize)&&void 0!==e?e:"8";return(0,x.jsx)(s.rU,{href:"https://www.whatmore.ai/shoppable-videos",isExternal:!0,children:(0,c.XFt)(i)&&(0,x.jsxs)(s.Kq,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"2px",paddingLeft:"2px",paddingRight:"2px",paddingBottom:"2px",marginBottom:"2px",children:[(0,x.jsx)("p",{style:{textAlign:"center",color:"white",fontFamily:n,fontWeight:"normal",fontSize:1.1*o+"px",margin:0,padding:0,lineHeight:"110%"},children:"powered by Whatmore"}),(0,x.jsx)(s.xu,{width:"10px"}),(0,x.jsx)("img",{src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",width:1.7*o,backgroundColor:"transparent",borderRadius:"0px"}})]})})};var Be=function(t){var[e,n,i,o]=(0,h.Z)();const[p]=(0,u.j1)("isInDesignMode"),[v]=(0,u.j1)("isDemoBrand"),[m,g]=(0,u.j1)("isFirstIndicatorRenderDone"),[f,w]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:j}=(0,r.useContext)(ln),[y,C]=(0,r.useState)(!1),[S]=(0,u.j1)("whatmoreShopId"),[b]=(0,u.j1)("whatmoreLandingLocationType"),{whatmoreUITheme:I}=(0,r.useContext)(V.I),{whatmoreWidgetSourceDetails:k,whatmoreUserInfo:_}=(0,r.useContext)(V.I),[F,T]=(0,r.useState)(!1),[E,P]=(0,r.useState)(null);function L(){T(!1)}const z=t.events,R=t.eventIndex,M=t.onBack,D=z.concat(z),K=z.length,A=(0,r.useRef)(0);function N(t){L(),setTimeout((()=>{M(t)}),500)}function Z(){E&&!E.isEnd&&(0,u.MO)("whatmoreAllowAutoSlide")&&E.slideNext()}(0,r.useEffect)((()=>(T(!0),()=>{})),[]),j(N);const U=k.landingLocationType,B=k.templateType,Y=parseInt(Math.min(5,z.length));return(0,x.jsx)(Ze,{show:F,closeCallback:L,customClass:"whatmore-landscape-modal-swipe-view",children:(0,x.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",aligntItems:"center",backgroundColor:(0,W.lA)("#000000",13),children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:o*Y,children:(0,x.jsxs)(l.tq,{onInit:t=>{P(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:k,event:z[t.activeIndex],productList:z[t.activeIndex].products,ctaList:z[t.activeIndex].cta})},slidesPerView:Y,centeredSlides:!0,allowTouchMove:!1,initialSlide:R,modules:[a.lI,a.W_,a.Gk,a.pt,a.tl],navigation:Y>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*i),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:o*Y,watchSlidesProgress:!0,onSlideChange:t=>{var e;f?w(!1):(m||g(!0),e=z[t.activeIndex],p||v||(async()=>{const t=(0,mt.NY)(U)+(0,mt.dS)(B)+"_"+(null===e||void 0===e?void 0:e.event_id);(0,d.wh)(e),"index"===b?((0,De.Tc)(S,Me.Xh,Me.pR),(0,ot.H4)(e.event_id,e.products,Me.Xh,Me.pR,t,null===e||void 0===e?void 0:e.location,null===_||void 0===_?void 0:_.userType)):b.startsWith("product")||"embed"===b?((0,De.Tc)(S,Me.h7,Me.dU),(0,ot.H4)(e.event_id,e.products,Me.h7,Me.dU,t)):b.startsWith("collection")?((0,De.Tc)(S,Me.U$,Me.Pk),(0,ot.H4)(e.event_id,e.products,Me.U$,Me.Pk,t)):((0,De.Tc)(S,Me.Xh,Me.pR),(0,ot.H4)(e.event_id,e.products,Me.Xh,Me.pR,t))})(),(0,q.y4)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:k,event:z[t.activeIndex],productList:z[t.activeIndex].products,ctaList:z[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[z.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(O,{onCloseCallback:M})}),D.slice(R,z.length+R).map(((t,e)=>(0,x.jsx)(l.o5,{children:t=>{let{isActive:n,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=t;if(n)return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:1*o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Te,{event:z[e%K],onBack:N,isPlaying:!0,isLast:e%K===z.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:Z,progressUpdateCallback:t=>{},showCloseOverlay:(null===z||void 0===z?void 0:z.length)<=2})})});if(l)return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{E.slideTo(e%K,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Te,{event:z[e%K],onBack:N,isPlaying:!1,isLast:e%K===z.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:Z,progressUpdateCallback:t=>{},showOverlay:!1})})});if(r&&1===A.current)return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{E.slideTo(e%K,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Te,{event:z[e%K],onBack:N,isPlaying:!1,isLast:e%K===z.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:Z,progressUpdateCallback:t=>{},showOverlay:!1})})});try{R+e>=K-1&&(A.current=1)}catch(u){console.log(u)}return(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(Ue,{height:.04*i,width:.1*o,fontSize:.02*i})})]})})},Ye=n(6090),Xe=n(7616),Ge=n(9302),$e=n(2575);var Je=function(t){const[e,n,i,o]=(0,h.Z)(),[r]=(0,u.j1)("whatmorePrimaryColor"),[l]=(0,u.j1)("whatmoreSecondaryColor"),a="flex-end";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:o,height:i,backgroundColor:"whiteAlpha.200",backdropBlur:"10px",children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:a,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.oM,{width:"full",ratio:o/i,children:(0,x.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+r+", gray, "+l+")"})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:a,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{padding:"2px",margin:"5px",borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,x.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",backdropFilter:"auto",backdropBlur:"5px"})})})})]})})};var Qe=function(t){var e;const n=t.stories,i=t.onBack,o=t.onStoryCompleteCallback,a=t.isActive,c=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,p=n.events;var[v,m,g,f]=(0,h.Z)();const[w,y]=(0,j.Z)(),[C]=(0,u.j1)("isInDesignMode"),[S]=(0,u.j1)("isDemoBrand"),[b]=(0,u.j1)("whatmoreShopId"),[I,k]=(0,r.useState)(!0),[_,F]=(0,u.j1)("isFirstIndicatorRenderDone"),[T,E]=(0,r.useState)(null),[P,O]=(0,r.useState)(!1),{whatmoreWidgetSourceDetails:L,whatmoreUserInfo:z}=(0,r.useContext)(V.I),[R,M]=Ke(c,p.length);function D(t){i(t)}const K=L.landingLocationType,A=L.templateType;function W(){if(!(0,u.MO)("whatmoreAllowAutoSlide"))return;R().activeIndex+1>=p.length?o("right"):(M("right"),T&&T.slideNext())}function N(t){const e=R().activeIndex;"right"==t&&e+1>=p.length||"left"==t&&e-1<0?o(t):(M(t),T&&("left"==t?T.slidePrev():T.slideNext()))}return p[R().activeIndex],(0,x.jsx)("div",{children:(0,x.jsx)(l.tq,{speed:1,slidesPerView:1,direction:"horizontal",initialSlide:0,loop:!0,height:g,width:f,watchSlidesProgress:!0,allowTouchMove:!1,onSwiper:t=>{E(t)},onSlideChange:t=>{I?k(!1):(_||F(!0),function(t){const e=(0,mt.NY)(K)+(0,mt.dS)(A)+"_"+(null===t||void 0===t?void 0:t.event_id);C||S||(async()=>{(0,d.wh)(t),(0,De.Tc)(b,Me.Xh,Me.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===z||void 0===z?void 0:z.userType)})()}(p[R().activeIndex]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:L,event:p[R().activeIndex],productList:p[R().activeIndex].products,ctaList:p[R().activeIndex].cta}))},children:[...Array(Math.min(p.length,3)).keys()].map((e=>(0,x.jsx)(l.o5,{children:e=>{let{isActive:i,isPrev:o,isNext:r,isVisible:l,isDuplicate:d}=e;if(a){const e=i?"activeIndex":o?"prevIndex":"nextIndex",r=p[R()[e]];return(0,x.jsx)(s.Kq,{direction:"column",height:g,justifyContent:"center",children:(0,Se.B6)(r)||(0,Se.WJ)(r)?(0,x.jsx)(Ce,{event:r,totalSiblingEvents:p.length,indexAmongSiblings:R()[e],onBack:D,isPlaying:a&&i&&l,isLast:!1,setLockSwiper:O,onVideoEndedCallback:W,progressUpdateCallback:t=>{},leftOpenSpaceClickHandler:()=>{N("left")},midOpenSpaceClickHandler:()=>{y(!w)},rightOpenSpaceClickHandler:()=>{N("right")},storyId:n.id,source:Fe.j.STORY_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id):(0,x.jsx)(x.Fragment,{})})}return(0,x.jsx)(s.Kq,{direction:"column",height:v,justifyContent:"center",children:(0,x.jsx)(Je,{})})}},"event-story-view-slide-"+e)))})})};var tn=function(t){const e=t.onBack,n=t.eventsStories,i=t.initialStoryIndex;var[o,c,p,v]=(0,h.Z)();const[m]=(0,u.j1)("isInDesignMode"),[g]=(0,u.j1)("isDemoBrand"),[f,w]=(0,r.useState)(!0),[j,y]=(0,u.j1)("isFirstIndicatorRenderDone"),[C,S]=(0,r.useState)(!1),{setCloseClickComponent:b}=(0,r.useContext)(ln),{slideDirection:I}=(0,r.useContext)(ln),[k]=(0,u.j1)("whatmoreShopId"),[_,F]=Ke(i,n.length),[T,E]=Ae("horizontal",50),[P]=We("vertical",30),O=t.eventIndex,[L,z]=(0,r.useState)(!1),[R,M]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:D,whatmoreUserInfo:K}=(0,r.useContext)(V.I);function A(){z(!1)}function W(t){A(),setTimeout((()=>{e(t)}),500)}(0,r.useEffect)((()=>(z(!0),()=>{})),[]),b(W);const N=D.landingLocationType,Z=D.templateType;function U(t){R&&(0,u.MO)("whatmoreAllowAutoSlide")&&(F(t),"right"==t?R.slideNext():R.slidePrev())}function B(t,e){U(e)}return(0,x.jsx)(Pe(),{isOpen:L,onAfterOpen:function(){},onRequestClose:A,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:"#00000088"},onTouchStart:t=>{T(t)},onTouchEnd:t=>{const e=E(t);e&&B(0,e)},onWheel:t=>{P(t,(t=>{B(0,t)}))},children:(0,x.jsx)(l.tq,{speed:1,slidesPerView:1,direction:"horizontal",modules:[a.SH,a.Gk],initialSlide:i,loop:n.length>1,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,onSwiper:t=>{var e,i;M(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:D,event:n[_().activeIndex].events[0],productList:null===(e=n[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=n[_().activeIndex].events[0])||void 0===i?void 0:i.cta})},onSlideChange:t=>{var e,i;f?w(!1):(!function(t){const e=(0,mt.NY)(N)+(0,mt.dS)(Z)+"_"+(null===t||void 0===t?void 0:t.event_id);m||g||(async()=>{(0,d.wh)(t),(0,De.Tc)(k,Me.Xh,Me.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===K||void 0===K?void 0:K.userType)})()}(n[_().activeIndex].events[0]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:D,event:n[_().activeIndex].events[0],productList:null===(e=n[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=n[_().activeIndex].events[0])||void 0===i?void 0:i.cta}))},allowTouchMove:!1,cubeEffect:{shadow:!0,slideShadows:!0,shadowOffset:20,shadowScale:.94},children:[...Array(Math.min(n.length,3)).keys()].map((t=>(0,x.jsx)(l.o5,{children:t=>{let{isActive:e,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=t;const c=e?"activeIndex":r?"prevIndex":"nextIndex";return(0,x.jsx)(s.Kq,{direction:"column",height:o,justifyContent:"center",children:(0,x.jsx)(Qe,{stories:n[_()[c]],onBack:W,isActive:e&&a,isNext:l,isPrev:r,onStoryCompleteCallback:U,nextStories:n[_().nextIndex],prevStories:n[_().prevIndex],initialEventIndex:i==_()[c]?O:0},"event-story-view-"+n[_()[c]].id)})}},"event-vertical-scroll-slide-"+t)))})})})},en=n(4892);var nn=function(t){var e,n,i,[o,l,a,d]=(0,h.Z)();const[c]=(0,u.j1)("whatmorePrimaryColor"),[p]=(0,u.j1)("whatmoreSecondaryColor"),v=t.event,m=(t.onBack,r.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),f=null!==(n=t.heightFactor)&&void 0!==n?n:1,w="flex-end";return d*=null!==(i=t.widthFactor)&&void 0!==i?i:1,a*=f,(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:d,height:a,children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:w,height:"full",width:"full",children:(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:m?(0,Se.B6)(v)||(0,Se.WJ)(v)?(0,x.jsx)(en.Z,{height:"100%",width:"100%",url:v.thumbnail_image,isPlaying:!1,pauseFromPlayTimeInMs:1e3,event:v}):(0,x.jsx)(g.Ee,{width:"full",height:"full",src:v.thumbnail_image,objectFit:"cover",borderRadius:"lg"}):(0,x.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+c+", gray, "+p+")"})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:w,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,x.jsx)(s.xu,{width:"full",height:"full",backgroundColor:"blackAlpha.400"})})})})]})})};var on=function(t){var[e,n,i,o]=(0,h.Z)();const[c]=(0,u.j1)("isInDesignMode"),[p]=(0,u.j1)("isDemoBrand"),[v,m]=(0,u.j1)("isFirstIndicatorRenderDone"),[g,f]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:w}=(0,r.useContext)(ln),[j,y]=(0,r.useState)(!1),[C]=(0,u.j1)("whatmoreShopId"),{whatmoreWidgetSourceDetails:S,whatmoreUserInfo:b}=(0,r.useContext)(V.I),[I,k]=(0,r.useState)(!1),[_,F]=(0,r.useState)(null);function T(){k(!1)}t.events;const E=t.eventIndex,P=t.onBack,L=t.eventsStories,z=t.initialStoryIndex;function R(t){T(),setTimeout((()=>{P(t)}),500)}(0,r.useEffect)((()=>(k(!0),()=>{})),[]),w(R);const M=S.landingLocationType,D=S.templateType;function K(t){_&&!_.isEnd&&("right"==t?_.slideNext():_.slidePrev())}const A=parseInt(Math.min(5,L.length));return(0,x.jsx)(Ze,{show:I,closeCallback:T,customClass:"whatmore-landscape-modal-stories-view",children:(0,x.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",aligntItems:"center",backgroundColor:"blackAlpha.800",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:o*A,children:(0,x.jsxs)(l.tq,{onInit:t=>{var e,n;F(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:S,event:L[t.activeIndex].events[0],productList:null===(e=L[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=L[t.activeIndex].events[0])||void 0===n?void 0:n.cta})},slidesPerView:A,centeredSlides:!0,allowTouchMove:!1,initialSlide:z,modules:[a.lI,a.W_,a.Gk],navigation:A>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*i),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:o*A,watchSlidesProgress:!0,onSlideChange:t=>{var e,n;g?f(!1):(v||m(!0),function(t){const e=(0,mt.NY)(M)+(0,mt.dS)(D)+"_"+(null===t||void 0===t?void 0:t.event_id);c||p||(async()=>{(0,d.wh)(t),(0,De.Tc)(C,Me.Xh,Me.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===b||void 0===b?void 0:b.userType)})()}(L[t.activeIndex].events[0]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:S,event:L[t.activeIndex].events[0],productList:null===(e=L[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=L[t.activeIndex].events[0])||void 0===n?void 0:n.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[L.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(O,{onCloseCallback:P})}),L.map(((t,e)=>(0,x.jsx)(l.o5,{children:n=>{let{isActive:r,isPrev:l,isNext:a,isVisible:d,isDuplicate:c}=n;if(r){const n=1;return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o*n,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(Qe,{stories:t,onBack:R,isActive:r&&d,isNext:!1,isPrev:!1,onStoryCompleteCallback:K,initialEventIndex:z==e?E:0,showCloseOverlay:(null===L||void 0===L?void 0:L.length)<=2},"event-story-view-"+t.id)})})}return l||a?(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{_.slideTo(e,300)},children:(0,x.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(nn,{showPausedVideo:!0,event:L[e].events[0],onBack:R,isPlaying:!1,setLockSwiper:y})})}):(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide-"+e)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(Ue,{height:.04*i,width:.1*o,fontSize:.02*i})})]})})};const rn=(0,$e.Z)({key:"whatmore-css-sv"}),ln=(0,r.createContext)({isIOS:!1,totalEvents:0,closeClickComponent:null,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:"vertical",showSwipeIndicator:!0});var an=function(t){var e,n;const[i,o,l]=(0,pe.Z)(),[a]=(0,u.j1)("whatmoreShopId"),{whatmoreRootId:d}=(0,r.useContext)(V.I),{whatmoreIsStoriesTemplate:s}=(0,r.useContext)(V.I);var h=t.events,p=t.index,v=t.onBack,m=t.eventsStories,g=t.initialStoryIndex,f=(0,c.cX2)(a),w=(h[p],"portrait"===i?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(n=t.slideDirection)&&void 0!==n?n:h.length>1?"horizontal":"vertical"),j="portrait"===i?!(0,c.h6H)(a)&&!s:(0,c.n89)(a);return h[p],(0,r.useLayoutEffect)((()=>{(0,c.TLG)(a)&&(window.location.href.includes(f)?history.replaceState(null,"","#"+f):history.pushState(null,"","#"+f),window.addEventListener("popstate",(()=>{window.location.href.includes(f)||v()})))}),[]),delete Xe.ZP.styles.global,s?(0,x.jsx)(Ge.C,{value:rn,children:(0,x.jsx)(Ye.x,{theme:Xe.ZP,cssVarsRoot:d,resetCSS:!1,children:(0,x.jsx)(ln.Provider,{value:{isIOS:(0,be.KE)(),totalEvents:h.length,closeClickComponent:v,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:w,showSwipeIndicator:j},children:"portrait"===i?(0,x.jsx)(tn,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p}):(0,c.Bbr)(a)?(0,x.jsx)(on,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p}):(0,x.jsx)(tn,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p})})})}):(0,x.jsx)(Ge.C,{value:rn,children:(0,x.jsx)(Ye.x,{theme:Xe.ZP,cssVarsRoot:d,resetCSS:!1,children:(0,x.jsx)(ln.Provider,{value:{isIOS:(0,be.KE)(),totalEvents:h.length,closeClickComponent:v,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:w,showSwipeIndicator:j},children:"portrait"===i?(0,x.jsx)(qe,{events:h,eventIndex:p,onBack:v}):(0,x.jsx)(Be,{events:h,eventIndex:p,onBack:v})})})})}},9316:function(t,e,n){n.d(e,{mT:function(){return o}});var i=n(686);const o=`\n ${i.F4`
77
77
  0% { transform: scale(1); }
78
78
  50%, { transform: scale(0.95); }
79
79
  100% { transform: scale(1); }