1import{j as e}from"./ui-i2uuhJLU.js";import{H as n,a$ as t,e as s,C as r,M as a,a4 as i,L as o,an as l,b0 as d,u as c,b1 as u,b2 as m,b3 as p,b4 as h,R as g,b5 as x,S as f,b6 as y,s as b,b7 as v}from"./index-BlTxw5sF.js";import{w as j}from"./legacyRedirect-BCwkYAa5.js";import{r as w}from"./vendor-0UoMGHxL.js";import{B as _}from"./BreadcrumbListSchema-XaxWk-Sw.js";import{R as N,B as k,a as C,b as S,c as $,d as M,e as A,D as O}from"./breadcrumb-219bkXYZ.js";import{P as R,G as L}from"./phone-CtM7AEg-.js";import{E as P}from"./external-link-DmvdwBMh.js";import{B}from"./BackButton-ByWOMZTQ.js";import{T as F}from"./TrustSignals-CoxO8A06.js";import"./supabase-y_UtyrZy.js";import"./utils-DRFx5yZZ.js";import"./RestaurantFavoriteButton-Dr6dS9Di.js";import"./textarea-TcIySFgR.js";import"./arrow-left-DjNYbrrx.js";const z=({restaurant:t})=>{const s={"@context":"https://schema.org","@type":"Restaurant","@id":`${t.url}#restaurant`,speakable:{"@type":"SpeakableSpecification",cssSelector:["h1","#aio-writeup"]},name:t.name,...t.alternateName&&t.alternateName.length>0&&{alternateName:t.alternateName},description:t.description,url:t.url,inLanguage:"en-US",image:t.image.map(e=>({"@type":"ImageObject",contentUrl:e,url:e})),servesCuisine:t.servesCuisine,...t.knowsAbout&&t.knowsAbout.length>0&&{knowsAbout:t.knowsAbout},priceRange:t.priceRange,telephone:t.telephone,address:{"@type":"PostalAddress",streetAddress:t.address.streetAddress,addressLocality:t.address.addressLocality,addressRegion:t.address.addressRegion,postalCode:t.address.postalCode,addressCountry:t.address.addressCountry},...t.openingHoursSpecification&&t.openingHoursSpecification.length>0?{openingHoursSpecification:t.openingHoursSpecification.map(e=>({"@type":"OpeningHoursSpecification",dayOfWeek:e.dayOfWeek,opens:e.opens,closes:e.closes}))}:t.openingHours&&t.openingHours.length>0?{openingHours:t.openingHours}:{},...t.geo&&{geo:{"@type":"GeoCoordinates",latitude:t.geo.latitude,longitude:t.geo.longitude}},...t.hasMap&&{hasMap:t.hasMap},...t.menu&&{hasMenu:{"@type":"Menu","@id":`${t.url}#menu`,url:t.menu}},...t.sameAs&&t.sameAs.length>0&&{sameAs:t.sameAs},...t.reservationUrl&&{acceptsReservations:"boolean"==typeof t.reservationUrl?t.reservationUrl:{"@type":"ReserveAction",target:{"@type":"EntryPoint",urlTemplate:t.reservationUrl}}},...t.aggregateRating&&{aggregateRating:{"@type":"AggregateRating",ratingValue:t.aggregateRating.ratingValue,reviewCount:t.aggregateRating.reviewCount}}};return e.jsx(n,{children:e.jsx("script",{type:"application/ld+json",children:JSON.stringify(s)})})};function T({hours:n,className:t=""}){const s=(()=>{if(!n)return{isOpen:!1,nextChange:null};const e=new Date,t=e.toLocaleDateString("en-US",{weekday:"short"}).toLowerCase(),s=100*e.getHours()+e.getMinutes(),r=n[t]||n.default||"11:00-23:00";if("closed"===r)return{isOpen:!1,nextChange:null};const[a,i]=r.split("-").map(e=>{const[n,t]=e.split(":").map(Number);return 100*n+t}),o=s>=a&&s<=i,l=e=>{const n=e.toString().padStart(4,"0"),t=parseInt(n.substring(0,2));return`${0===t?12:t>12?t-12:t}:${n.substring(2,4)} ${t>=12?"PM":"AM"}`};return{isOpen:o,nextChange:o?`Closes at ${l(i)}`:`Opens at ${l(a)}`}})();return e.jsxs("span",{className:`inline-flex items-center gap-x-2 ${t}`,children:[e.jsx("span",{className:s.isOpen?"font-medium text-success":"font-medium text-muted-foreground",children:s.isOpen?"Open":"Closed"}),s.nextChange&&e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsx("span",{className:"text-muted-foreground",children:s.nextChange})]})]})}function H({restaurantId:n,name:o,description:l,cuisines:d,highlights:c,address:u,phone:m,website:p,hours:h,onlineOrderingUrl:g,reservationUrl:x,rating:f,reviewCount:y,priceRange:b,restaurantCoordinates:v,userLocation:j,isLocationLoading:_,isFoodTruck:k,aioWriteup:C}){const S=Array.isArray(c)?c:[],[$,M]=w.useState(!1),[A,O]=w.useState(!1),B=w.useRef(null);w.useLayoutEffect(()=>{const e=B.current;e&&O(e.scrollHeight>e.clientHeight+1)},[l]);const F=v&&j?t(j.lat,j.lng,v.lat,v.lng):null,z=d.length>0?d.join(" · "):null;return e.jsx("div",{className:"bg-gradient-to-br from-background via-background/80 to-muted/20 border-b border-border/30",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-12",children:[e.jsxs("div",{className:"flex flex-col lg:flex-row justify-between items-start gap-8",children:[e.jsxs("div",{className:"flex-1 space-y-5 min-w-0",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h1",{className:"text-3xl lg:text-4xl font-bold tracking-tight leading-tight text-foreground",children:o}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground",children:[z&&e.jsx("span",{children:z}),b&&e.jsxs(e.Fragment,{children:[z&&e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsx("span",{children:b})]}),h&&e.jsxs(e.Fragment,{children:[(z||b)&&e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsx(T,{hours:h})]}),"number"==typeof f&&f>0&&e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx("span",{className:"text-accent",children:"â
"}),e.jsx("span",{className:"font-medium text-foreground",children:f.toFixed(1)}),"number"==typeof y&&y>0&&e.jsxs("span",{children:["(",y,")"]})]})]})]}),l&&e.jsxs("div",{className:"max-w-2xl",children:[e.jsx("p",{ref:B,className:"text-base text-muted-foreground leading-relaxed "+($?"":"line-clamp-2"),children:l}),(A||$)&&e.jsx("button",{type:"button",onClick:()=>M(e=>!e),className:"mt-1 text-sm font-medium text-primary hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm","aria-expanded":$,children:$?"Show less":"Read more"})]})]}),S.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5",children:S.map((n,t)=>e.jsxs(s,{variant:"outline",className:"text-xs font-normal border-border text-muted-foreground",children:["â ",n]},`h-${t}`))}),C&&e.jsxs("section",{id:"aio-writeup","aria-labelledby":"aio-writeup-heading",className:"pt-2 max-w-2xl",children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.12em] text-muted-foreground
1/80 mb-1.5",children:"MenuMenu Overview"}),e.jsxs("h2",{id:"aio-writeup-heading",className:"text-lg font-semibold text-foreground mb-2",children:["About ",o]}),e.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:C})]})]}),e.jsxs("div",{className:"hidden lg:block w-full lg:w-80 space-y-6",children:[e.jsx(r,{className:"bg-card border-border shadow-sm p-6",children:e.jsxs("div",{className:"space-y-4",children:[u&&e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(a,{className:"h-5 w-5 mt-0.5 text-muted-foreground"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("span",{className:"text-sm leading-relaxed text-foreground",children:u}),_?e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsx(i,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"Calculating distance..."})]}):null!==F?e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsx(i,{className:"h-4 w-4 text-primary"}),e.jsxs("span",{className:"text-xs text-primary font-medium",children:[F," miles away"]})]}):null]})]}),m&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(R,{className:"h-5 w-5 text-muted-foreground"}),e.jsx("a",{href:`tel:${m}`,className:"text-sm text-foreground hover:text-primary hover:underline transition-colors",children:m})]}),p&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(L,{className:"h-5 w-5 text-muted-foreground"}),e.jsxs("a",{href:p,className:"text-sm text-foreground hover:text-primary hover:underline transition-colors flex items-center gap-1",target:"_blank",rel:"noopener noreferrer",children:["Visit Website",e.jsx(P,{className:"h-3 w-3"})]})]})]})}),e.jsx(N,{restaurantId:n,restaurantName:o,pageType:"restaurant",onlineOrderingUrl:g,reservationUrl:x,phone:m,website:p})]})]}),e.jsx("div",{className:"lg:hidden mt-5",children:e.jsx(N,{restaurantId:n,restaurantName:o,pageType:"restaurant",onlineOrderingUrl:g,reservationUrl:x,phone:m,website:p,compact:!0})})]})})}const I=["appetizer","starter","small plate","soup","salad","sandwich","entree","main","plate","pasta","pizza","side","dessert","drink","beverage"];function E(e){return e.replace(/^[\s~*\-ââ_.]+|[\s~*\-ââ_.]+$/g,"").trim()||e}const V=/^(n\/?a|none|null|-{1,2}|\u2014)$/i,U=e=>{const n=(e||"").trim();return n&&!V.test(n)?n:void 0};function D(e){const n=e.toLowerCase(),t=I.findIndex(e=>n.includes(e));return-1===t?I.length:t}const W=e=>`menu-section-${e}`;function G(e){const n=e.dishes;if(e.prixFixe=n.length>0&&n.every(e=>!0===e.is_prix_fixe),!e.prixFixe)return e;const t=Array.from(new Set(n.map(e=>e.price).filter(e=>"number"==typeof e&&e>0)));1===t.length&&(e.perGuestPrice=t[0]);const s=n.find(e=>e.gratuity_included||(e.gratuity_percent??0)>0);if(s){const n=s.gratuity_percent;e.gratuityNote=s.gratuity_included?`Gratuity included${n?` (${n}%)`:""}.`:`${n}% gratuity added.`}return e}function q(e){const n=new Map;for(const t of e){const e=t.menu_categories,s=(null==e?void 0:e.id)||t.menu_category_id||"dishes";let r=n.get(s);r||(r={id:s,name:E((null==e?void 0:e.name)||t.course_type||"Dishes"),description:U(null==e?void 0:e.description),sortOrder:(null==e?void 0:e.sort_order)??null,dishes:[],prixFixe:!1},n.set(s,r)),r.dishes.push(t)}for(const t of n.values())t.dishes.some(e=>"number"==typeof e.menu_sort_order)&&(t.dishes=t.dishes.map((e,n)=>({d:e,i:n})).sort((e,n)=>{const t=e.d.menu_sort_order??Number.MAX_SAFE_INTEGER,s=n.d.menu_sort_order??Number.MAX_SAFE_INTEGER;return t!==s?t-s:e.i-n.i}).map(({d:e})=>e));return Array.from(n.values()).map(G).sort((e,n)=>{if(null!==e.sortOrder&&null!==n.sortOrder&&e.sortOrder!==n.sortOrder)return e.sortOrder-n.sortOrder;if(null!==e.sortOrder&&null===n.sortOrder)return-1;if(null===e.sortOrder&&null!==n.sortOrder)return 1;const t=D(e.name)-D(n.name);return 0!==t?t:e.name.localeCompare(n.name)})}const K=e=>`$${e%1==0?e.toFixed(0):e.toFixed(2)}`,J=w.memo(function({dish:n,restaurantPath:t,hidePrice:s=!1}){const r=U(n.description),a="number"==typeof n.glass_price&&n.glass_price>0?n.glass_price:void 0,i="number"==typeof n.bottle_price&&n.bottle_price>0?n.bottle_price:void 0,l=!s&&(void 0!==a||void 0!==i),d=!s&&!l&&"number"==typeof n.price&&n.price>
10,c=(n.origin_region||"").trim();return e.jsx("li",{className:"border-b border-border/60 last:border-b-0",children:e.jsxs(o,{to:`${t}/dishes/${n.slug}`,className:"group flex items-baseline justify-between gap-4 rounded-md px-0 py-[11px] transition-[background-color,padding] duration-[120ms] ease-out hover:bg-muted/60 hover:px-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background motion-reduce:transition-none",children:[e.jsxs("span",{className:"min-w-0 flex-1 break-words",children:[e.jsxs("span",{className:"flex flex-wrap items-baseline gap-x-2 gap-y-1",children:[e.jsx("span",{className:"text-base font-semibold leading-snug text-foreground",children:n.name}),c?e.jsx("span",{className:"text-[12.5px] italic text-muted-foreground",children:c}):null,e.jsx("span",{className:"whitespace-nowrap rounded-full border border-border px-[7px] py-[1px] font-mono text-[9.5px] tracking-[0.12em] text-primary opacity-0 transition-opacity duration-[120ms] group-hover:opacity-100 group-focus-visible:opacity-100 motion-reduce:transition-none md:opacity-70",children:"DISH PAGE â"})]}),r?e.jsx("span",{className:"mt-1 block max-w-[560px] text-[13.5px] leading-[1.45] text-muted-foreground",children:r}):null]}),l?e.jsxs("span",{className:"shrink-0 whitespace-nowrap font-mono text-[13px] font-semibold text-primary",children:[void 0!==a?K(a):" - ",e.jsx("span",{className:"px-1 text-muted-foreground",children:"/"}),void 0!==i?K(i):" - "]}):d?e.jsx("span",{className:"shrink-0 whitespace-nowrap font-mono text-sm font-semibold text-primary",children:K(n.price)}):null]})})});function X({dishes:n,restaurantPath:t,menuName:s="Menu",sections:r,menuLastUpdated:a,menuKind:i,menuNote:o,prixFixePrice:l}){const d=w.useMemo(()=>r||q(n),[n,r]),c=w.useMemo(()=>{if(!a)return null;const e=new Date(a);return Number.isNaN(e.getTime())?null:e.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})},[a]);if(0===d.length)return null;const u="wine"===i,m="prix_fixe"===i,p=(o||"").trim(),h="number"==typeof l&&l>0?l:void 0,g=u&&d.some(e=>e.dishes.some(e=>"number"==typeof e.glass_price&&e.glass_price>0||"number"==typeof e.bottle_price&&e.bottle_price>0));return e.jsxs("div",{children:[e.jsx("h2",{className:"sr-only",children:s}),p||h||g?e.jsxs("div",{className:"mb-[22px] flex items-start justify-between gap-4",children:[p?e.jsx("p",{className:"max-w-[620px] text-sm italic leading-relaxed text-muted-foreground",children:p}):e.jsx("span",{}),h?e.jsxs("span",{className:"shrink-0 whitespace-nowrap font-mono text-[18px] font-semibold text-primary",children:[K(h),e.jsx("span",{className:"ml-1 text-[12px] font-normal text-muted-foreground",children:"/ guest"})]}):g?e.jsx("span",{className:"shrink-0 whitespace-nowrap font-mono text-[11px] uppercase tracking-[0.14em] text-muted-foreground",children:"Glass / Bottle"}):null]}):null,e.jsx("div",{className:"space-y-[30px]",children:d.map(n=>{const s=W(n.id),r=`${s}-heading`,a=n.prixFixe||m&&void 0!==h,i=n.dishes.some(e=>"number"==typeof e.glass_price&&e.glass_price>0||"number"==typeof e.bottle_price&&e.bottle_price>0);return e.jsxs("section",{id:s,"aria-labelledby":r,className:"scroll-mt-32",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h3",{id:r,className:"whitespace-nowrap font-mono text-[12.5px] uppercase tracking-[0.16em] text-primary",children:n.name}),e.jsx("span",{"aria-hidden":"true",className:"h-px flex-1 bg-border"}),n.prixFixe&&n.perGuestPrice?e.jsxs("span",{className:"shrink-0 whitespace-nowrap font-mono text-[13px] font-semibold text-primary",children:[K(n.perGuestPrice),e.jsx("span",{className:"ml-1 text-[11px] font-normal text-muted-foreground",children:"/ guest"})]}):i&&!a?e.jsx("span",{className:"shrink-0 whitespace-nowrap font-mono text-[11px] uppercase tracking-[0.12em] text-muted-foreground",children:"GL / BTL"}):null]}),n.description?e.jsx("p",{className:"mt-2 max-w-[580px] text-[13.5px] italic text-muted-foreground",children:n.description}):null,n.gratuityNote?e.jsx("p",{className:"mt-1 font-mono text-[11px] uppercase tracking-[0.1em] text-muted-foreground",children:n.gratuityNote}):null,e.jsx("ul",{className:"mt-[14px] space-y-[2px]",children:n.dishes.map(n=>
1e.jsx(J,{dish:n,restaurantPath:t,hidePrice:a},n.id))})]},n.id)})}),c?e.jsxs("p",{className:"mt-8 font-mono text-[11px] uppercase tracking-[0.14em] text-muted-foreground",children:["Menu last updated ",c]}):null]})}function Q({menuTypes:n,selectedMenuType:t,onMenuTypeChange:s,sections:r}){var a;const i=n.length>1,[o,d]=w.useState((null==(a=r[0])?void 0:a.id)??null),c=w.useRef([]),u=w.useRef(null);w.useEffect(()=>{if(0===r.length)return;const e=r.map(e=>document.getElementById(W(e.id))).filter(e=>!!e);if(0===e.length)return;const n=new IntersectionObserver(()=>{var n;const t=((null==(n=u.current)?void 0:n.getBoundingClientRect().bottom)??0)+8;let s=e[0];for(const r of e){if(!(r.getBoundingClientRect().top<=t))break;s=r}d(s.id.replace(/^menu-section-/,""))},{rootMargin:"-96px 0px -70% 0px",threshold:[0,1]});return e.forEach(e=>n.observe(e)),()=>n.disconnect()},[r]),w.useEffect(()=>{if(!o||!u.current)return;const e=u.current.querySelector(`[data-section="${o}"]`);null==e||e.scrollIntoView({block:"nearest",inline:"nearest"})},[o]);const m=w.useCallback((e,t)=>{var r;if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key&&"Home"!==e.key&&"End"!==e.key)return;e.preventDefault();const a=n.length-1,i="Home"===e.key?0:"End"===e.key?a:"ArrowRight"===e.key?t===a?0:t+1:0===t?a:t-1;s(n[i].id),null==(r=c.current[i])||r.focus()},[n,s]),p=w.useCallback(e=>{var n;const t=document.getElementById(W(e));if(!t)return;d(e);const s="undefined"!=typeof window&&(null==(n=window.matchMedia)?void 0:n.call(window,"(prefers-reduced-motion: reduce)").matches);t.scrollIntoView({behavior:s?"auto":"smooth",block:"start"})},[]);return!i&&r.length<2?null:e.jsxs(e.Fragment,{children:[i&&e.jsx("div",{role:"tablist","aria-label":"Menus",className:"flex flex-wrap gap-2 border-b border-border pb-4",children:n.map((n,r)=>{const a=n.id===t;return e.jsx("button",{ref:e=>c.current[r]=e,role:"tab",type:"button","aria-selected":a,tabIndex:a?0:-1,onKeyDown:e=>m(e,r),onClick:()=>s(n.id),className:l("rounded-full px-4 py-1.5 text-[13.5px] font-semibold transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background motion-reduce:transition-none",a?"bg-primary text-primary-foreground":"border border-border bg-transparent text-foreground hover:border-primary"),children:n.name},n.id)})}),r.length>1&&e.jsx("nav",{ref:u,"aria-label":"Menu sections",className:l("sticky top-0 z-20 -mx-4 border-b border-border bg-background/95 px-4 py-2 backdrop-blur-md",i&&"mt-[22px]"),children:e.jsx("ul",{className:"flex gap-1.5 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:r.map(n=>{const t=n.id===o;return e.jsx("li",{children:e.jsx("button",{type:"button","data-section":n.id,onClick:()=>p(n.id),"aria-current":t?"true":void 0,className:l("whitespace-nowrap rounded-full px-3 py-1 font-mono text-[11px] uppercase tracking-[0.12em] transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",t?"bg-primary/10 text-primary":"text-muted-foreground hover:text-primary"),children:n.name})},n.id)})})})]})}function Y({dishes:n,basePath:t}){const r=n.filter(e=>!1!==e.is_available&&(e.is_signature||e.is_popular)).sort((e,n)=>{const t=e=>(e.is_signature?2:0)+(e.is_popular?1:0),s=t(n)-t(e);return 0!==s?s:e.name.localeCompare(n.name)}).slice(0,5);return r.length<3?null:e.jsx("section",{className:"bg-background border-b border-border","aria-labelledby":"order-these-heading",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[e.jsxs("div",{className:"mb-5",children:[e.jsx("h2",{id:"order-these-heading",className:"text-2xl md:text-3xl font-semibold text-foreground tracking-tight",children:"Order These"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"What to get when you go."})]}),e.jsx("ul",{className:"divide-y divide-border/60 border-y border-border/60",children:r.map(n=>e.jsx("li",{children:e.jsxs(o,{to:`${t}/dishes/${n.slug}`,className:"group flex items-center gap-4 py-4 transition-colors hover:bg-muted/30 -mx-2 px-2 rounded-md",children:[n.image_url?e.jsx("img",{src:n.image_url,alt:n.name,loading:"lazy",width:64,height:64,className:"h-16 w-16 flex-shrink-0 rounded-md object-cover"}):null,e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-baseline gap-2 flex-wrap",children:[e.jsx("h3",{className:"text-base md:text-lg font-semibold text-foreground group-hover:text-primary transition-colors tracking-tight",children:n.name}),n.is_signature&&e.jsx(s,{variant:"outline",className:"text-[10px] py-0 px-1.5 font-normal border-primary/30 text-primary",children:"Signature"})]}),n.description&&e.jsx("p",{className:"text-sm text-muted-foreground mt-1 line-clamp-1",children:n.description})]}),"number"==typeof n.price&&n.price>0&&e.jsxs("span",{className:"flex-shrink-0 text-base font-medium text-foreground tabular-nums",children:["$",Number(n.price).toFixed(2)]})]})},n.id))})]})})}const Z={monterey:["Cannery Row","Fisherman's Wharf","Old Monterey","the Monterey Bay Aquarium","Alvarado Street"],"carmel-by-the-sea":["Ocean Avenue","Carmel Beach","downtown Carmel","the Carmel Mission","Carmel Plaza"],carmel:["Ocean Avenue","Carmel Beach","downtown Carmel","the Carmel Mission"],"pacific-grove":["Lovers Point","the Pacific Grove coastline","Lighthouse Avenue","Asilomar Beach"],salinas:["Old Town Salinas","the National Steinbeck Center","Main Street","the Salinas Valley"],seaside:["Broadway Avenue","the former Fort Ord","Seaside City Center"],marina:["Marina State Beach","the Dunes Shopping Center","Reservation Road"],"king-city":["the Salinas Valley","downtown King City","First Street"],soledad:["the Salinas Valley","downtown Soledad","Front Street"],gonzales:["the Salinas Valley","downtown Gonzales","Fifth Street"],greenfield:["the Salinas Valley","downtown Greenfield","El C
1amino Real"],"sand-city":["the Monterey Peninsula","Sand City coastline"],"del-rey-oaks":["Canyon Del Rey","the Monterey Peninsula"],"pebble-beach":["the 17-Mile Drive","Pebble Beach Golf Links","The Lodge at Pebble Beach"],"big-sur":["the Pacific Coast Highway","Big Sur coastline","Pfeiffer Beach"],"santa-cruz":["the Santa Cruz Beach Boardwalk","Pacific Avenue","the Santa Cruz Wharf","downtown Santa Cruz","West Cliff Drive"],capitola:["Capitola Village","Capitola Beach","the Esplanade","Soquel Creek"],aptos:["Seacliff State Beach","Aptos Village","the Rio Del Mar area"],"scotts-valley":["Scotts Valley Drive","downtown Scotts Valley","Mount Hermon"],watsonville:["downtown Watsonville","the Pajaro Valley","Main Street"],soquel:["Soquel Village","Porter Street","the Soquel Creek area"],felton:["the San Lorenzo Valley","downtown Felton","Henry Cowell Redwoods"],"boulder-creek":["the San Lorenzo Valley","downtown Boulder Creek","Big Basin Way"],"ben-lomond":["the San Lorenzo Valley","downtown Ben Lomond"],"live-oak":["the Santa Cruz coastline","41st Avenue"],hollister:["downtown Hollister","San Benito Street","the San Benito Valley"],"san-juan-bautista":["the San Juan Bautista Mission","Third Street","the historic downtown"],"tres-pinos":["the San Benito Valley","Tres Pinos Road"]},ee={monterey:["the Monterey Peninsula","Monterey County","the Central Coast","the Monterey Bay area"],"santa-cruz":["Santa Cruz County","the Santa Cruz coast","the Monterey Bay area","the Central Coast"],"san-benito":["San Benito County","the San Benito Valley","the Central Coast"]},ne=["Looking for authentic {cuisine} in {city}?","Craving {cuisine} cuisine near {landmark}?","Where can you find the best {cuisine} food in {county}?","Searching for exceptional {cuisine} dining in {city}?","Want to experience {cuisine} flavors in {region}?"],te=["Searching for a great restaurant in {city}?","Looking for exceptional dining near {landmark}?","Want to discover a local favorite in {county}?","Craving something delicious in {city}?","Need a restaurant recommendation in {region}?"],se=["Looking for fresh seafood near {landmark}?","Craving ocean-fresh catches in {city}?","Want the freshest seafood on the Central Coast?","Searching for waterfront dining in {region}?"],re=["offers a refined dining experience in the heart of {city}","brings exceptional cuisine to {region}","has become a beloved destination in {city}","serves the {county} community with distinction","welcomes guests just steps from {landmark}","provides an inviting atmosphere in {city}","delivers culinary excellence to {region}","stands as a dining destination in {county}"],ae={italian:["handmade pasta","wood-fired pizzas","authentic Italian recipes","rustic Italian flavors","traditional Italian dishes"],mexican:["authentic Mexican flavors","traditional recipes","handcrafted tacos","fresh salsas","regional Mexican specialties"],japanese:["expertly crafted sushi","traditional Japanese techniques","fresh sashimi","authentic ramen","delicate Japanese flavors"],chinese:["traditional wok cooking","dim sum specialties","authentic Chinese recipes","regional Chinese dishes"],thai:["aromatic Thai curries","fresh Thai herbs","authentic pad thai","traditional Thai flavors"],indian:["aromatic Indian spices","traditional tandoori cooking","authentic curry dishes","regional Indian specialties"],vietnamese:["fresh pho","Vietnamese herbs","bánh mì sandwiches","authentic Vietnamese flavors"],mediterranean:["fresh Mediterranean ingredients","olive oil-based dishes","grilled specialties","healthy Mediterranean fare"],american:["classic American comfort food","locally-sourced ingredients","American favorites","hearty American dishes"],seafood:["ocean-fresh catches","locally-sourced seafood","daily fresh fish","sustainably-sourced seafood"],french:["classic French techniques","refined French cuisine","traditional French dishes","elegant French fare"],korean:["authentic Korean BBQ","traditional Korean dishes","fermented specialties","Korean comfort food"],greek:["fresh Greek ingredients","traditional Greek recipes","Mediterranean flavors","authentic Greek dishes"],spanish:["authentic tapas","Spanish wines","traditional paella","Iberian flavors"],pizza:["hand-tossed pizzas","artisan pies","wood-fired creations","fresh pizza dough"],sushi:["expertly crafted rolls","fresh nigiri","omakase experiences","premium fish selections"],breakfast:["hearty breakfast fare","fresh morning favorites","all-day breakfast options","classic breakfast dishes"],cafe:["artisan coffee","fresh pastries","café favorites","cozy café atmosphere"],bakery:["fresh-baked goods","artisan breads","house-made pastries","daily baked treats"]},ie={$:["budget-friendly prices","affordable dining","wallet-friendly options","great value"],$$:["moderate prices","reasonable pricing","fair prices","good value for the quality"],$$$:["upscale dining","refined atmosphere","special occasion worthy","elevated experience"],$$$$:["fine dining","exceptional luxury","premium experience","world-class service"]},oe=["Whether you're a local or just visiting, {restaurant} is worth the trip.","Make {restaurant} your next dining destination in {city}.","{restaurant} awaits your visit in {city}.","Discover why locals love {restaurant} in {region}.","Experience the flavors of {restaurant} today.","Plan your visit to {restaurant} and taste the difference."];function le(e,n){return e[n.split("").reduce((e,n)=>e+n.charCodeAt(0),0)%e.length]}const de=j(()=>{const{state:n,city:t,restaurantSlug:s,slug:r}=d();c();const a=s||r,[i,l]=w.useState(null),[j,N]=w.useState(!0),[R,L]=w.useState(null),[P,T]=w.useState(null),[I,E]=w.useState(null),[V,U]=w.useState("all"),{location:D,isLoading:W}=u();w.useEffect(()=>{a&&m.getInstance().trackPageView("restaurant",a)},[a]);const{restaurant:G}=p((n||"").toString(),(t||"").toString(),(a||"").toString()),K=`/${n}/${t}`,J=`${K}/restaurants/${a}`,de=e=>{if(e)return e.startsWith("http")?e:`${y.baseUrl.replace(/\/$/,"")}${e.startsWith("/")?e:`/${e}`}`};w.useEffect(()=>
1{if(!I&&G&&n&&t&&a){const e=h(J),n={name:G.name,description:G.description||"Exceptional dining experience",address:{streetAddress:"",addressLocality:G.city,addressRegion:"CA",postalCode:"",addressCountry:"US"},telephone:"",url:e,image:[de("/placeholder.svg")],servesCuisine:G.cuisines||[],priceRange:"$$",openingHours:["Mo-Su 11:00-23:00"],alternateName:[G.name],sameAs:G.website?[G.website]:void 0,knowsAbout:G.cuisines||[]};E(n)}},[I,G,n,t,a,J]),w.useEffect(()=>{!async function(){var e,s;if(a)try{N(!0);const{data:r,error:i}=await b.from("restaurants").select("\n id,\n name,\n slug,\n city,\n county,\n address,\n phone,\n website,\n online_ordering_url,\n reservation_url,\n description,\n highlights,\n image_url,\n rating,\n review_count,\n price_range,\n postal_code,\n hours,\n menu_last_updated,\n latitude,\n longitude,\n is_food_truck,\n status,\n closed_at,\n closure_reason,\n restaurant_cuisines!left (\n cuisines (\n name\n )\n ),\n dishes!left (\n id,\n name,\n slug,\n description,\n price,\n image_url,\n is_signature,\n is_popular,\n is_sponsored,\n is_available,\n photo_urls,\n course_type,\n is_prix_fixe,\n gratuity_included,\n gratuity_percent,\n menu_sort_order,\n glass_price,\n bottle_price,\n origin_region,\n menu_category_id,\n menu_type_id,\n\n menu_categories!left (\n id,\n name,\n slug,\n description,\n sort_order\n )\n ),\n restaurant_menu_types!left (\n menu_kind,\n menu_note,\n prix_fixe_price,\n display_name,\n sort_order,\n menu_types!inner (\n id,\n name,\n slug,\n description\n )\n )\n ").eq("slug",a).eq("dishes.is_archived",!1).maybeSingle();if(i)return void L("Restaurant not found");if(!r){const{data:e}=await b.from("restaurant_slug_redirects").select("new_slug").eq("city_slug",(t||"").toString()).eq("old_slug",a).maybeSingle();return(null==e?void 0:e.new_slug)?void T(`/${n}/${t}/restaurants/${e.new_slug}`):void L("Restaurant not found")}r.dishes&&r.dishes.length,l(r);const o=h(J),d={name:r.name,description:r.description||"Exceptional dining experience",address:{streetAddress:r.address||"",addressLocality:r.city,addressRegion:"CA",postalCode:r.postal_code||"",addressCountry:"US"},telephone:r.phone||"",url:o,image:[de(r.image_url)||de("/placeholder.svg")],servesCuisine:(null==(e=r.restaurant_cuisines)?void 0:e.map(e=>e.cuisines.name))||[],priceRange:r.price_range||"$$",openingHours:["Mo-Su 11:00-23:00"],openingHoursSpecification:v(r.hours),menu:`${o}#menu`,alternateName:[r.name],sameAs:(()=>{const e=[];if(r.website){const n=de(r.website);n&&e.push(n)}return r.latitude&&r.longitude&&e.push(`https://www.google.com/maps/search/?api=1&query=${r.latitude},${r.longitude}`),e.length>0?e:void 0})(),knowsAbout:(null==(s=r.restaurant_cuisines)?void 0:s.map(e=>e.cuisines.name))||[],...r.latitude&&r.longitude?{geo:{latitude:r.latitude,longitude:r.longitude},hasMap:`https://www.google.com/maps/search/?api=1&query=${r.latitude},${r.longitude}`}:{},...r.reservation_url?{reservationUrl:de(r.reservation_url)}:{}};E(d)}catch(r){L("Failed to load restaurant")}finally{N(!1)}}()},[a,n,t,J]);const ce=w.useMemo(()=>{const e=((null==i?void 0:i.dishes)||[]).filter(e=>!1!==e.is_available),n=((null==i?void 0:i.restaurant_menu_types)||[]).map(n=>({id:n.menu_types.id,name:(n.display_name||"").trim()||n.menu_types.name,sortOrder:n.sort_order??null,dishCount:e.filter(e=>e.menu_type_id===n.menu_types.id).length})).filter(e=>e.dishCount>0).sort((e,n)=>null!==e.sortOrder&&null!==n.sortOrder&&e.sortOrder!==n.sortOrder?e.sortOrder-n.sortOrder:null!==e.sortOrder&&null===n.sortOrder?-1:null===e.sortOrder&&null!==n.sortOrder?1:e.name.localeCompare(n.name)).map(({sortOrder:e,...n})=>n);return n.length<2?[]:[{id:"all",name:"All Menus",dishCount:e.length},...n]},[null==i?void 0:i.dishes,null==i?void 0:i.restaurant_menu_types]),ue=w.useMemo(()=>{const e=((null==i?void 0:i.dishes)||[]).filter(e=>!1!==e.is_available);return q("all"===V?e:e.filter(e=>e.menu_type_id===V))},[null==i?void 0:i.dishes,V]),me=w.useMemo(()=>
1{if("all"!==V)return((null==i?void 0:i.restaurant_menu_types)||[]).find(e=>e.menu_types.id===V)},[null==i?void 0:i.restaurant_menu_types,V]);if(P)return e.jsx(g,{to:P,replace:!0});if(j)return e.jsx("div",{className:"min-h-screen flex items-center justify-center",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})});if(R||!i)return e.jsx("div",{className:"min-h-screen flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"text-2xl font-bold text-foreground mb-2",children:"Restaurant Not Found"}),e.jsx("p",{className:"text-muted-foreground",children:"The restaurant you're looking for doesn't exist."})]})});const pe="permanently_closed"===i.status;return e.jsxs("div",{className:"min-h-screen bg-background",children:[(()=>{const n=x.getRestaurantMetadata({name:i.name,city:i.city,county:i.county||"",slug:i.slug,description:i.description||""},i.county||"",t||"");return n.image=de(i.image_url)||"/android-chrome-512x512.png",pe&&(n.title=`${i.name} - Permanently Closed | MenuMenu`,n.description=`${i.name} in ${i.city}, CA is permanently closed. Its last known menu and pricing are kept here for reference.`),e.jsx(f,{metadata:n,siteName:"MenuMenu",locale:"en_US",author:"MenuMenu",noIndex:pe})})(),I&&!pe&&e.jsx(z,{restaurant:I}),pe&&e.jsx("div",{className:"bg-destructive/10 border-b border-destructive/30",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-4",children:[e.jsx("p",{className:"text-sm font-semibold text-destructive",children:"Permanently closed"}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:[i.name," is no longer open",i.closed_at?` (as of ${new Date(i.closed_at).toLocaleDateString()})`:"",". The menu below is the last recorded version and is kept for reference only.",i.closure_reason?` ${i.closure_reason}`:""]})]})}),(()=>{const n=[{name:"Home",url:h("/")},{name:"California",url:h("/california")},{name:i.city||(t||"").replace(/-/g," "),url:h(K)},{name:i.name||(null==G?void 0:G.name)||"Restaurant",url:h(J)}];return e.jsx(_,{items:n})})(),(()=>{var n;const t=(null==(n=i.restaurant_cuisines)?void 0:n.map(e=>e.cuisines.name))||[],s=(i.dishes||[]).filter(e=>(e.is_signature||e.is_popular)&&!1!==e.is_available).slice(0,5).map(e=>e.name),r=function(e){const{id:n,name:t,city:s,county:r,cuisines:a=[],priceRange:i,description:o,signatureDishes:l=[]}=e,d=function(e,n){const t=e.toLowerCase().replace(/\s+/g,"-"),s=Z[t]||[];return 0===s.length?e:le(s,n)}(s,n),c=function(e,n){const t=e.toLowerCase().replace(/\s+/g,"-").replace("-county","");return le(ee[t]||[`${e} County`],n)}(r,n),u=function(e){return e&&0!==e.length?e[0].toLowerCase().replace(/\s+/g,"-"):null}(a),m=function(e,n){const t=n.toLowerCase(),s=(null==e?void 0:e.map(e=>e.toLowerCase()))||[];return["seafood","fish","oyster","crab","lobster","sushi","poke"].some(e=>t.includes(e)||s.some(n=>n.includes(e)))}(a,t),p=[];let h=te;m?h=se:u&&ne&&(h=ne);let g=le(h,n);g=g.replace("{cuisine}",a[0]||"delicious").replace("{city}",s).replace("{landmark}",d).replace("{county}",r).replace("{region}",c),p.push(g);let x=le(re,n+"est");if(x=`${t} ${x}`.replace("{city}",s).replace("{landmark}",d).replace("{county}",r).replace("{region}",c),p.push(x+"."),u&&ae[u]){const e=le(ae[u],n+"cuisine");p.push(`Known for their ${e}, this ${c} favorite brings exceptional flavors to every dish.`)}else if(o){const e=o.length>120?o.slice(0,117)+"...":o;p.push(e)}if(l.length>0){const e=l.slice(0,3);1===e.length?p.push(`Popular dishes include their ${e[0]}.`):2===e.length?p.push(`Popular dishes include their ${e[0]} and ${e[1]}.`):p.push(`Popular dishes include their ${e.slice(0,-1).join(", ")}, and ${e[e.length-1]}.`)}if(i&&ie[i]){const e=le(ie[i],n+"price");"$"===i||"$$"===i?p.push(`With ${e}, it's perfect for both casual meals and special occasions.`):p.push(`Offering ${e}, it's the ideal choice for memorable dining experiences.`)}let f=le(oe,n+"close");return f=f.replace("{restaurant}",t).replace("{city}",s).replace("{region}",c),p.push(f),p.join(" ")}({id:i.id,name:i.name,city:i.city,county:i.county||"",address:i.address,cuisines:t,priceRange:i.price_range,description:i.description,signatureDishes:s,isReservationAvailable:!!i.reservation_url,hasOnlineOrdering:!!i.online_ordering_url});return e.jsx(H,{restaurantId:i.id,name:i.name,description:i.description,cuisines:t,highlights:i.highlights||[],address:i.address,phone:i.phone,website:i.website,hours:i.hours,onlineOrderingUrl:pe?void 0:i.online_ordering_url,reservationUrl:pe?void 0:i.reservation_url,rating:i.rating,reviewCount:i.review_count,priceRange:i.price_range,restaurantCoordinates:i.latitude&&i.longitude?{lat:i.latitude,lng:i.longitude}:void 0,userLocation:D?{lat:D.lat,lng:D.lng}:void 0,isLocationLoading:W,isFoodTruck:i.is_food_truck,aioWriteup:r})})(),e.jsx(Y,{dishes:i.dishes||[],basePath:J}),e.jsx("div",{className:"bg-background",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[e.jsx(k,{className:"mb-6",children:e.jsxs(C,{children:[e.jsx(S,{children:e.jsx($,{asChild:!0,children:e.jsx(o,{to:"/",children:"Home"})})}),e.jsx(M,{}),e.jsx(S,{children:e.jsx($,{asChild:!0,children:e.jsx(o,{to:"/california",children:"California"})})}),e.jsx(M,{}),e.jsx(S,{children:e.jsx($,{asChild:!0,children:e.jsx(o,{to:K,children:(null==t?void 0:t.charAt(0).toUpperCase())+(null==t?void 0:t.slice(1))})})}),e.jsx(M,{}),e.jsx(S,{children:e.jsx($,{asChild:!0,children:e.jsx(o,{to:`${K}/restaurants`,children:"Restaurants"})})}),e.jsx(M,{}),e.jsx(S,{children:e.jsx(A,{children:i.name})})]})}),e.jsx(B,{className:"mb-8",fallbackPath:"/"}),e.jsx("div",{className:"space-y-6",children:e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("h2",{className:"text-3xl font-bold text-foreground tracking-tight",children:"Menu"}),i.menu_last_updated&&e.jsxs("span",{className:"text-sm text-muted-foreground bg-muted/50 px-3 py-1 rounded-full",children:["Last updated ",new Date(i.menu_last_updated).toLocaleDateString()]})]})})})]})}),e.jsxs("div",{className:"max-w-6xl mx-auto px-4 pb-12",children:[ue.length>0?e.jsxs(e.Fragment,{children:[e.jsx(Q,{menuTypes:ce,selectedMenuType:V,onMenuTypeChange:U,sections:ue}),e.jsx("div",{className:"mt-[22px]",children:e.jsx(X,{dishes:[],sections:ue,restaurantPath:J,menuLastUpdated:i.menu_last_updated,menuKind:(null==me?void 0:me.menu_kind)??null,menuNote:null==me?void 0:me.menu_note,prixFixePrice
1:null==me?void 0:me.prix_fixe_price})})]}):e.jsx("div",{className:"text-center py-12",children:e.jsx("p",{className:"text-muted-foreground",children:i.dishes&&i.dishes.length>0?"No dishes found for this menu.":"Menu items will be available soon."})}),e.jsx(F,{observedAt:i.menu_last_updated,source:`${i.name} posted menu`,children:e.jsx(O,{restaurantId:i.id,subjectName:i.name,fields:["Menu item","Price","Hours","Address or phone","Permanently closed","Other"]})})]})]})});export{de 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.