PageSourceSearch

https://tcebaby.com.my/_next/static/chunks/pages/expo/presale/details/[slug]-9e99c43fc49e44f6.js

js tcebaby.com.my collected 2026-09-24 10:21:59 UTC 67,771 bytes, 1 lines download raw bytes

1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},l=(new e.Error).stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="313e62c8-398b-4992-b3d2-e1fabc07e725",e._sentryDebugIdIdentifier="sentry-dbid-313e62c8-398b-4992-b3d2-e1fabc07e725")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1552],{79176:function(e,l,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/expo/presale/details/[slug]",function(){return a(36780)}])},13564:function(e,l,a){"use strict";var t=a(85893);let s=e=>{let{children:l,className:a,isHeader:s=!1}=e,i="relative md:container md:mx-auto ".concat(s?"py-3":"py-10"," px-3 md:px-5"),d=a&&a.length>0,r=d?i.concat(" ".concat(a)):i;return(0,t.jsx)("div",{className:r,children:l})};l.Z=s},38917:function(e,l,a){"use strict";a.d(l,{Z:function(){return u}});var t=a(85893);a(67294);var s=a(25675),i=a.n(s),d=a(36408),r=a(45139);let n=[{name:"Visa",imageSrc:{src:"/_next/static/media/visa.abd943d0.png",height:178,width:501,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADBAMAAABc5lN7AAAAJ1BMVEX////+/v79/f77/P36+v35+fz4+fz3+Pz29vvv8Pnd3vK7vue1uOVsCopyAAAAF0lEQVR42mMQME9iZBCYfYqJQUC0hREAFN8CzF2HI24AAAAASUVORK5CYII=",blurWidth:8,blurHeight:3}},{name:"Mastercard",imageSrc:{src:"/_next/static/media/master.d92c789b.png",height:178,width:501,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADBAMAAABc5lN7AAAAHlBMVEX////+/////v7+/v7+/vv9+/z98+787+75pWbxcGqS9SrgAAAAF0lEQVR42mMwEk8wZjCIbGFmMBJPMAYAFM0CyeKUmXgAAAAASUVORK5CYII=",blurWidth:8,blurHeight:3}},{name:"MyDebit",imageSrc:{src:"/_next/static/media/mydebit.9e2f1073.png",height:178,width:501,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAIAAAAhqtkfAAAAQElEQVR42mP4////33//fv3+8w8JAAUZgPjTl+8nzt26cf/17Tv3r9+4/e3bd6jE37//fv/58/vP3z8g9AeiAwAt30V1y8esbwAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:3}},{name:"DuitNow",imageSrc:{src:"/_next/static/media/duitnow.41825199.png",height:178,width:501,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADBAMAAABc5lN7AAAAIVBMVEX////+/////v7+/v79/v777/H97O/76u3v6+z3y9LyxMti729EAAAAF0lEQVR42mNgZiswYDDmmmDMYOARJAwAEWMCh2paQb0AAAAASUVORK5CYII=",blurWidth:8,blurHeight:3}},{name:"GrabPay",imageSrc:{src:"/_next/static/media/grabpay.d7757c25.png",height:178,width:501,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADBAMAAABc5lN7AAAAJ1BMVEX////+/v79/v38/fz7/fv6/Pr5+/n2+vf0+fXu9vDX69vW6tnL5M900pySAAAAF0lEQVR42mNgci1mZOBYtWcCA6MSWwAAF/0DM64kPakAAAAASUVORK5CYII=",blurWidth:8,blurHeight:3}},{name:"Boost",imageSrc:{src:"/_next/static/media/boost.21691a97.png",height:178,width:501,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADBAMAAABc5lN7AAAAIVBMVEX////+/v7+/f3+/Pz++vr++fn99/f87ez75OT52Nf2vbzit/0lAAAAF0lEQVR42mMQCGUUYFCY1c7IIOAWzAgAEVwCY8u6MtwAAAAASUVORK5CYII=",blurWidth:8,blurHeight:3}},{name:"ShopeePay",imageSrc:{src:"/_next/static/media/shopeepay.0118fdc9.png",height:178,width:501,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADBAMAAABc5lN7AAAAHlBMVEX////+/v7+/f3++/v99fT98/L98vH75uT4zMn2u7YzpWl+AAAAF0lEQVR42mMQcGUQYFDoLGNkEFAyZgQADtUB7NqBHAEAAAAASUVORK5CYII=",blurWidth:8,blurHeight:3}},{name:"Atome",imageSrc:{src:"/_next/static/media/atome.7141c6f9.png",height:178,width:501,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAIAAAAhqtkfAAAAQklEQVR42k2LsQqAMBDF+v+/4EfddJNFF2fhEETQe7GUDs2QJaQAkr5Opt48Uw9QgIgwM3evdVuP5br3ETTRnibgBxfSRPAoJjZsAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:3}}],o=(0,r.j)("grid",{variants:{size:{small:"w-24 sm:w-28 md:w-32",medium:"w-32 sm:w-36 md:w-48"}},defaultVariants:{size:"small"}}),c=e=>{let{size:l}=e;return(0,t.jsx)("div",{className:"flex flex-row flex-wrap justify-center",children:n.map(e=>(0,t.jsx)("div",{className:(0,d.cn)(o({size:l})),children:(0,t.jsx)(i(),{src:e.imageSrc,alt:"".concat(e.name," logo")})},e.name))})};var u=c},79814:function(e,l,a){"use strict";var t=a(85893);a(67294);var s=a(29238),i=a.n(s);let d=e=>{let{children:l,className:a}=e;if(!l)return null;let s=i().sanitize(l);return(0,t.jsx)("div",{className:a,dangerouslySetInnerHTML:{__html:s}})};l.Z=d},47447:function(e,l,a){"use strict";a.d(l,{AG:function(){return v},At:function(){return m},Jb:function(){return c},aG:function(){return o},bg:function(){return x},gN:function(){return u}});var t=a(85893),s=a(67294),i=a(4222),d=a(64998),r=a(9404),n=a(36408);let o=s.forwardRef((e,l)=>{let{...a}=e;return(0,t.jsx)("nav",{ref:l,"aria-label":"breadcrumb",...a})});o.displayName="Breadcrumb";let c=s.forwardRef((e,l)=>{let{className:a,...s}=e;return(0,t.jsx)("ol",{ref:l,className:(0,n.cn)("flex flex-wrap items-center gap-1.5 break-words text-sm sm:gap-2.5",a),...s})});c.displayName="BreadcrumbList";let u=s.forwardRef((e,l)=>{let{className:a,...s}=e;return(0,t.jsx)("li",{ref:l,className:(0,n.cn)("inline-flex items-center gap-1.5",a),...s})});u.displayName="BreadcrumbItem";let m=s.forwardRef((e,l)=>{let{asChild:a,className:s,...d}=e,r=a?i.g7:"a";return(0,t.jsx)(r,{ref:l,className:(0,n.cn)("transition-colors hover:text-foreground",s),...d})});m.displayName="BreadcrumbLink";let v=s.forwardRef((e,l)=>{let{className:a,...s}=e;return(0,t.jsx)("span",{ref:l,role:"link","aria-disabled":"true","aria-current":"page",className:(0,n.cn)("text-foreground font-medium",a),...s})});v.displayName="BreadcrumbPage";let x=e=>{let{children:l,className:a,...s}=e;return(0,t.jsx)("li",{role:"presentation","aria-hidden":"true",className:(0,n.cn)("[&>svg]:size-3.5",a),...s,children:null!=l?l:(0,t.jsx)(d.Z,{})})};x.displayName="BreadcrumbSeparator";let h=e=>{let{className:l,...a}=e;return(0,t.jsxs)("span",{role:"presentation","aria-hidden":"true",className:(0,n.cn)("flex h-9 w-9 items-center justify-center",l),...a,children:[(0,t.jsx)(r.Z,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"sr-only",children:"More"})]})};h.displayName="BreadcrumbElipssis"},4819:function(e,l,a){"use strict";a.d(l,{z:function(){return o}});var t=a(85893),s=a(67294),i=a(4222),d=a(45139),r=a(36408);let n=(0,d.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium 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:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background 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"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),o=s.forwardRef((e,l)=>{let{className:a,variant:s,size:d,asChild:o=!1,...c}=e,u=o?i.g7:"button";return(0,t.jsx)(u,{className:(0,r.cn)(n({variant:s,size:d,className:a})),ref:l,...c})});o.displayName="Button"},98415:function(e,l,a){"use strict";a.d(l,{KI:function(){return v},Pz:function(){return f},am:function(){return h},d$:function(){return x},lr:function(){return m}});var t=a(85893),s=a(67294),i=a(89382),d=a(98814),r=a(64998),n=a(36408),o=a(4819);
1let c=s.createContext(null);function u(){let e=s.useContext(c);if(!e)throw Error("useCarousel must be used within a <Carousel />");return e}let m=s.forwardRef((e,l)=>{let{orientation:a="horizontal",opts:d,setApi:r,plugins:o,className:u,children:m,...v}=e,[x,h]=(0,i.Z)({...d,axis:"horizontal"===a?"x":"y"},o),[f,g]=s.useState(!1),[p,b]=s.useState(!1),j=s.useCallback(e=>{e&&(g(e.canScrollPrev()),b(e.canScrollNext()))},[]),N=s.useCallback(()=>{null==h||h.scrollPrev()},[h]),y=s.useCallback(()=>{null==h||h.scrollNext()},[h]),w=s.useCallback(e=>{"ArrowLeft"===e.key?(e.preventDefault(),N()):"ArrowRight"===e.key&&(e.preventDefault(),y())},[N,y]);return s.useEffect(()=>{h&&r&&r(h)},[h,r]),s.useEffect(()=>{if(h)return j(h),h.on("reInit",j),h.on("select",j),()=>{null==h||h.off("select",j)}},[h,j]),(0,t.jsx)(c.Provider,{value:{carouselRef:x,api:h,opts:d,orientation:a||((null==d?void 0:d.axis)==="y"?"vertical":"horizontal"),scrollPrev:N,scrollNext:y,canScrollPrev:f,canScrollNext:p},children:(0,t.jsx)("div",{ref:l,onKeyDownCapture:w,className:(0,n.cn)("relative",u),role:"region","aria-roledescription":"carousel",...v,children:m})})});m.displayName="Carousel";let v=s.forwardRef((e,l)=>{let{className:a,...s}=e,{carouselRef:i,orientation:d}=u();return(0,t.jsx)("div",{ref:i,className:"overflow-hidden",children:(0,t.jsx)("div",{ref:l,className:(0,n.cn)("flex","horizontal"===d?"-ml-4":"-mt-4 flex-col",a),...s})})});v.displayName="CarouselContent";let x=s.forwardRef((e,l)=>{let{className:a,...s}=e,{orientation:i}=u();return(0,t.jsx)("div",{ref:l,role:"group","aria-roledescription":"slide",className:(0,n.cn)("min-w-0 shrink-0 grow-0 basis-full","horizontal"===i?"pl-4":"pt-4",a),...s})});x.displayName="CarouselItem";let h=s.forwardRef((e,l)=>{let{className:a,variant:s="outline",size:i="icon",...r}=e,{orientation:c,scrollPrev:m,canScrollPrev:v}=u();return(0,t.jsxs)(o.z,{ref:l,variant:s,size:i,className:(0,n.cn)("absolute h-8 w-8 rounded-full","horizontal"===c?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",a),disabled:!v,onClick:m,...r,children:[(0,t.jsx)(d.Z,{className:"size-12"}),(0,t.jsx)("span",{className:"sr-only",children:"Previous slide"})]})});h.displayName="CarouselPrevious";let f=s.forwardRef((e,l)=>{let{className:a,variant:s="outline",size:i="icon",...d}=e,{orientation:c,scrollNext:m,canScrollNext:v}=u();return(0,t.jsxs)(o.z,{ref:l,variant:s,size:i,className:(0,n.cn)("absolute h-8 w-8 rounded-full","horizontal"===c?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",a),disabled:!v,onClick:m,...d,children:[(0,t.jsx)(r.Z,{className:"size-12"}),(0,t.jsx)("span",{className:"sr-only",children:"Next slide"})]})});f.displayName="CarouselNext"},61897:function(e,l,a){"use strict";a.d(l,{$N:function(){return f},Be:function(){return g},GG:function(){return u},Vq:function(){return n},cN:function(){return h},cZ:function(){return v},fK:function(){return x},hg:function(){return o}});var t=a(85893),s=a(67294),i=a(41499),d=a(41352),r=a(36408);let n=i.fC,o=i.xz,c=i.h_,u=i.x8,m=s.forwardRef((e,l)=>{let{className:a,...s}=e;return(0,t.jsx)(i.aV,{ref:l,className:(0,r.cn)("fixed inset-0 z-[999999] bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...s})});m.displayName=i.aV.displayName;let v=s.forwardRef((e,l)=>{let{className:a,children:s,...n}=e;return(0,t.jsxs)(c,{children:[(0,t.jsx)(m,{}),(0,t.jsxs)(i.VY,{ref:l,className:(0,r.cn)("fixed left-[50%] top-[50%] z-[999999] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...n,children:[s,(0,t.jsxs)(i.x8,{className:"absolute right-4 top-4 roun
1ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,t.jsx)(d.Z,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});v.displayName=i.VY.displayName;let x=e=>{let{className:l,...a}=e;return(0,t.jsx)("div",{className:(0,r.cn)("flex flex-col space-y-1.5 text-center sm:text-left",l),...a})};x.displayName="DialogHeader";let h=e=>{let{className:l,...a}=e;return(0,t.jsx)("div",{className:(0,r.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",l),...a})};h.displayName="DialogFooter";let f=s.forwardRef((e,l)=>{let{className:a,...s}=e;return(0,t.jsx)(i.Dx,{ref:l,className:(0,r.cn)("text-lg font-semibold leading-none tracking-tight",a),...s})});f.displayName=i.Dx.displayName;let g=s.forwardRef((e,l)=>{let{className:a,...s}=e;return(0,t.jsx)(i.dk,{ref:l,className:(0,r.cn)("text-sm text-muted-foreground",a),...s})});g.displayName=i.dk.displayName},77644:function(e,l,a){"use strict";var t=a(85893),s=a(36408),i=a(63750);let d=e=>{let{hall:l,booth:a,size:d,className:r}=e;return"Hall 0"!==l&&"0"!==a&&l&&a?(0,t.jsxs)("div",{className:(0,s.cn)("flex items-center gap-3 px-3 py-2 text-sm font-bold rounded-md bg-baby-yellow-900 md:px-5",r),children:[(0,t.jsx)(i.JRg,{size:null!=d?d:18}),(0,t.jsxs)("div",{className:"flex flex-1",children:[l," | Booth ",a]})]}):null};l.Z=d},1930:function(e,l,a){"use strict";var t=a(85893),s=a(67294),i=a(89583),d=a(36408);let r=e=>{let{children:l,className:a}=e,[r,n]=(0,s.useState)(!1),[o,c]=(0,s.useState)(!1),u=(0,s.useRef)(null),m=(0,s.useRef)(!1),v=(0,s.useRef)(0),x=(0,s.useRef)(0);(0,s.useEffect)(()=>{let e=u.current,l=()=>{if(e){let{scrollLeft:l,scrollWidth:a,clientWidth:t}=e;n(l>0),c(l+t<a)}};return l(),null==e||e.addEventListener("scroll",l),window.addEventListener("resize",l),()=>{null==e||e.removeEventListener("scroll",l),window.removeEventListener("resize",l)}},[]);let h=e=>{let l=u.current;m.current=!0,v.current=e.pageX-l.offsetLeft,x.current=l.scrollLeft},f=e=>{if(!m.current)return;let l=u.current,a=e.pageX-l.offsetLeft,t=(a-v.current)*2;l.scrollLeft=x.current-t},g=()=>{m.current=!1},p=e=>{var l;null===(l=u.current)||void 0===l||l.scrollBy({left:e,behavior:"smooth"})};return(0,t.jsxs)("div",{className:"relative mb-4 w-full",children:[r&&(0,t.jsx)("button",{onClick:()=>p(-100),className:"flex absolute inset-y-0 left-0 z-10 justify-center items-center w-8 h-full opacity-30 duration-300 ease-in-out hover:cursor-pointer hover:opacity-100",children:(0,t.jsx)(i.ZCH,{size:40})}),o&&(0,t.jsx)("button",{onClick:()=>p(100),className:"flex absolute inset-y-0 right-0 z-10 justify-center items-center w-8 h-full opacity-30 duration-300 ease-in-out hover:cursor-pointer hover:opacity-100",children:(0,t.jsx)(i.jS6,{size:40})}),(0,t.jsx)("div",{ref:u,className:(0,d.cn)("inline-flex overflow-x-auto space-x-4 w-full snap-mandatory snap-x scrollbar-hide scroll-px-8",a),onMouseDown:h,onMouseMove:f,onMouseUp:g,onMouseLeave:g,children:s.Children.map(l,e=>(0,t.jsx)("div",{className:"snap-start",children:e}))}),r&&(0,t.jsx)("div",{className:"absolute inset-y-0 left-0 w-8 bg-gradient-to-r from-white to-transparent pointer-events-none"}),o&&(0,t.jsx)("div",{className:"absolute inset-y-0 right-0 w-8 bg-gradient-to-l from-white to-transparent pointer-events-none"})]})};l.Z=r},55102:function(e,l,a){"use strict";a.d(l,{O:function(){return i}});var t=a(85893),s=a(36408);function i(e){let{className:l,...a}=e;return(0,t.jsx)("div",{className:(0,s.cn)("animate-pulse rounded-md bg-muted",l),...a})}},59843:function(e,l,a){"use strict";a.d(l,{EM:function(){return d},N3:function(){return i},T:function(){return t},aG:function(){return s},qG:function(){return r}});let t=15728640,s="com.tcebabyapp",i="1665105936",d="tcebaby://",r=2},71268:function(e,l,a){"use strict";a.d(l,{W4:function(){return n},Zo:function(){return s},cG:function(){return d},vQ:function(){return r},zf:function(){return i}});var t=a(70241);let s=e=>{let l=new Date,a=e.getTime()-l.getTime();if(a<=0)return"Expired";let t=Math.floor(a/36e5),s=Math.floor(a%36e5/6e4);return t>1?"".concat(t," hours remaining"):1===t?"1 hour remaining":s>1?"".concat(s," minutes remaining"):1===s?"1 minute remaining":"Less than a minute remaining"},i=()=>"undefined"!=typeof navigator&&!!navigator.share,d=e=>{let l=(0,t.BK)("MYR",e);return"I've sent you a Yhello Card worth ".concat(l,"! Click to claim it:")},r=async e=>{try{await navigator.clipboard.writeText(e)}
1catch(a){let l=document.createElement("input");l.value=e,l.style.position="fixed",l.style.opacity="0",document.body.appendChild(l),l.select(),document.execCommand("copy"),document.body.removeChild(l)}},n=e=>{if(!e||e.length<8)return e;let l=e.slice(0,4),a=e.slice(-4);return"".concat(l," **** **** ").concat(a)}},36780:function(e,l,a){"use strict";a.r(l),a.d(l,{__N_SSP:function(){return ev},default:function(){return ex}});var t=a(85893),s=a(13564),i=a(78216),d=a(79814),r=a(11871),n=a(47447),o=a(98415),c=a(77644),u=a(67294),m=a(46177),v=a(36408);let x=m.fC,h=m.xz,f=u.forwardRef((e,l)=>{let{className:a,align:s="center",sideOffset:i=4,...d}=e;return(0,t.jsx)(m.VY,{ref:l,align:s,sideOffset:i,className:(0,v.cn)("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-hover-card-content-transform-origin]",a),...d})});f.displayName=m.VY.displayName;var g=a(39802),p=a(55102),b=a(98420),j=a(65147),N=a(86310),y=a(70259),w=a(70241),A=a(97719),S=a(57307),k=a(73106),C=a(69539),E=a(76915),O=a(41664),P=a.n(O),M=a(11163),z=a(87536),R=a(89583),D=a(25675),_=a.n(D),V=a(97533),B=a(38917),I=a(96486),U=a.n(I),F=a(9560),L=a(4248);function Z(e){var l,a,s,i,d,n,o,c,m,x,h,f,g,p,b,j,N,y,w,S,k,C,E,O,P;let{skuId:M}=e,[z,R]=(0,u.useState)(1),D=A.SX.products.reviews.listBySku.useQuery({skuId:M||"",limit:10,page:z},{enabled:!!M,staleTime:1e4}),_=A.SX.products.reviews.stats.useQuery({skuId:M||""},{enabled:!!M});if(!M||!(null===(l=D.data)||void 0===l?void 0:null===(a=l.docs)||void 0===a?void 0:a.length))return null;let V=[{label:"5 Star",count:null!==(y=null===(s=_.data)||void 0===s?void 0:null===(i=s.ratingDistribution)||void 0===i?void 0:i[5])&&void 0!==y?y:0},{label:"4 Star",count:null!==(w=null===(d=_.data)||void 0===d?void 0:null===(n=d.ratingDistribution)||void 0===n?void 0:n[4])&&void 0!==w?w:0},{label:"3 Star",count:null!==(S=null===(o=_.data)||void 0===o?void 0:null===(c=o.ratingDistribution)||void 0===c?void 0:c[3])&&void 0!==S?S:0},{label:"2 Star",count:null!==(k=null===(m=_.data)||void 0===m?void 0:null===(x=m.ratingDistribution)||void 0===x?void 0:x[2])&&void 0!==k?k:0},{label:"1 Star",count:null!==(C=null===(h=_.data)||void 0===h?void 0:null===(f=h.ratingDistribution)||void 0===f?void 0:f[1])&&void 0!==C?C:0}],B=null!==(E=null===(g=_.data)||void 0===g?void 0:g.totalReviews)&&void 0!==E?E:0,I=null!==(O=null===(p=_.data)||void 0===p?void 0:p.averageRating)&&void 0!==O?O:0,U=Math.ceil((null!==(P=null===(b=D.data)||void 0===b?void 0:b.totalDocs)&&void 0!==P?P:0)/10);return(0,t.jsxs)("div",{className:"p-5 mt-5 bg-white rounded-md md:mt-8",children:[(0,t.jsx)("div",{className:"text-[1.3em] mb-6",children:"Product Ratings"}),(0,t.jsx)("div",{className:"p-6 rounded-lg bg-gray-50/80",children:(0,t.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:gap-12",children:[(0,t.jsxs)("div",{className:"text-center md:text-left",children:[(0,t.jsx)("div",{className:"text-5xl font-semibold text-gray-900",children:I.toFixed(1)}),(0,t.jsx)("div",{className:"flex gap-0.5 justify-center md:justify-start mt-2",children:[1,2,3,4,5].map(e=>(0,t.jsx)(F.Z,{className:(0,v.cn)("size-4",e<=I?"text-yellow-400 fill-current stroke-yellow-400":"text-gray-300 stroke-gray-300")},e))}),(0,t.jsx)("div",{className:"mt-1 text-sm text-gray-500",children:"out of 5"})]}),(0,t.jsx)("div",{className:"flex-1",children:V.map((e,l)=>(0,t.jsxs)("div",{className:"flex gap-2 items-center p-1 w-full",children:[(0,t.jsx)("div",{className:"w-14 text-sm text-gray-600",children:e.label}),(0,t.jsx)("div",{className:"overflow-hidden flex-1 h-2 bg-gray-200 rounded-full",children:(0,t.jsx)("div",{className:"h-full bg-yellow-400 rounded-full",style:{width:"".concat(B?e.count/B*100:0,"%")}})}),(0,t.jsxs)("div",{className:"w-8 text-sm text-right text-gray-500",children:["(",e.count,")"]})]},e.label))})]})}),(0,t.jsxs)("div",{className:"mt-8",children:[(0,t.jsx)("div",{className:"text-[1.3em] mb-6",children:"Customer Reviews"}),(0,t.jsx)("div",{className:"divide-y",children:null===(j=D.data)||void 0===j?void 0:null===(N=j.docs)||void 0===N?void 0:N.map(e=>{var l,a;return(0,t.jsx)("div",{className:"py-6",children:(0,t.jsxs)("div",{className:"flex gap-3 items-start",children:[(0,t.jsx)("div",{className:"shrink-0",children:(0,t.jsx)("div",{className:"flex justify-center items-center w-10 h-10 text-white rounded-full bg-baby-yellow-900",children:(0,t.jsx)("span",{className:"text-lg text-gray-900",children:((null===(l=e.user)||void 0===l?void 0:l.displayName)||"User").charAt(0).toUpperCase()})})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between",children:[(0,t.jsx)("div",{className:"font-medium text-gray-900",children:(null===(a=e.user)||void 0===a?void 0:a.displayName)||"User"}
1),(0,t.jsx)("div",{className:"flex gap-2 items-center mt-1 sm:mt-0",children:(0,t.jsx)("div",{className:"flex gap-0.5",children:[1,2,3,4,5].map(l=>(0,t.jsx)(F.Z,{className:(0,v.cn)("size-4",l<=e.rating?"text-yellow-400 fill-current stroke-yellow-400":"text-gray-300 stroke-gray-300")},l))})})]}),(0,t.jsxs)("div",{className:"mt-1 text-sm text-gray-500",children:[e.variant&&(0,t.jsxs)("span",{children:["Variation: ",e.variant," | "]}),(0,L.Z)(new Date(e.createdAt),{addSuffix:!0})]}),e.comment&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)("p",{className:"text-gray-700 whitespace-pre-line break-words",children:e.comment})})]})]})},e._id.toString())})}),U>1&&(0,t.jsxs)("div",{className:"flex gap-4 justify-center items-center mt-8",children:[(0,t.jsx)(r.default,{label:"Previous",color:"white",disabled:!(z>1)||D.isLoading,onClick:()=>R(e=>e-1)}),(0,t.jsxs)("div",{className:"text-sm text-gray-600",children:["Page ",z," of ",U]}),(0,t.jsx)(r.default,{label:"Next",color:"white",disabled:!(z<U)||D.isLoading,onClick:()=>R(e=>e+1)})]})]})]})}var G=a(53854),K=a(1930),T=a(94803);let Q=e=>{let{voucherStatus:l,onGrab:a,onUse:s,voucherDetails:i}=e;if(!l.isGrabVoucher)return null;let d=()=>{if(!(null==i?void 0:i.discountValue))return"Voucher";let e="fixed"===i.discountType?"RM".concat(i.discountValue):"".concat(i.discountValue,"%");return e};return(0,t.jsx)("div",{className:"mb-4",children:l.canGrab&&!l.hasGrabbed?(0,t.jsxs)("div",{className:"flex overflow-hidden bg-white border rounded-lg shadow-sm border-baby-yellow-900",children:[(0,t.jsxs)("div",{className:"relative flex items-center justify-center w-24 p-4 bg-gradient-to-br to-baby-yellow-900 from-baby-yellow-900/40 md:w-28",children:[(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:(0,v.cn)("font-bold break-words",(()=>{let e=d(),l=e.length;return l<=4?"text-2xl md:text-3xl":l<=6?"text-xl md:text-2xl":"text-lg md:text-xl"})()),children:d()}),(0,t.jsx)("div",{className:"text-xs font-medium tracking-wider uppercase",children:"OFF"})]}),(0,t.jsxs)("div",{className:"absolute top-0 flex flex-col justify-between h-full -right-2",children:[(0,t.jsx)("div",{className:"w-4 h-4 bg-gray-100 rounded-full translate-y-[-50%] border"}),(0,t.jsx)("div",{className:"flex-1 mx-2 border-r-2 border-gray-100 border-dashed"}),(0,t.jsx)("div",{className:"w-4 h-4 bg-gray-100 rounded-full translate-y-[50%] border"})]})]}),(0,t.jsx)("div",{className:"flex-1 p-4 bg-gradient-to-r from-baby-yellow-900/10 to-baby-yellow-900/20",children:(0,t.jsxs)("div",{className:"flex items-start justify-between h-full",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-gray-900 md:text-base",children:(null==i?void 0:i.title)||"TCE Voucher"}),(0,t.jsx)("div",{className:"mt-2 text-xs text-gray-500",children:"Claim this voucher to get this savings"})]}),(0,t.jsx)(r.default,{label:"Claim",onClick:a,size:"small",color:"yellow"})]})})]}):(l.isGrabLimitReached||l.hasGrabbed&&l.canUse&&!l.hasUsed||l.hasUsed||l.hasGrabbed&&!l.canUse&&l.hasUsed,null)})},q=e=>{let{originalPrice:l,productDiscount:a,voucherDiscount:s,finalPrice:i,currency:d="RM",mask:r=!0}=e;return!(a>0||s>0||i!==l)||l<=0?null:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)("span",{className:"text-base font-bold text-gray-800",children:"Price Breakdown"})}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-sm text-gray-600",children:"Original Price"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-800",children:(0,w.BK)(d,l,{mask:r})})]}),a>0&&(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-sm text-gray-600",children:"Product Discount"}),(0,t.jsxs)("span",{className:"text-sm font-semibold text-baby-red-900",children:["-",(0,w.BK)(d,a,{mask:r})]})]}),s>0&&(0,t.jsxs)("div",{className:"flex justify-between items-center bg-baby-yellow-900/10 -mx-2 px-2 py-1.5 rounded-lg",children:[(0,t.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,t.jsx)("div",{className:"w-2 h-2 rounded-full bg-baby-red-900"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"TCE Voucher Discount"})]}),(0,t.jsxs)("span",{className:"text-sm font-bold text-baby-red-900",children:["-",(0,w.BK)(d,s,{mask:r})]})]}),(0,t.jsx)("div",{className:"my-3 border-t border-gray-200 border-dashed"}),(0,t.jsxs)("div",{className:"flex justify-between items-center px-2 py-2 -mx-2 rounded-lg",children:[(0,t.jsx)("span",{className:"text-base font-bold text-gray-800",children:s?"Estimated Price:":"Final Price:"}),(0,t.jsx)("span",{className:"text-xl font-bold",children:(0,w.BK)(d,i,{mask:r})})]}),!!s&&(0,t.jsx)("div",{className:"mt-3 text-xs text-center text-gray-400",children:"* Final price shown at checkout"})]})};var H=a(5434),Y=a(98814),X=a(64998);let W=e=>{let{images:l,initialIndex:a=0,isOpen:s,onClose:i,productName:d,overlayCornerImage:r,overlayCornerMarkdownImage:n,overlayBottomImage:o,showOverlayCorner:c=!1,showOverlayCornerMarkdown:m=!1}=e,[x,h]=(0,u.useState)(a),[f,g]=(0,u.useState)(null),p=(0,u.useRef)(null),b=(0,u.useRef)(null),j=(0,u.useRef)(0),N=l.filter(e=>!!e);(0,u.useEffect)(()=>{s&&h(a)},[s,a]),(0,u.useEffect)(()=>
1{if(!s)return;let e=document.body,l=window.scrollY;return j.current=l,g(window.innerHeight),e.style.overflow="hidden",e.style.position="fixed",e.style.top="-".concat(l,"px"),e.style.left="0",e.style.right="0",e.style.width="100%",e.style.touchAction="none",()=>{g(null),e.style.overflow="",e.style.position="",e.style.top="",e.style.left="",e.style.right="",e.style.width="",e.style.touchAction="",window.scrollTo(0,j.current)}},[s]),(0,u.useEffect)(()=>{b.current&&p.current&&b.current.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[x]);let y=(0,u.useCallback)(()=>{h(e=>e>0?e-1:N.length-1)},[N.length]),w=(0,u.useCallback)(()=>{h(e=>e<N.length-1?e+1:0)},[N.length]),A=(0,u.useCallback)(e=>{if(s)switch(e.key){case"Escape":i();break;case"ArrowLeft":y();break;case"ArrowRight":w()}},[s,i,y,w]);return((0,u.useEffect)(()=>(window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)),[A]),s&&0!==N.length)?(0,t.jsx)("div",{className:"fixed inset-0 z-[999999999] items-center justify-center bg-black/10 hidden md:flex",onClick:i,children:(0,t.jsxs)("div",{className:"relative flex w-[900px] max-h-[640px] min-h-[640px] h-auto overflow-hidden bg-white shadow-[0_24px_60px_rgba(0,0,0,0.45)]",style:f?{height:f}:void 0,onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"relative flex-1",children:[N.length>1&&(0,t.jsx)("button",{onClick:y,className:"flex absolute left-6 top-1/2 z-20 justify-center items-center w-14 h-14 text-gray-800 rounded-full shadow-lg transition -translate-y-1/2 bg-white/90 hover:bg-white","aria-label":"Previous image",children:(0,t.jsx)(Y.Z,{size:32})}),(0,t.jsx)("div",{className:"flex relative justify-center items-center px-6 py-6 w-full h-full",children:(0,t.jsxs)("div",{className:"relative w-full max-w-[640px] aspect-square group",children:[(0,t.jsx)(_(),{src:N[x],alt:d||"Image ".concat(x+1),fill:!0,sizes:"(max-width: 768px) 90vw, 640px",className:"object-cover",priority:!0}),(0,t.jsxs)("div",{className:"absolute inset-0 z-10 pointer-events-none group-hover:hidden",children:[c&&r&&(0,t.jsx)(_(),{src:r,height:138,width:437,alt:"Promotions",className:"absolute top-4 left-4 w-[32%] max-w-[150px]"}),m&&n&&(0,t.jsx)(_(),{src:n,width:437,height:138,alt:"Promotions",className:"absolute top-4 left-4 w-[32%] max-w-[150px]"}),o&&(0,t.jsx)(_(),{src:o,width:600,height:87,alt:"Promotions",className:"absolute bottom-0 left-0 w-full"})]})]})}),N.length>1&&(0,t.jsx)("button",{onClick:w,className:"flex absolute right-6 top-1/2 z-20 justify-center items-center w-14 h-14 text-gray-800 rounded-full shadow-lg transition -translate-y-1/2 bg-white/90 hover:bg-white","aria-label":"Next image",children:(0,t.jsx)(X.Z,{size:32})}),(0,t.jsxs)("div",{className:"absolute right-8 bottom-8 z-20 px-4 py-1 text-sm font-medium text-white rounded-full bg-black/60",children:[x+1,"/",N.length]})]}),(0,t.jsxs)("div",{className:"hidden w-[260px] flex-col border-l border-gray-100 bg-white md:flex",children:[(0,t.jsx)("div",{className:"px-6 pt-6 pb-4 border-b border-gray-100",children:d?(0,t.jsx)("div",{className:"mt-2 text-base font-semibold leading-snug text-gray-900 line-clamp-2",children:d}):null}),(0,t.jsx)("div",{ref:p,className:"overflow-y-auto flex-1 px-6 py-5 shopee-gallery-scroll",children:(0,t.jsx)("div",{className:"grid grid-cols-2 gap-4",children:N.map((e,l)=>(0,t.jsx)("button",{type:"button",ref:l===x?b:null,onClick:()=>h(l),className:(0,v.cn)("group relative flex aspect-square items-center justify-center overflow-hidden rounded-md border transition-all duration-150",l===x?"border-[#EE4D2D] ring-2 ring-[#FCDDCD] shadow-[0_8px_18px_rgba(238,77,45,0.28)]":"border-gray-200 hover:border-[#EE4D2D]/70 hover:shadow-[0_6px_14px_rgba(0,0,0,0.12)]"),children:(0,t.jsx)(_(),{src:e,alt:"Thumbnail ".concat(l+1),width:150,height:150,className:"h-full w-full object-cover transition-transform duration-150 group-hover:scale-[1.03]"})},l))})})]})]})}):null};var J=a(71268);a(59843);var $=a(68258),ee=a(61897);let el=e=>{let{descriptions:l}=e,a=(0,u.useRef)(null),[s,i]=(0,u.useState)(!1),[r,n]=(0,u.useState)(!1);return(0,u.useEffect)(()=>
1{if(a.current){let e=a.current.scrollHeight;n(e>200)}},[l,a.current]),(0,t.jsxs)("div",{className:"p-5 mt-8 bg-white rounded-md md:mt-5",children:[(0,t.jsx)("div",{className:"text-[1.3em]",children:"Product Description"}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{ref:a,className:(0,v.cn)("relative",!s&&"max-h-[200px] overflow-hidden"),children:(0,t.jsx)("div",{className:"ql-editor",children:(0,t.jsx)(d.Z,{children:null!=l?l:""})})}),!s&&r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"absolute bottom-0 left-0 w-full h-24 bg-gradient-to-t from-white to-transparent"}),(0,t.jsx)("div",{className:"flex absolute left-0 -bottom-4 justify-center w-full",children:(0,t.jsx)("button",{onClick:()=>i(!0),className:"px-6 py-2 text-sm font-medium text-gray-600 bg-white rounded-full border shadow-sm hover:bg-gray-50",children:"Read More"})})]})]})})]})},ea=(0,u.memo)(e=>{var l;let{productId:a,expoSlug:s,preExpoSalePurchaseEnable:i}=e,d=A.SX.products.presales.getProductRecommendations.useQuery({productId:a,limit:10},{enabled:!!a}),r=null!==(l=d.data)&&void 0!==l?l:[],n=(0,u.useCallback)((e,l)=>{var a;return(0,t.jsx)("div",{className:"min-w-[250px] max-w-[250px] ",children:(0,t.jsx)(T.Z,{data:e,expoSlug:s,preExpoSalePurchaseEnable:i})},(null==e?void 0:null===(a=e._id)||void 0===a?void 0:a.toString())+"_"+l)},[s,i]);return d.isLoading?(0,t.jsx)(er,{}):(0,v.xb)(r)?null:(0,t.jsxs)("div",{className:"pt-5 mt-5 bg-white rounded-md md:mt-8",children:[(0,t.jsx)("span",{className:"text-[1.3em] px-5",children:"Recommended Products"}),(0,t.jsx)(K.Z,{className:"p-5 mt-3",children:r.map(n)})]})}),et=()=>(0,t.jsx)("div",{className:"text-sm",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.O,{className:"w-12 h-4"}),(0,t.jsx)("span",{className:"text-gray-300",children:"/"}),(0,t.jsx)(p.O,{className:"w-20 h-4"}),(0,t.jsx)("span",{className:"text-gray-300",children:"/"}),(0,t.jsx)(p.O,{className:"w-24 h-4"}),(0,t.jsx)("span",{className:"text-gray-300",children:"/"}),(0,t.jsx)(p.O,{className:"w-32 h-4"})]})}),es=()=>(0,t.jsx)("div",{className:"flex flex-row gap-4 md:col-span-2",children:(0,t.jsxs)("div",{className:"w-full rounded-md aspect-square",children:[(0,t.jsx)("div",{className:"overflow-hidden bg-white rounded",children:(0,t.jsx)(p.O,{className:"w-full aspect-square"})}),(0,t.jsx)("div",{className:"h-4"}),(0,t.jsx)("div",{className:"mx-auto w-full",children:(0,t.jsx)("div",{className:"flex gap-1",children:[1,2,3].map(e=>(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)(p.O,{className:"aspect-square"})},e))})})]})}),ei=()=>(0,t.jsx)("div",{className:"p-5 mt-5 h-full bg-white rounded-md md:col-span-3 md:mt-0",children:(0,t.jsxs)("div",{className:"flex flex-col gap-4 justify-between h-full",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 items-stretch mb-5",children:[(0,t.jsx)(p.O,{className:"w-24 h-6"}),(0,t.jsx)(p.O,{className:"w-20 h-6"})]}),(0,t.jsx)("div",{className:"space-y-2 md:space-y-3",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(p.O,{className:"mb-2 w-32 h-5"}),(0,t.jsx)(p.O,{className:"mb-1 w-full h-6"}),(0,t.jsx)(p.O,{className:"w-3/4 h-4"})]})}),(0,t.jsxs)("div",{className:"mt-5 md:mt-6",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)(p.O,{className:"w-20 h-4"}),(0,t.jsx)(p.O,{className:"ml-4 w-12 h-4"})]}),(0,t.jsx)("div",{className:"flex gap-4 justify-between items-center",children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(p.O,{className:"w-32 h-12"}),(0,t.jsx)(p.O,{className:"mt-2 ml-3 w-16 h-4"})]})}),(0,t.jsx)(p.O,{className:"mt-2 w-24 h-4"})]}),(0,t.jsx)("div",{className:"mt-6 space-y-2",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:[1,2,3].map(e=>(0,t.jsx)(p.O,{className:"w-24 h-10"},e))})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("hr",{className:"my-8"}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 md:flex-row md:gap-4 md:items-center",children:[(0,t.jsx)(p.O,{className:"w-full h-12 md:w-40"}),(0,t.jsx)(p.O,{className:"w-full h-12 md:w-48"})]}),(0,t.jsx)("div",{className:"mt-4 text-sm text-gray-500",children:(0,t.jsxs)("div",{className:"flex gap-4 justify-between items-center",children:[(0,t.jsx)(p.O,{className:"w-20 h-4"}),(0,t.jsx)(p.O,{className:"w-24 h-4"})]})}),(0,t.jsx)("hr",{className:"mt-8 mb-4"}),(0,t.jsx)(p.O,{className:"w-full h-16"})]})]})}),ed=()=>(0,t.jsxs)("div",{className:"p-5 mt-5 bg-white rounded-md md:mt-8",children:[(0,t.jsx)(p.O,{className:"mb-3 w-48 h-6"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(p.O,{className:"w-full h-4"}),(0,t.jsx)(p.O,{className:"w-full h-4"}),(0,t.jsx)(p.O,{className:"w-3/4 h-4"}),(0,t.jsx)(p.O,{className:"w-full h-4"}),(0,t.jsx)(p.O,{className:"w-5/6 h-4"})]})]}),er=()=>(0,t.jsxs)("div",{className:"pt-5 mt-5 bg-white rounded-md md:mt-8",children:[(0,t.jsx)(p.O,{className:"mx-5 mb-3 w-48 h-6"}),(0,t.jsx)("div",{className:"p-5",children:(0,t.jsx)("div",{className:"flex overflow-hidden gap-4",children:[1,2,3,4].map(e=>(0,t.jsx)("div",{className:"min-w-[250px] max-w-[250px]",children:(0,t.jsxs)("div",{className:"overflow-hidden bg-gray-50 rounded-xl",children:[(0,t.jsx)(p.O,{className:"w-full aspect-square"}),(0,t.jsxs)("div",{className:"p-3 space-y-2",children:[(0,t.jsx)(p.O,{className:"w-3/4 h-4"}),(0,t.jsx)(p.O,{className:"w-full h-4"}),(0,t.jsx)(p.O,{className:"w-1/2 h-4"}),(0,t.jsxs)("div",{className:"flex justify-between items-center mt-3",children:[(0,t.jsx)(p.O,{className:"w-16 h-4"}),(0,t.jsx)(p.O,{className:"w-12 h-4"})]})]})]})},e))})})]}),en=()=>(0,t.jsxs)("div",{className:"overflow-hidden px-5 py-5 mt-6 space-y-4 bg-white rounded-xl md:py-8 md:px-8",children:[(0,t.jsx)(p.O,{className:"mb-4 w-32 h-6"}),(0,t.jsx)("div",{className:"grid grid-cols-4 gap-4 md:grid-cols-8",children:[1,2,3,4,5,6,7,8].map(e=>(0,t.jsx)(p.O,{className:"w-full h-8"},e))})]}),eo=()=>(0,t.jsxs)("div",{className:"p-5 mt-5 bg-white rounded-md md:mt-8",children:[(0,t.jsx)(p.O,{className:"mb-6 w-32 h-6"}),(0,t.jsx)("div",{className:"p-6 rounded-lg bg-gray-50/80",children:(0,t.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:gap-12",children:[(0,t.jsxs)("div",{className:"text-center md:text-left",children:[(0,t.jsx)(p.O,{className:"mx-auto mb-2 w-16 h-16 md:mx-0"}),(0,t.jsx)("div",{className:"flex gap-0.5 justify-center md:justify-start mt-2",children:[1,2,3,4,5].map(e=>(0,t.jsx)(p.O,{className:"w-4 h-4"},e))}),(0,t.jsx)(p.O,{className:"mx-auto mt-1 w-16 h-4 md:mx-0"})]}),(0,t.jsx)("div",{className:"flex-1",children:[1,2,3,4,5].map(e=>
1(0,t.jsxs)("div",{className:"flex gap-2 items-center p-1 w-full",children:[(0,t.jsx)(p.O,{className:"w-14 h-4"}),(0,t.jsx)(p.O,{className:"flex-1 h-2"}),(0,t.jsx)(p.O,{className:"w-8 h-4"})]},e))})]})}),(0,t.jsxs)("div",{className:"mt-8",children:[(0,t.jsx)(p.O,{className:"mb-6 w-32 h-6"}),(0,t.jsx)("div",{className:"divide-y",children:[1,2,3].map(e=>(0,t.jsx)("div",{className:"py-6",children:(0,t.jsxs)("div",{className:"flex gap-3 items-start",children:[(0,t.jsx)(p.O,{className:"w-10 h-10 rounded-full shrink-0"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between",children:[(0,t.jsx)(p.O,{className:"w-24 h-5"}),(0,t.jsx)("div",{className:"flex gap-0.5 mt-1 sm:mt-0",children:[1,2,3,4,5].map(e=>(0,t.jsx)(p.O,{className:"w-4 h-4"},e))})]}),(0,t.jsx)(p.O,{className:"mt-1 w-32 h-4"}),(0,t.jsxs)("div",{className:"mt-3 space-y-2",children:[(0,t.jsx)(p.O,{className:"w-full h-4"}),(0,t.jsx)(p.O,{className:"w-3/4 h-4"})]})]})]})},e))})]})]}),ec=e=>{let{skuId:l}=e,[a,s]=(0,u.useState)(!0);return((0,u.useEffect)(()=>{if(l){let e=setTimeout(()=>s(!1),1e3);return()=>clearTimeout(e)}},[l]),!l||a)?(0,t.jsx)(eo,{}):(0,t.jsx)(Z,{skuId:l})},eu=()=>(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{className:"relative",children:(0,t.jsx)("div",{className:"bg-gray-100",children:(0,t.jsxs)(s.Z,{className:"lg:px-[150px]",children:[(0,t.jsx)(et,{}),(0,t.jsxs)("div",{className:"grid gap-8 mx-auto mt-3 md:grid-cols-5",children:[(0,t.jsx)(es,{}),(0,t.jsx)(ei,{})]}),(0,t.jsx)(ed,{}),(0,t.jsx)(er,{}),(0,t.jsxs)("div",{className:"p-5 mt-5 bg-white rounded-md",children:[(0,t.jsx)(p.O,{className:"mb-4 w-32 h-6"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(p.O,{className:"w-full h-4"}),(0,t.jsx)(p.O,{className:"w-3/4 h-4"})]})]}),(0,t.jsx)(en,{})]})})})}),em=e=>{var l,a,d,m,p,O,D,I,F,L,Z,K,T,Y,X,et,es,ei,ed,er,en,eo,em,ev,ex,eh,ef,eg,ep,eb,ej,eN,ey,ew,eA,eS,ek,eC,eE,eO,eP,eM,ez,eR,eD,e_,eV,eB,eI,eU,eF,eL,eZ,eG,eK,eT,eQ,eq,eH,eY,eX,eW,eJ,e$,e0,e1,e4,e2,e3,e8,e5,e9,e6,e7,le;let ll=A.SX.useUtils(),{redirectToSignIn:la}=(0,j.Z)(),{isAuth:lt}=(0,u.useContext)(b.S),ls=(0,g.$)(),[li,ld]=(0,u.useState)(null),[lr,ln]=(0,u.useState)(!1),[lo,lc]=(0,u.useState)(!1),[lu,lm]=(0,u.useState)(!1),lv=(0,M.useRouter)(),[lx,lh]=(0,u.useState)(!1),[lf,lg]=(0,u.useState)(0),lp=A.SX.products.presales.isPreExpoSalesLaunchDay.useQuery({expo:e.data.expoSlug},{staleTime:1e4}),lb=A.SX.products.presales.getPresaleProductBySlug.useQuery({slug:e.data.slug},{}),lj=A.SX.exhibitions.expo.getExpoDetailsBySlug.useQuery({slug:null!==(eM=e.data.expoSlug)&&void 0!==eM?eM:""},{enabled:!!e.data.expoSlug}),lN=lb.isFetching||lj.isLoading||lp.isLoading,{register:ly,getValues:lw,setValue:lA,watch:lS}=(0,z.cI)({values:{variant:null===(l=null===(a=lb.data)||void 0===a?void 0:null===(d=a.variants)||void 0===d?void 0:d.find(e=>e.stock>(null!==(ez=e.quantityPurchased)&&void 0!==ez?ez:0)))||void 0===l?void 0:null===(m=l._id)||void 0===m?void 0:m.toString()}}),lk=lS("variant");(0,u.useMemo)(()=>{var e,l;return null===(e=lb.data)||void 0===e?void 0:null===(l=e.originalPrice)||void 0===l?void 0:l.toFixed(2)},[null===(p=lb.data)||void 0===p?void 0:p.originalPrice]);let lC=(0,u.useMemo)(()=>{var e,l,a,t,s,i,d,r,n,o;return(null==lb?void 0:null===(e=lb.data)||void 0===e?void 0:e.hasVoucher)?null===(d=null==lb?void 0:null===(r=lb.data)||void 0===r?void 0:null===(n=r.variants)||void 0===n?void 0:n.find(e=>{var l;return(null===(l=e._id)||void 0===l?void 0:l.toString())===lk}))||void 0===d?void 0:null===(o=d.afterVoucherDiscountedPrice)||void 0===o?void 0:o.toFixed(2):null===(l=null==lb?void 0:null===(a=lb.data)||void 0===a?void 0:null===(t=a.variants)||void 0===t?void 0:t.find(e=>{var l;return(null===(l=e._id)||void 0===l?void 0:l.toString())===lk}))||void 0===l?void 0:null===(s=l.discountedPrice)||void 0===s?void 0:null===(i=s.amount)||void 0===i?void 0:i.toFixed(2)},[null==lb?void 0:null===(O=lb.data)||void 0===O?void 0:O.variants,lk]),lE=(0,u.useMemo)(()=>{var e;return Number(null===(e=lb.data)||void 0===e?void 0:e.originalPrice)},[null===(D=lb.data)||void 0===D?void 0:D.originalPrice]),lO=(0,u.useMemo)(()=>
1{var e,l,a,t,s,i,d,r,n,o,c,u;let m=null===(e=lb.data)||void 0===e?void 0:e.hasStock;if(m&&(null==lb?void 0:null===(l=lb.data)||void 0===l?void 0:l.hasVoucher))return Number(null===(n=null==lb?void 0:null===(o=lb.data)||void 0===o?void 0:null===(c=o.variants)||void 0===c?void 0:c.find(e=>{var l;return(null===(l=e._id)||void 0===l?void 0:l.toString())===lk}))||void 0===n?void 0:null===(u=n.afterVoucherDiscountedPrice)||void 0===u?void 0:u.toFixed(2));let v=Number(null===(a=null==lb?void 0:null===(t=lb.data)||void 0===t?void 0:null===(s=t.variants)||void 0===s?void 0:s.find(e=>{var l;return(null===(l=e._id)||void 0===l?void 0:l.toString())===lk}))||void 0===a?void 0:null===(i=a.discountedPrice)||void 0===i?void 0:i.amount);return m?v:null==lb?void 0:null===(d=lb.data)||void 0===d?void 0:null===(r=d.discount)||void 0===r?void 0:r.from},[null==lb?void 0:null===(I=lb.data)||void 0===I?void 0:I.variants,lk,null===(F=lb.data)||void 0===F?void 0:F.hasStock]),lP=null!==(eR=null===(L=lb.data)||void 0===L?void 0:L.isDeposit)&&void 0!==eR&&eR,lM=(0,u.useMemo)(()=>{var e,l,a,t;return null!==(eD=null==lb?void 0:null===(e=lb.data)||void 0===e?void 0:null===(l=e.variants)||void 0===l?void 0:l.find(e=>{var l;return(null===(l=e._id)||void 0===l?void 0:l.toString())===lk}))&&void 0!==eD?eD:null==lb?void 0:null===(a=lb.data)||void 0===a?void 0:null===(t=a.variants)||void 0===t?void 0:t[0]},[null==lb?void 0:null===(Z=lb.data)||void 0===Z?void 0:Z.variants,lk]),lz=(0,u.useMemo)(()=>{var e,l;return Number(null!==(l=null==lM?void 0:null===(e=lM.discountedPrice)||void 0===e?void 0:e.amount)&&void 0!==l?l:0)},[lM]),lR=(0,u.useMemo)(()=>{var e,l;return lP?Number(null!==(l=null==lM?void 0:null===(e=lM.fullDiscountedPrice)||void 0===e?void 0:e.amount)&&void 0!==l?l:0):Number(null!=lO?lO:0)},[lP,lO,lM]),lD=lP?Math.max((lR>0?lR:lE)-lz,0):0,{priceDelta:l_,discountPercentString:lV}=(0,u.useMemo)(()=>{if(!lE||!lR||isNaN(lE)||isNaN(lR))return{priceDelta:0,discountPercentString:"0"};let e=Math.max(0,lE-lR),l=Math.min(100,Math.max(0,0===lE?0:e/lE*100)).toFixed(0);return{priceDelta:e,discountPercentString:l}},[lE,lR]),lB=l_>0,lI=(0,u.useMemo)(()=>{var e,l,a,t;return(null===(e=null==lb?void 0:null===(l=lb.data)||void 0===l?void 0:null===(a=l.variants)||void 0===a?void 0:a.find(e=>{var l;return(null===(l=e._id)||void 0===l?void 0:l.toString())===lk}))||void 0===e?void 0:null===(t=e.discountedPrice)||void 0===t?void 0:t.currency)||"MYR"},[null==lb?void 0:null===(K=lb.data)||void 0===K?void 0:K.variants,lk]),lU=A.SX.products.carts.addPresaleToCart.useMutation({onSuccess:()=>{var e,l,a,t,s,i,d;ll.products.carts.countCartItems.invalidate(),ls.showAlert("Item added to cart","success"),(0,N.f)({event:"add_to_cart",ecommerce:{currency:lI,value:lp.data&&(null!==(s=Number(lC))&&void 0!==s?s:0),items:[{item_id:null===(e=lb.data)||void 0===e?void 0:null===(l=e._id)||void 0===l?void 0:l.toString(),item_name:null===(a=lb.data)||void 0===a?void 0:a.name,discount:lp.data&&(null!==(i=Number(lO))&&void 0!==i?i:0),item_brand:null===(t=lb.data)||void 0===t?void 0:t.brand,price:lp.data&&(null!==(d=Number(lC))&&void 0!==d?d:0)}]}})},onError:e=>{ls.showAlert(e.message,"error")}}),lF=A.SX.digitalVouchers.vouchers.grabVoucher.useMutation({onSuccess:()=>{ll.products.presales.getPresaleProductBySlug.invalidate(),ls.showAlert("Voucher grabbed successfully!","success")},onError:e=>{ls.showAlert(e.message,"error")}});(0,u.useEffect)(()=>{var e,l,a,t,s;(null===(e=lb.data)||void 0===e?void 0:null===(l=e.images)||void 0===l?void 0:l.length)&&ld(null!==(s=null===(a=lb.data)||void 0===a?void 0:null===(t=a.images)||void 0===t?void 0:t[0])&&void 0!==s?s:null)},[null===(T=lb.data)||void 0===T?void 0:T.images]),(0,u.useEffect)(()=>{var e,l,a,t,s,i,d;(0,v.xb)(lb.data)||(0,N.f)({event:"view_item",ecommerce:{currency:lI,value:lp.data&&(null!==(s=Number(lC))&&void 0!==s?s:0),items:[{item_id:null===(e=lb.data)||void 0===e?void 0:null===(l=e._id)||void 0===l?void 0:l.toString(),item_name:null===(a=lb.data)||void 0===a?void 0:a.name,discount:lp.data&&(null!==(i=Number(lO))&&void 0!==i?i:0),item_brand:null===(t=lb.data)||void 0===t?void 0:t.brand,price:lp.data&&(null!==(d=Number(lC))&&void 0!==d?d:0)}]}})},[lb.data]);let[lL,lZ]=(0,u.useState)();lL&&(0,V.ur)(lL);let lG=null!==(e_=null===(Y=e.data)||void 0===Y?void 0:null===(X=Y.expoDetails)||void 0===X?void 0:X.preExpoSalePurchaseEnable)&&void 0!==e_&&e_,lK=lG?null===(et=lb.data)||void 0===et?void 0:et.allowPresale:null===(es=lb.data)||void 0===es?void 0:es.allowBrandContinuePES;(0,u.useEffect)(()=>{var e,l;lZ(null===(e=lj.data)||void 0===e?void 0:null===(l=e.preExpoSaleBuyerAlertMsg)||void 0===l?void 0:l.toString())},[lj]);let lT=(0,u.useMemo)(()=>{let l=lv.query.slug,a=e.data.expoSlug,t=window.location.origin;return"".concat(t,"/m/expo/presale/details/").concat(l).concat(a?"?expoSlug=".concat(a):"")},[lv.query.slug,e.data.expoSlug]),lQ=(0,u.useMemo)(()=>{var e;return(null===(e=lb.data)||void 0===e?void 0:e.name)||"Pre-Expo Sale Product"},[null===(ei=lb.data)||void 0===ei?void 0:ei.name]),lq=(0,u.useMemo)(()=>"Check out this Pre-Expo Sale Product! - ".concat(lQ),[lQ]),lH=(0,u.useCallback)(()=>{lm(!0)},[]),lY=(0,u.useCallback)(async()=>{try{await (0,J.vQ)(lT),ls.showAlert("Link copied to clipboard!","success")}catch(e){ls.showAlert("Failed to copy link","error")}},[lT,ls]),lX=(0,u.useCallback)(async()=>
1{if((0,J.zf)())try{await navigator.share({title:lQ,text:lq,url:lT})}catch(e){e.name}},[lQ,lq,lT]);return lN?(0,t.jsx)(eu,{}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.Z,{title:null===(ed=lb.data)||void 0===ed?void 0:null===(er=ed.name)||void 0===er?void 0:er.trim(),image:null!=li?li:""}),(0,t.jsx)("div",{className:"relative",children:(0,t.jsx)("div",{className:"bg-gray-100",children:(0,t.jsxs)(s.Z,{className:"lg:px-[150px]",children:[(0,t.jsx)("div",{className:"text-sm",children:(0,t.jsx)(n.aG,{className:"max-w-2xl",children:(0,t.jsxs)(n.Jb,{children:[(0,t.jsx)(n.gN,{children:(0,t.jsx)(n.At,{asChild:!0,children:(0,t.jsx)(P(),{href:"/",children:"Home"})})}),(0,t.jsx)(n.bg,{}),(0,t.jsx)(n.gN,{children:(0,t.jsx)(n.At,{asChild:!0,children:(0,t.jsx)(P(),{href:"/expo?expoSlug=".concat(null===(eI=lb.data)||void 0===eI?void 0:eI.expoSlug),children:null===(eU=lb.data)||void 0===eU?void 0:eU.expoName})})}),(0,t.jsx)(n.bg,{}),(0,t.jsx)(n.gN,{children:(0,t.jsx)(n.At,{asChild:!0,className:"font-bold",children:(0,t.jsx)(P(),{href:"/expo/presale?expoSlug=".concat(null==lb?void 0:null===(eF=lb.data)||void 0===eF?void 0:eF.expoSlug),children:"Pre-Expo Sale"})})}),(0,t.jsx)(n.bg,{}),(0,t.jsx)(n.gN,{children:(0,t.jsx)(n.AG,{className:"w-48 truncate",children:null==lb?void 0:null===(eL=lb.data)||void 0===eL?void 0:eL.name})})]})})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-8 mx-auto mt-3 md:grid-cols-5",children:[(0,t.jsx)("div",{className:"flex flex-row gap-4 md:col-span-2",children:(0,t.jsxs)("div",{className:"w-full rounded-md aspect-square",children:[(0,t.jsx)("div",{className:"overflow-hidden bg-white rounded cursor-pointer",onClick:()=>{lg(0),lh(!0)},children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("div",{className:"absolute top-0 left-0 w-full h-full transition-opacity duration-300 hover:opacity-0",children:[!(null===(eZ=lb.data)||void 0===eZ?void 0:null===(eG=eZ.voucherCode)||void 0===eG?void 0:eG.includes("FLASH"))&&!U().includes(null==lb?void 0:null===(eK=lb.data)||void 0===eK?void 0:eK.tags,"isFlashSale")&&U().includes(null==lb?void 0:null===(eT=lb.data)||void 0===eT?void 0:eT.tags,"isUnbeatable")&&(null==lj?void 0:null===(eQ=lj.data)||void 0===eQ?void 0:eQ.preExpoSaleProductOverlayCorner)?(0,t.jsx)(_(),{src:null==lj?void 0:null===(eq=lj.data)||void 0===eq?void 0:eq.preExpoSaleProductOverlayCorner,height:138,width:437,alt:"Promotions",className:"absolute top-1 left-1 w-[40%]"}):(0,t.jsx)(t.Fragment,{}),((null===(eH=lb.data)||void 0===eH?void 0:eH.hasVoucher)&&(null===(eY=lb.data)||void 0===eY?void 0:null===(eX=eY.voucherCode)||void 0===eX?void 0:eX.includes("FLASH"))||U().includes(null==lb?void 0:null===(eW=lb.data)||void 0===eW?void 0:eW.tags,"isFlashSale"))&&(null==lj?void 0:null===(eJ=lj.data)||void 0===eJ?void 0:eJ.preExpoSaleProductOverlayCornerMarkdown)?(0,t.jsx)(_(),{src:null==lj?void 0:null===(e$=lj.data)||void 0===e$?void 0:e$.preExpoSaleProductOverlayCornerMarkdown,width:437,height:138,alt:"Promotions",className:"absolute top-1 left-1 w-[40%]"}):(0,t.jsx)(t.Fragment,{}),(null==lj?void 0:null===(e0=lj.data)||void 0===e0?void 0:e0.preExpoSaleProductOverlay)&&(0,t.jsx)(_(),{src:null==lj?void 0:null===(e1=lj.data)||void 0===e1?void 0:e1.preExpoSaleProductOverlay,width:600,height:87,alt:"Promotions",className:"absolute bottom-0 left-0 w-[100%] "}),lP&&(0,t.jsx)("div",{className:"flex absolute top-2 right-2 z-20 flex-col items-end",children:(0,t.jsx)(y.g,{className:"max-w-[80px]"})})]}),(0,t.jsx)(_(),{src:null!=li?li:"",alt:null!==(e9=null!==(e5=null===(e4=lb.data)||void 0===e4?void 0:e4.name)&&void 0!==e5?e5:li)&&void 0!==e9?e9:"image",width:500,height:500,className:"object-cover m-auto aspect-square"})]})}),(0,t.jsx)("div",{className:"h-4"}),(0,t.jsxs)(o.lr,{className:"mx-auto w-full",children:[(0,t.jsx)(o.KI,{className:"-ml-1",children:null===(e2=lb.data)||void 0===e2?void 0:null===(e3=e2.images)||void 0===e3?void 0:e3.map((e,l)=>{var a;return(0,t.jsx)(o.d$,{className:"pl-1 cursor-pointer basis-1/3",onClick:()=>{ld(null!=e?e:null),lg(l),lh(!0)},children:(0,t.jsx)("div",{className:(0,v.cn)(["p-1 bg-white rounded ",li===e&&"border-baby-yellow-900 border-2"]),children:(0,t.jsx)(_(),{src:null!=e?e:"",alt:null!==(e7=null!==(e6=null===(a=lb.data)||void 0===a?void 0:a.name)&&void 0!==e6?e6:li)&&void 0!==e7?e7:"image",height:300,width:300,className:"object-cover aspect-square"})})},null==e?void 0:e.toString())})}),(null!==(le=null===(e8=lb.data)||void 0===e8?void 0:e8.images)&&void 0!==le?le:[]).length>3&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.am,{className:"left-0 h-[40%] rounded-none bg-black text-white hover:bg-black/90 hover:text-white"}),(0,t.jsx)(o.Pz,{className:"right-0 h-[40%] rounded-none bg-black text-white hover:bg-black/90 hover:text-white"})]})]})]})}),(0,t.jsx)("div",{className:"p-5 mt-5 h-full bg-white rounded-md md:col-span-3 md:mt-0",children:(()=>{var l,a,s,i,d,n,o,u,m,g,p,b,j,N,y,A,E,O,M,z,D,_,V,B,I,U,F,L,Z,K,T,Y,X,W,J,$,ee,el,ea,et,es,ei,ed,er,en,eo,ec,eu,em,ev,ex,eh,ef,eg;let ep=null===(l=lb.data)||void 0===l?void 0:l.voucherStatus,eb=null===(a=null===(s=lb.data)||void 0===s?void 0:null===(i=s.variants)||void 0===i?void 0:i.find(e=>{var l;return(null===(l=e._id)||void 0===l?void 0:l.toString())===lk}))||void 0===a?void 0:a.afterVoucherDiscountedPrice,ej=Number(null===(d=lb.data)||void 0===d?void 0:d.originalPrice)||0,eN=Number(null===(n=null==lb?void 0:null===(o=lb.data)||void 0===o?void 0:null===(u=o.variants)||void 0===u?void 0:u.find(e=>{var l;return(null===(l=e._id)||void 0===l?void 0:l.toString())===lk}))||void 0===n?void 0:null===(m=n.discountedPrice)||void 0===m?void 0:m.amount)||0,ey=eb&&"number"==typeof eb?eb:0,ew=ey>0&&ey<eN?eN-ey:0,eA=(null==lb?void 0:null===(g=lb.data)||void 0===g?void 0:g.currency)||"RM",eS=Math.max(0,ej-eN);return(0,t.jsxs)("div",{className:"flex flex-col gap-4 justify-between h-full",children:[(0,t.jsxs)("div",{children:[ep&&(0,t.jsx)(Q,{voucherStatus:ep,voucherDetails:{discountValue:ew>0?ew:void 0,discountType:"fixed",title:(null===(p=lb.data)||void 0===p?void 0:p.voucherName)||"Shop Voucher",code:(null===(b=lb.data)||void 0===b?void 0:b.voucherCode)||void 0,currency:eA},onGrab:()=>{var l,a,t,s;if(!lt)return la();(null===(l=lb.data)||void 0===l?void 0:l.voucherId)&&e.data.expoSlug&&lF.mutate({expoId:null!==(s=null===(a=lj.data)||void 0===a?void 0:null===(t=a._id)||void 0===t?void 0:t.toString())&&void 0!==s?s:"",voucherId:lb.data.voucherId,quantity:1})},onUse:()=>{ls.showAlert("Voucher redemption feature coming soon!","info")}}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 items-stretch",children:[(0,t.jsx)("div",{className:"flex justify-center items-center px-5 py-1 text-xs font-bold text-center text-white rounded-md bg-baby-teal-800",children:"Pre-Expo Sale"}),lP&&(0,t.jsx)("div",{className:"flex justify-center items-center px-5 py-1 text-xs font-bold text-center rounded-md border border-black",children:"Deposit"}),!(null===(j=lb.data)||void 0===j?void 0:j.hasStock)&&(0,t.jsx)("div",{className:"flex justify-center items-center px-5 py-1 text-xs font-bold text-center text-white rounded-md bg-baby-red-900",children:"Out of Stock"}),(0,t.jsx)("div",{className:"flex text-sm font-bold",children:(0,t.jsx)(c.Z,{hall:null===(N=lb.data)||void 0===N?void 0:N.hall,booth:null===(y=lb.data)||void 0===y?void 0:y.booth,size:12,className:"flex gap-3 items-center px-3 py-1 rounded-md bg-baby-yellow-900 md:px-5"})})]}),(0,t.jsx)("div",{className:"mt-5 space-y-2 md:space-y-3",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-base font-extrabold flex gap-0.5 items-start",children:(0,t.jsx)(P(
1),{href:"/brands/".concat(null===(A=lb.data)||void 0===A?void 0:A.brandSlug,"?company=").concat(null===(E=lb.data)||void 0===E?void 0:E.company,"&expoSlug=").concat(e.data.expoSlug),className:"text-base font-extrabold",children:null===(O=lb.data)||void 0===O?void 0:O.brand})}),(0,t.jsxs)("div",{className:"flex gap-3 items-center",children:[(0,t.jsx)("div",{className:"text-xl font-medium break-words flex-1",children:null===(M=lb.data)||void 0===M?void 0:M.name}),(0,t.jsx)("button",{onClick:lH,className:"flex items-center justify-center w-10 h-10 transition-colors bg-gray-100 rounded-full hover:bg-gray-200",title:"Share this product","aria-label":"Share this product",children:(0,t.jsx)(S.Z,{size:20,className:"text-gray-700"})})]}),(null===(z=lb.data)||void 0===z?void 0:z.uniqueSellingPoint)&&(0,t.jsx)("div",{className:"mt-1 text-sm text-gray-500 truncate break-words line-clamp-1",children:null===(D=lb.data)||void 0===D?void 0:D.uniqueSellingPoint}),(null===(_=lb.data)||void 0===_?void 0:_.tagline)&&(0,t.jsx)("div",{className:"px-2 py-2 mt-4 font-bold text-black whitespace-normal break-words bg-gradient-to-r from-yellow-200 to-transparent",children:null===(V=lb.data)||void 0===V?void 0:V.tagline})]})}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mt-5 md:mt-6",children:(0,t.jsxs)(x,{openDelay:200,...!lP&&(eS>0||ew>0)?{}:{open:!1},children:[(0,t.jsx)(h,{asChild:!0,children:(0,t.jsx)("button",{className:"w-full text-left",children:(0,t.jsxs)("div",{className:"cursor-default group",children:[(0,t.jsxs)("div",{className:"flex items-center",children:[lB?(0,t.jsx)("div",{className:"text-gray-400 line-through",children:(0,w.BK)(null===(B=lb.data)||void 0===B?void 0:B.currency,null!=lE?lE:0)}):null,lp.data&&lB?(0,t.jsxs)("div",{className:"flex items-center ml-4",children:[(0,t.jsx)(R.qL$,{className:"text-baby-red-900"}),(0,t.jsxs)("div",{className:"text-baby-red-900",children:[lV,"%"]})]}):null]}),(0,t.jsx)("div",{className:(0,v.cn)(["flex gap-4 justify-between items-center",lP&&lR<=0?"hidden":""]),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("div",{className:lP?"font-bold text-[1.3em] leading-[1.2em] text-gray-500 line-through":"font-extrabold text-[2em] leading-[1.2em]",children:(0,t.jsxs)("div",{className:"flex relative gap-1 items-center",children:[(0,t.jsx)("div",{children:lP?(0,w.BK)(null===(I=lb.data)||void 0===I?void 0:I.currency,null!=lR?lR:0,{mask:!lp.data}):(null===(U=lb.data)||void 0===U?void 0:U.hasStock)?(0,w.BK)(null===(F=lb.data)||void 0===F?void 0:F.currency,null!==(eh=Number(lC))&&void 0!==eh?eh:0,{mask:!lp.data}):(0,w.BK)(null===(L=lb.data)||void 0===L?void 0:L.currency,null!==(ef=Number(null===(Z=lb.data)||void 0===Z?void 0:Z.discount.from))&&void 0!==ef?ef:0,{mask:!lp.data})}),(null===(K=lb.data)||void 0===K?void 0:K.hasVoucher)&&(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(k.Z,{size:24,className:"text-baby-red-900"}),(0,t.jsx)("div",{className:"absolute right-[-2px] bottom-0",children:(0,t.jsx)(H.ZSR,{size:12,className:"bg-white rounded-full text-baby-red-900"})})]})]})}),(0,t.jsxs)("div",{className:"mt-2 ml-3 font-bold",children:["/ ",null===(T=lb.data)||void 0===T?void 0:T.unit]})]})}),lp.data&&lB?(0,t.jsxs)("div",{className:"text-gray-400",children:["Save ",(0,w.BK)(null===(Y=lb.data)||void 0===Y?void 0:Y.currency,null!=l_?l_:0,{})]}):null,lP?(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)("div",{className:"flex gap-3 items-baseline",children:[(0,t.jsx)("div",{className:"font-extrabold text-[2em] leading-[1.2em]",children:(0,w.BK)(null===(X=lb.data)||void 0===X?void 0:X.currency,null!=lz?lz:0,{mask:!lp.data})}),(0,t.jsx)("div",{className:"text-sm font-bold",children:"Deposit Pay Now"})]}),(0,t.jsx)("div",{className:"mt-1 text-sm text-gray-600",children:lp.data&&lD>0?"Remaining balance ".concat((0,w.BK)(null===(W=lb.data)||void 0===W?void 0:W.currency,lD)," upon collection"):"Remaining balance payable upon collection"})]}):null,(null===(J=lb.data)||void 0===J?void 0:J.hasVoucher)&&(0,t.jsx)("div",{className:"flex gap-1 items-center mt-2 text-sm text-baby-red-900",children:(null===($=lb.data)||void 0===$?void 0:null===(ee=$.voucherStatus)||void 0===ee?void 0:ee.isGrabVoucher)?(null===(el=lb.data)||void 0===el?void 0:null===(ea=el.voucherStatus)||void 0===ea?void 0:ea.hasGrabbed)?(0,t.jsxs)("div",{children:["Apply voucher ",(0,t.jsxs)("b",{children:['"',null===(et=lb.data)||void 0===et?void 0:et.voucherName,'"']})," during checkout"]}):(0,t.jsxs)("div",{children:["Claim voucher ",(0,t.jsxs)("b",{children:['"',null===(es=lb.data)||void 0===es?void 0:es.voucherName,'"']})," to get this savings"]}
1):(0,t.jsxs)("div",{children:["Use voucher code ",(0,t.jsxs)("b",{children:['"',null===(ei=lb.data)||void 0===ei?void 0:ei.voucherCode,'"']})," during checkout"]})})]})})}),(0,t.jsx)(f,{className:"w-80",side:"bottom",align:"start",sideOffset:-20,children:(0,t.jsx)(q,{originalPrice:ej,productDiscount:eS,voucherDiscount:ew,finalPrice:ey>0?ey:eN,currency:eA,mask:!lp.data})})]})}),(null!==(eg=null==lb?void 0:null===(ed=lb.data)||void 0===ed?void 0:ed.variants)&&void 0!==eg?eg:[]).length>1&&(0,t.jsx)("div",{className:"mt-6 space-y-2",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:null==lb?void 0:null===(er=lb.data)||void 0===er?void 0:null===(en=er.variants)||void 0===en?void 0:en.map(e=>{var l,a,s;let i=e.stock<=(null!==(s=e.quantityPurchased)&&void 0!==s?s:0),d=lS("variant")===(null===(l=e._id)||void 0===l?void 0:l.toString());return(0,t.jsx)("button",{type:"button",disabled:i,onClick:()=>{var l,a,t;lA("variant",null===(l=e._id)||void 0===l?void 0:l.toString()),(null===(a=e.image)||void 0===a?void 0:null===(t=a.url)||void 0===t?void 0:t.original)&&ld(e.image.url.original)},className:(0,v.cn)("px-3 py-2 text-sm font-medium rounded-lg border-2 transition-colors select-none",i?"text-gray-400 bg-gray-100 border-gray-200 cursor-not-allowed":d?"text-white bg-black border-black":"text-gray-700 bg-white border-gray-200 hover:border-gray-300"),children:i?"".concat(e.name," - Out of Stock"):e.name},null===(a=e._id)||void 0===a?void 0:a.toString())})})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("hr",{className:"my-8"}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 md:flex-row md:gap-4 md:items-center",children:[(0,t.jsx)(r.default,{color:"red",label:"",disabled:lU.isPending||!(null===(eo=lb.data)||void 0===eo?void 0:eo.hasStock)||!lK,onClick:()=>{var e,l,a,t;if(lK){if(!lt)return la();(null!==(l=null===(e=lb.data)||void 0===e?void 0:e.variants)&&void 0!==l?l:[]).length>0&&lU.mutate({presaleId:null===(a=lb.data)||void 0===a?void 0:null===(t=a._id)||void 0===t?void 0:t.toString(),variantId:lw("variant")})}},children:(0,t.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,t.jsx)(C.Z,{size:20}),(0,t.jsx)("span",{className:"font-semibold",children:(null===(ec=lb.data)||void 0===ec?void 0:ec.hasStock)?"Add To Cart":"Out of Stock"})]})}),!(null===(eu=lb.data)||void 0===eu?void 0:eu.hasStock)&&(null===(em=lb.data)||void 0===em?void 0:em.starbuySlug)&&(0,t.jsx)(r.default,{color:"yellow",label:"",onClick:()=>{var l;lv.push("/expo/starbuy/details/".concat(null===(l=lb.data)||void 0===l?void 0:l.starbuySlug,"?expoSlug=").concat(e.data.expoSlug))},children:(0,t.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,t.jsx)(G.UzH,{size:20}),(0,t.jsx)("span",{className:"font-semibold",children:"Available in Starbuy"})]})})]}),(0,t.jsx)("div",{className:"mt-4 text-sm text-gray-500",children:(0,t.jsxs)("div",{className:"flex gap-4 justify-between items-center",children:[(null===(ev=lb.data)||void 0===ev?void 0:ev.totalSold)?(0,t.jsxs)("span",{children:["Sold: ",(0,w.uf)(Number(lb.data.totalSold))]}):null,(null===(ex=lb.data)||void 0===ex?void 0:ex.wishlistCount)?(0,t.jsxs)("span",{children:[(0,w.uf)(Number(lb.data.wishlistCount))," Wishlisted"]}):null]})}),(0,t.jsx)("hr",{className:"mt-8 mb-4"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:(0,t.jsx)("div",{className:"ql-editor fix-buyerAlertMsg",style:{},children:(0,t.jsx)("div",{dangerouslySetInnerHTML:{__html:null!=lL?lL:""}})})})]})]})})()})]}),(0,t.jsx)(el,{descriptions:null===(en=lb.data)||void 0===en?void 0:en.descriptions}),(null===(eo=lb.data)||void 0===eo?void 0:eo._id)&&(0,t.jsx)(ea,{productId:lb.data._id.toString(),expoSlug:e.data.expoSlug,preExpoSalePurchaseEnable:null!==(eV=null===(em=e.data.expoDetails)||void 0===em?void 0:em.preExpoSalePurchaseEnable)&&void 0!==eV&&eV}),(0,t.jsx)(ec,{skuId:null===(ev=lb.data)||void 0===ev?void 0:null===(ex=ev.skuId)||void 0===ex?void 0:ex.toString()}),(0,t.jsx)("div",{className:"overflow-hidden px-5 py-5 mt-6 space-y-4 bg-white rounded-xl md:py-8 md:px-8",children:(0,t.jsx)(B.Z,{size:"small"})})]})})}),(0,t.jsx)(W,{images:null!==(eB=null===(eh=lb.data)||void 0===eh?void 0:eh.images)&&void 0!==eB?eB:[],initialIndex:lf,isOpen:lx,onClose:()=>lh(!1),productName:null===(ef=lb.data)||void 0===ef?void 0:ef.name,overlayCornerImage:null==lj?void 0:null===(eg=lj.data)||void 0===eg?void 0:eg.preExpoSaleProductOverlayCorner,overlayCornerMarkdownImage:null==lj?void 0:null===(ep=lj.data)||void 0===ep?void 0:ep.preExpoSaleProductOverlayCornerMarkdown,overlayBottomImage:null==lj?void 0:null===(eb=lj.data)||void 0===eb?void 0:eb.preExpoSaleProductOverlay,showOverlayCorner:!(null===(ej=lb.data)||void 0===ej?void 0:null===(eN=ej.voucherCode)||void 0===eN?void 0:eN.includes("FLASH"))&&!U().includes(null==lb?void 0:null===(ey=lb.data)||void 0===ey?void 0:ey.tags,"isFlashSale")&&U().includes(null==lb?void 0:null===(ew=lb.data)||void 0===ew?void 0:e
1w.tags,"isUnbeatable")&&!!(null==lj?void 0:null===(eA=lj.data)||void 0===eA?void 0:eA.preExpoSaleProductOverlayCorner),showOverlayCornerMarkdown:((null===(eS=lb.data)||void 0===eS?void 0:eS.hasVoucher)&&(null===(ek=lb.data)||void 0===ek?void 0:null===(eC=ek.voucherCode)||void 0===eC?void 0:eC.includes("FLASH"))||U().includes(null==lb?void 0:null===(eE=lb.data)||void 0===eE?void 0:eE.tags,"isFlashSale"))&&!!(null==lj?void 0:null===(eO=lj.data)||void 0===eO?void 0:eO.preExpoSaleProductOverlayCornerMarkdown)}),(0,t.jsx)(ee.Vq,{open:lu,onOpenChange:lm,children:(0,t.jsxs)(ee.cZ,{className:"max-w-lg max-h-[90vh] overflow-hidden flex flex-col",children:[(0,t.jsx)(ee.fK,{className:"flex-shrink-0",children:(0,t.jsx)(ee.$N,{children:"Share Product"})}),(0,t.jsxs)("div",{className:"overflow-y-auto flex-1 pr-1 space-y-4",children:[(0,t.jsx)("div",{className:"p-4 bg-white rounded-lg border border-gray-200",children:(0,t.jsxs)("div",{className:"flex gap-4",children:[li&&(0,t.jsx)("div",{className:"flex-shrink-0 w-20 h-20 overflow-hidden rounded-lg",children:(0,t.jsx)(_(),{src:li,alt:lQ,width:80,height:80,className:"object-cover w-full h-full"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-gray-900 line-clamp-2",children:lQ}),(null===(eP=lb.data)||void 0===eP?void 0:eP.brand)&&(0,t.jsx)("div",{className:"mt-1 text-xs text-gray-600",children:lb.data.brand})]})]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"mb-3 text-sm font-semibold text-gray-900",children:"Send via Messaging App"}),(0,t.jsxs)("div",{className:"flex gap-4 justify-center",children:[(0,t.jsxs)($.N0,{url:lT,title:lq,className:"flex flex-col gap-2 items-center p-3 rounded-lg transition-all hover:bg-gray-50",children:[(0,t.jsx)($.ud,{size:48,round:!0}),(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700",children:"WhatsApp"})]}),(0,t.jsxs)($.tq,{url:lT,title:lq,className:"flex flex-col gap-2 items-center p-3 rounded-lg transition-all hover:bg-gray-50",children:[(0,t.jsx)($.YG,{size:48,round:!0}),(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700",children:"Telegram"})]}),(0,t.jsxs)($.Zh,{url:lT,appId:"",className:"flex flex-col gap-2 items-center p-3 rounded-lg transition-all hover:bg-gray-50",children:[(0,t.jsx)($.v2,{size:48,round:!0}),(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700",children:"Messenger"})]})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("h4",{className:"text-sm font-semibold text-gray-900",children:"Other Options"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)("button",{onClick:lY,className:"flex flex-1 gap-2 justify-center items-center px-4 py-3 text-sm font-medium text-gray-700 bg-white rounded-lg border border-gray-300 transition-all hover:bg-gray-50",children:[(0,t.jsx)(E.Z,{className:"w-4 h-4"}),"Copy Link"]}),(0,J.zf)()&&(0,t.jsxs)("button",{onClick:lX,className:"flex flex-1 gap-2 justify-center items-center px-4 py-3 text-sm font-medium text-gray-700 bg-white rounded-lg border border-gray-300 transition-all hover:bg-gray-50",children:[(0,t.jsx)(S.Z,{className:"w-4 h-4"}),"More"]})]})]})]}),(0,t.jsx)("div",{className:"flex-shrink-0 pt-4 border-t border-gray-200",children:(0,t.jsx)(r.default,{color:"white",label:"Close",fullWidth:!0,onClick:()=>lm(!1)})})]})})]})};var ev=!0,ex=em}},function(e){e.O(0,[1228,2013,260,3662,2077,7536,9238,4118,6039,2722,4290,581,4803,9774,2888,179],function(){return e(e.s=79176)}),_N_E=e.O()}]);

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.