1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6264],{9998:function(e,r,t){var n,o,a,i;t.d(r,{J:function(){return n},l:function(){return o}}),(a=n||(n={})).ADD_PHONE_NUMBER="add-phone-number",a.ADD_PAYMENT_CARD="add-payment-card",a.ADDRESS_SHARE="address-share",a.ARE_YOU_SURE="are-you-sure",a.ERROR="error",a.ERROR_PAYMENT_CARD="error-payment-card",a.FORGOT_PASSWORD="forgot-password",a.GENERAL_ADDRESS_MAP="general-address-map",a.NEED_SIGN_IN="need-sign-in",a.OTP="otp",a.REMOVE_ADDRESS="remove-address",a.REMOVE_PAYMENT_CARD="remove-payment-card",a.SELECT_ADDRESS_MAP="select-address-map",a.SET_PASSWORD="set-password",a.SHARE="share",a.SIGN_IN="sign-in",a.SIGN_UP="sign-up",a.SUCCESS="success",a.TERMS_AND_CONDITION="terms-and-condition",a.UPDATE_EMAIL="update-email",a.UPDATE_NAME="update-name",a.UPDATE_PHONE="update-phone",a.VERIFY_PHONE_NUMBER="verify-phone-number",a.WELCOME="welcome",a.THREED_PAYMENT="3ds-payment",a.TRACK_ORDER="track-order",a.AGE_RESTRICTION="age-restriction",a.BULK_PURCHASE="bulk-purchase",a.OTP_QUESTION="otp-question",a.TIMER_END="timer-end",a.CART_UPDATE="cart-update",a.ORDER_LOADING="order-loading",a.BIG_ORDER="big-order",a.FIRST_ORDER="first-order",a.STOCK_WARNING="stock-warning",a.MANAGE_SUBSCRIPTION="manage-subscription",a.EXPRESS_SLOT_WARNING="express-slot-warning",a.ANNOUNCEMENT="announcement",a.CHECKOUT_WARNING="checkout-warning",a.REORDER_QUESTION="reorder-question",a.LARGE_IMAGE="large-image",a.DXB_WARNING="dxb-warning",a.PRODUCT_PROMOTION_DETAILS="product-promotion-details",a.REMOVE_GIFT_QUESTION="remove-gift-question",a.INFO="info",a.SHOP_WITH_CORK_MODAL="shop-with-cork-modal",a.DXB_CONTACT_FORM_MODAL="dxb-contact-form-modal",a.GLOBAL_LOYALTY_MODAL="global-loyalty-modal",a.GIFT_CARD_SUCCESS="gift-card-success",a.ADD_GIFT_CARD="add-gift-card",a.GIFT_CARD_ADDED="gift-card-added",a.CANCEL_GIFT_CARD="cancel-gift-card",a.CHECKOUT_CONFIRMATION="checkout-confirmation",a.DECLINE_GIFT_CARD="decline-gift-card",a.VIDEO_POPUP="video-popup",a.LOYALTY_RECOMMENDATION_MODAL="loyalty-recommendation-modal",a.PARTNER_VOUCHER_DETAILS="partner-voucher-details",a.CLAIM_CORKS_HELP_MODAL="claim-corks-help-modal",a.PURCHASED_VOUCHER="purchased-voucher",(i=o||(o={})).GENERIC="generic",i.ADDRESS="address",i.NO_SPACING="no-spacing",i.BOTTOM="bottom",i.RESPONSIVE="responsive",i.ANNOUCEMENTLAYOUT="announcement",i.VIDEO_LAYOUT="video-layout"},12381:function(e,r,t){t.d(r,{z:function(){return s}});var n=t(57437),o=t(2265),a=t(37053),i=t(77712),l=t(51817),d=t(29300);let c=(0,i.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:bg-[#EBEBEB] disabled:text-[#9d9d9d] disabled:font-bold lg:text-[16px] text-[14px]",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",rounded:"bg-primary text-primary-foreground hover:bg-primary/90",roundedBrand:"bg-brand-500 text-white hover:bg-brand-600",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",cancel:"border border-input bg-background hover:bg-accent hover:text-red-600 font-bold",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",outlineSecondary:"border border-primary bg-transparent text-primary hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",underline:"text-primary underline-offset-4 underline",ghostLink:"text-primary/60 hover:text-primary",specialLink:"text-red-500 hover:text-red-600"},size:{default:"h-10 px-4 py-2",rounded:"h-10 px-4 py-2",sm:"h-10 rounded-full px-8",md:"h-12 rounded-[64px] px-4",lg:"h-14 roun
1ded-[64px] px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),s=o.forwardRef((e,r)=>{let{className:t,loading:o,variant:i,size:s,asChild:u=!1,...v}=e,m=u?a.g7:"button";return(0,n.jsxs)(m,{className:(0,d.cn)(c({variant:i,size:s,className:t}),o&&"opacity-70 pointer-events-none"),"aria-label":"Action Button",ref:r,...v,children:[v.children,o&&(0,n.jsx)("div",{className:"".concat(v.children?"ml-2":""),children:(0,n.jsx)(l.Z,{className:"animate-spin",size:20})})]})});s.displayName="Button"},90636:function(e,r,t){t.d(r,{CarouselContent:function(){return m},CarouselItem:function(){return p},Pz:function(){return f},am:function(){return h},lr:function(){return v}});var n=t(57437),o=t(2265),a=t(9467),i=t(92451),l=t(10407),d=t(29300),c=t(12381);let s=o.createContext(null);function u(){let e=o.useContext(s);if(!e)throw Error("useCarousel must be used within a <Carousel />");return e}let v=o.forwardRef((e,r)=>{let{orientation:t="horizontal",opts:i,setApi:l,plugins:c,className:u,children:v,iconColor:m,...p}=e,[h,f]=(0,a.Z)({...i,axis:"horizontal"===t?"x":"y"},c),[g,w]=o.useState(!1),[_,y]=o.useState(!1),E=o.useCallback(e=>{e&&(w(e.canScrollPrev()),y(e.canScrollNext()))},[]),x=o.useCallback(()=>{null==f||f.scrollPrev()},[f]),C=o.useCallback(()=>{null==f||f.scrollNext()},[f]),b=o.useCallback(e=>{"ArrowLeft"===e.key?(e.preventDefault(),x()):"ArrowRight"===e.key&&(e.preventDefault(),C())},[x,C]);return o.useEffect(()=>{f&&l&&l(f)},[f,l]),o.useEffect(()=>{if(f)return E(f),f.on("reInit",E),f.on("select",E),()=>{null==f||f.off("select",E)}},[f,E]),(0,n.jsx)(s.Provider,{value:{carouselRef:h,api:f,opts:i,orientation:t||((null==i?void 0:i.axis)==="y"?"vertical":"horizontal"),scrollPrev:x,scrollNext:C,canScrollPrev:g,canScrollNext:_,iconColor:m},children:(0,n.jsx)("div",{ref:r,onKeyDownCapture:b,className:(0,d.cn)("relative",u),role:"region","aria-roledescription":"carousel",...p,children:v})})});v.displayName="Carousel";let m=o.forwardRef((e,r)=>{let{containerClassName:t,wrapperClassName:o,className:a,...i}=e,{carouselRef:l,orientation:c}=u();return(0,n.jsx)("div",{ref:l,...t&&{className:t},children:(0,n.jsx)("div",{ref:r,className:(0,d.cn)("flex","horizontal"===c?"-ml-4":"-mt-4 flex-col",a,o),...i})})});m.displayName="CarouselContent";let p=o.forwardRef((e,r)=>{let{className:t,...o}=e,{orientation:a}=u();return(0,n.jsx)("div",{ref:r,role:"group","aria-roledescription":"slide",className:(0,d.cn)("min-w-0 shrink-0 grow-0 basis-full","horizontal"===a?"pl-4":"pt-4",t),...o})});p.displayName="CarouselItem";let h=o.forwardRef((e,r)=>{let{className:t,variant:o="outline",size:a="icon",iconSize:l=20,hideOnMobile:s,...v}=e,{orientation:m,scrollPrev:p,canScrollPrev:h,canScrollNext:f,iconColor:g}=u();return(f||h)&&(!s||h)?(0,n.jsxs)(c.z,{ref:r,variant:o,size:a,className:(0,d.cn)(t),disabled:!h,onClick:p,...v,children:[(0,n.jsx)(i.Z,{size:l,style:{color:g||"#ef4444"}}),(0,n.jsx)("span",{className:"sr-only",children:"Previous slide"})]}):null});h.displayName="CarouselPrevious";let f=o.forwardRef((e,r)=>{let{className:t,variant:o="outline",size:a="icon",iconSize:i=20,hideOnMobile:s,...v}=e,{orientation:m,scrollNext:p,canScrollNext:h,canScrollPrev:f,iconColor:g}=u();return(h||f)&&(!s||h)?(0,n.jsxs)(c.z,{ref:r,variant:o,size:a,className:(0,d.cn)(t),disabled:!h,onClick:p,...v,children:[(0,n.jsx)(l.Z,{size:i,style:{color:g||"#ef4444"}}),(0,n.jsx)("span",{className:"sr-only",children:"Next slide"})]}):null});f.displayName="CarouselNext",o.forwardRef((e,r)=>{var t;let{className:o,variant:a="outline",size:i="icon",iconSize:l=20,...d}=e,{canScrollNext:s,canScrollPrev:v,api:m}=u(),p=null==m?void 0:m.scrollSnapList();return s||v||p&&(null==p?void 0:p.length)!==0?(0,n.jsx)("div",{className:"flex justify-center mt-4 space-x-2",children:null==p?void 0:null===(t=p.map)||void 0===t?void 0:t.call(p,(e,r)=>(0,n.jsx)(c.z,{onClick:()=>null==m?void 0:m.scrollTo(r),size:"icon",className:"w-2 h-2 rounded-full ".concat((null==m?void 0:m.selectedScrollSnap())===r?"bg-primary":"bg-gray-300")},r))}):null}).displayName="CarouselDots"},59421:function(e,r,t){t.d(r,{u:function(){return E}});let n=!1,o=[],a=null,i=null,l=Date.now(),d=!1,c=()=>!!window.dataLayer&&window.dataLayer.some(e=>e&&"object"==typeof e&&"gtm.load"===e.event),s=()=>
1{if(!window.dataLayer)return;if(c()){v();return}let e=window.dataLayer.push;window.dataLayer.push=function(){for(var r=arguments.length,t=Array(r),o=0;o<r;o++)t[o]=arguments[o];let a=e.apply(this,t);return n||t.forEach(e=>{e&&"object"==typeof e&&"gtm.load"===e.event&&(console.log("gtm.load detected via push override"),v())}),a},i=setInterval(()=>{if(Date.now()-l>15e3){console.warn("GTM loading timeout reached. Proceeding with queued events."),v();return}c()&&v()},100)},u=()=>{for(console.log("Processing ".concat(o.length," queued GTM events after gtm.load"));o.length>0;){let e=o.shift();if(e)try{e()}catch(e){console.error("Error processing queued GTM event:",e)}}},v=()=>{n||(n=!0,a&&(clearInterval(a),a=null),i&&(clearInterval(i),i=null),console.log("GTM fully loaded (gtm.load detected). Processing event queue..."),setTimeout(()=>{u()},100))},m=()=>{d||(d=!0,s(),a=setInterval(()=>{if(Date.now()-l>15e3){console.warn("GTM loading timeout reached via fallback check."),v();return}window.dataLayer&&window.google_tag_manager&&c()&&v()},200))},p=()=>{if(c()){console.log("GTM already loaded (gtm.load found)"),v();return}console.log("Waiting for GTM to fully load (gtm.load event)..."),m()},h=e=>{if(n)try{var r,t;null===(t=window)||void 0===t||null===(r=t.dataLayer)||void 0===r||r.push({ecommerce:null}),e()}catch(e){console.error("Error sending GTM event:",e)}else console.log("GTM not fully loaded yet. Queueing event..."),o.push(e),d||_()},f=()=>n,g=()=>o.length,w=()=>n?"GTM fully loaded (gtm.load detected)":window.dataLayer?window.dataLayer.some(e=>e&&"object"==typeof e&&"gtm.load"===e.event)?"gtm.load found but not processed yet":"Waiting for gtm.load event (Queue: ".concat(o.length,")"):"DataLayer not found",_=()=>{n||(l=Date.now(),p())},y=()=>{console.warn("Force marking GTM as ready"),v()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",_):_();let E=()=>({viewPromotion:e=>{h(()=>{try{var r,t;null===(t=window)||void 0===t||null===(r=t.dataLayer)||void 0===r||r.push({event:"view_promotion",ecommerce:e})}catch(e){console.error("Error in viewPromotion",e)}})},loginFailed:()=>{h(()=>{try{var e,r;null===(r=window)||void 0===r||null===(e=r.dataLayer)||void 0===e||e.push({event:"customEvent",custom_event_name:"login_failed"})}catch(e){console.error("Error in loginFailed",e)}})},login:()=>{h(()=>{try{var e,r;null===(r=window)||void 0===r||null===(e=r.dataLayer)||void 0===e||e.push({event:"customEvent",custom_event_name:"login"})}catch(e){console.error("Error in login",e)}})},selectPromotion:e=>{h(()=>{try{var r,t;null===(t=window)||void 0===t||null===(r=t.dataLayer)||void 0===r||r.push({event:"select_promotion",ecommerce:e})}catch(e){console.error("Error in selectPromotion",e)}})},addToCartGtm:e=>{h(()=>{try{var r,t;null===(t=window)||void 0===t||null===(r=t.dataLayer)||void 0===r||r.push({event:"add_to_cart",ecommerce:e})}catch(e){console.error("Error in addToCart",e)}})},addToWishList:e=>{h(()=>{try{var r,t;null===(t=window)||void 0===t||null===(r=t.dataLayer)||void 0===r||r.push({event:"add_to_wishlist",ecommerce:e})}catch(e){console.error("Error in addToWishList",e)}})},subscribe:e=>{h(()=>{try{var r,t;null===(t=window)||void 0===t||null===(r=t.dataLayer)||void 0===r||r.push({event:"customEvent",custom_event_name:"subscribe",...e})}catch(e){console.error("Error in subscribe",e)}})},viewItemList:e=>{h(()=>{try{var r,t;null===(t=window)||void 0===t||null===(r=t.dataLayer)||void 0===r||r.push({event:"view_item_list",ecommerce:e})}catch(e){console.error("Error in viewItemList",e)}})},storeLocationClick:e=>{h(()=>{try{var r,t;null===(t=window)||void 0===t||null===(r=t.dataLayer)||void 0===r||r.push({event:"customEvent",custom_event_name:"store_location_click",store_name:e})}catch(e){console.error("Error in storeLocationClick",e)}})},storeLocationShare:e=>{h(()=>{try{var r,t;null===(t=window)||void 0===t||null===(r=t.dataLayer)||void 0===r||r.push({event:"customEvent",custom_event_name:"store_location_share",store_name:e})}catch(e){console.error("Error in storeLocationShare",e)}})},selectItem:e=>{h(()=>{try{var r,t;null===(t=window)||void 0===t||null===(r=t.dataLayer)||void 0===r||r.push({event:"select_item",ecommerce:e})}catch(e){console.error("Error in selectItem",e)}})},viewItem:e=>{h(()=>{try{var r,t;null===(t=window)||void 0===t||null===(r=t.dataLayer)||void 0===r||r.push({event:"view_item",ecommerce:e})}catch(e){console.error("Error in viewItem",e)}})},removeFromCart:e=>{h(()=>{try{var r,t;null===(t=window)||void 0===t||null===(r=t.dataLayer)||void 0===r||r.push({event:"remove_from_cart",ecommerce:e})}catch(e){console.error("Error in removeFromCart",e)}})},quantityCta:e=>{h(()=>{try{var r,t;null===(t=window)||void 0===t||null===(r=t.dataLayer)||void 0===r||r.push({event:"customEvent",custom_event_name:"quantity_cta",...e})}catch(e){console.error("Error in quantityCta",e)}})},beginCheckout:e=>{h(()=>{try{var r,t;null===(t=window)||void 0===t||null===(r=t.dataLayer)||void 0===r||r.push({event:"begin_checkout",ecommerce:e})}catch(e){console.error("Error in beginCheckout",e)}})},viewCart:e=>{h(()=>{try{var r,t;null===(t=window)||void 0===t||null===(r=t.dataLayer)||void 0===r||r.push({event:"view_cart",ecommerce:e})}catch(e){console.error("Error in viewCart",e)}})},addShippingInfo:e=>{h(()=>{try{var r,t;null===(t=window)||void 0===t||null===(r=t.dataLayer)||void 0===r||r.push({event:"add_shipping_info",ecommerce:e})}catch(e){console.error("Error in addShippingInfo",e)}})},paymentFailed:()=>{h(()=>{try{var e,r;null===(r=window)||void 0===r||null===(e=r.dataLayer)||void 0===e||e.push({event:"customEvent",custom_event_name:"payment_failed"})}catch(e){console.error("Error in paymentFailed",e)}})},addPaymentInfo:e=>{h(()=>{try{var r,t;null===(t=window)||void 0===t||null===(r=t.dataLayer)||void 0===r||r.push({event:"add_payment_info",ecommerce:e})}catch(e){console.error("Error in addPaymentInfo",e)}})},purchase:e=>{h(()=>{try{var r,t;null===(t=window)||void 0===t||null===(r=t.dataLayer)||void 0===r||r.push({event:"purchase",ecommerce:e})}catch(e){console.error("Error in purchase",e)}})},orderFailed:e=>{h(()=>{try{var r,t;null===(t=window)||void 0===t||null===(r=t.dataLayer)||void 0===r||r.push({event:"customEvent",custom_event_name:"order_failed",transaction_id:e})}catch(e){console.error("Error in orderFailed",e)}})},notifyMe:e=>{h(()=>{try{var r,t;null===(t=window)||void 0===t||null===(r=t.dataLayer)||void 0===r||r.push({event:"customEvent",custom_event_name:"notify_me",...e})}catch(e){console.error("Error in notifyMe",e)}})},signup:()=>{h(()=>{try{var e,r;null===(r=window)||void 0===r||null===(e=r.dataLayer)||void 0===e||e.push({event:"customEvent",custom_event_name:"signUp"})}catch(e){console.error("Error in signup",e)}})},isGTMLoaded:()=>f(),getQueueLength:()=>g(),getGTMStatus:()=>w(),forceGTMReady:()=>y(),headerNavigation:(e,r)=>{h(()=>{var t,n;null===(n=window)||void 0===n||null===(t=n.dataLayer)||void 0===t||t.push({event:"customEvent",custom_event_name:"header_navigation",link_text:e.toLowerCase(),link_url:r})})},footerNavigation:(e,r)=>{h(()=>{var t,n;null===(n=window)||void 0===n||null===(t=n.dataLayer)||void 0===t||t.push({event:"customEvent",custom_event_name:"footer_navigation",link_text:e.toLowerCase(),link_url:r})})}})},34274:function(e,r,t){var n=t(2265);r.Z=(e,r)=>
1{let[t,o]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let t=new IntersectionObserver(e=>{let[r]=e;o(r.isIntersecting)},r);return e.current&&t.observe(e.current),()=>{e.current&&t.unobserve(e.current)}},[e,r]),t}},56193:function(e,r,t){t.d(r,{F:function(){return a}});var n=t(2265),o=e=>{let[r,t]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let r=window.matchMedia(e);t(r.matches);let n=()=>{t(r.matches)};return r.addEventListener("change",n),()=>{r.removeEventListener("change",n)}},[e]),r};let a=()=>{let e=o("(max-width: 450px)"),r=o("(max-width: 768px)");return{isMobile:e,isTablet:r,isLaptop:o("(max-width: 1024px)"),isLaptopLarge:o("(max-width: 1440px)"),isExternalScreen:o("(max-width: 1800px)")}}},29300:function(e,r,t){t.d(r,{F:function(){return i},_:function(){return l},cn:function(){return a}});var n=t(61994),o=t(53335);function a(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return(0,o.m6)((0,n.W)(r))}let i={url:"data:image/svg+xml;charset=UTF-8,".concat(encodeURIComponent('<svg width="24" height="33" viewBox="0 0 24 33" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path id="Vector" d="M11.8606 0.5C5.5755 0.5 0.492188 5.508 0.492188 11.7C0.492188 14.484 1.30422 17.092 2.78211 19.444C4.32497 21.908 6.35504 24.02 7.91414 26.484C8.67745 27.684 9.22963 28.804 9.81429 30.1C10.2365 30.98 10.5776 32.5 11.8606 32.5C13.1436 32.5 13.4847 30.98 13.8907 30.1C14.4916 28.804 15.0275 27.684 15.7908 26.484C17.3499 24.036 19.38 21.924 20.9229 19.444C22.417 17.092 23.229 14.484 23.229 11.7C23.229 5.508 18.1457 0.5 11.8606 0.5ZM11.8606 16.1C9.61941 16.1 7.80046 14.308 7.80046 12.1C7.80046 9.892 9.61941 8.1 11.8606 8.1C14.1018 8.1 15.9208 9.892 15.9208 12.1C15.9208 14.308 14.1018 16.1 11.8606 16.1Z" fill="#E12829"/>\n</svg>\n'))},l={url:"data:image/svg+xml;charset=UTF-8,".concat(encodeURIComponent('<svg width="24" height="33" viewBox="0 0 24 33" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path id="Vector" d="M11.8606 0.5C5.5755 0.5 0.492188 5.508 0.492188 11.7C0.492188 14.484 1.30422 17.092 2.78211 19.444C4.32497 21.908 6.35504 24.02 7.91414 26.484C8.67745 27.684 9.22963 28.804 9.81429 30.1C10.2365 30.98 10.5776 32.5 11.8606 32.5C13.1436 32.5 13.4847 30.98 13.8907 30.1C14.4916 28.804 15.0275 27.684 15.7908 26.484C17.3499 24.036 19.38 21.924 20.9229 19.444C22.417 17.092 23.229 14.484 23.229 11.7C23.229 5.508 18.1457 0.5 11.8606 0.5ZM11.8606 16.1C9.61941 16.1 7.80046 14.308 7.80046 12.1C7.80046 9.892 9.61941 8.1 11.8606 8.1C14.1018 8.1 15.9208 9.892 15.9208 12.1C15.9208 14.308 14.1018 16.1 11.8606 16.1Z" fill="#002f59"/>\n</svg>\n'))}},30444:function(e,r,t){t.d(r,{Z:function(){return b}});var n=t(57437),o=t(2265),a=t(27648),i=t(33145),l=t(30401),d=t(99397),c=t(30692),s=t(25690),u=t(54522),v=t(97762),m=t(4521),p=t(9998),h=t(75965),f=t(29300),g=t(55486),w=t(59421),_=e=>{var r,t,_,y,E,x;let{item:C,index:b}=e,{user:N}=(0,s.L)(),{open:R,close:A}=(0,u.a)(),{addToCartGtm:L}=(0,w.u)(),{cart:T,addProduct:O,error:S,wineSubscription:D,loading:I}=(0,v.x)(),{setAddProductErrorInDetails:P}=(0,m.a)(),M=(0,o.useRef)(null),[k,j]=(0,o.useState)(!1),[G,U]=(0,o.useState)(!1),F=C.price.officialSalePriceText,z=C.price.officialListPriceText,B=null==T?void 0:null===(r=T.items)||void 0===r?void 0:r.find(e=>e.product.sku===C.sku),H=(null==B?void 0:B.quantity)||0,W=(0,o.useRef)(H);(0,o.useEffect)(()=>{k&&S&&(j(!1),R(p.J.ERROR,{label:S.message||"Could not add product to cart"}))},[S,k,R]),(0,o.useEffect)(()=>{k&&H>W.current&&(j(!1),U(!0),setTimeout(()=>U(!1),2e3)),W.current=H},[H,k]);let q=e=>Math.round(e)/100,Z=e=>{var r,t,n,o;let a=C.price.listPrice!==C.price.salePrice,i=q(C.price.officialSalePrice),l=q(C.price.officialListPrice),d=l-i;return{item_id:C.sku||"",item_name:(null===(r=C.title)||void 0===r?void 0:r.value)||C.title||"",coupon:(null==T?void 0:T.couponId)||"",discount:a?d:0,index:b||0,item_brand:(null==C?void 0:C.erpBrandName)||"",...null!==(o=null==C?void 0:null===(n=C.categories)||void 0===n?void 0:null===(t=n.slice(0,5))||void 0===t?void 0:t.map((e,r)=>({["item_category".concat(0===r?"":r+1)]:e})).reduce((e,r)=>({...e,...r}),{}))&&void 0!==o?o:{},item_variant:(null==C?void 0:C.erpSize)||"",price:i||0,quantity:e||1,sale_status:a?"On Offer ":"No Offer",stock_status:"in_stock",discount_percent:a?Math.round(d/l*100):0,discount_price:a?i:l}},V=(e,r,t)=>{let n=Z(r||1),o=q(C.price.officialSalePrice);
1L({currency:e.currency||"AED",value:n.price*r||o,items:[n],...t?{item_list_id:t,item_list_name:t}:{}})},Y=()=>{var e;let r=null==M?void 0:null===(e=M.current)||void 0===e?void 0:e.closest("div[data-ga-source]");return(null==r?void 0:r.getAttribute("data-ga-source"))||null};return(0,n.jsxs)(a.default,{href:"/product/".concat(C.sku),ref:M,className:" relative flex flex-row items-center p-1 rounded-2xl border border-[#EBEBEB] bg-white w-full h-[85px] group transition-shadow hover:shadow-sm ",children:[(0,n.jsx)("div",{className:"relative w-[50px] h-[70px] flex-shrink-0 mr-3",children:(0,n.jsx)(i.default,{src:(0,c.J)((null===(_=C.images)||void 0===_?void 0:null===(t=_.value)||void 0===t?void 0:t[0])||(null==C?void 0:C.image)),alt:(null===(y=C.title)||void 0===y?void 0:y.value)||C.title||"product",width:50,height:70,unoptimized:!0,loading:"lazy",className:"w-full h-full object-contain mix-blend-multiply"})}),(0,n.jsxs)("div",{className:"flex flex-col flex-1 min-w-0 h-full justify-center",children:[(0,n.jsx)("div",{className:"mb-auto pt-1",children:(0,n.jsx)("span",{className:"text-[12px] font-medium text-[#282829] line-clamp-2 leading-tight",title:(null===(E=C.title)||void 0===E?void 0:E.value)||C.title,children:(null===(x=C.title)||void 0===x?void 0:x.value)||C.title})}),(0,n.jsxs)("div",{className:"flex flex-row items-end justify-between mt-1",children:[(0,n.jsxs)("div",{className:"flex flex-col pb-1",children:[C.price.officialListPrice>C.price.officialSalePrice&&(0,n.jsx)("span",{className:"text-[10px] text-gray-400 line-through decoration-gray-400 leading-none mb-0.5",children:z}),(0,n.jsx)("span",{className:"text-[12px] font-bold text-[#282829] leading-none",children:F})]}),(0,n.jsx)("button",{onClick:e=>{var r;if((0,g.UW)(e),k||H>0)return;let t=H+1;if(!N)return R(p.J.SIGN_IN,{desc:"Oh-oh, you need to sign in to be able to add sips to your cart!"},p.l.NO_SPACING);let n=t||1,o=C.sku,a=(null===(r=C.title)||void 0===r?void 0:r.value)||C.title;j(!0);let i=e=>{let r=Y();j(!1),U(!0),V(e,n,r),setTimeout(()=>{U(!1)},2e3)};if(D)return R(p.J.CART_UPDATE,{fromSubscription:!1,onAction:()=>{O(o,n,H<1,a||"",!1,i),A(p.J.CART_UPDATE)},onClose:()=>j(!1)});P("");try{O(o,n,!0,a||"",!1,i)}catch(e){j(!1),console.error("Add to cart error:",e)}},disabled:k||I,className:(0,f.cn)("w-[32px] h-[32px] rounded-full flex items-center justify-center transition-all ml-2 flex-shrink-0",G||H>0?"bg-brand-500 scale-100":"bg-[#1A1A1A] hover:bg-black active:scale-95"),"aria-label":"Add to cart",children:k?(0,n.jsx)(h.$j,{size:16,className:"text-white"}):G?(0,n.jsx)(l.Z,{size:18,className:"text-white"}):H>0?(0,n.jsx)("span",{className:"text-white font-bold text-[13px]",children:H}):(0,n.jsx)(d.Z,{size:18,color:"white"})})]})]})]})},y=t(21845),E=t(56193),x=t(87095),C=t(90656),b=e=>{let{variant:r="pdp",isScroll:t=!1}=e,{isMobile:a}=(0,E.F)(),{variationId:i}=(0,C.D)(),[l,d]=(0,x.Z)([],"cart"===r?"fbtCart":"fbtPdp"),c=(0,o.useMemo)(()=>l&&0!==l.length?l.slice(0,3):[],[JSON.stringify(l)]),s="cart"===r&&a&&t;return l&&0!==l.length?(0,n.jsx)("div",{className:(0,f.cn)("w-full","pdp"===r?"mb-8 lg:mb-12 lg:pt-8":"mt-6","ins-preview-wrapper-".concat(i," ins-sr-api-wrapper")),children:(0,n.jsxs)("div",{className:"ins-".concat(a?"mobile":"web","-smart-recommender-body"),"data-recommended-items":JSON.stringify(d||[]),children:[(0,n.jsx)("div",{className:(0,f.cn)("my-4","cart"===r&&"mb-3 mt-0"),children:(0,n.jsx)("h3",{style:{color:"#282829"},className:(0,f.cn)("font-medium text-[18px]"),children:"Frequently Bought Together"})}),(0,n.jsx)("div",{className:(0,f.cn)("gap-3",s?"flex overflow-x-auto pb-4 -mx-6 px-6 scrollbar-hide":"grid transition-all",!s&&("cart"===r||a?"grid-cols-1":"grid-cols-3")),children:c.map((e,r)=>(0,n.jsx)(o.Fragment,{children:(0,n.jsx)("div",{className:(0,f.cn)(s?"w-[280px] flex-shrink-0":"w-full"),children:(0,n.jsx)(y.InsiderProductWrapper,{active:!0,productId:e.sku,categories:e.categories||[],children:(0,n.jsx)(_,{item:e,index:r})})})},e.sku))})]})}):null}},54522:function(e,r,t){t.d(r,{a:function(){return n}});let n=(0,t(59625).Ue)()(e=>({close:r=>{e(e=>({opened:{...e.opened,[r]:!1},layout:"",props:null,type:r}))},open:function(r,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"generic";e(e=>({opened:{...e.opened,[r]:!0},props:t,layout:n,type:r}))},toggle:function(r,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"generic";return e(e=>{var o;return{opened:{...e.opened,[r]:!(null==e?void 0:null===(o=e.opened)||void 0===o?void 0:o[r])},layout:(null==e?void 0:e[n])?"":n,type:r,props:t}})},opened:{},layout:"generic",setProps:r=>{e(e=>({props:{...e.props,...r}}))}}))}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.