1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="72b65fa3-9ca9-f416-2792-e4143859805f")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,558020,975772,e=>{"use strict";var t=e.i(843476),r=e.i(618566),a=e.i(284824),s=e.i(191089),n=e.i(413294),i=e.i(445231);function l({className:e=""}){let l=(0,r.useRouter)(),{cartInfo:o,userInfo:c,guestCart:d}=(0,n.useAppStore)(),u=!c?.isLoggedIn;if(!(u?d.length>0:!!(o&&o.cart?.length>0)))return null;let h=u?d.reduce((e,t)=>e+t.quantity,0):o?.cart?.reduce((e,t)=>e+(t.products?.reduce((e,t)=>e+(t.quantity??1),0)??0),0)??0,m=(()=>{if(u)return[(0,i.getProductImageUrl)(d[0]?.image_full_url)].filter(Boolean);let e=o?.cart??[],t=e=>{let t=e?.products?.[0],r=t?o?.item_details?.[t.item_id]:void 0;return(0,i.getProductImageUrl)(r?.item?.image_full_url)};return e.length>1?[t(e[0]),t(e[1])].filter(Boolean):[t(e[0])].filter(Boolean)})(),p=m.length>=2;return(0,t.jsxs)("button",{type:"button","data-cart-chip":!0,onClick:()=>l.push("/cart"),className:`flex h-[56px] shrink-0 items-center gap-2 rounded-full bg-gradient-to-br from-[#E04E96] to-[#B15177] pl-2.5 pr-3.5 shadow-[0_6px_18px_rgba(177,81,119,0.35)] transition-transform active:scale-[0.98] ${e}`,children:[p?(0,t.jsxs)("span",{className:"relative h-8 w-11 shrink-0",children:[(0,t.jsx)("span",{className:"absolute right-0 top-0 flex h-8 w-8 items-center justify-center overflow-hidden rounded-full border border-[#DBAFC0] bg-[#FBF7F8]",children:(0,t.jsx)("img",{src:m[1],alt:"",className:"h-full w-full object-contain","aria-hidden":!0})}),(0,t.jsx)("span",{className:"absolute left-0 top-0 flex h-8 w-8 items-center justify-center overflow-hidden rounded-full border border-[#DBAFC0] bg-[#FBF7F8]",children:(0,t.jsx)("img",{src:m[0],alt:"",className:"h-full w-full object-contain","aria-hidden":!0})})]}):(0,t.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-full border border-[#DBAFC0] bg-[#FBF7F8]",children:m[0]?(0,t.jsx)("img",{src:m[0],alt:"",className:"h-full w-full object-contain","aria-hidden":!0}):(0,t.jsx)(s.Bag2,{size:16,color:"#B15177",variant:"Bold"})}),(0,t.jsxs)("span",{className:"flex flex-col items-start leading-tight",children:[(0,t.jsxs)("span",{className:"flex items-center gap-0.5 text-sm font-semibold text-white",children:["Cart ",(0,t.jsx)(a.ArrowRight2,{size:14,color:"#FFFFFF"})]}),(0,t.jsxs)("span",{className:"text-[11px] font-medium text-white/90",children:[h," item",1===h?"":"s"]})]})]})}e.s(["default",()=>l],558020);let o=["/categories","/wishlist","/mobile-profile","/account"];function c(e,t){return!!("/"===e||e.startsWith("/category")&&!t)||o.some(t=>e===t||e.startsWith(`${t}/`))}e.s(["shouldShowBottomNav",()=>c],975772)},812842,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(618566),s=e.i(411861),n=["variant","color","size"],i=function(e){var t=e.color;return r.default.createElement(r.default.Fragment,null,r.default.createElement("path",{d:"m20.04 6.822-5.76-4.03c-1.57-1.1-3.98-1.04-5.49.13l-5.01 3.91c-1 .78-1.79 2.38-1.79 3.64v6.9c0 2.55 2.07 4.63 4.62 4.63h10.78c2.55 0 4.62-2.07 4.62-4.62v-6.78c0-1.35-.87-3.01-1.97-3.78Zm-7.29 11.18c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-3c0-.41.34-.75.75-.75s.75.34.75.75v3Z",fill:t}))},l=function(e){var t=e.color;return r.default.createElement(r.default.Fragment,null,r.default.createElement("path",{d:"M22 10.498c0-1.21-.81-2.76-1.8-3.45l-6.18-4.33c-1.4-.98-3.65-.93-5 .12l-5.39 4.2c-.9.7-1.63 2.19-1.63 3.32v7.41c0 2.32 1.89 4.22 4.21 4.22h11.58c2.32 0 4.21-1.9 4.21-4.21v-3.1M12 17.988v-3",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},o=function(e){var t=e.color;return r.default.createElement(r.default.Fragment,null,r.default.createElement("path",{opacity:".4",d:"m20.04 6.822-5.76-4.03c-1.57-1.1-3.98-1.04-5.49.13l-5.01 3.91c-1 .78-1.79 2.38-1.79 3.64v6.9c0 2.55 2.07 4.63 4.62 4.63h10.78c2.55 0 4.62-2.07 4.62-4.62v-6.78c0-1.35-.87-3.01-1.97-3.78Z",fill:t}),r.default.createElement("path",{d:"M12 18.75c-.41 0-.75-.34-.75-.75v-3c0-.41.34-.75.75-.75s.75.34.75.75v3c0 .41-.34.75-.75.75Z",fill:t}))},c=function(e){var t=e.color;return r.default.createElement(r.default.Fragment,null,r.default.createElement("path",{d:"m9.02 2.84-5.39 4.2C2.73 7.74 2 9.23 2 10.36v7.41c0 2.32 1.89 4.22 4.21 4.22h11.58c2.32 0 4.21-1.9 4.21-4.21V10.5c0-1.21-.81-2.76-1.8-3.45l-6.18-4.33c-1.4-.98-3.65-.93-5 .12ZM12 17.99v-3",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},d=function(e){var t=e.color;return r.default.createElement(r.default.Fragment,null,r.default.createElement("path",{d:"M17.79 22.75H6.21c-2.74 0-4.96-2.23-4.96-4.97v-7.41c0-1.36.84-3.07 1.92-3.91l5.39-4.2C10.18 1 12.77.94 14.45 2.12l6.18 4.33c1.19.83 2.12 2.61 2.12 4.06v7.28c0 2.73-2.22 4.96-4.96 4.96ZM9.48 3.44l-5.39 4.2c-.71.56-1.34 1.83-1.34 2.73v7.41a3.47 3.47 0 0 0 3.46 3.47h11.58c1.91 0 3.46-1.55 3.46-3.46v-7.28c0-.96-.69-2.29-1.48-2.83l-6.18-4.33c-1.14-.8-3.02-.76-4.11.09Z",fill:t}),r.default.createElement("path",{d:"M12 18.75c-.41 0-.75-.34-.75-.75v-3c0-.41.34-.75.75-.75s.75.34.75.75v3c0 .41-.34.75-.75.75Z",fill:t}))},u=function(e){var t=e.color;return r.default.createElement(r.default.Fragment,null,r.default.createElement("path",{d:"m9.02 2.838-5.39 4.2c-.9.7-1.63 2.19-1.63 3.32v7.41c0 2.32 1.89 4.22 4.21 4.22h11.58c2.32 0 4.21-1.9 4.21-4.21v-7.28c0-1.21-.81-2.76-1.8-3.45l-6.18-4.33c-1.4-.98-3.65-.93-5 .12Z",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),r.default.createElement("path",{opacity:".34",d:"M12 17.988v-3",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},h=function(e,t){switch(e){case"Bold":return r.default.createElement(i,{color:t});case"Broken":return r.default.createElement(l,{color:t});case"Bulk":return r.default.createElement(o,{color:t});case"Linear":default:return r.default.createElement(c,{color:t});case"Outline":return r.default.createElement(d,{color:t});case"TwoTone":return r.default.createElement(u,{color:t})}},m=(0,r.forwardRef)(function(e,t){var a=e.variant,i=e.color,l=e.size,o=void 0===l?"24":l,c=(0,s._)(e,n);return r.default.createElement("svg",(0,s.a)({},c,{xmlns:"http://www.w3.org/2000/svg",ref:t,width:o,height:o,viewBox:"0 0 24 24",fill:"none"}),h(void 0===a?"Linear":a,void 0===i?"currentColor":i))});m.displayName="Home2";var p=e.i(925358),f=e.i(160265),x=e.i(545785),g=e.i(291088),b=e.i(120162);let y=[{label:"Home",href:g.AppRoutes.HOME,Icon:m},{label:"Categories",href:g.AppRoutes.CATEGORIES,Icon:p.Category},{label:"Wishlist",href:g.AppRoutes.WISHLIST,Icon:f.Heart},{label:"Profile",href:g.AppRoutes.PROFILE,Icon:x.Profile}];function v({visible:e=!0,rightSlot:r}){let s=(0,a.usePathname)(),n=(0,a.useRouter)(),{isTablet:i,isMobile:l}=(0,b.useResponsive)(),o=e=>e===g.AppRoutes.HOME?"/"===s:e===g.AppRoutes.PROFILE?s.startsWith(g.AppRoutes.PROFILE)||s.startsWith(g.AppRoutes.MOBILE_PROFILE):s.startsWith(e),c=y.findIndex(e=>o(e.href)),d=100/y.length;return(0,t.jsx)("nav",{className:"fixed inset-x-0 bottom-0 z-50 px-3 transition-transform duration-300 ease-in-out lg:hidden",style:{transform:e?"translateY(0)":"translateY(140%)",paddingBottom:"calc(env(safe-area-inset-bottom, 0px) + 12px)"},children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"relative flex-1 rounded-full border border-[#F1F1F2] bg-white p-1 shadow-[0_1px_4px_rgba(0,0,0,0.1),0_-2px_10px_rgba(0,0,0,0.05)]",children:[c>=0&&(0,t.jsx)("div",{className:"absolute top-1 bottom-1 rounded-full border border-[#F1F1F2] bg-gradient-to-tl from-[#B15177]/10 to-white shadow-[0_1px_4px_rgba(0,0,0,0.05)] transition-[left] duration-300 ease-in-out",style:{width:`calc(${d}% - 8px)`,left:`calc(${c*d}% + 4px)`}}),(0,t.jsx)("div",{className:"relative flex",children:y.map(e=>{let r=o(e.href),{Icon:a}=e;return(0,t.jsxs)("button",{type:"button",onClick:()=>{var t;(t=e.href)===g.AppRoutes.PROFILE?n.push(l||i?g.AppRoutes.MOBILE_PROFILE:t):n.push(t)},"aria-label":e.label,className:"relative z-10 flex flex-1 flex-col items-center gap-0.5 py-2.5",children:[(0,t.jsx)(a,{size:22,variant:r?"Bold":"Linear",color:r?"#B15177":"#6A7282"}),(0,t.jsx)("span",{className:`text-[11px] ${r?"font-bold text-[#B15177]":"font-semibold text-[#6A7282]"}`,children:e.label})]},e.label)})})]}),r]})})}var w=e.i(846932),_=e.i(88653),j=e.i(284824),N=e.i(413294),C=e.i(882897),E=e.i(266027),S=e.i(901309);let k=["tracking","pills"];var A=e.i(861539);function P(e){return"return"===e.pill.order_type||null!=e.return_order_id?`${g.AppRoutes.ORDER_SUMMARY}?returnId=${e.return_order_id}`:`${g.AppRoutes.ORDER_SUMMARY}?orderId=${e.order_id}`}function I(e){let t=String(e.pill.icon??"").toLowerCase(),r=String(e.pill.status_label??"").toLowerCase();return"payment_failed"===t||/payment\s*failed/.test(r)}function M(){let e,s,n=(0,N.useAppStore)(e=>e.userInfo),i=(0,N.useAppStore)(e=>e.isAuthLoading),l=(0,C.useMobileUIStore)(e=>e.setHasActiveOrders),o=(0,a.useRouter)(),c=!!n?.isLoggedIn,{data:d}=(e=(0,N.useAppStore)(e=>e.userInfo),s=(0,N.useAppStore)(e=>e.isAuthLoading),(0,E.useQuery)({queryKey:k,queryFn:S.getTrackingPillsGaruda,enabled:!!e?.isLoggedIn&&!s,staleTime:1/0,gcTime:1/0,refetchInterval:e=>{var t;return t=e.state.data,(t?.pills?.length??0)>0&&3e4}})),u=c&&!i?d?.pills??[]:[],[h,m]=(0,r.useState)(0),[p,f]=(0,r.useState)(1);(0,r.useEffect)(()=>(l(u.length>0),()=>l(!1)),[u.length,l]);let x=e=>{f(e>h?1:-1),m(e)};if((0,r.useEffect)(()=>
2{if(u.length<=1)return;let e=setTimeout(()=>x((h+1)%u.length),3e3);return()=>clearTimeout(e)},[h,u.length]),!n?.isLoggedIn||i||0===u.length)return null;let b=u[h]??u[0],{pill:y}=b,v="cancelled"===y.icon||"undelivered"===y.icon||I(b),M=function(e){let{pill:t}=e,r="cancelled"===t.icon||"undelivered"===t.icon,a=t.action;return!a||!a.enabled||"reorder"===a.type||r&&"help"===a.type||I(e)&&"track"===a.type?null:a}(b),L=!!y.eta&&y.eta.show_badge&&!!y.eta.text&&!I(b);return(0,t.jsxs)("div",{className:"relative z-0 min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"relative h-[60px]",children:(0,t.jsx)(_.AnimatePresence,{initial:!1,mode:"sync",children:(0,t.jsxs)(w.motion.div,{initial:{x:60*p,opacity:0},animate:{x:0,opacity:1},exit:{x:-60*p,opacity:0},transition:{duration:.35,ease:"easeInOut"},drag:u.length>1&&"x",dragConstraints:{left:0,right:0},dragElastic:.05,onDragEnd:(e,t)=>{t.offset.x<-40?x((h+1)%u.length):t.offset.x>40&&x((h-1+u.length)%u.length)},onClick:()=>o.push("return"===b.pill.order_type||null!=b.return_order_id||I(b)?P(b):`${g.AppRoutes.TRACK_ORDER}/${b.order_id}`),className:`absolute inset-0 flex items-center gap-3 rounded-full px-4 py-2 shadow-[0px_2px_16px_0px_#00000018] ${v?"bg-[#FEF3F5]":"bg-white"}`,children:[(0,t.jsx)("div",{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-full border border-[#F1F1F2] ${v?"bg-white":"bg-[#F4F5F6]"}`,children:(0,t.jsx)("img",{src:function(e){switch(e){case"packing":case"being_packed":return A.OLC_GRAPHICS.packing;case"ready_for_pickup":case"out_for_delivery":case"rider_nearby":case"rider_arrived":case"return_pickup":return A.OLC_GRAPHICS.riderOnTheWay;case"delivered":case"return_completed":return A.OLC_GRAPHICS.delivered;case"cancelled":case"undelivered":case"payment_failed":return A.OLC_GRAPHICS.failed;default:return A.OLC_GRAPHICS.confirmed}}(y.icon),alt:"",className:"h-[30px] w-[30px]","aria-hidden":!0})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"truncate text-sm font-semibold text-[#1B1819]",children:y.status_label}),y.item_count>0&&(0,t.jsxs)("p",{className:"text-xs font-medium text-[#363033]",children:[y.item_count," item",1===y.item_count?"":"s"]})]}),M?(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),o.push(function(e,t){let r="return"===e.pill.order_type||null!=e.return_order_id;switch(t.type){case"track":return r||I(e)?P(e):`${g.AppRoutes.TRACK_ORDER}/${e.order_id}`;case"rate":return`${g.AppRoutes.RATE_ORDER}?orderId=${e.order_id}`;default:return`${g.AppRoutes.ORDER_SUMMARY}?orderId=${e.order_id}`}}(b,M))},className:"h-9 shrink-0 rounded-full bg-(--Primary-Mauve-600) px-4 text-[11px] font-extrabold uppercase text-white",children:M.label}):L?(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[(0,t.jsx)("span",{className:`inline-flex items-center justify-center rounded-full bg-[#E9F1EA] px-2 py-1.5 text-center text-[9px] font-bold leading-tight text-[#257832] ${b.is_scheduled?"w-[110px]":"w-[84px]"}`,children:y.eta.text}),(0,t.jsx)(j.ArrowRight2,{size:16,className:"text-gray-400"})]}):(0,t.jsx)(j.ArrowRight2,{size:18,className:"shrink-0 text-gray-400"})]},b.order_id)})}),u.length>1&&(0,t.jsx)("div",{className:"mt-1.5 flex items-center justify-center gap-1",children:u.slice(0,5).map((e,r)=>{let a=r===h%Math.min(u.length,5);return(0,t.jsx)("button",{onClick:()=>x(r),"aria-label":`Order ${r+1}`,className:`h-1.5 rounded-full transition-all duration-200 ${a?"w-5 bg-[#0F172B]":"w-1.5 bg-[#CAD5E2]"}`},r)})})]})}var L=e.i(558020),R=e.i(975772);let O=["/","/categories","/category","/wishlist","/account","/mobile-profile","/product","/products","/store"];e.s(["default",0,function(){let e=(0,a.usePathname)(),{bottomNavVisible:s,setBottomNavVisible:n,hasActiveOrders:i}=(0,C.useMobileUIStore)(),l=(0,N.useAppStore)(e=>e.isCategoryPLP),o=(0,r.useRef)(0),c=(0,R.shouldShowBottomNav)(e,l);(0,r.useEffect)(()=>{n(c),o.current=0},[e,c,n]),(0,r.useEffect)(()=>{if(!c)return;let e=()=>{let e=window.scrollY;e<=10||e<o.current?n(!0):n(!1),o.current=e},t=setTimeout(()=>{o.current=window.scrollY,window.addEventListener("scroll",e,{passive:!0})},600);return()=>{clearTimeout(t),window.removeEventListener("scroll",e)}},[c,n]);let d=O.some(t=>"/"===t?"/"===e:e===t||e.startsWith(`${t}/`)),u=e.startsWith("/product/"),h="/mobile-profile"===e||e.startsWith("/mobile-profile/")||"/account"===e||e.startsWith("/account/")||u,m=d&&!h&&i,p=(0,C.useMobileUIStore)(e=>e.setStripOwnsCart);
2if((0,r.useEffect)(()=>(p(m),()=>p(!1)),[m,p]),!d)return null;let f=(c&&s?84:12)+64*!!u;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"fixed inset-x-0 z-[60] px-3 lg:hidden",style:{bottom:`calc(${f+4}px + env(safe-area-inset-bottom, 0px))`,transition:"bottom 0.3s ease-in-out"},children:(0,t.jsxs)("div",{className:"flex items-start justify-end gap-2",children:[!h&&(0,t.jsx)(M,{}),!h&&i&&(0,t.jsx)(L.default,{className:"relative z-10"})]})}),c&&(0,t.jsx)(v,{visible:s,rightSlot:h||!i?(0,t.jsx)(L.default,{}):void 0})]})}],812842)},742355,282972,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(102253),s=e.i(618566),n=e.i(657688),i=e.i(662654),l=e.i(344862),o=e.i(284824),c=e.i(145876),d=e.i(791781),u=e.i(706294),h=e.i(413294),m=e.i(392917),p=e.i(172513),f=e.i(445231),x=e.i(757819),g=e.i(432008),b=e.i(120162),y=e.i(964640);e.s(["default",0,({open:e})=>{let[v,w]=(0,r.useState)(null),[_,j]=(0,r.useState)(!1),N=(0,r.useRef)(null),[C,E]=(0,r.useState)(!0),[S,k]=(0,r.useState)(!1),{userInfo:A,setZoneData:P,setOpenDeliveryLocation:I,setOpenDeliveryModal:M,setOpenAddressSideBar:L,zoneData:R}=(0,h.useAppStore)(),[O,z]=(0,r.useState)(""),[F,T]=(0,r.useState)([]),B=(0,g.useDebounce)(O,500),[$,D]=(0,r.useState)(0),[q,W]=(0,r.useState)(""),{isMobile:G}=(0,b.useResponsive)(),H=(0,s.useRouter)();async function U(){k(!0);try{let e=await (0,f.fetchUserLocationAndZone)(),t="";if(e&&e.latitude&&e.longitude){let[r,s]=await Promise.all([(0,a.reverseGeocode)(e.latitude,e.longitude).then(e=>({results:e?[{formatted_address:e.address}]:[]})),(0,m.getZoneId)({lat:e.latitude,lng:e.longitude})]);if(r.results?.length&&(t=r.results[0].formatted_address),s.success){let r=await (0,m.getTat)({originLat:Number(e.latitude),originLng:Number(e.longitude),zoneId:s.data.zone_id});if(r.success){P({zone_id:s.data.zone_id,lat:e.latitude.toString(),long:e.longitude.toString(),address:t??"",tat:r?.data||null}),(0,x.showSuccessToast)("Location fetched successfully!"),sessionStorage.setItem("selected_address",JSON.stringify({zone_id:s.data.zone_id,lat:e.latitude.toString(),long:e.longitude.toString(),address:t??"",tat:r?.data||null})),G?M(!1):I(!1),H.refresh();return}P({zone_id:s.data.zone_id,lat:e.latitude.toString(),long:e.longitude.toString(),address:t??"",tat:null}),sessionStorage.setItem("selected_address",JSON.stringify({zone_id:s.data.zone_id,lat:e.latitude.toString(),long:e.longitude.toString(),address:t??"",tat:null})),(0,x.showErrorToast)("Unable to fetch current location. Please Any Other Location."),G?M(!1):I(!1)}else P({zone_id:[-1],lat:e.latitude.toString(),long:e.longitude.toString(),address:t??"",tat:null}),(0,x.showErrorToast)("Unable to fetch current location. Please Any Other Location.")}}catch(e){e?.locationDenied?(0,x.showErrorToast)("Location Permission has been denied. Please allow location permisssion"):(0,x.showErrorToast)("Unable to fetch current location. Please select Any Other Location."),console.error("Error fetching location data:",e)}finally{k(!1)}}async function Q(e){try{let t=await (0,m.getZoneId)({lat:Number(e.latitude),lng:Number(e.longitude)}),r=t.success&&t.data?.zone_id?.length?t.data.zone_id:[-1],a=await (0,m.getTat)({originLat:Number(e.latitude),originLng:Number(e.longitude),zoneId:r}),s={zone_id:r,lat:e?.latitude?.toString()||"0",long:e?.longitude?.toString()||"0",address:e?.address??"",contact_person_name:e?.contact_person_name,contact_person_number:e?.contact_person_number,address_type:e?.address_type,road:e?.road,house:e?.house,addressId:e?.id};a.success?(P({...s,tat:a?.data||null}),sessionStorage.setItem("selected_address",JSON.stringify({...s,tat:a?.data||null})),(0,x.showSuccessToast)("Location fetched successfully!")):(P({...s,tat:null}),sessionStorage.setItem("selected_address",JSON.stringify({...s,tat:null})),(0,x.showErrorToast)("Unable to set address location. Please try with any other Address."))}catch(e){(0,x.showErrorToast)("Unable to set address location. Please try again.")}G?M(!1):I(!1),H.refresh()}async function Y(){if(""==O.trim()){T([]),D(0);return}try{let e=await (0,m.getPlaceAutoComplete)({searchText:B});e.success&&(T(e?.data?.suggestions),D(1))}catch(e){console.error("Search error:",e)}}async function Z(e){try{let t=await (0,m.getPlaceDetails)({placeId:e});if(t.success){let e=t.data?.location?.latitude,r=t.data?.location?.longitude,a=t.data?.formattedAddress,s=await (0,m.getZoneId)({lat:e,lng:r});if(s.success&&s.data?.zone_id){let t=await (0,m.getTat)({originLat:Number(e),originLng:Number(r),zoneId:s.data.zone_id}),n={zone_id:s.data.zone_id,lat:String(e),long:String(r),address:a??"",tat:t.success?t.data:null};P(n),sessionStorage.setItem("selected_address",JSON.stringify(n)),(0,x.showSuccessToast)("Location set successfully!"),G?M(!1):I(!1),H.refresh()}else W(a??""),P({zone_id:[-1],lat:String(e),long:String(r),address:a??"",tat:null}),D(3)}}catch(e){console.error("Place details error:",e),(0,x.showErrorToast)("Error fetching location details")}}async function K(e){e.stopPropagation(),L(!0),G?M(!1):I(!1)}return(0,r.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),(0,r.useEffect)(()=>
2{if(!G||!e)return;let t=window.visualViewport;if(!t)return;let r=()=>window.scrollTo(0,0);return t.addEventListener("resize",r),t.addEventListener("scroll",r),()=>{t.removeEventListener("resize",r),t.removeEventListener("scroll",r)}},[G,e]),(0,r.useEffect)(()=>{if(!e)return;let t=e=>{N.current&&!N.current.contains(e.target)&&(G?M(!1):I(!1))};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[e,I]),(0,r.useEffect)(()=>{let e=sessionStorage.getItem("token")||"mock-token",t=async()=>{E(!0);let t=await (0,m.getCustomerAddresses)(e);t.success?w(t.data?.addresses):w([]),E(!1)};A&&t()},[A?.isLoggedIn,_]),(0,r.useEffect)(()=>{B.trim()?Y():(T([]),D(0))},[B]),(0,t.jsx)("div",{ref:N,className:`w-full overflow-hidden ${G?"flex-1 h-full flex flex-col":"bg-gray-50 w-[400px] max-h-[80vh] border border-gray-200"} rounded-4xl`,children:G?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex-shrink-0 px-5 pt-5 pb-2 bg-white",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)("h2",{className:"text-base font-kansas font-medium text-gray-800","data-nosnippet":!0,children:"Select your delivery location"}),(0,t.jsx)(u.CloseCircle,{onClick:()=>M(!1),variant:"Bold",size:24,className:"text-gray-500 cursor-pointer shrink-0"})]}),3!==$&&(0,t.jsx)("div",{className:"relative mb-3",children:(0,t.jsx)("input",{onChange:e=>z(e.target.value),onFocus:()=>requestAnimationFrame(()=>window.scrollTo(0,0)),type:"text",placeholder:"Search Location here...",className:"w-full h-11 p-3 pl-4 shadow-[inset_-3px_0px_2px_0px_rgba(229,231,235,0.2),inset_3px_0px_2px_0px_rgba(229,231,235,0.2),inset_0px_-3px_2px_0px_rgba(229,231,235,0.2),inset_0px_3px_2px_0px_rgba(229,231,235,0.2)] focus:ring focus:ring-(--Primary-Mauve-500) rounded-xl bg-white border-none text-gray-800 placeholder:text-gray-800 outline-none transition-all"})}),0==$&&(0,t.jsxs)("div",{className:"text-base font-bold text-gray-900 mb-2",children:[(0,t.jsxs)("button",{onClick:U,disabled:S,className:`cursor-pointer w-full h-11 bg-white border-b border-b-gray-200 rounded-xl ${A?.isLoggedIn?"rounded-b-none":""} flex items-center justify-between px-4 shadow-sm hover:shadow-md transition-shadow group disabled:opacity-70`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[S?(0,t.jsx)("div",{className:"w-5 h-5 border-2 border-slate-300 border-t-rose-600 rounded-full animate-spin"}):(0,t.jsx)(c.Location,{size:"20",variant:"Linear"}),(0,t.jsx)("span",{className:"font-bold",children:S?"Fetching location...":"Use my current location"})]}),!S&&(0,t.jsx)(o.ArrowRight2,{size:"20",className:"text-slate-400 group-hover:translate-x-1 transition-all"})]}),A?.isLoggedIn&&(0,t.jsxs)("button",{onClick:K,className:"cursor-pointer w-full h-11 bg-white rounded-xl rounded-t-none flex items-center justify-between px-4 shadow-sm hover:shadow-md transition-shadow group",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(l.Add,{size:"20",variant:"Linear"}),(0,t.jsx)("span",{className:"font-bold",children:"Add New Address"})]}),(0,t.jsx)(o.ArrowRight2,{size:"20",className:"text-slate-400 group-hover:translate-x-1 transition-all"})]})]})]}),(0,t.jsxs)("div",{className:"flex-1 overscroll-contain hide-scrollbar px-5 pb-5 overflow-y-auto",children:[1==$&&F?.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-3",children:F.map(e=>(0,t.jsx)("div",{className:"flex items-center w-full h-11 p-3 pl-4 shadow-[inset_-3px_0px_2px_0px_rgba(229,231,235,0.2),inset_3px_0px_2px_0px_rgba(229,231,235,0.2),inset_0px_-3px_2px_0px_rgba(229,231,235,0.2),inset_0px_3px_2px_0px_rgba(229,231,235,0.2)] rounded-xl bg-white",children:(0,t.jsxs)("div",{onClick:()=>Z(e?.placePrediction?.placeId),className:"flex items-center gap-2 cursor-pointer",children:[(0,t.jsx)(i.SearchNormal1,{size:18,className:"text-gray-600 shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-800 leading-5 line-clamp-2",children:e?.placePrediction?.text?.text})]})},e?.placePrediction?.placeId))}):1==$&&(0,t.jsx)("div",{className:"flex justify-center py-4",children:(0,t.jsx)("span",{children:"No location found"})}),0==$&&A?.isLoggedIn&&(0,t.jsx)("div",{className:"mt-2",children:C?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center h-48 gap-3",children:[(0,t.jsx)("div",{className:"animate-spin h-8 w-8 border-4 border-slate-200 border-t-rose-900 rounded-full"}),(0,t.jsx)("p",{className:"text-sm text-gray-500 font-medium",children:"Loading addresses..."})]}):v&&v.length>0?(0,t.jsx)("div",{className:"flex flex-col gap-4",children:v.map(e=>(0,t.jsx)(p.default,{accessingFromNavBar:!0,onCardClick:()=>Q(e),type:e.address_type,address:e.address,title:e.address_type,contact_person_name:e?.contact_person_name,addressId:e.id,setisdeletetrigger:j},e.id))}):(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center text-center py-8",children:[(0,t.jsx)("div",{className:"mb-4 p-4 bg-slate-100 rounded-full",children:(0,t.jsx)(d.ProfileAdd,{size:64,variant:"Outline",className:"text-slate-400"})}),(0,t.jsx)("p",{className:"text-base font-semibold text-slate-600",children:"Your address book is empty."}),(0,t.jsx)("p",{className:"text-sm text-slate-400 mt-1",children:"Add a new address to get started."})]})}),3==$&&(0,t.jsxs)("div",{className:"flex flex-col pb-4 items-center gap-5 pt-6",children:[(0,t.jsx)(n.default,{src:"/img/locationmodal.png",alt:"Location not available",width:96,height:64,priority:!0}),(0,t.jsxs)("div",{className:"text-center space-y-3",children:[(0,t.jsx)("p",{className:"text-xl font-semibold text-slate-800",children:"We're Not There Yet!"}),(0,t.jsx)("p",{className:"text-sm font-semibold text-slate-800 leading-5",children:"OZI isn't available at this location right now, but we're expanding fast!"})]}),(0,t.jsxs)("div",{className:"space-y-3 text-center",children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-slate-800",children:"We're currently live in"}),(0,t.jsx)("div",{className:"flex flex-wrap justify-center gap-2",children:y.Constants.serviceAvlCities.map(e=>(0,t.jsx)("span",{className:"whitespace-nowrap rounded-full bg-[#F7ECF1] px-3 py-1 text-sm font-semibold text-[#B15177]",children:e},e))})]}),q?(0,t.jsxs)("div",{className:"w-full rounded-xl bg-white border border-gray-100 px-4 py-3 flex items-start gap-2 shadow-sm",children:[(0,t.jsx)(c.Location,{size:16,className:"text-(--Primary-Mauve-500) shrink-0 mt-0.5"}),(0,t.jsx)("p",{className:"text-xs font-medium text-gray-700 leading-5 line-clamp-2",children:q})]}):null,(0,t.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,t.jsx)("button",{onClick:()=>M(!1),className:"w-full py-3 rounded-xl bg-(--Primary-Mauve-500) text-white text-sm font-semibold",children:"Continue Browsing"}),(0,t.jsx)("button",{onClick:()=>{z(""),D(0)},className:"text-sm font-semibold text-[#B15177] text-center py-1",children:"Try Another Location"})]})]})]})]}):(0,t.jsxs)("div",{className:"w-full md:w-[400px] flex flex-col max-h-[80vh]",children:[(0,t.jsxs)("div",{className:"flex-shrink-0 px-5 pt-5 pb-3 bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex justify-between mb-5",children:[(0,t.jsx)("h2",{className:"text-base font-kansas font-medium text-gray-800","data-nosnippet"
2:!0,children:"Select your delivery location"}),(0,t.jsx)(u.CloseCircle,{onClick:e=>{e.stopPropagation(),I(!1)},variant:"Bold",size:24,className:"text-gray-500 cursor-pointer"})]}),3!==$&&(0,t.jsx)("div",{className:"relative mb-3",children:(0,t.jsx)("input",{onChange:e=>z(e.target.value),type:"text",placeholder:"Search Location here...",className:"w-full h-11 p-3 pl-4 shadow-[inset_-3px_0px_2px_0px_rgba(229,231,235,0.2),inset_3px_0px_2px_0px_rgba(229,231,235,0.2),inset_0px_-3px_2px_0px_rgba(229,231,235,0.2),inset_0px_3px_2px_0px_rgba(229,231,235,0.2)] focus:ring focus:ring-(--Primary-Mauve-500) rounded-xl bg-white border-none text-gray-800 placeholder:text-gray-800 outline-none transition-all"})}),0==$&&(0,t.jsxs)("div",{className:"text-base font-bold text-gray-900",children:[(0,t.jsxs)("button",{onClick:U,className:`cursor-pointer w-full h-11 bg-white border-b border-b-gray-200 rounded-xl ${A?.isLoggedIn?"rounded-b-none":""} flex items-center justify-between px-4 shadow-sm hover:shadow-md transition-shadow group`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(c.Location,{size:"20",variant:"Linear"}),(0,t.jsx)("span",{className:"font-bold",children:"Use my current location"})]}),(0,t.jsx)(o.ArrowRight2,{size:"20",className:"text-slate-400 group-hover:translate-x-1 transition-all"})]}),A?.isLoggedIn&&(0,t.jsxs)("button",{onClick:K,className:"cursor-pointer w-full h-11 bg-white rounded-xl rounded-t-none flex items-center justify-between px-4 shadow-sm hover:shadow-md transition-shadow group",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(l.Add,{size:"20",variant:"Linear"}),(0,t.jsx)("span",{className:"font-bold",children:"Add New Address"})]}),(0,t.jsx)(o.ArrowRight2,{size:"20",className:"text-slate-400 group-hover:translate-x-1 transition-all"})]})]})]}),(0,t.jsxs)("div",{className:"flex-1 overscroll-contain hide-scrollbar px-5 pb-5 overflow-y-auto",children:[1==$&&F?.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-3 pt-2",children:F.map(e=>(0,t.jsx)("div",{className:"flex items-center w-full h-11 p-3 pl-4 shadow-[inset_-3px_0px_2px_0px_rgba(229,231,235,0.2),inset_3px_0px_2px_0px_rgba(229,231,235,0.2),inset_0px_-3px_2px_0px_rgba(229,231,235,0.2),inset_0px_3px_2px_0px_rgba(229,231,235,0.2)] rounded-xl bg-white",children:(0,t.jsxs)("div",{onClick:()=>Z(e?.placePrediction?.placeId),className:"flex items-center gap-2 cursor-pointer",children:[(0,t.jsx)(i.SearchNormal1,{size:18,className:"text-gray-600 shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-800 leading-5 line-clamp-2",children:e?.placePrediction?.text?.text})]})},e?.placePrediction?.placeId))}):1==$&&(0,t.jsx)("div",{className:"flex flex-wrap gap-3 w-full justify-center pt-4",children:(0,t.jsx)("span",{children:"No location found"})}),0==$&&A?.isLoggedIn&&(0,t.jsx)("div",{className:"mt-3 flex flex-col gap-4",children:C?(0,t.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center h-48 gap-3",children:[(0,t.jsx)("div",{className:"animate-spin h-8 w-8 border-4 border-slate-200 border-t-rose-900 rounded-full"}),(0,t.jsx)("p",{className:"text-sm text-gray-500 font-medium",children:"Loading addresses..."})]}):v&&v.length>0?v.map(e=>(0,t.jsx)(p.default,{accessingFromNavBar:!0,onCardClick:()=>Q(e),type:e.address_type,address:e.address,title:e.address_type,contact_person_name:e?.contact_person_name,addressId:e.id,setisdeletetrigger:j},e.id)):(0,t.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center text-center py-8",children:[(0,t.jsx)("div",{className:"mb-4 p-4 bg-slate-100 rounded-full",children:(0,t.jsx)(d.ProfileAdd,{size:64,variant:"Outline",className:"text-slate-400"})}),(0,t.jsx)("p",{className:"text-base font-semibold text-slate-600",children:"Your address book is empty."}),(0,t.jsx)("p",{className:"text-sm text-slate-400 mt-1",children:"Add a new address to get started."})]})}),3==$&&(0,t.jsxs)("div",{className:"flex flex-col pb-4 items-center gap-5 pt-4",children:[(0,t.jsx)(n.default,{src:"/img/locationmodal.png",alt:"Location not available",width:96,height:64,priority:!0}),(0,t.jsxs)("div",{className:"text-center space-y-3",children:[(0,t.jsx)("p",{className:"text-xl font-semibold text-slate-800",children:"We're Not There Yet!"}),(0,t.jsx)("p",{className:"text-sm font-semibold text-slate-800 leading-5",children:"OZI isn't available at this location right now, but we're expanding fast!"})]}),(0,t.jsxs)("div",{className:"space-y-3 text-center",children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-slate-800",children:"We're currently live in"}),(0,t.jsx)("div",{className:"flex flex-wrap justify-center gap-2",children:y.Constants.serviceAvlCities.map(e=>(0,t.jsx)("span",{className:"whitespace-nowrap rounded-full bg-[#F7ECF1] px-3 py-1 text-sm font-semibold text-[#B15177]",children:e},e))})]}),q?(0,t.jsxs)("div",{className:"w-full rounded-xl bg-white border border-gray-100 px-4 py-3 flex items-start gap-2 shadow-sm",children:[(0,t.jsx)(c.Location,{size:16,className:"text-(--Primary-Mauve-500) shrink-0 mt-0.5"}),(0,t.jsx)("p",{className:"text-xs font-medium text-gray-700 leading-5 line-clamp-2",children:q})]}):null,(0,t.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,t.jsx)("button",{onClick:()=>I(!1),className:"w-full py-3 rounded-xl bg-(--Primary-Mauve-500) text-white text-sm font-semibold",children:"Continue Browsing"}),(0,t.jsx)("button",{onClick:()=>{z(""),D(0)},className:"text-sm font-semibold text-[#B15177] text-center py-1",children:"Try Another Location"})]})]})]})]})})}],742355);var v=e.i(11524);e.s(["default",0,({open:e})=>{let s=(0,r.useRef)(null),[l,o]=(0,r.useState)(!1),[d,u]=(0,r.useState)(!1),[p,w]=(0,r.useState)(!1),{userInfo:_,setZoneData:j,setOpenDeliveryLocation1:N,setOpenDeliveryModal1:C,setOpenAddressSideBar:E,zoneData:S}=(0,h.useAppStore)(),[k,A]=(0,r.useState)(""),[P,I]=(0,r.useState)([]),M=(0,g.useDebounce)(k,500),[L,R]=(0,r.useState)(0),[O,z]=(0,r.useState)(!1),[F,T]=(0,r.useState)(""),{isMobile:B}=(0,b.useResponsive)(),$=(0,r.useRef)(null),D=(0,r.useRef)(null),[q,W]=(0,r.useState)(260);async function G(e){e.stopPropagation(),o(!0);try{let e=await (0,f.fetchUserLocationAndZone)(),t="";if(e&&e.latitude&&e.longitude){let r=await (0,a.reverseGeocode)(e.latitude,e.longitude).then(e=>({results:e?[{formatted_address:e.address}]:[]}));r.results?.length&&(t=r.results[0].formatted_address);let s=await (0,m.getZoneId)({lat:e.latitude,lng:e.longitude});if(s.success){let r=await (0,m.getTat)({originLat:Number(e.latitude),originLng:Number(e.longitude),zoneId:s.data.zone_id});if(r.success){if(j({zone_id:s.data.zone_id,lat:e.latitude.toString(),long:e.longitude.toString(),address:t??"",tat:r?.data||null}),(0,x.showSuccessToast)("Location fetched successfully!"),sessionStorage.setItem("selected_address",JSON.stringify({zone_id:s.data.zone_id,lat:e.latitude.toString(),long:e.longitude.toString(),address:t??"",tat:r?.data||null})),_?.isLoggedIn){E(!0),B?C(!1):N(!1),o(!1);return}B?C(!1):N(!1)}else j({zone_id:s.data.zone_id,lat:e.latitude.toString(),long:e.longitude.toString(),address:t??"",tat:null}),sessionStorage.setItem("selected_address",JSON.stringify({zone_id:s.data.zone_id,lat:e.latitude.toString(),long:e.longitude.toString(),address:t??"",tat:null})),(0,x.showErrorToast)("Unable to fetch current location. Please Any Other Location.");B?C(!1):N(!1)}else j({zone_id:[-1],lat:e.latitude.toString(),long:e.longitude.toString(),address:t??"",tat:null}),sessionStorage.setItem("selected_address",JSON.stringify({zone_id:[-1],lat:e.latitude.toString(),long:e.longitude.toString(),address:t??"",tat:null})),B?C(!1):N(!1)}}catch(e){e?.locationDenied?z(!0):e?.locationUnavailable?(0,x.showErrorToast)("Unable to detect location. On Safari, enable Location Services in System Settings â Privacy & Security â Location Services."):e?.locationTimeout?(0,x.showErrorToast)("Location request timed out. Please try again or search manually."):(0,x.showErrorToast)("Unable to fetch current location. Please select Any Other Location."),console.error("Error fetching location data:",e)}o(!1)}async function H(){if(""==k.trim()){I([]),R(0);return}try{u(!0);let e=await (0,m.getPlaceAutoComplete)({searchText:M});e.success&&(I(e?.data?.suggestions),R(1))}catch(e){console.error("Search error:",e)}finally{u(!1)}}async function U(e){try{w(!0);let t=await (0,m.getPlaceDetails)({placeId:e});if(t.success){let e=t.data?.location?.latitude,r=t.data?.location?.longitude,a=t.data?.formattedAddress,s=await (0,m.getZoneId)({lat:e,lng:r});if(s.success&&s.data?.zone_id){let t=await (0,m.getTat)({originLat:Number(e),originLng:Number(r),zoneId:s.data.zone_id}),n={zone_id:s.data.zone_id,lat:String(e),long:String(r),address:a??"",tat:t.success?t.data:null};j(n),sessionStorage.setItem("selected_address",JSON.stringify(n)),(0,x.showSuccessToast)("Location set successfully!"),B?C(!1):N(!1)}else T(a??""),j({zone_id:[-1],lat:String(e),long:String(r),address:a??"",tat:null}),R(3)}}catch(e){console.error("Place details error:",e)}finally{w(!1)}}return(0,r.useEffect)(()=>{"undefined"!=typeof navigator&&navigator.permissions&&navigator.permissions.query({name:"geolocation"}).then(e=>{"denied"===e.state&&z(!0),e.onchange=()=>{z("denied"===e.state)}}).catch(()=>{})},[]),(0,r.useEffect)(()=>
2{if(!B||1!==L||!window.visualViewport)return;let e=()=>{if(!D.current)return;let e=Math.max(1,Math.min(4,Math.floor((window.visualViewport.height-D.current.getBoundingClientRect().top-16+12)/68)));W(56*e+(e-1)*12)};return e(),window.visualViewport.addEventListener("resize",e),()=>window.visualViewport?.removeEventListener("resize",e)},[B,L]),(0,r.useEffect)(()=>{M.trim()?H():(I([]),R(0))},[M]),(0,t.jsx)("div",{ref:s,onClick:e=>{e.stopPropagation()},className:`w-full overflow-hidden ${B?"bg-gray-50 pt-6 pb-8":"bg-gray-50 w-[400px] h-auto max-h-[80vh] border border-gray-200"} rounded-4xl flex flex-col`,children:(0,t.jsxs)("div",{ref:$,className:`w-full md:w-[400px] overflow-y-scroll hide-scrollbar p-5 ${B&&3===L?"flex flex-col items-center justify-center h-full":""}`,children:[3!==L&&(0,t.jsx)("h2",{className:"text-base font-medium text-gray-800","data-nosnippet":!0,children:"Select your location"}),3!==L&&(0,t.jsx)("p",{className:"mb-5 text-sm",children:"Tell us your location so we can plan your delivery better."}),0==L&&(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)("div",{className:"w-full text-base font-bold text-gray-900 mb-4",children:O?(0,t.jsxs)("div",{className:"rounded-xl bg-[#FFF4F7] border border-[#F7C5D5] p-4 flex flex-col gap-2 text-center",children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-[#B15177]",children:"Location access is blocked"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 leading-5",children:["To use your current location, allow access in your browser settings:",(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"font-semibold",children:"Tap the lock / info icon"})," in the address bar â ",(0,t.jsx)("span",{className:"font-semibold",children:"Site settings"})," â ",(0,t.jsx)("span",{className:"font-semibold",children:"Location â Allow"})]})]}):(0,t.jsx)(v.default,{disabled:l,loading:l,onClick:G,label:"ALLOW LOCATION",variant:"primary",className:"shadow-[inset_-4px_0px_2px_0px_#C77398CC,inset_4px_0px_2px_0px_#C77398CC,inset_0px_-4px_2px_0px_#C77398CC,inset_0px_4px_2px_0px_#C77398CC]"})}),(0,t.jsx)("p",{className:"text-gray-900 font-extrabold text-base w-full text-center mb-4",children:"OR"})]}),3!==L&&(0,t.jsxs)("div",{className:"relative mb-4",children:[(0,t.jsx)("input",{onChange:e=>A(e.target.value),onBlur:()=>{B&&$.current&&($.current.scrollTop=0)},type:"text",placeholder:"Search Location here...",className:"w-full h-11 p-3 pl-4 pr-10 inset-3 shadow-[inset_-3px_0px_2px_0px_rgba(229,231,235,0.2),inset_3px_0px_2px_0px_rgba(229,231,235,0.2),inset_0px_-3px_2px_0px_rgba(229,231,235,0.2),inset_0px_3px_2px_0px_rgba(229,231,235,0.2)] focus:ring focus:ring-(--Primary-Mauve-500) rounded-xl bg-white border-none text-gray-800 placeholder:text-gray-800 outline-none transition-all"}),d&&(0,t.jsx)("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none",children:(0,t.jsxs)("svg",{className:"animate-spin h-4 w-4 text-(--Primary-Mauve-500)",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})})]}),1==L&&P?.length>0?(0,t.jsxs)("div",{ref:D,className:"relative flex flex-wrap gap-3 overflow-y-auto hide-scrollbar",style:{maxHeight:B?q:300},children:[p&&(0,t.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-white/70 rounded-xl",children:(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5 text-(--Primary-Mauve-500)",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}),P.map(e=>(0,t.jsx)("div",{className:"flex items-start w-full h-[56px] p-3 pl-4 shadow-[inset_-3px_0px_2px_0px_rgba(229,231,235,0.2),inset_3px_0px_2px_0px_rgba(229,231,235,0.2),inset_0px_-3px_2px_0px_rgba(229,231,235,0.2),inset_0px_3px_2px_0px_rgba(229,231,235,0.2)] rounded-xl bg-white",children:(0,t.jsxs)("div",{onClick:()=>!p&&U(e?.placePrediction?.placeId),className:`flex items-start gap-2 w-full ${p?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[(0,t.jsx)(i.SearchNormal1,{size:18,className:"text-gray-600 shrink-0 mt-1"}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-800 leading-5",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,overflow:"hidden"},children:[e?.placePrediction?.text?.text," "]})})]})},e?.placePrediction?.placeId))]}):1==L&&(0,t.jsx)("div",{className:"flex flex-wrap gap-3 w-full justify-center",children:(0,t.jsx)("span",{children:"No location found"})}),3==L&&(0,t.jsxs)("div",{className:` 3 flex flex-col pb-4 items-center gap-6 transition-all duration-200 4 opacity-100 translate-y-0 5 `,children:[(0,t.jsx)(n.default,{src:"/img/locationmodal.png",alt:"Location not available",width:96,height:64,priority:!0}),(0,t.jsxs)("div",{className:"text-center space-y-3",children:[(0,t.jsx)("p",{className:"text-xl font-semibold text-slate-800",children:"We're Not There Yet!"}),(0,t.jsx)("p",{className:"text-sm font-semibold text-slate-800 leading-5",children:"OZI isn't available at this location right now, but we're expanding fast!"})]}),(0,t.jsxs)("div",{className:"space-y-3 text-center",children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-slate-800",children:"We're currently live in"}),(0,t.jsx)("div",{className:"flex flex-wrap justify-center gap-2",children:y.Constants.serviceAvlCities.map(e=>(0,t.jsx)("span",{className:"whitespace-nowrap rounded-full bg-[#F7ECF1] px-3 py-1 text-sm font-semibold text-[#B15177]",children:e},e))})]}),F?(0,t.jsxs)("div",{className:"w-full rounded-xl bg-white border border-gray-100 px-4 py-3 flex items-start gap-2 shadow-sm",children:[(0,t.jsx)(c.Location,{size:16,className:"text-(--Primary-Mauve-500) shrink-0 mt-0.5"}),(0,t.jsx)("p",{className:"text-xs font-medium text-gray-700 leading-5 line-clamp-2",children:F})]}):null,(0,t.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,t.jsx)(v.default,{label:"Continue Browsing",variant:"primary",onClick:()=>{B?C(!1):N(!1)}}),(0,t.jsx)("button",{onClick:()=>{A(""),R(0)},className:"text-sm font-semibold text-[#B15177] text-center py-1",children:"Try Another Location"})]})]})]})})}],282972)},780894,e=>{"use strict";var t=e.i(843476),r=e.i(618566),a=e.i(345454),s=e.i(271645);let n=({startAdornment:e,endAdornment:r,handleClick:a,className:s="",disabled:n=!1,placeholder:i="",onMouseEnter:l,onMouseLeave:o,...c})=>(0,t.jsxs)("button",{onClick:a,className:`${s}`,disabled:n,onMouseEnter:l,onMouseLeave:o,...c,children:[e&&(0,t.jsx)("span",{children:e}),i,r&&(0,t.jsx)("span",{children:r})]});var i=e.i(834699);function l({data:e,theme:a,onMouseLeave:s}){let n=(0,r.useRouter)();if(!e?.length)return null;let l=e=>e.hasChildren??(e.childes?.length??0)>0,o=e.filter(l),c=e.filter(e=>!l(e)),d=e=>{n.push((0,i.buildCategoryHref)(e)),s()},u=a?.background_color?.trim(),h=a?.border_gradient_start?.trim(),m=a?.border_gradient_end?.trim(),p=!!u,f=!!(h&&m),x=p?{background:`linear-gradient(180deg, ${u} 0%, #ffffff 100%)`,boxShadow:"0 16px 40px -8px rgba(0,0,0,0.16)","--dd-underline":h?`${h}66`:"rgba(0,0,0,0.15)","--dd-hover":"rgba(0,0,0,0.05)"}:{boxShadow:"0 16px 40px -8px rgba(177,81,119,0.18)"},g=p?"text-(--Gray-800) border-[color:var(--dd-underline)]":"text-(--Primary-Mauve-700) border-(--Primary-Mauve-400)/40",b=p?"text-(--Gray-700) hover:bg-[color:var(--dd-hover)] hover:text-black":"text-(--Gray-700) hover:bg-(--Primary-Mauve-300) hover:text-(--Primary-Mauve-800)",y=p?"text-(--Gray-800) hover:bg-[color:var(--dd-hover)] hover:text-black":"text-(--Primary-Mauve-700) hover:bg-(--Primary-Mauve-300) hover:text-(--Primary-Mauve-900)";return(0,t.jsx)("div",{onMouseLeave:s,className:"hidden lg:block w-full absolute top-full left-0 z-50 animate-in fade-in slide-in-from-top-2 duration-150",children:(0,t.jsxs)("div",{className:`overflow-hidden rounded-b-2xl rounded-t-2xl ${p?"":"bg-(--Primary-Mauve-200)"}`,style:x,children:[f&&(0,t.jsx)("div",{className:"h-1 w-full",style:{background:`linear-gradient(90deg, ${h}, ${m})`}}),(0,t.jsx)("div",{className:"px-6 lg:px-8 py-5 max-h-[360px] overflow-y-auto scrollbar-hide",children:(0,t.jsxs)("div",{className:"flex gap-x-6 items-start",children:[o.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-x-6 gap-y-5 flex-1 items-start",children:o.map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-1 min-w-[120px]",children:[(0,t.jsx)("button",{className:`text-xs font-bold text-left uppercase tracking-wider 6 pb-1.5 mb-0.5 border-b w-full transition-colors duration-150 7 hover:opacity-70 ${g}`,onClick:()=>d(e),children:e.name}),(0,t.jsx)("ul",{className:"flex flex-col gap-0.5",children:e.childes.map(e=>(0,t.jsx)("li",{children:(0,t.jsx)("button",{className:`text-left text-sm w-full px-2 py-0.5 rounded-lg 8 transition-all duration-150 ${b}`,onClick:()=>{n.push((0,i.buildCategoryHref)(e)),s()},children:e.name})},e.id))})]},e.id))}),o.length>0&&c.length>0&&(0,t.jsx)("div",{className:`self-stretch w-px shrink-0 ${p?"bg-black/10":"bg-(--Primary-Mauve-400)/30"}`}),c.length>0&&(0,t.jsxs)("div",{className:"flex flex-col gap-0.5 shrink-0 min-w-[130px]",children:[(0,t.jsx)("p",{className:`text-xs font-bold uppercase tracking-wider pb-1.5 mb-0.5 border-b ${g}`,children:"More"}),c.map(e=>(0,t.jsxs)("button",{className:`text-sm font-bold text-left w-full px-2 py-1 rounded-lg 9 transition-all duration-150 tracking-wide ${y}`,onClick:()=>d(e),children:["â ",e.name]},e.id))]})]})})]})})}var o=e.i(923584),c=e.i(384364),d=e.i(284824),u=e.i(120162);
9let h=({categoriesArray:e,categoryRootMap:h,v2Categories:m=[],scrolled:p,bgImage:f,onBgColorChange:x})=>{let g,b,y,v,w,_=new Map(m.map(e=>[e.id,e])),j=m.find(e=>"All"===e.name)??null,{isMobile:N,isDesktop:C}=(0,u.useResponsive)(),E=(0,r.useRouter)(),S=(0,r.useParams)(),k=(0,r.usePathname)(),A=(0,r.useSearchParams)(),P=A.get("main_cat_id")||A.get("category_id"),I=P&&"0"!==P&&!P.includes(",")?P:null,[M,L]=(0,s.useState)(-1),[R,O]=(0,s.useState)(null),[z,F]=(0,s.useState)(!1),[T,B]=(0,s.useState)(!1),[$,D]=(0,s.useState)(!1),[q,W]=(0,s.useState)({}),G=(0,s.useRef)(new Set),H=(0,s.useRef)(new Set);(0,s.useEffect)(()=>{let e=H.current;return()=>{e.forEach(e=>e.abort()),e.clear()}},[]);let[U,Q]=(0,s.useState)(!1);(0,s.useEffect)(()=>{if(!C)return void Q(!1);let e=0,t=window.scrollY,r=0,a=()=>{cancelAnimationFrame(e),e=requestAnimationFrame(()=>{let e=window.scrollY;if(Date.now()<r){t=e;return}let a=e-t;12>Math.abs(a)||(t=e,Q(t=>{let s=a>0&&e>120;return s!==t&&(r=Date.now()+350),s}))})};return window.addEventListener("scroll",a,{passive:!0}),()=>{cancelAnimationFrame(e),window.removeEventListener("scroll",a)}},[C]);let Y=(0,s.useRef)(null),Z=()=>{let e=Y.current;e&&(B(e.scrollLeft>0),D(e.scrollLeft+e.clientWidth<e.scrollWidth-1))};(0,s.useEffect)(()=>{Z();let e=()=>Z();return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[e.length]),(0,s.useEffect)(()=>{let t=Y.current;if(!t||t.scrollWidth<=t.clientWidth)return;let r=-1===M?0:e.findIndex(e=>e.id===M)+1;if(r<0||r>=t.children.length)return;if(r<2)return void t.scrollTo({left:0,behavior:"smooth"});let a=t.children[r-1],s=t.getBoundingClientRect(),n=a.getBoundingClientRect().left-s.left+t.scrollLeft;t.scrollTo({left:Math.max(0,n-4),behavior:"smooth"})},[M,e.length]);let K=()=>{F(!1),O(null)};function V(e){if(!e?.section_bg_color)return{};let t={backgroundColor:e.section_bg_color};return e.border_gradient_start&&e.border_gradient_end&&(t.border="1.5px solid transparent",t.backgroundImage=`linear-gradient(${e.section_bg_color}, ${e.section_bg_color}), linear-gradient(to bottom, ${e.border_gradient_start}, ${e.border_gradient_end})`,t.backgroundClip="padding-box, border-box",t.backgroundOrigin="padding-box, border-box"),t}let J="group lg:min-w-20 lg:flex-col lg:gap-0.5 lg:px-3 lg:py-1 lg:rounded-[15px] lg:whitespace-nowrap lg:bg-transparent lg:transition-all lg:duration-300 lg:appearance-none",X="lg:hover:bg-(--Gray-100)",ee="lg:hover:bg-transparent",et="lg:h-16 lg:w-16 lg:rounded-full lg:transition-all lg:duration-300 lg:ease-out lg:group-hover:bg-black/5",er="lg:h-[52px] lg:w-[52px] lg:transition-all lg:duration-300 lg:ease-out lg:group-hover:scale-105",ea="lg:!h-0 lg:!w-0 lg:!opacity-0 lg:overflow-hidden",es="lg:!h-0 lg:!w-0 lg:!opacity-0",en="lg:scale-105";function ei(e){let t=function(e){let t=e.trim(),r=t.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i);if(r){let e=r[1],t=3===e.length?e.replace(/./g,e=>e+e):e;return[0,2,4].map(e=>parseInt(t.slice(e,e+2),16))}let a=t.match(/^rgba?\(([^)]+)\)$/i);if(a){let e=a[1].split(/[,/\s]+/).map(Number).filter(Number.isFinite);if(e.length>=3&&e.slice(0,3).every(e=>!Number.isNaN(e)))return[e[0],e[1],e[2]]}return null}(e);return t?(.2126*t[0]+.7152*t[1]+.0722*t[2])/255:null}let el="rgba(155, 93, 124, 0.75)";function eo(e){let t=e?.section_bg_color||"var(--Primary-Mauve-100)",r=e?.border_gradient_start,a=e?.border_gradient_end,s="rgba(155, 93, 124, 0.12)",n=el;if(r&&a){let e=ei(r),t=ei(a);null!==e&&null!==t&&(s=e>t?r:a,n=e>t?a:r,Math.min(e,t)>.82&&(n=el))}return{backgroundColor:t,borderStyle:"solid",borderColor:"transparent",borderWidth:"1.5px 3px 3px 1.5px",backgroundImage:`linear-gradient(${t}, ${t}), linear-gradient(135deg, ${s} 0%, ${s} 25%, ${n} 100%)`,backgroundClip:"padding-box, border-box",backgroundOrigin:"padding-box, border-box"}}return((0,s.useEffect)(()=>{-1===M?x?.(j?.background_color||""):x?.(_.get(M??-1)?.background_color||"")},[M,j,x]),(0,s.useEffect)(()=>{let t,r=k.startsWith("/product/"),a="/"===k||k.startsWith("/products")||k.startsWith("/category");if(r){try{let e=sessionStorage.getItem("ozi_active_cat");L(null!==e?Number(e):null)}catch{}return}if(!a)return void L(null);if(void 0!==S.catId)t=(0,i.extractCategoryIdFromRouteParam)(String(S.catId))??-1;else{let e=I?Number(I):-1;t=isNaN(e)?-1:e}if(t>0&&!e.some(e=>e.id===t)){let r=h?.[t]??function(e,t){for(let r of e)if(function e(t,r){return t.id===r||(t.childes??[]).some(t=>e(t,r))}(r,t))return r.id;return null}(e,t);null!=r&&(t=r)}L(t);try{sessionStorage.setItem("ozi_active_cat",String(t))}catch{}},[S,I,e,h,k]),e?.length)?(0,t.jsxs)("div",{className:"relative w-full",onMouseLeave:K,style:f?{backgroundImage:`url(${f})`,backgroundSize:"cover",backgroundPosition:"center"}:void 0,children:[T&&(0,t.jsx)("button",{onClick:()=>{Y.current?.scrollBy({left:-200,behavior:"smooth"})},className:"hidden lg:flex absolute left-0 top-1/2 -translate-y-1/2 z-10 items-center justify-center w-7 h-7 bg-white rounded-full shadow-md border border-gray-100 hover:bg-gray-50 transition-all",children:(0,t.jsx)(c.ArrowLeft2,{size:16,className:"text-(--Gray-700)"})}),$&&(0,t.jsx)("button",{onClick:()=>{Y.current?.scrollBy({left:200,behavior:"smooth"})},className:"hidden lg:flex absolute right-0 top-1/2 -translate-y-1/2 z-10 items-center justify-center w-7 h-7 bg-white rounded-full shadow-md border border-gray-100 hover:bg-gray-50 transition-all",children:(0,t.jsx)(d.ArrowRight2,{size:16,className:"text-(--Gray-700)"})}),(0,t.jsxs)("div",{ref:Y,onScroll:Z,className:"flex gap-4 lg:justify-between w-full overflow-auto hide-scrollbar md:py-1 lg:transition-all lg:duration-300 lg:ease-out lg:bg-linear-to-b lg:from-white lg:to-(--Primary-Mauve-50) lg:rounded-[15p
9x] lg:gap-1 lg:px-5 lg:py-2.5 lg:shadow-[0_6px_20px_-6px_rgba(73,29,48,0.28),0_2px_6px_-2px_rgba(73,29,48,0.14)]",children:[(g=-1===M,b=j&&(g?j.selected_icon:j.unselected_icon)||a.default.ALL_CAT,y=N&&g&&!p,v=C&&g,w=N||C||!g||p?v?eo(j):{}:V(j),(0,t.jsx)(n,{onMouseEnter:K,startAdornment:(0,t.jsx)("span",{className:`grid place-items-center rounded-xl transition-all duration-200 ${et} ${U?ea:""} ${y?"px-2.5 py-1":""} ${y&&!j?.section_bg_color?"bg-(--Primary-Mauve-100)":""} ${v?en:""}`,style:y?V(j):void 0,children:(0,t.jsx)("img",{src:b||a.default.ALL_CAT,alt:"All",className:`overflow-hidden transition-all duration-[350ms] ease-[cubic-bezier(0.4,0,0.2,1)] md:h-8 md:w-10 md:opacity-100 ${er} ${U?es:""} ${p?"max-md:h-0 max-md:w-0 max-md:opacity-0":"max-md:h-8 max-md:w-10 max-md:opacity-100"}`})}),handleClick:()=>{L(-1),E.push("/")},style:w,className:`cursor-pointer flex shrink-0 items-center rounded-lg relative after:absolute after:bottom-0 after:left-1/2 after:-translate-x-1/2 after:h-[2px] after:rounded-full after:transition-all after:duration-200 10 ${g?`font-semibold text-(--Primary-Mauve-600) ${!p&&!j?.section_bg_color?"md:bg-(--Primary-Mauve-100)":""} ${p?"after:w-4 after:bg-(--Primary-Mauve-600) md:after:w-0":"after:w-0"}`:"text-black hover:bg-(--Gray-100) after:w-0"} 11 ${p?"max-md:flex-row max-md:py-1 max-md:px-2 max-md:text-xs":"max-md:flex-col max-md:p-1 max-md:text-xs max-md:gap-1"} md:gap-1 md:py-1 md:px-2 ${J} ${U?X:ee}`,placeholder:"All"})),e?.map((e,r)=>{let a=M===e.id,s=N&&a&&!p,l=C&&a,c=N||C||!a||p?l?eo(_.get(e.id)):{}:V(_.get(e.id));return(0,t.jsx)(n,{startAdornment:(0,t.jsx)("span",{className:`grid place-items-center rounded-xl transition-all duration-200 ${et} ${U?ea:""} ${s?"px-2.5 py-1":""} ${s&&!_.get(e.id)?.section_bg_color?"bg-(--Primary-Mauve-100)":""} ${l?en:""}`,style:s?V(_.get(e.id)):void 0,children:(0,t.jsx)("img",{src:function(e,t){let r=_.get(e.id);if(r){let e=t?r.selected_icon:r.unselected_icon;if(e)return e}return e.image_icon_small_full_url||e.image_icon_full_url||e.image_full_url||""}(e,a),alt:e.name,className:`overflow-hidden transition-all duration-[350ms] ease-[cubic-bezier(0.4,0,0.2,1)] md:h-8 md:w-10 md:opacity-100 ${er} ${U?es:""} ${p?"max-md:h-0 max-md:w-0 max-md:opacity-0":"max-md:h-8 max-md:w-10 max-md:opacity-100"}`})}),handleClick:()=>{L(e.id),E.push((0,i.buildCategoryHref)(e))},onMouseEnter:()=>{O(r),F(!0),(e=>{if(!C||!e||q[e]||G.current.has(e))return;G.current.add(e);let t=new AbortController;H.current.add(t),fetch(`/api/nav-children/${e}`,{signal:t.signal}).then(e=>e.ok?e.json():{childes:[]}).then(t=>{W(r=>({...r,[e]:Array.isArray(t?.childes)?t.childes:[]}))}).catch(t=>{t?.name!=="AbortError"&&W(t=>({...t,[e]:[]}))}).finally(()=>{G.current.delete(e),H.current.delete(t)})})(e.id)},style:c,className:`cursor-pointer flex shrink-0 items-center rounded-lg relative after:absolute after:bottom-0 after:left-1/2 after:-translate-x-1/2 after:h-[2px] after:rounded-full after:transition-all after:duration-200 12 ${a?`font-semibold text-(--Primary-Mauve-600) ${!p&&!_.get(e.id)?.section_bg_color?"md:bg-(--Primary-Mauve-100)":""} ${p?"after:w-4 after:bg-(--Primary-Mauve-600) md:after:w-0":"after:w-0"}`:"text-black hover:bg-(--Gray-100) after:w-0"} 13 ${p?"max-md:flex-row max-md:py-1 max-md:px-2 max-md:text-xs":"max-md:flex-col max-md:p-1 max-md:text-xs max-md:gap-1"} md:gap-1 md:py-1 md:px-2 ${J} ${U?X:ee}`,endAdornment:(0,t.jsx)(o.ArrowDown2,{className:"max-md:hidden lg:hidden",size:16}),placeholder:e.name},e.id??r)})]}),z&&null!==R&&(0,t.jsx)(l,{data:q[e[R]?.id??-1]?.length?q[e[R]?.id??-1]:e[R]?.childes??[],theme:_.get(e[R]?.id)??null,onMouseLeave:K})]}):(0,t.jsx)(t.Fragment,{children:"No Categories to show"})};var m=e.i(662654),p=e.i(846932),f=e.i(88653);let x=({count:e=0,icon:r,active:a=!1})=>(0,t.jsxs)("div",{className:"hidden relative lg:inline-flex cursor-pointer",children:[(0,t.jsx)("div",{className:`group/tile flex items-center justify-center w-10 h-10 rounded-full border-[1.5px] border-(--Primary-Mauve-300) shadow-[-3px_0_2px_0_#E5E7EB33_inset,3px_0_2px_0_#E5E7EB33_inset,0_-3px_2px_0_#E5E7EB33_inset,0_3px_2px_0_#E5E7EB33_inset] transition-all duration-200 ease-out hover:-translate-y-0.5 hover:border-(--Primary-Mauve-400) hover:shadow-[0_6px_14px_-6px_rgba(0,0,0,0.35)] active:translate-y-0 active:duration-75 ${a?"bg-(--Primary-Mauve-100)":"bg-white hover:bg-(--Primary-Mauve-50)"}`,children:r}),e>0&&(0,t.jsx)("span",{className:"absolute -top-4 -right-2 flex h-6 min-w-[30px] h-4 rounded-b-xl rounded-t-xl items-center justify-center bg-(--Primary-Mauve-600) px-1 text-xs font-semibold text-white",children:e})]});var g=e.i(357607);let b=({name:e="Aakanksha"})=>(0,t.jsxs)("div",{className:" overflow-auto hide-scrollbar relative inline-flex h-10 items-center gap-3 rounded-full border-[1.5px] border-(--Primary-Mauve-300) bg-white px-4 py-2 cursor-pointer shadow-[-3px_0_2px_0_#E5E7EB33_inset,3px_0_2px_0_#E5E7EB33_inset,0_-3px_2px_0_#E5E7EB33_inset,0_3px_2px_0_#E5E7EB33_inset] transition-all duration-200 ease-out hover:border-(--Primary-Mauve-400) hover:bg-(--Primary-Mauve-50) hover:shadow-[0_6px_14px_-6px_rgba(0,0,0,0.35)]",children:[(0,t.jsx)(g.User,{size:"18",color:"#0F172A"}),(0,t.jsxs)("span",{className:"text-sm font-semibold text-slate-900",children:["Hi, ",e]}),(0,t.jsx)(o.ArrowDown2,{size:"16",variant:"Bold",color:"#0F172A"})]});var y=e.i(191089),v=e.i(160265),w=e.i(11524),_=e.i(392917),j=e.i(413294),N=e.i(291088),C=e.i(445231),E=e.i(522016),S=e.i(587656);e.i(6999);var k=e.i(296252);function A({menuItems:e}
13){let a=(0,r.useRouter)(),[n,i]=(0,s.useState)(!1),{clearUser:l,userInfo:o,setZoneData:c,zoneData:d}=(0,j.useAppStore)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"absolute min-w-[250px] right-0 max-w-sm rounded-2xl z-20 bg-white shadow-lg overflow-y-auto max-h-[84vh] hide-scrollbar",children:[e.map((e,r)=>{let a=(0,t.jsxs)("div",{className:"cursor-pointer flex w-full items-center gap-3 px-4 py-4 text-left text-gray-800 hover:bg-gray-50",children:[(0,t.jsx)(e.icon,{size:22,color:"#1F2937"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:e.label})]});return(0,t.jsxs)("div",{children:[e.onClick?(0,t.jsx)("button",{type:"button",onClick:e.onClick,className:"w-full",children:a}):(0,t.jsx)(E.default,{href:e.href,children:a}),(0,t.jsx)("div",{className:`mx-4 border-t border-dashed ${e.highlight?"border-pink-400":"border-gray-200"}`})]},r)}),(0,t.jsxs)("button",{onClick:()=>i(e=>!e),className:"flex cursor-pointer w-full items-center gap-3 px-4 py-4 text-pink-500 hover:bg-pink-50",children:[(0,t.jsx)(S.LogoutCurve,{size:22,color:"#EC4899"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:"Logout"})]})]}),(0,t.jsx)(k.LogoutModal,{open:n,setOpen:i,onConfirm:()=>{(0,C.handleLogout)(),d&&(d.addressId=void 0,d.address_type=void 0,d.contact_person_name=void 0,d.contact_person_number=void 0,d.house=void 0,d.road=void 0,c(d)),l(),a.push(N.AppRoutes.HOME)}})]})}var P=e.i(545785),I=e.i(33965),M=e.i(145876),L=e.i(256505),R=e.i(855506),O=e.i(524132),z=e.i(452480),F=e.i(104001),T=e.i(976552),B=e.i(852139),$=e.i(901381);let D=function(){let e=(0,r.useRouter)(),a=(0,r.usePathname)(),{isMobile:n}=(0,u.useResponsive)(),i=a===N.AppRoutes.WISHLIST,l=a.startsWith(N.AppRoutes.CART),{userInfo:o,isAuthLoading:c,setOpenLogin:d,zoneData:h,setWishListInfo:m,wishListInfo:g,cartInfo:C,guestCart:E,guestWishlist:S}=(0,j.useAppStore)(),[k,D]=(0,s.useState)(void 0),[q,W]=(0,s.useState)(!1),G=(0,s.useRef)(0);(0,s.useEffect)(()=>{if(!o?.isLoggedIn)return;let e=sessionStorage.getItem("token");async function t(){let t=await (0,_.getWishList)({token:e,zoneId:h?.zone_id??[-1]});t.success&&m(t.data.item)}e&&t()},[h,o?.isLoggedIn]),(0,s.useEffect)(()=>{if(o?.isLoggedIn)D(C?.cart?.reduce((e,t)=>e+(t.products?.length??0),0));else{let e=E.length;e>G.current&&(W(!0),setTimeout(()=>W(!1),900)),G.current=e,D(e>0?e:void 0)}},[C,E,o?.isLoggedIn]);let H=[{label:"My Profile",icon:P.Profile,href:N.AppRoutes.PROFILE},{label:"Orders",icon:I.Box,href:N.AppRoutes.ORDERS},{label:"Address Book",icon:M.Location,href:N.AppRoutes.ADDRESS_BOOK},{label:"Coupons",icon:L.TicketDiscount,href:N.AppRoutes.COUPONS},{label:"Notifications",icon:R.Notification,href:N.AppRoutes.NOTIFICATIONS,highlight:!0},{label:"Chat with us",icon:B.Messages2,href:"#",onClick:()=>(0,$.openSupportChat)()},{label:"Contact Us",icon:O.Call,href:N.AppRoutes.CONTACT_US},{label:"Return & Refund Policies",icon:z.Refresh,href:N.AppRoutes.RETURN_REFUND},{label:"Privacy Policies",icon:F.Shield,href:N.AppRoutes.PRIVACY_POLICY},{label:"Terms & Conditions",icon:T.DocumentText,href:N.AppRoutes.TERMS_AND_CONDITIONS}];function U(t){"cart"===t?e.push(N.AppRoutes.CART):e.push(N.AppRoutes.WISHLIST)}return(0,t.jsxs)("div",{className:"flex items-center gap-2 justify-end",children:[!c&&(0,t.jsx)("div",{onClick:()=>U("wishlist"),className:"cursor-pointer",children:(0,t.jsx)(x,{count:o?.isLoggedIn?g?.length:S.length>0?S.length:void 0,active:i,icon:(0,t.jsx)(v.Heart,{size:"24",color:"var(--Primary-Mauve-600)",variant:i?"Bold":"Outline"})})}),(0,t.jsx)(f.AnimatePresence,{children:!c&&(0,t.jsxs)(p.motion.div,{animate:q?{scale:[1,1.35,.95,1]}:{scale:1},transition:{duration:.35,ease:"easeOut"},className:"relative cursor-pointer",onClick:()=>U("cart"),children:[(0,t.jsx)(x,{count:k,active:l,icon:(0,t.jsx)(y.Bag2,{size:"24",color:"var(--Primary-Mauve-600)",variant:l?"Bold":"Outline"})}),(0,t.jsx)(f.AnimatePresence,{children:q&&(0,t.jsx)(t.Fragment,{children:[{x:0,y:-22},{x:18,y:-14},{x:20,y:8},{x:-18,y:-14},{x:-20,y:8}].map((e,r)=>(0,t.jsx)(p.motion.span,{className:"pointer-events-none absolute left-1/2 top-1/2 w-2 h-2 rounded-full",style:{background:r%2==0?"var(--Primary-Mauve-500)":"#f472b6",marginLeft:-4,marginTop:-4},initial:{x:0,y:0,scale:0,opacity:1},animate:{x:e.x,y:e.y,scale:[0,1.2,.8,0],opacity:[1,1,.6,0]},exit:{opacity:0}
13,transition:{duration:.7,ease:"easeOut",delay:.04*r}},r))})})]},"cart-icon")}),c?(0,t.jsxs)("div",{className:"hidden lg:flex gap-2",children:[(0,t.jsx)("div",{className:"bg-gray-100 rounded-full w-10 h-10 animate-pulse"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-full w-10 h-10 animate-pulse"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-xl w-32 h-10 animate-pulse"})]}):o?.isLoggedIn?(0,t.jsxs)("div",{className:"hidden group lg:block relative shrink-0",children:[(0,t.jsx)(b,{name:o.f_name||"User"}),(0,t.jsx)("div",{className:"hidden group-hover:block",children:(0,t.jsx)(A,{menuItems:H})})]}):(0,t.jsx)("div",{className:"hidden lg:block",children:(0,t.jsx)(w.default,{className:"px-5 py-2.5",size:"md",variant:"tertiary",onClick:()=>d(!0),children:"LOGIN"})})]})};var q=e.i(432008),W=e.i(742355),G=e.i(657688),H=e.i(184589),U=e.i(594924),Q=e.i(224044);function Y({bleedRight:e=!1}){let{openSheet:r}=(0,H.useTryAtHome)(),a=(0,U.useGenericPromiseModal)(),[n,i]=(0,s.useState)(!1),[l,o]=(0,s.useState)(!0),c=(0,s.useRef)(null),d=(0,s.useRef)(null),u=(0,s.useRef)(null),h=(0,s.useCallback)(()=>{let e=c.current,t=()=>o(e=>!e);!e||"function"!=typeof e.animate||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?t():(d.current?.cancel(),u.current&&window.clearTimeout(u.current),d.current=e.animate([{transform:"rotateX(0deg)",offset:0,easing:"ease-in"},{transform:"rotateX(90deg)",offset:.5},{transform:"rotateX(-90deg)",offset:.5001,easing:"ease-out"},{transform:"rotateX(0deg)",offset:1}],{duration:600}),u.current=window.setTimeout(t,300))},[]);return(0,s.useEffect)(()=>{let e=window.setInterval(h,5e3);return()=>{window.clearInterval(e),d.current?.cancel(),u.current&&window.clearTimeout(u.current)}},[h]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"h-[48px] w-[100px] shrink-0 [perspective:460px]",children:(0,t.jsx)("button",{ref:c,onClick:()=>l?r("header"):a?i(!0):void r("header"),"aria-label":l?"Free Trial at Home":"OZi Promise",className:"block h-full w-full cursor-pointer select-none [backface-visibility:hidden] [transform-style:preserve-3d]",children:l?(0,t.jsxs)("span",{className:(0,C.cn)("flex h-full w-full items-center justify-center gap-1 border border-(--Plum-150) bg-(--TnB-Background) bg-[url(/img/tnb/strip-bg.svg)] bg-cover shadow-sm",e?"rounded-l-2xl rounded-r-none border-r-0":"rounded-2xl"),children:[(0,t.jsxs)("span",{className:"text-[11px] font-bold leading-tight text-(--Plum-700)",children:["Free Trial",(0,t.jsx)("br",{}),"at Home"]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"text-xs text-(--TnB-Primary)",children:"â¦"})]}):(0,t.jsxs)("span",{className:(0,C.cn)("relative flex h-full w-full items-center justify-center overflow-hidden shadow-sm",e?"rounded-l-2xl rounded-r-none":"rounded-2xl"),children:[(0,t.jsx)(G.default,{src:"/img/promise/banner-bg.webp",alt:"","aria-hidden":!0,unoptimized:!0,fill:!0,className:"object-cover"}),(0,t.jsx)("img",{src:"/img/promise/logo.svg",alt:"OZi Promise",className:"relative h-[40px] w-auto"})]})})}),(0,t.jsx)(Q.default,{open:n,data:a,onClose:()=>i(!1)})]})}var Z=e.i(896870),K=e.i(263553),V=e.i(882897);let J={rain:"ð§",fog:"ð«",high_demand:"â¡"};function X({surge:e,withBackground:r=!0}){let{surgeBannerVisible:a,surgeBannerShownKey:n,setSurgeBannerVisible:i,setSurgeBannerShownKey:l}=(0,V.useMobileUIStore)(),o=e?`${e.type??""}|${e.message??""}`:null,c=(0,s.useRef)(null);return((0,s.useEffect)(()=>{o?n!==o&&(l(o),i(!0)):i(!1)},[o]),(0,s.useEffect)(()=>{if(a)return c.current&&clearTimeout(c.current),c.current=setTimeout(()=>i(!1),4900),()=>{c.current&&clearTimeout(c.current)}},[a]),e)?(0,t.jsx)("div",{"aria-live":"polite",className:`grid overflow-hidden transition-[grid-template-rows,opacity] ${a?"grid-rows-[1fr] opacity-100 duration-[900ms] ease-out":"grid-rows-[0fr] opacity-0 duration-[950ms] ease-in"}`,children:(0,t.jsx)("div",{className:"min-h-0",children:(0,t.jsx)("div",{className:`w-full px-4 py-3 text-center font-bold text-[15px] leading-snug ${e.isDark?"text-white":"text-gray-900"} ${r&&!e.imageUrl?"bg-[#3b3f63]":""}`,style:r&&e.imageUrl?{backgroundImage:`url(${e.imageUrl})`,backgroundSize:"cover",backgroundPosition:"center"}:void 0,children:e.message})})}):null}function ee({status:e}){let{surgeBannerVisible:r,setSurgeBannerVisible:a}=(0,V.useMobileUIStore)();if(r)return null;if("schedule_only"===e.kind||"high_demand"===e.kind)return(0,t.jsx)("button",{type:"button",onClick:t=>{t.preventDefault(),t.stopPropagation(),e.surge&&a(!0)},className:"inline-flex items-center gap-1 shrink-0 rounded-full bg-white/85 backdrop-blur-sm px-2 py-0.5 text-[10px] font-bold text-gray-800 shadow-sm cursor-pointer","aria-label":"Show delivery notice",children:"schedule_only"===e.kind?(0,t.jsx)(t.Fragment,{children:"ð
Schedule only"}):(0,t.jsx)(t.Fragment,{children:"â¡ High Demand"})});if(e.surge){let r=J[e.surge.type??""]??"â¡";return(0,t.jsxs)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),a(!0)},className:"inline-flex items-center gap-1 shrink-0 rounded-full bg-white/85 backdrop-blur-sm px-2 py-0.5 text-[10px] font-bold text-gray-800 shadow-sm cursor-pointer","aria-label":"Show delivery notice",children:[r," ",e.surge.chipLabel]})}return null}var et=e.i(511740),er=e.i(282972),ea=e.i(964640);e.s(["default",0,({catData:e,categoryRootMap:n,v2Categories:i=[],initialZone:l,initialFeatureConfig:c}
13)=>{let d,p=(0,r.usePathname)(),f=(0,r.useRouter)(),{isDesktop:x,isMobile:g}=(0,u.useResponsive)(),[b,y]=(0,s.useState)(!1),[v,w]=(0,s.useState)(null),[C,S]=(0,s.useState)(""),k=(0,j.useAppStore)(e=>e.featureConfig)??c??null,{zoneData:A,openDeliveryModal:P,setOpenDeliveryModal:I,openDeliveryLocation:M,openDeliveryLocation1:L,setOpenDeliveryLocation:R,setZoneData:O,userInfo:z,setOpenLogin:F}=(0,j.useAppStore)(),T=A??l,B=(0,Z.deriveDeliveryStatus)(k,T?.tat?.duration,(0,K.totalBufferMinutes)(k),!!T),$=!!B.surge&&B.surge.isDark,[G,H]=(0,s.useState)(!1),U=(0,s.useRef)(null),[Q,V]=(0,s.useState)({}),[J,es]=(0,s.useState)({});(0,s.useEffect)(()=>{if(L&&U.current){let e=U.current.getBoundingClientRect();es({top:e.bottom+8,left:e.left})}},[L]),(0,s.useEffect)(()=>{let e,t=0,r=()=>{cancelAnimationFrame(e),e=requestAnimationFrame(()=>{let e=window.scrollY;Date.now()<t||H(r=>{let a=r;return!r&&e>160?a=!0:r&&e<40&&(a=!1),a!==r&&(t=Date.now()+400),a})})};return r(),window.addEventListener("scroll",r,{passive:!0}),()=>{cancelAnimationFrame(e),window.removeEventListener("scroll",r)}},[]),(0,s.useEffect)(()=>{if(!ea.Constants.isWalletEnabled||!z?.isLoggedIn)return void w(null);let e=sessionStorage.getItem("token");e&&(0,_.getWalletInfo)(e).then(e=>{e.success&&w(e.data)})},[z?.isLoggedIn]);let en=(0,j.useAppStore)(e=>e.isCategoryPLP),ei=x||"/"===p||p.includes("/category")&&!en;return p.startsWith("/blogs")?null:(0,t.jsxs)(t.Fragment,{children:[M&&(0,t.jsx)("div",{onClick:()=>R(!1),className:"fixed inset-0 z-[200] bg-black/40"}),M&&(0,t.jsx)("div",{className:"fixed z-[201]",style:Q,onClick:e=>e.stopPropagation(),children:(0,t.jsx)(W.default,{open:M})}),L&&(0,t.jsx)("div",{className:"fixed inset-0 z-[900] bg-gray-500/70",onClick:e=>e.stopPropagation()}),L&&(0,t.jsx)("div",{className:"fixed z-[901]",style:J,onClick:e=>e.stopPropagation(),children:(0,t.jsx)(er.default,{open:L})}),(0,t.jsx)("div",{className:"flex flex-col w-full sticky z-99 top-0 ","data-scroll-header":!0,children:ei&&(0,t.jsxs)("header",{"data-home-navbar":!0,className:"w-full flex flex-col pt-4 pb-2 md:pb-4 px-4 md:px-6 lg:px-40 lg:pt-4 lg:pb-2.5 transition-colors duration-300 bg-(--Primary-Mauve-200) shadow-[0_2px_8px_rgba(0,0,0,0.2)]",style:C?{backgroundColor:C}:void 0,children:[(0,t.jsxs)("div",{className:`relative -mx-4 md:-mx-6 lg:-mx-40 -mt-4 px-4 md:px-6 lg:px-40 pt-4 ${B.surge?"pb-3":""}`,children:[B.surge?.imageUrl&&(0,t.jsx)(et.default,{url:B.surge.imageUrl}),(0,t.jsxs)("div",{className:"relative z-10",children:[(0,t.jsx)(X,{surge:B.surge,withBackground:!1}),(0,t.jsx)("div",{className:"flex justify-between w-full",children:(0,t.jsxs)("section",{className:"w-full grid md:grid-cols-[1fr_auto_1fr] items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 lg:gap-3",children:[(0,t.jsx)(E.default,{href:N.AppRoutes.HOME,className:"shrink-0 transition-opacity duration-200 hover:opacity-80",children:(0,t.jsx)("img",{src:a.default.OZI_LOGO,alt:"OZI-logo",className:"h-6 md:h-10"})}),(0,t.jsx)("span",{"aria-hidden":!0,className:"hidden lg:block h-8 w-px shrink-0 bg-(--Primary-Mauve-300)"}),(0,t.jsx)("div",{ref:U,className:"cursor-pointer flex-1 min-w-0 lg:-mx-2 lg:rounded-lg lg:px-2 lg:py-1 lg:transition-colors lg:duration-200 lg:hover:bg-black/5",onClick:()=>(()=>{if(!z?.isLoggedIn)return void F(!0);if(g)I(!0);else{if(U.current){let e=U.current.getBoundingClientRect();V({top:e.bottom+8,left:e.left})}R(!0)}})(),"data-nosnippet":!0,children:(d=T?.address,(0,t.jsxs)("div",{className:"flex flex-col",suppressHydrationWarning:!0,children:[(0,t.jsxs)("span",{className:`flex items-center gap-1 font-extrabold lg:text-lg ${$?"text-white":"text-(--Gray-800)"}`,children:[B.showLightning&&(0,t.jsxs)(t.Fragment,{children:["in ",(0,t.jsx)("img",{src:a.default.LIGHTNING,alt:""})]}),(0,t.jsxs)("span",{className:`font-extrabold ${B.attention?"text-(--Primary-Mauve-600)":$?"text-white":"text-(--Gray-800)"}`,children:[" ",B.label]}),(0,t.jsx)(ee,{status:B})]}),(0,t.jsx)("div",{className:`${$?"text-white/90":"text-gray-800"} font-semibold text-xs lg:text-sm flex items-center min-w-0`,tabIndex:0,children:(0,t.jsxs)("div",{className:"inline-flex min-w-0 items-center",children:[(0,t.jsx)("span",{className:"block truncate min-w-0",title:d??void 0,"data-nosnippet"
13:!0,children:d||"Tap to select location"}),(0,t.jsx)(o.ArrowDown2,{size:"16",variant:"Bold",className:"shrink-0 ml-0.5"})]})})]}))}),ea.Constants.isWalletEnabled&&z?.isLoggedIn&&(0,t.jsxs)("button",{onClick:()=>f.push(N.AppRoutes.WALLET),className:"lg:hidden shrink-0 relative flex items-center justify-center",children:[(0,t.jsx)("img",{src:a.default.WalletFilled,alt:"wallet",className:"w-14 h-14 object-contain"}),(0,t.jsx)("span",{className:"absolute bottom-0 text-[8px] font-bold leading-none px-1 py-0.5 rounded-md bg-white",style:{color:"#5D76E7"},children:v&&v.totalBalance>0?v.formattedBalance:"ADD"})]}),(0,t.jsx)(E.default,{href:N.AppRoutes.SEARCH,"aria-label":"Search",className:`lg:hidden shrink-0 overflow-hidden transition-[width,opacity,transform] duration-[300ms] ease-[cubic-bezier(0.4,0,0.2,1)] will-change-[width,opacity,transform] ${G?"w-9 opacity-100 scale-100":"w-0 opacity-0 scale-75 pointer-events-none"}`,children:(0,t.jsx)("div",{className:"p-2 rounded-xl bg-white/80 border border-slate-200 backdrop-blur-sm",children:(0,t.jsx)(m.SearchNormal1,{size:20,className:"text-slate-700"})})})]}),(0,t.jsxs)("div",{className:"hidden lg:flex min-w-96 items-center gap-2 justify-center",children:[(0,t.jsx)(q.default,{}),(0,t.jsx)(Y,{})]}),(0,t.jsx)("div",{className:"flex justify-end items-center gap-4",children:(0,t.jsx)(D,{})})]})}),(0,t.jsx)("div",{className:`lg:hidden w-full grid transition-[grid-template-rows,opacity,margin] duration-[300ms] ease-[cubic-bezier(0.4,0,0.2,1)] will-change-[grid-template-rows] ${G?"grid-rows-[0fr] opacity-0 mt-0":"grid-rows-[1fr] opacity-100 mt-4"}`,children:(0,t.jsxs)("div",{className:"overflow-hidden flex items-center gap-2 -mr-4 md:-mr-6",children:[(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsx)(q.default,{})}),(0,t.jsx)(Y,{bleedRight:!0})]})})]})]}),e.length>0&&(0,t.jsx)("div",{className:`transition-[margin] duration-[350ms] ease-[cubic-bezier(0.4,0,0.2,1)] lg:mt-4 ${G?"mt-1":"mt-2"}`,children:(0,t.jsx)(h,{categoriesArray:e??[],categoryRootMap:n,v2Categories:i,scrolled:G,bgImage:"",onBgColorChange:S})})]})})]})}],780894)},652112,e=>{"use strict";var t=e.i(843476),r=e.i(618566),a=e.i(846932),s=e.i(657688),n=e.i(522016),i=e.i(345454),l=e.i(291088),o=e.i(215636),c=e.i(984828);let d={instagram:c.FaInstagram,linkedin:c.FaLinkedinIn,x:c.FaXTwitter,facebook:c.FaFacebookF,youtube:c.FaYoutube,website:c.FaGlobe},u=(e=0)=>({initial:{y:16},whileInView:{y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.5,ease:[.22,1,.36,1],delay:e}}),h=[{label:"Terms & Conditions",href:l.AppRoutes.TERMS_AND_CONDITIONS},{label:"Privacy Policies",href:l.AppRoutes.PRIVACY_POLICY},{label:"Return & Refund",href:l.AppRoutes.RETURN_REFUND},{label:"Get Me Anything",href:l.AppRoutes.GET_ME_ANYTHING},{label:"Shipping",href:l.AppRoutes.SHIPPING},{label:"About Us",href:l.AppRoutes.ABOUT_US},{label:"Feedback",href:l.AppRoutes.FEEDBACK},{label:"Contact Us",href:l.AppRoutes.CONTACT_US},{label:"Hospital Bag",href:l.AppRoutes.HOSPITAL_BAG_DEMO}],m={label:"Blogs",href:l.AppRoutes.BLOG};function p({config:e}){let l=(0,r.usePathname)().startsWith("/blogs")?h:[...h,m];return(0,t.jsxs)("div",{className:"border-t border-gray-100 pt-10 pb-4",children:[(0,t.jsxs)(a.motion.div,{className:"flex flex-col lg:flex-row items-center justify-center gap-8 lg:gap-12 mb-10",...u(0),children:[(0,t.jsxs)("div",{className:"flex flex-col items-center lg:items-start gap-1 text-center lg:text-left",children:[(0,t.jsx)(s.default,{src:i.default.OZI_LOGO,alt:"Ozi Logo",width:160,height:72,className:"w-20 h-auto lg:w-40"}),(0,t.jsxs)("p",{className:"text-sm text-(--Gray-500)",children:["© ",e?.footer_text||"Ozi Technologies Private Limited @ 2025"]}),(0,t.jsxs)("p",{className:"text-xs text-(--Gray-400)",children:["(",e?.company_registration||"U47912KA2020PTC134973",")"]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-2 sm:gap-4 w-full lg:w-auto",children:[(0,t.jsxs)(a.motion.div,{whileHover:{y:-3,boxShadow:"0 8px 24px rgba(177,81,119,0.12)"},transition:{type:"spring",stiffness:400,damping:25},className:"flex flex-col items-center justify-center gap-2 rounded-2xl border border-gray-100 bg-gray-50 hover:bg-(--Primary-Mauve-50) hover:border-(--Primary-Mauve-200) px-2 py-4 sm:px-5 sm:py-5 text-center transition-colors duration-200 min-w-0 lg:min-w-[180px]",children:[(0,t.jsx)("div",{className:"w-10 h-10 rounded-xl bg-white border border-gray-100 flex items-center justify-center shadow-sm",children:(0,t.jsx)(s.default,{src:i.default.EMAIL_ICON,alt:"Email",width:18,height:18,className:"object-contain"})}),(0,t.jsx)("p",{className:"text-xs font-semibold text-(--Gray-500) uppercase tracking-wide",children:"Reach us at"}),(0,t.jsxs)("div",{className:"w-full space-y-2.5 text-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[10px] font-semibold text-(--Gray-500) uppercase tracking-wider mb-0.5",children:"Partnerships & Vendors"}),(0,t.jsx)("a",{href:`mailto:${o.COMPANY.email.partner}`,className:"text-xs font-bold text-(--Gray-800) hover:text-(--Primary-Mauve-600) transition-colors break-all",children:o.COMPANY.email.partner})]}),(0,t.jsxs)("div",{className:"border-t border-gray-100 pt-2.5",children:[(0,t.jsx)("p",{className:"text-[10px] font-semibold text-(--Gray-500) uppercase tracking-wider mb-0.5",children:"Customer Support"}),(0,t.jsx)("a",{href:`mailto:${o.COMPANY.email.support}`,className:"text-xs font-bold text-(--Gray-800) hover:text-(--Primary-Mauve-600) transition-colors break-all",children:o.COMPANY.email.support})]})]})]}),(0,t.jsxs)(a.motion.a,{href:`tel:+91${e?.phone??o.COMPANY.phone.national}`,whileHover:{y:-3,boxShadow:"0 8px 24px rgba(177,81,119,0.12)"},transition:{type:"spring",stiffness:400,damping:25},className:"flex flex-col items-center justify-center gap-2 rounded-2xl border border-gray-100 bg-gray-50 hover:bg-(--Primary-Mauve-50) hover:border-(--Primary-Mauve-200) px-2 py-4 sm:px-5 sm:py-5 text-center transition-colors duration-200 cursor-pointer min-w-0 lg:min-w-[150px]",children:[(0,t.jsx)("div",{className:"w-10 h-10 rounded-xl bg-white border border-gray-100 flex items-center justify-center shadow-sm",children:(0,t.jsx)(s.default,{src:i.default.PHONE_ICON,alt:"Phone",width:18,height:18,className:"object-contain"})}),(0,t.jsx)("p",{className:"text-xs font-semibold text-(--Gray-500) uppercase tracking-wide",children:"Call us"}),(0,t.jsxs)("p",{className:"text-xs sm:text-sm font-bold text-(--Gray-800)",children:["+91 ",e?.phone??o.COMPANY.phone.national]})]}),(0,t.jsxs)(a.motion.div,{whileHover:{y:-3,boxShadow:"0 8px 24px rgba(177,81,119,0.12)"},transition:{type:"spring",stiffness:400,damping:25},className:"flex flex-col items-center justify-center gap-2 rounded-2xl border border-gray-100 bg-gray-50 hover:bg-(--Primary-Mauve-50) hover:border-(--Primary-Mauve-200) px-2 py-4 sm:px-5 sm:py-5 text-center transition-colors duration-200 min-w-0 lg:min-w-[150px]",children:[(0,t.jsx)("div",{className:"w-10 h-10 rounded-xl bg-white border border-gray-100 flex items-center justify-center shadow-sm",children:(0,t.jsx)(s.default,{src:i.default.LO
13CATION_ICON,alt:"Location",width:18,height:18,className:"object-contain"})}),(0,t.jsx)("p",{className:"text-xs font-semibold text-(--Gray-500) uppercase tracking-wide",children:"Find us"}),(0,t.jsx)("p",{className:"text-xs sm:text-sm font-bold text-(--Gray-800) leading-snug",children:o.COMPANY.address.full})]})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:e?.social_media_website?.map(e=>{var r;let s,n=(r=e.name,(s=r?.toLowerCase().trim())?s.includes("twitter")?"x":Object.keys(d).find(e=>s.includes(e)||e.includes(s))??null:null),i=n?d[n]:null;return(0,t.jsx)(a.motion.a,{href:e.link,target:"_blank",rel:"noopener noreferrer",whileHover:{scale:1.18,color:"var(--Primary-Mauve-600)"},whileTap:{scale:.9},initial:!1,className:"w-13 h-13 rounded-full border border-gray-200 bg-white flex items-center justify-center text-gray-500 hover:text-(--Primary-Mauve-600) hover:border-(--Primary-Mauve-300) hover:shadow-md transition-colors duration-200",children:i?(0,t.jsx)(i,{className:"w-6 h-6"}):(0,t.jsx)("span",{className:"text-xs font-bold text-gray-500",children:e.name?.charAt(0).toUpperCase()})},e.name)})})]}),(0,t.jsx)("div",{className:"h-px bg-gradient-to-r from-transparent via-gray-200 to-transparent mb-6 mx-4"}),(0,t.jsx)(a.motion.div,{className:"flex flex-row flex-wrap gap-x-6 gap-y-2 justify-center mb-6",...u(.25),children:l.map(e=>(0,t.jsx)(n.default,{href:e.href,rel:"Blogs"===e.label?void 0:"nofollow",className:"text-xs text-(--Gray-600) hover:text-(--Primary-Mauve-600) transition-colors duration-150 font-medium",children:e.label},e.label))}),(0,t.jsx)("p",{className:"text-xs text-gray-400 leading-relaxed text-center px-4",children:"© The Ozi platform, created and owned by Ozi Technologies Private Limited (U47912KA2020PTC134973), is licensed for commercial use by select B2C focused entities. At present, its consumerâfacing operations are managed by Decifer Fintech Solutions Private Limited, while Ozi Technologies continues to operate as a technology and B2B wholesale trade focused enterprise."})]})}e.s(["default",()=>p],652112)},610017,e=>{"use strict";var t=e.i(843476),r=e.i(618566),a=e.i(271645),s=e.i(834699);function n({category:e}){let n=(0,r.useRouter)(),[i,l]=(0,a.useState)(!1),o=e?.childes??[],c=o.length>3,d=i?o:o.slice(0,3);return(0,t.jsxs)("div",{onClick:()=>n.push((0,s.buildCategoryHref)(e)),className:"group relative rounded-2xl border border-gray-200 hover:border-(--Primary-Mauve-300) bg-white hover:bg-(--Primary-Mauve-100) p-4 transition-all duration-300 hover:shadow-[0_6px_24px_rgba(177,81,119,0.12)] hover:-translate-y-0.5 cursor-pointer",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("h4",{className:"text-[11px] font-black text-(--Gray-800) uppercase tracking-wider leading-tight group-hover:text-(--Primary-Mauve-700) transition-colors duration-200",children:e.name}),(0,t.jsx)("span",{className:"text-(--Primary-Mauve-400) text-xs translate-x-0 group-hover:translate-x-1 opacity-0 group-hover:opacity-100 transition-all duration-200",children:"â"})]}),(0,t.jsx)("div",{className:"h-px w-6 group-hover:w-full bg-(--Primary-Mauve-300) transition-all duration-300 mb-3 rounded-full"}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[d.map(e=>(0,t.jsx)("button",{onClick:t=>{t.stopPropagation(),n.push((0,s.buildCategoryHref)(e))},className:"text-[10px] text-(--Gray-600) hover:text-white hover:bg-(--Primary-Mauve-500) border border-gray-200 hover:border-(--Primary-Mauve-500) px-2 py-0.5 rounded-full transition-all duration-150 whitespace-nowrap cursor-pointer",children:e?.name},e.id)),c&&(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),l(e=>!e)},className:"text-[10px] font-semibold text-(--Primary-Mauve-500) hover:text-(--Primary-Mauve-700) px-2 py-0.5 rounded-full border border-(--Primary-Mauve-200) hover:border-(--Primary-Mauve-400) transition-all whitespace-nowrap cursor-pointer",children:i?"Show less":`+${o.length-3} more`})]})]})}e.s(["default",()=>n])},881970,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(522016),s=e.i(852139),n=e.i(411861),i=["variant","color","size"],l=function(e){var t=e.color;return r.default.createElement(r.default.Fragment,null,r.default.createElement("path",{d:"m16.14 2.96-9.03 3c-6.07 2.03-6.07 5.34 0 7.36l2.68.89.89 2.68c2.02 6.07 5.34 6.07 7.36 0l3.01-9.02c1.34-4.05-.86-6.26-4.91-4.91Zm.32 5.38-3.8 3.82c-.15.15-.34.22-.53.22s-.38-.07-.53-.22a.754.754 0 0 1 0-1.06l3.8-3.82c.29-.29.77-.29 1.06 0 .29.29.29.77 0 1.06Z",fill:t}))},o=function(e){var t=e.color;return r.default.createElement(r.default.Fragment,null,r.default.createElement("path",{d:"M15.89 3.49c3.81-1.27 5.88.81 4.62 4.62l-2.83 8.49c-1.9 5.71-5.02 5.71-6.92 0l-.84-2.52-2.52-.84c-5.71-1.9-5.71-5.01 0-6.92L12 4.79M10.11 13.649l3.58-3.59",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},c=function(e){var t=e.color;return r.default.createElement(r.default.Fragment,null,r.default.createElement("path",{opacity:".4",d:"m7.11 5.961 9.02-3.01c4.05-1.35 6.25.86 4.91 4.91l-3.01 9.02c-2.02 6.07-5.34 6.07-7.36 0l-.89-2.68-2.68-.89c-6.06-2.01-6.06-5.32.01-7.35Z",fill:t}),r.default.createElement("path",{d:"m12.12 11.629 3.81-3.82ZM12.12 12.38c-.19 0-.38-.07-.53-.22a.754.754 0 0 1 0-1.06l3.8-3.82c.29-.29.77-.29 1.06 0 .29.29.29.77 0 1.06l-3.8 3.82c-.15.14-.34.22-.53.22Z",fill:t}))},d=function(e){var t=e.color;return r.default.createElement(r.default.Fragment,null,r.default.createElement("path",{d:"m7.4 6.32 8.49-2.83c3.81-1.27 5.88.81 4.62 4.62l-2.83 8.49c-1.9 5.71-5.02 5.71-6.92 0l-.84-2.52-2.52-.84c-5.71-1.9-5.71-5.01 0-6.92ZM10.11 13.65l3.58-3.59",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},u=function(e){var t=e.color;return r.default.createElement(r.default.Fragment,null,r.default.createElement("path",{d:"M14.22 21.63c-1.18 0-2.85-.83-4.17-4.8l-.72-2.16-2.16-.72c-3.96-1.32-4.79-2.99-4.79-4.17 0-1.17.83-2.85 4.79-4.18l8.49-2.83c2.12-.71 3.89-.5 4.98.58 1.09 1.08 1.3 2.86.59 4.98l-2.83 8.49c-1.33 3.98-3 4.81-4.18 4.81ZM7.64 7.03c-2.78.93-3.77 2.03-3.77 2.75 0 .72.99 1.82 3.77 2.74l2.52.84c.22.07.4.25.47.47l.84 2.52c.92 2.78 2.03 3.77 2.75 3.77.72 0 1.82-.99 2.75-3.77l2.83-8.49c.51-1.54.42-2.8-.23-3.45-.65-.65-1.91-.73-3.44
13-.22L7.64 7.03Z",fill:t}),r.default.createElement("path",{d:"M10.11 14.4c-.19 0-.38-.07-.53-.22a.754.754 0 0 1 0-1.06l3.58-3.59c.29-.29.77-.29 1.06 0 .29.29.29.77 0 1.06l-3.58 3.59c-.14.15-.34.22-.53.22Z",fill:t}))},h=function(e){var t=e.color;return r.default.createElement(r.default.Fragment,null,r.default.createElement("path",{d:"m7.4 6.32 8.49-2.83c3.81-1.27 5.88.81 4.62 4.62l-2.83 8.49c-1.9 5.71-5.02 5.71-6.92 0l-.84-2.52-2.52-.84c-5.71-1.9-5.71-5.01 0-6.92Z",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),r.default.createElement("path",{opacity:".34",d:"m10.11 13.649 3.58-3.59",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},m=function(e,t){switch(e){case"Bold":return r.default.createElement(l,{color:t});case"Broken":return r.default.createElement(o,{color:t});case"Bulk":return r.default.createElement(c,{color:t});case"Linear":default:return r.default.createElement(d,{color:t});case"Outline":return r.default.createElement(u,{color:t});case"TwoTone":return r.default.createElement(h,{color:t})}},p=(0,r.forwardRef)(function(e,t){var a=e.variant,s=e.color,l=e.size,o=void 0===l?"24":l,c=(0,n._)(e,i);return r.default.createElement("svg",(0,n.a)({},c,{xmlns:"http://www.w3.org/2000/svg",ref:t,width:o,height:o,viewBox:"0 0 24 24",fill:"none"}),m(void 0===a?"Linear":a,void 0===s?"currentColor":s))});p.displayName="Send2";var f=e.i(291088),x=e.i(345454);function g({children:e}){return(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wide text-[#C2255C]",children:e}),(0,t.jsx)("div",{className:"mt-1 h-0.5 w-8 rounded-full bg-[#C2255C]"})]})}function b({label:e,required:r,optional:a,children:s}){return(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"text-sm font-semibold text-(--Gray-900)",children:[e,r&&(0,t.jsx)("span",{className:"ml-0.5 text-red-500",children:"*"}),a&&(0,t.jsx)("span",{className:"ml-1 text-xs font-normal text-(--Gray-400)",children:"(optional)"})]}),s]})}let y="mt-1.5 w-full border-0 border-b border-(--Gray-300) bg-transparent px-0 pb-2 text-sm text-(--Gray-800) placeholder:text-(--Gray-400) transition-colors focus:border-b-2 focus:border-[#C2255C] focus:outline-none";function v(){let[e,n]=(0,r.useState)(!1),[i,l]=(0,r.useState)(!1),[o,c]=(0,r.useState)(!1),[d,u]=(0,r.useState)(""),[h,m]=(0,r.useState)(""),[v,w]=(0,r.useState)(""),[_,j]=(0,r.useState)(""),N=""!==d.trim()&&""!==h.trim()&&""!==v.trim()&&""!==_.trim()&&o;return(0,t.jsxs)("div",{className:"mb-8 flex flex-col overflow-hidden rounded-3xl border border-(--Gray-200) bg-white shadow-sm md:flex-row",children:[(0,t.jsxs)("div",{className:"relative flex w-full flex-col overflow-hidden bg-gradient-to-br from-[#FCE4EC] via-[#FDF2F6] to-white px-6 py-8 sm:px-8 sm:py-10 md:w-[28%] md:shrink-0 lg:w-[30%]",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 h-24 w-24 opacity-40",style:{backgroundImage:"radial-gradient(circle, #F3A8C1 1.5px, transparent 1.5px)",backgroundSize:"12px 12px"}}),(0,t.jsx)("p",{className:"text-xs font-bold uppercase tracking-wide text-[#C2255C]",children:"Get in Touch"}),(0,t.jsx)("h2",{className:"mt-2 text-2xl font-extrabold leading-tight text-(--Gray-900) sm:text-[28px]",children:"We'd Love to Hear From You!"}),(0,t.jsx)("div",{className:"mt-3 h-1 w-10 rounded-full bg-[#C2255C]"}),(0,t.jsx)("p",{className:"mt-4 text-sm leading-relaxed text-(--Gray-600)",children:"Have a question, suggestion, or need support? Fill out the form and our team will get back to you as soon as possible."}),(0,t.jsx)("div",{className:"flex flex-1 items-center justify-center",children:(0,t.jsx)("img",{src:x.default.CONTACT_ILLUSTRATION,alt:"",loading:"lazy",decoding:"async",className:"w-48 sm:w-56 lg:w-64"})})]}),(0,t.jsx)("div",{className:"w-full px-5 py-6 sm:px-8 sm:py-8 lg:px-12 lg:py-10",children:e?(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center py-10 text-center",children:[(0,t.jsx)("div",{className:"mb-4 flex h-14 w-14 items-center justify-center rounded-full bg-[#FCE4EC] text-[#C2255C]",children:(0,t.jsx)(s.Messages2,{size:28,variant:"Bold"})}),(0,t.jsx)("h3",{className:"text-lg font-bold text-(--Gray-900)",children:"Thanks for reaching out!"}),(0,t.jsx)("p",{className:"mx-auto mt-2 max-w-sm text-sm text-(--Gray-600)",children:"Your query has been submitted. Our team will get back to you shortly."}),(0,t.jsx)("button",{type:"button",onClick:()=>n(!1),className:"mt-6 rounded-full border border-[#F3A8C1] px-5 py-2 text-sm font-semibold text-[#C2255C] transition-colors hover:bg-[#FDF2F6]",children:"Submit another query"})]}):(0,t.jsxs)("form",{onSubmit:function(e){e.preventDefault(),N&&(n(!0),e.currentTarget.reset(),l(!1),c(!1),u(""),m(""),w(""),j(""))},className:"space-y-10",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(g,{children:"Personal Details"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-x-12 gap-y-7 sm:grid-cols-2",children:[(0,t.jsx)(b,{label:"Your Name",required:!0,children:(0,t.jsx)("input",{type:"text",name:"name",required:!0,value:d,onChange:e=>u(e.target.value),placeholder:"Enter your full name",className:y})}),(0,t.jsx)(b,{label:"Your Email",required:!0,children:(0,t.jsx)("input",{type:"email",name:"email",required:!0,value:h,onChange:e=>m(e.target.value),placeholder:"Enter your email address",className:y})}),(0,t.jsx)(b,{label:"Phone Number",required:!0,children:(0,t.jsx)("input",{type:"tel",name:"phone",required:!0,value:v,onCh
13ange:e=>w(e.target.value),placeholder:"Enter your phone number",className:y})}),(0,t.jsx)(b,{label:"Address",optional:!0,children:(0,t.jsx)("input",{type:"text",name:"address",placeholder:"Enter your address",className:y})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g,{children:"Your Message"}),(0,t.jsx)(b,{label:"Enter Your Query",required:!0,children:(0,t.jsx)("textarea",{name:"query",required:!0,value:_,onChange:e=>j(e.target.value),placeholder:"Type your message here...",rows:1,className:`${y} resize-y`})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g,{children:"Preferences"}),(0,t.jsxs)("div",{className:"space-y-3 text-sm text-(--Gray-600)",children:[(0,t.jsxs)("label",{className:"flex cursor-pointer items-start gap-2.5",children:[(0,t.jsx)("input",{type:"checkbox",checked:i,onChange:e=>l(e.target.checked),className:"mt-0.5 h-4 w-4 shrink-0 accent-[#C2255C]"}),(0,t.jsx)("span",{children:"I want to receive notifications on SMS, RCS & Email from OZi."})]}),(0,t.jsxs)("label",{className:"flex cursor-pointer items-start gap-2.5",children:[(0,t.jsx)("input",{type:"checkbox",checked:o,onChange:e=>c(e.target.checked),className:"mt-0.5 h-4 w-4 shrink-0 accent-[#C2255C]"}),(0,t.jsxs)("span",{children:["I agree to all the"," ",(0,t.jsx)(a.default,{href:f.AppRoutes.TERMS_AND_CONDITIONS,className:"font-semibold text-[#C2255C] hover:underline",children:"Terms Of Service"})," ","and"," ",(0,t.jsx)(a.default,{href:f.AppRoutes.PRIVACY_POLICY,className:"font-semibold text-[#C2255C] hover:underline",children:"Privacy Policy"}),"."]})]})]})]}),(0,t.jsxs)("button",{type:"submit",disabled:!N,className:"flex w-full items-center justify-center gap-2 rounded-lg bg-[#C2255C] px-6 py-3.5 text-sm font-bold uppercase tracking-wide text-white shadow-md transition-all hover:-translate-y-0.5 hover:bg-[#A31D4C] hover:shadow-lg disabled:cursor-not-allowed disabled:bg-(--Gray-300) disabled:text-(--Gray-500) disabled:shadow-none disabled:hover:translate-y-0 sm:w-auto sm:min-w-[200px] sm:justify-center",children:[(0,t.jsx)(p,{size:16,variant:"Bold"}),"Submit"]})]})})]})}e.s(["default",()=>v],881970)},572244,e=>{"use strict";var t=e.i(843476),r=e.i(618566);let a=["/hospitalbagdemo"];e.s(["default",0,function({children:e}){let s=(0,r.usePathname)(),n=a.includes(s);return(0,t.jsx)("div",{className:n?"hidden md:block":void 0,children:e})}])},807507,e=>{"use strict";var t=e.i(843476),r=e.i(618566);let a=["/pod","/youtube"];function s({children:e}){let s=(0,r.usePathname)();return a.some(e=>s===e||s.startsWith(`${e}/`))?null:(0,t.jsx)(t.Fragment,{children:e})}e.s(["default",()=>s])},8597,e=>{"use strict";var t=e.i(271645);let r=(0,t.createContext)(null),a={didCatch:!1,error:null};class s extends t.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=a}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){let{error:e}=this.state;if(null!==e){for(var t,r,s=arguments.length,n=Array(s),i=0;i<s;i++)n[i]=arguments[i];null==(t=(r=this.props).onReset)||t.call(r,{args:n,reason:"imperative-api"}),this.setState(a)}}componentDidCatch(e,t){var r,a;null==(r=(a=this.props).onError)||r.call(a,e,t)}componentDidUpdate(e,t){let{didCatch:r}=this.state,{resetKeys:s}=this.props;if(r&&null!==t.error&&function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length!==t.length||e.some((e,r)=>!Object.is(e,t[r]))}(e.resetKeys,s)){var n,i;null==(n=(i=this.props).onReset)||n.call(i,{next:s,prev:e.resetKeys,reason:"keys"}),this.setState(a)}}render(){let{children:e,fallbackRender:a,FallbackComponent:s,fallback:n}=this.props,{didCatch:i,error:l}=this.state,o=e;if(i){let e={error:l,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof a)o=a(e);else if(s)o=(0,t.createElement)(s,e);else if(void 0!==n)o=n;else throw l}return(0,t.createElement)(r.Provider,{value:{didCatch:i,error:l,resetErrorBoundary:this.resetErrorBoundary}},o)}}function n(){let e=(0,t.useContext)(r);if(null==e||"boolean"!=typeof e.didCatch||"function"!=typeof e.resetErrorBoundary)throw Error("ErrorBoundaryContext not found");let[a,s]=(0,t.useState)({error:null,hasError:!1}),n=(0,t.useMemo)(()=>({resetBoundary:()=>{e.resetErrorBoundary(),s({error:null,hasError:!1})},showBoundary:e=>s({error:e,hasError:!0})}),[e.resetErrorBoundary]);if(a.hasError)throw a.error;return n}function i(e,r){let a=(0,t.forwardRef)((a,n)=>(0,t.createElement)(s,r,(0,t.createElement)(e,{...a,ref:n}))),n=e.displayName||e.name||"Unknown";return a.displayName="withErrorBoundary(".concat(n,")"),a}e.s(["ErrorBoundary",()=>s,"ErrorBoundaryContext",()=>r,"useErrorBoundary",()=>n,"withErrorBoundary",()=>i])},26324,e=>{"use strict";e.i(247167);var t=e.i(843476),r=e.i(271645),a=e.i(102253),s=e.i(912598),n=e.i(503072),i=e.i(413294),l=e.i(392917),o=e.i(209569),c=e.i(680426),d=e.i(120162),u=e.i(567594),h=e.i(742355);e.i(599539);var m=e.i(712793),m=m,p=e.i(618566),f=e.i(291088),x=e.i(282972);
13e.s(["default",0,()=>{let{setUserInfo:e,clearUser:g,setAuthLoading:b,setZoneData:y,openLogin:v,setOpenLogin:w,userInfo:_,cartInfo:j,setCartInfo:N,openAddressSideBar:C,setOpenAddressSideBar:E,openDeliveryLocation:S,setOpenDeliveryLocation:k,openDeliveryModal:A,setOpenDeliveryModal:P,openDeliveryLocation1:I,setOpenDeliveryLocation1:M,openDeliveryModal1:L,setOpenDeliveryModal1:R}=(0,i.useAppStore)(),O=(0,i.useAppStore)(e=>e.zoneVersion),z=(0,i.useAppStore)(e=>e.setFeatureConfig),F=(0,s.useQueryClient)(),T=(0,r.useRef)(!0),B=(0,r.useRef)(""),$=(0,r.useRef)(!1),D=(0,r.useRef)(!0),{isMobile:q}=(0,d.useResponsive)(),W=(0,p.useRouter)(),G=(0,p.usePathname)(),H=["/about","/contact","/shipping","/user-form","/getmeanything","/privacy","/terms","/returns-refunds-cancellation","/hospitalbagdemo","/youtube"].some(e=>G?.startsWith(e))||G?.startsWith(f.AppRoutes.BLOG),[U,Q]=(0,r.useState)(!1);(0,r.useEffect)(()=>{Q(!0)},[]),(0,r.useEffect)(()=>{if(D.current){D.current=!1;return}sessionStorage.setItem("ozi_in_app_nav","true")},[G]);let Y=(0,r.useRef)(!0);(0,r.useEffect)(()=>{if(Y.current){Y.current=!1;return}if(H||L||I)return;let e=(()=>{try{return JSON.parse(sessionStorage.getItem("selected_address")||"null")}catch{return null}})();if(e?.address)return;let t=(()=>{try{let e=localStorage.getItem("app-storage");return JSON.parse(e||"null")?.state?.zoneData??null}catch{return null}})();t?.address||(window.innerWidth<768?R(!0):M(!0))},[H,I,L,G,M,R]),(0,r.useEffect)(()=>{let e=JSON.stringify(i.useAppStore.getState().zoneData?.zone_id??null);if(T.current){T.current=!1,B.current=e,$.current&&($.current=!1,W.refresh());return}e!==B.current&&(B.current=e,F.invalidateQueries({queryKey:n.CART_QUERY_KEY}),W.refresh())},[O]);let Z=(0,r.useCallback)(async()=>{let e=i.useAppStore.getState().zoneData,t=e?.lat,r=e?.long;if(!t||!r)return!1;let a=await (0,l.getFeatureConfig)({lat:t,lng:r,zoneId:e?.zone_id??null});return z(a),a?.v2?.invalidate_cache&&(F.invalidateQueries(),W.refresh()),!0},[z,F,W]);(0,r.useEffect)(()=>{let e=!1;return(async()=>{let t=i.useAppStore.getState().zoneData;if(!t?.lat||!t?.long)return;let r=await (0,l.getFeatureConfig)({lat:t.lat,lng:t.long,zoneId:t?.zone_id??null});!e&&(z(r),r?.v2?.invalidate_cache&&(F.invalidateQueries(),W.refresh()))})(),()=>{e=!0}},[O]);let K=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=K.current;K.current=G,null!==e&&G!==e&&(G===f.AppRoutes.HOME||G===f.AppRoutes.CART)&&Z()},[G,Z]),(0,r.useEffect)(()=>{let e=e=>{!e.persisted||sessionStorage.getItem("token")&&(0,c.GetCartList)().then(e=>N(e??null)).catch(()=>{})};return window.addEventListener("pageshow",e),()=>window.removeEventListener("pageshow",e)},[]),(0,r.useEffect)(()=>{(async()=>{try{b(!0);let t=await (0,l.readRefreshTokenFromCookies)();if(t){let r=await (0,l.getTokenFromRefreshToken)(t);if(r.success){sessionStorage.setItem("token",r?.data.token),await (0,l.saveRefreshTokenInCookies)(r?.data.refresh_token);let t=await (0,l.getCustomerInfo)({token:r?.data.token,languageKey:"en"});if(t.success){e({...t.data,isLoggedIn:!0});try{let e=await (0,c.GetCartList)();N(e??null)}catch(e){}}else g()}else g()}else g();let r=JSON.parse(sessionStorage.getItem("selected_address")||"null");if(r&&r.address)y({zone_id:r.zone_id,lat:r.lat,long:r.long,address:r.address??"",tat:r.tat||null,address_type:r.address_type,road:r.road,house:r.house,floor:r.floor,contact_person_name:r.contact_person_name,contact_person_number:r.contact_person_number,addressId:r.addressId});else{let e=(()=>{try{let e=localStorage.getItem("app-storage");return JSON.parse(e||"null")?.state?.zoneData??null}catch{return null}})();if(e?.address)sessionStorage.setItem("selected_address",JSON.stringify({zone_id:e.zone_id,lat:e.lat,long:e.long,address:e.address,tat:e.tat||null,address_type:e.address_type,road:e.road,house:e.house,floor:e.floor,contact_person_name:e.contact_person_name,contact_person_number:e.contact_person_number,addressId:e.addressId})),y(e);else if(!H){if(/googlebot|bingbot|yandexbot|duckduckbot|slurp|baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora link preview|showyoubot|outbrain|pinterest|developers\.google\.com\/\+\/web\/snippet/i.test("undefined"!=typeof navigator?navigator.userAgent:""))return;$.current=!0,window.innerWidth<768?R(!0):M(!0)}}}catch(e){console.error("erro Authbootstrap",e),sessionStorage.removeItem("token"),g()}finally{b(!1)}})()},[]),(0,r.useEffect)(()=>
13{if(!("permissions"in navigator)||!("geolocation"in navigator))return;let e=null;try{let t=JSON.parse(sessionStorage.getItem("selected_address")||"null");if(t?.lat&&t?.long)e=t;else{let t=JSON.parse(localStorage.getItem("app-storage")||"null")?.state?.zoneData;t?.lat&&t?.long&&(e=t)}}catch{}if(!e?.lat||!e?.long)return;let t=!1;return(async()=>{let r="prompt";try{r=(await navigator.permissions.query({name:"geolocation"})).state}catch{return}"granted"!==r||t||navigator.geolocation.getCurrentPosition(async r=>{if(t)return;let{latitude:s,longitude:n}=r.coords,i=parseFloat(String(e.lat)),o=parseFloat(String(e.long));if(!Number.isFinite(i)||!Number.isFinite(o))return;let c=e=>e*Math.PI/180,d=c(s-i),u=c(n-o),h=Math.sin(d/2)**2+Math.cos(c(i))*Math.cos(c(s))*Math.sin(u/2)**2,m=12742*Math.atan2(Math.sqrt(h),Math.sqrt(1-h));if(!(m<.5))try{let r=await (0,l.getZoneId)({lat:s,lng:n});if(t)return;let i=Array.isArray(e?.zone_id)?e.zone_id:null,o=r.success?r.data.zone_id:null,c=!i||!o||i.length!==o.length||i.some((e,t)=>e!==o[t]),d=e?.address||"";if(c||m>=2){let e=await (0,a.reverseGeocode)(s,n);if(t)return;d=e?.address||d}if(!r.success){let e={zone_id:[-1],lat:s.toString(),long:n.toString(),address:d,tat:null};y(e),sessionStorage.setItem("selected_address",JSON.stringify(e));return}let u=await (0,l.getTat)({originLat:Number(s),originLng:Number(n),zoneId:r.data.zone_id});if(t)return;let h={zone_id:r.data.zone_id,lat:s.toString(),long:n.toString(),address:d,tat:u?.success?u.data:null};y(h),sessionStorage.setItem("selected_address",JSON.stringify(h))}catch(e){}},()=>{},{enableHighAccuracy:!1,timeout:15e3,maximumAge:3e5})})(),()=>{t=!0}},[y]);let V=(0,r.useRef)(null),J=(0,i.useAppStore)(e=>e.zoneData);return((0,r.useEffect)(()=>{if(!J?.lat||!J?.long||J.tat?.duration)return;let e=J.zone_id;if(!Array.isArray(e)||0===e.length||-1===e[0])return;let t=`${JSON.stringify(e)}|${J.lat},${J.long}`;if(V.current===t)return;V.current=t;let r=!1;return(async()=>{try{let t=await (0,l.getTat)({originLat:Number(J.lat),originLng:Number(J.long),zoneId:e});if(r||!t?.success||!t.data?.duration)return;let a={...J,tat:t.data};y(a);try{let e=JSON.parse(sessionStorage.getItem("selected_address")||"null");e&&sessionStorage.setItem("selected_address",JSON.stringify({...e,tat:t.data}))}catch{}}catch{}})(),()=>{r=!0}},[J,y]),(0,r.useEffect)(()=>{let e="ozi-hide-af-banner";if(A||L){if(!document.getElementById(e)){let t=document.createElement("style");t.id=e,t.textContent='#smart-banner, [aria-label*="promotion banner"] { display: none !important; visibility: hidden !important; }',document.head.appendChild(t)}}else document.getElementById(e)?.remove();return()=>{document.getElementById(e)?.remove()}},[A,L]),(0,r.useEffect)(()=>{_?.isLoggedIn&&!j&&(async()=>{try{let e=await (0,c.GetCartList)();N(e??null)}catch(e){}})()},[_?.isLoggedIn]),U)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.default,{dismissible:!1,open:L,onClose:()=>R(!1),title:"",repositionInputs:!1,content:(0,t.jsx)(x.default,{open:L})}),(0,t.jsx)(u.default,{dismissible:!1,modal:!1,fullscreen:!0,open:A,onClose:()=>P(!1),title:"",content:(0,t.jsx)(h.default,{open:A})}),v&&(0,t.jsx)(o.default,{isOpen:v,onClose:()=>w(!1)}),C&&(0,t.jsx)(m.default,{})]}):null}],26324)},431195,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(618566),s=e.i(321779),n=e.i(266027),i=e.i(680426),l=e.i(698992);function o(e){return e.replace(/<\s*br\s*\/?\s*>/gi,"\n").replace(/<\/(p|li|div|h[1-6])\s*>/gi,"\n").replace(/<[^>]*>/g," ").replace(/ /gi," ").replace(/&/gi,"&").replace(/"/gi,'"').replace(/'|'/gi,"'").replace(/</gi,"<").replace(/>/gi,">").replace(/[ \t]+/g," ").trim()}let c=/^product description$/i,d={"product weight":"Product Weight","item weight":"Product Weight","weight capacity":"Weight Capacity","weight limit":"Weight Capacity","weight capacity/limit":"Weight Capacity",dimensions:"Dimensions","dimensions / size":"Dimensions","dimensions/size":"Dimensions","dimensions (lxbxh)":"Dimensions","size (unfolded)":"Dimensions","size unfolded":"Dimensions",weight:"Product Weight","age range":"Age Range","age group":"Age Range","age group/range":"Age Range","age group / range":"Age Range","age /
13weight suitability":"Age Range","age/weight suitability":"Age Range","perfect age range":"Age Range",colour:"Color","adjustable (yes/no)":"Adjustable","adjustable (yes / no)":"Adjustable","pack size":"Pack Size","count / pack count":"Pack Size","count/pack count":"Pack Size","units per pack":"Pack Size","net quantity":"Pack Size",certifications:"Certifications",certification:"Certifications","certifications/safety standard":"Certifications"},u=["Brand","Product Type","Age Range","Gender","Dimensions","Product Weight","Weight Capacity","Color","Material","Pack Size","Adjustable","Country of Origin","Certifications","Regulatory Info"];function h(e){let t=u.indexOf(e);return -1===t?Number.MAX_SAFE_INTEGER:t}function m(e){return!e||!e.trim()}let p=/brand details|registered address|manufacturer address|company address|tags\s*\/?\s*keywords?|^keywords?$|meta\s*keywords?/i,f=/wash|care/i;function x(e){let t=null,r={};for(let[a,s]of Object.entries(e)){if(null===t&&f.test(a)&&!m(s)){t=s.trim();continue}r[a]=s}return{careInstructions:t,remainingSpecs:r}}let g=/\bcontents\b|what'?s in the box|package includes/i;function b(e){let t=null,r={};for(let[a,s]of Object.entries(e)){if(null===t&&g.test(a)&&!m(s)){t=s.trim();continue}r[a]=s}return{contents:t,remainingSpecs:r}}function y(e){if(!e||"object"!=typeof e||Array.isArray(e))return{};let t={};for(let[r,a]of Object.entries(e))"string"==typeof a&&(t[r]=a);return t}function v(e){return Array.from(e.entries()).map(([e,t])=>({key:e,value:t})).sort((e,t)=>h(e.key)-h(t.key))}var w=e.i(446345),_=e.i(242943),j=e.i(231597);e.i(642198),e.i(58984);var N=e.i(924804),C=e.i(166929);e.i(863961);var E=e.i(947042);function S({product:e,active:a,onClose:u,footer:h}){let f=(0,s.useFloatingPdpStore)(e=>e.setExpanded),g=(0,s.useFloatingPdpStore)(e=>e.expanded),S=(0,r.useRef)(null),[k,A]=(0,r.useState)(null);(0,r.useEffect)(()=>A(S.current),[]);let{data:P}=(0,n.useQuery)({queryKey:["floating-pdp-details",e.id],queryFn:()=>(0,i.GetProductDetails)(e.id),enabled:!!e.id,staleTime:6e4,retry:1}),I=P?.id?P:e,M=(0,r.useRef)(0),L=(0,r.useCallback)(()=>{if(!a)return;let e=S.current;if(!e||Date.now()<M.current)return;let t=e.scrollTop,r=g?!(t<=4)&&null:t>48||null;if(null===r)return;M.current=Date.now()+380;let s=e.scrollTop;f(r),requestAnimationFrame(()=>{S.current&&(S.current.scrollTop=s)})},[a,g,f]);(0,r.useEffect)(()=>{!a&&S.current&&(S.current.scrollTop=0)},[a]);let R=r.default.useMemo(()=>(function(e){var t,r,a,s,n,i,l,u,h;let f,g,w,_,j,N,C=e.rawDescription?function(e){let t=o(e).split(/\r?\n/).map(e=>e.trim()).filter(Boolean),r=[],a=[],s={};for(let e of t){if(e.startsWith("-")){a.push(e.replace(/^-\s*/," "));continue}if(e.includes(":")){let[t,...r]=e.split(":");s[t.trim()]=r.join(":").trim();continue}r.push(e)}return{prose:r,features:a,specs:s}}(e.rawDescription):null,{intro:E,remainingSpecs:S}=function(e){let t=null,r={};for(let[a,s]of Object.entries(e)){if(null===t&&c.test(a.trim())&&!m(s)){t=s.trim().replace(/^-\s*/,"");continue}r[a]=s}return{intro:t,remainingSpecs:r}}(C?.specs??{}
13),k=function(e,t,r){let a=x(y(e)),s=x(y(t)),n=x(y(r)),i=a.careInstructions??s.careInstructions??n.careInstructions,l=b(a.remainingSpecs),o=b(s.remainingSpecs),c=b(n.remainingSpecs),u=l.contents??o.contents??c.contents,h=[l.remainingSpecs,o.remainingSpecs,c.remainingSpecs],f=[],g=new Map;for(let e of h)for(let[t,r]of Object.entries(e)){if(m(r)||p.test(t.trim()))continue;let e=r.trim();if(function(e){let t,r=e.trim();if(!r||!((t=r.split(",").map(e=>e.trim()).filter(Boolean)).length<3)&&t.every(e=>e.split(/\s+/).length<=4))return!1;let a=r.split(/\s+/).length;return a>8||a>6&&r.length>40&&/[.!]$/.test(r)}(e)){f.push(e);continue}let a=d[t.trim().toLowerCase().replace(/\s+/g," ")]??t.trim();g.has(a)||g.set(a,e)}return{specs:v(g),promotedHighlights:f,careInstructions:i,specContents:u}}(e.productSpecification,e.seoSpecifications,S),A=function(e,t=80){let r=e?.trim();return r?r.length<=t?{row:{key:"Regulatory Info",value:r},keepSeparate:!1}:{row:null,keepSeparate:!0}:{row:null,keepSeparate:!1}}(e.regulatoryInfo),P=A.row?v((s=k.specs,n=A.row,(f=new Map(s.map(e=>[e.key,e.value]))).has(n.key)||f.set(n.key,n.value),f)):k.specs,I=(t=e.seoFeatures,r=e.productFeature,a=e.seoFeatures?.length?[]:k.promotedHighlights,w=t?.length?t:r??[],_=[],j=[],N=e=>{let t=e.trim();if(!t)return;let r=t.toLowerCase().replace(/[^a-z0-9\s]/g,"").replace(/\s+/g," ").trim();j.some(e=>e===r||e.includes(r)||r.includes(e))||(j.push(r),_.push(t))},w.forEach(N),a.forEach(N),_),M=[E,...I.length>0?[]:C?.features??[],...C?.prose??[]].filter(e=>!!e),L=function(e,t,r,a,s=!1){if(e?.trim())return{text:e.trim(),source:"long_description"};if(t?.trim())return{text:t.trim(),source:"short_description"};let n=r?.filter(Boolean).join(" ").trim();if(n)return{text:n,source:"parsed"};if(s)return{text:"",source:"none"};let i=a?o(a):"";return i?{text:i,source:"parsed"}:{text:"",source:"none"}}
13(e.longDescription,e.shortDescription,M,e.rawDescription,I.length>0),R=P.some(e=>"Pack Size"===e.key);return{specs:P,highlights:I,description:L,boxContents:(i=e.seoBoxContents,l=e.productWhatsInTheBox,u=R,h=k.specContents,g=i?.length?i:l?.length?l:h?h.split(/[;,]|\r?\n/).map(e=>e.trim().replace(/\.$/,"")).filter(Boolean):[],u?g.map(e=>e.replace(/\s*\(pack of \d+\)\s*$/i,"").trim()):g),careInstructions:k.careInstructions,regulatoryText:A.keepSeparate?e.regulatoryInfo?.trim()??null:null,showRegulatorySection:A.keepSeparate}})({productSpecification:I?.specification??null,seoSpecifications:null,rawDescription:I?.description??null,seoFeatures:null,productFeature:I?.product_feature??null,longDescription:null,shortDescription:null,seoBoxContents:null,productWhatsInTheBox:I?.whats_in_the_box??null,regulatoryInfo:null}),[I]),O=r.default.useMemo(()=>({close:u,href:(0,l.buildProductHref)(e),scroller:k,active:a}),[u,e,k,a]);return(0,t.jsx)(w.FloatingPdpFrameProvider,{value:O,children:(0,t.jsx)("div",{ref:S,onScroll:L,"data-floating-pdp":!0,className:"hide-scrollbar h-full w-full touch-pan-y overflow-y-auto overflow-x-hidden overscroll-contain",children:(0,t.jsxs)("div",{className:"pb-32",children:[(0,t.jsx)(_.default,{productDetails:I}),g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.default,{id:e.id,description:R.description,highlights:R.highlights,specs:R.specs,boxContents:R.boxContents,careInstructions:R.careInstructions,regulatoryText:R.regulatoryText,showRegulatorySection:R.showRegulatorySection,disclaimer:null,sizeGuide:null,ingredients:null,nutrition:null}),(0,t.jsx)(N.default,{id:e.id}),(0,t.jsx)(C.default,{id:e.id}),!!I.faqs?.length&&(0,t.jsx)("section",{className:"mt-6 w-full px-4",children:(0,t.jsx)(E.SeoFaqsSection,{faqs:I.faqs})}),h?(0,t.jsx)("div",{className:"mt-8",children:h}):null]})]})})})}function k(e,t,r){let a,s,n="function"==typeof(s="function"==typeof(a=Object.getPrototypeOf(window.history)?.[e])?a:window.history[e])?s:null;if(!n)return!1;try{let e=window.history.state??{};return n.call(window.history,{...e,...r},"",t),!0}catch{return!1}}var A=e.i(558249);let P="cubic-bezier(0.2, 0.8, 0.2, 1)";function I({footer:e}){let{open:n,items:i,index:o,expanded:c,sourceRect:d,restored:u,hasMore:h,loadMore:m,close:p,setIndex:f}=(0,s.useFloatingPdpStore)(),x=(0,a.usePathname)(),[g,b]=(0,r.useState)(()=>window.innerWidth),[y,v]=(0,r.useState)(!1),w=(0,r.useRef)(null),_=(0,r.useRef)(null),j=(0,r.useRef)(new Map),N=(0,r.useRef)(!1);(0,r.useLayoutEffect)(()=>{if(!n)return;let e=()=>b(window.innerWidth);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[n]);let C=c?g:g-40,E=c?g:C+10,I=8*!c,M=(0,r.useRef)(null),L=(0,r.useRef)(null),R=(0,r.useRef)(!1),O=(0,r.useRef)(null),z=(0,r.useRef)(null),F=(0,r.useRef)(null),T=(0,r.useRef)(i);T.current=i,(0,r.useEffect)(()=>{if(!n){M.current=null,L.current=null;return}if(null===M.current&&(M.current=z.current??x),x===M.current){F.current=null;return}if(x===L.current){M.current=x;return}if(x===F.current){F.current=null;return}F.current=x,p()},[n,x,p]),(0,r.useEffect)(()=>{if(!n)return;let e=(0,l.buildProductHref)(i[o]);if(L.current=e,u){R.current=!0;return}(function(e,t={}){return k("pushState",e,t)})(e,{floatingPdp:!0})&&(R.current=!0,O.current={path:e,index:o,listingPath:x},z.current=x,(0,A.pageview)(e))},[n]);let B=i[o]?.id,$=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(!n){$.current=!1;return}if(!$.current){$.current=!0;return}if(!R.current)return;let e=(0,l.buildProductHref)(s.useFloatingPdpStore.getState().items[o]??{});e&&"#"!==e&&e!==L.current&&(L.current=e,function(e,t={}){return k("replaceState",e,t)}(e,{floatingPdp:!0})&&(O.current&&(O.current={...O.current,path:e,index:o}),(0,A.pageview)(e)))},[n,o,B]);let D=(0,r.useCallback)(()=>{let e=s.useFloatingPdpStore.getState();if(e.open)return!1;let t=T.current;if(!t.length)return!1;let r=window.location.pathname;if(!r.startsWith("/product/"))return!1;let a=t.findIndex(e=>(0,l.buildProductHref)(e)===r);return!(a<0)&&(e.restoreAt({items:t,index:a}),!0)},[]);(0,r.useEffect)(()=>{let e=()=>{R.current=!1,D()||(O.current=null,p())};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[p,D]),(0,r.useEffect)(()=>{n||D()},[n,x,D]),(0,r.useEffect)(()=>
13{if(!n)return;let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[n]),(0,r.useEffect)(()=>{if(!n)return;let e=document.title,t=i[o]?.name;return t&&(document.title=`Buy ${t} Online | OZi`),()=>{document.title=e}},[n,o,B]),(0,r.useEffect)(()=>{n&&h&&m&&o>=i.length-1-3&&m()},[n,o,i.length,h,m]);let q=(0,r.useCallback)(e=>{let t=20*!c,r=C||1,a=Math.max(.05,e.width/r);return`translate3d(${e.left-t}px, ${e.top-I}px, 0) scale(${a})`},[c,C,I]);(0,r.useLayoutEffect)(()=>{if(!n||!d||u||!g)return;let e=j.current.get(o);if(!e)return;e.style.transition="none",e.style.transformOrigin="top left",e.style.transform=q(d),e.style.opacity="0.35";let t=requestAnimationFrame(()=>{e.style.transition=`transform 380ms ${P}, opacity 380ms ease-out`,e.style.transform="translate3d(0, 0, 0) scale(1)",e.style.opacity="1"});return()=>cancelAnimationFrame(t)},[n,g]);let W=(0,r.useCallback)(()=>{if(N.current)return;let e=()=>{N.current=!1,R.current?(R.current=!1,window.history.back()):p()},t=j.current.get(o),r=i[o]?.id;if(!t||!r)return void e();N.current=!0,document.body.style.overflow="";
13let a=document.querySelector(`[data-product-card-id="${r}"]`);a?.scrollIntoView({block:"center",behavior:"auto"});let s=a?.getBoundingClientRect();if(!s||0===s.width)return void e();let n=_.current;n&&(n.style.transition="opacity 300ms ease-in",n.style.opacity="0"),t.style.transformOrigin="top left",t.style.transition="transform 300ms cubic-bezier(0.4, 0, 1, 1), opacity 300ms ease-in",t.style.transform=q({left:s.left,top:s.top,width:s.width,height:s.height}),t.style.opacity="0.2",window.setTimeout(e,300)},[p,o,i,q]);(0,r.useEffect)(()=>{if(!n)return;let e=e=>{"Escape"===e.key&&W()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[n,W]);let G=(0,r.useRef)({active:!1,axis:"",x0:0,y0:0,t0:0,dx:0});if((0,r.useEffect)(()=>{let e=w.current;if(!e||!n)return;let t=t=>{if(c||i.length<2||N.current||(t=>{let r=t;if(r?.closest?.("[data-pdp-gallery]"))return!0;for(;r&&r!==e&&!r.hasAttribute("data-floating-pdp");){if(r.scrollWidth>r.clientWidth+2){let e=getComputedStyle(r).overflowX;if("auto"===e||"scroll"===e)return!0}r=r.parentElement}return!1})(t.target))return;let r=t.touches[0];G.current={active:!0,axis:"",x0:r.clientX,y0:r.clientY,t0:Date.now(),dx:0},j.current.forEach(e=>{e.style.transition="none"})},r=e=>{let t=G.current;if(!t.active)return;let r=e.touches[0],a=r.clientX-t.x0,s=r.clientY-t.y0;if(!t.axis){if(6>Math.abs(a)&&6>Math.abs(s))return;t.axis=Math.abs(a)>Math.abs(s)?"h":"v","h"===t.axis&&v(!0)}if("h"!==t.axis)return;e.preventDefault();let n=0===o&&a>0,l=o===i.length-1&&a<0;t.dx=n||l?.35*a:a,j.current.forEach((e,r)=>{e.style.transform=`translate3d(${(r-o)*E+t.dx}px, 0, 0)`})},a=()=>{let e=G.current;if(!e.active)return;let t="h"===e.axis,r=e.dx;if(G.current={active:!1,axis:"",x0:0,y0:0,t0:0,dx:0},!t)return;let a=Math.abs(r)/Math.max(1,Date.now()-e.t0),s=Math.abs(r)>.28*E||a>.4?o+(r<0?1:-1):o,n=Math.min(i.length-1,Math.max(0,s));j.current.forEach((e,t)=>{e.style.transition=`transform 320ms ${P}`,e.style.transform=`translate3d(${(t-n)*E}px, 0, 0)`}),v(!1),n!==o&&f(n)};return e.addEventListener("touchstart",t,{passive:!0}),e.addEventListener("touchmove",r,{passive:!1}),e.addEventListener("touchend",a,{passive:!0}),e.addEventListener("touchcancel",a,{passive:!0}),()=>{e.removeEventListener("touchstart",t),e.removeEventListener("touchmove",r),e.removeEventListener("touchend",a),e.removeEventListener("touchcancel",a)}},[n,c,o,i.length,E,f]),!n||!i.length)return null;let H=[];for(let e=o-1;e<=o+1;e++)e>=0&&e<i.length&&H.push(e);return(0,t.jsxs)("div",{className:"fixed inset-0 z-(--z-floating-pdp) lg:hidden",role:"dialog","aria-modal":"true","aria-label":"Product details",children:[(0,t.jsx)("button",{ref:_,type:"button","aria-label":"Close product details",onClick:W,className:"absolute inset-0 w-full cursor-default bg-black/65 animate-in fade-in duration-200"}),(0,t.jsx)("div",{ref:w,className:"absolute inset-0 overflow-hidden",children:H.map(r=>{let a=(r-o)*E,s=r===o;return(0,t.jsx)("div",{ref:e=>{e?j.current.set(r,e):j.current.delete(r)},className:"absolute overflow-hidden bg-white shadow-[0_18px_50px_-12px_rgba(0,0,0,0.45)]",style:{left:20*!c,top:c?0:"max(env(safe-area-inset-top, 0px), 8px)",bottom:16*!c,width:C||void 0,borderRadius:24*!c,transform:`translate3d(${a}px, 0, 0)`,transition:y?"none":s?`transform 320ms ${P}, left 320ms ${P}, top 320ms ${P}, bottom 320ms ${P}, width 320ms ${P}, border-radius 320ms ${P}`:`transform 320ms ${P}`,willChange:"transform",contain:"layout paint"},"aria-hidden":r!==o,inert:r!==o,children:(0,t.jsx)(S,{product:i[r],active:r===o,onClose:W,footer:e})},i[r].id??r)})})]})}e.s(["default",()=>I],431195)},635277,e=>{"use strict";var t=e.i(271645),r=e.i(413294),a=e.i(377455);function s(){let e=(0,r.useAppStore)(e=>e.isAuthLoading),s=(0,t.useRef)(!1);return(0,t.useEffect)(()=>{if(e||s.current)return;s.current=!0;let t=(0,a.detectLaunchSource)(),r=new URLSearchParams(window.location.search);(0,a.track)("app_open",{},{launch_context:{launch_source:t,is_first_open:(0,a.isFirstOpen)(),referrer_app:document.referrer?(()=>{try{return new URL(document.referrer).hostname}catch{return null}})():null,deeplink_url:"deeplink"===t?window.location.href:null,push_campaign_id:r.get("utm_campaign")??null}})},[e]),null}e.s(["default",()=>s])},908503,e=>{"use strict";var t=e.i(843476),r=e.i(618566),a=e.i(120162),s=e.i(558020),n=e.i(413294),i=e.i(882897),l=e.i(975772);let o=["/cart","/checkout","/payment","/order-tracking","/orders","/pod","/login","/blogs","/hospitalbagdemo","/product"];
13e.s(["default",0,()=>{let e=(0,r.usePathname)(),{isMobile:c,isTablet:d}=(0,a.useResponsive)(),u=(0,n.useAppStore)(e=>e.isCategoryPLP),h=o.some(t=>e===t||e.startsWith(`${t}/`)),m=(0,l.shouldShowBottomNav)(e,u),p=(0,i.useMobileUIStore)(e=>e.stripOwnsCart);return h||m||p||!(c||d)?null:(0,t.jsx)("div",{className:"fixed left-1/2 z-50 -translate-x-1/2 lg:hidden",style:{bottom:"calc(0.625rem + env(safe-area-inset-bottom, 0px))"},children:(0,t.jsx)(s.default,{})})}])},29417,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(411861),s=["variant","color","size"],n=function(e){var t=e.color;return r.default.createElement(r.default.Fragment,null,r.default.createElement("path",{fill:t,d:"M16.19 2H7.81C4.17 2 2 4.17 2 7.81v8.37C2 19.83 4.17 22 7.81 22h8.37c3.64 0 5.81-2.17 5.81-5.81V7.81C22 4.17 19.83 2 16.19 2zm.63 8.82c-.29.29-.77.29-1.06 0l-3.01-3.01V18c0 .41-.34.75-.75.75s-.75-.34-.75-.75V7.81l-3.01 3.01c-.29.29-.77.29-1.06 0a.742.742 0 01-.22-.53c0-.19.08-.39.22-.53l4.29-4.29a.75.75 0 011.06 0l4.29 4.29c.29.29.29.76 0 1.06z"}))},i=function(e){var t=e.color;return r.default.createElement(r.default.Fragment,null,r.default.createElement("path",{stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.5",d:"M18.07 9.57L12 3.5 5.93 9.57M12 12V3.67M12 20.5v-4.53"}))},l=function(e){var t=e.color;return r.default.createElement(r.default.Fragment,null,r.default.createElement("path",{fill:t,d:"M22 7.81v8.37c0 3.64-2.17 5.81-5.81 5.81H7.81C4.17 22 2 19.83 2 16.19V7.81C2 4.17 4.17 2 7.81 2h8.37C19.83 2 22 4.17 22 7.81z",opacity:".4"}),r.default.createElement("path",{fill:t,d:"M12.53 5.47l4.29 4.29c.29.29.29.77 0 1.06-.29.29-.77.29-1.06 0l-3.01-3.01V18c0 .41-.34.75-.75.75s-.75-.34-.75-.75V7.81l-3.01 3.01c-.29.29-.77.29-1.06 0a.742.742 0 01-.22-.53c0-.19.08-.39.22-.53l4.29-4.29a.75.75 0 011.06 0z"}))},o=function(e){var t=e.color;return r.default.createElement(r.default.Fragment,null,r.default.createElement("path",{stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.5",d:"M18.07 9.57L12 3.5 5.93 9.57M12 20.5V3.67"}))},c=function(e){var t=e.color;return r.default.createElement(r.default.Fragment,null,r.default.createElement("path",{fill:t,d:"M18.07 10.32c-.19 0-.38-.07-.53-.22L12 4.56 6.46 10.1c-.29.29-.77.29-1.06 0a.754.754 0 010-1.06l6.07-6.07c.29-.29.77-.29 1.06 0l6.07 6.07c.29.29.29.77 0 1.06-.14.15-.34.22-.53.22z"}),r.default.createElement("path",{fill:t,d:"M12 21.25c-.41 0-.75-.34-.75-.75V3.67c0-.41.34-.75.75-.75s.75.34.75.75V20.5c0 .41-.34.75-.75.75z"}))},d=function(e){var t=e.color;return r.default.createElement(r.default.Fragment,null,r.default.createElement("path",{stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.5",d:"M18.07 9.57L12 3.5 5.93 9.57"}),r.default.createElement("path",{stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.5",d:"M12 20.5V3.67",opacity:".4"}))},u=function(e,t){switch(e){case"Bold":return r.default.createElement(n,{color:t});case"Broken":return r.default.createElement(i,{color:t});case"Bulk":return r.default.createElement(l,{color:t});case"Linear":default:return r.default.createElement(o,{color:t});case"Outline":return r.default.createElement(c,{color:t});case"TwoTone":return r.default.createElement(d,{color:t})}},h=(0,r.forwardRef)(function(e,t){var n=e.variant,i=e.color,l=e.size,o=void 0===l?"24":l,c=(0,a._)(e,s);return r.default.createElement("svg",(0,a.a)({},c,{xmlns:"http://www.w3.org/2000/svg",ref:t,width:o,height:o,viewBox:"0 0 24 24",fill:"none"}),u(void 0===n?"Linear":n,void 0===i?"currentColor":i))});h.displayName="ArrowUp";var m=e.i(88653),p=e.i(846932),f=e.i(618566);e.s(["default",0,()=>{let[e,a]=(0,r.useState)(!1),[s,n]=(0,r.useState)(112),i=(0,f.usePathname)();(0,r.useEffect)(()=>{let e=()=>{let e,t=document.querySelectorAll("[data-scroll-header]"),r=0;t.forEach(e=>{let t=e.getBoundingClientRect().bottom;t>r&&(r=t)}),r>0&&n(Math.round((r+14)/((e=parseFloat(getComputedStyle(document.body).zoom))>0?e:1)))},t=()=>{let t,r,s=(r=(t=document.getElementById("products-scroll-container"))&&t.scrollHeight>t.clientHeight+40?t.scrollTop:0,Math.max(window.scrollY||document.documentElement.scrollTop||0,r));a(e=>e?s>120:s>300),requestAnimationFrame(e)};return document.addEventListener("scroll",t,{passive:!0,capture:!0}),window.addEventListener("resize",e,{passive:!0}),t(),()=>{document.removeEventListener("scroll",t,{capture:!0}),window.removeEventListener("resize",e)}},[]);let l="/"===i||i.startsWith("/category")||i.startsWith("/search")||i.startsWith("/products")||i.startsWith("/store")||"/orders"===i;return(0,t.jsx)(m.AnimatePresence,{children:e&&l&&(0,t.jsxs)(p.motion.button,{onClick:()=>{let e=document.getElementById("products-scroll-container");e&&e.scrollTop>0?e.scrollTo({top:0,behavior:"smooth"}):window.scrollTo({top:0,behavior:"smooth"})},"aria-label":"Back to top",initial:{opacity:0,y:-12,scale:.9}
13,animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-12,scale:.9},transition:{duration:.22,ease:"easeOut"},style:{top:`calc(env(safe-area-inset-top, 0px) + ${s}px)`},className:"group fixed left-1/2 z-50 flex -translate-x-1/2 items-center gap-1 overflow-hidden rounded-full border border-white/60 bg-gradient-to-b from-white/70 via-white/50 to-white/35 px-3 py-1.5 text-xs font-semibold text-slate-800 backdrop-blur-md backdrop-saturate-150 shadow-[0_4px_12px_rgba(0,0,0,0.18),0_1px_2px_rgba(0,0,0,0.10),inset_0_1px_0_rgba(255,255,255,0.9),inset_0_-2px_3px_rgba(0,0,0,0.06)] transition-shadow hover:shadow-[0_6px_16px_rgba(0,0,0,0.24),0_1px_2px_rgba(0,0,0,0.10),inset_0_1px_0_rgba(255,255,255,0.9),inset_0_-2px_3px_rgba(0,0,0,0.06)] active:scale-95",children:[(0,t.jsx)("span",{className:"pointer-events-none absolute inset-x-0 top-0 h-1/2 bg-gradient-to-b from-white/85 to-transparent","aria-hidden":!0}),(0,t.jsx)(h,{size:14,className:"relative text-[#C55B83]"}),(0,t.jsx)("span",{className:"relative",children:"Back to top"})]},"back-to-top")})}],29417)},461931,e=>{"use strict";var t=e.i(271645),r=e.i(618566);let a=new Map,s=()=>window.location.pathname+window.location.search;function n(){let e=(0,r.usePathname)(),n=(0,t.useRef)(null),i=(0,t.useRef)(!1);return(0,t.useEffect)(()=>{let e=()=>{i.current||a.set(s(),{window:window.scrollY,container:document.getElementById("products-scroll-container")?.scrollTop??0})};return e(),window.addEventListener("scroll",e,{passive:!0}),document.addEventListener("scroll",e,{passive:!0,capture:!0}),()=>{window.removeEventListener("scroll",e),document.removeEventListener("scroll",e,{capture:!0})}},[]),(0,t.useEffect)(()=>{let e=()=>{n.current=window.location.pathname;let e=a.get(s());if(!e||0===e.window&&0===e.container)return;i.current=!0;let t=performance.now()+1500,r=!1,l=()=>{if(r)return;window.scrollTo(0,e.window);let a=document.getElementById("products-scroll-container");if(a&&(a.scrollTop=e.container),2>=Math.abs(window.scrollY-e.window)||performance.now()>=t){r=!0,i.current=!1;return}o()};function o(){requestAnimationFrame(l),window.setTimeout(l,32)}o()};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[]),(0,t.useEffect)(()=>{let t=n.current;if(n.current=null,t===e||window.location.hash)return;let r=()=>{window.scrollTo(0,0),document.getElementById("products-scroll-container")?.scrollTo(0,0)};r();let a=requestAnimationFrame(r);return()=>cancelAnimationFrame(a)},[e]),null}e.s(["default",()=>n])},794135,e=>{"use strict";var t=e.i(271645),r=e.i(413294),a=e.i(901381);function s(){let{userInfo:e}=(0,r.useAppStore)();return(0,t.useEffect)(()=>{let t=()=>{let t=window.fcWidget;return!!t?.isInitialized?.()&&((0,a.attachRestoreIdListener)(),e?.isLoggedIn&&e.id&&(0,a.identifyFreshchatUser)({id:e.id,f_name:e.f_name,l_name:e.l_name,email:e.email,phone:e.phone}),t.on("widget:closed",()=>{let e=document.getElementById("fc_frame");e&&(e.style.position="",e.style.top="",e.style.left="",e.style.right="",e.style.bottom="",e.style.width="",e.style.height="",e.style.maxWidth="",e.style.maxHeight="",e.style.zIndex="",e.style.border="",e.style.borderRadius="",e.style.margin="")}),!0)};if(!t()){let e=setInterval(()=>{t()&&clearInterval(e)},500);return()=>clearInterval(e)}},[e?.isLoggedIn,e?.id]),null}e.s(["default",()=>s])},226138,e=>{"use strict";var t=e.i(843476),r=e.i(852139),a=e.i(413294),s=e.i(901381);function n(){let{userInfo:e}=(0,a.useAppStore)();return e?.isLoggedIn?(0,t.jsxs)("button",{type:"button",onClick:()=>(0,s.openSupportChat)(),"aria-label":"Open chat support",className:"hidden lg:flex fixed right-0 top-3/4 -translate-y-1/2 z-[60] items-center gap-1.5 px-1.5 py-2 rounded-l-lg shadow-md cursor-pointer bg-[var(--Primary-Mauve-500,#C55B83)] text-white hover:bg-[var(--Primary-Mauve-600,#A8466D)] transition-colors",style:{writingMode:"vertical-rl"},children:[(0,t.jsx)(r.Messages2,{size:14,color:"#fff",style:{transform:"rotate(90deg)"}}),(0,t.jsx)("span",{className:"text-[10px] font-semibold tracking-wider uppercase",children:"Chat with us"})]}):null}e.s(["default",()=>n])},448500,e=>{"use strict";let t;var r=e.i(843476),a=e.i(619273),s=e.i(286491),n=e.i(540143),i=e.i(915823),l=class extends i.Subscribable{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){let n=t.queryKey,i=t.queryHash??(0,a.hashQueryKeyByOptions)(n,t),l=this.get(i);return l||(l=new s.Query({client:e,queryKey:n,queryHash:i,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){n.notifyManager.batch(()=>
13{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,a.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,a.matchQuery)(e,t)):t}notify(e){n.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){n.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){n.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},o=e.i(88587),c=e.i(936553),d=class extends o.Removable{#t;#r;#a;#s;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#a=e.mutationCache,this.#r=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#r.includes(e)||(this.#r.push(e),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#r=this.#r.filter(t=>t!==e),this.scheduleGc(),this.#a.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#r.length||("pending"===this.state.status?this.scheduleGc():this.#a.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#n({type:"continue"})},r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=(0,c.createRetryer)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#n({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#n({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#a.canRun(this)});let a="pending"===this.state.status,s=!this.#s.canStart();try{if(a)t();else{this.#n({type:"pending",variables:e,isPaused:s}),await this.#a.config.onMutate?.(e,this,r);let t=await this.options.onMutate?.(e,r);t!==this.state.context&&this.#n({type:"pending",context:t,variables:e,isPaused:s})}let n=await this.#s.start();return await this.#a.config.onSuccess?.(n,e,this.state.context,this,r),await this.options.onSuccess?.(n,e,this.state.context,r),await this.#a.config.onSettled?.(n,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(n,null,e,this.state.context,r),this.#n({type:"success",data:n}),n}catch(t){try{await this.#a.config.onError?.(t,e,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,r)}catch(e){Promise.reject(e)}try{await this.#a.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,r)}catch(e){Promise.reject(e)}throw this.#n({type:"error",error:t}),t}finally{this.#a.runNext(this)}}#n(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),n.notifyManager.batch(()=>{this.#r.forEach(t=>{t.onMutationUpdate(e)}),this.#a.notify({mutation:this,type:"updated",action:e})})}},u=i,h=class extends u.Subscribable{constructor(e={}){super(),this.config=e,this.#i=new Set,this.#l=new Map,this.#o=0}#i;#l;#o;build(e,t,r){let a=new d({client:e,mutationCache:this,mutationId:++this.#o,options:e.defaultMutationOptions(t),state:r});return this.add(a),a}add(e){this.#i.add(e);let t=m(e);if("string"==typeof t){let r=this.#l.get(t);
13r?r.push(e):this.#l.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#i.delete(e)){let t=m(e);if("string"==typeof t){let r=this.#l.get(t);if(r)if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#l.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=m(e);if("string"!=typeof t)return!0;{let r=this.#l.get(t),a=r?.find(e=>"pending"===e.state.status);return!a||a===e}}runNext(e){let t=m(e);if("string"!=typeof t)return Promise.resolve();{let r=this.#l.get(t)?.find(t=>t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}}clear(){n.notifyManager.batch(()=>{this.#i.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#i.clear(),this.#l.clear()})}getAll(){return Array.from(this.#i)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,a.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,a.matchMutation)(e,t))}notify(e){n.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>
13e.state.isPaused);return n.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(a.noop))))}};function m(e){return e.options.scope?.id}var p=e.i(175555),f=e.i(814448),x=e.i(992571),g=class{#c;#a;#d;#u;#h;#m;#p;#f;constructor(e={}){this.#c=e.queryCache||new l,this.#a=e.mutationCache||new h,this.#d=e.defaultOptions||{},this.#u=new Map,this.#h=new Map,this.#m=0}mount(){this.#m++,1===this.#m&&(this.#p=p.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#c.onFocus())}),this.#f=f.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#c.onOnline())}))}unmount(){this.#m--,0===this.#m&&(this.#p?.(),this.#p=void 0,this.#f?.(),this.#f=void 0)}isFetching(e){return this.#c.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#a.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#c.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#c.build(this,t),s=r.state.data;return void 0===s?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime((0,a.resolveStaleTime)(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return this.#c.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let s=this.defaultQueryOptions({queryKey:e}),n=this.#c.get(s.queryHash),i=n?.state.data,l=(0,a.functionalUpdate)(t,i);if(void 0!==l)return this.#c.build(this,s).setData(l,{...r,manual:!0})}setQueriesData(e,t,r){return n.notifyManager.batch(()=>this.#c.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#c.get(t.queryHash)?.state}removeQueries(e){let t=this.#c;n.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#c;return n.notifyManager.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let r={revert:!0,...t};return Promise.all(n.notifyManager.batch(()=>this.#c.findAll(e).map(e=>e.cancel(r)))).then(a.noop).catch(a.noop)}invalidateQueries(e,t={}){return n.notifyManager.batch(()=>(this.#c.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(n.notifyManager.batch(()=>this.#c.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(a.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(a.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=this.#c.build(this,t);return r.isStaleByTime((0,a.resolveStaleTime)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(a.noop).catch(a.noop)}fetchInfiniteQuery(e){return e.behavior=(0,x.infiniteQueryBehavior)(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(a.noop).catch(a.noop)}ensureInfiniteQueryData(e){return e.behavior=(0,x.infiniteQueryBehavior)(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return f.onlineManager.isOnline()?this.#a.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#c}getMutationCache(){return this.#a}getDefaultOptions(){return this.#d}setDefaultOptions(e){this.#d=e}setQueryDefaults(e,t){this.#u.set((0,a.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#u.values()],r={};return t.forEach(t=>{(0,a.partialMatchKey)(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#h.set((0,a.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#h.values()],r={};return t.forEach(t=>{(0,a.partialMatchKey)(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#d.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,a.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===a.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#d.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#c.clear(),this.#a.clear()}},b=e.i(912598);function y({children:e}){let a=(t||(t=new g({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1,retry:(e,t)=>{if(t?.code==="RATE_LIMIT")return!1;let r=t?.response?.status;return(!r||!(r>=400)||!(r<500))&&e<1}}}})),t);return(0,r.jsx)(b.QueryClientProvider,{client:a,children:e})}e.s(["default",()=>y],448500)},3303,(e,t,r)=>{t.exports=e.r(479520)},322663,e=>{"use strict";var t=e.i(843476),r=e.i(3303),a=e.i(618566),s=e.i(271645),n=e.i(558249);function i(){let e=(0,a.usePathname)();return((0,s.useEffect)(()=>{n.GA_MEASUREMENT_ID&&(0,n.pageview)(e)},[e]),n.GA_MEASUREMENT_ID)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.default,{src:`https://www.googletagmanager.com/gtag/js?i
13d=${n.GA_MEASUREMENT_ID}`,strategy:"afterInteractive"}),(0,t.jsx)(r.default,{id:"ga-init",strategy:"afterInteractive",children:` 14 window.dataLayer = window.dataLayer || []; 15 function gtag(){dataLayer.push(arguments);} 16 window.gtag = gtag; 17 gtag('js', new Date()); 18 gtag('config', '${n.GA_MEASUREMENT_ID}', { page_path: window.location.pathname }); 19 `})]}):null}e.s(["default",()=>i])},319981,e=>{"use strict";var t=e.i(843476),r=e.i(3303),a=e.i(618566),s=e.i(271645),n=e.i(961945);function i(){let e=(0,a.usePathname)();return((0,s.useEffect)(()=>{n.META_PIXEL_ID&&(0,n.pageview)()},[e]),n.META_PIXEL_ID)?(0,t.jsx)(r.default,{id:"meta-pixel",strategy:"afterInteractive",children:` 20 !function(f,b,e,v,n,t,s){ 21 if(f.fbq)return;n=f.fbq=function(){n.callMethod? 22 n.callMethod.apply(n,arguments):n.queue.push(arguments)}; 23 if(!f._fbq)f._fbq=n; 24 n.push=n;n.loaded=!0;n.version='2.0'; 25 n.queue=[]; 26 t=b.createElement(e);t.async=!0; 27 t.src=v;s=b.getElementsByTagName(e)[0]; 28 s.parentNode.insertBefore(t,s); 29 }(window, document, 'script', 'https://connect.facebook.net/en_US/fbevents.js'); 30 fbq('init', '${n.META_PIXEL_ID}'); 31 fbq('track', 'PageView'); 32 `}):null}e.s(["default",()=>i])}]); 33 34//# debugId=72b65fa3-9ca9-f416-2792-e4143859805f
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.