PageSourceSearch

https://rotation-restaurant-production.up.railway.app/_next/static/chunks/7181-2aff8823ae892e93.js

js rotation-restaurant-production.up.railway.app collected 2026-10-03 12:14:28 UTC 8,602 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7181],{12306:(e,r,a)=>{a.d(r,{V:()=>o});var t=a(22043),n=a(12115);function o(){var e=(0,t._)((0,n.useState)(!1),2),r=e[0],a=e[1];return(0,n.useEffect)(function(){var e=document.documentElement,r=function(){a("true"===e.dataset.ticketMobileBar)};try{r();var t=new MutationObserver(r);return t.observe(e,{attributes:!0,attributeFilter:["data-ticket-mobile-bar"]}),function(){t.disconnect()}}catch(e){console.error("[useTicketMobileBarDocked] observer failed",e);return}},[]),r}},22027:(e,r,a)=>{a.d(r,{Chatbot:()=>j});var t=a(61975),n=a(22043),o=a(45377),s=a(71450),i=a(95155),c=a(12115),l=a(41407),d=a(26497),u=a(920),m=a(37586),h=a(65229),x=a(35299),g=a(86651),f=a(18085),b=a(70856),p=a(97003),v=a(12306),y="concierge-chat-input",N="concierge-chat-title";function j(){var e=(0,l.I)(),r=(0,v.V)(),a=(0,n._)(c.useState(!1),2),j=a[0],w=a[1],_=(0,n._)(c.useState(""),2),k=_[0],C=_[1],A=(0,n._)(c.useState([{role:"model",text:"I'm Rotation's culinary concierge. Ask about the current residency, reservations, or planning an evening in Napa."}]),2),S=A[0],z=A[1],E=(0,n._)(c.useState(!1),2),I=E[0],O=E[1],$=(0,n._)(c.useState(!0),2),T=$[0],F=$[1],M=c.useRef(null),P=c.useCallback(function(){var e=M.current;e&&(e.scrollTop=e.scrollHeight)},[]);c.useLayoutEffect(function(){P()},[S,I,P]);var R=function(){return(0,t._)(function(){var e,r,a,t,n,i;return(0,s.YH)(this,function(s){switch(s.label){case 0:if(!k.trim()||I)return[2];e={role:"user",text:k},z(function(r){return(0,o._)(r).concat([e])}),C(""),O(!0),s.label=1;case 1:var c,l;return s.trys.push([1,4,5,6]),[4,fetch("/api/concierge/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:(l=(c=(0,o._)(S).concat([e])).findIndex(function(e){return"user"===e.role}))>=0?c.slice(l):[],useSearch:T})})];case 2:return[4,(r=s.sent()).json()];case 3:if(a=s.sent(),!r.ok)throw Error(429===r.status?null!=(t=a.error)?t:"Too many requests. Please wait a moment and try again.":null!=(n=a.error)?n:"Request failed");return i={role:"model",text:a.text||"I'm sorry, I couldn't process that."},z(function(e){return(0,o._)(e).concat([i])}),[3,6];case 4:return s.sent(),z(function(e){return(0,o._)(e).concat([{role:"model",text:"I apologize, but I'm having trouble connecting right now. Please try again later."}])}),[3,6];case 5:return O(!1),[7];case 6:return[2]}})})()};return(0,i.jsxs)("div",{className:r?"fixed bottom-[calc(5.25rem+env(safe-area-inset-bottom,0px))] right-6 z-[60] lg:bottom-6":"fixed bottom-6 right-6 z-[60]",children:[(0,i.jsx)(d.N,{children:j&&(0,i.jsxs)(u.P.div,{initial:e?{opacity:1,scale:1,y:0}:{opacity:0,scale:.9,y:20},animate:{opacity:1,scale:1,y:0},exit:e?{opacity:1,scale:1,y:0}:{opacity:0,scale:.9,y:20},transition:{duration:.2*!e},className:"mb-4 flex h-[min(500px,calc(100dvh-8rem))] w-[350px] max-h-[500px] flex-col overflow-hidden rounded-lg border border-gold/30 bg-espresso md:w-[400px]",role:"dialog","aria-modal":"true","aria-labelledby":N,"aria-busy":I,children:[(0,i.jsxs)("div",{className:"p-4 bg-charcoal border-b border-gold/20 flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsx)("div",{className:"w-8 h-8 rounded-full bg-teal flex items-center justify-center",children:(0,i.jsx)(m.A,{className:"w-4 h-4 text-cream","aria-hidden":!0})}),(0,i.jsxs)("div",{children:[(0,i.jsx)("h3",{id:N,className:"text-sm font-display font-medium text-cream",children:"Culinary Concierge"}),(0,i.jsx)("p",{className:"text-[10px] font-body text-gold uppercase tracking-widest",children:"Rotation Napa"})]})]}),(0,i.jsx)(p.$,{type:"button",variant:"ghost",size:"icon",onClick:function(){return w(!1)},className:"text-linen hover:text-cream","aria-label":"Close culinary concierge",children:(0,i.jsx)(h.A,{className:"w-5 h-5","aria-hidden":!0})})]}),(0,i.jsx)("div",{ref:M,className:"min-h-0 flex-1 overflow-y-auto overscroll-y-contain p-4",children:(0,i.jsxs)("div",{className:"flex flex-col gap-4","aria-live":"polite","aria-relevant":"additions",children:[S.map(function(e,r){return(0,i.jsx)("div",{className:"flex ".concat("user"===e.role?"justify-end":"justify-start"),children:(0,i.jsx)("div",{className:"max-w-[85%] rounded-md p-3 text-sm font-body leading-relaxed ".concat("user"===e.role?"rounded-tr-none bg-teal text-cream":"rounded-tl-none border border-gold/10 bg-c
1harcoal text-parchment"),children:(0,i.jsx)("div",{className:"prose prose-invert prose-sm max-w-none",children:(0,i.jsx)(b.oz,{children:e.text})})})},r)}),I&&(0,i.jsx)("div",{className:"flex justify-start","aria-hidden":!0,children:(0,i.jsx)("div",{className:"rounded-md rounded-tl-none border border-gold/10 bg-charcoal p-3",children:(0,i.jsx)(x.A,{className:"w-4 h-4 text-gold animate-spin","aria-hidden":!0})})})]})}),(0,i.jsxs)("div",{className:"p-4 bg-charcoal border-t border-gold/20",children:[(0,i.jsx)("div",{className:"flex items-center gap-2 mb-2",children:(0,i.jsxs)(p.$,{type:"button",variant:"ghost",size:"sm",onClick:function(){return F(!T)},"aria-pressed":T,className:"text-[10px] uppercase tracking-widest h-6 px-2 rounded-full border ".concat(T?"bg-gold/20 text-gold border-gold/40":"text-linen border-linen/20"),children:[(0,i.jsx)(g.A,{className:"w-3 h-3 mr-1","aria-hidden":!0}),"Search Grounding ",T?"ON":"OFF"]})}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)("label",{htmlFor:y,className:"sr-only",children:"Message the culinary concierge"}),(0,i.jsx)("input",{id:y,type:"text",value:k,onChange:function(e){return C(e.target.value)},onKeyDown:function(e){return"Enter"===e.key&&R()},placeholder:"Ask about our chefs or Napa...",autoComplete:"off",className:"flex-1 bg-obsidian border border-gold/20 rounded-full px-4 py-2 text-sm text-cream focus:outline-none focus:border-gold transition-colors"}),(0,i.jsx)(p.$,{type:"button",size:"icon",onClick:R,disabled:I,className:"bg-gold hover:bg-gold-light text-on-gold rounded-full shrink-0","aria-label":"Send message",children:(0,i.jsx)(f.A,{className:"w-4 h-4","aria-hidden":!0})})]})]})]})}),(0,i.jsx)(p.$,{type:"button",onClick:function(){return w(!j)},className:"flex size-14 items-center justify-center rounded-full border border-gold/40 bg-gold text-on-gold transition-transform hover:scale-110 hover:bg-gold-light","aria-expanded":j,"aria-label":j?"Close culinary concierge":"Open culinary concierge",children:j?(0,i.jsx)(h.A,{className:"w-6 h-6","aria-hidden":!0}):(0,i.jsx)(m.A,{className:"w-6 h-6","aria-hidden":!0})})]})}},51539:(e,r,a)=>{a.d(r,{$m:()=>b,As:()=>f,nD:()=>g,ub:()=>p});var t=a(82732),n=a(45849),o=a(17389),s=a(95155),i=a(53514),c=a(49495),l=a(33151),d=a(14313),u=a(25201),m=a(25016),h=a(24033),x=a(12108);function g(e){var r=e.className,a=(0,o._)(e,["className"]);return(0,s.jsx)(i.X,(0,t._)({"data-slot":"accordion",className:(0,m.cn)("flex w-full flex-col",r)},a))}function f(e){var r=e.className,a=(0,o._)(e,["className"]);return(0,s.jsx)(c.A,(0,t._)({"data-slot":"accordion-item",className:(0,m.cn)("not-last:border-b",r)},a))}function b(e){var r=e.className,a=e.children,i=(0,o._)(e,["className","children"]);return(0,s.jsx)(l.u,{className:"flex",children:(0,s.jsxs)(d.$,(0,n._)((0,t._)({"data-slot":"accordion-trigger",className:(0,m.cn)("group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",r)},i),{children:[a,(0,s.jsx)(h.A,{"data-slot":"accordion-trigger-icon",className:"pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"}),(0,s.jsx)(x.A,{"data-slot":"accordion-trigger-icon",className:"pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"})]}))})}function p(e){var r=e.className,a=e.children,i=(0,o._)(e,["className","children"]);return(0,s.jsx)(u.v,(0,n._)((0,t._)({"data-slot":"accordion-content",className:"overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up"},i),{children:(0,s.jsx)("div",{className:(0,m.cn)("h-(--accordion-panel-height) pt-0 pb-2.5 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",r),children:a})}))}}}]);

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.