whatmore-react-assets 1.0.861 → 1.0.862

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.861",
3
+ "version": "1.0.862",
4
4
  "description": "public repo for all whatmore js and css assets",
5
5
  "main": "whatmore.js",
6
6
  "scripts": {
@@ -65,7 +65,7 @@
65
65
  100% {
66
66
  transform: translateY(0%) rotate(0deg);
67
67
  }
68
- `} infinite 1.5s linear`;return(0,x.jsx)(L.MT,{unmountOnExit:!0,initialScale:.2,in:d,reverse:!0,delay:m,children:(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",paddingTop:100,borderRadius:"3xl",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"100%",height:"fit-content",justifyContent:"flex-end",children:[(0,x.jsx)(s.M5,{animation:"vertical"===p?w:j,children:"vertical"===p?(0,x.jsx)(z.Z,{sx:{color:"white !important",fontSize:g,filter:"drop-shadow(0 0 20px black);"}}):(0,x.jsx)(R.Z,{sx:{color:"white !important",fontSize:g,filter:"drop-shadow(0 0 20px black);"}})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{textShadow:"dark-lg",fontSize:f+"px",fontWeight:"semibold",sx:{color:"white !important",textShadow:"0px 0px 20px black !important;"},children:"swipe for more"})})]})})})};var D=function(t){const[e,n]=(0,u.j1)("isFirstIndicatorRenderDone"),[i]=(0,u.j1)("indicatorRenderSeconds"),o=i,l=t.swipeUp;return(0,r.useEffect)((()=>{const t=setTimeout((()=>{n(!0)}),3e3+1e3*o);return()=>{clearTimeout(t)}}),[]),e?null:(0,x.jsx)(M,{showForSeconds:.8*o,delayInSeconds:3,swipeUp:l})},A=n(5180),K=n(9316),W=n(5254);const q="15px";var N=n(7376),H=n(778),Z=n(8811);var U=function(t){const[e]=(0,u.j1)("isInDesignMode"),[n]=(0,u.j1)("isDemoBrand"),[i]=(0,u.j1)("whatmoreSecondaryColor"),[o]=(0,u.j1)("whatmorePrimaryFont"),[l]=(0,u.j1)("whatmoreShopId"),[a,p,v,m]=(0,h.Z)(),[g,f]=(0,r.useState)(!1),w=t.product,j=t.event,{whatmoreWidgetSourceDetails:y}=(0,r.useContext)(Z.I),C=.1*v,S=.95*m,b=.05*m;return(0,x.jsx)(s.Kq,{direction:"row",height:C,justifyContent:"center",aligntItems:"center",alignContent:"center",bgGradient:"linear(to-b, transparent, blackAlpha.400, blackAlpha.600)",children:(0,x.jsx)(s.Kq,{direction:"column",width:"fit-content",height:C,justifyContent:"center",aligntItems:"center",alignContent:"center",children:(0,x.jsx)(s.xu,{width:S+"px",height:"fit-content",padding:"6px",marginTop:q,backgroundColor:i,borderRadius:"5px",animation:g?K.mT:null,onAnimationEnd:()=>{f(!1)},marginBottom:(0,c.pq5)(l),onClick:()=>{f(!0),function(t,i){e||n||(async()=>{(0,d.wz)(t,i),(0,N.GF)({userInteractionType:H.K.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:y,event:t,productList:[i],ctaList:t.cta})})()}(j,w),window.location.href=function(t){return(0,c.lj5)(l)?t.product_link+"?"+(0,c.awP)(l)+"&"+(0,c.n9s)(l)+"&"+(0,c.vaK)(l):t.product_link}(w)},_hover:{backgroundColor:(0,W.lA)(i,8)},cursor:"pointer",children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*b+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:o+" !important",color:"white !important"},children:(0,c.Pvx)(l)})})})})})},V=n(7009),B=n(5945),Y=n(5456),X=n(6984),$=n(6227),G=n(7329),J=(n(9111),n(9748));function Q(t){var e;const[n]=(0,u.j1)("whatmoreSecondaryColor"),[i]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),[l,a]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),h=t.onClick,p=t.width,v=t.height,m=t.title,g=t.showInProgressIcon;return(0,x.jsxs)(s.xu,{display:"flex",width:p,height:v,padding:"2x",boxShadow:"lg",animation:l?K.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:["awaitingVariantSelection"==t.cartState&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",backgroundColor:"white",onClick:e=>{e.stopPropagation(),t.updateCartState("init"),a(!0)},children:(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:"#343434 !important"},children:["\xa0","Cancel","\xa0"]})}),(0,x.jsxs)(s.Kq,{direction:"row",backgroundColor:g?(0,W.lA)(n,8):n,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",onClick:t=>{t.stopPropagation(),h(),a(!0)},children:[(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",m,"\xa0"]}),g?(0,x.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,x.jsx)(G.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*d+"px"}})}):(0,x.jsx)(x.Fragment,{})]})]})}function tt(t){var e;const[n]=(0,u.j1)("whatmoreSecondaryColor"),[i]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),[l,a]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),h=t.onClick,p=t.width,v=t.height;return(0,x.jsx)(s.xu,{width:p,height:v,padding:"2x",boxShadow:"lg",backgroundColor:n,onClick:t=>{t.stopPropagation(),h(),a(!0)},animation:l?K.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",children:(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",(0,c.tan)(o),"\xa0"]})})})})}function et(t){var e;const[n]=(0,u.j1)("whatmorePrimaryFont"),[i]=(0,u.j1)("whatmoreShopId"),o=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),r=t.width,l=t.height;return(0,x.jsx)(s.xu,{width:r,height:l,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:"gray",borderWidth:"1px",onClick:t=>{t.stopPropagation()},children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:(0,x.jsxs)(s.xv,{color:"gray",lineHeight:"100%",fontSize:1.3*o+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important",color:"gray !important"},children:["\xa0"," Sold Out ","\xa0"]})})})}function nt(t){var e;const[n]=(0,u.j1)("whatmoreSecondaryColor"),[i]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),r=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),l=t.onClick,a=t.cartCount,d=t.width,c=t.height,h=t.onCartIconClick;return(0,x.jsx)(s.xu,{width:d,height:c,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:n,borderWidth:"1px",onClick:t=>{t.stopPropagation()},cursor:"pointer",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:[(0,x.jsx)(s.M5,{paddingX:"5px",onClick:()=>{h()},children:"1972174947"!=o?(0,x.jsx)($.Z,{sx:{color:n,fontSize:1.6*r}}):(0,x.jsx)(J.zx,{size:"sm",_hover:{bg:n},sx:{bg:n},children:(0,x.jsx)(s.xv,{paddingX:"6px",color:"white",sx:{fontSize:.85*r},children:"GO TO CART"})})}),(0,x.jsx)(s.xv,{color:n,fontSize:1.3*r+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important"},children:a}),(0,x.jsx)(s.M5,{paddingX:"5px",onClick:t=>{t.stopPropagation(),l()},children:(0,x.jsx)(X.Z,{sx:{color:n,fontSize:1.6*r}})})]})})}var it=function(t){var e,n,i,o;const[r]=(0,u.j1)("whatmoreShopId"),l=t.event,a=t.product,d=null!==(e=t.baseFontSize)&&void 0!==e?e:10,s=null===(n=t.showAddedToCart)||void 0===n||n,c=t.cartState,h=t.cartCount,p=t.onClickAtc,v=t.onCartIconClick;function m(){p()}const g=null!==(i=t.width)&&void 0!==i?i:"100%",f=null!==(o=t.height)&&void 0!==o?o:"100%";return"errored"==c?(0,x.jsx)(L.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:f,width:g},children:(0,x.jsx)(et,{event:l,product:a,baseFontSize:d,width:g,height:f})}):"init"==c?0==h?(0,x.jsx)(tt,{onClick:m,event:l,product:a,baseFontSize:d,width:g,height:f}):s?(0,x.jsx)(L.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:f,width:g},children:(0,x.jsx)(nt,{onClick:m,event:l,product:a,baseFontSize:d,cartCount:h,width:g,height:f,onCartIconClick:v})}):(0,x.jsx)(tt,{onClick:m,event:l,product:a,baseFontSize:d,width:g,height:f}):(0,x.jsx)(Q,{onClick:m,cartState:c,updateCartState:t.updateCartState,event:l,product:a,baseFontSize:d,width:g,height:f,title:"awaitingVariantSelection"==c?"Done":"",showInProgressIcon:"atcApiCallInProgress"==c||"productVariantDetailsApiCallInProgress"==c})},ot=n(6967),rt=n(6230),lt=n(4844);const at=(0,u.MO)("isInDesignMode"),dt=(0,u.MO)("isDemoBrand");async function st(t,e,n,i,o,r,l,a,d){return"shopify"==n?(0,lt.wW)(t,e,i,l,a,d):(at||dt||(async()=>{(0,ot.FF)(o,r)})(),(0,rt.jg)(t,e,i))}function ct(t,e){return"shopify"==t?(0,lt.JL)(e):(0,rt.TE)(e)}var ut=n(513);var ht=function(t,e,n){const[i]=(0,u.j1)("whatmoreShopId"),[o]=(0,u.j1)("isInDesignMode"),[l]=(0,u.j1)("isDemoBrand"),[a,s]=(0,r.useState)(null),h=(0,r.useRef)(null),{closeClickComponent:v}=(0,r.useContext)(ln),{whatmoreUserInfo:x}=(0,r.useContext)(Z.I),[m,g]=(0,r.useState)({state:"init",cart_count:t});function f(t,e){g({state:t,cart_count:null!==e&&void 0!==e?e:m.cart_count}),"init"!=t&&"errored"!=t?(0,u.bU)("whatmoreAllowAutoSlide",!1):(0,u.bU)("whatmoreAllowAutoSlide",!0)}function w(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}function j(t,r){const a=function(t){const e=h.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));return 0==e.length?null:e[0].id}(t);if(!a)return void f("init",m.cart_count);f("atcApiCallInProgress",null);st(a,1,(0,c.Ipo)(i),i,n,e,r,null===n||void 0===n?void 0:n.location,null===x||void 0===x?void 0:x.userType).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(function(t,e,n){o||l||(async()=>{(0,d.JX)(t,e,n)})()}(n,e,1),f("init",m.cart_count+1),(0,u.bU)("whatmoreAddedToCart",!0),"72550089015"==i&&(0,u.MO)("whatmoreAddedToCart")&&(0,ut.D)(i,(()=>{}),100,window.location.hostname),(0,c.IKD)(i)&&setTimeout((()=>function(){const t=window.location.origin+"/cart";window.location.href=t}()),500),t))).catch((t=>{f("errored",null),console.error("Error while adding to cart:",t)}))}return[m,f,a,function(t){f("productVariantDetailsApiCallInProgress",null),(0,p.p)(e,(0,c.Ipo)(i),i).then((e=>{h.current=e.variants;const n=function(t){var e=[],n=[],i=[];return t.variants.forEach((o=>{var r,l,a;o.option1&&e.push({option:o.option1,available:null===(r=o.available)||void 0===r||r,type:t.options[0].name}),o.option2&&n.push({option:o.option2,available:null===(l=o.available)||void 0===l||l,type:t.options[1].name}),o.option3&&i.push({option:o.option3,available:null===(a=o.available)||void 0===a||a,type:t.options[2].name})})),e=e.reduce(((t,e,n)=>{var i=t.filter((t=>t.option==e.option));return 0==i.length?[...t,e]:(i[0].available=i[0].available|e.available,t)}),[]),n=n.reduce(((t,e,n)=>{var i=t.filter((t=>t.option==e.option));return 0==i.length?[...t,e]:(i[0].available=i[0].available|e.available,t)}),[]),i=i.reduce(((t,e,n)=>{var i=t.filter((t=>t.option==e.option));return 0==i.length?[...t,e]:(i[0].available=i[0].available|e.available,t)}),[]),[e,n,i]}(e);s(n),!function(t){return t[0].length<=1&&t[1].length<=1&&t[2].length<=1}(n)?f("awaitingVariantSelection",null):!function(){if(h.current&&h.current.length>=1)return h.current.filter((t=>t.available)).length>=1;return!1}()?f("errored",null):j([w(n[0]),w(n[1]),w(n[2])],t)})).catch((t=>{f("errored",null)}))},j,function(t){var e,n;const o=h.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));if(0==o.length)return null;const r=null!==(e=o[0].price)&&void 0!==e?e:0,l=null!==(n=o[0].compare_at_price)&&void 0!==n?n:0;return{price:"whatmore"==(0,c.Ipo)(i)?r:r/100,compare_price:"whatmore"==(0,c.Ipo)(i)?l:l/100}},function(){"do_nothing"!==(0,c.v9M)(i)&&("go_to_cart_page"!==(0,c.v9M)(i)?"open_cart_slider"!==(0,c.v9M)(i)||null!==v&&v():ct((0,c.Ipo)(i),i))}]},pt=n(9363);var vt=function(t){var e,n,i,o;const l=t.productVariantOptions,a=null!==(e=t.width)&&void 0!==e?e:"100%",d=null!==(n=t.height)&&void 0!==n?n:"fit-content",h=null!==(i=t.baseFontSize)&&void 0!==i?i:10,p=t.onOptionSelected,v=null!==(o=t.optionTitleColor)&&void 0!==o?o:"black",m=t.data,[f]=(0,u.j1)("whatmoreSecondaryColor"),[w]=(0,u.j1)("whatmorePrimaryFont"),[j]=(0,u.j1)("whatmoreShopId");function y(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}const[C,S]=(0,r.useState)([y(l[0]),y(l[1]),y(l[2])]);return(0,r.useEffect)((()=>{p(C)}),[C]),(0,x.jsx)(s.Kq,{direction:"column",width:a,height:d,justifyContent:"flex-start",alignItems:"center",spacing:"5px",children:l.map(((e,n)=>{if(0!=e.length)return(0,x.jsxs)(s.Kq,{width:"100%",direction:"column",alignItems:"center",justifyContent:"flex-start",children:[(0,x.jsx)(s.M5,{width:"100%",children:(0,x.jsx)(s.iz,{color:"blackAlpha.500",size:"1px",width:"20%"})}),(0,x.jsxs)(s.xv,{as:"b",fontSize:1.2*h+"px",sx:{color:v+" !important",fontFamily:w+" !important"},align:"center",children:["\xa0",e[0].type,"\xa0"]}),(0,x.jsx)(s.kC,{gap:"6px",wrap:"wrap",justify:"center",children:e.map(((e,i)=>{var o,r,l,a,d,u,p,v,f,y,b,I,k,_,F,T;const E=0==n||(null===m||void 0===m||null===(o=m.variants)||void 0===o?void 0:o.find((t=>t[`option${n}`]==(null===C||void 0===C?void 0:C[n-1])&&t[`option${n+1}`]==(null===e||void 0===e?void 0:e.option))));return(0,x.jsx)(x.Fragment,{children:E&&(0,x.jsx)(s.xu,{borderRadius:"Colour"===(null===e||void 0===e?void 0:e.type)||null!==e&&void 0!==e&&e.type.toLowerCase().includes("color")?"50%":"2px",onClick:t=>{t.stopPropagation(),e.available&&function(t,e){if(2==e)S([C[0],C[1],t]);else if(1==e){var n,i;S([C[0],t,null===m||void 0===m||null===(n=m.variants)||void 0===n||null===(i=n.find((e=>(null===e||void 0===e?void 0:e.option2)==t)))||void 0===i?void 0:i.option3])}else{var o,r,l,a,d,s;const e=null===m||void 0===m||null===(o=m.variants)||void 0===o||null===(r=o.find((e=>(null===e||void 0===e?void 0:e.option1)==t)))||void 0===r?void 0:r.option2;S([t,null===m||void 0===m||null===(l=m.variants)||void 0===l||null===(a=l.find((e=>(null===e||void 0===e?void 0:e.option1)==t)))||void 0===a?void 0:a.option2,null===m||void 0===m||null===(d=m.variants)||void 0===d||null===(s=d.find((t=>(null===t||void 0===t?void 0:t.option2)==e)))||void 0===s?void 0:s.option3])}}(e.option,n)},backgroundColor:e.option==C[n]?"black":"white",cursor:"pointer",children:("Colour"===(null===e||void 0===e?void 0:e.type)||null!==e&&void 0!==e&&e.type.toLowerCase().includes("color"))&&((null===t||void 0===t||null===(r=t.finalArr)||void 0===r||null===(l=r.finalArr)||void 0===l?void 0:l.length)>0&&(null===t||void 0===t||null===(a=t.finalArr)||void 0===a||null===(d=a.finalArr)||void 0===d||!d.includes(null))||(null===t||void 0===t||null===(u=t.finalArr)||void 0===u||null===(p=u.finalArrExternal)||void 0===p?void 0:p.length)>0&&(null===t||void 0===t||null===(v=t.finalArr)||void 0===v||null===(f=v.finalArrExternal)||void 0===f||!f.includes(null)))?(0,x.jsx)(g.Ee,{padding:"2px",borderRadius:(0,c.lmH)(j),width:"58px",height:"58px",style:{cursor:null!==e&&void 0!==e&&e.available?"pointer":"not-allowed",opacity:null!==e&&void 0!==e&&e.available?1:.5,filter:null!==e&&void 0!==e&&e.available?"none":"grayscale(100%)"},src:(0,pt.s)(null!==(y=null===t||void 0===t||null===(b=t.finalArr)||void 0===b||null===(I=b.finalArr)||void 0===I||null===(k=I.find((t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option))))||void 0===k?void 0:k.src)&&void 0!==y?y:null===t||void 0===t||null===(_=t.finalArr)||void 0===_||null===(F=_.finalArrExternal)||void 0===F||null===(T=F.find((t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option))))||void 0===T?void 0:T.optionsrc,"?width=400&height=400")}):(0,x.jsxs)(s.xv,{as:e.available?"samp":"s",fontSize:h+"px",sx:{color:(e.available?e.option==C[n]?"white":"black":"gray")+" !important",fontFamily:w+" !important"},align:"center",paddingX:(P=e.option,P.length>=3?"0px":.5*h+"px"),children:["\xa0",e.option,"\xa0"]})})});var P}))},n)]},n)}))})},xt=n(9219),mt=n(6524);var gt=function(t){var e,n,i,o,l,a;const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[f]=(0,u.j1)("whatmoreSecondaryColor"),w=(0,u.MO)("whatmoreSecondaryColorShade900"),[j]=(0,u.j1)("whatmorePrimaryFont"),[y]=(0,u.j1)("whatmoreShopId"),[C,S,b,I]=(0,h.Z)(),[k,_]=(0,r.useState)(!1),[F,T]=(0,r.useState)(t.product),{whatmoreUITheme:E}=(0,r.useContext)(Z.I),{whatmoreWidgetSourceDetails:P}=(0,r.useContext)(Z.I),[O,z,R,M,D,A,U]=ht(0,F,t.event),[X,$]=(0,r.useState)(null),[G,Q]=(0,r.useState)(parseFloat(F.price)),[tt,et]=(0,r.useState)(parseFloat(F.compare_price)),[nt,ot]=(0,r.useState)(F.currency),[rt,lt]=(0,r.useState)(null),at=t.event,dt=t.productClickHandler,{whatmoreIsPreviewMode:st}=(0,r.useContext)(Z.I),[ct,ut]=(0,r.useState)(null);(0,r.useEffect)((()=>{(0,c.N8M)(y)&&(0,xt.Rb)(F,(0,c.Ipo)(y),y).then((t=>{T(t),Q(parseFloat(t.price)),et(parseFloat(t.compare_price)),ot(t.currency)}));(async()=>{const t=await(0,p.p)(F,(0,c.Ipo)(y),y);lt(t)})()}),[]),(0,r.useEffect)((()=>{var t,e;const n=null!=rt?null===rt||void 0===rt||null===(t=rt.options)||void 0===t?void 0:t.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"))})):-1,i=-1!==n?null===rt||void 0===rt||null===(e=rt.variants)||void 0===e?void 0:e.map((t=>{var e,i;const o=null===t||void 0===t?void 0:t[`option${n+1}`];return null!==t&&void 0!==t&&null!==(e=t.featured_image)&&void 0!==e&&e.src?{color:o,src:null===t||void 0===t||null===(i=t.featured_image)||void 0===i?void 0:i.src}:null})):[];let o=[];var r;-1!==n&&(o=null===rt||void 0===rt||null===(r=rt.images)||void 0===r?void 0:r.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc}))));ut({position:n,finalArr:i,finalArrExternal:o})}),[rt]);var gt=.68*I,ft=.55*gt,wt=.4*gt,jt=gt*(.55-.4),yt=gt+"px",Ct=wt+"px",St=jt+"px",bt=.12*wt;const It=(0,c.ITD)(y);function kt(){window.location.href=function(t){return(0,c.lj5)(y)?t.product_link+"?"+(0,c.awP)(y)+"&"+(0,c.n9s)(y)+"&"+(0,c.vaK)(y):t.product_link}(F)}const _t=P.landingLocationType,Ft=P.templateType,Tt=(0,mt.NY)(_t)+(0,mt.dS)(Ft)+"_"+(null===at||void 0===at?void 0:at.event_id);return(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:q,marginBottom:(0,c.pq5)(y),width:yt,height:"fit-content",boxShadow:"round"==E?"dark-lg":null,onClick:()=>{!function(t,e){v||m||(async()=>{(0,d.wz)(t,e)})(),"72550089015"==y?kt():dt(e),_(!0)}(at,F)},backgroundColor:(0,W.lA)("#ffffff",(0,c.U5_)(y)),animation:k?K.mT:null,borderRadius:"round"==E?"xl":null,overflow:"hidden",onAnimationEnd:()=>{_(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(y),borderColor:(0,c.qPe)(y)},children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,x.jsx)(s.xu,{height:Ct,width:Ct,bgColor:w,children:(0,x.jsx)(g.Ee,{width:Ct,height:Ct,src:(0,pt.s)(null!==(e=null!==(n=null===ct||void 0===ct||null===(i=ct.finalArr)||void 0===i||null===(o=i.find((t=>(null===t||void 0===t?void 0:t.color)==(null===X||void 0===X?void 0:X[null===ct||void 0===ct?void 0:ct.position]))))||void 0===o?void 0:o.src)&&void 0!==n?n:null===ct||void 0===ct||null===(l=ct.finalArrExternal)||void 0===l||null===(a=l.find((t=>(null===t||void 0===t?void 0:t.color)==(null===X||void 0===X?void 0:X[null===ct||void 0===ct?void 0:ct.position]))))||void 0===a?void 0:a.src)&&void 0!==e?e:F.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(y)+" !important"}})}),(0,x.jsxs)(s.xu,{height:Ct,width:gt-wt+"px",children:[(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:(0,c.Fr)(y)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"4px",paddingY:"10px",children:[(0,x.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",1.1*bt+"px","important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",j,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"),t.style.setProperty("padding","0","important"),t.style.setProperty("margin-bottom","4px","important"),t.style.setProperty("font-weight","normal","important"))},children:(0,B.s)(null==F.title?"":F.title.toString())}),(0,c.QaY)(y)?(0,x.jsxs)(s.Kq,{direction:(0,c.$zZ)(y)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",borderRadius:"round"==E?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"4px",sx:{margin:"0px !important",marginBottom:"4px !important"},children:[(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*bt*(0,c.Rqt)(y)+"px !important",fontWeight:"semibold !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:j+" !important",color:(0,c.Uyp)(y)+" !important",padding:"0px !important",letterSpacing:"normal !important",margin:"0px !important"},children:["\xa0"," "+(0,xt.jx)("10588815418"==y?(null===rt||void 0===rt?void 0:rt.price)/100:G,"",y,nt)," \xa0"]}),(0,Y.B)(G,tt)?(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*bt*(0,c.Rqt)(y)+"px !important",fontWeight:"medium !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:j+" !important",color:(0,c.kPs)(y)+" !important",margin:"0px !important",letterSpacing:"normal !important",textDecoration:"line-through !important"},children:[" ",(0,xt.jx)("10588815418"==y?(null===rt||void 0===rt?void 0:rt.compare_at_price)/100:tt,"",y,nt)]}):(0,x.jsx)(x.Fragment,{})]}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xv,{fontSize:.82*bt*(0,c.Rqt)(y)+"px",fontWeight:"medium",lineHeight:"110%",sx:{margin:"0px !important",fontFamily:j+" !important",color:(0,c.eod)(y)+" !important"},children:st?(0,c.qde)(y):(0,c.aTS)(y)})]}),(0,c.Fr)(y)?(0,x.jsx)(s.Kq,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,x.jsx)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:w,sx:{borderRadius:"round"==E?"5px":"0px",padding:"2px"},spacing:"0px",children:"1972174947"!=y?(0,x.jsx)(V.Z,{sx:{color:f,fontSize:1.3*bt+"px"}}):(0,x.jsx)(J.zx,{size:"sm",_hover:{bg:f},sx:{bg:f},children:(0,x.jsx)(s.xv,{color:"white",paddingX:"6px",fontSize:.8*bt+"px",children:"VIEW PRODUCT"})})}),(0,x.jsx)(s.xu,{width:"2px"})]})}):(0,x.jsx)(x.Fragment,{})]})]}),(0,x.jsx)(L.Rg,{unmountOnExit:!0,initialScale:.5,in:"awaitingVariantSelection"==O.state,style:{height:"fit-content",width:"100%"},children:"awaitingVariantSelection"==O.state&&null!=R?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",marginTop:.1*ft+"px",marginBottom:.1*ft+"px",overflowY:"auto",overflowX:"hidden",maxHeight:ft*It+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(vt,{width:yt,height:"fit-conten",event:at,product:F,finalArr:ct,data:rt,productVariantOptions:R,baseFontSize:1.2*bt,onOptionSelected:t=>{!function(t){$(t);const e=A(t);e&&(Q(e.price),et(e.compare_price))}(t)}})}):(0,x.jsx)(x.Fragment,{})}),(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:St,justifyContent:"center",alignItems:"center",children:(0,x.jsx)(it,{baseFontSize:.3*jt,event:at,product:F,cartState:O.state,cartCount:O.cart_count,updateCartState:z,onClickAtc:t=>{"init"==O.state?(M(Tt),(0,N.GF)({userInteractionType:H.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:P,event:at,productList:[F],ctaList:at.cta})):"awaitingVariantSelection"==O.state&&D(X,Tt)},onCartIconClick:()=>{U()}})})]})},ft=n(3867);var wt=function(t){var e,n,i;const[o]=(0,u.j1)("isInDesignMode"),[r]=(0,u.j1)("isDemoBrand"),[l]=(0,u.j1)("whatmoreSecondaryColor"),[a]=(0,u.j1)("whatmorePrimaryFont"),c=t.event,h=t.product,p=null!==(e=t.baseFontSize)&&void 0!==e?e:10,v=null!==(n=t.width)&&void 0!==n?n:"fit-content",m=null!==(i=t.height)&&void 0!==i?i:"fit-content";return(0,x.jsx)(s.rU,{href:h.product_link,color:l,onClick:()=>{!function(t,e){o||r||(async()=>{(0,d.$L)(t,e)})()}(c,h)},children:(0,x.jsx)(s.xu,{width:v,height:m,padding:"2x",boxShadow:"lg",borderRadius:"md",backgroundColor:"white",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",spacing:"5px",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{lineHeight:"100%",fontSize:1.4*p,fontWeight:"semibold",sx:{fontFamily:a+" !important",color:l+" !important"},children:" VIEW MORE "})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(V.Z,{sx:{color:l,fontSize:1.4*p}})})]})})})},jt=n(6163);function yt(t){var e;const[n]=(0,u.j1)("whatmoreSecondaryColor"),[i]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),[l,a]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),h=t.onClick,p=t.width,v=t.height,m=t.title;return(0,x.jsx)(s.xu,{width:p,height:v,padding:"2x",boxShadow:"lg",backgroundColor:n,onClick:t=>{t.stopPropagation(),h(),a(!0)},animation:l?K.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:(0,x.jsxs)(s.xv,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},lineHeight:"100%",fontSize:1.4*d+"px",fontWeight:"semibold",sx:{fontFamily:i+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",m,"\xa0"]})})})}var Ct=function(t){var e,n,i;const[o]=(0,u.j1)("whatmoreShopId"),r=t.event,l=t.product,a=null!==(e=t.baseFontSize)&&void 0!==e?e:10,d=t.onShopNowClick,s=null!==(n=t.width)&&void 0!==n?n:"100%",h=null!==(i=t.height)&&void 0!==i?i:"100%";return(0,x.jsx)(yt,{onClick:function(){d()},event:r,product:l,baseFontSize:a,width:s,height:h,title:(0,c.Pvx)(o)})};var St=function(t){var e;const[n]=(0,u.j1)("isInDesignMode"),[i]=(0,u.j1)("isDemoBrand"),[o]=(0,u.j1)("whatmorePrimaryFont"),[l]=(0,u.j1)("whatmoreShopId"),[a,p,v,m]=(0,h.Z)(),[f,w]=(0,r.useState)(!1),[j,y]=(0,r.useState)(t.product),{whatmoreWidgetSourceDetails:C}=(0,r.useContext)(Z.I),[S,b,I,k,_,F,T]=ht(0,j,t.event),[E,P]=(0,r.useState)(null),[O,z]=(0,r.useState)(parseFloat(j.price)),[R,M]=(0,r.useState)(parseFloat(j.compare_price)),[D,A]=(0,r.useState)(j.currency),W=t.event,U=t.productClickHandler,V=null!==(e=t.tileWidthFactor)&&void 0!==e?e:1,X=C.landingLocationType,$=C.templateType,G=(0,mt.NY)(X)+(0,mt.dS)($)+"_"+(null===W||void 0===W?void 0:W.event_id);(0,r.useEffect)((()=>{(0,c.N8M)(l)&&(0,xt.Rb)(j,brandDomainContext(l),l).then((t=>{y(t),z(parseFloat(t.price)),M(parseFloat(t.compare_price)),A(t.currency)}))}),[]);var J=m*V,Q=.3*J,tt=J+"px",et=.7*Q,nt=.9*et,ot=.12*Q;const rt=(0,c.ITD)(l);function lt(t,e){n||i||(async()=>{(0,d.wz)(t,e)})(),U(e),w(!0)}return(0,x.jsx)(s.Kq,{direction:"row",width:tt,height:"fit-content",justifyContent:"center",children:(0,x.jsx)(s.xu,{marginTop:q,marginBottom:(0,c.pq5)(l),width:tt,onClick:t=>{},animation:f?K.mT:null,borderRadius:"lg",onAnimationEnd:()=>{w(!1)},children:(0,x.jsxs)(s.Kq,{direction:"column",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",spacing:"0px",children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"70%",justifyContent:"space-around",alignItems:"center",borderTopRadius:"lg",overflow:"hidden",onClick:()=>{lt(W,j)},children:[(0,x.jsx)(s.xu,{height:et+"px",width:et+"px",children:(0,x.jsx)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",children:(0,x.jsx)(s.xu,{height:nt+"px",width:nt+"px",borderRadius:"lg",bgColor:"gray.100",overflow:"hidden",children:(0,x.jsx)(g.Ee,{width:nt+"px",height:nt+"px",src:j.thumbnail_image,objectFit:"cover"})})})}),(0,x.jsx)(s.xu,{height:et+"px",width:J-et+"px",children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"space-between",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingY:"10px",spacing:"2px",children:[(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*ot+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:o+" !important",color:"white !important"},children:(0,B.s)(j.title.toString())}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",aligntItems:"center",marginTop:"5px",children:[(0,c.QaY)(l)?(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"flex-start",aligntItems:"center",borderRadius:"lg",backgroundColor:"blackAlpha.500",paddingX:"10px",paddingY:"5px",children:[(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:1*ot+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:o+" !important",color:"white !important"},children:["\xa0"," ",(0,xt.jx)(parseFloat(O),"",l,D)," \xa0"]}),(0,x.jsx)(s.M5,{children:(0,Y.B)(j.price,j.compare_price)?(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.8*ot+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:o+" !important",color:"#F9F6EE !important",textDecoration:"line-through !important"},children:[" ",(0,xt.jx)(parseFloat(R),"",l,D)]}):(0,x.jsx)(x.Fragment,{})})]}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(ft.Z,{storeId:l,productId:j.client_product_id,productLink:j.product_link,fontSize:1*ot,fontColor:"white"})})]})]})})]}),(0,x.jsx)(L.Rg,{unmountOnExit:!0,initialScale:.5,in:"awaitingVariantSelection"==S.state,style:{height:"fit-content",width:"100%"},children:"awaitingVariantSelection"==S.state&&null!=I?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",marginTop:.1*Q+"px",marginBottom:.1*Q+"px",overflowY:"auto",overflowX:"hidden",maxHeight:Q*rt+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(vt,{width:tt,height:"fit-content",event:W,product:j,productVariantOptions:I,baseFontSize:1*ot,onOptionSelected:t=>{!function(t){P(t);const e=F(t);e&&(z(e.price),M(e.compare_price))}(t)},optionTitleColor:"white"})}):(0,x.jsx)(x.Fragment,{})}),(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"30%",justifyContent:"center",alignItems:"center",paddingBottom:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,x.jsx)(s.xu,{width:"100%",height:"100%",children:(0,x.jsx)(wt,{baseFontSize:.8*ot,event:W,product:j,width:"100%",height:"100%"})}),(0,x.jsx)(s.xu,{width:"100%",height:"100%",borderRadius:"md",overflow:"hidden",children:(0,c.Ib9)(l)?(0,x.jsx)(Ct,{baseFontSize:.8*ot,event:W,product:j,borderRadius:"md",onShopNowClick:t=>{lt(W,j)}}):(0,x.jsx)(x.Fragment,{children:"form"===(0,c._5p)(l)?(0,x.jsx)(jt.default,{baseFontSize:.8*ot,event:W,product:j,width:"100%",height:"100%",showAddedToCart:!0}):(0,x.jsx)(it,{baseFontSize:.8*ot,event:W,product:j,cartState:S.state,cartCount:S.cart_count,borderRadius:"md",onClickAtc:t=>{"init"==S.state?(k(G),(0,N.GF)({userInteractionType:H.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:C,event:W,productList:[j],ctaList:W.cta})):"awaitingVariantSelection"==S.state&&_(E,G)},onCartIconClick:()=>{T()}})})})]})]})})})};var bt=function(t){const[e]=(0,u.j1)("isInDesignMode"),[n]=(0,u.j1)("isDemoBrand"),[i]=(0,u.j1)("whatmoreSecondaryColor"),o=(0,u.MO)("whatmoreSecondaryColorShade900"),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[p,v,m,f]=(0,h.Z)(),[w,j]=(0,r.useState)(!1),[y,C]=(0,r.useState)(t.product),{whatmoreUITheme:S}=(0,r.useContext)(Z.I),[b,I]=(0,r.useState)(!(0,c.N8M)(a)),[k,_]=(0,r.useState)(parseFloat(y.price)),[F,T]=(0,r.useState)(parseFloat(y.compare_price)),[E,P]=(0,r.useState)(y.currency),O=t.event;t.productClickHandler,(0,r.useEffect)((()=>{(0,c.N8M)(a)&&(0,xt.Rb)(y,(0,c.Ipo)(a),a).then((t=>{C(t),_(parseFloat(t.price)),T(parseFloat(t.compare_price)),P(t.currency),I(!0)}))}),[]);var L=.68*f,z=.4*L,R=L+"px",M=z+"px",D=L*(.55-.4)+"px",A=.12*z;(0,c.ITD)(a);const{whatmoreWidgetSourceDetails:U}=(0,r.useContext)(Z.I);function X(t){return(0,c.lj5)(a)?t.product_link+"?"+(0,c.awP)(a)+"&"+(0,c.n9s)(a)+"&"+(0,c.vaK)(a):t.product_link}function $(t,i){e||n||(async()=>{(0,d.wz)(t,i),(0,N.GF)({userInteractionType:H.K.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:U,event:t,productList:[i],ctaList:t.cta})})(),j(!0)}return(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:q,marginBottom:(0,c.pq5)(a),width:R,height:"fit-content",boxShadow:"round"==S?"dark-lg":null,onClick:()=>{$(O,y),window.location.href=X(y)},backgroundColor:(0,W.lA)("#ffffff",(0,c.U5_)(a)),animation:w?K.mT:null,borderRadius:"round"==S?"xl":null,overflow:"hidden",onAnimationEnd:()=>{j(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(a),borderColor:(0,c.qPe)(a)},children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,x.jsx)(s.xu,{height:M,width:M,bgColor:o,children:(0,x.jsx)(g.Ee,{width:M,height:M,src:(0,pt.s)(y.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(a)+" !important"}})}),(0,x.jsxs)(s.xu,{height:M,width:L-z+"px",children:[(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:(0,c.Fr)(a)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingTop:"10px",paddingBottom:"16px",children:[(0,x.jsx)(s.xv,{as:"p",ref:t=>{t&&(t.style.setProperty("min-height","0","important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("-webkit-box-orient","vertical","important"))},sx:{paddingLeft:"8px",fontFamily:l+" !important",color:"black !important",lineHeight:"120% !important",fontWeight:"medium !important",fontSize:1.1*A+"px !important"},children:(0,B.s)(null==y.title?"":y.title.toString())}),(0,c.QaY)(a)?(0,x.jsxs)(s.Kq,{direction:(0,c.$zZ)(a)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",marginTop:"5px",borderRadius:"round"==S?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"5px",children:[b&&(0,x.jsxs)(s.xv,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},noOfLines:1,fontSize:.9*A+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:l+" !important",color:(0,c.Uyp)(a)+" !important",margin:"0px !important"},children:[" "+(0,xt.jx)(k,"",a,E)," \xa0"]}),(0,Y.B)(k,F)&&b?(0,x.jsxs)(s.xv,{as:"s",style:{minHeight:0,textDecoration:"line-through"},noOfLines:1,fontSize:.9*A+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:l+" !important",color:(0,c.kPs)(a)+" !important",margin:"0px !important"},children:[" ",(0,xt.jx)(F,"",a,E)]}):(0,x.jsx)(x.Fragment,{})]}):(0,x.jsx)(x.Fragment,{}),""!=(0,c.sG7)(a)&&(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*A+"px",lineHeight:"100%",paddingTop:"6px",sx:{fontFamily:(0,c.V3Y)(a)+" !important",color:(0,c.aUT)(a)+" !important",margin:"0px !important"},children:["\xa0",(0,c.sG7)(a)," \xa0"]})]}),(0,c.Fr)(a)?(0,x.jsx)(s.Kq,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,x.jsx)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:o,sx:{borderRadius:"round"==S?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,x.jsx)(V.Z,{sx:{color:i,fontSize:1.3*A+"px"}})}),(0,x.jsx)(s.xu,{width:"2px"})]})}):(0,x.jsx)(x.Fragment,{})]})]}),(0,c.pp3)(a)&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:D,justifyContent:"center",alignItems:"center",children:(0,x.jsx)(Ct,{baseFontSize:.8*A,event:O,product:y,borderRadius:"md",onShopNowClick:t=>{$(O,y),window.location.href=X(y)}})})]})};var It=function(t){const[e]=(0,u.j1)("whatmoreShopId"),n=(0,c.eyg)(e),i=t.event,o=t.product;return"broad-tile"==n?(0,x.jsx)(gt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile-no-cta"==n?(0,x.jsx)(bt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"link_only"==n?(0,x.jsx)(U,{product:t.product,event:t.event}):"narrow-tile"==n?(0,x.jsx)(St,{event:i,product:o,productClickHandler:t.productClickHandler,tileWidthFactor:i.products.length>1?.68:void 0}):(0,x.jsx)(gt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler})},kt=n(6119),_t=n(3388),Ft=n(7643);var Tt=function(t){const[e,n,i,o]=(0,h.Z)(),[r]=(0,u.j1)("whatmoreShopId"),d=(0,u.MO)("isInDesignMode"),p=(0,u.MO)("isDemoBrand"),v=t.event,m=t.productClickHandler,g=(0,c.eyg)(r);if(!(0,_t.kT)(v))return(0,x.jsx)(x.Fragment,{});if(1==v.products.length&&(void 0==v.cta||0==v.cta.length)){const t=v.products[0];return(0,c.rnv)(r)?(0,x.jsx)(s.Kq,{direction:"horizontal",width:o,height:"fit-content",justifyContent:"center",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))",children:(0,x.jsx)(Ft.u,{userInteractionType:H.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(St,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})}):(0,x.jsx)(s.Kq,{direction:"horizontal",width:o,height:"fit-content",justifyContent:"center",backgroundImage:"narrow-tile"==g?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))":null,children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(Ft.u,{userInteractionType:H.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(It,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})})}return(0,x.jsx)(s.M5,{children:(0,x.jsx)("div",{onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(s.xu,{width:o+"px",backgroundImage:"narrow-tile"==g?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))":null,children:(0,x.jsxs)(l.tq,{className:"product-tile swiper-slide",slidesPerView:1==v.products.length?1:1.4,initialSlide:v.products.length<=2||(0,c.VqZ)(r)?0:1,centeredSlides:!(0,c.VqZ)(r),modules:[a.Gk],mousewheel:{invert:!1,thresholdDelta:20},nested:!0,children:[v.products.map((t=>"oos"!=t.product_status&&(0,x.jsx)(l.o5,{children:(0,x.jsx)(Ft.u,{userInteractionType:H.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(s.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",alignItems:"center",children:(0,x.jsx)(It,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})},v.event_id+t.product_id))),(0,c.pp3)(r)&&void 0!=v.cta&&v.cta.map((t=>(0,x.jsx)(x.Fragment,{children:""!==t.cta_title.trim()&&(0,x.jsx)(l.o5,{children:(0,x.jsx)(s.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",alignItems:"center",children:(0,x.jsx)(kt.Z,{cta:t},v.event_id+t.cta_id)})},v.event_id+t.cta_id)})))]})})})})};var Et=function(t){const[e,n]=(0,u.j1)("isProductSwiperCatalogOpen"),i=t.event,o=t.productClickHandler;return(0,r.useContext)(ln).isIOS&&e?(0,x.jsx)(Tt,{event:i,productClickHandler:o},i.event_id):(0,x.jsx)(L.MT,{unmountOnExit:!0,initialScale:.2,in:e,children:(0,x.jsx)(Tt,{event:i,productClickHandler:o},i.event_id)})};function Pt(t){const e=t.event,[n,i,o,r]=(0,h.Z)(),[l]=(0,u.j1)("whatmorePrimaryFont");return(0,x.jsx)(s.xu,{width:"fit-content",height:"fit-content",padding:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{overflow:"hidden",size:.15*r+"px",children:(0,x.jsx)(g.Ee,{width:"100%",height:"100%",src:e.thumbnail_image})})}),(0,x.jsx)(s.xu,{width:"fit-content",height:"fit-content",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"fit-content",height:"fit-content",children:[(0,x.jsx)(s.xv,{color:"white",fontSize:.05*r+"px",fontWeight:"bold",fontFamily:"sans-serif",align:"left",sx:{fontFamily:l+" !important"},children:e.presenter_name.substring(0,15)}),(0,x.jsx)(E.Z,{event:e,fontSize:.03*r+"px"})]})})]})})}var Ot=function(t){const[e]=(0,u.j1)("isInDesignMode"),[n]=(0,u.j1)("isDemoBrand"),[i,o]=(0,u.j1)("isProductSwiperCatalogOpen"),[l,a]=(0,j.Z)(),[d,h]=(0,u.j1)("isFirstIndicatorRenderDone"),p=(0,r.useContext)(ln),[v]=(0,u.j1)("whatmoreShopId"),m=t.event,g=t.isLast,f=t.onCloseCallback,w=t.focusRef,C=t.productClickHandler;return(0,x.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,x.jsx)(s.xu,{width:"full",margin:"2px",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"space-between",paddingRight:"10px",paddingLeft:"10px",children:[(0,x.jsx)(Pt,{event:m}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,x.jsx)(y,{focusRef:w}),(0,x.jsx)(O,{event:m,onCloseCallback:f})]})]})}),(0,x.jsx)(s.xu,{width:"100%",height:"100%",onClick:()=>{a(!l)}}),(0,x.jsxs)(s.xu,{width:"full",height:"fit-content",children:[p.totalEvents>1&&!d&&p.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:!g})})}):null,void 0!=m.products&&m.products.length>0?(0,x.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(v)?(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:m,onToggle:t=>{o("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:m,productClickHandler:C})})]}):(0,x.jsx)("div",{})]})]})})};function Lt(t){const[e,n,i,o]=(0,h.Z)(),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d,p]=(0,r.useState)(""),v=t.data,m=(t.event,t.product,t.setShowOptionsChart);var f=.4*o*.8*.13;(0,r.useEffect)((()=>{let t="vanyaclothing.myshopify.com";"1972174947"===a&&(t="vanyaclothing.myshopify.com");const e=`https://app.kiwisizing.com/api/getSizingChart?shop=${t}&product=${null===v||void 0===v?void 0:v.id}&title=${null===v||void 0===v?void 0:v.title}&tags=&cacheSettingsUpdateAt=2020-08-11T15%3A19%3A49.000Z&settingsVersion=19`;fetch(e).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>{var e,n,i,o,r,l;p(null===t||void 0===t||null===(e=t.sizings)||void 0===e||null===(n=e[0])||void 0===n||null===(i=n.layout)||void 0===i||null===(o=i.data)||void 0===o||null===(r=o[0])||void 0===r||null===(l=r.data)||void 0===l?void 0:l.url)})).catch((t=>{console.error("Error fetching data:",t)}))}),[]);const w=`${S.F4`
68
+ `} infinite 1.5s linear`;return(0,x.jsx)(L.MT,{unmountOnExit:!0,initialScale:.2,in:d,reverse:!0,delay:m,children:(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",paddingTop:100,borderRadius:"3xl",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"100%",height:"fit-content",justifyContent:"flex-end",children:[(0,x.jsx)(s.M5,{animation:"vertical"===p?w:j,children:"vertical"===p?(0,x.jsx)(z.Z,{sx:{color:"white !important",fontSize:g,filter:"drop-shadow(0 0 20px black);"}}):(0,x.jsx)(R.Z,{sx:{color:"white !important",fontSize:g,filter:"drop-shadow(0 0 20px black);"}})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{textShadow:"dark-lg",fontSize:f+"px",fontWeight:"semibold",sx:{color:"white !important",textShadow:"0px 0px 20px black !important;"},children:"swipe for more"})})]})})})};var D=function(t){const[e,n]=(0,u.j1)("isFirstIndicatorRenderDone"),[i]=(0,u.j1)("indicatorRenderSeconds"),o=i,l=t.swipeUp;return(0,r.useEffect)((()=>{const t=setTimeout((()=>{n(!0)}),3e3+1e3*o);return()=>{clearTimeout(t)}}),[]),e?null:(0,x.jsx)(M,{showForSeconds:.8*o,delayInSeconds:3,swipeUp:l})},A=n(5180),K=n(9316),W=n(5254);const q="15px";var N=n(7376),H=n(778),Z=n(8811);var U=function(t){const[e]=(0,u.j1)("isInDesignMode"),[n]=(0,u.j1)("isDemoBrand"),[i]=(0,u.j1)("whatmoreSecondaryColor"),[o]=(0,u.j1)("whatmorePrimaryFont"),[l]=(0,u.j1)("whatmoreShopId"),[a,p,v,m]=(0,h.Z)(),[g,f]=(0,r.useState)(!1),w=t.product,j=t.event,{whatmoreWidgetSourceDetails:y}=(0,r.useContext)(Z.I),C=.1*v,S=.95*m,b=.05*m;return(0,x.jsx)(s.Kq,{direction:"row",height:C,justifyContent:"center",aligntItems:"center",alignContent:"center",bgGradient:"linear(to-b, transparent, blackAlpha.400, blackAlpha.600)",children:(0,x.jsx)(s.Kq,{direction:"column",width:"fit-content",height:C,justifyContent:"center",aligntItems:"center",alignContent:"center",children:(0,x.jsx)(s.xu,{width:S+"px",height:"fit-content",padding:"6px",marginTop:q,backgroundColor:i,borderRadius:"5px",animation:g?K.mT:null,onAnimationEnd:()=>{f(!1)},marginBottom:(0,c.pq5)(l),onClick:()=>{f(!0),function(t,i){e||n||(async()=>{(0,d.wz)(t,i),(0,N.GF)({userInteractionType:H.K.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:y,event:t,productList:[i],ctaList:t.cta})})()}(j,w),window.location.href=function(t){return(0,c.lj5)(l)?t.product_link+"?"+(0,c.awP)(l)+"&"+(0,c.n9s)(l)+"&"+(0,c.vaK)(l):t.product_link}(w)},_hover:{backgroundColor:(0,W.lA)(i,8)},cursor:"pointer",children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*b+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:o+" !important",color:"white !important"},children:(0,c.Pvx)(l)})})})})})},V=n(7009),B=n(5945),Y=n(5456),X=n(6984),$=n(6227),G=n(7329),J=(n(9111),n(9748));function Q(t){var e;const[n]=(0,u.j1)("whatmoreSecondaryColor"),[i]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),[l,a]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),h=t.onClick,p=t.width,v=t.height,m=t.title,g=t.showInProgressIcon;return(0,x.jsxs)(s.xu,{display:"flex",width:p,height:v,padding:"2x",boxShadow:"lg",animation:l?K.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:["awaitingVariantSelection"==t.cartState&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",backgroundColor:"white",onClick:e=>{e.stopPropagation(),t.updateCartState("init"),a(!0)},children:(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:"#343434 !important"},children:["\xa0","Cancel","\xa0"]})}),(0,x.jsxs)(s.Kq,{direction:"row",backgroundColor:g?(0,W.lA)(n,8):n,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",onClick:t=>{t.stopPropagation(),h(),a(!0)},children:[(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",m,"\xa0"]}),g?(0,x.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,x.jsx)(G.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*d+"px"}})}):(0,x.jsx)(x.Fragment,{})]})]})}function tt(t){var e;const[n]=(0,u.j1)("whatmoreSecondaryColor"),[i]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),[l,a]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),h=t.onClick,p=t.width,v=t.height;return(0,x.jsx)(s.xu,{width:p,height:v,padding:"2x",boxShadow:"lg",backgroundColor:n,onClick:t=>{t.stopPropagation(),h(),a(!0)},animation:l?K.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",children:(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",(0,c.tan)(o),"\xa0"]})})})})}function et(t){var e;const[n]=(0,u.j1)("whatmorePrimaryFont"),[i]=(0,u.j1)("whatmoreShopId"),o=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),r=t.width,l=t.height;return(0,x.jsx)(s.xu,{width:r,height:l,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:"gray",borderWidth:"1px",onClick:t=>{t.stopPropagation()},children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:(0,x.jsxs)(s.xv,{color:"gray",lineHeight:"100%",fontSize:1.3*o+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important",color:"gray !important"},children:["\xa0"," Sold Out ","\xa0"]})})})}function nt(t){var e;const[n]=(0,u.j1)("whatmoreSecondaryColor"),[i]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),r=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),l=t.onClick,a=t.cartCount,d=t.width,c=t.height,h=t.onCartIconClick;return(0,x.jsx)(s.xu,{width:d,height:c,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:n,borderWidth:"1px",onClick:t=>{t.stopPropagation()},cursor:"pointer",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:[(0,x.jsx)(s.M5,{paddingX:"5px",onClick:()=>{h()},children:"1972174947"!=o?(0,x.jsx)($.Z,{sx:{color:n,fontSize:1.6*r}}):(0,x.jsx)(J.zx,{size:"sm",_hover:{bg:n},sx:{bg:n},children:(0,x.jsx)(s.xv,{paddingX:"6px",color:"white",sx:{fontSize:.85*r},children:"GO TO CART"})})}),(0,x.jsx)(s.xv,{color:n,fontSize:1.3*r+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important"},children:a}),(0,x.jsx)(s.M5,{paddingX:"5px",onClick:t=>{t.stopPropagation(),l()},children:(0,x.jsx)(X.Z,{sx:{color:n,fontSize:1.6*r}})})]})})}var it=function(t){var e,n,i,o;const[r]=(0,u.j1)("whatmoreShopId"),l=t.event,a=t.product,d=null!==(e=t.baseFontSize)&&void 0!==e?e:10,s=null===(n=t.showAddedToCart)||void 0===n||n,c=t.cartState,h=t.cartCount,p=t.onClickAtc,v=t.onCartIconClick;function m(){p()}const g=null!==(i=t.width)&&void 0!==i?i:"100%",f=null!==(o=t.height)&&void 0!==o?o:"100%";return"errored"==c?(0,x.jsx)(L.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:f,width:g},children:(0,x.jsx)(et,{event:l,product:a,baseFontSize:d,width:g,height:f})}):"init"==c?0==h?(0,x.jsx)(tt,{onClick:m,event:l,product:a,baseFontSize:d,width:g,height:f}):s?(0,x.jsx)(L.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:f,width:g},children:(0,x.jsx)(nt,{onClick:m,event:l,product:a,baseFontSize:d,cartCount:h,width:g,height:f,onCartIconClick:v})}):(0,x.jsx)(tt,{onClick:m,event:l,product:a,baseFontSize:d,width:g,height:f}):(0,x.jsx)(Q,{onClick:m,cartState:c,updateCartState:t.updateCartState,event:l,product:a,baseFontSize:d,width:g,height:f,title:"awaitingVariantSelection"==c?"Done":"",showInProgressIcon:"atcApiCallInProgress"==c||"productVariantDetailsApiCallInProgress"==c})},ot=n(6967),rt=n(6230),lt=n(4844);const at=(0,u.MO)("isInDesignMode"),dt=(0,u.MO)("isDemoBrand");async function st(t,e,n,i,o,r,l,a,d){return"shopify"==n?(0,lt.wW)(t,e,i,l,a,d):(at||dt||(async()=>{(0,ot.FF)(o,r)})(),(0,rt.jg)(t,e,i))}function ct(t,e){return"shopify"==t?(0,lt.JL)(e):(0,rt.TE)(e)}var ut=n(513);var ht=function(t,e,n){const[i]=(0,u.j1)("whatmoreShopId"),[o]=(0,u.j1)("isInDesignMode"),[l]=(0,u.j1)("isDemoBrand"),[a,s]=(0,r.useState)(null),h=(0,r.useRef)(null),{closeClickComponent:v}=(0,r.useContext)(ln),{whatmoreUserInfo:x}=(0,r.useContext)(Z.I),[m,g]=(0,r.useState)({state:"init",cart_count:t});function f(t,e){g({state:t,cart_count:null!==e&&void 0!==e?e:m.cart_count}),"init"!=t&&"errored"!=t?(0,u.bU)("whatmoreAllowAutoSlide",!1):(0,u.bU)("whatmoreAllowAutoSlide",!0)}function w(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}function j(t,r){const a=function(t){const e=h.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));return 0==e.length?null:e[0].id}(t);if(!a)return void f("init",m.cart_count);f("atcApiCallInProgress",null);st(a,1,(0,c.Ipo)(i),i,n,e,r,null===n||void 0===n?void 0:n.location,null===x||void 0===x?void 0:x.userType).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(function(t,e,n){o||l||(async()=>{(0,d.JX)(t,e,n)})()}(n,e,1),f("init",m.cart_count+1),(0,u.bU)("whatmoreAddedToCart",!0),"72550089015"==i&&(0,u.MO)("whatmoreAddedToCart")&&(0,ut.D)(i,(()=>{}),100,window.location.hostname),(0,c.IKD)(i)&&setTimeout((()=>function(){const t=window.location.origin+"/cart";window.location.href=t}()),500),t))).catch((t=>{f("errored",null),console.error("Error while adding to cart:",t)}))}return[m,f,a,function(t){f("productVariantDetailsApiCallInProgress",null),(0,p.p)(e,(0,c.Ipo)(i),i).then((e=>{h.current=e.variants;const n=function(t){var e=[],n=[],i=[];return t.variants.forEach((o=>{var r,l,a;o.option1&&e.push({option:o.option1,available:null===(r=o.available)||void 0===r||r,type:t.options[0].name}),o.option2&&n.push({option:o.option2,available:null===(l=o.available)||void 0===l||l,type:t.options[1].name}),o.option3&&i.push({option:o.option3,available:null===(a=o.available)||void 0===a||a,type:t.options[2].name})})),e=e.reduce(((t,e,n)=>{var i=t.filter((t=>t.option==e.option));return 0==i.length?[...t,e]:(i[0].available=i[0].available|e.available,t)}),[]),n=n.reduce(((t,e,n)=>{var i=t.filter((t=>t.option==e.option));return 0==i.length?[...t,e]:(i[0].available=i[0].available|e.available,t)}),[]),i=i.reduce(((t,e,n)=>{var i=t.filter((t=>t.option==e.option));return 0==i.length?[...t,e]:(i[0].available=i[0].available|e.available,t)}),[]),[e,n,i]}(e);s(n),!function(t){return t[0].length<=1&&t[1].length<=1&&t[2].length<=1}(n)?f("awaitingVariantSelection",null):!function(){if(h.current&&h.current.length>=1)return h.current.filter((t=>t.available)).length>=1;return!1}()?f("errored",null):j([w(n[0]),w(n[1]),w(n[2])],t)})).catch((t=>{f("errored",null)}))},j,function(t){var e,n;const o=h.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));if(0==o.length)return null;const r=null!==(e=o[0].price)&&void 0!==e?e:0,l=null!==(n=o[0].compare_at_price)&&void 0!==n?n:0;return{price:"whatmore"==(0,c.Ipo)(i)?r:r/100,compare_price:"whatmore"==(0,c.Ipo)(i)?l:l/100}},function(){"do_nothing"!==(0,c.v9M)(i)&&("go_to_cart_page"!==(0,c.v9M)(i)?"open_cart_slider"!==(0,c.v9M)(i)||null!==v&&v():ct((0,c.Ipo)(i),i))}]},pt=n(9363);var vt=function(t){var e,n,i,o;const l=t.productVariantOptions,a=null!==(e=t.width)&&void 0!==e?e:"100%",d=null!==(n=t.height)&&void 0!==n?n:"fit-content",h=null!==(i=t.baseFontSize)&&void 0!==i?i:10,p=t.onOptionSelected,v=null!==(o=t.optionTitleColor)&&void 0!==o?o:"black",m=t.data,[f]=(0,u.j1)("whatmoreSecondaryColor"),[w]=(0,u.j1)("whatmorePrimaryFont"),[j]=(0,u.j1)("whatmoreShopId");function y(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}const[C,S]=(0,r.useState)([y(l[0]),y(l[1]),y(l[2])]);return(0,r.useEffect)((()=>{p(C)}),[C]),(0,x.jsx)(s.Kq,{direction:"column",width:a,height:d,justifyContent:"flex-start",alignItems:"center",spacing:"5px",children:l.map(((e,n)=>{if(0!=e.length)return(0,x.jsxs)(s.Kq,{width:"100%",direction:"column",alignItems:"center",justifyContent:"flex-start",children:[(0,x.jsx)(s.M5,{width:"100%",children:(0,x.jsx)(s.iz,{color:"blackAlpha.500",size:"1px",width:"20%"})}),(0,x.jsxs)(s.xv,{as:"b",fontSize:1.2*h+"px",sx:{color:v+" !important",fontFamily:w+" !important"},align:"center",children:["\xa0",e[0].type,"\xa0"]}),(0,x.jsx)(s.kC,{gap:"6px",wrap:"wrap",justify:"center",children:e.map(((e,i)=>{var o,r,l,a,d,u,p,v,f,y,b,I,k,_,F,T;const E=0==n||(null===m||void 0===m||null===(o=m.variants)||void 0===o?void 0:o.find((t=>t[`option${n}`]==(null===C||void 0===C?void 0:C[n-1])&&t[`option${n+1}`]==(null===e||void 0===e?void 0:e.option))));return(0,x.jsx)(x.Fragment,{children:E&&(0,x.jsx)(s.xu,{borderRadius:"Colour"===(null===e||void 0===e?void 0:e.type)||null!==e&&void 0!==e&&e.type.toLowerCase().includes("color")?"50%":"2px",onClick:t=>{t.stopPropagation(),e.available&&function(t,e){if(2==e)S([C[0],C[1],t]);else if(1==e){var n,i;S([C[0],t,null===m||void 0===m||null===(n=m.variants)||void 0===n||null===(i=n.find((e=>(null===e||void 0===e?void 0:e.option2)==t)))||void 0===i?void 0:i.option3])}else{var o,r,l,a,d,s;const e=null===m||void 0===m||null===(o=m.variants)||void 0===o||null===(r=o.find((e=>(null===e||void 0===e?void 0:e.option1)==t)))||void 0===r?void 0:r.option2;S([t,null===m||void 0===m||null===(l=m.variants)||void 0===l||null===(a=l.find((e=>(null===e||void 0===e?void 0:e.option1)==t)))||void 0===a?void 0:a.option2,null===m||void 0===m||null===(d=m.variants)||void 0===d||null===(s=d.find((t=>(null===t||void 0===t?void 0:t.option2)==e)))||void 0===s?void 0:s.option3])}}(e.option,n)},backgroundColor:e.option==C[n]?"black":"white",cursor:"pointer",children:("Colour"===(null===e||void 0===e?void 0:e.type)||null!==e&&void 0!==e&&e.type.toLowerCase().includes("color"))&&((null===t||void 0===t||null===(r=t.finalArr)||void 0===r||null===(l=r.finalArr)||void 0===l?void 0:l.length)>0&&(null===t||void 0===t||null===(a=t.finalArr)||void 0===a||null===(d=a.finalArr)||void 0===d||!d.includes(null))||(null===t||void 0===t||null===(u=t.finalArr)||void 0===u||null===(p=u.finalArrExternal)||void 0===p?void 0:p.length)>0&&(null===t||void 0===t||null===(v=t.finalArr)||void 0===v||null===(f=v.finalArrExternal)||void 0===f||!f.includes(null)))?(0,x.jsx)(g.Ee,{padding:"2px",borderRadius:(0,c.lmH)(j),width:"58px",height:"58px",style:{cursor:null!==e&&void 0!==e&&e.available?"pointer":"not-allowed",opacity:null!==e&&void 0!==e&&e.available?1:.5,filter:null!==e&&void 0!==e&&e.available?"none":"grayscale(100%)"},src:(0,pt.s)(null!==(y=null===t||void 0===t||null===(b=t.finalArr)||void 0===b||null===(I=b.finalArr)||void 0===I||null===(k=I.find((t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option))))||void 0===k?void 0:k.src)&&void 0!==y?y:null===t||void 0===t||null===(_=t.finalArr)||void 0===_||null===(F=_.finalArrExternal)||void 0===F||null===(T=F.find((t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option))))||void 0===T?void 0:T.optionsrc,"?width=400&height=400")}):(0,x.jsxs)(s.xv,{as:e.available?"samp":"s",fontSize:h+"px",sx:{color:(e.available?e.option==C[n]?"white":"black":"gray")+" !important",fontFamily:w+" !important"},align:"center",paddingX:(P=e.option,P.length>=3?"0px":.5*h+"px"),children:["\xa0",e.option,"\xa0"]})})});var P}))},n)]},n)}))})},xt=n(9219),mt=n(6524);var gt=function(t){var e,n,i,o,l,a;const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[f]=(0,u.j1)("whatmoreSecondaryColor"),w=(0,u.MO)("whatmoreSecondaryColorShade900"),[j]=(0,u.j1)("whatmorePrimaryFont"),[y]=(0,u.j1)("whatmoreShopId"),[C,S,b,I]=(0,h.Z)(),[k,_]=(0,r.useState)(!1),[F,T]=(0,r.useState)(t.product),{whatmoreUITheme:E}=(0,r.useContext)(Z.I),{whatmoreWidgetSourceDetails:P}=(0,r.useContext)(Z.I),[O,z,R,M,D,A,U]=ht(0,F,t.event),[X,$]=(0,r.useState)(null),[G,Q]=(0,r.useState)(parseFloat(F.price)),[tt,et]=(0,r.useState)(parseFloat(F.compare_price)),[nt,ot]=(0,r.useState)(F.currency),[rt,lt]=(0,r.useState)(null),at=t.event,dt=t.productClickHandler,{whatmoreIsPreviewMode:st}=(0,r.useContext)(Z.I),[ct,ut]=(0,r.useState)(null);(0,r.useEffect)((()=>{(0,c.N8M)(y)&&(0,xt.Rb)(F,(0,c.Ipo)(y),y).then((t=>{T(t),Q(parseFloat(t.price)),et(parseFloat(t.compare_price)),ot(t.currency)}));(async()=>{const t=await(0,p.p)(F,(0,c.Ipo)(y),y);lt(t)})()}),[]),(0,r.useEffect)((()=>{var t,e;const n=null!=rt?null===rt||void 0===rt||null===(t=rt.options)||void 0===t?void 0:t.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"))})):-1,i=-1!==n?null===rt||void 0===rt||null===(e=rt.variants)||void 0===e?void 0:e.map((t=>{var e,i;const o=null===t||void 0===t?void 0:t[`option${n+1}`];return null!==t&&void 0!==t&&null!==(e=t.featured_image)&&void 0!==e&&e.src?{color:o,src:null===t||void 0===t||null===(i=t.featured_image)||void 0===i?void 0:i.src}:null})):[];let o=[];var r;-1!==n&&(o=null===rt||void 0===rt||null===(r=rt.images)||void 0===r?void 0:r.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc}))));ut({position:n,finalArr:i,finalArrExternal:o})}),[rt]);var gt=.68*I,ft=.55*gt,wt=.4*gt,jt=gt*(.55-.4),yt=gt+"px",Ct=wt+"px",St=jt+"px",bt=.12*wt;const It=(0,c.ITD)(y);function kt(){window.location.href=function(t){return(0,c.lj5)(y)?t.product_link+"?"+(0,c.awP)(y)+"&"+(0,c.n9s)(y)+"&"+(0,c.vaK)(y):t.product_link}(F)}const _t=P.landingLocationType,Ft=P.templateType,Tt=(0,mt.NY)(_t)+(0,mt.dS)(Ft)+"_"+(null===at||void 0===at?void 0:at.event_id);return(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:q,marginBottom:(0,c.pq5)(y),width:yt,height:"fit-content",boxShadow:"round"==E?"dark-lg":null,onClick:()=>{!function(t,e){v||m||(async()=>{(0,d.wz)(t,e)})(),"72550089015"==y?kt():dt(e),_(!0)}(at,F)},backgroundColor:(0,W.lA)("#ffffff",(0,c.U5_)(y)),animation:k?K.mT:null,borderRadius:"round"==E?"xl":null,overflow:"hidden",onAnimationEnd:()=>{_(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(y),borderColor:(0,c.qPe)(y)},children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,x.jsx)(s.xu,{height:Ct,width:Ct,bgColor:w,children:(0,x.jsx)(g.Ee,{width:Ct,height:Ct,src:(0,pt.s)(null!==(e=null!==(n=null===ct||void 0===ct||null===(i=ct.finalArr)||void 0===i||null===(o=i.find((t=>(null===t||void 0===t?void 0:t.color)==(null===X||void 0===X?void 0:X[null===ct||void 0===ct?void 0:ct.position]))))||void 0===o?void 0:o.src)&&void 0!==n?n:null===ct||void 0===ct||null===(l=ct.finalArrExternal)||void 0===l||null===(a=l.find((t=>(null===t||void 0===t?void 0:t.color)==(null===X||void 0===X?void 0:X[null===ct||void 0===ct?void 0:ct.position]))))||void 0===a?void 0:a.src)&&void 0!==e?e:F.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(y)+" !important"}})}),(0,x.jsxs)(s.xu,{height:Ct,width:gt-wt+"px",children:[(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:(0,c.Fr)(y)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"4px",paddingY:"10px",children:[(0,x.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",1.1*bt+"px","important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",j,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"),t.style.setProperty("padding","0","important"),t.style.setProperty("margin-bottom","4px","important"),t.style.setProperty("font-weight","normal","important"))},children:(0,B.s)(null==F.title?"":F.title.toString())}),(0,c.QaY)(y)?(0,x.jsxs)(s.Kq,{direction:(0,c.$zZ)(y)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",borderRadius:"round"==E?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"4px",sx:{margin:"0px !important",marginBottom:"4px !important"},children:[(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*bt*(0,c.Rqt)(y)+"px !important",fontWeight:"semibold !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:j+" !important",color:(0,c.Uyp)(y)+" !important",padding:"0px !important",letterSpacing:"normal !important",margin:"0px !important"},children:["\xa0"," "+(0,xt.jx)("10588815418"==y||"88566890817"==y?(null===rt||void 0===rt?void 0:rt.price)/100:G,"",y,nt)," \xa0"]}),(0,Y.B)(G,tt)?(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*bt*(0,c.Rqt)(y)+"px !important",fontWeight:"medium !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:j+" !important",color:(0,c.kPs)(y)+" !important",margin:"0px !important",letterSpacing:"normal !important",textDecoration:"line-through !important"},children:[" ",(0,xt.jx)("10588815418"==y||"88566890817"==y?(null===rt||void 0===rt?void 0:rt.compare_at_price)/100:tt,"",y,nt)]}):(0,x.jsx)(x.Fragment,{})]}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xv,{fontSize:.82*bt*(0,c.Rqt)(y)+"px",fontWeight:"medium",lineHeight:"110%",sx:{margin:"0px !important",fontFamily:j+" !important",color:(0,c.eod)(y)+" !important"},children:st?(0,c.qde)(y):(0,c.aTS)(y)})]}),(0,c.Fr)(y)?(0,x.jsx)(s.Kq,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,x.jsx)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:w,sx:{borderRadius:"round"==E?"5px":"0px",padding:"2px"},spacing:"0px",children:"1972174947"!=y?(0,x.jsx)(V.Z,{sx:{color:f,fontSize:1.3*bt+"px"}}):(0,x.jsx)(J.zx,{size:"sm",_hover:{bg:f},sx:{bg:f},children:(0,x.jsx)(s.xv,{color:"white",paddingX:"6px",fontSize:.8*bt+"px",children:"VIEW PRODUCT"})})}),(0,x.jsx)(s.xu,{width:"2px"})]})}):(0,x.jsx)(x.Fragment,{})]})]}),(0,x.jsx)(L.Rg,{unmountOnExit:!0,initialScale:.5,in:"awaitingVariantSelection"==O.state,style:{height:"fit-content",width:"100%"},children:"awaitingVariantSelection"==O.state&&null!=R?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",marginTop:.1*ft+"px",marginBottom:.1*ft+"px",overflowY:"auto",overflowX:"hidden",maxHeight:ft*It+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(vt,{width:yt,height:"fit-conten",event:at,product:F,finalArr:ct,data:rt,productVariantOptions:R,baseFontSize:1.2*bt,onOptionSelected:t=>{!function(t){$(t);const e=A(t);e&&(Q(e.price),et(e.compare_price))}(t)}})}):(0,x.jsx)(x.Fragment,{})}),(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:St,justifyContent:"center",alignItems:"center",children:(0,x.jsx)(it,{baseFontSize:.3*jt,event:at,product:F,cartState:O.state,cartCount:O.cart_count,updateCartState:z,onClickAtc:t=>{"init"==O.state?(M(Tt),(0,N.GF)({userInteractionType:H.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:P,event:at,productList:[F],ctaList:at.cta})):"awaitingVariantSelection"==O.state&&D(X,Tt)},onCartIconClick:()=>{U()}})})]})},ft=n(3867);var wt=function(t){var e,n,i;const[o]=(0,u.j1)("isInDesignMode"),[r]=(0,u.j1)("isDemoBrand"),[l]=(0,u.j1)("whatmoreSecondaryColor"),[a]=(0,u.j1)("whatmorePrimaryFont"),c=t.event,h=t.product,p=null!==(e=t.baseFontSize)&&void 0!==e?e:10,v=null!==(n=t.width)&&void 0!==n?n:"fit-content",m=null!==(i=t.height)&&void 0!==i?i:"fit-content";return(0,x.jsx)(s.rU,{href:h.product_link,color:l,onClick:()=>{!function(t,e){o||r||(async()=>{(0,d.$L)(t,e)})()}(c,h)},children:(0,x.jsx)(s.xu,{width:v,height:m,padding:"2x",boxShadow:"lg",borderRadius:"md",backgroundColor:"white",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",spacing:"5px",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{lineHeight:"100%",fontSize:1.4*p,fontWeight:"semibold",sx:{fontFamily:a+" !important",color:l+" !important"},children:" VIEW MORE "})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(V.Z,{sx:{color:l,fontSize:1.4*p}})})]})})})},jt=n(6163);function yt(t){var e;const[n]=(0,u.j1)("whatmoreSecondaryColor"),[i]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),[l,a]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),h=t.onClick,p=t.width,v=t.height,m=t.title;return(0,x.jsx)(s.xu,{width:p,height:v,padding:"2x",boxShadow:"lg",backgroundColor:n,onClick:t=>{t.stopPropagation(),h(),a(!0)},animation:l?K.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:(0,x.jsxs)(s.xv,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},lineHeight:"100%",fontSize:1.4*d+"px",fontWeight:"semibold",sx:{fontFamily:i+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",m,"\xa0"]})})})}var Ct=function(t){var e,n,i;const[o]=(0,u.j1)("whatmoreShopId"),r=t.event,l=t.product,a=null!==(e=t.baseFontSize)&&void 0!==e?e:10,d=t.onShopNowClick,s=null!==(n=t.width)&&void 0!==n?n:"100%",h=null!==(i=t.height)&&void 0!==i?i:"100%";return(0,x.jsx)(yt,{onClick:function(){d()},event:r,product:l,baseFontSize:a,width:s,height:h,title:(0,c.Pvx)(o)})};var St=function(t){var e;const[n]=(0,u.j1)("isInDesignMode"),[i]=(0,u.j1)("isDemoBrand"),[o]=(0,u.j1)("whatmorePrimaryFont"),[l]=(0,u.j1)("whatmoreShopId"),[a,p,v,m]=(0,h.Z)(),[f,w]=(0,r.useState)(!1),[j,y]=(0,r.useState)(t.product),{whatmoreWidgetSourceDetails:C}=(0,r.useContext)(Z.I),[S,b,I,k,_,F,T]=ht(0,j,t.event),[E,P]=(0,r.useState)(null),[O,z]=(0,r.useState)(parseFloat(j.price)),[R,M]=(0,r.useState)(parseFloat(j.compare_price)),[D,A]=(0,r.useState)(j.currency),W=t.event,U=t.productClickHandler,V=null!==(e=t.tileWidthFactor)&&void 0!==e?e:1,X=C.landingLocationType,$=C.templateType,G=(0,mt.NY)(X)+(0,mt.dS)($)+"_"+(null===W||void 0===W?void 0:W.event_id);(0,r.useEffect)((()=>{(0,c.N8M)(l)&&(0,xt.Rb)(j,brandDomainContext(l),l).then((t=>{y(t),z(parseFloat(t.price)),M(parseFloat(t.compare_price)),A(t.currency)}))}),[]);var J=m*V,Q=.3*J,tt=J+"px",et=.7*Q,nt=.9*et,ot=.12*Q;const rt=(0,c.ITD)(l);function lt(t,e){n||i||(async()=>{(0,d.wz)(t,e)})(),U(e),w(!0)}return(0,x.jsx)(s.Kq,{direction:"row",width:tt,height:"fit-content",justifyContent:"center",children:(0,x.jsx)(s.xu,{marginTop:q,marginBottom:(0,c.pq5)(l),width:tt,onClick:t=>{},animation:f?K.mT:null,borderRadius:"lg",onAnimationEnd:()=>{w(!1)},children:(0,x.jsxs)(s.Kq,{direction:"column",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",spacing:"0px",children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"70%",justifyContent:"space-around",alignItems:"center",borderTopRadius:"lg",overflow:"hidden",onClick:()=>{lt(W,j)},children:[(0,x.jsx)(s.xu,{height:et+"px",width:et+"px",children:(0,x.jsx)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",children:(0,x.jsx)(s.xu,{height:nt+"px",width:nt+"px",borderRadius:"lg",bgColor:"gray.100",overflow:"hidden",children:(0,x.jsx)(g.Ee,{width:nt+"px",height:nt+"px",src:j.thumbnail_image,objectFit:"cover"})})})}),(0,x.jsx)(s.xu,{height:et+"px",width:J-et+"px",children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"space-between",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingY:"10px",spacing:"2px",children:[(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*ot+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:o+" !important",color:"white !important"},children:(0,B.s)(j.title.toString())}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",aligntItems:"center",marginTop:"5px",children:[(0,c.QaY)(l)?(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"flex-start",aligntItems:"center",borderRadius:"lg",backgroundColor:"blackAlpha.500",paddingX:"10px",paddingY:"5px",children:[(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:1*ot+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:o+" !important",color:"white !important"},children:["\xa0"," ",(0,xt.jx)(parseFloat(O),"",l,D)," \xa0"]}),(0,x.jsx)(s.M5,{children:(0,Y.B)(j.price,j.compare_price)?(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.8*ot+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:o+" !important",color:"#F9F6EE !important",textDecoration:"line-through !important"},children:[" ",(0,xt.jx)(parseFloat(R),"",l,D)]}):(0,x.jsx)(x.Fragment,{})})]}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(ft.Z,{storeId:l,productId:j.client_product_id,productLink:j.product_link,fontSize:1*ot,fontColor:"white"})})]})]})})]}),(0,x.jsx)(L.Rg,{unmountOnExit:!0,initialScale:.5,in:"awaitingVariantSelection"==S.state,style:{height:"fit-content",width:"100%"},children:"awaitingVariantSelection"==S.state&&null!=I?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",marginTop:.1*Q+"px",marginBottom:.1*Q+"px",overflowY:"auto",overflowX:"hidden",maxHeight:Q*rt+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(vt,{width:tt,height:"fit-content",event:W,product:j,productVariantOptions:I,baseFontSize:1*ot,onOptionSelected:t=>{!function(t){P(t);const e=F(t);e&&(z(e.price),M(e.compare_price))}(t)},optionTitleColor:"white"})}):(0,x.jsx)(x.Fragment,{})}),(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"30%",justifyContent:"center",alignItems:"center",paddingBottom:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,x.jsx)(s.xu,{width:"100%",height:"100%",children:(0,x.jsx)(wt,{baseFontSize:.8*ot,event:W,product:j,width:"100%",height:"100%"})}),(0,x.jsx)(s.xu,{width:"100%",height:"100%",borderRadius:"md",overflow:"hidden",children:(0,c.Ib9)(l)?(0,x.jsx)(Ct,{baseFontSize:.8*ot,event:W,product:j,borderRadius:"md",onShopNowClick:t=>{lt(W,j)}}):(0,x.jsx)(x.Fragment,{children:"form"===(0,c._5p)(l)?(0,x.jsx)(jt.default,{baseFontSize:.8*ot,event:W,product:j,width:"100%",height:"100%",showAddedToCart:!0}):(0,x.jsx)(it,{baseFontSize:.8*ot,event:W,product:j,cartState:S.state,cartCount:S.cart_count,borderRadius:"md",onClickAtc:t=>{"init"==S.state?(k(G),(0,N.GF)({userInteractionType:H.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:C,event:W,productList:[j],ctaList:W.cta})):"awaitingVariantSelection"==S.state&&_(E,G)},onCartIconClick:()=>{T()}})})})]})]})})})};var bt=function(t){const[e]=(0,u.j1)("isInDesignMode"),[n]=(0,u.j1)("isDemoBrand"),[i]=(0,u.j1)("whatmoreSecondaryColor"),o=(0,u.MO)("whatmoreSecondaryColorShade900"),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[p,v,m,f]=(0,h.Z)(),[w,j]=(0,r.useState)(!1),[y,C]=(0,r.useState)(t.product),{whatmoreUITheme:S}=(0,r.useContext)(Z.I),[b,I]=(0,r.useState)(!(0,c.N8M)(a)),[k,_]=(0,r.useState)(parseFloat(y.price)),[F,T]=(0,r.useState)(parseFloat(y.compare_price)),[E,P]=(0,r.useState)(y.currency),O=t.event;t.productClickHandler,(0,r.useEffect)((()=>{(0,c.N8M)(a)&&(0,xt.Rb)(y,(0,c.Ipo)(a),a).then((t=>{C(t),_(parseFloat(t.price)),T(parseFloat(t.compare_price)),P(t.currency),I(!0)}))}),[]);var L=.68*f,z=.4*L,R=L+"px",M=z+"px",D=L*(.55-.4)+"px",A=.12*z;(0,c.ITD)(a);const{whatmoreWidgetSourceDetails:U}=(0,r.useContext)(Z.I);function X(t){return(0,c.lj5)(a)?t.product_link+"?"+(0,c.awP)(a)+"&"+(0,c.n9s)(a)+"&"+(0,c.vaK)(a):t.product_link}function $(t,i){e||n||(async()=>{(0,d.wz)(t,i),(0,N.GF)({userInteractionType:H.K.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:U,event:t,productList:[i],ctaList:t.cta})})(),j(!0)}return(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:q,marginBottom:(0,c.pq5)(a),width:R,height:"fit-content",boxShadow:"round"==S?"dark-lg":null,onClick:()=>{$(O,y),window.location.href=X(y)},backgroundColor:(0,W.lA)("#ffffff",(0,c.U5_)(a)),animation:w?K.mT:null,borderRadius:"round"==S?"xl":null,overflow:"hidden",onAnimationEnd:()=>{j(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(a),borderColor:(0,c.qPe)(a)},children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,x.jsx)(s.xu,{height:M,width:M,bgColor:o,children:(0,x.jsx)(g.Ee,{width:M,height:M,src:(0,pt.s)(y.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(a)+" !important"}})}),(0,x.jsxs)(s.xu,{height:M,width:L-z+"px",children:[(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:(0,c.Fr)(a)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingTop:"10px",paddingBottom:"16px",children:[(0,x.jsx)(s.xv,{as:"p",ref:t=>{t&&(t.style.setProperty("min-height","0","important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("-webkit-box-orient","vertical","important"))},sx:{paddingLeft:"8px",fontFamily:l+" !important",color:"black !important",lineHeight:"120% !important",fontWeight:"medium !important",fontSize:1.1*A+"px !important"},children:(0,B.s)(null==y.title?"":y.title.toString())}),(0,c.QaY)(a)?(0,x.jsxs)(s.Kq,{direction:(0,c.$zZ)(a)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",marginTop:"5px",borderRadius:"round"==S?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"5px",children:[b&&(0,x.jsxs)(s.xv,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},noOfLines:1,fontSize:.9*A+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:l+" !important",color:(0,c.Uyp)(a)+" !important",margin:"0px !important"},children:[" "+(0,xt.jx)(k,"",a,E)," \xa0"]}),(0,Y.B)(k,F)&&b?(0,x.jsxs)(s.xv,{as:"s",style:{minHeight:0,textDecoration:"line-through"},noOfLines:1,fontSize:.9*A+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:l+" !important",color:(0,c.kPs)(a)+" !important",margin:"0px !important"},children:[" ",(0,xt.jx)(F,"",a,E)]}):(0,x.jsx)(x.Fragment,{})]}):(0,x.jsx)(x.Fragment,{}),""!=(0,c.sG7)(a)&&(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*A+"px",lineHeight:"100%",paddingTop:"6px",sx:{fontFamily:(0,c.V3Y)(a)+" !important",color:(0,c.aUT)(a)+" !important",margin:"0px !important"},children:["\xa0",(0,c.sG7)(a)," \xa0"]})]}),(0,c.Fr)(a)?(0,x.jsx)(s.Kq,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,x.jsx)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:o,sx:{borderRadius:"round"==S?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,x.jsx)(V.Z,{sx:{color:i,fontSize:1.3*A+"px"}})}),(0,x.jsx)(s.xu,{width:"2px"})]})}):(0,x.jsx)(x.Fragment,{})]})]}),(0,c.pp3)(a)&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:D,justifyContent:"center",alignItems:"center",children:(0,x.jsx)(Ct,{baseFontSize:.8*A,event:O,product:y,borderRadius:"md",onShopNowClick:t=>{$(O,y),window.location.href=X(y)}})})]})};var It=function(t){const[e]=(0,u.j1)("whatmoreShopId"),n=(0,c.eyg)(e),i=t.event,o=t.product;return"broad-tile"==n?(0,x.jsx)(gt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile-no-cta"==n?(0,x.jsx)(bt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"link_only"==n?(0,x.jsx)(U,{product:t.product,event:t.event}):"narrow-tile"==n?(0,x.jsx)(St,{event:i,product:o,productClickHandler:t.productClickHandler,tileWidthFactor:i.products.length>1?.68:void 0}):(0,x.jsx)(gt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler})},kt=n(6119),_t=n(3388),Ft=n(7643);var Tt=function(t){const[e,n,i,o]=(0,h.Z)(),[r]=(0,u.j1)("whatmoreShopId"),d=(0,u.MO)("isInDesignMode"),p=(0,u.MO)("isDemoBrand"),v=t.event,m=t.productClickHandler,g=(0,c.eyg)(r);if(!(0,_t.kT)(v))return(0,x.jsx)(x.Fragment,{});if(1==v.products.length&&(void 0==v.cta||0==v.cta.length)){const t=v.products[0];return(0,c.rnv)(r)?(0,x.jsx)(s.Kq,{direction:"horizontal",width:o,height:"fit-content",justifyContent:"center",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))",children:(0,x.jsx)(Ft.u,{userInteractionType:H.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(St,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})}):(0,x.jsx)(s.Kq,{direction:"horizontal",width:o,height:"fit-content",justifyContent:"center",backgroundImage:"narrow-tile"==g?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))":null,children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(Ft.u,{userInteractionType:H.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(It,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})})}return(0,x.jsx)(s.M5,{children:(0,x.jsx)("div",{onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(s.xu,{width:o+"px",backgroundImage:"narrow-tile"==g?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))":null,children:(0,x.jsxs)(l.tq,{className:"product-tile swiper-slide",slidesPerView:1==v.products.length?1:1.4,initialSlide:v.products.length<=2||(0,c.VqZ)(r)?0:1,centeredSlides:!(0,c.VqZ)(r),modules:[a.Gk],mousewheel:{invert:!1,thresholdDelta:20},nested:!0,children:[v.products.map((t=>"oos"!=t.product_status&&(0,x.jsx)(l.o5,{children:(0,x.jsx)(Ft.u,{userInteractionType:H.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(s.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",alignItems:"center",children:(0,x.jsx)(It,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})},v.event_id+t.product_id))),(0,c.pp3)(r)&&void 0!=v.cta&&v.cta.map((t=>(0,x.jsx)(x.Fragment,{children:""!==t.cta_title.trim()&&(0,x.jsx)(l.o5,{children:(0,x.jsx)(s.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",alignItems:"center",children:(0,x.jsx)(kt.Z,{cta:t},v.event_id+t.cta_id)})},v.event_id+t.cta_id)})))]})})})})};var Et=function(t){const[e,n]=(0,u.j1)("isProductSwiperCatalogOpen"),i=t.event,o=t.productClickHandler;return(0,r.useContext)(ln).isIOS&&e?(0,x.jsx)(Tt,{event:i,productClickHandler:o},i.event_id):(0,x.jsx)(L.MT,{unmountOnExit:!0,initialScale:.2,in:e,children:(0,x.jsx)(Tt,{event:i,productClickHandler:o},i.event_id)})};function Pt(t){const e=t.event,[n,i,o,r]=(0,h.Z)(),[l]=(0,u.j1)("whatmorePrimaryFont");return(0,x.jsx)(s.xu,{width:"fit-content",height:"fit-content",padding:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{overflow:"hidden",size:.15*r+"px",children:(0,x.jsx)(g.Ee,{width:"100%",height:"100%",src:e.thumbnail_image})})}),(0,x.jsx)(s.xu,{width:"fit-content",height:"fit-content",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"fit-content",height:"fit-content",children:[(0,x.jsx)(s.xv,{color:"white",fontSize:.05*r+"px",fontWeight:"bold",fontFamily:"sans-serif",align:"left",sx:{fontFamily:l+" !important"},children:e.presenter_name.substring(0,15)}),(0,x.jsx)(E.Z,{event:e,fontSize:.03*r+"px"})]})})]})})}var Ot=function(t){const[e]=(0,u.j1)("isInDesignMode"),[n]=(0,u.j1)("isDemoBrand"),[i,o]=(0,u.j1)("isProductSwiperCatalogOpen"),[l,a]=(0,j.Z)(),[d,h]=(0,u.j1)("isFirstIndicatorRenderDone"),p=(0,r.useContext)(ln),[v]=(0,u.j1)("whatmoreShopId"),m=t.event,g=t.isLast,f=t.onCloseCallback,w=t.focusRef,C=t.productClickHandler;return(0,x.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,x.jsx)(s.xu,{width:"full",margin:"2px",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"space-between",paddingRight:"10px",paddingLeft:"10px",children:[(0,x.jsx)(Pt,{event:m}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,x.jsx)(y,{focusRef:w}),(0,x.jsx)(O,{event:m,onCloseCallback:f})]})]})}),(0,x.jsx)(s.xu,{width:"100%",height:"100%",onClick:()=>{a(!l)}}),(0,x.jsxs)(s.xu,{width:"full",height:"fit-content",children:[p.totalEvents>1&&!d&&p.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:!g})})}):null,void 0!=m.products&&m.products.length>0?(0,x.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(v)?(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:m,onToggle:t=>{o("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:m,productClickHandler:C})})]}):(0,x.jsx)("div",{})]})]})})};function Lt(t){const[e,n,i,o]=(0,h.Z)(),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d,p]=(0,r.useState)(""),v=t.data,m=(t.event,t.product,t.setShowOptionsChart);var f=.4*o*.8*.13;(0,r.useEffect)((()=>{let t="vanyaclothing.myshopify.com";"1972174947"===a&&(t="vanyaclothing.myshopify.com");const e=`https://app.kiwisizing.com/api/getSizingChart?shop=${t}&product=${null===v||void 0===v?void 0:v.id}&title=${null===v||void 0===v?void 0:v.title}&tags=&cacheSettingsUpdateAt=2020-08-11T15%3A19%3A49.000Z&settingsVersion=19`;fetch(e).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>{var e,n,i,o,r,l;p(null===t||void 0===t||null===(e=t.sizings)||void 0===e||null===(n=e[0])||void 0===n||null===(i=n.layout)||void 0===i||null===(o=i.data)||void 0===o||null===(r=o[0])||void 0===r||null===(l=r.data)||void 0===l?void 0:l.url)})).catch((t=>{console.error("Error fetching data:",t)}))}),[]);const w=`${S.F4`
69
69
  0% {
70
70
  transform: translateY(100%);
71
71
  }