PageSourceSearch

https://redgo.in/assets/js/Gourmet-DL_Knq6f.js

js redgo.in collected 2026-09-24 15:05:07 UTC 9,884 bytes, 1 lines download raw bytes

1import{b as U,r as n,j as e,q,d as O,n as W,t as T}from"./index-Cf_ajVON.js";import{B as L}from"./button-B3Z62-N_.js";import{C as H,d as J}from"./card-Dg3aNavH.js";import{A as V}from"./index-BZFWozEr.js";import{u as Z}from"./useAppBackNavigation-CgW7jO2C.js";import{O as K}from"./OptimizedImage-BXY4yO8G.js";import{u as Q}from"./useDelayedLoading-B5zNpBBr.js";import{u as X,a as Y,c as ee,e as te,B as ae}from"./UserRouter-8XtuC7qu.js";import{u as se}from"./ProfileContext-BZ3PpXCb.js";import{A as re}from"./arrow-left-1EukSswS.js";import{U as oe}from"./utensils-cjWp27Tl.js";import{S as ie}from"./star-B2ou6rgX.js";import{C as ne}from"./clock-BLUAwf4T.js";import"./index-Bx4n9Pg3.js";import"./index-DvNrSChk.js";import"./index-D2QmRZ8G.js";import"./dish_fallback-D6DhqKcF.js";import"./proxy-C1jOxt1V.js";import"./x-BzwCsDoT.js";import"./map-pin-7Ib88_8s.js";import"./foodVariants-COegQ4Wo.js";import"./input-B3lgn3HG.js";import"./search-CI5-KVok.js";import"./truck-QhgJc4-J.js";import"./shopping-bag-DS7253no.js";import"./tag-BuvDaRmB.js";import"./utensils-crossed-CcT55kZ-.js";import"./switch-Br_IXA23.js";import"./index-BH0fEq1S.js";import"./index-Dr9tQ8T6.js";import"./index-J_fU13zv.js";import"./quicky-spicy-logo-BF3ck9UZ.js";import"./businessSettings-C2lRlxRl.js";import"./chevron-down-DvOvGc9V.js";import"./wallet-Fp8jgvR5.js";import"./shopping-cart-qTOihUB7.js";import"./index-C8y2MLsj.js";import"./index-BkL6vOXg.js";import"./useNotificationInbox-VAdTR4w4.js";import"./log-out-CnE_25s1.js";import"./useCompanyName-BqFrmMXi.js";import"./phone-DYx2euUu.js";import"./mail-BWqemxpl.js";import"./twitter-DzJYxJDu.js";import"./heart-ClQB289i.js";import"./chevron-right-Bcul0bS7.js";import"./checkbox--5h1dBUf.js";import"./index-BgkASZz5.js";import"./check-DGtdSv1T.js";import"./index-Bkla0msJ.js";import"./index-CeGv2iRN.js";import"./routes-B2m2vR37.js";import"./trash-2-B1Y_baWX.js";import"./circle-check-CLROJLC6.js";import"./bell-DTCvULxx.js";import"./index.esm-BzR8oUpF.js";import"./zap-TlV55XhQ.js";import"./shopping-basket-BQqZHEve.js";import"./plus-BpcropP-.js";import"./sliders-horizontal-DI91i5Lq.js";import"./circle-alert-Dghg6EjM.js";import"./indian-rupee-Jn7bSe7x.js";import"./shield-check-eqx3FUHD.js";import"./ProtectedRoute-D0_enUO-.js";import"./Loader-DmtRw6uv.js";import"./AuthRedirect-BEzTws_f.js";import"./common-K-jRlMr2.js";const le="/assets/images/gourmet_new_banner-BJ2jy_uU.png";function kt(){U();const z=Z(),[B,E]=n.useState(new Set),[x,h]=n.useState([]),[g,f]=n.useState(!0),[c,b]=n.useState(null),{location:l}=X(),{zoneId:i}=Y(l),{vegMode:v,vegModeOption:j}=se(),m=Q(g),d=n.useMemo(()=>{let a=x;return i&&(a=a.filter(t=>!t.zoneId||String(t.zoneId)===String(i))),ee(a,{vegMode:v,vegModeOption:j})},[x,v,j,i]),w=(V||"").replace(/\/api\/v1\/?$/,""),G=a=>{if(typeof a!="string")return"";const t=a.trim();return t?/^(https?:|\/\/|data:|blob:)/i.test(t)||!w?t:`${w.replace(/\/$/,"")}${t.startsWith("/")?t:`/${t}`}`:""};n.useEffect(()=>{(async()=>{try{f(!0),b(null);const t=i?{params:{zoneId:i}}:{},o=(await W.get("/food/hero-banners/gourmet/public",t))?.data?.data,p=o?.restaurants??(Array.isArray(o)?o:[]);h(p)}catch(t){const r=t?.response?.data?.message||t?.message||"Failed to load Gourmet restaurants";b(r),T.error(r),h([])}finally{f(!1)}})()},[i]);const A=a=>{E(t=>{const r=new Set(t);return r.has(a)?r.delete(a):r.add(a),r})};return e.jsxs("div",{className:"min-h-screen bg-white dark:bg-[#0a0a0a]",children:[e.jsxs("div",{className:"relative w-full overflow-hidden h-[30vh] sm:h-[35vh] md:h-[40vh] shadow-2xl",children:[e.jsx("button",{onClick:z,className:"absolute top-4 left-4 md:top-6 md:left-6 z-20 w-10 h-10 bg-white/20 hover:bg-white/40 backdrop-blur-md rounded-full flex items-center justify-center transition-all active:scale-90",children:e.jsx(re,{className:"h-5 w-5 text-white"})}),e.jsxs("div",{className:"absolute inset-0 z-0 scale-105",children:[e.jsx("img",{src:le,alt:"Gourmet Dining",className:"w-full h-full object-cover animate-in fade-in zoom-in duration-1000"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent"})]}),e.jsxs("div",{className:"absolute bottom-8 left-6 md:left-10 z-10 space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-8 h-[2px] bg-[#DC2626]"}),e.jsx("span",{className:"text-[10px] font-black tracking-[0.3em] text-white/80 uppercase",children:"Experience Excellence"})]}),e.jsx("h1",{className:"text-3xl md:text-5xl font-black text-white drop-shadow-2xl",children:"Gourmet Dining"}),e.jsx("p",{className:"text-white/70 text-sm md:text-base font-medium max-w-md",children:"Indulge in carefully curated premium dining from the city's finest restaurants."})]})]}),e.jsx("div",{className:"px-4 sm:px-6 md:px-8 lg:px-10 py-6 md:py-8 lg:py-10 space-y-4 md:space-y-6",children:e.jsxs("div",{className:"max-w-7xl mx-auto 
1space-y-4 md:space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-gray-100 dark:border-zinc-800",children:[e.jsxs("p",{className:"text-[10px] font-black text-gray-400 dark:text-gray-500 tracking-[0.2em] uppercase",children:[m?"...":d.length," PREMIER ESTABLISHMENTS"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse"}),e.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase",children:"Live Deals Available"})]})]}),m&&e.jsx(q,{count:4}),c&&!g&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-20",children:[e.jsx("p",{className:"text-red-500 dark:text-red-400 text-center",children:c}),e.jsx(L,{onClick:()=>window.location.reload(),className:"mt-4",children:"Retry"})]}),!m&&!c&&e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-6",children:d.length===0?e.jsx("div",{className:"col-span-full text-center py-12",children:e.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No Gourmet restaurants available at the moment"})}):d.map(a=>{const t=a.restaurant||a,r=t.slug||t.restaurantName?.toLowerCase().replace(/\s+/g,"-")||t.name?.toLowerCase().replace(/\s+/g,"-")||"",o=t._id||t.restaurantId||t.id,p=B.has(o),P=(s,$,M,_)=>{const S=(M-s)*Math.PI/180,D=(_-$)*Math.PI/180,R=Math.sin(S/2)*Math.sin(S/2)+Math.cos(s*Math.PI/180)*Math.cos(M*Math.PI/180)*Math.sin(D/2)*Math.sin(D/2);return 6371*(2*Math.atan2(Math.sqrt(R),Math.sqrt(1-R)))};let u="1.2 km";const N=t.location?.latitude||t.location?.coordinates?.[1],y=t.location?.longitude||t.location?.coordinates?.[0];l?.latitude&&l?.longitude&&N&&y?u=`${P(l.latitude,l.longitude,N,y).toFixed(1)} km`:t.distance&&(u=t.distance);const k=t.coverImages&&t.coverImages.length>0?t.coverImages.map(s=>s.url||s).filter(Boolean):[],I=t.menuImages&&t.menuImages.length>0?t.menuImages.map(s=>s.url||s).filter(Boolean):[],F=k.length>0?k[0]:I.length>0?I[0]:t.profileImage?.url||t.profileImage||t.image||"",C=G(F);return e.jsx(O,{to:`/user/restaurants/${r}`,children:e.jsxs(H,{className:"overflow-hidden cursor-pointer border-0 group bg-white dark:bg-[#1a1a1a] shadow-xl shadow-gray-200/20 dark:shadow-none hover:shadow-2xl hover:shadow-[#DC2626]/5 transition-all duration-500 py-0 rounded-[32px] mb-4 group active:scale-[0.98]",children:[e.jsxs("div",{className:"relative h-48 sm:h-56 md:h-60 w-full overflow-hidden rounded-t-[32px]",children:[C?e.jsx(K,{src:C,alt:t.restaurantName||t.name,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-110"}):e.jsx("div",{className:"w-full h-full bg-gray-100 dark:bg-zinc-800 flex items-center justify-center",children:e.jsx(oe,{className:"w-8 h-8 text-gray-200"})}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-trans
1parent to-transparent opacity-60 group-hover:opacity-80 transition-opacity"}),e.jsx("div",{className:"absolute top-4 right-4 z-10",children:e.jsx(L,{variant:"ghost",size:"icon",className:"h-10 w-10 bg-white/10 hover:bg-white/20 backdrop-blur-md rounded-2xl border border-white/20 transition-all active:scale-90",onClick:s=>{s.preventDefault(),s.stopPropagation(),A(o)},children:e.jsx(te,{className:`h-5 w-5 ${p?"fill-white text-white":"text-white/80"}`,strokeWidth:2})})}),e.jsxs("div",{className:"absolute bottom-4 right-4 flex items-center gap-1.5 bg-white px-3 py-1.5 rounded-2xl shadow-2xl",children:[e.jsx("span",{className:"text-sm font-black text-gray-900",children:t.rating?.toFixed(1)||"4.0"}),e.jsx(ie,{className:"h-3.5 w-3.5 fill-[#DC2626] text-[#DC2626]"})]})]}),e.jsxs(J,{className:"p-5",children:[e.jsx("div",{className:"flex items-center justify-between gap-2 mb-3",children:e.jsx("h3",{className:"text-xl font-black text-gray-900 dark:text-gray-100 truncate group-hover:text-[#DC2626] transition-colors",children:t.restaurantName||t.name})}),e.jsxs("div",{className:"flex items-center gap-4 text-[12px] text-gray-500 dark:text-gray-400 mb-4 font-bold uppercase tracking-tight",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(ne,{className:"h-4 w-4 text-[#DC2626]",strokeWidth:2.5}),e.jsx("span",{children:t.estimatedDeliveryTime||"25-30 mins"})]}),e.jsx("span",{className:"text-gray-200",children:"•"}),e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsxs("span",{className:"text-[#F87171] font-black",children:[u," away"]})})]}),t.offer?e.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2 bg-[#DC2626]/5 dark:bg-[#DC2626]/10 rounded-2xl w-fit",children:[e.jsx(ae,{className:"h-4 w-4 text-[#DC2626]",strokeWidth:3}),e.jsx("span",{className:"text-[10px] font-black text-[#DC2626] uppercase tracking-wider",children:t.offer})]}):e.jsx("div",{className:"text-[10px] font-black text-gray-400 uppercase tracking-widest bg-gray-50 dark:bg-zinc-900 px-3 py-2 rounded-2xl w-fit",children:"Elite Selection"})]})]})},o)})})]})})]})}export{kt as default};

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.