whatmore-react-assets 1.0.1803 → 1.0.1804
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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[262,485,939],{22:function(t,e,o){o.d(e,{$S:function(){return s},_:function(){return n},b4:function(){return r},dl:function(){return i},nN:function(){return d},tn:function(){return l},vF:function(){return a}});const n="device_type",i="device_mode",r="mobile",a="tablet",s="desktop",l="portrait",d="landscape"},932:function(t,e,o){var n=o(5830),i=o(1941),r=o(22),a=o(1348);e.A=function(t){const[e,o,s]=(0,i.A)(),[l]=(0,n.QN)("whatmoreLandscapePadding"),[d]=(0,n.QN)("whatmoreShopId"),[c]=(0,n.QN)("whatmoreVideoTileSize"),[u]=(0,n.QN)("whatmoreVideoTileSizePortrait"),p=s>o,h="portrait"==e?u:c,f=!("portrait"!=e||!(s>=481)),m=h/100*1.3*.5,y=h/100;var v=Math.min(s,o),[x,g,w,b]=[.6*v*(16/9),.6*v,1.4,0];function j(t){return Math.round(10*t)/10}var S={DEVICE_TYPE:r.b4,DEVICE_MODE:r.tn};if(p){const t=g*m,e=x*m;[x,g,w,b]=[e,t,(s-2*l-2*(0,a.$du)(d))/(1.1*t),l],S[r._]=r.$S,S[r.dl]=r.nN}else if(f){var C=.8*g,P=.8*x;"portrait"==e?(C*=y,P*=y,[x,g,w,b]=[P,C,j(s/(1.2*C)),0],S[r._]=r.vF,S[r.dl]=r.tn):([x,g,w,b]=[P,C,(s-2*l)/(1.1*C),l],S[r._]=r.vF,S[r.dl]=r.nN)}else{C=g,P=x;"portrait"==e?(C=C*y*.9,P=P*y*.9,[x,g,w,b]=[P,C,j(s/(1.15*C)),0],S[r._]=r.b4,S[r.dl]=r.tn):(C=.7*g,P=.7*x,[x,g,w,b]=[P,C,(s-2*l)/(1.1*C),l],S[r._]=r.b4,S[r.dl]=r.nN)}return[x,g,w,b,S]}},2835:function(t,e,o){var n=o(7891),i=o(8454),r=o(3781),a=o(5830),s=o(4414);e.A=function(t){var e;const o=(0,a.Xd)("whatmoreUITheme"),[l]=(0,a.QN)("whatmoreSecondaryColor"),[d,c]=(0,a.QN)("productRatings"),u=(0,a.Xd)("whatmorePrimaryFont"),p=t.productId,h=t.fontSize,f=null!==(e=t.fontColor)&&void 0!==e?e:"gray";if(null===d||"undefined"==typeof d||!(p in d)||d[p].avgRating>5)return(0,s.jsx)(s.Fragment,{});const m=d[p].avgRating,y=d[p].totalRatings;return(0,s.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,s.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center",gap:"0px"},children:[[...Array(Math.floor(m))].map((t,e)=>(0,s.jsx)(n.A,{sx:{color:l,fontSize:h+"px"}},"star-icon"+e)),m-Math.floor(m)>.2?(0,s.jsx)(i.A,{sx:{color:l,fontSize:h+"px"}},"star-half-icon"):m-Math.floor(m)==0?(0,s.jsx)(s.Fragment,{}):(0,s.jsx)(r.A,{sx:{color:l,fontSize:h+"px"}},"star-outline-icon"),[...Array(Math.floor(5-m))].map((t,e)=>(0,s.jsx)(r.A,{sx:{color:l,fontSize:h+"px"}},"star-outline-icon-"+e)),(0,s.jsx)("div",{children:(0,s.jsx)("div",{width:"2px"})}),(0,s.jsx)("div",{children:(0,s.jsx)("div",{style:{backgroundColor:l,borderRadius:"round"==o?"2px":"0px",padding:"1px",overflow:"hidden"},children:(0,s.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color","white","important"),t.style.setProperty("font-size",.8*h+"px","important"),t.style.setProperty("font-family",u,"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"))},style:{textAlign:"left",fontWeight:"medium"},children:["\xa0",m,"\xa0"]})})}),(0,s.jsx)("div",{children:(0,s.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color",f,"important"),t.style.setProperty("font-size",.8*h+"px","important"),t.style.setProperty("font-family",u,"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"))},style:{textAlign:"left",fontWeight:"medium"},children:["\xa0","("+y+")"]})})]})})}},3161:function(t,e,o){function n(t){if(!t)return"";return(new DOMParser).parseFromString(t,"text/html").body.textContent||""}o.d(e,{$:function(){return n}})},3262:function(t,e,o){o.r(e),o.d(e,{initiateCartSliderEvent:function(){return r}});var n=o(5830),i=o(1745);const r=async function(t,e,o,r,a="",s="",l="",d="",c="",u=""){(0,n.Xd)("whatmoreLandingLocationType");if("STRNV8MHJTF"==t||"STR6HU283UZ"==t||"STR9T3LLEJB"==t||"STRWJMIOJNX"==t||"STRUDQ36YAC"==t||"STR1D5ONOZX"==t){console.log("Executing cart refresh script..");return void(document.getElementById("whatsmorecart").value=Math.random())}if("22907887"===t){async function w(t,e=1){const o=new FormData;o.append("id",t),o.append("quantity",e.toString());const n=document.querySelector("cart-notification, cart-drawer");if(n){const t=n.getSectionsToRender();o.append("sections",t.map(t=>t.id).join(","))}o.append("sections_url",window.location.pathname);const i=await fetch("/cart/add.js",{method:"POST",body:o});if(!i.ok){const t=await i.text();throw new Error(`Failed to add to cart: ${t}`)}const r=await i.json();return n&&n.renderContents&&n.renderContents(r),document.body.classList.remove("overflow-hidden"),document.querySelectorAll(".atc-container.active, .atc-variant-container.active, .pdp-atc-container.active").forEach(t=>t.classList.remove("active")),window.dispatchEvent(new CustomEvent("cart:added",{detail:{variantId:t,quantity:e,data:r}})),r}return w(a).then(t=>{setTimeout(()=>{y(a)},500)}).catch(t=>{console.error("Error:",t)}),void setTimeout(e,o)}if("28575536"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:a,quantity:1})}).then(t=>{if(!t.ok)throw new Error("Add to cart failed");return t.json()}).then(t=>{"function"===typeof window.handleFloCartBtn&&window.handleFloCartBtn(),setTimeout(()=>{y(a)},500)}).catch(t=>console.error("[Whatmore] Ripped Up Nutrition ATC error:",t)),void setTimeout(e,o);if("58692075703"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:a,quantity:1})}).then(t=>{if(!t.ok)throw new Error("Add to cart failed");return t.json()}).then(t=>{"function"===typeof window.openGokwikSideCart&&window.openGokwikSideCart(),setTimeout(()=>{y(a)},500)}).catch(t=>console.error("[Whatmore] Lakshita ATC error:",t)),void setTimeout(e,o);if("22907887"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:a,quantity:1})}).then(t=>t.json()).then(t=>{setTimeout(()=>{y(a)},500)}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("56444977250"===t){const b=document.querySelector('button[data-pf-type="ProductATC2"]');return b?(s&&b.setAttribute("data-product-id",s),b.click(),setTimeout(()=>{(0,i.js)().then(t=>t.json()).then(t=>{const e=t.items.find(t=>String(t.id)===String(a));if(e){const t=e.key,o=e.quantity,n=e.properties;(0,i.CP)(t,o,n,l,d,c,!0,!0,!0)}})},500),void setTimeout(e,o)):(fetch(null===u||void 0===u||null===(p=u.split("?"))||void 0===p?void 0:p[0]).then(t=>t.text()).then(t=>{const e=(new DOMParser).parseFromString(t,"text/html").querySelector('button[data-pf-type="ProductATC2"]');e&&s&&e.setAttribute("data-product-id",s)}),void setTimeout(e,o));var p}if("64379584700"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:a,quantity:1})}).then(t=>t.json()).then(t=>fetch("/cart.js")).then(t=>t.json()).then(t=>{$(".paira-cart-item-count").text(t.item_count),$(".paira-cartEmpty").hide(),$(".paira-cartNotEmpty").show(),$(".paira-cart-total-price .money").text("Rs. "+t.total_price/100),$(".cart-drop").addClass("open"),$(".cart-icon").trigger("mouseenter"),setTimeout(()=>{y(a)},500)}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("76767920441"===t)return fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:a,quantity:1})}).then(t=>t.json()).then(t=>{"function"===typeof window.openGokwikSideCart&&window.openGokwikSideCart(),setTimeout(()=>{y(a)},500)}).catch(t=>console.error("Add to cart error:",t)),void setTimeout(e,o);if("70840582336"===t){const j=a,S=1,C=document.querySelector('product-form form.product-form, form[action*="/cart/add"]');if(C){let P=C.querySelector('input[name="id"]');P||(P=document.createElement("input"),P.type="hidden",P.name="id",C.appendChild(P)),P.disabled=!1,P.value=j;const T=C.querySelector('input[name="quantity"]');T&&(T.value=S);const M=C.querySelector('button[data-add-to-cart], button[type="submit"]');return M?(M.dispatchEvent(new MouseEvent("pointerdown",{bubbles:!0})),M.click(),M.dispatchEvent(new MouseEvent("pointerup",{bubbles:!0}))):console.warn("[ATC] button not found"),setTimeout(()=>{y(j)},500),void setTimeout(e,o)}return void fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({id:j,quantity:S}),credentials:"same-origin"}).then(()=>{setTimeout(()=>{y(j)},500),setTimeout(e,o)}).catch(t=>{console.error("[ATC] error for 70840582336:",t),setTimeout(e,o)})}if("64683278550"===t){try{const k=document.querySelector('form[action="/cart/add"]');if(!k)return console.warn("[ATC 64683278550] form not found"),void setTimeout(e,o);const A=k.querySelector('input[name="id"]');if(!A)return console.warn("[ATC 64683278550] id input not found"),void setTimeout(e,o);A.value=a;const N=k.querySelector('button[type="submit"]');if(!N)return console.warn("[ATC 64683278550] submit button not found"),void setTimeout(e,o);N.click(),setTimeout(()=>{y(a)},500),setTimeout(e,o)}catch(g){console.error("[ATC 64683278550] error:",g),setTimeout(e,o)}return}const h=e=>{if("61126934766"==t){let t=e.querySelector(".productView-buttons").querySelector('form[action*="/cart/add"]');if(t)return t}let o=Array.from(e.querySelectorAll("product-form")).find(t=>t.querySelector('form > input[name="id"]')&&t.querySelector('form button[type="submit"]'));return o||(o=Array.from(e.querySelectorAll('form[action*="/cart/add"]')).find(t=>t.querySelector('button[type="submit"]'))),o},f=(e,o,n)=>{const i=e.cloneNode(!0);if(i){i.hasAttribute("data-product-variant-id")&&i.setAttribute("data-product-variant-id",o),i.hasAttribute("data-product-id")&&i.setAttribute("data-product-id",n);let e=i.querySelector('input[name="id"]');if(e)e.setAttribute("value",o),e.hasAttribute("disabled")&&e.removeAttribute("disabled");else{const t=i.querySelector('select[name="id"]');if(t){const e=t.querySelector('option[selected="selected"]');e&&e.setAttribute("value",o)}}const r=i.querySelector('input[name="product-id"]');r&&r.setAttribute("value",n);const a=document.createElement("div");return a.className="whatmore-atc",a.appendChild(i),document.body.appendChild(a),console.log(a,"formElement"),"92319318403"===t&&((t,e,o)=>{var n;const i=null!==(n=t.matches)&&void 0!==n&&n.call(t,"form")?t:t.querySelector("form");if(!i)return;let r=i.querySelector('input[name="id"]');r||(r=document.createElement("input"),r.type="hidden",r.name="id",i.prepend(r)),r.value=String(e),r.removeAttribute("disabled");const a=i.querySelector('select[name="id"]');a&&([...a.options].some(t=>t.value===String(e))?(a.value=String(e),[...a.options].forEach(t=>t.selected=t.value===String(e)),a.dispatchEvent(new Event("change",{bubbles:!0}))):a.removeAttribute("name"));const s=i.querySelector('input[name="product-id"]');s&&(s.value=String(o))})(a,o,n),a}},m=t=>{const e=null===t||void 0===t?void 0:t.querySelector('button[type="submit"]');e&&e.click()},y=t=>{(0,i.js)().then(t=>t.json()).then(e=>{const o=e.items.find(e=>e.id==t),n=o.key,r=o.quantity,a=o.properties;(0,i.CP)(n,r,a,l,d,c,!0,!0,!0)})},v=h(document);if(v||(null===v||void 0===v?void 0:v.length)>0){const I=f(v,a,s);m(I),setTimeout(()=>{y(a)},500),I.remove()}else{var x;fetch(null===u||void 0===u||null===(x=u.split("?"))||void 0===x?void 0:x[0]).then(t=>t.text()).then(t=>{const e=(new DOMParser).parseFromString(t,"text/html"),o=h(e);if(o||(null===o||void 0===o?void 0:o.length)>0){const t=f(o,a,s);m(t),setTimeout(()=>{y(a)},500),t.remove()}})}setTimeout(e,o)}},3997:function(){},4063:function(t,e,o){var n=o(9950),i=o(3731),r=o(3247),a=o(5830),s=o(5144),l=o(4414);e.A=function(t){var e,o;const[d,c]=(0,n.useState)(!1),[u,p]=(0,n.useState)(!1),[h]=(0,a.QN)("whatmoreSecondaryColor"),[f]=(0,a.QN)("whatmoreSecondaryColorShade600"),[m]=(0,a.QN)("whatmoreSecondaryColorShade300"),[y]=(0,a.QN)("whatmorePrimaryFont"),v=t.onClick,x=t.icon,g=null!==(e=t.borderRadius)&&void 0!==e?e:"sm",w=null!==(o=t.baseFontSize)&&void 0!==o?o:12;return(0,l.jsxs)(r.az,{display:"flex",alignItems:"center",width:"fit-content",height:"fit-content",boxShadow:"lg",borderRadius:g,backgroundColor:d?m:h,animation:u?s.jd:null,padding:"6px 12px",cursor:"pointer",gap:"6px",onClick:t=>{t.stopPropagation(),p(!0),v()},onMouseEnter:()=>{c(!0)},onMouseLeave:()=>{c(!1)},children:[(0,l.jsx)(i.E,{fontSize:w+"px !important",fontWeight:"normal",sx:{fontFamily:y+" !important",color:"white !important"},children:"VIEW MORE"}),x]})}},4365:function(){},4431:function(t,e,o){o.r(e),o.d(e,{default:function(){return B}});var n=o(9950),i=(o(4826),o(340)),r=o(5873),a=o(5089),s=(o(3997),o(4669),o(9733),o(4365),o(7229),o(572)),l=o(8603),d=o(932),c=o(1941),u=o(5491),p=o.n(u),h=o(5830),f=o(7509),m=o(7136),y=o(1348),v=o(5551),x=o(1351),g=o(6157),w=o(9879),b=o(6663),j=o(8538),S=o(6594),C=o(22),P=o(6613),T=o(8149),M=o(7740),k=o(7035),A=o(6305),N=o(4833),I=o(4533),E=o(63),_=o(7973),O=o(4414);var R=function({productList:t,firstAvailableProduct:e,setFirstAvailableProduct:o,tileWidth:n}){const i=.06*n,r=i+"px",[a]=(0,h.QN)("whatmorePrimaryFont");return(0,O.jsxs)("div",{onClick:t=>{t.stopPropagation()},style:{display:"flex",flexDirection:"column",borderTopLeftRadius:"12px",borderTopRightRadius:"12px",backgroundColor:"#fff",height:"fit-content",padding:"14px",boxShadow:"0px 0px 6px 0px rgba(0, 0, 0, 0.7)"},children:[(0,O.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-size",r,"important"),t.style.setProperty("font-weight","600","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"))},children:"Select Product"}),(0,O.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"4px",paddingTop:"8px",maxHeight:.9*n,overflowY:"auto",paddingBottom:"12px"},children:t.map((t,n)=>(0,O.jsxs)("div",{onClick:e=>{e.stopPropagation(),(t=>{o(t)})(t)},style:{WebkitTapHighlightColor:"transparent",cursor:"pointer",padding:"8px",display:"flex",alignItems:"center",gap:"8px",borderRadius:"6px",backgroundColor:(null===e||void 0===e?void 0:e.client_product_id)==(null===t||void 0===t?void 0:t.client_product_id)?"#f0f0f0":"white",border:(null===e||void 0===e?void 0:e.client_product_id)==(null===t||void 0===t?void 0:t.client_product_id)?"1px solid #343434":"none"},children:[(0,O.jsx)("img",{src:(0,_.b)(null===t||void 0===t?void 0:t.thumbnail_image),alt:null===t||void 0===t?void 0:t.title,style:{width:2*i,height:2*i}}),(0,O.jsx)("p",{style:{fontSize:.8*i+"px",fontFamily:a,textTransform:"uppercase",backgroundColor:"inherit"},children:null===t||void 0===t?void 0:t.title})]},n))})]})};var F=function(t){var e,o,i,r,a,s,l,c,u,p,m,F,L,X,q,z,D,W,$,B,Y,U,H,Q;const[V,J,G,K,Z]=(0,d.A)(),tt=(0,h.Xd)("whatmoreShopId"),et=(0,h.Xd)("whatmoreLandingLocationType"),ot="portrait"===Z[C.dl],nt=ot?1.076*J*(0,y.HWj)(tt):J*(0,y.N_4)(tt),it=nt+"px",rt=(ot?1.076*J*(0,y.HWj)(tt):J*(0,y.N_4)(tt))+"px",at=(ot?.965*J*(0,y.HWj)(tt):.859*J*(0,y.N_4)(tt))+"px",[st,lt]=(0,n.useState)(t.event),[dt,ct]=(0,n.useState)(!1),ut=(0,h.Xd)("whatmoreSecondaryColor"),pt=(0,h.Xd)("whatmoreProductId");var ht=(0,n.useContext)(f.h);const ft=null===(e=t.isOnFocus)||void 0===e||e,mt=null!==(o=t.playOnUnfocus)&&void 0!==o&&o,yt=t.onClick,vt=(0,h.Xd)("whatmoreUITheme"),xt=(0,h.Xd)("websiteLanguage"),gt=null!==(i=t.animateOnFocus&&(0,y.n5O)(tt))&&void 0!==i&&i,[wt,bt]=(0,n.useState)(!1),jt=(0,h.Xd)("whatmorePrimaryFont"),[St,Ct]=(0,n.useState)(null!==(r=null===(a=st.products)||void 0===a?void 0:a.find(t=>"active"==t.product_status))&&void 0!==r?r:null===(s=st.products)||void 0===s?void 0:s[0]),Pt=St&&Object.keys(St).length>0;let Tt,Mt,kt;if("6573064236"===tt&&Pt){const t=parseFloat(null===St||void 0===St?void 0:St.price);Mt=t;const e=(null===St||void 0===St?void 0:St.product_link)||"";e.includes("flo-ergo-memory-foam-mattress")?(Tt=Math.floor(.6*t),kt=40):e.includes("flo-latex-mattress")?(Tt=Math.floor(.58*t),kt=42):e.includes("flo-orthopedic-mattress")?(Tt=Math.floor(.56*t),kt=44):(Tt=Math.floor(.6*t),kt=40)}else Tt=Math.round(+(null===St||void 0===St?void 0:St.price)),Mt=Math.round(+(null===St||void 0===St?void 0:St.compare_price)),kt=Mt&&0!=Mt&&Mt>Tt?Math.round((Mt-Tt)/Mt*100):NaN;const[At,Nt]=(0,n.useState)(kt),[It,Et]=(0,n.useState)(),{whatmoreIsPreviewMode:_t,whatmoreWidgetSourceDetails:Ot,whatmoreUserInfo:Rt}=(0,n.useContext)(v.B),[Ft,Lt]=(0,n.useState)(!1),[Xt,qt,zt,Dt,Wt,$t]=(0,A.A)(0,St,st),Bt=Pt&&(0,y.mRH)(tt),Yt=Pt&&(0,y.VhI)(tt),Ut=(0,y.WRx)(tt)||ut,Ht=(0,y.jsS)(tt)||"white",Qt=(0,y.KPq)(tt)||"ADD TO CART",[Vt,Jt]=(0,n.useState)(!1),Gt="76767920441"===tt||"55840899223"===tt,Kt=.25*J;(0,n.useEffect)(()=>{if("6573064236"!==tt){if(Pt&&(0,y.w4b)(tt)&&(0,S.fu)(st,(0,y.NCy)(tt),tt).then(t=>{var e,o,n;lt(t),(null===t||void 0===t||null===(e=t.products)||void 0===e||null===(o=e[0])||void 0===o?void 0:o.discount)&&Nt(null===t||void 0===t||null===(n=t.products[0])||void 0===n?void 0:n.discount),bt(!0)}),Pt){(async()=>{let t=St;for(let n=0;n<(null===st||void 0===st||null===(e=st.products)||void 0===e?void 0:e.length);n++){var e;const o=await(0,T.M)(null===st||void 0===st?void 0:st.products[n],(0,y.NCy)(tt),tt);if(null!==o&&void 0!==o&&o.available){Ct(null===st||void 0===st?void 0:st.products[n]),t=null===st||void 0===st?void 0:st.products[n];break}}const o=await(0,T.M)(t,(0,y.NCy)(tt),tt);Et(o),bt(!0)})()}}else bt(!0)},[Pt]),(0,n.useEffect)(()=>{if(Pt){if("6573064236"===tt)return void bt(!0);(async()=>{const t=await(0,T.M)(St,(0,y.NCy)(tt),tt);Et(t),bt(!0)})()}},[St]);const Zt=async t=>{if("6573064236"===tt&&null!==St&&void 0!==St&&St.product_link)return t.stopPropagation(),void(window.location.href=St.product_link);if(t.stopPropagation(),!Pt)return;ct(!0);const e=Ot.landingLocationType,o=Ot.templateType,n=(0,N.Wd)(e)+(0,N.gf)(o)+(null!==st&&void 0!==st&&st.isRelatedEvent?"R":"E")+"_"+(null===st||void 0===st?void 0:st.event_id);(0,I.Ch)(st.event_id,st.products,"homepage","carousel",n,null===st||void 0===st?void 0:st.location,null===Rt||void 0===Rt?void 0:Rt.userType),"init"==Xt.state?(Wt(n,!0),(0,x.kz)({userInteractionType:g.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:Ot,event:st,productList:[St],ctaList:st.cta})):"awaitingVariantSelection"==Xt.state&&$t(null,n),setTimeout(()=>{ct(!1),Jt(!1)},3e3)},te=ot?"36px":"44px",ee=Gt&&ot?{width:.22*J,height:.29*J}:Gt?{width:1.2*Kt,height:1.6*Kt}:null;return(0,O.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top",ht.tileTopMargin+"px"),t.style.setProperty("margin-bottom",ht.tileBottomMMargin+"px"))},className:gt&&!ot?ft?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",style:{margin:"0 auto",cursor:"pointer",width:Gt&&!ot?1.1*J:J},onClick:()=>{yt(st)},onMouseEnter:()=>Lt(!0),onMouseLeave:()=>Lt(!1),children:[(0,O.jsxs)("div",{className:"wht-event-tile-parent-scroll",style:{borderRadius:"round"==vt?"5%":"0px",boxShadow:"round"==vt?"0px 0px 5px 0px #B0B0B0":null,height:V,borderWidth:(0,y.YcK)(tt),borderColor:(0,y.Fwt)(tt),overflow:"hidden",position:"relative"},children:[(0,O.jsx)(w.A,{height:(0,y.u06)(tt)+" !important",width:"100%",url:st.thumbnail_image,isPlaying:"8427339514166"!==pt&&(ft||mt||(0,P.At)()),event:st}),Yt&&Pt&&(Ft||ot)&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("div",{style:{position:"absolute",bottom:te,left:0,right:0,display:Vt?"block":"none"},children:(0,O.jsx)(R,{productList:st.products,firstAvailableProduct:St,setFirstAvailableProduct:Ct,tileWidth:J})}),(0,O.jsxs)("div",{style:{position:"absolute",bottom:0,left:0,right:0,background:Ut||"rgba(0, 0, 0, 0.75)",height:te,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease",cursor:"pointer",transform:Ft||ot?"translateY(0)":"translateY(100%)",opacity:Ft||ot?1:0,WebkitTapHighlightColor:"transparent",WebkitTouchCallout:"none"},onClick:Zt,children:[(0,O.jsx)("div",{style:{flex:1,textAlign:"center",color:Ht,fontSize:"12px",fontFamily:jt,fontWeight:"500",letterSpacing:"0.5px"},children:dt?(0,O.jsx)(E.y,{size:"sm",color:"white"}):Qt}),(0,O.jsx)("span",{style:{height:"100%",borderRight:`1px solid ${Ht}`,opacity:.5}}),(0,O.jsx)("div",{onClick:t=>{t.stopPropagation(),Jt(!Vt)},style:{padding:"0 5%",display:"flex",alignItems:"center",justifyContent:"center",color:Ht,transform:Vt?"rotate(180deg)":"rotate(0deg)",transition:"all 0.25s ease"},children:(0,O.jsx)(b.A,{sx:{fontSize:2*nt}})})]})]})]}),(0,O.jsxs)("div",{className:"wht-prod-info",style:{display:(0,y.AmR)(tt)?"flex":"none",flexDirection:"row",padding:Gt&&ot?"6px 4px":"12px 4px",gap:Gt&&ot?"4px":"12px",alignItems:"stretch",minHeight:Bt?Gt&&ot?"85px":"110px":"auto"},children:[Gt&&Pt&&ee&&(0,O.jsx)("div",{style:{flexShrink:0,display:"flex",alignItems:"stretch"},children:(0,O.jsx)("img",{ref:t=>{t&&t.style.setProperty("object-fit",(0,y.KZe)(tt),"important")},src:(0,_.b)((null===St||void 0===St?void 0:St.thumbnail_image)||(null===St||void 0===St?void 0:St.image)||(null===St||void 0===St?void 0:St.featured_image),"&width=400&height=400"),alt:null===St||void 0===St?void 0:St.title,style:{width:ee.width,height:ee.height,borderRadius:"round"==vt?"5px":"0px",backgroundColor:"#f5f5f5",objectFit:"contain",marginLeft:ot?"0px":"-3px"}})}),(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:Gt&&ot?"2px":"5px",flex:1,minWidth:0},children:[Pt&&(0,O.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y.m5c)(tt),"important"),t.style.setProperty("font-size","45034766485"==tt&&"product"==et?"9px":it),t.style.setProperty("line-height","120%"),t.style.setProperty("font-family",jt,"important"),t.style.setProperty("-webkit-line-clamp","55840899223"===tt?"2":"1","important"),t.style.setProperty("line-clamp","55840899223"===tt?"2":"1","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"),"55840899223"===tt&&t.style.setProperty("height",1.2*nt*2+"px","important"))},children:(0,j.v)(null===St||void 0===St?void 0:St.title)}),Pt&&wt&&(0,y.Nzx)(tt)&&(0,O.jsxs)("div",{style:{display:"flex",gap:Gt&&ot?"6px":"12px",flexDirection:(0,y.vw2)(tt)?"row":"row-reverse",justifyContent:(0,y.vw2)(tt)?"flex-start":"flex-end",alignItems:"center",flexWrap:"wrap"},children:[(0,O.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y.m5c)(tt),"important"),t.style.setProperty("font-size","45034766485"==tt&&"product"==et?"8px":rt),t.style.setProperty("font-family",jt,"important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-align","left","important"),t.style.setProperty("width","auto","important"))},style:{fontWeight:"normal"==(0,y.i6j)(tt)?"normal":"bold"},children:(0,S.Sb)(parseFloat((0,M.U)()?(null!==(l=null===It||void 0===It||null===(c=It.variants)||void 0===c||null===(u=c[0])||void 0===u?void 0:u.price)&&void 0!==l?l:null===It||void 0===It?void 0:It.price)?(null!==(p=null===It||void 0===It||null===(m=It.variants)||void 0===m||null===(F=m[0])||void 0===F?void 0:F.price)&&void 0!==p?p:null===It||void 0===It?void 0:It.price)/100:Tt:Tt>0?Tt:null===St||void 0===St?void 0:St.price_max)," ",tt,null===(L=st.products[0])||void 0===L?void 0:L.currency)}),!isNaN(Mt)&&Mt>Tt&&(0,O.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y.gld)(tt),"important"),t.style.setProperty("font-size",rt),t.style.setProperty("font-family",jt,"important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("width","auto","important"))},style:{textDecoration:"line-through"},children:(0,S.Sb)(parseFloat((0,M.U)()&&(null!==(X=null===It||void 0===It||null===(q=It.variants)||void 0===q||null===(z=q[0])||void 0===z?void 0:z.compare_at_price)&&void 0!==X?X:null===It||void 0===It?void 0:It.compare_at_price)?(null!==(D=null===It||void 0===It||null===(W=It.variants)||void 0===W||null===($=W[0])||void 0===$?void 0:$.compare_at_price)&&void 0!==D?D:null===It||void 0===It?void 0:It.compare_at_price)/100:Mt)," ",tt,null===(B=st.products[0])||void 0===B?void 0:B.currency)}),(0,y.Nzx)(tt)&&!isNaN(At)&&0!=At&&wt&&Bt&&(0,O.jsx)("div",{style:{display:(0,y.QNr)(tt)?"flex":"none",backgroundColor:"green"===(0,y.ub$)(tt)?"#343434"===ut?(0,y.ub$)(tt):ut:(0,y.ub$)(tt),alignItems:"center",borderRadius:(0,y.v8m)(tt)+"px",width:"fit-content",padding:(0,y.Cf)(tt)?"3px 6px":"0px"},children:(0,y.Cf)(tt)?(0,O.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y.BRY)(tt),"important"),t.style.setProperty("font-size",at,"important"),t.style.setProperty("font-family",jt,"important"),t.style.setProperty("font-weight","normal","important"))},children:`${At}% ${null!==(Y=null===k.m||void 0===k.m||null===(U=k.m[xt])||void 0===U?void 0:U.off)&&void 0!==Y?Y:"off"}`}):(0,O.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y._zx)(tt),"important"),t.style.setProperty("font-size",at,"important"),t.style.setProperty("font-family",(0,y.ogW)(tt),"important"))},children:(0,y.rsz)(tt)})})]}),Pt&&(0,y.Nzx)(tt)&&!isNaN(At)&&0!=At&&wt&&!Bt&&(0,O.jsx)("div",{style:{display:(0,y.QNr)(tt)?"flex":"none",backgroundColor:"green"===(0,y.ub$)(tt)?"#343434"===ut?(0,y.ub$)(tt):ut:(0,y.ub$)(tt),alignItems:"center",borderRadius:(0,y.v8m)(tt)+"px",width:"fit-content",padding:(0,y.Cf)(tt)?"3px 6px":"0px"},children:(0,y.Cf)(tt)?(0,O.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y.BRY)(tt),"important"),t.style.setProperty("font-size",at,"important"),t.style.setProperty("font-family",jt,"important"),t.style.setProperty("font-weight","normal","important"))},children:`${At}% ${null!==(H=null===k.m||void 0===k.m||null===(Q=k.m[xt])||void 0===Q?void 0:Q.off)&&void 0!==H?H:"off"}`}):(0,O.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y._zx)(tt),"important"),t.style.setProperty("font-size",at,"important"),t.style.setProperty("font-family",(0,y.ogW)(tt),"important"))},children:(0,y.rsz)(tt)})}),Bt&&(0,O.jsx)("button",{style:{backgroundColor:ut,display:"flex",justifyContent:"center",color:"white",borderRadius:"4px",padding:"8px 16px",fontSize:it,fontFamily:jt,fontWeight:"500",cursor:"pointer",textAlign:"center",letterSpacing:"0.5px",transition:"opacity 0.2s ease",width:Gt&&ot?"100px":"90%",marginTop:Gt?"6px":"0px",alignSelf:"flex-start",marginLeft:Gt&&ot?"-30px":"0px"},onClick:Zt,onMouseEnter:t=>{t.target.style.opacity="0.8"},onMouseLeave:t=>{t.target.style.opacity="1"},children:dt?(0,O.jsx)(E.y,{size:"sm",display:"flex !important",color:"white"}):Qt})]})]})]})},L=o(6641),X=o(4063);const q=(0,l.A)({key:"whatmore-css-hv"});function z(t){const[e,o,i]=(0,d.A)(),r=(0,h.Xd)("whatmoreShopId"),a=(0,h.Xd)("whatmoreLandingLocationType"),s=t.events,l=t.onClick,{whatmoreWidgetSourceDetails:c}=(0,n.useContext)(v.B),u=Math.ceil(i),p=2*u,[f,w]=(0,n.useState)(p),[b,j]=(0,n.useState)(2*u),S=0===(0,y.If9)(r)?24:(0,y.If9)(r),[C,P]=(0,n.useState)({touchX:0,touchY:0}),T=()=>(0,O.jsx)("div",{className:"navigation-button-next-container",style:{width:"50px",borderRadius:"50%",height:"50px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,O.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right-portrait"})}),M=()=>(0,O.jsx)("div",{className:"navigation-button-prev-container",style:{width:"50px",borderRadius:"50%",height:"50px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,O.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left-portrait"})}),k=t=>{if("next"===t){const t=2;j(t=>Math.min(t+Math.floor(i),s.length+u+1)),w(e=>Math.min(e+t,s.length+u+1))}else j(t=>Math.max(t-Math.floor(i),p));(0,x.UM)({userInteractionType:g.O.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:c})};return(0,O.jsxs)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"45034766485"==r&&"product"==a?"center":"flex-start",paddingLeft:"12px",overflow:"hidden",position:"relative"},onTouchStart:t=>{P({touchX:t.touches[0].clientX,touchY:t.touches[0].clientY})},onTouchEnd:t=>{var e,o,n,i;const r=(null===(e=t.changedTouches)||void 0===e||null===(o=e[0])||void 0===o?void 0:o.clientX)-C.touchX,a=(null===(n=t.changedTouches)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.clientY)-C.touchY;Math.sqrt(r**2+a**2)>10&&Math.abs(r)>Math.abs(a)&&k(r>0?"prev":"next")},children:[(0,y.JSQ)(r)&&(0,O.jsxs)(O.Fragment,{children:[b<=s.length+u&&(0,O.jsx)("div",{onClick:()=>k("next"),style:{position:"absolute",zIndex:1,top:"50%",right:"0",transform:"translateY(-100%)"},children:(0,O.jsx)(T,{})}),b>2*u&&(0,O.jsx)("div",{onClick:()=>k("prev"),style:{position:"absolute",left:"0",zIndex:1,top:"50%",transform:"translateY(-100%)"},children:(0,O.jsx)(M,{})})]}),(0,O.jsx)("div",{style:{display:"flex",gap:S,transform:`translateX(-${(b-p)*(o+S)}px)`,transition:"transform 0.4s ease-in-out"},children:s.map((t,e)=>e<f?(0,O.jsx)("div",{children:(0,O.jsx)(F,{isOnFocus:e<=b-u-1&&e>=Math.max(0,b-p),playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>l(t)})},`whatmore-carousel-tile-${e}`):(0,O.jsx)(m.A,{}))})]})}function D(t){const[e,o,i,r]=(0,d.A)(),[a,s]=(0,n.useState)(-1),l=(0,h.Xd)("whatmoreShopId"),[c,u]=(0,n.useState)("next"),f=t.onClick,m=t.events,{whatmoreWidgetSourceDetails:w}=(0,n.useContext)(v.B),b=Math.min(Math.ceil(i),m.length),[j,S]=(0,n.useState)(0),C=0===(0,y.If9)(l)?24:(0,y.If9)(l),P=()=>(0,O.jsx)("div",{children:(0,O.jsx)("button",{onClick:A,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,O.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right"})})}),T=()=>(0,O.jsx)("div",{children:(0,O.jsx)("button",{onClick:k,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,O.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left"})})});(0,n.useEffect)(()=>{j<=b&&S(t=>t+b)},[b]);const M=()=>{s(-1)},k=()=>{j!==b&&(u("prev"),S(t=>Math.max(Math.ceil(t-i),b)),(0,x.UM)({userInteractionType:g.O.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:w}))},A=()=>{j>m.length+i||(u("next"),S(t=>Math.floor(t+i)),(0,x.UM)({userInteractionType:g.O.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:w}))},N=j>m.length?m.length-b+1:j-b,I=j>=m.length?m.length:N+b,E=m.slice(N,I);return(0,O.jsxs)("div",{className:"whatmore-events-carousel-landscape",style:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:`${r}px`,paddingRight:`${r}px`},children:[j!==b&&(0,O.jsx)("div",{className:"wht-vst-button-prev",style:{position:"absolute",left:r+"px",zIndex:1,top:"50%",transform:"translateY(-65%)"},children:(0,O.jsx)(T,{})}),(0,O.jsx)("div",{className:"wht-hide-scrollbar",style:{display:"flex",gap:C+"px",width:o*i*(0,y.fHt)(l)+"px",justifyContent:m.length>b?"flex-start":"center",overflow:"auto"},children:E.map((t,e)=>{const o=`whatmore-event-tile-landscape-${t.index}${e===b-1?"-last":""}`,n=e===a;return(0,O.jsx)("div",{className:"whatmore-event-tile-horizontal-swipe-animation-"+("next"===c?"next":"prev"),onMouseEnter:()=>(t=>{const e=p()(()=>s(t),300);return e(),e.cancel})(e),onMouseLeave:M,children:(0,O.jsx)(F,{isOnFocus:n,playOnUnfocus:!(0,y.aO7)(l)||e==parseInt(b/2)&&-1==a,animateOnFocus:!0,event:t,onClick:()=>(t=>{f(t)})(t)})},o)})}),j<m.length&&(0,O.jsx)("div",{className:"wht-vst-button-next",style:{position:"absolute",zIndex:1,top:"50%",right:r+"px",transform:"translateY(-65%)"},children:(0,O.jsx)(P,{})})]})}function W(t){const[e,o,i,r]=(0,d.A)(),[a,s]=(0,n.useState)(-1),l=(0,h.Xd)("whatmoreShopId"),[c,u]=(0,n.useState)("next"),f=t.onClick,m=t.events,{whatmoreWidgetSourceDetails:w}=(0,n.useContext)(v.B),b=Math.min(Math.ceil(i),m.length),[j,S]=(0,n.useState)(0),C=0===(0,y.If9)(l)?24:(0,y.If9)(l),[P,T]=(0,n.useState)(!1),[M,k]=(0,n.useState)(0),[A,N]=(0,n.useState)(0),I=({disabled:t})=>(0,O.jsx)("button",{onClick:t?void 0:L,className:"wht-custom-nav-dot-next",style:{width:"32px",height:"32px",borderRadius:"50%",backgroundColor:"#F97316",border:"none",cursor:"pointer",opacity:1,padding:0,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:(0,O.jsx)("div",{style:{width:"8px",height:"8px",borderRight:"2px solid #fff",borderBottom:"2px solid #fff",transform:"rotate(-45deg)",position:"absolute"}})}),E=({disabled:t})=>(0,O.jsx)("button",{onClick:t?void 0:R,className:"wht-custom-nav-dot-prev",style:{width:"32px",height:"32px",borderRadius:"50%",backgroundColor:"#F97316",border:"none",cursor:"pointer",opacity:1,padding:0,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:(0,O.jsx)("div",{style:{width:"8px",height:"8px",borderLeft:"2px solid #fff",borderBottom:"2px solid #fff",transform:"rotate(45deg)",position:"absolute"}})});(0,n.useEffect)(()=>{j<=b&&S(t=>t+b)},[b]);const _=()=>{s(-1)},R=()=>{j!==b&&(u("prev"),S(t=>Math.max(Math.ceil(t-i),b)),(0,x.UM)({userInteractionType:g.O.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:w}))},L=()=>{j>m.length+i||(u("next"),S(t=>Math.floor(t+i)),(0,x.UM)({userInteractionType:g.O.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:w}))},X=j>m.length?m.length-b+1:j-b,q=j>=m.length?m.length:X+b,z=m.slice(X,q);return(0,O.jsxs)("div",{style:{position:"relative",width:"100%",minHeight:`${e+60}px`,paddingBottom:"50px"},children:[(0,O.jsx)("div",{className:"whatmore-events-carousel-landscape",style:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:`${r}px`,paddingRight:`${r}px`,cursor:P?"grabbing":"grab",userSelect:"none"},onMouseDown:t=>{T(!0),k(t.clientX),N(t.clientY)},onMouseMove:t=>{P&&t.preventDefault()},onMouseUp:t=>{if(!P)return;T(!1);const e=t.clientX-M,o=t.clientY-A;Math.sqrt(e**2+o**2)>50&&Math.abs(e)>Math.abs(o)&&(e>0?R():L())},onMouseLeave:()=>{P&&T(!1)},onTouchStart:t=>{T(!0),k(t.touches[0].clientX),N(t.touches[0].clientY)},onTouchMove:t=>{},onTouchEnd:t=>{if(!P)return;T(!1);const e=t.changedTouches[0].clientX-M,o=t.changedTouches[0].clientY-A;Math.sqrt(e**2+o**2)>50&&Math.abs(e)>Math.abs(o)&&(e>0?R():L())},children:(0,O.jsx)("div",{className:"wht-hide-scrollbar",style:{display:"flex",gap:C+"px",width:o*i*(0,y.fHt)(l)+"px",justifyContent:m.length>b?"flex-start":"center",overflow:"auto"},children:z.map((t,e)=>{const o=`whatmore-event-tile-landscape-${t.index}${e===b-1?"-last":""}`,n=e===a;return(0,O.jsx)("div",{className:"whatmore-event-tile-horizontal-swipe-animation-"+("next"===c?"next":"prev"),onMouseEnter:()=>(t=>{const e=p()(()=>s(t),300);return e(),e.cancel})(e),onMouseLeave:_,children:(0,O.jsx)(F,{isOnFocus:n,playOnUnfocus:!(0,y.aO7)(l)||e==parseInt(b/2)&&-1==a,animateOnFocus:!0,event:t,onClick:()=>(t=>{f(t)})(t)})},o)})})}),(0,O.jsxs)("div",{style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",display:"flex",gap:"14px",width:"78px",height:"33px",alignItems:"center",justifyContent:"center"},children:[(0,O.jsx)(E,{disabled:j===b}),(0,O.jsx)(I,{disabled:j>=m.length})]})]})}function $(t){const[e,o,i]=(0,d.A)(),r=(0,h.Xd)("whatmoreShopId"),a=(0,h.Xd)("whatmoreLandingLocationType"),s=t.events,l=t.onClick,{whatmoreWidgetSourceDetails:c}=(0,n.useContext)(v.B),u=.6*i,p=Math.ceil(u),f=2*p,[w,b]=(0,n.useState)(f),[j,S]=(0,n.useState)(2*p),C=0===(0,y.If9)(r)?24:(0,y.If9)(r),P=(0,n.useRef)({touchX:0,touchY:0}),T=(0,n.useRef)(!1),M=({disabled:t})=>(0,O.jsx)("button",{onClick:t?void 0:()=>A("next"),className:"wht-custom-nav-dot-next-portrait",style:{width:"32px",height:"32px",borderRadius:"50%",backgroundColor:"#F97316",border:"none",cursor:"pointer",opacity:1,padding:0,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:(0,O.jsx)("div",{style:{width:"8px",height:"8px",borderRight:"2px solid #fff",borderBottom:"2px solid #fff",transform:"rotate(-45deg)",position:"absolute"}})}),k=({disabled:t})=>(0,O.jsx)("button",{onClick:t?void 0:()=>A("prev"),className:"wht-custom-nav-dot-prev-portrait",style:{width:"32px",height:"32px",borderRadius:"50%",backgroundColor:"#F97316",border:"none",cursor:"pointer",opacity:1,padding:0,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:(0,O.jsx)("div",{style:{width:"8px",height:"8px",borderLeft:"2px solid #fff",borderBottom:"2px solid #fff",transform:"rotate(45deg)",position:"absolute"}})}),A=t=>{if("next"===t){const t=2,e=s.length+1;S(t=>Math.min(t+Math.floor(i),e)),b(e=>Math.min(e+t,s.length))}else S(t=>Math.max(t-Math.floor(i),f));(0,x.UM)({userInteractionType:g.O.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:c})};return(0,O.jsx)("div",{style:{width:"100%",overflow:"hidden",paddingBottom:"50px"},children:(0,O.jsxs)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"45034766485"==r&&"product"==a?"center":"flex-start",paddingLeft:"12px",overflow:"visible",position:"relative",zoom:1.3,paddingBottom:"60px"},onTouchStart:t=>{t.target.closest("button")||(T.current=!1,P.current={touchX:t.touches[0].clientX,touchY:t.touches[0].clientY})},onTouchMove:t=>{if(0===P.current.touchX&&0===P.current.touchY)return;const e=t.touches[0].clientX-P.current.touchX,o=t.touches[0].clientY-P.current.touchY;Math.sqrt(e**2+o**2)>10&&!T.current&&(T.current=!0)},onTouchEnd:t=>{var e,o,n,i;if(t.target.closest("button"))return;if(!T.current)return void(P.current={touchX:0,touchY:0});const r=(null===(e=t.changedTouches)||void 0===e||null===(o=e[0])||void 0===o?void 0:o.clientX)-P.current.touchX,a=(null===(n=t.changedTouches)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.clientY)-P.current.touchY;Math.sqrt(r**2+a**2)>50&&Math.abs(r)>Math.abs(a)&&A(r>0?"prev":"next"),P.current={touchX:0,touchY:0},T.current=!1},children:[(0,O.jsx)("div",{style:{display:"flex",gap:C,transform:`translateX(-${(j-f)*(o+C)}px)`,transition:"transform 0.4s ease-in-out"},children:s.map((t,e)=>e<w?(0,O.jsx)("div",{children:(0,O.jsx)(F,{isOnFocus:e<=j-p-1&&e>=Math.max(0,j-f),playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>l(t)})},`whatmore-carousel-tile-${e}`):(0,O.jsx)(m.A,{}))}),(0,O.jsxs)("div",{style:{position:"absolute",bottom:"-35px",left:"50%",transform:"translateX(-50%)",display:"flex",gap:"14px",width:"78px",height:"33px",alignItems:"center",justifyContent:"center"},children:[(0,O.jsx)(k,{disabled:j<=2*p}),(0,O.jsx)(M,{disabled:j>=s.length+1})]})]})})}var B=function(t){const[e,o,l]=(0,c.A)(),[d]=(0,h.QN)("whatmoreShopId"),[u]=(0,h.QN)("whatmorePrimaryColor"),[p]=(0,h.QN)("whatmoreSecondaryColor"),[m]=(0,h.QN)("whatmoreTitleFont"),x="portrait"==e?(0,h.Xd)("whatmoreTitleFontSizePortrait"):(0,h.Xd)("whatmoreTitleFontSize"),{whatmoreRootId:g}=(0,n.useContext)(v.B),{whatmoreCollectionHeading:w}=((0,h.Xd)("isInDesignMode"),(0,n.useContext)(v.B)),{whatmoreIsCollectionsTemplate:b}=(0,n.useContext)(v.B),j=t.events,S=t.onClick,C=m;function P(t){S(t)}return(0,n.useEffect)(()=>{(0,L.Fk)("Video shopping powered by Whatmore!")},[]),(0,n.useEffect)(()=>{r.Sn.forEach(t=>{var e;const o=null!==(e=t.querySelector('.whatmore-template-type[data-wh="template-f"]'))&&void 0!==e?e:t.querySelector('.whatmore-template-type[data="template-f"]');if(!o)return;o&&t&&(t.style.minHeight="0px")})},[]),delete a.Ay.styles.global,(0,O.jsx)(s.C,{value:q,children:(0,O.jsx)("div",{className:"whatmore-carousel-events",children:(0,O.jsx)(i.s,{theme:a.Ay,cssVarsRoot:g,resetCSS:!1,children:(0,O.jsxs)(f.h.Provider,{value:{tileTopMargin:25,tileBottomMMargin:10,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[t.heading.trim().length>0||b?(0,O.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"62636458233"==d?"flex-start":"center"},children:(0,O.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",C,"important"),t.style.setProperty("font-size",x+"px"))},style:{color:u,backgroundClip:"text",textAlign:"center",fontWeight:(0,y.Odx)(d),lineHeight:(0,y.L0y)(d),letterSpacing:(0,y.l3V)(d)},children:b?"W"!==w?w:"":t.heading})}):(0,O.jsx)(O.Fragment,{}),"landscape"===e?"6573064236"===d?(0,O.jsx)(W,{events:j,onClick:P}):(0,O.jsx)(D,{events:j,onClick:P}):(0,O.jsxs)(O.Fragment,{children:["6573064236"===d?(0,O.jsx)($,{events:j,onClick:P}):(0,O.jsx)(z,{events:"45034766485"==d?j.slice(0,5):j,onClick:P}),"45034766485"==d&&(0,O.jsx)("div",{className:"wht-tf-view-cta",style:{display:"flex",justifyContent:"center",margin:"8px 0px"},children:(0,O.jsx)(X.A,{baseFontSize:.5*x,onClick:()=>P(null===j||void 0===j?void 0:j[5])})})]})]})})})})}},4669:function(){},4826:function(){},6042:function(){},7136:function(t,e,o){var n=o(9950),i=o(932),r=o(7509),a=o(5830),s=o(4414);e.A=function(t){var[e,o]=(0,i.A)();(0,n.useContext)(r.h);const l=(0,a.Xd)("whatmoreShopId");return t.event,(0,s.jsx)("div",{style:{margin:"0 auto",width:"8968077397"==l?void 0:o,aspectRatio:"8968077397"==l?9/16:void 0,height:"8968077397"==l?"100%":e,overflow:"hidden"}})}},7229:function(){},7458:function(t,e,o){o.d(e,{P:function(){return n}});const n=function(t,e){return!(isNaN(e)||!e||("string"===typeof e||e instanceof String)&&!e.trim().length)&&!(parseInt(e)<=parseInt(t))}},7509:function(t,e,o){o.d(e,{h:function(){return n}});const n=(0,o(9950).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},7973:function(t,e,o){o.d(e,{B:function(){return a},b:function(){return r}});var n=o(1348),i=o(5830);function r(t,e=""){const o=(0,i.Xd)("whatmoreShopId");return"shopify"!=(0,n.NCy)(o)?"STRNV8MHJTF"==o?t+"?format=webp":t:t+e}function a(t){var e;if(null!==t&&void 0!==t&&t.includes("https://w-media.b-cdn.net/process-media"))return"image";const o=null===t||void 0===t||null===(e=t.trim())||void 0===e?void 0:e.split("?")[0],n=/\.(jpeg|jpg|gif|png|svg|webp)$/i,i=/\.(mp4|mov|wmv|avi|flv|mkv)$/i;return null!==n&&void 0!==n&&n.test(o)?"image":null!==i&&void 0!==i&&i.test(o)?"video":void 0}},8538:function(t,e,o){o.d(e,{v:function(){return i}});var n=o(5830);function i(t,e){const o=(0,n.Xd)("whatmoreShopId");return"undefined"==typeof t||"undefined"==t||null==t?"":"6873415750"==o||"72442478904"==o||"58562281529"==o?t:"66168324332"==o&&"prod-tile"!=e?null===t||void 0===t||null===(i=t.split("- "))||void 0===i?void 0:i[0]:"6573064236"===o?t.replace(/\b\w/g,function(t){return t.toUpperCase()}):t.replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()});var i}},9733:function(){}}]);
|