whatmore-react-assets 1.0.1371 → 1.0.1373
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -69,7 +69,7 @@
|
|
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)(Kt.Z,{sx:{boxShadow:3,color:"white !important",fontSize:1.6*f,filter:"drop-shadow(0 0 5px black);"}})})})]})})}var qt=i(5630),Nt=i(6665);function Vt(t){var e;const[i,o]=(0,n.useState)(null),r=t.product;return(0,n.useEffect)((()=>{(0,lt.bN)(r).then((t=>{o(t.variants)}))}),[]),null==i?(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(i).toString()})]})})}function Zt(t){const e=t.product;return(0,x.jsx)(Vt,{product:e,variantId:t.variantId,height:t.height,width:t.width})}function Ht(t){var e,i,o,r,a,d,h,p;const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[g]=(0,u.j1)("whatmoreShopId"),[f]=(0,u.j1)("whatmorePrimaryFont"),[w]=(0,u.j1)("whatmoreSecondaryColor"),[j]=(0,u.j1)("websiteLanguage"),y=(0,u.MO)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:C,whatmoreUserInfo:b}=(0,n.useContext)(V.I),[S,k]=(0,n.useState)(!1),{closeClickComponent:_}=(0,n.useContext)(yi),[T,F]=(0,n.useState)(!1),E=t.FONT_SIZE,P=t.data,O=t.event,z=t.selectedVariantId,L=t.product,D=t.itemQuantity,M=t.PRODUCT_TILE_WIDTH,R=t.cartItemCount,A=t.addToCartFlag,K=t.setAddToCartFlag,W=t.soldOutFlag,Z=t.setSoldOutFlag,H=C.landingLocationType,U=C.templateType,B=(0,mt.NY)(H)+(0,mt.dS)(U)+(null!==O&&void 0!==O&&O.isRelatedEvent?"R":"E")+"_"+(null===O||void 0===O?void 0:O.event_id);const Y=t=>{var e,i;(function(t,e){v||m||(async()=>{(0,l.$L)(t,e)})()}(O,L),"buy-now"==t)&&(!function(t,e,i,n,o,r,l){"shopify"==i?(0,lt.bj)(t,e,n,o,r,l):(0,rt.rY)(t,e,n)}(void 0!==z?z:null===P||void 0===P||null===(e=P.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.id,D,(0,c.Ipo)(g),g,B,null===O||void 0===O?void 0:O.location,null===b||void 0===b?void 0:b.userType),(0,q.GF)({userInteractionType:N.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:C,event:O,productList:[L],ctaList:O.cta}));"view-more"==t&&((0,c.lj5)(g)?window.location.href=L.product_link+"?"+(0,c.awP)(g)+"&"+(0,c.n9s)(g)+"&"+(0,c.vaK)(g)+((0,c.C0m)(g)?"¤cy="+L.currency:""):window.location.href=L.product_link+((0,c.C0m)(g)?"?currency="+L.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"==g?"#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*E,children:[" ",W?(0,x.jsx)($.zx,{width:"90%",bg:"#252324",variant:"outline",opacity:4,_hover:{bg:"#252324"},height:2.5*E,disabled:!0,sx:{borderRadius:"round"==y?"5px":"0px",borderWidth:(0,c.alU)(g),borderColor:(0,c.qPe)(g)},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"white !important",fontFamily:f+" !important"},children:"Sold Out"})}):(0,x.jsxs)(s.Kq,{direction:"vertical"==(0,c.rc3)(g)?"column":"row",width:"100%",spacing:"15px",fontSize:.9*E,justifyContent:"center",children:[(0,c.$bv)(g)?(0,x.jsx)($.zx,{width:"fit-content",height:2.5*E,onClick:async t=>{var e,i;t.stopPropagation(),k(!0),function(t,e,i){v||m||(async()=>{(0,l.JX)(t,e,i)})()}(O,L,D),(0,q.GF)({userInteractionType:N.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:C,event:O,productList:[L],ctaList:O.cta});const n=null!==z&&void 0!==z?z:null===P||void 0===P||null===(e=P.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.id;if(!n)return console.log("ERROR! No variants available."),void k(!1);st(n,D,(0,c.Ipo)(g),g,O,L,B,null===O||void 0===O?void 0:O.location,null===b||void 0===b?void 0:b.userType).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(k(!1),K(!0),(0,u.bU)("whatmoreAddedToCart",!0),(0,c.kad)(g)&&(v||(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=>{k(!1),Z(!0),console.error("Error:",t)}))},sx:{minWidth:"50%",paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:"#343434"===(0,c.hmr)(g)?w+" !important":(0,c.hmr)(g)+" !important",borderRadius:"round"==y?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,c.p5R)(g),borderColor:"#343434"===(0,c.hmr)(g)?w:(0,c.hmr)(g),_hover:{backgroundColor:"transparent !important",borderWidth:(0,c.p5R)(g),borderColor:"#343434"===(0,c.yxc)(g)?w:(0,c.yxc)(g)}},children:S?(0,x.jsx)(qt.$,{display:"flex !important",color:"white"}):(0,x.jsx)(s.xv,{fontWeight:"extrabold !important",sx:{color:(0,c.KCy)(g)+" !important",fontFamily:f+" !important"},fontSize:E+"px !important",children:"ADD TO CART"!=(0,c.tan)(g)?(0,c.tan)(g):null!==(e=null===Q||void 0===Q||null===(i=Q[j])||void 0===i?void 0:i.add_to_cart)&&void 0!==e?e:(0,c.tan)(g)})}):(0,x.jsx)(x.Fragment,{}),(0,c.cDD)(g)?(0,x.jsx)(x.Fragment,{children:(0,c.H$w)(g)?(0,x.jsx)(Zt,{variantId:void 0!==z?z:null===P||void 0===P||null===(o=P.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id,product:L,height:2.5*E,width:"90%",fontSize:E,fontFamily:f}):(0,x.jsx)(x.Fragment,{children:(0,c.Stj)(g)?(0,x.jsx)($.zx,{variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*E,onClick:()=>Y("view-more"),sx:{width:"fit-content",minWidth:"50%",paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:(0,c.IIW)(g)+" !important",borderRadius:"round"==y?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,c.alU)(g),borderColor:(0,c.qPe)(g)},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"#343434"===(0,c.iKW)(g)?w+" !important":(0,c.iKW)(g)+" !important",fontFamily:f+" !important"},fontSize:E,children:"MORE INFO"!=(0,c.Z59)(g)?(0,c.Z59)(g):null!==(a=null===Q||void 0===Q||null===(d=Q[j])||void 0===d?void 0:d.more_info)&&void 0!==a?a:(0,c.Z59)(g)})}):(0,x.jsx)($.zx,{variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*E,onClick:t=>{Y("buy-now")},sx:{width:"fit-content",minWidth:"50%",paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:(0,c.IIW)(g)+" !important",borderRadius:"round"==y?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,c.p5R)(g),borderColor:"#343434"===(0,c.yxc)(g)?w:(0,c.yxc)(g),_hover:{backgroundColor:"transparent !important"}},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold !important",sx:{color:"#343434"===(0,c.iKW)(g)?w+" !important":(0,c.iKW)(g)+" !important",fontFamily:f+" !important"},fontSize:E+"px !important",children:"BUY NOW"!=(0,c.ZuH)(g)?(0,c.ZuH)(g):null!==(h=null===Q||void 0===Q||null===(p=Q[j])||void 0===p?void 0:p.buy_now)&&void 0!==h?h:(0,c.ZuH)(g)})})})}):(0,x.jsx)(x.Fragment,{})]}),(0,x.jsx)(x.Fragment,{children:(0,c.$bv)(g)?(0,x.jsx)(x.Fragment,{children:T?(0,x.jsx)(s.kC,{width:"10%",spacing:"0",right:0,children:(0,x.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,x.jsx)(Nt.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*E}})})}):(0,x.jsxs)(s.kC,{animation:A?I:"none",onAnimationEnd:()=>K(!1),width:"10%",spacing:"0",right:0,onClick:()=>{"do_nothing"!==(0,c.v9M)(g)&&("go_to_cart_page"!==(0,c.v9M)(g)?(F(!0),function(t){"open_cart_slider"!==(0,c.v9M)(t)||null!==_&&_()}(g)):ct((0,c.Ipo)(g),g))},cursor:"pointer",children:[(0,x.jsx)(X.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*E}}),R>0?(0,x.jsx)(s.Cd,{padding:"2px",bg:"white",size:1.1*E,top:.03*-M,verticalAlign:"top",position:"relative",left:.11*-M,zIndex:"1",children:(0,x.jsx)(s.xv,{sx:{color:"black !important",fontFamily:f+" !important"},fontWeight:"bold !important",fontSize:.7*E+"px !important",children:R})}):(0,x.jsx)(x.Fragment,{})]})}):(0,x.jsx)(x.Fragment,{})})]})}function Ut(t){const[e]=(0,u.j1)("whatmorePrimaryFont"),i=((0,u.MO)("whatmoreShopId"),t.setOpenShopNow),n=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*n,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(),i(!1),o(!1)},cursor:"pointer",children:(0,x.jsx)(Kt.Z,{sx:{boxShadow:3,color:"black !important",fontSize:1.2*n,filter:"drop-shadow(0 0 5px black);"}})})]})}function Bt(t){var e;const[i]=(0,u.j1)("whatmorePrimaryFont"),n=((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:n+"px !important",fontWeight:"bold !important",justifyContent:"center",sx:{color:"black !important",fontFamily:i+" !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*n+"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:i+" !important",lineHeight:"140% !important"}})})})]});var r}const Yt=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"})]})})};function Xt(t){var e,i,o;const[r,l]=(0,n.useState)(t.product),[a]=(0,u.j1)("whatmorePrimaryFont"),[d]=(0,u.j1)("whatmoreShopId"),[h]=(0,u.j1)("whatmoreSecondaryColor");(0,n.useEffect)((()=>{(0,c.N8M)(d)&&(0,xt.Rb)(r,(0,c.Ipo)(d),d).then((t=>{l(t)}))}),[]);const p=t.FONT_SIZE,v=t.data,m=t.itemPrice;let g,f,w;var j,y,C;"STRDOIDF6O7"==d&&(g=null===v||void 0===v||null===(j=v.variants)||void 0===j?void 0:j.find((e=>e.id==t.selectedVariantId)),f=null===(y=g)||void 0===y?void 0:y.title,w=null===(C=g)||void 0===C?void 0:C.productLink);const b=null===v||void 0===v||null===(e=v.variants)||void 0===e||null===(i=e.find((e=>e.id==t.selectedVariantId)))||void 0===i?void 0:i.compare_at_price,S=b&&0!=b&&b>m?Math.round((b-m)/b*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)(d)?("STRDOIDF6O7"==d?w:t.product_link)+"?"+(0,c.awP)(d)+"&"+(0,c.n9s)(d)+"&"+(0,c.vaK)(d)+((0,c.C0m)(d)?"¤cy="+t.currency:""):("STRDOIDF6O7"==d?w:t.product_link)+((0,c.C0m)(d)?"?currency="+t.currency:"")}(r),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:p,sx:{color:"black !important",lineHeight:"140% !important",fontFamily:a+" !important"},as:"b",children:"STRDOIDF6O7"==d&&null!==(o=f)&&void 0!==o?o:null===v||void 0===v?void 0:v.title}),(0,x.jsx)(Yt,{iconSize:1.1*p})]})}),(0,x.jsxs)(s.kC,{direction:"row",gap:"6px",paddingTop:"4px",children:[b&&b>m&&(0,x.jsx)(s.xv,{as:"s",padding:"2px",fontSize:1.2*p,fontWeight:"semibold",sx:{color:"gray !important",fontFamily:a+" !important"},children:(0,xt.jx)(parseFloat(b)," ",d,r.currency,!0)}),(0,x.jsx)(s.xv,{as:"b",padding:"2px",fontSize:1.2*p,fontWeight:"semibold !important",sx:{color:"black !important",fontFamily:a+" !important"},children:(0,xt.jx)(parseFloat(m)," ",d,r.currency,!0)}),!isNaN(S)&&0!=S&&(0,x.jsx)(s.xu,{display:"flex",backgroundColor:"green"==(0,c.ZJm)(d)?"#343434"==h?(0,c.ZJm)(d):h:(0,c.ZJm)(d),alignItems:"center",borderRadius:"4px",width:"fit-content",px:"6px",children:(0,x.jsx)(s.xv,{fontSize:(0,c.sTg)(d)?"14px !important":1.1*p,fontWeight:"normal !important",sx:{color:(0,c.mso)(d)+" !important",fontFamily:a+" !important"},children:(0,c.sTg)(d)?`${S}% off`:`Save ${(0,xt.jx)(parseFloat(b/100-m/100)," ",d,r.currency)}`})})]})]})})}function Gt(t){var e,i;const[o]=(0,u.j1)("whatmorePrimaryFont"),[r]=(0,u.j1)("whatmoreShopId"),{setShowOptionsChart:l}=(0,n.useContext)(re),[a,d]=(0,n.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,i)=>{if(2==i)d((i=>({...i,[t]:e})));else if(1==i)d((i=>{var n,o,r,l;return{...i,[t]:e,[null===j||void 0===j||null===(n=j.options)||void 0===n||null===(o=n[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 n,o;const i=null===j||void 0===j||null===(n=j.variants)||void 0===n||null===(o=n.find((t=>(null===t||void 0===t?void 0:t.option1)==e)))||void 0===o?void 0:o.option2;d((n=>{var o,r,l,a,d,s,c,u;return{...n,[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)==i)))||void 0===u?void 0:u.option3,[t]:e}}))}};(0,n.useEffect)((()=>{d((t=>{var e,i,n,o,r,l,a,d,s,c,u,h;return{...t,[null===j||void 0===j||null===(e=j.options)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.name]:null===j||void 0===j||null===(n=j.variants)||void 0===n||null===(o=n.find((t=>{var e,i,n;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(i=e[0])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.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,i,n;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(i=e[1])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.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,i,n;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(i=e[2])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.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===(i=j.options)||void 0===i?void 0:i.map(((e,i)=>{var n,d,u,C,b,S;return(0,x.jsx)(x.Fragment,{children:"mlveda_country"!==(null===e||void 0===e?void 0:e.name)&&((null===e||void 0===e||null===(n=e.values)||void 0===n?void 0:n.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:o+" !important",fontWeight:"bold !important"},children:null===e||void 0===e?void 0:e.name}),"Size"===e.name&&(0,c.Ip6)(r)?(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:o+" !important"},onClick:()=>{null!==l&&l(!0)},children:(0,c.meb)(r)})}):(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===(b=e.values)||void 0===b?void 0:b.map((n=>{var l,d,u,C,b,S,I,k,_;const T=((t,e)=>{var i,n,o,r,l,d,s,c,u,h;if(null===j||void 0===j||null===(i=j.options)||void 0===i||!i.length)return!1;const p=null===j||void 0===j||null===(n=j.options)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.name,v=null===j||void 0===j||null===(r=j.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name;switch(null===j||void 0===j||null===(d=j.options)||void 0===d||null===(s=d[2])||void 0===s||s.name,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===(u=j.variants)||void 0===u?void 0:u.some((e=>e.option1===t&&e.available));case 2:var x;return 0===e?null===j||void 0===j||null===(x=j.variants)||void 0===x?void 0:x.some((e=>e.option1===t&&e.available)):null===j||void 0===j||null===(h=j.variants)||void 0===h?void 0:h.some((e=>e.option2===t&&e.option1===a[p]&&e.available));case 3:var m,g,f;if(0===e)return null===j||void 0===j||null===(m=j.variants)||void 0===m?void 0:m.some((e=>e.option1===t&&e.available));if(1===e)return null===j||void 0===j||null===(g=j.variants)||void 0===g?void 0:g.some((e=>e.option2===t&&e.option1===a[p]&&e.available));if(2===e)return null===j||void 0===j||null===(f=j.variants)||void 0===f?void 0:f.some((e=>e.option3===t&&e.option1===a[p]&&e.option2===a[v]&&e.available));default:return!1}})(n,i),F=0==i||j.variants.find((t=>{var e,o;return t[`option${i}`]==(null===(e=Object.entries(a))||void 0===e||null===(o=e[i-1])||void 0===o?void 0:o[1])&&t[`option${i+1}`]==n}));return("Colour"===(null===e||void 0===e?void 0:e.name)||null!==e&&void 0!==e&&e.name.toLowerCase().includes("color"))&&F&&((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)(r),size:"sm",border:a[null===e||void 0===e?void 0:e.name]===n?`2px solid ${(0,c.ua_)(r)} !important`:"",cursor:"pointer",width:"fit-content !important",onClick:()=>{y(null===e||void 0===e?void 0:e.name,n,i),p(n),0===i&&v(n),1===i&&m(n),2===i&&f(n)},children:(0,x.jsx)(g.Ee,{padding:"2px",borderRadius:(0,c.lmH)(r),width:"58px",height:"58px",src:(0,pt.s)(null!==(C=null===t||void 0===t||null===(b=t.finalArr)||void 0===b||null===(S=b.find((t=>(null===t||void 0===t?void 0:t.color)==n)))||void 0===S?void 0:S.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)==n)))||void 0===k?void 0:k.optionsrc,"?width=400&height=400")})})},n)}):F&&(0,x.jsx)(s.kC,{paddingBottom:"8px",paddingRight:"8px",children:(0,x.jsx)($.zx,{isDisabled:!T,size:"sm",px:"8px !important",bg:a[null===e||void 0===e?void 0:e.name]===n&&T?(null!==(_=(0,c.CPm)(r))&&void 0!==_?_:h)+" !important":(0,c.bC3)(r)+" !important",width:"fit-content !important",onClick:()=>{"76408193304"!=r||"Size"!=(null===e||void 0===e?void 0:e.name)||"Customize"!=n?(y(null===e||void 0===e?void 0:e.name,n,i),0===i&&v(n),1===i&&m(n),2===i&&f(n)):window.location.href=t.product.product_link},children:(0,x.jsx)(s.xv,{as:T?"p":"s",textDecoration:T?"none":"line-through",fontSize:.9*w+"px !important",sx:{fontFamily:o+" !important",fontWeight:"normal !important",color:a[null===e||void 0===e?void 0:e.name]===n&&T?(0,c.cY_)(r)+" !important":(0,c.FbM)(r)+" !important"},children:n})})},n)}))}),i===(null===j||void 0===j||null===(S=j.options)||void 0===S?void 0:S.length)-1&&(0,x.jsx)(s.M5,{paddingTop:"8px",width:"100%",children:(0,x.jsx)(s.iz,{color:t.dividerColor,size:"xs"})})]})})}))})})}var $t=i(8782);function Qt(t){var e,i,o,r,l,a,d,p,v,m,f,w,j,y,C,S,I,k,_,T,F;const[E,P,O,z]=(0,h.Z)();var L=.4*z*.8,D=L*(16/9)*.6*.8;const M=1.1*L,A=M*(16/9)*.8;var K=.12*L;const[W,q]=(0,n.useState)(!1),N=t.data,V=t.event,Z=t.product,H=t.setOpenShopNow,U=t.setLockSwiper,[B]=(0,u.j1)("whatmoreEmbedAppUseVariant"),[Y,X]=(0,n.useState)((()=>{if("true"===B)return ee(N,Z.client_product_id)})),[G,$]=(0,n.useState)((()=>{if("true"===B)return ie(N,Z.client_product_id)})),[Q,J]=(0,n.useState)((()=>{if("true"===B)return ne(N,Z.client_product_id)})),[tt,et]=(0,n.useState)(),[it,nt]=(0,n.useState)(1),[ot,at]=(0,n.useState)(),[dt,st]=(0,n.useState)(0),[ct,ut]=(0,n.useState)(!1),[ht,vt]=(0,n.useState)(!1),[xt,mt]=(0,n.useState)(Z.thumbnail_image),gt=(0,u.MO)("whatmoreUITheme"),ft=(0,u.MO)("whatmoreShopId"),wt=(0,n.useCallback)((t=>{X(t)}),[]),jt=(0,n.useCallback)((t=>{$(t)}),[]),yt=(0,n.useCallback)((t=>{J(t)}),[]);(0,n.useEffect)((()=>{var t,e;const i=Jt(N,Y,G,Q);et(null!==i&&void 0!==i?i:null===N||void 0===N||null===(t=N.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.id),at(te(N,i)),nt(1),vt(!1);const n=oe(N,i);null!==n&&mt(n)}),[Y,G,Q]),(0,n.useEffect)((()=>{var t,e;const i=void 0===tt?null===N||void 0===N||null===(t=N.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.price:te(N,tt);at(i*it)}),[it]),(0,n.useEffect)((()=>{function t(t){const e=document.getElementById("whatmore-shopnow-view"),i=document.getElementById("whatmore-size-chart");i&&i.contains(t.target)||!e||e.contains(t.target)||(H(!1),U(!1))}function e(t){t.stopPropagation(),i.scrollTop+=t.deltaY}document.addEventListener("click",t);const i=document.getElementById("whatmore-shopnow-view");return null===i||void 0===i||i.addEventListener("wheel",e),()=>{document.removeEventListener("click",t),i.removeEventListener("wheel",e)}}),[]),(0,n.useEffect)((()=>{const t=async function(t,e){return"shopify"==t?(0,lt.Bi)():(0,rt.OM)(e)}((0,c.Ipo)(ft),ft);t.then((t=>t.json())).then((t=>{st(t.item_count)})).catch((t=>{console.error("Cart Add Error:",t)}))}),[ct]);const Ct=`${b.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)(Kt.Z,{sx:{boxShadow:3,color:"white !important",fontSize:1.6*f,filter:"drop-shadow(0 0 5px black);"}})})})]})})}var qt=i(5630),Nt=i(6665);function Vt(t){var e;const[i,o]=(0,n.useState)(null),r=t.product;return(0,n.useEffect)((()=>{(0,lt.bN)(r).then((t=>{o(t.variants)}))}),[]),null==i?(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(i).toString()})]})})}function Zt(t){const e=t.product;return(0,x.jsx)(Vt,{product:e,variantId:t.variantId,height:t.height,width:t.width})}function Ht(t){var e,i,o,r,a,d,h,p;const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[g]=(0,u.j1)("whatmoreShopId"),[f]=(0,u.j1)("whatmorePrimaryFont"),[w]=(0,u.j1)("whatmoreSecondaryColor"),[j]=(0,u.j1)("websiteLanguage"),y=(0,u.MO)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:C,whatmoreUserInfo:b}=(0,n.useContext)(V.I),[S,k]=(0,n.useState)(!1),{closeClickComponent:_}=(0,n.useContext)(yi),[T,F]=(0,n.useState)(!1),E=t.FONT_SIZE,P=t.data,O=t.event,z=t.selectedVariantId,L=t.product,D=t.itemQuantity,M=t.PRODUCT_TILE_WIDTH,R=t.cartItemCount,A=t.addToCartFlag,K=t.setAddToCartFlag,W=t.soldOutFlag,Z=t.setSoldOutFlag,H=C.landingLocationType,U=C.templateType,B=(0,mt.NY)(H)+(0,mt.dS)(U)+(null!==O&&void 0!==O&&O.isRelatedEvent?"R":"E")+"_"+(null===O||void 0===O?void 0:O.event_id);const Y=t=>{var e,i;(function(t,e){v||m||(async()=>{(0,l.$L)(t,e)})()}(O,L),"buy-now"==t)&&(!function(t,e,i,n,o,r,l){"shopify"==i?(0,lt.bj)(t,e,n,o,r,l):(0,rt.rY)(t,e,n)}(void 0!==z?z:null===P||void 0===P||null===(e=P.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.id,D,(0,c.Ipo)(g),g,B,null===O||void 0===O?void 0:O.location,null===b||void 0===b?void 0:b.userType),(0,q.GF)({userInteractionType:N.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:C,event:O,productList:[L],ctaList:O.cta}));"view-more"==t&&((0,c.lj5)(g)?window.location.href=L.product_link+"?"+(0,c.awP)(g)+"&"+(0,c.n9s)(g)+"&"+(0,c.vaK)(g)+((0,c.C0m)(g)?"¤cy="+L.currency:""):window.location.href=L.product_link+((0,c.C0m)(g)?"?currency="+L.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"==g?"#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*E,children:[" ",W?(0,x.jsx)($.zx,{width:"90%",bg:"#252324",variant:"outline",opacity:4,_hover:{bg:"#252324"},height:2.5*E,disabled:!0,sx:{borderRadius:"round"==y?"5px":"0px",borderWidth:(0,c.alU)(g),borderColor:(0,c.qPe)(g)},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"white !important",fontFamily:f+" !important"},children:"Sold Out"})}):(0,x.jsxs)(s.Kq,{direction:"vertical"==(0,c.rc3)(g)?"column":"row",width:"100%",spacing:"15px",fontSize:.9*E,justifyContent:"center",children:[(0,c.$bv)(g)?(0,x.jsx)($.zx,{width:"fit-content",height:2.5*E,onClick:async t=>{var e,i;t.stopPropagation(),k(!0),function(t,e,i){v||m||(async()=>{(0,l.JX)(t,e,i)})()}(O,L,D),(0,q.GF)({userInteractionType:N.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:C,event:O,productList:[L],ctaList:O.cta});const n=null!==z&&void 0!==z?z:null===P||void 0===P||null===(e=P.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.id;if(!n)return console.log("ERROR! No variants available."),void k(!1);st(n,D,(0,c.Ipo)(g),g,O,L,B,null===O||void 0===O?void 0:O.location,null===b||void 0===b?void 0:b.userType).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(k(!1),K(!0),(0,u.bU)("whatmoreAddedToCart",!0),(0,c.kad)(g)&&(v||(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=>{k(!1),Z(!0),console.error("Error:",t)}))},sx:{minWidth:"50%",paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:"#343434"===(0,c.hmr)(g)?w+" !important":(0,c.hmr)(g)+" !important",borderRadius:"round"==y?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,c.p5R)(g),borderColor:"#343434"===(0,c.hmr)(g)?w:(0,c.hmr)(g),_hover:{backgroundColor:"transparent !important",borderWidth:(0,c.p5R)(g),borderColor:"#343434"===(0,c.yxc)(g)?w:(0,c.yxc)(g)}},children:S?(0,x.jsx)(qt.$,{display:"flex !important",color:"white"}):(0,x.jsx)(s.xv,{fontWeight:"extrabold !important",sx:{color:(0,c.KCy)(g)+" !important",fontFamily:f+" !important"},fontSize:E+"px !important",children:"ADD TO CART"!=(0,c.tan)(g)?(0,c.tan)(g):null!==(e=null===Q||void 0===Q||null===(i=Q[j])||void 0===i?void 0:i.add_to_cart)&&void 0!==e?e:(0,c.tan)(g)})}):(0,x.jsx)(x.Fragment,{}),(0,c.cDD)(g)?(0,x.jsx)(x.Fragment,{children:(0,c.H$w)(g)?(0,x.jsx)(Zt,{variantId:void 0!==z?z:null===P||void 0===P||null===(o=P.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id,product:L,height:2.5*E,width:"90%",fontSize:E,fontFamily:f}):(0,x.jsx)(x.Fragment,{children:(0,c.Stj)(g)?(0,x.jsx)($.zx,{variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*E,onClick:()=>Y("view-more"),sx:{width:"fit-content",minWidth:"50%",paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:(0,c.IIW)(g)+" !important",borderRadius:"round"==y?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,c.alU)(g),borderColor:(0,c.qPe)(g)},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"#343434"===(0,c.iKW)(g)?w+" !important":(0,c.iKW)(g)+" !important",fontFamily:f+" !important"},fontSize:E,children:"MORE INFO"!=(0,c.Z59)(g)?(0,c.Z59)(g):null!==(a=null===Q||void 0===Q||null===(d=Q[j])||void 0===d?void 0:d.more_info)&&void 0!==a?a:(0,c.Z59)(g)})}):(0,x.jsx)($.zx,{variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*E,onClick:t=>{Y("buy-now")},sx:{width:"fit-content",minWidth:"50%",paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:(0,c.IIW)(g)+" !important",borderRadius:"round"==y?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,c.p5R)(g),borderColor:"#343434"===(0,c.yxc)(g)?w:(0,c.yxc)(g),_hover:{backgroundColor:"transparent !important"}},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold !important",sx:{color:"#343434"===(0,c.iKW)(g)?w+" !important":(0,c.iKW)(g)+" !important",fontFamily:f+" !important"},fontSize:E+"px !important",children:"BUY NOW"!=(0,c.ZuH)(g)?(0,c.ZuH)(g):null!==(h=null===Q||void 0===Q||null===(p=Q[j])||void 0===p?void 0:p.buy_now)&&void 0!==h?h:(0,c.ZuH)(g)})})})}):(0,x.jsx)(x.Fragment,{})]}),(0,x.jsx)(x.Fragment,{children:(0,c.$bv)(g)?(0,x.jsx)(x.Fragment,{children:T?(0,x.jsx)(s.kC,{width:"10%",spacing:"0",right:0,children:(0,x.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,x.jsx)(Nt.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*E}})})}):(0,x.jsxs)(s.kC,{animation:A?I:"none",onAnimationEnd:()=>K(!1),width:"10%",spacing:"0",right:0,onClick:()=>{"do_nothing"!==(0,c.v9M)(g)&&("go_to_cart_page"!==(0,c.v9M)(g)?(F(!0),function(t){"open_cart_slider"!==(0,c.v9M)(t)||null!==_&&_()}(g)):ct((0,c.Ipo)(g),g))},cursor:"pointer",children:[(0,x.jsx)(X.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*E}}),R>0?(0,x.jsx)(s.Cd,{padding:"2px",bg:"white",size:1.1*E,top:.03*-M,verticalAlign:"top",position:"relative",left:.11*-M,zIndex:"1",children:(0,x.jsx)(s.xv,{sx:{color:"black !important",fontFamily:f+" !important"},fontWeight:"bold !important",fontSize:.7*E+"px !important",children:R})}):(0,x.jsx)(x.Fragment,{})]})}):(0,x.jsx)(x.Fragment,{})})]})}function Ut(t){const[e]=(0,u.j1)("whatmorePrimaryFont"),i=((0,u.MO)("whatmoreShopId"),t.setOpenShopNow),n=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*n,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(),i(!1),o(!1)},cursor:"pointer",children:(0,x.jsx)(Kt.Z,{sx:{boxShadow:3,color:"black !important",fontSize:1.2*n,filter:"drop-shadow(0 0 5px black);"}})})]})}function Bt(t){var e;const[i]=(0,u.j1)("whatmorePrimaryFont"),n=((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:n+"px !important",fontWeight:"bold !important",justifyContent:"center",sx:{color:"black !important",fontFamily:i+" !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*n+"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:i+" !important",lineHeight:"140% !important"}})})})]});var r}const Yt=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"})]})})};function Xt(t){var e;const[i,o]=(0,n.useState)(t.product),[r]=(0,u.j1)("whatmorePrimaryFont"),[l]=(0,u.j1)("whatmoreShopId"),[a]=(0,u.j1)("whatmoreSecondaryColor");(0,n.useEffect)((()=>{(0,c.N8M)(l)&&(0,xt.Rb)(i,(0,c.Ipo)(l),l).then((t=>{o(t)}))}),[]);const d=t.FONT_SIZE,h=t.data,p=t.itemPrice;let v,m,g;var f,w,j;"STRDOIDF6O7"==l&&(v=null===h||void 0===h||null===(f=h.variants)||void 0===f?void 0:f.find((e=>e.id==t.selectedVariantId)),m=null===(w=v)||void 0===w?void 0:w.title,g=null===(j=v)||void 0===j?void 0:j.productLink);const y=(()=>{var e;const i=null===h||void 0===h||null===(e=h.variants)||void 0===e?void 0:e.find((e=>e.id==t.selectedVariantId));return null!==i&&void 0!==i&&i.compare_at_price&&parseFloat(i.compare_at_price)>0?i.compare_at_price:null})(),C=y&&0!=y&&y>p?Math.round((y-p)/y*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)(l)?("STRDOIDF6O7"==l?g:t.product_link)+"?"+(0,c.awP)(l)+"&"+(0,c.n9s)(l)+"&"+(0,c.vaK)(l)+((0,c.C0m)(l)?"¤cy="+t.currency:""):("STRDOIDF6O7"==l?g:t.product_link)+((0,c.C0m)(l)?"?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:d,sx:{color:"black !important",lineHeight:"140% !important",fontFamily:r+" !important"},as:"b",children:"STRDOIDF6O7"==l&&null!==(e=m)&&void 0!==e?e:null===h||void 0===h?void 0:h.title}),(0,x.jsx)(Yt,{iconSize:1.1*d})]})}),(0,x.jsxs)(s.kC,{direction:"row",gap:"6px",paddingTop:"4px",children:[y&&y>p&&(0,x.jsx)(s.xv,{as:"s",padding:"2px",fontSize:1.2*d,fontWeight:"semibold",sx:{color:"gray !important",fontFamily:r+" !important"},children:(0,xt.jx)(parseFloat(y)," ",l,i.currency,!0)}),(0,x.jsx)(s.xv,{as:"b",padding:"2px",fontSize:1.2*d,fontWeight:"semibold !important",sx:{color:"black !important",fontFamily:r+" !important"},children:(0,xt.jx)(parseFloat(p),"",l,i.currency,!0)}),!isNaN(C)&&0!=C&&(0,x.jsx)(s.xu,{display:"flex",backgroundColor:"green"==(0,c.ZJm)(l)?"#343434"==a?(0,c.ZJm)(l):a:(0,c.ZJm)(l),alignItems:"center",borderRadius:"4px",width:"fit-content",px:"6px",children:(0,x.jsx)(s.xv,{fontSize:(0,c.sTg)(l)?"14px !important":1.1*d,fontWeight:"normal !important",sx:{color:(0,c.mso)(l)+" !important",fontFamily:r+" !important"},children:(0,c.sTg)(l)?`${C}% off`:`Save ${(0,xt.jx)(parseFloat(y/100-p/100)," ",l,i.currency)}`})})]})]})})}function Gt(t){var e,i;const[o]=(0,u.j1)("whatmorePrimaryFont"),[r]=(0,u.j1)("whatmoreShopId"),{setShowOptionsChart:l}=(0,n.useContext)(re),[a,d]=(0,n.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,i)=>{if(2==i)d((i=>({...i,[t]:e})));else if(1==i)d((i=>{var n,o,r,l;return{...i,[t]:e,[null===j||void 0===j||null===(n=j.options)||void 0===n||null===(o=n[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 n,o;const i=null===j||void 0===j||null===(n=j.variants)||void 0===n||null===(o=n.find((t=>(null===t||void 0===t?void 0:t.option1)==e)))||void 0===o?void 0:o.option2;d((n=>{var o,r,l,a,d,s,c,u;return{...n,[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)==i)))||void 0===u?void 0:u.option3,[t]:e}}))}};(0,n.useEffect)((()=>{d((t=>{var e,i,n,o,r,l,a,d,s,c,u,h;return{...t,[null===j||void 0===j||null===(e=j.options)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.name]:null===j||void 0===j||null===(n=j.variants)||void 0===n||null===(o=n.find((t=>{var e,i,n;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(i=e[0])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.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,i,n;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(i=e[1])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.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,i,n;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(i=e[2])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.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===(i=j.options)||void 0===i?void 0:i.map(((e,i)=>{var n,d,u,C,b,S;return(0,x.jsx)(x.Fragment,{children:"mlveda_country"!==(null===e||void 0===e?void 0:e.name)&&((null===e||void 0===e||null===(n=e.values)||void 0===n?void 0:n.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:o+" !important",fontWeight:"bold !important"},children:null===e||void 0===e?void 0:e.name}),"Size"===e.name&&(0,c.Ip6)(r)?(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:o+" !important"},onClick:()=>{null!==l&&l(!0)},children:(0,c.meb)(r)})}):(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===(b=e.values)||void 0===b?void 0:b.map((n=>{var l,d,u,C,b,S,I,k,_;const T=((t,e)=>{var i,n,o,r,l,d,s,c,u,h;if(null===j||void 0===j||null===(i=j.options)||void 0===i||!i.length)return!1;const p=null===j||void 0===j||null===(n=j.options)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.name,v=null===j||void 0===j||null===(r=j.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name;switch(null===j||void 0===j||null===(d=j.options)||void 0===d||null===(s=d[2])||void 0===s||s.name,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===(u=j.variants)||void 0===u?void 0:u.some((e=>e.option1===t&&e.available));case 2:var x;return 0===e?null===j||void 0===j||null===(x=j.variants)||void 0===x?void 0:x.some((e=>e.option1===t&&e.available)):null===j||void 0===j||null===(h=j.variants)||void 0===h?void 0:h.some((e=>e.option2===t&&e.option1===a[p]&&e.available));case 3:var m,g,f;if(0===e)return null===j||void 0===j||null===(m=j.variants)||void 0===m?void 0:m.some((e=>e.option1===t&&e.available));if(1===e)return null===j||void 0===j||null===(g=j.variants)||void 0===g?void 0:g.some((e=>e.option2===t&&e.option1===a[p]&&e.available));if(2===e)return null===j||void 0===j||null===(f=j.variants)||void 0===f?void 0:f.some((e=>e.option3===t&&e.option1===a[p]&&e.option2===a[v]&&e.available));default:return!1}})(n,i),F=0==i||j.variants.find((t=>{var e,o;return t[`option${i}`]==(null===(e=Object.entries(a))||void 0===e||null===(o=e[i-1])||void 0===o?void 0:o[1])&&t[`option${i+1}`]==n}));return("Colour"===(null===e||void 0===e?void 0:e.name)||null!==e&&void 0!==e&&e.name.toLowerCase().includes("color"))&&F&&((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)(r),size:"sm",border:a[null===e||void 0===e?void 0:e.name]===n?`2px solid ${(0,c.ua_)(r)} !important`:"",cursor:"pointer",width:"fit-content !important",onClick:()=>{y(null===e||void 0===e?void 0:e.name,n,i),p(n),0===i&&v(n),1===i&&m(n),2===i&&f(n)},children:(0,x.jsx)(g.Ee,{padding:"2px",borderRadius:(0,c.lmH)(r),width:"58px",height:"58px",src:(0,pt.s)(null!==(C=null===t||void 0===t||null===(b=t.finalArr)||void 0===b||null===(S=b.find((t=>(null===t||void 0===t?void 0:t.color)==n)))||void 0===S?void 0:S.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)==n)))||void 0===k?void 0:k.optionsrc,"?width=400&height=400")})})},n)}):F&&(0,x.jsx)(s.kC,{paddingBottom:"8px",paddingRight:"8px",children:(0,x.jsx)($.zx,{isDisabled:!T,size:"sm",px:"8px !important",bg:a[null===e||void 0===e?void 0:e.name]===n&&T?(null!==(_=(0,c.CPm)(r))&&void 0!==_?_:h)+" !important":(0,c.bC3)(r)+" !important",width:"fit-content !important",onClick:()=>{"76408193304"!=r||"Size"!=(null===e||void 0===e?void 0:e.name)||"Customize"!=n?(y(null===e||void 0===e?void 0:e.name,n,i),0===i&&v(n),1===i&&m(n),2===i&&f(n)):window.location.href=t.product.product_link},children:(0,x.jsx)(s.xv,{as:T?"p":"s",textDecoration:T?"none":"line-through",fontSize:.9*w+"px !important",sx:{fontFamily:o+" !important",fontWeight:"normal !important",color:a[null===e||void 0===e?void 0:e.name]===n&&T?(0,c.cY_)(r)+" !important":(0,c.FbM)(r)+" !important"},children:n})})},n)}))}),i===(null===j||void 0===j||null===(S=j.options)||void 0===S?void 0:S.length)-1&&(0,x.jsx)(s.M5,{paddingTop:"8px",width:"100%",children:(0,x.jsx)(s.iz,{color:t.dividerColor,size:"xs"})})]})})}))})})}var $t=i(8782);function Qt(t){var e,i,o,r,l,a,d,p,v,m,f,w,j,y,C,S,I,k,_,T,F;const[E,P,O,z]=(0,h.Z)();var L=.4*z*.8,D=L*(16/9)*.6*.8;const M=1.1*L,A=M*(16/9)*.8;var K=.12*L;const[W,q]=(0,n.useState)(!1),N=t.data,V=t.event,Z=t.product,H=t.setOpenShopNow,U=t.setLockSwiper,[B]=(0,u.j1)("whatmoreEmbedAppUseVariant"),[Y,X]=(0,n.useState)((()=>{if("true"===B)return ee(N,Z.client_product_id)})),[G,$]=(0,n.useState)((()=>{if("true"===B)return ie(N,Z.client_product_id)})),[Q,J]=(0,n.useState)((()=>{if("true"===B)return ne(N,Z.client_product_id)})),[tt,et]=(0,n.useState)(),[it,nt]=(0,n.useState)(1),[ot,at]=(0,n.useState)(),[dt,st]=(0,n.useState)(0),[ct,ut]=(0,n.useState)(!1),[ht,vt]=(0,n.useState)(!1),[xt,mt]=(0,n.useState)(Z.thumbnail_image),gt=(0,u.MO)("whatmoreUITheme"),ft=(0,u.MO)("whatmoreShopId"),wt=(0,n.useCallback)((t=>{X(t)}),[]),jt=(0,n.useCallback)((t=>{$(t)}),[]),yt=(0,n.useCallback)((t=>{J(t)}),[]);(0,n.useEffect)((()=>{var t,e;const i=Jt(N,Y,G,Q);et(null!==i&&void 0!==i?i:null===N||void 0===N||null===(t=N.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.id),at(te(N,i)),nt(1),vt(!1);const n=oe(N,i);null!==n&&mt(n)}),[Y,G,Q]),(0,n.useEffect)((()=>{var t,e;const i=void 0===tt?null===N||void 0===N||null===(t=N.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.price:te(N,tt);at(i*it)}),[it]),(0,n.useEffect)((()=>{function t(t){const e=document.getElementById("whatmore-shopnow-view"),i=document.getElementById("whatmore-size-chart");i&&i.contains(t.target)||!e||e.contains(t.target)||(H(!1),U(!1))}function e(t){t.stopPropagation(),i.scrollTop+=t.deltaY}document.addEventListener("click",t);const i=document.getElementById("whatmore-shopnow-view");return null===i||void 0===i||i.addEventListener("wheel",e),()=>{document.removeEventListener("click",t),i.removeEventListener("wheel",e)}}),[]),(0,n.useEffect)((()=>{const t=async function(t,e){return"shopify"==t?(0,lt.Bi)():(0,rt.OM)(e)}((0,c.Ipo)(ft),ft);t.then((t=>t.json())).then((t=>{st(t.item_count)})).catch((t=>{console.error("Cart Add Error:",t)}))}),[ct]);const Ct=`${b.F4`
|
73
73
|
0% {
|
74
74
|
transform: translateY(100%);
|
75
75
|
}
|
package/static/js/{product-page-view.6bdc1223.chunk.js → product-page-view.0213f33b.chunk.js}
RENAMED
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[281],{8181:function(e,t,n){var i=n(7313),o=n(8866),r=n(7753),a=n(6417);const d=i.memo((()=>{if(!(0,r.MO)("isLandingSharedLink"))return(0,a.jsx)(a.Fragment,{});const[e]=(0,o.Z)();return(0,a.jsxs)("div",{className:`shimmer-container ${e}`,children:["portrait"===e?(0,a.jsx)("div",{className:"shimmer-item portrait-full",children:(0,a.jsx)("div",{className:"shimmer-effect"})}):Array(3).fill().map(((e,t)=>(0,a.jsx)("div",{className:"shimmer-item landscape-item "+(1===t?"center-item":""),children:(0,a.jsx)("div",{className:"shimmer-effect"})},t))),(0,a.jsx)("style",{children:"\n .shimmer-container {\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n scroll-behavior: smooth;\n z-index: 1000;\n }\n\n .portrait {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.6);\n }\n\n .landscape {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.8);\n }\n\n .shimmer-item {\n scroll-snap-align: start;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n transition: transform 0.3s ease;\n }\n\n .portrait-full {\n width: 100vw;\n height: 100vh;\n margin: 0; \n }\n\n .landscape-item {\n width: 250px;\n height: 450px;\n background: #D3D3D3;\n border-radius: 8px;\n margin-left: -50px; \n }\n\n .center-item {\n width: 360px;\n height: 620px;\n box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5); \n z-index: 10; \n }\n\n .shimmer-effect {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.3) 75%);\n animation: shimmer 2s infinite;\n background-size: 200% 100%;\n }\n\n @keyframes shimmer {\n 0% {\n background-position: -200% 0;\n }\n 100% {\n background-position: 200% 0;\n }\n }\n "})]})}));t.Z=d},7951:function(e,t,n){n.d(t,{BU:function(){return r},FC:function(){return a}});let i,o=!1;function r(){return i?i.play().then((()=>{o=!0,console.debug("iOS autoplay restrictions bypassed."),i.pause()})).catch((e=>{console.error("Failed to bless videos:",e.message)})):Promise.reject(new Error("Blessing video not initialized."))}function a(){i||(i=document.createElement("video"),i.src="https://whatmore-other-assets.b-cdn.net/whatmore/dummy_for_video_pool_3s_muted_11kb.mp4",i.muted=!0,i.playsInline=!0,i.style.display="none",document.body.appendChild(i));const e=()=>{o||r()};document.addEventListener("click",e,{once:!0}),document.addEventListener("touchstart",e,{once:!0})}},5380:function(e,t,n){n.d(t,{Z:function(){return w}});var i=n(4959),o=n(7313),r=n(4892),a=n(6805),d=n(7753),s=n(9821);var l=function(e){const[t,n,i,o,r]=(0,s.Z)(),[l]=(0,d.j1)("whatmoreEmbedAppVideoPlayerSizePortrait"),[c]=(0,d.j1)("whatmoreEmbedAppVideoPlayerSizeLandscape"),u=r[a.YP]===a.$w?c/100:l/100*1.2;return[t*u,n*u,r]},c=n(9723),u=n(9461),p=n.n(u),h=n(1195),v=n(7108),m=(n(7244),n(123),n(9854)),f=n(6417);var w=function(e){var t;const n=o.useRef(null);var[s,u,w]=l();const g=(0,d.MO)("whatmoreUITheme"),[x]=(0,d.j1)("whatmoreEmbedAppVideoTitle"),[_]=(0,d.j1)("whatmoreEmbedAppPositionPortrait"),[y]=(0,d.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[E]=(0,d.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[b]=(0,d.j1)("whatmoreEmbedAppPositionLandscape"),[I]=(0,d.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[j]=(0,d.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),S=(0,d.MO)("whatmoreShopId");var L=_,C=y,P=E;w[a.YP]===a.$w&&(L=b,C=I,P=j);const[D,O]=(0,o.useState)(["initial",window.pageYOffset]),[T,K]=(0,o.useState)(!1),A=null!==(t=e.isSpotlight)&&void 0!==t&&t,k=w[a.YP]===a.$w?.7*(0,m.zGA)(S):(0,m.zGA)(S),z=A?k:1;s*=z,u*=z;const V=A?(0,m.G0o)(S):L,M=A?(0,m.X8j)(S):(0,m.lVn)(S),[N,F]=(0,o.useState)(!A&&(0,m.eXi)(S));function Y(e,t){O(e),e[1]<=100?K(!1):t!=T&&(K(t),F(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const n=()=>{const n=window.pageYOffset;Math.abs(n-e)<100||(Y([n>e?"scrolled-down":"scrolled-up",n],!0),e=n>0?n:0),t=!1},i=()=>{t||(window.requestAnimationFrame(n),t=!0)};return window.addEventListener("scroll",i),()=>window.removeEventListener("scroll",i)}),[D]),(0,i.O3)({ref:n,handler:()=>{Y(["scrolled-up",D[1]],!0)}});const $=e.event,R=e.inVideoClick,Z=e.closeClick,W=.3*u,U=.6*u,B=.1*u,H=.1*(.5*u),G="round"==g?"10px":"0px",q=(0,m.Z$A)(S);var J=!1,X=0,Q=0;function ee(e){J=e}return(0,f.jsx)("div",{children:N&&!M?(0,f.jsx)(f.Fragment,{}):T&&M?(0,f.jsx)("div",{style:"left"===V?{left:"1px",bottom:A?(0,m.vnu)(S)+"px":P+"px",position:"fixed",zIndex:q}:{right:"5px",bottom:A?(0,m.vnu)(S)+"px":P+"px",position:"fixed",zIndex:q},children:(0,f.jsxs)("div",{onClick:()=>{Y(["initial",D[1]],!1)},style:{margin:"1px",width:u+"px",height:s+"px"},className:"left"===V?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,f.jsx)("div",{style:{overflow:"hidden"},children:(0,f.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,f.jsx)(r.Z,{url:$.thumbnail_image,isPlaying:!1,event:$})})}),(0,f.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,f.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,f.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,f.jsx)(h.Z,{sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:W+"px"},style:{position:"relative",zIndex:1,left:H+"px",bottom:H+"px"},onClick:Z})})}),(0,f.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,f.jsx)(v.Z,{sx:{color:"white",fontSize:2*W+"px",filter:"drop-shadow(0 0 2px black);"}})})]})})]})}):(0,f.jsx)(p(),{nodeRef:n,cancel:".activate-button,.close-btn",defaultClassName:"whatmore-react-draggable",defaultClassNameDragging:"whatmore-react-draggable-dragging",defaultClassNameDragged:"whatmore-react-draggable-dragged",bounds:"html",onStart:(e,t)=>{var n,i;n=t.x,i=t.y,X=n,Q=i},onDrag:(e,t)=>{ee(!0)},onStop:(e,t)=>{J&&(Math.abs(t.x-X)>5||Math.abs(t.y-Q)>5)?ee(!1):R($)},children:(0,f.jsx)("div",{ref:n,style:"left"===V?{left:A?(0,m.$II)(S)+"px":C+"px",bottom:A?(0,m.vnu)(S)+"px":P+"px",position:"fixed",zIndex:q}:{right:A?(0,m.$II)(S)+"px":C+"px",bottom:A?(0,m.vnu)(S)+"px":P+"px",position:"fixed",zIndex:q},children:(0,f.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:e.isSpotlight&&"60122562760"==S?s+"px":u+"px",height:e.isSpotlight&&"60122562760"==S?u+"px":s+"px"}),className:"left"===V?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,f.jsx)("div",{style:{overflow:"hidden",position:"relative"},children:(0,f.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:e.isSpotlight&&"60122562760"==S?16/9:9/16},children:(0,f.jsx)(r.Z,{url:$.thumbnail_image,isMuted:!0,isPlaying:!0,event:$})})}),(0,f.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,f.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,f.jsx)(h.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:W+"px"},onClick:Z,style:{position:"relative",zIndex:1,left:B+"px",bottom:B+"px"}})}),(0,f.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,f.jsx)(c.Z,{sx:{color:(0,m.Ya_)(S),fontSize:U+"px",filter:"drop-shadow(0 0 2px black);"}})}),(0,f.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:G,borderBottomRightRadius:G,backgroundImage:x?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,f.jsxs)("p",{style:{textAlign:"center",color:"white",fontFamily:"Sans-serif",fontWeight:"semi-bold",fontSize:.4*W+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",x]})})]})})]})})})})}},4284:function(e,t,n){n.r(t);var i=n(7313),o=n(9854),r=n(2860),a=n(7753),d=n(5160),s=n(6967),l=n(5380),c=n(58),u=n(8984),p=n(4669),h=n(513),v=n(9302),m=n(2575),f=n(7300),w=n(6524),g=n(364),x=n(4522),_=n(778),y=n(7643),E=n(7008),b=n(7381),I=n(8181),j=n(6095),S=n(653),L=n(7951),C=n(6417);const P=(0,m.Z)({key:"whatmore-css-ppv"}),D=i.lazy((()=>Promise.all([n.e(819),n.e(210),n.e(577),n.e(745),n.e(926),n.e(824),n.e(348),n.e(647)]).then(n.bind(n,6348))));function O(e){return e.split(/[?#]/)[0]}t.default=function(e){const[t,n]=(0,i.useState)(),[m,T]=(0,i.useState)(),{whatmoreIsPreviewMode:K}=(0,i.useContext)(g.I),[A]=(0,a.j1)("isInDesignMode"),[k]=(0,a.j1)("isDemoBrand"),[z]=(0,a.j1)("whatmoreEmbedAppUseVariant"),[V,M]=(0,i.useState)(-2),[N]=(0,a.j1)("whatmoreVariantId"),[F]=(0,a.j1)("whatmoreShopId");var[Y]=(0,a.j1)("whatmoreProductId");const $=(0,a.MO)("isLandingSharedLink"),R=(0,a.MO)("whatmoreShareTemplateId"),Z=(0,a.MO)("whatmoreShareEventId"),W=$&&"template-embed"===(0,w.zv)(R),[U,B]=(0,i.useState)(W);Y=(0,o.iXA)(F)?O(window.location.href):Y;const[H,G]=(0,i.useState)((()=>"true"===z?N:Y));var q=r.Gc+"/v2/brand/"+F+"/product-events";const{whatmoreWidgetSourceDetails:J}=(0,i.useContext)(g.I),X=window.location.pathname;(0,i.useEffect)((()=>{(0,b.Oo)("Video shopping powered by Whatmore!"),(0,s.hb)();const e=()=>{const e="_whatmore_bulk_events",t=JSON.parse(localStorage.getItem(e))||[];t&&t.length>0&&((0,E.K)(t),localStorage.removeItem(e))};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[]),(0,i.useEffect)((()=>{(0,p.ll)(F)}),[]),(0,i.useEffect)((()=>{null==t||0==t.length||m||!(0,u.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||((0,S.j)()?(0,c.b5)(c.UD):(0,L.FC)())}),[t]),(0,i.useEffect)((()=>{if(M(-1),(0,o.ly4)(F)){const e=`${r.Gc}/v2/brand/${F}/product-events/recommendation`,t=(0,o.FSv)(F);fetch(`${e}?client_product_id=${H}&limit=10&recommended=${!t}&origin=${window.location.hostname}&status=live,upcoming&event_type=video`).then((e=>e.json())).then((e=>{var i;const o=e=>{var t;return null===(t=e.products)||void 0===t?void 0:t.some((e=>"oos"!=(null===e||void 0===e?void 0:e.product_status)))},r=null===e||void 0===e||null===(i=e.events)||void 0===i?void 0:i.filter((e=>o(e)));if((null===r||void 0===r?void 0:r.length)>0){var a,d,s;const i=t?null===e||void 0===e||null===(a=e.all_events)||void 0===a?void 0:a.filter((e=>o(e))):null===e||void 0===e||null===(d=e.related_events)||void 0===d?void 0:d.filter((e=>o(e))).map((e=>({...e,isRelatedEvent:!0})));(null===i||void 0===i?void 0:i.length)>0&&(null===e||void 0===e||null===(s=e.product_info)||void 0===s?void 0:s.length)>0&&"6749782119"!=F?n([...r,...i,{event_type:"recommended_images",product_list:[...e.product_info]}]):n([...r,...i])}else n([])})).catch((e=>T(e.message)))}else fetch(q.toString()+"?client_product_id="+H.toString()+"&status="+"upcoming".toString()+"&event_type=video").then((e=>e.json())).then((e=>e.events)).then((e=>(null!=e&&0!=e.length&&(0,o.Htz)(F)&&(0,o.d0x)(e),n(e),e))).then((e=>((0,o.yoE)(F)&&function(e,t){setTimeout((async()=>{const n=e.reduce(((e,t)=>[...e,...t.products]),[]).filter((e=>e.client_product_id==t))[0];if(!n||n.product_link==O(window.location.href))return;const i={product_id:n.product_id,product_link:O(window.location.href)};fetch(r.Gc+"/product",{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)})}),500)}(e,H),e))).catch((e=>{T(e.message)}))}),[H,X]),(0,i.useEffect)((()=>{var e,n;M(-2),(t&&t.length>0||(0,o.uO6)(F))&&(0,x.PB)({userInteractionType:_.K.PDP_VISITED,widgetSourceDetails:J,event:null===t||void 0===t?void 0:t[0],productList:null===t||void 0===t||null===(e=t[0])||void 0===e?void 0:e.products,ctaList:null===t||void 0===t||null===(n=t[0])||void 0===n?void 0:n.cta})}),[t]),(0,i.useEffect)((()=>{let e=history.pushState;history.pushState=function(){let t=e.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),t};let t=history.replaceState;history.replaceState=function(){let e=t.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),e},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))})),window.addEventListener("locationchange",(function(){if("true"===z){const e=function(e){for(var t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var i=t[n].split("=");if(i[0]==e)return i[1]}return!1}("variant");e&&""!==e&&G(e)}}))}),[]),(0,i.useEffect)((()=>{if(null!=t&&0!==t.length&&!m&&W&&((0,j.A)("whatmore-video-player",(()=>{B(!1)})),null!=Z)){const e=t.find((e=>Z==e.event_id));if(e)return void te(e,!0,t.indexOf(e))}}),[t]);const Q=J.landingLocationType,ee=J.templateType,te=async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if((0,u.KE)()&&!t&&await((0,S.j)()?(0,c.QV)():(0,L.FC)()),(0,f.B6)(e)||(0,f.WJ)(e))return A||k||(async()=>{const t=(0,w.NY)(Q)+(0,w.dS)(ee)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,d.wh)(e),(0,p.Tc)(F,r.h7,r.dU),(0,s.H4)(e.event_id,e.products,"product_page","video_popup",t)})(),void M(n)};function ne(){return(0,C.jsx)(C.Fragment,{})}return null==t||0==t.length||m?(0,C.jsx)("div",{}):(0,C.jsxs)(v.C,{value:P,children:[U&&(0,C.jsx)(I.Z,{}),"no-product"===H||-1===V||0===t.length?(0,C.jsx)(ne,{}):-2===V&&t.length>0?(0,C.jsx)("div",{children:(0,C.jsx)(y.u,{userInteractionType:_.K.PDP_POPUP_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!A&&!k,children:(0,C.jsx)(l.Z,{event:t[0],inVideoClick:te,closeClick:e=>{var n;e.stopPropagation(),M(-1),(0,x.GF)({userInteractionType:_.K.PDP_POPUP_CLOSED,widgetSourceDetails:J,event:null===t||void 0===t?void 0:t[0],productList:null===t||void 0===t||null===(n=t[0])||void 0===n?void 0:n.products})}})})}):(0,C.jsx)("div",{children:(0,C.jsx)(i.Suspense,{children:(0,C.jsx)(y.u,{userInteractionType:_.K.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!A&&!k,children:(0,C.jsx)(D,{events:t,index:V,onBack:function(e){(0,o.n2L)(F)&&(0,a.MO)("whatmoreAddedToCart")&&(0,h.D)(F,(()=>{}),100,window.location.hostname,e),M(-2),B(!1)},template:"template-product-page"})})})})]})}},6095:function(e,t,n){function i(e,t){let n=0;let i=new MutationObserver((function(){document.querySelector("."+e)?(t(),i.disconnect()):0==n&&(n=1,setTimeout((()=>{t(),i.disconnect()}),8e3))}));i.observe(document.body,{childList:!0,subtree:!0})}n.d(t,{A:function(){return i}})},6805:function(e,t,n){n.d(t,{$I:function(){return d},$w:function(){return l},AK:function(){return r},AL:function(){return a},YP:function(){return o},me:function(){return i},rE:function(){return s}});const i="device_type",o="device_mode",r="mobile",a="tablet",d="desktop",s="portrait",l="landscape"},9821:function(e,t,n){var i=n(7753),o=n(8866),r=n(6805),a=n(9854);t.Z=function(e){const[t,n,d]=(0,o.Z)(),[s]=(0,i.j1)("whatmoreLandscapePadding"),[l]=(0,i.j1)("whatmoreShopId"),[c]=(0,i.j1)("whatmoreVideoTileSize"),[u]=(0,i.j1)("whatmoreVideoTileSizePortrait"),p=d>=1025,h="portrait"==t?u:c,v=!("portrait"!=t||!(d>=481)),m=h/100*1.3*.5,f=h/100;var w=Math.min(d,n),[g,x,_,y]=[.6*w*(16/9),.6*w,1.4,0];function E(e){return Math.round(10*e)/10}var b={DEVICE_TYPE:r.AK,DEVICE_MODE:r.rE};if(p){const e=x*m,t=g*m;[g,x,_,y]=[t,e,(d-2*s-2*(0,a.mZU)(l))/(1.1*e),s],b[r.me]=r.$I,b[r.YP]=r.$w}else if(v){var I=.8*x,j=.8*g;"portrait"==t?(I*=f,j*=f,[g,x,_,y]=[j,I,E(d/(1.2*I)),0],b[r.me]=r.AL,b[r.YP]=r.rE):([g,x,_,y]=[j,I,(d-2*s)/(1.1*I),s],b[r.me]=r.AL,b[r.YP]=r.$w)}else{I=x,j=g;"portrait"==t?(I=I*f*.9,j=j*f*.9,[g,x,_,y]=[j,I,E(d/(1.15*I)),0],b[r.me]=r.AK,b[r.YP]=r.rE):(I=.7*x,j=.7*g,[g,x,_,y]=[j,I,(d-2*s)/(1.1*I),s],b[r.me]=r.AK,b[r.YP]=r.$w)}return[g,x,_,y,b]}},4522:function(e,t,n){n.d(t,{gW:function(){return s},GF:function(){return l},y4:function(){return u},PB:function(){return p},Z2:function(){return c}});var i=n(9854),o=n(7753),r=n(778);function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(0,o.MO)("whatmoreShopId");(e!=r.K.EVENT_VIEW||(0,i.UAB)(a))&&(e!=r.K.VIDEO_PLAYBACK||(0,i.JP0)(a))&&(e!=r.K.SHOPNOW_ATC_CLICKED&&e!=r.K.PRODUCT_TILE_ATC_CLICKED||(0,i.Tn_)(a))&&(e!=r.K.VIDEO_LIKED||(0,i.sKB)(a))&&(e!=r.K.VIDEO_SHARE_CTA_CLICKED||(0,i.YOU)(a))&&(e!=r.K.PRODUCT_TILE_SHOPNOW_CLICKED&&e!=r.K.SHOPNOW_CLICKED||(0,i.ejq)(a))&&"function"==typeof fbq&&(async()=>{fbq("trackCustom",s[e],{id:null===t||void 0===t?void 0:t.client_product_id,product_url:null===t||void 0===t?void 0:t.product_link,...e===r.K.VIDEO_PLAYBACK?{watch_time:n.watch_time,video_duration:n.video_duration}:{}})})()}var d=n(733);const s={[r.K.EVENT_VIEW]:"whatmore_video_click_event",[r.K.VIDEO_LIKED]:"whatmore_video_like_event",[r.K.VIDEO_SHARE_CTA_CLICKED]:"whatmore_video_share_event",[r.K.PRODUCT_TILE_ATC_CLICKED]:"whatmore_video_atc_event",[r.K.SHOPNOW_ATC_CLICKED]:"whatmore_video_atc_event",[r.K.SHOPNOW_CLICKED]:"whatmore_product_tile_click_event",[r.K.PRODUCT_TILE_SHOPNOW_CLICKED]:"whatmore_product_tile_click_event",[r.K.VIDEO_PLAYBACK]:"whatmore_video_watch_event"};function l(e){var t;let{userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}=e;(0,d.s)({userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}),n in s&&a(n,null!==(t=null===l||void 0===l?void 0:l[1])&&void 0!==t?t:null===l||void 0===l?void 0:l[0])}function c(e){var t;let{userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}=e;(0,d.s)({userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}),n in s&&a(n,null!==(t=null===l||void 0===l?void 0:l[1])&&void 0!==t?t:null===l||void 0===l?void 0:l[0],i)}function u(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a}=e;(0,d.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a})}function p(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a}=e;(0,d.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a})}},7244:function(){}}]);
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[281],{8181:function(e,t,n){var i=n(7313),o=n(8866),r=n(7753),a=n(6417);const d=i.memo((()=>{if(!(0,r.MO)("isLandingSharedLink"))return(0,a.jsx)(a.Fragment,{});const[e]=(0,o.Z)();return(0,a.jsxs)("div",{className:`shimmer-container ${e}`,children:["portrait"===e?(0,a.jsx)("div",{className:"shimmer-item portrait-full",children:(0,a.jsx)("div",{className:"shimmer-effect"})}):Array(3).fill().map(((e,t)=>(0,a.jsx)("div",{className:"shimmer-item landscape-item "+(1===t?"center-item":""),children:(0,a.jsx)("div",{className:"shimmer-effect"})},t))),(0,a.jsx)("style",{children:"\n .shimmer-container {\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n scroll-behavior: smooth;\n z-index: 1000;\n }\n\n .portrait {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.6);\n }\n\n .landscape {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.8);\n }\n\n .shimmer-item {\n scroll-snap-align: start;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n transition: transform 0.3s ease;\n }\n\n .portrait-full {\n width: 100vw;\n height: 100vh;\n margin: 0; \n }\n\n .landscape-item {\n width: 250px;\n height: 450px;\n background: #D3D3D3;\n border-radius: 8px;\n margin-left: -50px; \n }\n\n .center-item {\n width: 360px;\n height: 620px;\n box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5); \n z-index: 10; \n }\n\n .shimmer-effect {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.3) 75%);\n animation: shimmer 2s infinite;\n background-size: 200% 100%;\n }\n\n @keyframes shimmer {\n 0% {\n background-position: -200% 0;\n }\n 100% {\n background-position: 200% 0;\n }\n }\n "})]})}));t.Z=d},7951:function(e,t,n){n.d(t,{BU:function(){return r},FC:function(){return a}});let i,o=!1;function r(){return i?i.play().then((()=>{o=!0,console.debug("iOS autoplay restrictions bypassed."),i.pause()})).catch((e=>{console.error("Failed to bless videos:",e.message)})):Promise.reject(new Error("Blessing video not initialized."))}function a(){i||(i=document.createElement("video"),i.src="https://whatmore-other-assets.b-cdn.net/whatmore/dummy_for_video_pool_3s_muted_11kb.mp4",i.muted=!0,i.playsInline=!0,i.style.display="none",document.body.appendChild(i));const e=()=>{o||r()};document.addEventListener("click",e,{once:!0}),document.addEventListener("touchstart",e,{once:!0})}},5380:function(e,t,n){n.d(t,{Z:function(){return w}});var i=n(4959),o=n(7313),r=n(4892),a=n(6805),d=n(7753),s=n(9821);var l=function(e){const[t,n,i,o,r]=(0,s.Z)(),[l]=(0,d.j1)("whatmoreEmbedAppVideoPlayerSizePortrait"),[c]=(0,d.j1)("whatmoreEmbedAppVideoPlayerSizeLandscape"),u=r[a.YP]===a.$w?c/100:l/100*1.2;return[t*u,n*u,r]},c=n(9723),u=n(9461),p=n.n(u),h=n(1195),v=n(7108),m=(n(7244),n(123),n(9854)),f=n(6417);var w=function(e){var t;const n=o.useRef(null);var[s,u,w]=l();const g=(0,d.MO)("whatmoreUITheme"),[x]=(0,d.j1)("whatmoreEmbedAppVideoTitle"),[_]=(0,d.j1)("whatmoreEmbedAppPositionPortrait"),[y]=(0,d.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[E]=(0,d.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[b]=(0,d.j1)("whatmoreEmbedAppPositionLandscape"),[I]=(0,d.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[j]=(0,d.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),S=(0,d.MO)("whatmoreShopId");var L=_,C=y,P=E;w[a.YP]===a.$w&&(L=b,C=I,P=j);const[D,O]=(0,o.useState)(["initial",window.pageYOffset]),[T,K]=(0,o.useState)(!1),A=null!==(t=e.isSpotlight)&&void 0!==t&&t,k=w[a.YP]===a.$w?.7*(0,m.zGA)(S):(0,m.zGA)(S),z=A?k:1;s*=z,u*=z;const V=A?(0,m.G0o)(S):L,M=A?(0,m.X8j)(S):(0,m.lVn)(S),[N,F]=(0,o.useState)(!A&&(0,m.eXi)(S));function Y(e,t){O(e),e[1]<=100?K(!1):t!=T&&(K(t),F(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const n=()=>{const n=window.pageYOffset;Math.abs(n-e)<100||(Y([n>e?"scrolled-down":"scrolled-up",n],!0),e=n>0?n:0),t=!1},i=()=>{t||(window.requestAnimationFrame(n),t=!0)};return window.addEventListener("scroll",i),()=>window.removeEventListener("scroll",i)}),[D]),(0,i.O3)({ref:n,handler:()=>{Y(["scrolled-up",D[1]],!0)}});const $=e.event,R=e.inVideoClick,Z=e.closeClick,W=.3*u,U=.6*u,B=.1*u,H=.1*(.5*u),G="round"==g?"10px":"0px",q=(0,m.Z$A)(S);var J=!1,X=0,Q=0;function ee(e){J=e}return(0,f.jsx)("div",{children:N&&!M?(0,f.jsx)(f.Fragment,{}):T&&M?(0,f.jsx)("div",{style:"left"===V?{left:"1px",bottom:A?(0,m.vnu)(S)+"px":P+"px",position:"fixed",zIndex:q}:{right:"5px",bottom:A?(0,m.vnu)(S)+"px":P+"px",position:"fixed",zIndex:q},children:(0,f.jsxs)("div",{onClick:()=>{Y(["initial",D[1]],!1)},style:{margin:"1px",width:u+"px",height:s+"px"},className:"left"===V?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,f.jsx)("div",{style:{overflow:"hidden"},children:(0,f.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,f.jsx)(r.Z,{url:$.thumbnail_image,isPlaying:!1,event:$})})}),(0,f.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,f.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,f.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,f.jsx)(h.Z,{sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:W+"px"},style:{position:"relative",zIndex:1,left:H+"px",bottom:H+"px"},onClick:Z})})}),(0,f.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,f.jsx)(v.Z,{sx:{color:"white",fontSize:2*W+"px",filter:"drop-shadow(0 0 2px black);"}})})]})})]})}):(0,f.jsx)(p(),{nodeRef:n,cancel:".activate-button,.close-btn",defaultClassName:"whatmore-react-draggable",defaultClassNameDragging:"whatmore-react-draggable-dragging",defaultClassNameDragged:"whatmore-react-draggable-dragged",bounds:"html",onStart:(e,t)=>{var n,i;n=t.x,i=t.y,X=n,Q=i},onDrag:(e,t)=>{ee(!0)},onStop:(e,t)=>{J&&(Math.abs(t.x-X)>5||Math.abs(t.y-Q)>5)?ee(!1):R($)},children:(0,f.jsx)("div",{ref:n,style:"left"===V?{left:A?(0,m.$II)(S)+"px":C+"px",bottom:A?(0,m.vnu)(S)+"px":P+"px",position:"fixed",zIndex:q}:{right:A?(0,m.$II)(S)+"px":C+"px",bottom:A?(0,m.vnu)(S)+"px":P+"px",position:"fixed",zIndex:q},children:(0,f.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:e.isSpotlight&&"60122562760"==S?s+"px":u+"px",height:e.isSpotlight&&"60122562760"==S?u+"px":s+"px"}),className:"left"===V?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,f.jsx)("div",{style:{overflow:"hidden",position:"relative"},children:(0,f.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:e.isSpotlight&&"60122562760"==S?16/9:9/16},children:(0,f.jsx)(r.Z,{url:$.thumbnail_image,isMuted:!0,isPlaying:!0,event:$})})}),(0,f.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,f.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,f.jsx)(h.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:W+"px"},onClick:Z,style:{position:"relative",zIndex:1,left:B+"px",bottom:B+"px"}})}),(0,f.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,f.jsx)(c.Z,{sx:{color:(0,m.Ya_)(S),fontSize:U+"px",filter:"drop-shadow(0 0 2px black);"}})}),(0,f.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:G,borderBottomRightRadius:G,backgroundImage:x?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,f.jsxs)("p",{style:{textAlign:"center",color:"white",fontFamily:"Sans-serif",fontWeight:"semi-bold",fontSize:.4*W+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",x]})})]})})]})})})})}},4284:function(e,t,n){n.r(t);var i=n(7313),o=n(9854),r=n(2860),a=n(7753),d=n(5160),s=n(6967),l=n(5380),c=n(58),u=n(8984),p=n(4669),h=n(513),v=n(9302),m=n(2575),f=n(7300),w=n(6524),g=n(364),x=n(4522),_=n(778),y=n(7643),E=n(7008),b=n(7381),I=n(8181),j=n(6095),S=n(653),L=n(7951),C=n(6417);const P=(0,m.Z)({key:"whatmore-css-ppv"}),D=i.lazy((()=>Promise.all([n.e(819),n.e(210),n.e(577),n.e(745),n.e(926),n.e(824),n.e(348),n.e(647)]).then(n.bind(n,6348))));function O(e){return e.split(/[?#]/)[0]}t.default=function(e){const[t,n]=(0,i.useState)(),[m,T]=(0,i.useState)(),{whatmoreIsPreviewMode:K}=(0,i.useContext)(g.I),[A]=(0,a.j1)("isInDesignMode"),[k]=(0,a.j1)("isDemoBrand"),[z]=(0,a.j1)("whatmoreEmbedAppUseVariant"),[V,M]=(0,i.useState)(-2),[N]=(0,a.j1)("whatmoreVariantId"),[F]=(0,a.j1)("whatmoreShopId");var[Y]=(0,a.j1)("whatmoreProductId");const $=(0,a.MO)("isLandingSharedLink"),R=(0,a.MO)("whatmoreShareTemplateId"),Z=(0,a.MO)("whatmoreShareEventId"),W=$&&"template-embed"===(0,w.zv)(R),[U,B]=(0,i.useState)(W);Y=(0,o.iXA)(F)?O(window.location.href):Y;const[H,G]=(0,i.useState)((()=>"true"===z?N:Y));var q=r.Gc+"/v2/brand/"+F+"/product-events";const{whatmoreWidgetSourceDetails:J}=(0,i.useContext)(g.I),[X,Q]=(0,i.useState)(window.location.pathname);(0,i.useEffect)((()=>{(0,b.Oo)("Video shopping powered by Whatmore!"),(0,s.hb)();const e=()=>{const e="_whatmore_bulk_events",t=JSON.parse(localStorage.getItem(e))||[];t&&t.length>0&&((0,E.K)(t),localStorage.removeItem(e))};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[]),(0,i.useEffect)((()=>{(0,p.ll)(F)}),[]),(0,i.useEffect)((()=>{null==t||0==t.length||m||!(0,u.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||((0,S.j)()?(0,c.b5)(c.UD):(0,L.FC)())}),[t]),(0,i.useEffect)((()=>{if(M(-1),(0,o.ly4)(F)){const e=`${r.Gc}/v2/brand/${F}/product-events/recommendation`,t=(0,o.FSv)(F);fetch(`${e}?client_product_id=${H}&limit=10&recommended=${!t}&origin=${window.location.hostname}&status=live,upcoming&event_type=video`).then((e=>e.json())).then((e=>{var i;const o=e=>{var t;return null===(t=e.products)||void 0===t?void 0:t.some((e=>"oos"!=(null===e||void 0===e?void 0:e.product_status)))},r=null===e||void 0===e||null===(i=e.events)||void 0===i?void 0:i.filter((e=>o(e)));if((null===r||void 0===r?void 0:r.length)>0){var a,d,s;const i=t?null===e||void 0===e||null===(a=e.all_events)||void 0===a?void 0:a.filter((e=>o(e))):null===e||void 0===e||null===(d=e.related_events)||void 0===d?void 0:d.filter((e=>o(e))).map((e=>({...e,isRelatedEvent:!0})));(null===i||void 0===i?void 0:i.length)>0&&(null===e||void 0===e||null===(s=e.product_info)||void 0===s?void 0:s.length)>0&&"6749782119"!=F?n([...r,...i,{event_type:"recommended_images",product_list:[...e.product_info]}]):n([...r,...i])}else n([])})).catch((e=>T(e.message)))}else fetch(q.toString()+"?client_product_id="+H.toString()+"&status="+"upcoming".toString()+"&event_type=video").then((e=>e.json())).then((e=>e.events)).then((e=>(null!=e&&0!=e.length&&(0,o.Htz)(F)&&(0,o.d0x)(e),n(e),e))).then((e=>((0,o.yoE)(F)&&function(e,t){setTimeout((async()=>{const n=e.reduce(((e,t)=>[...e,...t.products]),[]).filter((e=>e.client_product_id==t))[0];if(!n||n.product_link==O(window.location.href))return;const i={product_id:n.product_id,product_link:O(window.location.href)};fetch(r.Gc+"/product",{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)})}),500)}(e,H),e))).catch((e=>{T(e.message)}))}),[H,X]),(0,i.useEffect)((()=>{var e,n;M(-2),(t&&t.length>0||(0,o.uO6)(F))&&(0,x.PB)({userInteractionType:_.K.PDP_VISITED,widgetSourceDetails:J,event:null===t||void 0===t?void 0:t[0],productList:null===t||void 0===t||null===(e=t[0])||void 0===e?void 0:e.products,ctaList:null===t||void 0===t||null===(n=t[0])||void 0===n?void 0:n.cta})}),[t]),(0,i.useEffect)((()=>{let e=history.pushState;history.pushState=function(){let t=e.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),t};let t=history.replaceState;history.replaceState=function(){let e=t.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),e},window.addEventListener("popstate",(()=>{Q(window.location.pathname),window.dispatchEvent(new Event("locationchange"))})),window.addEventListener("locationchange",(function(){if("true"===z){const e=function(e){for(var t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var i=t[n].split("=");if(i[0]==e)return i[1]}return!1}("variant");e&&""!==e&&G(e)}}))}),[]),(0,i.useEffect)((()=>{if(null!=t&&0!==t.length&&!m&&W&&((0,j.A)("whatmore-video-player",(()=>{B(!1)})),null!=Z)){const e=t.find((e=>Z==e.event_id));if(e)return void ne(e,!0,t.indexOf(e))}}),[t]);const ee=J.landingLocationType,te=J.templateType,ne=async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if((0,u.KE)()&&!t&&await((0,S.j)()?(0,c.QV)():(0,L.FC)()),(0,f.B6)(e)||(0,f.WJ)(e))return A||k||(async()=>{const t=(0,w.NY)(ee)+(0,w.dS)(te)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,d.wh)(e),(0,p.Tc)(F,r.h7,r.dU),(0,s.H4)(e.event_id,e.products,"product_page","video_popup",t)})(),void M(n)};function ie(){return(0,C.jsx)(C.Fragment,{})}return null==t||0==t.length||m?(0,C.jsx)("div",{}):(0,C.jsxs)(v.C,{value:P,children:[U&&(0,C.jsx)(I.Z,{}),"no-product"===H||-1===V||0===t.length?(0,C.jsx)(ie,{}):-2===V&&t.length>0?(0,C.jsx)("div",{children:(0,C.jsx)(y.u,{userInteractionType:_.K.PDP_POPUP_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!A&&!k,children:(0,C.jsx)(l.Z,{event:t[0],inVideoClick:ne,closeClick:e=>{var n;e.stopPropagation(),M(-1),(0,x.GF)({userInteractionType:_.K.PDP_POPUP_CLOSED,widgetSourceDetails:J,event:null===t||void 0===t?void 0:t[0],productList:null===t||void 0===t||null===(n=t[0])||void 0===n?void 0:n.products})}})})}):(0,C.jsx)("div",{children:(0,C.jsx)(i.Suspense,{children:(0,C.jsx)(y.u,{userInteractionType:_.K.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!A&&!k,children:(0,C.jsx)(D,{events:t,index:V,onBack:function(e){(0,o.n2L)(F)&&(0,a.MO)("whatmoreAddedToCart")&&(0,h.D)(F,(()=>{}),100,window.location.hostname,e),M(-2),B(!1)},template:"template-product-page"})})})})]})}},6095:function(e,t,n){function i(e,t){let n=0;let i=new MutationObserver((function(){document.querySelector("."+e)?(t(),i.disconnect()):0==n&&(n=1,setTimeout((()=>{t(),i.disconnect()}),8e3))}));i.observe(document.body,{childList:!0,subtree:!0})}n.d(t,{A:function(){return i}})},6805:function(e,t,n){n.d(t,{$I:function(){return d},$w:function(){return l},AK:function(){return r},AL:function(){return a},YP:function(){return o},me:function(){return i},rE:function(){return s}});const i="device_type",o="device_mode",r="mobile",a="tablet",d="desktop",s="portrait",l="landscape"},9821:function(e,t,n){var i=n(7753),o=n(8866),r=n(6805),a=n(9854);t.Z=function(e){const[t,n,d]=(0,o.Z)(),[s]=(0,i.j1)("whatmoreLandscapePadding"),[l]=(0,i.j1)("whatmoreShopId"),[c]=(0,i.j1)("whatmoreVideoTileSize"),[u]=(0,i.j1)("whatmoreVideoTileSizePortrait"),p=d>=1025,h="portrait"==t?u:c,v=!("portrait"!=t||!(d>=481)),m=h/100*1.3*.5,f=h/100;var w=Math.min(d,n),[g,x,_,y]=[.6*w*(16/9),.6*w,1.4,0];function E(e){return Math.round(10*e)/10}var b={DEVICE_TYPE:r.AK,DEVICE_MODE:r.rE};if(p){const e=x*m,t=g*m;[g,x,_,y]=[t,e,(d-2*s-2*(0,a.mZU)(l))/(1.1*e),s],b[r.me]=r.$I,b[r.YP]=r.$w}else if(v){var I=.8*x,j=.8*g;"portrait"==t?(I*=f,j*=f,[g,x,_,y]=[j,I,E(d/(1.2*I)),0],b[r.me]=r.AL,b[r.YP]=r.rE):([g,x,_,y]=[j,I,(d-2*s)/(1.1*I),s],b[r.me]=r.AL,b[r.YP]=r.$w)}else{I=x,j=g;"portrait"==t?(I=I*f*.9,j=j*f*.9,[g,x,_,y]=[j,I,E(d/(1.15*I)),0],b[r.me]=r.AK,b[r.YP]=r.rE):(I=.7*x,j=.7*g,[g,x,_,y]=[j,I,(d-2*s)/(1.1*I),s],b[r.me]=r.AK,b[r.YP]=r.$w)}return[g,x,_,y,b]}},4522:function(e,t,n){n.d(t,{gW:function(){return s},GF:function(){return l},y4:function(){return u},PB:function(){return p},Z2:function(){return c}});var i=n(9854),o=n(7753),r=n(778);function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(0,o.MO)("whatmoreShopId");(e!=r.K.EVENT_VIEW||(0,i.UAB)(a))&&(e!=r.K.VIDEO_PLAYBACK||(0,i.JP0)(a))&&(e!=r.K.SHOPNOW_ATC_CLICKED&&e!=r.K.PRODUCT_TILE_ATC_CLICKED||(0,i.Tn_)(a))&&(e!=r.K.VIDEO_LIKED||(0,i.sKB)(a))&&(e!=r.K.VIDEO_SHARE_CTA_CLICKED||(0,i.YOU)(a))&&(e!=r.K.PRODUCT_TILE_SHOPNOW_CLICKED&&e!=r.K.SHOPNOW_CLICKED||(0,i.ejq)(a))&&"function"==typeof fbq&&(async()=>{fbq("trackCustom",s[e],{id:null===t||void 0===t?void 0:t.client_product_id,product_url:null===t||void 0===t?void 0:t.product_link,...e===r.K.VIDEO_PLAYBACK?{watch_time:n.watch_time,video_duration:n.video_duration}:{}})})()}var d=n(733);const s={[r.K.EVENT_VIEW]:"whatmore_video_click_event",[r.K.VIDEO_LIKED]:"whatmore_video_like_event",[r.K.VIDEO_SHARE_CTA_CLICKED]:"whatmore_video_share_event",[r.K.PRODUCT_TILE_ATC_CLICKED]:"whatmore_video_atc_event",[r.K.SHOPNOW_ATC_CLICKED]:"whatmore_video_atc_event",[r.K.SHOPNOW_CLICKED]:"whatmore_product_tile_click_event",[r.K.PRODUCT_TILE_SHOPNOW_CLICKED]:"whatmore_product_tile_click_event",[r.K.VIDEO_PLAYBACK]:"whatmore_video_watch_event"};function l(e){var t;let{userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}=e;(0,d.s)({userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}),n in s&&a(n,null!==(t=null===l||void 0===l?void 0:l[1])&&void 0!==t?t:null===l||void 0===l?void 0:l[0])}function c(e){var t;let{userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}=e;(0,d.s)({userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}),n in s&&a(n,null!==(t=null===l||void 0===l?void 0:l[1])&&void 0!==t?t:null===l||void 0===l?void 0:l[0],i)}function u(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a}=e;(0,d.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a})}function p(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a}=e;(0,d.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a})}},7244:function(){}}]);
|