PageSourceSearch

https://www.gafferdistrict.com/assets/StayView-D11N4OJO.js

js gafferdistrict.com collected 2026-10-02 07:55:17 UTC 29,274 bytes, 1 lines download raw bytes

1import{r as m,j as e,R as E}from"./vendor-react-BKK2cemD.js";import{u as ye,C as we,j as je,s as Ne,S as ke,D as ve,d as x,E as A}from"./index-dYSgqNAK.js";import{a as Se}from"./vendor-router-MWzdZqT4.js";import"./vendor-posthog-DaPeprxb.js";import"./vendor-lucide-Cg1iQ9zl.js";import"./vendor-maplibre-CpI4tf7S.js";const Re=({isEditMode:b=!1})=>{const M=Se(),{data:C,refetch:ee,loading:I}=ye("pages/stay.json",{title:"Stay in Corning",sectionOrder:["hero","accommodations","boutique","why-stay"],heroTitle:"Stay in the Heart <br/>of the Action",heroSubtitle:"Your Home in the Crystal City",heroDescription:"From luxury hotels to historic boutique inns, find the perfect base for your Corning exploration.",heroImage:"/images/external/img_b1dd9ded9d5b063e.jpg",dynamicSections:[],accommodations:[{id:"h1",name:"Radisson Hotel Corning",type:"Full Service Hotel",description:"Experience refined comfort in the heart of the Gaffer District. Just steps away from the Museum of Glass and Market Street.",image:"/images/external/img_b1dd9ded9d5b063e.jpg",amenities:["Indoor Pool","On-site Dining","Fitness Center","Pet Friendly"],location:"125 Denison Pkwy E, Corning, NY",bookUrl:"https://www.guestreservations.com/radisson-hotel-corning/booking?utm_source=google&utm_medium=cpc&utm_campaign=22936441619&gad_source=1&gad_campaignid=22936441619&gbraid=0AAAAADiMQMbNErk776fekNybCj0vB9bkK&ctTriggered=true"},{id:"h4",name:"Fairfield Inn Corning Riverside",type:"Hotel",description:"Comfortable rooms with modern amenities, located near the river and within walking distance to downtown.",image:"/images/external/img_336345bd59b5803c.png",amenities:["Free WiFi","Breakfast Included","River Views","Fitness Center"],location:"3 South Bridge St, Corning, NY",bookUrl:"https://www.marriott.com/en-us/hotels/elxfi-fairfield-inn-corning-riverside/overview/"}],boutiqueStays:[{name:"Rosewood Inn",desc:"An elegant Victorian Bed & Breakfast.",img:"/images/external/img_336345bd59b5803c.png",location:"134 E 1st St, Corning, NY",amenities:["Free Breakfast","Victorian Style","Free WiFi","Private Bathrooms"]},{name:"The Gaffer Inn",desc:"Charming suites directly on Market Street.",img:"/images/external/img_c7e196c9661f1cd3.png",bookUrl:"https://gafferinn.com",location:"60 W Market St, Corning, NY",amenities:["Free WiFi","Kitchenette","Fireplace","Air Conditioning"]},{name:"Hilton Garden Inn Corning Downtown",desc:"Modern luxury meets downtown convenience. Enjoy spacious rooms and premium amenities overlooking the Chemung River.",img:"/images/external/img_f6d4ba3cb77b7f56.png",bookUrl:"https://www.hilton.com/en/hotels/elmrdgi-hilton-garden-inn-corning-downtown/",location:"23 Riverside Dr, Corning, NY 14830",amenities:["Free WiFi","Indoor Pool","Fitness Center","On-site Dining"]},{name:"Staybridge Suites Corning by IHG",desc:"Straightforward hotel with relaxed suites, plus an indoor pool & a free breakfast buffet.",img:"/images/external/img_adc3a669bb25e670.jpg",bookUrl:"https://www.ihg.com/staybridge/hotels/us/en/corning/crnss/hoteldetail?cm_mmc=GoogleMaps-_-SB-_-US-_-CRNSS",location:"201 Townley Ave, Corning, NY 14830",amenities:["Breakfast Buffet","Indoor Pool","Free WiFi","Kitchenette","Pet Friendly"]}],whyStayItems:[{icon:"explore",title:"Walkability",description:"Stay in the heart of the Gaffer District and walk to over 100 shops, restaurants, and world-class museums."},{icon:"local_dining",title:"Dining & Drinks",description:"From award-winning restaurants to cozy coffee shops and local breweries, everything is right at your doorstep."},{icon:"theater_comedy",title:"Arts & Culture",description:"Immerse yourself in Corning's rich history and vibrant arts scene, with galleries and studios just a short stroll away."}]}),[o,p]=m.useState(null),[f,h]=m.useState(!1),[te,T]=m.useState(!1),[v,se]=m.useState([]),[y,_]=m.useState(0),[w,S]=m.useState(!1),[ne,V]=m.useState(!1),[ze,Ce]=m.useState(0),[ae,z]=m.useState(!1),[P,ie]=m.useState([]),[re,B]=m.useState(!1),[oe,W]=m.useState(!1),[F,$]=m.useState(null),[le,L]=m.useState(null),ce=async()=>{B(!0);try{const n=await fetch("/api/cms/audit-trail?key=pages/stay.json",{credentials:"include"});if(n.ok){const s=await n.json();ie(s)}}catch(n){console.error("Failed to load version history:",n)}finally{B(!1)}},de=async n=>{try{const s=await fetch(`/api/cms/version/${n}`,{credentials:"include"});if(s.ok){const t=await s.json();$(t.content_data),L(n),W(!0),z(!1)}}catch(s){console.error("Failed to load comparative version:",s),alert("Error loading comparative version details.")}},G=n=>{n&&(p(n),h(!0),S(!0),Y())},Y=()=>{W(!1),$(null),L(null)};m.useEffect(()=>
1{C&&!I&&p(C)},[C,I]);const d=(n,s)=>{o&&(p({...o,[n]:s}),h(!0))},me=(n,s,t,c)=>{o&&(p({...o,[n]:t,[s]:c||o[s]||{objectPosition:"center",objectFit:"cover"}}),h(!0))},J=async()=>{try{const n=await fetch(`/api/versions/${encodeURIComponent("pages/stay.json")}`);if(n.ok){const s=await n.json();se(s)}}catch(n){console.warn("Failed to fetch versions:",n)}},xe=async()=>{if(y>=v.length-1)return;const n=y+1,s=v[n];try{const t=await fetch(`/api/versions/${encodeURIComponent("pages/stay.json")}/${s.timestamp}`);if(!t.ok)throw new Error;const c=await t.json();p(c),S(!0),h(!0),_(n)}catch(t){console.error("Undo failed:",t)}},ue=async()=>{if(y<=0)return;const n=y-1,s=v[n];try{const t=await fetch(`/api/versions/${encodeURIComponent("pages/stay.json")}/${s.timestamp}`);if(!t.ok)throw new Error;const c=await t.json();p(c),S(!0),h(!0),_(n)}catch(t){console.error("Redo failed:",t)}},pe=async(n,s)=>{if(n){T(!0);try{if(!(await fetch(s?"/api/cms/pages/stay?skipSnapshot=true":"/api/cms/pages/stay",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})).ok)throw new Error("Auto-save failed");await ee(),h(!1),S(!1),s||_(0),J()}catch(t){console.error("Auto-save error:",t)}finally{T(!1)}}},q=m.useRef(o),K=m.useRef(w),U=m.useRef(f);m.useEffect(()=>{q.current=o,K.current=w,U.current=f},[o,w,f]),m.useEffect(()=>{const n=s=>{U.current&&(s.preventDefault(),s.returnValue="")};return window.addEventListener("beforeunload",n),()=>{if(window.removeEventListener("beforeunload",n),U.current&&q.current){const s=K.current?"/api/cms/pages/stay?skipSnapshot=true":"/api/cms/pages/stay";fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q.current),keepalive:!0}).catch(t=>console.warn("Failed to save layout on unmount:",t))}}},[]),m.useEffect(()=>{if(!b||!o||!f)return;const n=setTimeout(()=>{pe(o,w)},2e3);return()=>clearTimeout(n)},[o,b,f,w]),m.useEffect(()=>{b&&J()},[b]);const he=()=>V(!0),ge=n=>{if(!o)return;const s={id:`section-${Date.now()}`,type:n,title:"New Section Title",description:"Add your description here.",image:"",imageSettings:{objectFit:"cover",objectPosition:"center"}};if(n==="instagram-ribbon"){fetch("/api/data/home.json").then(t=>t.json()).then(t=>{const c={...s,title:t.instagramTitle||"Follow the Magic",description:"",instagramHandle:t.instagramHandle||"@gafferdistrict",instagramHashtag:t.instagramHashtag||"#explorecorning",instagramImages:t.instagramImages||[],instagramPool:t.instagramPool||t.instagramImages||[]};p({...o,dynamicSections:[...o.dynamicSections||[],c],sectionOrder:[...o.sectionOrder||[],c.id]}),h(!0)}).catch(()=>{p({...o,dynamicSections:[...o.dynamicSections||[],s],sectionOrder:[...o.sectionOrder||[],s.id]}),h(!0)});return}p({...o,dynamicSections:[...o.dynamicSections||[],s],sectionOrder:[...o.sectionOrder||[],s.id]}),h(!0)},be=(n,s)=>{if(!o)return;const t=[...o.dynamicSections||[]];t[n]=s,p({...o,dynamicSections:t}),h(!0)},fe=n=>{var t;if(!o)return;const s=(t=o.dynamicSections)==null?void 0:t[n];p({...o,dynamicSections:(o.dynamicSections||[]).filter((c,j)=>j!==n),sectionOrder:(o.sectionOrder||[]).filter(c=>c!==(s==null?void 0:s.id))}),h(!0)},O=n=>{if(!o)return;const s=o.sectionOrder||[],t=s.indexOf(n);if(t<=0)return;const c=[...s];[c[t-1],c[t]]=[c[t],c[t-1]],p({...o,sectionOrder:c}),h(!0)},R=n=>{if(!o)return;const s=o.sectionOrder||[],t=s.indexOf(n);if(t===-1||t===s.length-1)return;const c=[...s];[c[t],c[t+1]]=[c[t+1],c[t]],p({...o,sectionOrder:c}),h(!0)},Q=(n,s,t)=>{var X,Z;if(!s)return null;const c=s.sectionOrder.indexOf(n),j=c>0,H=c<s.sectionOrder.length-1;switch(n){case"hero":return e.jsx(E.Fragment,{children:e.jsxs("section",{className:"relative h-[55vh] flex items-center justify-start overflow-hidden w-full",children:[e.jsxs("div",{className:"absolute inset-0 z-0",children:[e.jsx("div",{className:"absolute inset-0 bg-black/55 z-10"}),e.jsx(A,{src:s.heroImage,alt:"Stay Page Hero Image",onChange:(i,r)=>t&&me("heroImage","heroImageSettings",i,r),settings:s.heroImageSettings||s.imageSettings,isEditMode:t,className:"w-full h-full",excludeBusinessImages:!0})]}),e.jsxs("div",{className:"relative z-20 text-left px-6 md:px-20 max-w-4xl w-full force-light-text [text-shadow:0_2px_8px_rgba(0,0,0,0.7)] flex flex-col gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2.5 mb-1 pointer-events-auto flex-wrap text-white",children:[e.jsxs("button",{onClick:()=>M("/"),className:"hero-breadcrumb-btn inline-flex items-center gap-1.5 px-3.5 py-1.5 bg-black/60 hover:bg-black/80 border border-white/40 text-white rounded-none font-bold text-[11px] uppercase tracking-[0.15em] transition-all backdrop-blur-md cursor-pointer group shadow-sm",children:[e.jsx("span",{className:"material-symbols-outlined text-[14px] transition-transform group-hover:-translate-x-0.5 text-white",children:"arrow_back"}),e.jsx("span",{className:"text-white font-bold",children:"Home"})]}),e.jsx("span",{className:"text-white/60 font-bold",children:"/"}),e.jsx("span",{className:"text-white text-[11px] uppercase tracking-[0.15em] font-bold",children:"Stay"})]}),e.jsx(x,{tagName:"h1",value:s.heroTitle,onChange:i=>t&&d("heroTitle",i),isEditMode:t,className:"text-display-2xl font-bold text-white",multiline:!0}),e.jsx(x,{tagName:"p",value:s.heroSubtitle,onChange:i=>t&&d("heroSubtitle",i),isEditMode:t,className:"text-muted-force text-body-lg font-sans text-stone-200",placeholder:"Add hero subtitle...",multiline:!0})]})]})},"hero");case"accommodations":return e.jsxs("section",{className:"py-24 px-6 lg:px-12 w-full relative",children:[t&&e.jsxs("div",{className:"absolute top-4 right-4 z-[100] flex gap-2",children:[e.jsx("button",{onClick:()=>O("accommodations"),disabled:!j,className:"p-2 bg-black/5 hover:bg-black/10 rounded-none disabled:opacity-30",children:e.jsx("span",{className:"material-symbols-outlined",children:"expand_less"})}),e.jsx("button",{onClick:()=>R("accommodations"),disabled:!H,className:"p-2 bg-black/5 hover:bg-black/10 rounded-none disabled:opacity-30",children:e.jsx("span",{className:"material-symbols-outlined",children:"expand_more"})})]}),e.jsxs("div",{className:"max-w-[1440px] mx-auto px-6 lg:px-12",children:[e.jsxs("div",{className:"text-left mb-16",children:[e.jsx(x,{tagName:"h2",value:s.accommodationsTitle||"Stay in the Heart of the District",onCh
1ange:i=>t&&d("accommodationsTitle",i),isEditMode:t,className:"text-heading-lg mb-4"}),e.jsx(x,{tagName:"p",value:s.accommodationsSubtitle||"Premier hotels located directly within Corning Gaffer District",onChange:i=>t&&d("accommodationsSubtitle",i),isEditMode:t,className:"text-body-md text-muted max-w-xl",multiline:!0})]}),e.jsxs("div",{className:"space-y-24",children:[(s.accommodations||[]).map((i,r)=>e.jsxs("div",{className:`flex flex-col lg:flex-row gap-16 items-center ${r%2!==0?"lg:flex-row-reverse":""} relative group`,children:[e.jsx("div",{className:"w-full lg:w-7/12 aspect-[16/10] overflow-hidden shadow-2xl bg-zinc-100 dark:bg-zinc-800 border border-zinc-200/50 dark:border-zinc-800",children:e.jsx(A,{src:i.image,alt:i.name,onChange:(l,a)=>{if(!t)return;const u=[...s.accommodations||[]];u[r]={...u[r],image:l,imageSettings:a||u[r].imageSettings},d("accommodations",u)},settings:i.imageSettings||i.settings,isEditMode:t,className:"w-full h-full object-cover hover:scale-105 transition-transform duration-700",excludeBusinessImages:!0})}),e.jsxs("div",{className:"w-full lg:w-5/12 flex flex-col gap-6",children:[e.jsx(x,{tagName:"span",value:i.type,onChange:l=>{if(!t)return;const a=[...s.accommodations||[]];a[r]={...a[r],type:l},d("accommodations",a)},isEditMode:t,className:"text-caption text-primary"}),e.jsx(x,{tagName:"h3",value:i.name,onChange:l=>{if(!t)return;const a=[...s.accommodations||[]];a[r]={...a[r],name:l},d("accommodations",a)},isEditMode:t,className:"text-heading-md"}),e.jsx(x,{tagName:"p",value:i.description,onChange:l=>{if(!t)return;const a=[...s.accommodations||[]];a[r]={...a[r],description:l},d("accommodations",a)},isEditMode:t,className:"text-body-lg text-zinc-600 dark:text-muted",multiline:!0}),e.jsx("div",{className:"flex flex-wrap gap-3 my-4",children:(i.amenities||[]).map((l,a)=>e.jsx(x,{tagName:"span",value:l,onChange:u=>{if(!t)return;const g=[...s.accommodations||[]],k=[...g[r].amenities||[]];k[a]=u,g[r]={...g[r],amenities:k},d("accommodations",g)},isEditMode:t,className:"px-3 py-1 bg-zinc-100 dark:bg-zinc-800 text-caption text-muted"},a))}),e.jsxs("div",{className:"flex items-center gap-2 text-muted text-sm mb-6",children:[e.jsx("span",{className:"material-symbols-outlined text-sm",children:"location_on"}),e.jsx(x,{tagName:"span",value:i.location,onChange:l=>{if(!t)return;const a=[...s.accommodations||[]];a[r]={...a[r],location:l},d("accommodations",a)},isEditMode:t})]}),t&&e.jsxs("div",{className:"flex items-center gap-2 text-muted text-xs mb-4 w-full",children:[e.jsx("span",{className:"material-symbols-outlined text-sm",children:"link"}),e.jsx("input",{type:"text",value:i.bookUrl||"",placeholder:"Booking URL",onChange:l=>{const a=[...s.accommodations||[]];a[r]={...a[r],bookUrl:l.target.value},d("accommodations",a)},className:"w-full px-2 py-1 text-xs border border-zinc-300 dark:border-zinc-700 bg-transparent rounded-none"})]}),e.jsx("div",{className:"flex gap-4",children:i.bookUrl?e.jsx("a",{href:i.bookUrl,target:"_blank",rel:"noopener noreferrer",className:"bg-black text-white px-8 py-4 text-[10px] font-semibold uppercase tracking-widest hover:bg-zinc-800 transition-colors inline-block text-center",children:"Visit Website"}):e.jsx("button",{className:"bg-black text-white px-8 py-4 text-[10px] font-semibold uppercase tracking-widest hover:bg-zinc-800 transition-colors",children:"Visit Website"})})]}),t&&e.jsx("button",{onClick:()=>{const l=(s.accommodations||[]).filter((a,u)=>u!==r);d("accommodations",l)},className:"absolute -top-4 -right-4 w-10 h-10 bg-red-500 text-white rounded-none flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity z-50 shadow-xl",children:e.jsx("span",{className:"material-symbols-outlined",children:"delete"})})]},i.id||r)),t&&e.jsxs("button",{onClick:()=>{const i=[...s.accommodations||[],{id:`h-${Date.now()}`,name:"New Accommodation",type:"Hotel",description:"Add description here.",image:"/images/external/img_f6d4ba3cb77b7f56.png",amenities:["Amenity 1"],location:"Address here"}];d("accommodations",i)},className:"w-full py-12 border-2 border-dashed border-primary/20 text-primary font-semibold hover:bg-primary/5 transition-all flex flex-col items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-4xl",children:"add_business"}),e.jsx("span",{children:"Add New Accommodation"})]})]})]})]},"accommodations");case"boutique":return e.jsxs("section",{className:"bg-zinc-100 dark:bg-zinc-900/50 py-24 px-6 w-full relative",children:[t&&e.jsxs("div",{className:"absolute top-4 right-4 z-[100] flex gap-2",children:[e.jsx("button",{onClick:()=>O("boutique"),disabled:!j,className:"p-2 bg-black/5 hover:bg-black/10 rounded-none disabled:opacity-30",children:e.jsx("span",{className:"material-symbols-outlined",children:"expand_less"})}),e.jsx("button",{onClick:()=>R("boutique"),disabled:!H,className:"p-2 bg-black/5 hover:bg-black/10 rounded-none disabled:opacity-30",children:e.jsx("span",{className:"material-symbols-outlined",children:"expand_more"})})]}),e.jsxs("div",{className:"max-w-[1440px] mx-auto px-6 lg:px-12",children:[e.jsxs("div",{className:"text-left mb-16",children:[e.jsx(x,{tagName:"h2",value:s.boutiqueTitle||"Stay in Corning, just minutes from the Gaffer District",onCh
1ange:i=>t&&d("boutiqueTitle",i),isEditMode:t,className:"text-heading-lg mb-4"}),e.jsx(x,{tagName:"p",value:s.boutiqueSubtitle||"Explore nearby accommodations throughout the Corning area",onChange:i=>t&&d("boutiqueSubtitle",i),isEditMode:t,className:"text-body-md text-muted max-w-xl",multiline:!0})]}),e.jsx("div",{className:"space-y-24",children:(s.boutiqueStays||[]).map((i,r)=>e.jsxs("div",{className:`flex flex-col lg:flex-row gap-16 items-center ${r%2!==0?"lg:flex-row-reverse":""} relative group`,children:[e.jsx("div",{className:"w-full lg:w-7/12 aspect-[16/10] overflow-hidden shadow-2xl bg-zinc-100 dark:bg-zinc-800 border border-zinc-200/50 dark:border-zinc-800",children:e.jsx(A,{src:i.img,alt:i.name,onChange:(l,a)=>{if(!t)return;const u=[...s.boutiqueStays||[]];u[r]={...u[r],img:l,imageSettings:a||u[r].imageSettings},d("boutiqueStays",u)},settings:i.imageSettings||i.settings,isEditMode:t,className:"w-full h-full object-cover hover:scale-105 transition-transform duration-700",excludeBusinessImages:!0})}),e.jsxs("div",{className:"w-full lg:w-5/12 flex flex-col gap-6",children:[e.jsx(x,{tagName:"span",value:i.type||"Boutique Stay",onChange:l=>{if(!t)return;const a=[...s.boutiqueStays||[]];a[r]={...a[r],type:l},d("boutiqueStays",a)},isEditMode:t,className:"text-caption text-primary"}),e.jsx(x,{tagName:"h3",value:i.name,onChange:l=>{if(!t)return;const a=[...s.boutiqueStays||[]];a[r]={...a[r],name:l},d("boutiqueStays",a)},isEditMode:t,className:"text-heading-md"}),e.jsx(x,{tagName:"p",value:i.desc,onChange:l=>{if(!t)return;const a=[...s.boutiqueStays||[]];a[r]={...a[r],desc:l},d("boutiqueStays",a)},isEditMode:t,className:"text-body-lg text-zinc-600 dark:text-muted",multiline:!0}),e.jsx("div",{className:"flex flex-wrap gap-3 my-4",children:(i.amenities||[]).map((l,a)=>e.jsx(x,{tagName:"span",value:l,onChange:u=>{if(!t)return;const g=[...s.boutiqueStays||[]],k=[...g[r].amenities||[]];k[a]=u,g[r]={...g[r],amenities:k},d("boutiqueStays",g)},isEditMode:t,className:"px-3 py-1 bg-zinc-100 dark:bg-zinc-800 text-caption text-muted"},a))}),e.jsxs("div",{className:"flex items-center gap-2 text-muted text-sm mb-6",children:[e.jsx("span",{className:"material-symbols-outlined text-sm",children:"location_on"}),e.jsx(x,{tagName:"span",value:i.location,onChange:l=>{if(!t)return;const a=[...s.boutiqueStays||[]];a[r]={...a[r],location:l},d("boutiqueStays",a)},isEditMode:t})]}),t&&e.jsxs("div",{className:"flex items-center gap-2 text-muted text-xs mb-4 w-full",children:[e.jsx("span",{className:"material-symbols-outlined text-sm",children:"link"}),e.jsx("input",{type:"text",value:i.bookUrl||"",placeholder:"Booking URL",onChange:l=>{const a=[...s.boutiqueStays||[]];a[r]={...a[r],bookUrl:l.target.value},d("boutiqueStays",a)},className:"w-full px-2 py-1 text-xs border border-zinc-300 dark:border-zinc-700 bg-transparent rounded-none"})]}),e.jsx("div",{className:"flex gap-4",children:i.bookUrl?e.jsx("a",{href:i.bookUrl,target:"_blank",rel:"noopener noreferrer",className:"bg-black text-white px-8 py-4 text-[10px] font-semibold uppercase tracking-widest hover:bg-zinc-800 transition-colors inline-block text-center",children:"Visit Website"}):e.jsx("button",{className:"bg-black text-white px-8 py-4 text-[10px] font-semibold uppercase tracking-widest hover:bg-zinc-800 transition-colors",children:"Visit Website"})})]})]},r))})]})]},"boutique");case"why-stay":return e.jsxs("section",{className:"py-24 max-w-[1280px] mx-auto px-6 w-full text-center",children:[e.jsx(x,{tagName:"h2",value:s.whyStayTitle||"Why stay in the district?",onChange:i=>t&&d("whyStayTitle",i),isEditMode:t,className:"text-heading-lg mb-12"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-16",children:(s.whyStayItems||[]).map((i,r)=>e.jsxs("div",{className:"relative group",children:[e.jsx("span",{className:"material-symbols-outlined text-4xl text-primary mb-6",children:i.icon}),e.jsx(x,{tagName:"h4",value:i.title,onChange:l=>{if(!t)return;const a=[...s.whyStayItems||[]];a[r]={...a[r],title:l},d("whyStayItems",a)},isEditMode:t,className:"text-heading-md mb-4"}),e.jsx(x,{tagName:"p",value:i.description,onChange:l=>{if(!t)return;const a=[...s.whyStayItems||[]];a[r]={...a[r],description:l},d("whyStayItems",a)},isEditMode:t,className:"text-body-sm text-muted",multiline:!0})]},r))})]},"why-stay");default:const N=(X=s.dynamicSections)==null?void 0:X.find(i=>i.id===n);if(!N)return null;const D=((Z=s.dynamicSections)==null?void 0:Z.findIndex(i=>i.id===n))??-1;return e.jsx(ve,{section:N,isEditMode:t,onUpdate:i=>t&&be(D,i),onDelete:()=>t&&fe(D),onMoveUp:()=>t&&O(N.id),onMoveDown:()=>
1t&&R(N.id),isMovableUp:j,isMovableDown:H},N.id)}};return oe&&F?e.jsx(we,{title:"CMS Stay",currentData:o,historicalData:F,onRestore:()=>G(F),onClose:Y,builtInSections:["hero","accommodations","boutique","why-stay"],renderSection:(n,s)=>Q(n,s,!1)}):I||!o?e.jsx("div",{className:"min-h-screen flex items-center justify-center",children:e.jsx("div",{className:"animate-spin text-primary",children:e.jsx("span",{className:"material-symbols-outlined text-4xl",children:"restart_alt"})})}):e.jsxs("div",{className:`flex flex-col items-center w-full font-sans ${b?"pb-32":""}`,children:[e.jsx(je,{title:"Stay in the Gaffer District | Corning, NY",description:Ne(o.heroDescription||o.heroSubtitle||"From luxury hotels to historic boutique inns, find the perfect base for your Corning exploration."),image:o.heroImage||"/images/external/img_b1dd9ded9d5b063e.jpg"}),o.sectionOrder.map(n=>e.jsx(E.Fragment,{children:Q(n,o,b)},n)),b&&e.jsx("section",{className:"py-20 bg-zinc-50 dark:bg-zinc-900/50 border-t border-zinc-100 dark:border-zinc-800 w-full",children:e.jsx("div",{className:"max-w-[1280px] mx-auto px-6 lg:px-10",children:e.jsxs("button",{onClick:he,className:"w-full p-12 border-4 border-dashed border-zinc-200 dark:border-zinc-800 rounded-none hover:border-primary hover:bg-primary/5 transition-all flex flex-col items-center justify-center gap-4 text-zinc-400 hover:text-primary group",children:[e.jsx("div",{className:"w-16 h-16 bg-zinc-100 dark:bg-zinc-800 rounded-none flex items-center justify-center group-hover:bg-primary group-hover:text-white transition-all shadow-sm",children:e.jsx("span",{className:"material-symbols-outlined text-4xl",children:"add"})}),e.jsxs("div",{className:"text-center",children:[e.jsx("span",{className:"text-xl font-bold uppercase tracking-widest block mb-1",children:"Add New Section"}),e.jsx("span",{className:"text-sm opacity-60",children:"Personalize this page with hotels, boutique stays, or descriptions"})]})]})})}),ae&&e.jsxs("div",{className:"fixed inset-0 z-[2500] flex justify-end",children:[e.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm transition-opacity",onClick:()=>z(!1)}),e.jsxs("div",{className:"relative w-full max-w-md h-full bg-white dark:bg-zinc-900 shadow-2xl flex flex-col z-10 border-l border-zinc-200 dark:border-zinc-800 animate-slide-in",children:[e.jsxs("div",{className:"p-6 border-b border-zinc-200 dark:border-zinc-800 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-primary",children:"history"}),e.jsx("h3",{className:"text-lg font-bold uppercase tracking-wider text-zinc-900 dark:text-white",children:"Version History"})]}),e.jsx("button",{onClick:()=>z(!1),className:"w-8 h-8 rounded-none border border-zinc-200 dark:border-zinc-700 flex items-center justify-center hover:bg-zinc-100 dark:hover:bg-zinc-800 cursor-pointer",children:e.jsx("span",{className:"material-symbols-outlined text-sm",children:"close"})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:re?e.jsxs("div",{className:"text-center py-12 text-zinc-500",children:[e.jsx("div",{className:"w-6 h-6 border-2 border-primary border-t-transparent rounded-full animate-spin mx-auto mb-4"}),"Loading version list..."]}):P.length===0?e.jsx("div",{className:"text-center py-12 text-zinc-500",children:"No historical snapshots found for this page."}):e.jsx("div",{className:"flex flex-col gap-3",children:P.map(n=>e.jsxs("div",{className:`p-4 border transition-all text-left flex flex-col gap-2 relative group/version ${le===n.id?"border-primary bg-primary/5":"border-zinc-200 dark:border-zinc-800 hover:border-zinc-400 dark:hover:bg-zinc-650"}`,children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("span",{className:"text-xs font-mono font-bold text-zinc-500",children:["Snapshot #",n.id]}),e.jsx("span",{className:"text-[10px] uppercase font-bold text-muted bg-zinc-100 dark:bg-zinc-800 px-1.5 py-0.25",children:new Date(n.created_at).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),e.jsxs("div",{className:"text-sm font-semibold flex items-center gap-1.5 text-zinc-800 dark:text-zinc-200",children:[e.jsx("span",{className:"material-symbols-outlined text-xs text-zinc-400",children:"person"}),n.user_email]}),e.jsx("div",{className:"text-xs text-zinc-400",children:new Date(n.created_at).toLocaleDateString([],{dateStyle:"medium"})}),e.jsxs("div",{className:"flex gap-2 mt-3 pt-3 border-t border-dashed border-zinc-200 dark:border-zinc-800",children:[e.jsxs("button",{onClick:()=>de(n.id),className:"flex-1 py-1.5 bg-zinc-100 dark:bg-zinc-800 hover:bg-primary hover:text-white text-[10px] uppercase font-bold tracking-wider transition-colors border border-zinc-200 dark:border-zinc-700 flex items-center justify-center gap-1 cursor-pointer",children:[e.jsx("span",{className:"material-symbols-outlined text-xs",children:"compare"}),"Compare"]}),e.jsxs("button",{onClick:async()=>{try{const s=await fetch(`/api/cms/version/${n.id}`,{credentials:"include"});if(s.ok){const t=await s.json();G(t.content_data)}}catch(s){console.error(s),alert("Failed to load version details.")}},className:"flex-1 py-1.5 bg-primary text-white hover:bg-primary/90 text-[10px] uppercase font-bold tracking-wider transition-colors flex items-center justify-center gap-1 cursor-pointer",children:[e.jsx("span",{className:"material-symbols-outlined text-xs",children:"restore"}),"Restore"]})]})]},n.id))})})]})]}),b&&e.jsx("div",{className:"fixed bottom-8 right-8 z-[1100] flex flex-col gap-3 items-end",children:e.jsxs("div",{className:"flex flex-col gap-2 bg-white dark:bg-zinc-900 p-4 rounded-none shadow-2xl border border-zinc-200 dark:border-zinc-800 animate-fade-in-up min-w-[280px]",children:[e.jsxs("div",{className:"flex items-center justify-between text-xs font-semibold uppercase tracking-wider mb-2",children:[e.jsx("span",{className:"text-muted",children:"Status:"}),te?e.jsxs("span",{className:"text-primary flex items-center gap-1.5",children:[e.jsx("span",{className:"w-2.5 h-2.5 border-2 border-primary border-t-transparent roun
1ded-full animate-spin"}),"Saving..."]}):f?e.jsxs("span",{className:"text-amber-500 flex items-center gap-1",children:[e.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500 animate-pulse"}),"Unsaved changes"]}):e.jsxs("span",{className:"text-green-500 flex items-center gap-1",children:[e.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-green-500"}),"All changes saved"]})]}),e.jsxs("div",{className:"flex items-center justify-between border-t border-zinc-100 dark:border-zinc-800 pt-3 mt-1 w-full",children:[e.jsx("span",{className:"text-[10px] uppercase font-bold text-muted",children:"Undo / Redo"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"button",onClick:xe,disabled:y>=v.length-1,className:"w-8 h-8 flex items-center justify-center bg-zinc-50 dark:bg-zinc-800 hover:bg-zinc-100 dark:hover:bg-zinc-700 disabled:opacity-30 text-main dark:text-white rounded-none border border-zinc-200 dark:border-zinc-700 transition-all hover:scale-105",title:"Undo",children:e.jsx("span",{className:"material-symbols-outlined text-sm",children:"undo"})}),e.jsx("button",{type:"button",onClick:ue,disabled:y<=0,className:"w-8 h-8 flex items-center justify-center bg-zinc-50 dark:bg-zinc-800 hover:bg-zinc-100 dark:hover:bg-zinc-700 disabled:opacity-30 text-main dark:text-white rounded-none border border-zinc-200 dark:border-zinc-700 transition-all hover:scale-105",title:"Redo",children:e.jsx("span",{className:"material-symbols-outlined text-sm",children:"redo"})})]})]}),e.jsxs("div",{className:"flex items-center justify-between border-t border-zinc-100 dark:border-zinc-800 pt-3 mt-1 w-full",children:[e.jsx("span",{className:"text-[10px] uppercase font-bold text-muted",children:"Version Control"}),e.jsxs("button",{type:"button",onClick:()=>{ce(),z(!0)},className:"px-3 py-1.5 bg-zinc-50 dark:bg-zinc-800 hover:bg-zinc-100 dark:hover:bg-zinc-700 text-[#111418] dark:text-white rounded-none border border-zinc-200 dark:border-zinc-700 text-[10px] uppercase font-bold tracking-wider transition-all hover:scale-105 flex items-center gap-1 cursor-pointer",title:"View past versions and compare side-by-side",children:[e.jsx("span",{className:"material-symbols-outlined text-xs",children:"history"}),"History"]})]})]})}),e.jsx(ke,{isOpen:ne,onClose:()=>V(!1),onSelect:ge})]})};export{Re 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.